Re: GLib plans for next cycle

On 09/06/11 10:05, Alexander Larsson wrote:
> On Thu, 2011-09-01 at 15:16 -0600, Ryan Lortie wrote:
>> Another option is to use library load constructors to run the
>> initialisation we need to do.  That's certainly possible on Windows
>> systems and anything using GCC.  I'm not sure if it's possible to do it
>> in a portable way from pure C, though.
> In my research for how to implement a resource system for glib I've been
> looking at this. I think its should be possible to do this for all the
> main platforms we're targeting (linux, elf unixes, win32, osx). There
> might be some ancient proprietary unix where it will not work (but
> probably not as this is a C++ requirement too).
> So, while the code would be kinda hacky to make this work with all weird
> setups required (like pragmas, ick) it should be quite possible to rely
> on.

In HarfBuzz I'm using the C++ compiler without linking to libstdc++.  I found
it as very rewarding experience.  You get library constructor/destructors for
free there.  I think this approach to library design has serious merit worth


> I have some notes somewhere on how it can be done for all platforms.
> Will write it up some day.

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