[Vortex] [PATCH] fix vortex_channel_new prototype

Francis Brosnan Blazquez francis at aspl.es
Thu Dec 6 19:11:17 CET 2007


Hi,

> How about getting rid of those global variables by storing them 
> explicitely in some context/handle ?
> 
> Something like:
> 
> VortexContext* context = vortex_init();
> assert( context );
> 
> VortexConnection* connection = vortex_connection_new(context, [...]);
> vortex_connection_close(connection);
> 
> vortex_exit(context);
> 
> That way, the context can be shared across modules/dll without any 
> issue. VortexContext can still be an opaque pointer. This solution is 
> also interesting because it allows us to have multiple vortex
> contexts 
> in the same process. Currently, vortex_init/vortex_exit is a bit
> broken 
> about that.

That's the key issue and the real solution. What we want for now is to
change internally to a context model not only because it solves our
particular windows dll problem without breaking the API, but because it
is an initial step to a more general solution that would allow things
like you say in the future.

As a side effect, it means a bit of work and it is a deep API change
from previous stable releases....

Currently we are focused on several projects depending directly on the
Vortex API . This makes the context-driven API change not viable at this
moment (plus the fact these projects won't take any advantage from this
change).

Cheers!

> Bye,
> AMIAUX Benoit 




More information about the Vortex mailing list