+2001-08-06 Sven Neumann <sven@gimp.org>
+
+ * glib/gutils.[ch]: added new function g_nullify_pointer().
+
+ * gobject/gobject.[ch]:
+ added new functions g_object_[add|remove]_weak_pointer().
+
2001-08-05 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c glib/giochannel.c glib/glib.def
+2001-08-06 Sven Neumann <sven@gimp.org>
+
+ * glib/gutils.[ch]: added new function g_nullify_pointer().
+
+ * gobject/gobject.[ch]:
+ added new functions g_object_[add|remove]_weak_pointer().
+
2001-08-05 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c glib/giochannel.c glib/glib.def
+2001-08-06 Sven Neumann <sven@gimp.org>
+
+ * glib/gutils.[ch]: added new function g_nullify_pointer().
+
+ * gobject/gobject.[ch]:
+ added new functions g_object_[add|remove]_weak_pointer().
+
2001-08-05 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c glib/giochannel.c glib/glib.def
+2001-08-06 Sven Neumann <sven@gimp.org>
+
+ * glib/gutils.[ch]: added new function g_nullify_pointer().
+
+ * gobject/gobject.[ch]:
+ added new functions g_object_[add|remove]_weak_pointer().
+
2001-08-05 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c glib/giochannel.c glib/glib.def
+2001-08-06 Sven Neumann <sven@gimp.org>
+
+ * glib/gutils.[ch]: added new function g_nullify_pointer().
+
+ * gobject/gobject.[ch]:
+ added new functions g_object_[add|remove]_weak_pointer().
+
2001-08-05 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c glib/giochannel.c glib/glib.def
+2001-08-06 Sven Neumann <sven@gimp.org>
+
+ * glib/gutils.[ch]: added new function g_nullify_pointer().
+
+ * gobject/gobject.[ch]:
+ added new functions g_object_[add|remove]_weak_pointer().
+
2001-08-05 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c glib/giochannel.c glib/glib.def
+2001-08-06 Sven Neumann <sven@gimp.org>
+
+ * glib/gutils.[ch]: added new function g_nullify_pointer().
+
+ * gobject/gobject.[ch]:
+ added new functions g_object_[add|remove]_weak_pointer().
+
2001-08-05 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c glib/giochannel.c glib/glib.def
+2001-08-06 Sven Neumann <sven@gimp.org>
+
+ * glib/gutils.[ch]: added new function g_nullify_pointer().
+
+ * gobject/gobject.[ch]:
+ added new functions g_object_[add|remove]_weak_pointer().
+
2001-08-05 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c glib/giochannel.c glib/glib.def
+2001-08-06 Sven Neumann <sven@gimp.org>
+
+ * docs/reference/gobject/gobject-sections.txt
+ * docs/reference/gobject/tmpl/objects.sgml: added documentation for
+ g_object_[add|remove]_weak_pointer().
+
2001-07-19 Darin Adler <darin@bentspoon.com>
reviewed by: <delete if not using a buddy>
g_object_new
g_object_ref
g_object_unref
+g_object_weak_ref
+g_object_weak_unref
+g_object_add_weak_pointer
+g_object_remove_weak_pointer
g_object_connect
g_object_disconnect
g_object_set
@object:
+<!-- ##### FUNCTION g_object_weak_ref ##### -->
+<para>
+
+</para>
+
+@object:
+@notify:
+@data:
+
+
+<!-- ##### FUNCTION g_object_weak_unref ##### -->
+<para>
+
+</para>
+
+@object:
+@notify:
+@data:
+
+
+<!-- ##### FUNCTION g_object_add_weak_pointer ##### -->
+<para>
+Adds a weak reference from weak_pointer to @object to indicate that
+the pointer located at @weak_pointer_location is only valid during the
+lifetime of @object. When the @object is finalized, @weak_pointer will
+be set to %NULL.
+</para>
+
+@object: the object that should be weak referenced.
+@weak_pointer_location: the memory address of a pointer.
+
+
+<!-- ##### FUNCTION g_object_remove_weak_pointer ##### -->
+<para>
+Removes a weak reference from @object that was previously added
+using g_object_add_weak_pointer(). The @weak_pointer_location has
+to match the one used with g_object_add_weak_pointer().
+</para>
+
+@object: the object that is weak referenced.
+@weak_pointer_location: the memory address of a pointer.
+
+
<!-- ##### FUNCTION g_object_connect ##### -->
<para>
}
/**
+ * g_nullify_pointer:
+ * @nullify_location: the memory address of the pointer.
+ *
+ * Set the pointer at the specified location to %NULL.
+ **/
+void
+g_nullify_pointer (gpointer *nullify_location)
+{
+ g_return_if_fail (nullify_location != NULL);
+
+ *nullify_location = NULL;
+}
+
+/**
* g_get_codeset:
*
* Get the codeset for the current locale.
gchar* g_path_get_basename (const gchar *file_name);
gchar* g_path_get_dirname (const gchar *file_name);
+
+/* Set the pointer at the specified location to NULL */
+void g_nullify_pointer (gpointer *nullify_location);
+
/* Get the codeset for the current locale */
/* gchar * g_get_codeset (void); */
g_warning (G_STRLOC ": couldn't find weak ref %p(%p)", notify, data);
}
+void
+g_object_add_weak_pointer (GObject *object,
+ gpointer *weak_pointer_location)
+{
+ g_return_if_fail (G_IS_OBJECT (object));
+ g_return_if_fail (weak_pointer_location != NULL);
+
+ g_object_weak_ref (object,
+ (GWeakNotify) g_nullify_pointer,
+ weak_pointer_location);
+}
+
+void
+g_object_remove_weak_pointer (GObject *object,
+ gpointer *weak_pointer_location)
+{
+ g_return_if_fail (G_IS_OBJECT (object));
+ g_return_if_fail (weak_pointer_location != NULL);
+
+ g_object_weak_unref (object,
+ (GWeakNotify) g_nullify_pointer,
+ weak_pointer_location);
+}
+
gpointer
g_object_ref (gpointer _object)
{
void g_object_weak_unref (GObject *object,
GWeakNotify notify,
gpointer data);
+void g_object_add_weak_pointer (GObject *object,
+ gpointer *weak_pointer_location);
+void g_object_remove_weak_pointer (GObject *object,
+ gpointer *weak_pointer_location);
gpointer g_object_get_qdata (GObject *object,
GQuark quark);
void g_object_set_qdata (GObject *object,