From: Corentin Noël Date: Wed, 2 Oct 2024 09:11:48 +0000 (+0200) Subject: gobject-2.0: Fix GWeakRef not having a copy function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b3e7f2dc1227504f902b4fef67571fc309675dc;p=thirdparty%2Fvala.git gobject-2.0: Fix GWeakRef not having a copy function Add its private field to allow to actually generate a copy function. Note that the generated copy function does not call g_weak_ref_init which is required for a real copy. --- diff --git a/vapi/gobject-2.0.vapi b/vapi/gobject-2.0.vapi index b3812febf..82060a564 100644 --- a/vapi/gobject-2.0.vapi +++ b/vapi/gobject-2.0.vapi @@ -858,12 +858,14 @@ namespace GLib { public static bool type_transformable (GLib.Type src_type, GLib.Type dest_type); public void unset (); } - [CCode (cheader_filename = "glib-object.h", destroy_function = "g_weak_ref_clear", has_type_id = false, lvalue_access = false)] + [CCode (cheader_filename = "glib-object.h", has_copy_function = false, destroy_function = "g_weak_ref_clear", has_type_id = false, lvalue_access = false)] [Version (since = "2.32")] public struct WeakRef { public WeakRef (GLib.Object? object); public GLib.Object? @get (); public void @set (GLib.Object? object); + [CCode (cname = "priv.p")] + private void* p; } [CCode (cheader_filename = "glib-object.h", cprefix = "G_BINDING_", type_id = "G_TYPE_BINDING_FLAGS")] [Flags]