2001-08-17 James Henstridge <james@daa.com.au>
* gobject.c (WeakRefStack): add an object member to the structure.
(weak_refs_notify): pass wstack->object as extra argument to
notify functions.
(g_object_weak_ref): set wstack->object when initialising
WeakRefStack.
* gobject.h (GWeakNotify): add second argument to prototype which
gives the pointer to where the object that is being disposed of
was.
+2001-08-17 James Henstridge <james@daa.com.au>
+
+ * gobject.c (WeakRefStack): add an object member to the structure.
+ (weak_refs_notify): pass wstack->object as extra argument to
+ notify functions.
+ (g_object_weak_ref): set wstack->object when initialising
+ WeakRefStack.
+
+ * gobject.h (GWeakNotify): add second argument to prototype which
+ gives the pointer to where the object that is being disposed of
+ was.
+
Wed Jul 18 19:42:31 2001 Tim Janik <timj@gtk.org>
* gtype.h: if __GNUC__ is defined, inline a test for an exact type
}
typedef struct {
+ GObject *object;
guint n_weak_refs;
struct {
GWeakNotify notify;
guint i;
for (i = 0; i < wstack->n_weak_refs; i++)
- wstack->weak_refs[i].notify (wstack->weak_refs[i].data);
+ wstack->weak_refs[i].notify (wstack->weak_refs[i].data, wstack->object);
g_free (wstack);
}
else
{
wstack = g_renew (WeakRefStack, NULL, 1);
+ wstack->object = object;
wstack->n_weak_refs = 1;
i = 0;
}
const GValue *value,
GParamSpec *pspec);
typedef void (*GObjectFinalizeFunc) (GObject *object);
-typedef void (*GWeakNotify) (gpointer data);
+typedef void (*GWeakNotify) (gpointer data,
+ GObject *where_the_object_was);
struct _GObject
{
GTypeInstance g_type_instance;