Hi Igor,<div><br></div><div> 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?<br>
<br><div class="gmail_quote">On Sat, Nov 22, 2008 at 11:11 AM, Igor Stasenko <span dir="ltr"><<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">2008/11/22 Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>>:<br>
</div><div class="Ih2E3d">> OK, good :) So Igor, what are the three functions interpreterProxy still<br>
> has?<br>
<br>
</div>Here the part of sqVirtualMachine.h<br>
<br>
typedef struct ObjVirtualMachine {<br>
sqInt (*minorVersion)(void);<br>
sqInt (*majorVersion)(void);<br>
<br>
/* IMPORTANT!!!<br>
* The rest of functions can be obtained by plugin by calling a<br>
getVMFunctionPointerBySelector function.<br>
* The need in defining additional functions in this struct is gone forever<br>
*/<br>
void * (*getVMFunctionPointerBySelector)(char * selector);<br>
<br>
} ObjVirtualMachine;<br>
<div class="Ih2E3d"><br>
> TIA<br>
><br>
> (P.S. this can be backward-compatible, right? We can still provide the old<br>
> nterface for a while to allow external plugins to still load)<br>
<br>
</div>Yes, first it calls setInterpreter() with new struct.<br>
Old plugin checks version and refuses to work.<br>
Then VM calls setInterpreter() with old InterpreterProxy, to make plugin happy.<br>
<div class="Ih2E3d"><br>
> On Sat, Nov 22, 2008 at 11:06 AM, Igor Stasenko <<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>> wrote:<br>
>><br>
<br>
<br>
</div>--<br>
<div><div></div><div class="Wj3C7c">Best regards,<br>
Igor Stasenko AKA sig.<br>
<br>
</div></div></blockquote></div><br></div>