Hi Igor, one question Andreas raised that I hadn't thought of was how with the new scheme you deal with multiple interpreters? With the old interpreterProxy scheme I guess the interpreterProxy could redirect a function to the relevant interpreter (although this would require a mutex to make it thread safe). How do you do it in Hydra with the new scheme? Do you load the plugin multiple times, once per VM, or do you do some redrecting behind the scenes?
On Sat, Nov 22, 2008 at 11:11 AM, Igor Stasenko siguctua@gmail.com wrote:
2008/11/22 Eliot Miranda eliot.miranda@gmail.com:
OK, good :) So Igor, what are the three functions interpreterProxy still has?
Here the part of sqVirtualMachine.h
typedef struct ObjVirtualMachine { sqInt (*minorVersion)(void); sqInt (*majorVersion)(void);
/* IMPORTANT!!!
The rest of functions can be obtained by plugin by calling a
getVMFunctionPointerBySelector function.
The need in defining additional functions in this struct is gone
forever */ void * (*getVMFunctionPointerBySelector)(char * selector);
} ObjVirtualMachine;
TIA
(P.S. this can be backward-compatible, right? We can still provide the
old
nterface for a while to allow external plugins to still load)
Yes, first it calls setInterpreter() with new struct. Old plugin checks version and refuses to work. Then VM calls setInterpreter() with old InterpreterProxy, to make plugin happy.
On Sat, Nov 22, 2008 at 11:06 AM, Igor Stasenko siguctua@gmail.com
wrote:
-- Best regards, Igor Stasenko AKA sig.