provide G_CLOSURE_N_NOTIFIERS() for people that need to walk the notifier
authorTim Janik <timj@gtk.org>
Wed, 7 Nov 2001 03:25:55 +0000 (03:25 +0000)
committerTim Janik <timj@src.gnome.org>
Wed, 7 Nov 2001 03:25:55 +0000 (03:25 +0000)
Wed Nov  7 00:56:00 2001  Tim Janik  <timj@gtk.org>

        * gclosure.h: provide G_CLOSURE_N_NOTIFIERS() for people that need
        to walk the notifier list (puhh, black magic, stay-away-warning ;).

gobject/ChangeLog
gobject/gclosure.c
gobject/gclosure.h

index 093b65e..d344bf5 100644 (file)
@@ -1,3 +1,8 @@
+Wed Nov  7 00:56:00 2001  Tim Janik  <timj@gtk.org>
+
+       * gclosure.h: provide G_CLOSURE_N_NOTIFIERS() for people that need
+       to walk the notifier list (puhh, black magic, stay-away-warning ;).
+
 Mon Nov  5 18:59:08 2001  Tim Janik  <timj@gtk.org>
 
        * gobject.h: 
index 532e73d..8c540c4 100644 (file)
@@ -32,6 +32,7 @@
 #define        CLOSURE_MAX_N_INOTIFIERS        ((1 << 8) - 1)
 #define        CLOSURE_N_MFUNCS(cl)            ((cl)->meta_marshal + \
                                          ((cl)->n_guards << 1L))
+/* same as G_CLOSURE_N_NOTIFIERS() (keep in sync) */
 #define        CLOSURE_N_NOTIFIERS(cl)         (CLOSURE_N_MFUNCS (cl) + \
                                          (cl)->n_fnotifiers + \
                                          (cl)->n_inotifiers)
@@ -77,7 +78,7 @@ closure_invoke_notifiers (GClosure *closure,
 {
   /* notifier layout:
    *     meta_marshal  n_guards    n_guards     n_fnotif.  n_inotifiers
-   * ->[[meta_marshal][pre_guards][post_guards][fnotifers][inotifiers]]
+   * ->[[meta_marshal][pre_guards][post_guards][fnotifiers][inotifiers]]
    *
    * CLOSURE_N_MFUNCS(cl)    = meta_marshal + n_guards + n_guards;
    * CLOSURE_N_NOTIFIERS(cl) = CLOSURE_N_MFUNCS(cl) + n_fnotifiers + n_inotifiers
index ab8974d..dd9af65 100644 (file)
@@ -26,6 +26,8 @@ G_BEGIN_DECLS
 
 /* --- defines --- */
 #define        G_CLOSURE_NEEDS_MARSHAL(closure) (((GClosure*) (closure))->marshal == NULL)
+#define        G_CLOSURE_N_NOTIFIERS(cl)        ((cl)->meta_marshal + ((cl)->n_guards << 1L) + \
+                                          (cl)->n_fnotifiers + (cl)->n_inotifiers)
 #define        G_CCLOSURE_SWAP_DATA(cclosure)   (((GClosure*) (closure))->derivative_flag)
 #define        G_CALLBACK(f)                    ((GCallback) (f))