Cairo exports and more (was Re: [cairo] Re: Munging header files
for export (and other) attributes)
doodle at scenergy.dfmk.hu
Thu Sep 8 09:22:09 PDT 2005
Carl Worth wrote:
>>To solve the initialization race, I think the only clean solution
>>is to introduce new cairo_initialize() and cairo_uninitialize()
> Can't you just do mutex creation in the "DLL load branch of DllMain" ?
Yes, that's also an option.
A series of global variable initialization can also be done in DllMain()
(instead of calling init routines of the backends), just like the
cleanup is done right now.
The only thing against it is that I think it's uglier (a bunch of ifdefs
to see which backends are compiled in, and which mutexes have to be
initialized), and if a backend is changed somewhere, then it has to be
kept in sync with DllMain() all the time... Only that's why I thought
that an init/uninit routine per backend would be cleaner.
Otherwise it sounds good to me.
More information about the cairo