Re: g_signal_list_ids() always returns 0 signals
- From: James Henstridge <james daa com au>
- To: Sven Neumann <sven gimp org>
- Cc: Tim Janik <timj gtk org>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: g_signal_list_ids() always returns 0 signals
- Date: Wed, 19 Dec 2001 01:14:35 +0800
Sven Neumann wrote:
Surround the list_ids() call with g_type_class_ref and
g_type_class_unref calls, in order to make sure the class_init()
function for the class has been called.
I've noticed that the docs generated by gtk-doc on my system differ
from what is checked into CVS and tried to track down why this happens.
I found that the <project>.signals file generated from gtkdoc-scangobj
is always empty. A little investigation later I came to the conclusion
that this happens because g_signal_list_ids() seems to always return
an empty array and sets n_signals to 0 as if no signals were registered
at all. I've put some debugging code
guint *signals, n_signals;
signals = g_signal_list_ids (G_TYPE_FROM_INSTANCE (object), &n_signals);
g_print ("%d signals\n", n_signals, signals);
into the instance_init() functions of some objects that register a number
of signals in their class_init() functions and yes, the output is always
Maybe something went wrong with the latest changes to GBSearchArray?
Calling the get_type() routine doesn't guarantee that the type's class
struct has been initialised. You need to ref the class to make sure the
signals/properties have been registered.
Email: james daa com au
] [Thread Prev