Re: class referencing and type implementation mutations (Re: Audit module)
- From: Tim Janik <timj gtk org>
- To: Havoc Pennington <hp redhat com>
- Cc: Owen Taylor <otaylor redhat com>, James Henstridge <james daa com au>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: class referencing and type implementation mutations (Re: Audit module)
- Date: Sun, 24 Jun 2001 16:03:34 +0200 (CEST)
On 23 Jun 2001, Havoc Pennington wrote:
>
> Hi,
>
> My remaining question on this is why a static class gets unloaded ever
> at all - I would expect get_type() to result in making that class
> permanently resident. I think we have code in GTK even that assumes
not get_type, but yes, static classes stay initialized after the first class_init.
> class_init will run only one time. I know Darin was also worried about
> this behavior since Nautilus has similar assumptions. Obviously
> dynamic classes would be different in this respect.
>
> Regardless of that issue, why not put in a warning in
> g_signal_lookup() etc., if the class is not registered - the silent
> return of 0 is extremely hard to figure out, and calling
> g_signal_lookup() on an unregistered class seems like it's always a
> bug.
iirc, the lookup code doesn't make actual destinctions between
a) valid type ids with an initialized class that has no signals
b) valid type ids who's classes haven't been initialized yet
c) invalid type ids
and at least for (a) it should return 0 silently.
>
> Havoc
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]