mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-20 22:29:17 +02:00
congrats tim, introducing of-by-one errors like on my very first day of C
Mon Jul 2 07:17:47 2001 Tim Janik <timj@gtk.org> * gobject.c (g_object_weak_ref): (g_object_watch_closure): congrats tim, introducing of-by-one errors like on my very first day of C programming.
This commit is contained in:
parent
69f32ba7c9
commit
6bad2c92ce
@ -1,3 +1,9 @@
|
|||||||
|
Mon Jul 2 07:17:47 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gobject.c (g_object_weak_ref):
|
||||||
|
(g_object_watch_closure): congrats tim, introducing of-by-one
|
||||||
|
errors like on my very first day of C programming.
|
||||||
|
|
||||||
Sat Jun 30 11:07:00 2001 Tim Janik <timj@gtk.org>
|
Sat Jun 30 11:07:00 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gobject.[hc]: provide weak_ref/weak_unref functions,
|
* gobject.[hc]: provide weak_ref/weak_unref functions,
|
||||||
|
@ -432,6 +432,7 @@ g_object_last_unref (GObject *object)
|
|||||||
|
|
||||||
if (object->ref_count == 0) /* may have been re-referenced meanwhile */
|
if (object->ref_count == 0) /* may have been re-referenced meanwhile */
|
||||||
{
|
{
|
||||||
|
g_signal_handlers_destroy (object);
|
||||||
g_datalist_id_set_data (&object->qdata, quark_weak_refs, NULL);
|
g_datalist_id_set_data (&object->qdata, quark_weak_refs, NULL);
|
||||||
G_OBJECT_GET_CLASS (object)->finalize (object);
|
G_OBJECT_GET_CLASS (object)->finalize (object);
|
||||||
#ifdef G_ENABLE_DEBUG
|
#ifdef G_ENABLE_DEBUG
|
||||||
@ -1220,7 +1221,7 @@ g_object_weak_ref (GObject *object,
|
|||||||
{
|
{
|
||||||
wstack = g_renew (WeakRefStack, NULL, 1);
|
wstack = g_renew (WeakRefStack, NULL, 1);
|
||||||
wstack->n_weak_refs = 1;
|
wstack->n_weak_refs = 1;
|
||||||
i = wstack->n_weak_refs;
|
i = 0;
|
||||||
}
|
}
|
||||||
wstack->weak_refs[i].notify = notify;
|
wstack->weak_refs[i].notify = notify;
|
||||||
wstack->weak_refs[i].data = data;
|
wstack->weak_refs[i].data = data;
|
||||||
@ -1615,7 +1616,7 @@ g_object_watch_closure (GObject *object,
|
|||||||
carray = g_renew (CArray, NULL, 1);
|
carray = g_renew (CArray, NULL, 1);
|
||||||
carray->object = object;
|
carray->object = object;
|
||||||
carray->n_closures = 1;
|
carray->n_closures = 1;
|
||||||
i = carray->n_closures;
|
i = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user