[packages/perl-Glib-Object-Introspection] upstream fix for gobject-introspection >= 1.82

atler atler at pld-linux.org
Thu Jul 31 21:03:36 CEST 2025


commit 53cf6ce30fb8151653faeb482753a991dd39db82
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Jul 31 21:02:51 2025 +0200

    upstream fix for gobject-introspection >= 1.82

 gobject-introspection1.82.patch     | 49 +++++++++++++++++++++++++++++++++++++
 perl-Glib-Object-Introspection.spec |  2 ++
 2 files changed, 51 insertions(+)
---
diff --git a/perl-Glib-Object-Introspection.spec b/perl-Glib-Object-Introspection.spec
index 563958e..d86fdb6 100644
--- a/perl-Glib-Object-Introspection.spec
+++ b/perl-Glib-Object-Introspection.spec
@@ -12,6 +12,7 @@ License:	LGPL v2.1+
 Group:		Development/Languages/Perl
 Source0:	https://downloads.sourceforge.net/gtk2-perl/%{pnam}-%{version}.tar.gz
 # Source0-md5:	461b66d671674e435ec5dfbdbed6718d
+Patch0:		gobject-introspection1.82.patch
 URL:		https://gtk2-perl.sourceforge.net/
 BuildRequires:	gobject-introspection-devel >= 1.60.0
 BuildRequires:	libffi-devel >= 3.0.0
@@ -42,6 +43,7 @@ Perla do wielu bibliotek, na przykład gtk+, webkit, libsoup.
 
 %prep
 %setup -q -n %{pnam}-%{version}
+%patch -P0 -p1
 
 %build
 %{__perl} Makefile.PL \
diff --git a/gobject-introspection1.82.patch b/gobject-introspection1.82.patch
new file mode 100644
index 0000000..439adb6
--- /dev/null
+++ b/gobject-introspection1.82.patch
@@ -0,0 +1,49 @@
+From e5adffecdc9b321d1f8d91777b190b8ae08f8dd0 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi at gnome.org>
+Date: Sat, 14 Sep 2024 13:09:59 +0100
+Subject: [PATCH] Handle pointer types
+
+Now that gobject-introspection pairs G_TYPE_POINTER types with their
+type registration function, we need to handle the case in which we are
+passed a pointer to a record that inherits from G_TYPE_POINTER. Since
+these types are basically plain pointers, we can reuse the sv_to_struct
+and struct_to_sv functions we use for untyped structures.
+
+Fixes: #7
+---
+ gperl-i11n-marshal-interface.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/gperl-i11n-marshal-interface.c b/gperl-i11n-marshal-interface.c
+index 2bef8eb..50cce51 100644
+--- a/gperl-i11n-marshal-interface.c
++++ b/gperl-i11n-marshal-interface.c
+@@ -41,6 +41,12 @@ instance_sv_to_pointer (GICallableInfo *info, SV *sv, GPerlI11nInvocationInfo *i
+ 				                        info_type,
+ 				                        sv);
+ 			}
++                } else if (g_type_is_a (type, G_TYPE_POINTER)) {
++                        dwarn ("  -> pointer\n");
++                        pointer = sv_to_struct (GI_TRANSFER_NOTHING,
++                                                container,
++                                                info_type,
++                                                sv);
+ 		} else {
+ 			dwarn ("  -> boxed: type=%s (%"G_GSIZE_FORMAT")\n",
+ 			       g_type_name (type), type);
+@@ -397,6 +403,12 @@ interface_to_sv (GITypeInfo* info,
+ 			}
+ 		}
+ 
++                else if (g_type_is_a (type, G_TYPE_POINTER)) {
++                        dwarn ("  -> pointer: pointer=%p, type=%"G_GSIZE_FORMAT" (%s), own=%d\n",
++                               arg->v_pointer, type, g_type_name (type), own);
++			sv = struct_to_sv (interface, info_type, arg->v_pointer, own);
++                }
++
+ #if GLIB_CHECK_VERSION (2, 24, 0)
+ 		else if (g_type_is_a (type, G_TYPE_VARIANT)) {
+ 			dwarn ("  -> variant\n");
+-- 
+GitLab
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Glib-Object-Introspection.git/commitdiff/53cf6ce30fb8151653faeb482753a991dd39db82



More information about the pld-cvs-commit mailing list