Re: class referencing and type implementation mutations (Re: Audit module)



Havoc Pennington <hp redhat com> writes:

> 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
> 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.
> 

(Guessing that Tim may have gone to bed by now)

I think I said this before - get_type doesn't result in the
class being _loaded_, just registered. So, it isn't a question 
of unloading, just of never loading at all.

Since I advised the ATK people to use type IDs over class
structures for identification for this reason (avoiding
the overhead of registering all signals/properties), I
wouldn't really want to change this. 

> 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.

Sounds reasonable to me as a minimum step. 

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]