mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 20:35:49 +01:00
provide G_CLOSURE_N_NOTIFIERS() for people that need to walk the notifier
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 ;).
This commit is contained in:
parent
012e1fd539
commit
5b7a16146d
@ -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>
|
Mon Nov 5 18:59:08 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gobject.h:
|
* gobject.h:
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#define CLOSURE_MAX_N_INOTIFIERS ((1 << 8) - 1)
|
#define CLOSURE_MAX_N_INOTIFIERS ((1 << 8) - 1)
|
||||||
#define CLOSURE_N_MFUNCS(cl) ((cl)->meta_marshal + \
|
#define CLOSURE_N_MFUNCS(cl) ((cl)->meta_marshal + \
|
||||||
((cl)->n_guards << 1L))
|
((cl)->n_guards << 1L))
|
||||||
|
/* same as G_CLOSURE_N_NOTIFIERS() (keep in sync) */
|
||||||
#define CLOSURE_N_NOTIFIERS(cl) (CLOSURE_N_MFUNCS (cl) + \
|
#define CLOSURE_N_NOTIFIERS(cl) (CLOSURE_N_MFUNCS (cl) + \
|
||||||
(cl)->n_fnotifiers + \
|
(cl)->n_fnotifiers + \
|
||||||
(cl)->n_inotifiers)
|
(cl)->n_inotifiers)
|
||||||
@ -77,7 +78,7 @@ closure_invoke_notifiers (GClosure *closure,
|
|||||||
{
|
{
|
||||||
/* notifier layout:
|
/* notifier layout:
|
||||||
* meta_marshal n_guards n_guards n_fnotif. n_inotifiers
|
* 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_MFUNCS(cl) = meta_marshal + n_guards + n_guards;
|
||||||
* CLOSURE_N_NOTIFIERS(cl) = CLOSURE_N_MFUNCS(cl) + n_fnotifiers + n_inotifiers
|
* CLOSURE_N_NOTIFIERS(cl) = CLOSURE_N_MFUNCS(cl) + n_fnotifiers + n_inotifiers
|
||||||
|
@ -26,6 +26,8 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
/* --- defines --- */
|
/* --- defines --- */
|
||||||
#define G_CLOSURE_NEEDS_MARSHAL(closure) (((GClosure*) (closure))->marshal == NULL)
|
#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_CCLOSURE_SWAP_DATA(cclosure) (((GClosure*) (closure))->derivative_flag)
|
||||||
#define G_CALLBACK(f) ((GCallback) (f))
|
#define G_CALLBACK(f) ((GCallback) (f))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user