Il 23/05/2014 11:36, Michael Tokarev ha scritto:
Here's the last incarnation:

 http://comments.gmane.org/gmane.comp.emulators.qemu/271372

The prob was re-defining GCond to GCond* in the _thin_ compat
layer I wanted to add for _old_ glib (so that all the code uses
new glib api, because that's what people know now).  That one
is fun indeed, but it allows us to go without inventing a thick
layer which will just complicate things and add unnecessary and
qemu-specific API -- to me it is too much cost for supporting
obsolete glib thread api.

FWIW, the old glib thread api is a frozen code, so we shouldn't
expect any changes in there.  And my changes does not wrap new
api (except of adding tiny wrappers for static initializers).

I liked your approach, but at the same time there is a problem: It would break completely any API that includes GMutex/GCond. GTK itself exposes a GMutex when you use gtk/gtk.h.

We can exploit the macro vs. inline function difference to our advantage, to keep the wrapper small (just s/GMutex/CompatGMutex/;s/GCond/CompatGCond/) and also type safe.

I'll post my version in a second.

Paolo

Reply via email to