[Vortex] [PATCH] fix vortex_channel_new prototype

Benoit Amiaux b.amiaux at ateme.com
Thu Dec 6 14:18:57 CET 2007


Francis Brosnan Blazquez wrote:
> This is because we are changing the way these global private module
> variables are stored, to use a single object which could allow us to
> "transfer" the library state to the module loaded. 

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, [...]);


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.


More information about the Vortex mailing list