Hello community,
here is the log from the commit of package perl-Glib-Object-Introspection for
openSUSE:Factory checked in at 2019-12-12 23:17:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Glib-Object-Introspection (Old)
and /work/SRC/openSUSE:Factory/.perl-Glib-Object-Introspection.new.4691
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Glib-Object-Introspection"
Thu Dec 12 23:17:54 2019 rev:12 rq:755784 version:0.048
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Glib-Object-Introspection/perl-Glib-Object-Introspection.changes
2019-08-29 17:17:58.183362926 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Glib-Object-Introspection.new.4691/perl-Glib-Object-Introspection.changes
2019-12-12 23:17:57.374214597 +0100
@@ -1,0 +2,6 @@
+Wed Dec 11 03:09:07 UTC 2019 - <[email protected]>
+
+- updated to 0.048
+ see /usr/share/doc/packages/perl-Glib-Object-Introspection/
+
+-------------------------------------------------------------------
Old:
----
Glib-Object-Introspection-0.047.tar.gz
New:
----
Glib-Object-Introspection-0.048.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Glib-Object-Introspection.spec ++++++
--- /var/tmp/diff_new_pack.A17Og4/_old 2019-12-12 23:17:57.930214546 +0100
+++ /var/tmp/diff_new_pack.A17Og4/_new 2019-12-12 23:17:57.934214547 +0100
@@ -17,7 +17,7 @@
Name: perl-Glib-Object-Introspection
-Version: 0.047
+Version: 0.048
Release: 0
#Upstream: This library is free software; you can redistribute it and/or
modify it under the terms of the Lesser General Public License (LGPL). For more
information, see http://www.fsf.org/licenses/lgpl.txt
%define cpan_name Glib-Object-Introspection
++++++ Glib-Object-Introspection-0.047.tar.gz ->
Glib-Object-Introspection-0.048.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Glib-Object-Introspection-0.047/GObjectIntrospection.xs
new/Glib-Object-Introspection-0.048/GObjectIntrospection.xs
--- old/Glib-Object-Introspection-0.047/GObjectIntrospection.xs 2017-05-21
21:02:28.000000000 +0200
+++ new/Glib-Object-Introspection-0.048/GObjectIntrospection.xs 2019-09-29
03:48:36.000000000 +0200
@@ -17,14 +17,16 @@
*
*/
-#include "build/gi-version.h"
-
#include <gperl.h>
#include <gperl_marshal.h>
#include <girepository.h>
#include <girffi.h>
+#ifndef GI_CHECK_VERSION
+# include "build/gi-version.h"
+#endif
+
/* #define NOISY */
#ifdef NOISY
# define dwarn(msg...) G_STMT_START { \
@@ -160,6 +162,11 @@
GPerlI11nInvocationInfo base;
} GPerlI11nPerlInvocationInfo;
+typedef enum {
+ GPERL_I11N_MEMORY_SCOPE_IRRELEVANT,
+ GPERL_I11N_MEMORY_SCOPE_TEMPORARY,
+} GPerlI11nMemoryScope;
+
/* callbacks */
static GPerlI11nPerlCallbackInfo * create_perl_callback_closure_for_named_sub
(GIBaseInfo *cb_info, gchar *sub_name);
static GPerlI11nPerlCallbackInfo * create_perl_callback_closure (GIBaseInfo
*cb_info, SV *code);
@@ -176,7 +183,7 @@
static void clear_invocation_info (GPerlI11nInvocationInfo *iinfo);
static void free_after_call (GPerlI11nInvocationInfo *iinfo,
- GFunc func, gpointer data);
+ GDestroyNotify func, gpointer data);
static void invoke_free_after_call_handlers (GPerlI11nInvocationInfo *iinfo);
#if GI_CHECK_VERSION (1, 33, 10)
@@ -220,6 +227,7 @@
static SV * interface_to_sv (GITypeInfo* info,
GIArgument *arg,
gboolean own,
+ GPerlI11nMemoryScope mem_scope,
GPerlI11nInvocationInfo *iinfo);
static void sv_to_interface (GIArgInfo * arg_info,
GITypeInfo * type_info,
@@ -242,6 +250,7 @@
static SV * arg_to_sv (GIArgument * arg,
GITypeInfo * info,
GITransfer transfer,
+ GPerlI11nMemoryScope mem_scope,
GPerlI11nInvocationInfo *iinfo);
static gpointer sv_to_callback (GIArgInfo * arg_info, GITypeInfo * type_info,
SV * sv, GPerlI11nInvocationInfo * invocation_info);
@@ -592,7 +601,11 @@
/* FIXME: What am I suppossed to do with the return value? */
g_constant_info_get_value (info, &value);
/* No PUTBACK/SPAGAIN needed here. */
- RETVAL = arg_to_sv (&value, type_info, GI_TRANSFER_NOTHING, NULL);
+ RETVAL = arg_to_sv (&value,
+ type_info,
+ GI_TRANSFER_NOTHING,
+ GPERL_I11N_MEMORY_SCOPE_IRRELEVANT,
+ NULL);
#if GI_CHECK_VERSION (1, 30, 1)
g_constant_info_free_value (info, &value);
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Glib-Object-Introspection-0.047/META.json
new/Glib-Object-Introspection-0.048/META.json
--- old/Glib-Object-Introspection-0.047/META.json 2019-02-05
04:45:48.000000000 +0100
+++ new/Glib-Object-Introspection-0.048/META.json 2019-12-10
16:39:39.000000000 +0100
@@ -67,6 +67,6 @@
"x_IRC" : "irc://irc.gimp.org/#gtk-perl",
"x_MailingList" : "https://mail.gnome.org/mailman/listinfo/gtk-perl-list"
},
- "version" : "0.047",
+ "version" : "0.048",
"x_serialization_backend" : "JSON::PP version 2.97001"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Glib-Object-Introspection-0.047/META.yml
new/Glib-Object-Introspection-0.048/META.yml
--- old/Glib-Object-Introspection-0.047/META.yml 2019-02-05
04:45:48.000000000 +0100
+++ new/Glib-Object-Introspection-0.048/META.yml 2019-12-10
16:39:39.000000000 +0100
@@ -37,5 +37,5 @@
homepage: http://gtk2-perl.sourceforge.net
license: http://www.gnu.org/licenses/lgpl-2.1.html
repository: https://gitlab.gnome.org/GNOME/perl-glib-object-introspection
-version: '0.047'
+version: '0.048'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Glib-Object-Introspection-0.047/Makefile.PL
new/Glib-Object-Introspection-0.048/Makefile.PL
--- old/Glib-Object-Introspection-0.047/Makefile.PL 2018-09-26
07:02:20.000000000 +0200
+++ new/Glib-Object-Introspection-0.048/Makefile.PL 2019-09-29
03:48:36.000000000 +0200
@@ -141,10 +141,13 @@
compile_test_libraries();
-ExtUtils::PkgConfig->write_version_macros (
- "build/gi-version.h",
- "gobject-introspection-1.0" => "GI",
-);
+my $have_gi_1_60 =
ExtUtils::PkgConfig->atleast_version('gobject-introspection-1.0', '1.60.0');
+if (!$have_gi_1_60) {
+ ExtUtils::PkgConfig->write_version_macros (
+ "build/gi-version.h",
+ "gobject-introspection-1.0" => "GI",
+ );
+}
my $deps = ExtUtils::Depends->new ('Glib::Object::Introspection' => 'Glib');
$deps->set_inc ($cfg{cflags});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Glib-Object-Introspection-0.047/NEWS
new/Glib-Object-Introspection-0.048/NEWS
--- old/Glib-Object-Introspection-0.047/NEWS 2019-02-05 04:42:43.000000000
+0100
+++ new/Glib-Object-Introspection-0.048/NEWS 2019-12-10 16:36:13.000000000
+0100
@@ -1,3 +1,14 @@
+Overview of changes in Glib::Object::Introspection 0.048
+========================================================
+
+* Hush deprecation warnings by using memmove instead of g_memmove
+* Adapt t/arrays.t to newer poppler versions to avoid test failures
+* Avoid double-freeing struct entries in flat array
+* Copy item memory in flat arrays when we are given ownership (RT# 130280)
+* Hush a few compiler warnings
+∗ Fix skip count in t/arrays.t
+* Adapt t/arrays.t to newer poppler versions to avoid test failures
+
Overview of changes in Glib::Object::Introspection 0.047
========================================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Glib-Object-Introspection-0.047/gperl-i11n-field.c
new/Glib-Object-Introspection-0.048/gperl-i11n-field.c
--- old/Glib-Object-Introspection-0.047/gperl-i11n-field.c 2015-01-24
14:12:20.000000000 +0100
+++ new/Glib-Object-Introspection-0.048/gperl-i11n-field.c 2019-12-09
19:44:47.000000000 +0100
@@ -78,6 +78,7 @@
sv = arg_to_sv (&value,
field_type,
GI_TRANSFER_NOTHING,
+ GPERL_I11N_MEMORY_SCOPE_IRRELEVANT,
NULL);
}
@@ -97,6 +98,7 @@
sv = arg_to_sv (&value,
field_type,
transfer,
+ GPERL_I11N_MEMORY_SCOPE_IRRELEVANT,
NULL);
}
@@ -146,7 +148,7 @@
interface_type,
sv);
size = g_struct_info_get_size (interface_info);
- g_memmove (G_STRUCT_MEMBER_P (mem, offset),
arg.v_pointer, size);
+ memmove (G_STRUCT_MEMBER_P (mem, offset),
arg.v_pointer, size);
} else { /* Pointer */
GType gtype = get_gtype (interface_info);
if (g_type_is_a (gtype, G_TYPE_BOXED)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Glib-Object-Introspection-0.047/gperl-i11n-invoke-c.c
new/Glib-Object-Introspection-0.048/gperl-i11n-invoke-c.c
--- old/Glib-Object-Introspection-0.047/gperl-i11n-invoke-c.c 2017-05-21
21:02:28.000000000 +0200
+++ new/Glib-Object-Introspection-0.048/gperl-i11n-invoke-c.c 2019-09-29
03:48:36.000000000 +0200
@@ -236,6 +236,7 @@
value = SAVED_STACK_SV (arg_to_sv (&return_value,
&iinfo.base.return_type_info,
iinfo.base.return_type_transfer,
+
GPERL_I11N_MEMORY_SCOPE_IRRELEVANT,
&iinfo.base));
if (value) {
XPUSHs (sv_2mortal (value));
@@ -268,6 +269,7 @@
sv = SAVED_STACK_SV (arg_to_sv
(iinfo.out_args[i].v_pointer,
&(iinfo.base.arg_types[i]),
transfer,
+
GPERL_I11N_MEMORY_SCOPE_IRRELEVANT,
&iinfo.base));
if (sv) {
XPUSHs (sv_2mortal (sv));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Glib-Object-Introspection-0.047/gperl-i11n-invoke-perl.c
new/Glib-Object-Introspection-0.048/gperl-i11n-invoke-perl.c
--- old/Glib-Object-Introspection-0.047/gperl-i11n-invoke-perl.c
2018-05-22 04:51:32.000000000 +0200
+++ new/Glib-Object-Introspection-0.048/gperl-i11n-invoke-perl.c
2019-09-29 03:48:36.000000000 +0200
@@ -112,7 +112,11 @@
? *((gpointer *) args[i+args_offset])
: args[i+args_offset];
raw_to_arg (raw, &arg, arg_type);
- sv = SAVED_STACK_SV (arg_to_sv (&arg, arg_type,
transfer, &iinfo.base));
+ sv = SAVED_STACK_SV (arg_to_sv (&arg,
+ arg_type,
+ transfer,
+
GPERL_I11N_MEMORY_SCOPE_IRRELEVANT,
+ &iinfo.base));
/* If arg_to_sv returns NULL, we take that as 'skip
* this argument'; happens for GDestroyNotify, for
* example. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Glib-Object-Introspection-0.047/gperl-i11n-invoke.c
new/Glib-Object-Introspection-0.048/gperl-i11n-invoke.c
--- old/Glib-Object-Introspection-0.047/gperl-i11n-invoke.c 2017-05-21
21:02:28.000000000 +0200
+++ new/Glib-Object-Introspection-0.048/gperl-i11n-invoke.c 2019-09-29
03:48:36.000000000 +0200
@@ -51,6 +51,13 @@
}
static void
+_free_array_info (gpointer ai, gpointer user_data)
+{
+ PERL_UNUSED_VAR (user_data);
+ g_free (ai);
+}
+
+static void
clear_invocation_info (GPerlI11nInvocationInfo *iinfo)
{
g_slist_free (iinfo->free_after_call);
@@ -61,7 +68,7 @@
g_slist_free (iinfo->callback_infos);
iinfo->callback_infos = NULL;
- g_slist_foreach (iinfo->array_infos, (GFunc) g_free, NULL);
+ g_slist_foreach (iinfo->array_infos, _free_array_info, NULL);
g_slist_free (iinfo->array_infos);
iinfo->array_infos = NULL;
}
@@ -69,12 +76,12 @@
/* ------------------------------------------------------------------------- */
typedef struct {
- GFunc func;
+ GDestroyNotify func;
gpointer data;
} FreeClosure;
static void
-free_after_call (GPerlI11nInvocationInfo *iinfo, GFunc func, gpointer data)
+free_after_call (GPerlI11nInvocationInfo *iinfo, GDestroyNotify func, gpointer
data)
{
FreeClosure *closure = g_new (FreeClosure, 1);
closure->func = func;
@@ -84,9 +91,11 @@
}
static void
-_invoke_free_closure (FreeClosure *closure)
+_invoke_free_closure (gpointer closure_in, gpointer user_data)
{
- closure->func (closure->data, NULL);
+ FreeClosure *closure = closure_in;
+ PERL_UNUSED_VAR (user_data);
+ closure->func (closure->data);
g_free (closure);
}
@@ -96,5 +105,5 @@
/* We free the FreeClosures themselves directly after invoking them.
The list
is freed in clear_invocation_info. */
g_slist_foreach (iinfo->free_after_call,
- (GFunc) _invoke_free_closure, NULL);
+ _invoke_free_closure, NULL);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-arg.c
new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-arg.c
--- old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-arg.c
2015-07-12 06:15:18.000000000 +0200
+++ new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-arg.c
2019-09-29 03:48:36.000000000 +0200
@@ -150,13 +150,14 @@
arg_to_sv (GIArgument * arg,
GITypeInfo * info,
GITransfer transfer,
+ GPerlI11nMemoryScope mem_scope,
GPerlI11nInvocationInfo *iinfo)
{
GITypeTag tag = g_type_info_get_tag (info);
gboolean own = transfer >= GI_TRANSFER_CONTAINER;
- dwarn ("info = %p, tag = %d (%s)\n",
- info, tag, g_type_tag_to_string (tag));
+ dwarn ("info = %p, tag = %d (%s), transfer = %d, own = %d\n",
+ info, tag, g_type_tag_to_string (tag), transfer, own);
switch (tag) {
case GI_TYPE_TAG_VOID:
@@ -230,7 +231,7 @@
return array_to_sv (info, arg->v_pointer, transfer, iinfo);
case GI_TYPE_TAG_INTERFACE:
- return interface_to_sv (info, arg, own, iinfo);
+ return interface_to_sv (info, arg, own, mem_scope, iinfo);
case GI_TYPE_TAG_GLIST:
case GI_TYPE_TAG_GSLIST:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-array.c
new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-array.c
--- old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-array.c
2017-05-21 21:02:28.000000000 +0200
+++ new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-array.c
2019-09-29 03:48:36.000000000 +0200
@@ -42,24 +42,42 @@
}
static void
-_free_array (GArray *array)
+_free_array (GArray *array, gboolean free_content)
{
- dwarn ("%p\n", array);
- g_array_free (array, TRUE);
+ dwarn ("%p: free_content=%d\n", array, free_content);
+ g_array_free (array, free_content);
}
static void
-_free_ptr_array (GPtrArray *array)
+_free_array_and_content (gpointer array)
{
- dwarn ("%p\n", array);
- g_ptr_array_free (array, TRUE);
+ _free_array (array, TRUE);
}
static void
-_free_byte_array (GByteArray *array)
+_free_ptr_array (GPtrArray *array, gboolean free_content)
{
- dwarn ("%p\n", array);
- g_byte_array_free (array, TRUE);
+ dwarn ("%p: free_content=%d\n", array, free_content);
+ g_ptr_array_free (array, free_content);
+}
+
+static void
+_free_ptr_array_and_content (gpointer array)
+{
+ _free_ptr_array (array, TRUE);
+}
+
+static void
+_free_byte_array (GByteArray *array, gboolean free_content)
+{
+ dwarn ("%p: free_content=%d\n", array, free_content);
+ g_byte_array_free (array, free_content);
+}
+
+static void
+_free_byte_array_and_content (gpointer array)
+{
+ _free_byte_array (array, TRUE);
}
/* This may call Perl code (via arg_to_sv), so it needs to be wrapped with
@@ -76,6 +94,7 @@
GITypeTag param_tag;
gsize item_size;
GITransfer item_transfer;
+ gboolean free_element_data;
gboolean need_struct_value_semantics;
gssize length = -1, i;
AV *av;
@@ -107,7 +126,9 @@
g_assert (iinfo && iinfo->aux_args);
conversion_sv = arg_to_sv
(&(iinfo->aux_args[length_pos]),
&(iinfo->arg_types[length_pos]),
- GI_TRANSFER_NOTHING,
NULL);
+ GI_TRANSFER_NOTHING,
+
GPERL_I11N_MEMORY_SCOPE_IRRELEVANT,
+ NULL);
length = SvIV (conversion_sv);
SvREFCNT_dec (conversion_sv);
}
@@ -132,6 +153,10 @@
ccroak ("Could not determine the length of the array");
}
+ param_info = g_type_info_get_param_type (info, 0);
+ param_tag = g_type_info_get_tag (param_info);
+ item_size = size_of_type_info (param_info);
+
/* FIXME: What about an array containing arrays of strings, where the
* outer array is GI_TRANSFER_EVERYTHING but the inner arrays are
* GI_TRANSFER_CONTAINER? */
@@ -139,14 +164,11 @@
? GI_TRANSFER_EVERYTHING
: GI_TRANSFER_NOTHING;
- param_info = g_type_info_get_param_type (info, 0);
- param_tag = g_type_info_get_tag (param_info);
- item_size = size_of_type_info (param_info);
-
av = newAV ();
need_struct_value_semantics =
_need_struct_value_semantics (array_type, param_info,
param_tag);
+ dwarn ("value semantics = %d\n", need_struct_value_semantics);
dwarn ("type %d, array %p, elements %p\n",
array_type, array, elements);
@@ -159,32 +181,39 @@
for (i = 0; i < length; i++) {
GIArgument arg;
- SV *value;
+ SV *value = NULL;
gpointer element = elements + ((gsize) i) * item_size;
- dwarn (" element %"G_GSSIZE_FORMAT": %p\n", i, element);
+ gpointer raw_pointer = element;
+ GPerlI11nMemoryScope mem_scope =
GPERL_I11N_MEMORY_SCOPE_IRRELEVANT;
if (need_struct_value_semantics) {
- raw_to_arg (&element, &arg, param_info);
- } else {
- raw_to_arg (element, &arg, param_info);
+ raw_pointer = &element;
+ mem_scope = GPERL_I11N_MEMORY_SCOPE_TEMPORARY;
}
- value = arg_to_sv (&arg, param_info, item_transfer, iinfo);
+ dwarn (" element %"G_GSSIZE_FORMAT": %p, pointer: %p\n", i,
element, raw_pointer);
+ raw_to_arg (raw_pointer, &arg, param_info);
+ value = arg_to_sv (&arg, param_info, item_transfer, mem_scope,
iinfo);
if (value)
av_push (av, value);
}
if (transfer >= GI_TRANSFER_CONTAINER) {
+ /* When we were transfered ownership of the array, we need to
+ free it and its element storage here. This is safe since,
+ if the array was flat, we made sure to take copies of the
+ elements above. */
+ free_element_data = TRUE;
switch (array_type) {
case GI_ARRAY_TYPE_C:
_free_raw_array (array);
break;
case GI_ARRAY_TYPE_ARRAY:
- _free_array (array);
+ _free_array (array, free_element_data);
break;
case GI_ARRAY_TYPE_PTR_ARRAY:
- _free_ptr_array (array);
+ _free_ptr_array (array, free_element_data);
break;
case GI_ARRAY_TYPE_BYTE_ARRAY:
- _free_byte_array (array);
+ _free_byte_array (array, free_element_data);
break;
}
}
@@ -213,7 +242,7 @@
GPerlI11nArrayInfo *array_info = NULL;
gpointer array = NULL;
gpointer return_array;
- GFunc return_array_free_func;
+ GDestroyNotify return_array_free_func;
gboolean is_zero_terminated = FALSE;
gsize item_size;
gboolean need_struct_value_semantics;
@@ -318,16 +347,16 @@
switch (array_type) {
case GI_ARRAY_TYPE_C:
return_array = g_array_free (array, FALSE);
- return_array_free_func = (GFunc) _free_raw_array;
+ return_array_free_func = _free_raw_array;
break;
case GI_ARRAY_TYPE_ARRAY:
- return_array_free_func = (GFunc) _free_array;
+ return_array_free_func = _free_array_and_content;
break;
case GI_ARRAY_TYPE_PTR_ARRAY:
- return_array_free_func = (GFunc) _free_ptr_array;
+ return_array_free_func = _free_ptr_array_and_content;
break;
case GI_ARRAY_TYPE_BYTE_ARRAY:
- return_array_free_func = (GFunc) _free_byte_array;
+ return_array_free_func = _free_byte_array_and_content;
break;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-callback.c
new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-callback.c
--- old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-callback.c
2017-05-21 21:02:28.000000000 +0200
+++ new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-callback.c
2019-09-29 03:48:36.000000000 +0200
@@ -33,7 +33,7 @@
case GI_SCOPE_TYPE_CALL:
dwarn (" scope = 'call'\n");
free_after_call (invocation_info,
- (GFunc) release_perl_callback, callback_info);
+ release_perl_callback, callback_info);
break;
case GI_SCOPE_TYPE_NOTIFIED:
dwarn (" scope = 'notified'\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-hash.c
new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-hash.c
--- old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-hash.c
2015-07-12 06:15:18.000000000 +0200
+++ new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-hash.c
2019-09-29 03:48:36.000000000 +0200
@@ -47,13 +47,21 @@
dwarn (" key pointer %p\n", key_p);
arg.v_pointer = key_p;
- key_sv = arg_to_sv (&arg, key_param_info, item_transfer, NULL);
+ key_sv = arg_to_sv (&arg,
+ key_param_info,
+ item_transfer,
+ GPERL_I11N_MEMORY_SCOPE_IRRELEVANT,
+ NULL);
if (key_sv == NULL)
break;
dwarn (" value pointer %p\n", value_p);
arg.v_pointer = value_p;
- value_sv = arg_to_sv (&arg, value_param_info, item_transfer,
NULL);
+ value_sv = arg_to_sv (&arg,
+ value_param_info,
+ item_transfer,
+ GPERL_I11N_MEMORY_SCOPE_IRRELEVANT,
+ NULL);
if (value_sv == NULL)
break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-interface.c
new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-interface.c
--- old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-interface.c
2018-09-26 06:44:28.000000000 +0200
+++ new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-interface.c
2019-12-09 19:44:47.000000000 +0100
@@ -242,7 +242,7 @@
} else {
gsize n_bytes = g_struct_info_get_size
(interface);
gpointer mem = gperl_get_boxed_check
(sv, type);
- g_memmove (arg->v_pointer, mem,
n_bytes);
+ memmove (arg->v_pointer, mem, n_bytes);
}
} else {
if (may_be_null && !gperl_sv_is_defined (sv)) {
@@ -317,13 +317,18 @@
* struct_to_sv), so it needs to be wrapped with PUTBACK/SPAGAIN by the
* caller. */
static SV *
-interface_to_sv (GITypeInfo* info, GIArgument *arg, gboolean own,
GPerlI11nInvocationInfo *iinfo)
+interface_to_sv (GITypeInfo* info,
+ GIArgument *arg,
+ gboolean own,
+ GPerlI11nMemoryScope mem_scope,
+ GPerlI11nInvocationInfo *iinfo)
{
GIBaseInfo *interface;
GIInfoType info_type;
SV *sv = NULL;
dwarn ("arg %p, info %p\n", arg, info);
+ dwarn (" is pointer: %d\n", g_type_info_is_pointer (info));
interface = g_type_info_get_interface (info);
if (!interface)
@@ -382,7 +387,14 @@
else if (g_type_is_a (type, G_TYPE_BOXED)) {
dwarn (" -> boxed: pointer=%p, type=%"G_GSIZE_FORMAT"
(%s), own=%d\n",
arg->v_pointer, type, g_type_name (type), own);
- sv = gperl_new_boxed (arg->v_pointer, type, own);
+ switch (mem_scope) {
+ case GPERL_I11N_MEMORY_SCOPE_TEMPORARY:
+ g_assert (own == TRUE);
+ sv = gperl_new_boxed_copy (arg->v_pointer,
type);
+ break;
+ default:
+ sv = gperl_new_boxed (arg->v_pointer, type,
own);
+ }
}
#if GLIB_CHECK_VERSION (2, 24, 0)
@@ -463,7 +475,7 @@
/* If peek() produced NULL, the class has not been
* instantiated yet and needs to be created. */
pointer = g_type_class_ref (class_type);
- free_after_call (iinfo, (GFunc) g_type_class_unref,
pointer);
+ free_after_call (iinfo, g_type_class_unref, pointer);
}
dwarn (" type class = %p\n", pointer);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-list.c
new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-list.c
--- old/Glib-Object-Introspection-0.047/gperl-i11n-marshal-list.c
2015-07-12 06:15:18.000000000 +0200
+++ new/Glib-Object-Introspection-0.048/gperl-i11n-marshal-list.c
2019-09-29 03:48:36.000000000 +0200
@@ -1,14 +1,14 @@
/* -*- mode: c; indent-tabs-mode: t; c-basic-offset: 8; -*- */
static void
-free_list (GList *list)
+_free_list (gpointer list)
{
dwarn ("%p\n", list);
g_list_free (list);
}
static void
-free_slist (GSList *list)
+_free_slist (gpointer list)
{
dwarn ("%p\n", list);
g_slist_free (list);
@@ -53,7 +53,11 @@
GIArgument arg = {0,};
dwarn (" element %p: %p\n", i, i->data);
arg.v_pointer = i->data;
- value = arg_to_sv (&arg, param_info, item_transfer, NULL);
+ value = arg_to_sv (&arg,
+ param_info,
+ item_transfer,
+ GPERL_I11N_MEMORY_SCOPE_IRRELEVANT,
+ NULL);
if (value)
av_push (av, value);
}
@@ -125,7 +129,7 @@
if (GI_TRANSFER_NOTHING == transfer)
free_after_call (iinfo,
- is_slist ? ((GFunc)free_slist) :
((GFunc)free_list),
+ is_slist ? _free_slist : _free_list,
list);
dwarn (" -> list = %p, length = %d\n", list, g_list_length (list));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Glib-Object-Introspection-0.047/lib/Glib/Object/Introspection.pm
new/Glib-Object-Introspection-0.048/lib/Glib/Object/Introspection.pm
--- old/Glib-Object-Introspection-0.047/lib/Glib/Object/Introspection.pm
2019-02-05 04:43:07.000000000 +0100
+++ new/Glib-Object-Introspection-0.048/lib/Glib/Object/Introspection.pm
2019-12-07 19:40:53.000000000 +0100
@@ -19,7 +19,7 @@
use warnings;
use Glib;
-our $VERSION = '0.047';
+our $VERSION = '0.048';
use Carp;
$Carp::Internal{(__PACKAGE__)}++;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Glib-Object-Introspection-0.047/t/arrays.t
new/Glib-Object-Introspection-0.048/t/arrays.t
--- old/Glib-Object-Introspection-0.047/t/arrays.t 2019-02-02
22:12:41.000000000 +0100
+++ new/Glib-Object-Introspection-0.048/t/arrays.t 2019-12-09
19:44:47.000000000 +0100
@@ -6,7 +6,7 @@
use warnings;
use utf8;
-plan tests => 72;
+plan tests => 88;
ok (Regress::test_strv_in ([ '1', '2', '3' ]));
@@ -179,3 +179,51 @@
}, 'user23');
$obj->emit_sig_with_array_len_prop ();
}
+
+# -----------------------------------------------------------------------------
+
+SKIP: {
+ my $have_poppler = eval {
+ Glib::Object::Introspection->setup (
+ basename => 'Poppler',
+ version => '0.18',
+ package => 'Poppler');
+ 1;
+ };
+ skip 'flat array tests using Poppler', 16
+ unless $have_poppler;
+
+ my $pdf = <<__PDF__; #
https://github.com/mathiasbynens/small/blob/master/pdf.pdf
+%PDF-1.
+1 0 obj<</Pages 2 0 R>>endobj
+2 0 obj<</Kids[3 0 R]/Count 1>>endobj
+3 0 obj<</Parent 2 0 R>>endobj
+trailer <</Root 1 0 R>>
+__PDF__
+
+ my ($major, $minor, $micro) = split /\./, Poppler::get_version ();
+ my @args = ($major > 0 || $minor >= 78) ? ([map ord, split //, $pdf], undef)
: ($pdf, length $pdf, undef);
+ my $doc = Poppler::Document->new_from_data (@args);
+ my $quads = [
+ Glib::Boxed::new ('Poppler::Quadrilateral',
+ {p1 => {x => 0, y => 0},
+ p2 => {x => 1, y => 1},
+ p3 => {x => 2, y => 2},
+ p4 => {x => 3, y => 3}}),
+ Glib::Boxed::new ('Poppler::Quadrilateral',
+ {p1 => {x => 4, y => 4},
+ p2 => {x => 5, y => 5},
+ p3 => {x => 6, y => 6},
+ p4 => {x => 7, y => 7}}),
+ ];
+ my $rect = Glib::Boxed::new ('Poppler::Rectangle', {x1 => 0, y1 => 0, x2 =>
9, y2 => 9});
+ my $annot = Poppler::AnnotTextMarkup->new_highlight ($doc, $rect, $quads);
+ my $new_quads = $annot->get_quadrilaterals ();
+ for my $index (0 .. 1) {
+ for my $point (qw/p1 p2 p3 p4/) {
+ for my $coord (qw/x y/) {
+ is ($new_quads->[$index]->$point->$coord,
$quads->[$index]->$point->$coord);
+ }
+ }
+ }
+}