mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-03 16:03:40 +02:00
gobject: new g_set_weak_pointer() & g_clear_weak_pointer() helpers
Weak-pointers are currently lacking g_set_object() & g_clear_object() helpers equivalent. New functions (and macros, both are provided) are convenient in many case, especially for the property's notify-on-set pattern: if (g_set_weak_pointer (...)) g_object_notify (...) Inspired by Christian Hergert's original implementation for gnome-builder. https://bugzilla.gnome.org/show_bug.cgi?id=749527
This commit is contained in:
committed by
Philip Withnall
parent
62c4768423
commit
156d32cb80
@@ -279,6 +279,8 @@ g_object_weak_ref
|
||||
g_object_weak_unref
|
||||
g_object_add_weak_pointer
|
||||
g_object_remove_weak_pointer
|
||||
g_set_weak_pointer
|
||||
g_clear_weak_pointer
|
||||
GToggleNotify
|
||||
g_object_add_toggle_ref
|
||||
g_object_remove_toggle_ref
|
||||
|
Reference in New Issue
Block a user