(In reply to comment #5)
> (In reply to comment #2)
> > You can just move the line
> > static GQuark sQuark_gecko_acc_obj =
> > g_quark_from_static_string("GeckoAccObj");
> > inside toplevel_event_watcher().
>
> are you absolutely sure that will cause it to be initialized on the first
> call, not as a global ctor?
>
Absolutely sure.
But although it will save a couple of source code lines, the final binary will be several bytes larger than the patch here, because the compiler has to do the job for us.
(In reply to comment #5) gecko_acc_ obj = from_static_ string( "GeckoAccObj" ); event_watcher( ).
> (In reply to comment #2)
> > You can just move the line
> > static GQuark sQuark_
> > g_quark_
> > inside toplevel_
>
> are you absolutely sure that will cause it to be initialized on the first
> call, not as a global ctor?
>
Absolutely sure.
But although it will save a couple of source code lines, the final binary will be several bytes larger than the patch here, because the compiler has to do the job for us.
I'm OK with either approach.