Cairo exports and more (was Re: [cairo] Re: Munging header files for export (and other) attributes)

Carl Worth cworth at cworth.org
Thu Sep 8 09:52:18 PDT 2005


On Thu, 08 Sep 2005 18:22:09 +0200, Doodle wrote:
> 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.

Oh, sorry. Yes, we can definitely modularize this as much as it makes
sense and is reasonable to do so. I just didn't want to require the
user to call anything in order to get things initialized. So maybe I
just misunderstood your proposal.

The modularization is a bit tricky since it's not really a "per
backend" decision at all. Whether non-static mutex initialization is
needed at all is a "per platform" question and mutex object existence
is a "per module" question since they can live in non-backend-specific
modules such as cairo-scaled-font.c.

I haven't yet conceived an approach that won't be fragile to people
adding new mutex objects on platforms that don't need non-static
initialization. If someone can come up with one that would be
nice. (But it's certainly not a requirement for getting something that
works into the tree).

I don't have access to any systems that need this work, so I won't be
doing more to develop it, (I couldn't event test it), but I'd be glad
to accept a test patch that implements this kind of thing.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050908/3083c0e4/attachment-0001.pgp


More information about the cairo mailing list