Hi Igor,<div><br></div><div>&nbsp;&nbsp; &nbsp;one question Andreas raised that I hadn&#39;t thought of was how with the new scheme you deal with multiple interpreters? &nbsp;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). &nbsp;How do you do it in Hydra with the new scheme? &nbsp;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">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</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 &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;:<br>
</div><div class="Ih2E3d">&gt; OK, good :) &nbsp;So Igor, what are the three functions interpreterProxy still<br>
&gt; has?<br>
<br>
</div>Here the part of sqVirtualMachine.h<br>
<br>
typedef struct ObjVirtualMachine {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;sqInt (*minorVersion)(void);<br>
 &nbsp; &nbsp; &nbsp; &nbsp;sqInt (*majorVersion)(void);<br>
<br>
/* IMPORTANT!!!<br>
* &nbsp; &nbsp; &nbsp; The rest of functions can be obtained by plugin by calling a<br>
getVMFunctionPointerBySelector function.<br>
* &nbsp; &nbsp; &nbsp; The need in defining additional functions in this struct is gone forever<br>
*/<br>
 &nbsp; &nbsp; &nbsp; &nbsp;void * (*getVMFunctionPointerBySelector)(char * selector);<br>
<br>
} ObjVirtualMachine;<br>
<div class="Ih2E3d"><br>
&gt; TIA<br>
&gt;<br>
&gt; (P.S. &nbsp;this can be backward-compatible, right? &nbsp;We can still provide the old<br>
&gt; 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>
&gt; On Sat, Nov 22, 2008 at 11:06 AM, Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<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>