Skip to content

Instantly share code, notes, and snippets.

@maelvls
Last active December 4, 2021 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maelvls/9a4890e7c5adf2309a453d0cdbffaa19 to your computer and use it in GitHub Desktop.
Save maelvls/9a4890e7c5adf2309a453d0cdbffaa19 to your computer and use it in GitHub Desktop.
gobject-introspection-1.70.0-to-d4d5fb294a89c5c25f966f5e8407d335c315b1c1.diff
diff --git a/GObjectIntrospection.xs b/GObjectIntrospection.xs
index 58fe26f..4a56855 100644
--- a/GObjectIntrospection.xs
+++ b/GObjectIntrospection.xs
@@ -928,7 +928,7 @@ _use_generic_signal_marshaller_for (class, const gchar *package, const gchar *si
"ClosureMarshal");
g_assert (closure_marshal_info);
cif = g_new0 (ffi_cif, 1);
- closure = g_callable_info_prepare_closure (closure_marshal_info,
+ closure = g_callable_info_create_closure (closure_marshal_info,
cif,
invoke_perl_signal_handler,
signal_info);
@@ -942,7 +942,7 @@ _use_generic_signal_marshaller_for (class, const gchar *package, const gchar *si
* anymore. But gperl_signal_set_marshaller_for does not provide a
* hook for resource freeing.
*
- * g_callable_info_free_closure (signal_info, closure);
+ * g_callable_info_destroy_closure (signal_info, closure);
* g_free (cif);
* g_base_info_unref (signal_info->interface);
* if (signal_info->args_converter)
@@ -955,11 +955,12 @@ _use_generic_signal_marshaller_for (class, const gchar *package, const gchar *si
#else
{
PERL_UNUSED_VAR (args_converter);
- /* g_callable_info_prepare_closure, and thus
- * create_perl_callback_closure and invoke_perl_signal_handler, did not
- * work correctly for signals prior to commit
- * d8970fbc500a8b20853b564536251315587450d9 in
- * gobject-introspection. */
+
+ /* g_callable_info_prepare_closure (renamed g_callable_info_create_closure
+ * in 1.72), and thus create_perl_callback_closure and
+ * invoke_perl_signal_handler, did not work correctly for signals prior to
+ * commit d8970fbc500a8b20853b564536251315587450d9 in gobject-introspection.
+ */
warn ("*** Cannot use generic signal marshallers for signal '%s' of %s "
"unless gobject-introspection >= 1.33.10; "
"any handlers connected to the signal "
diff --git a/gperl-i11n-callback.c b/gperl-i11n-callback.c
index 9bb7155..0f79c1a 100644
--- a/gperl-i11n-callback.c
+++ b/gperl-i11n-callback.c
@@ -12,7 +12,7 @@ create_perl_callback_closure (GICallableInfo *cb_info, SV *code)
info->interface = g_base_info_ref (cb_info);
info->cif = g_new0 (ffi_cif, 1);
info->closure =
- g_callable_info_prepare_closure (info->interface, info->cif,
+ g_callable_info_create_closure (info->interface, info->cif,
invoke_perl_code, info);
/* FIXME: This should most likely use SvREFCNT_inc instead of
* newSVsv. */
@@ -48,7 +48,7 @@ create_perl_callback_closure_for_named_sub (GICallableInfo *cb_info, gchar *sub_
info->interface = g_base_info_ref (cb_info);
info->cif = g_new0 (ffi_cif, 1);
info->closure =
- g_callable_info_prepare_closure (info->interface, info->cif,
+ g_callable_info_create_closure (info->interface, info->cif,
invoke_perl_code, info);
info->sub_name = sub_name;
info->code = NULL;
@@ -67,11 +67,11 @@ release_perl_callback (gpointer data)
GPerlI11nPerlCallbackInfo *info = data;
dwarn ("info = %p\n", info);
- /* g_callable_info_free_closure reaches into info->cif, so it needs to
- * be called before we free it. See
- * <https://bugzilla.gnome.org/show_bug.cgi?id=652954>. */
+ /* g_callable_info_free_closure (renamed g_callable_info_destroy_closure in
+ * 1.72) reaches into info->cif, so it needs to be called before we free it.
+ * See <https://bugzilla.gnome.org/show_bug.cgi?id=652954>. */
if (info->closure)
- g_callable_info_free_closure (info->interface, info->closure);
+ g_callable_info_destroy_closure (info->interface, info->closure);
if (info->cif)
g_free (info->cif);
diff --git a/Makefile.PL b/Makefile.PL
index 6dcf155..69e18ad 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -154,7 +154,7 @@ sub ssleay_get_build_opts {
for ("$prefix/include", "$prefix/inc32", '/usr/kerberos/include') {
push @{$opts->{inc_paths}}, $_ if -f "$_/openssl/ssl.h";
}
- for ($prefix, "$prefix/lib64", "$prefix/lib", "$prefix/out32dll") {
+ for ("$prefix/lib64", "$prefix/lib", "$prefix/out32dll") {
push @{$opts->{lib_paths}}, $_ if -d $_;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment