[Vm-dev] Add argvec and envec to sqVirtualMachine.[ch]? (was: FT2Plugin stops working with latest version)

Igor Stasenko siguctua at gmail.com
Thu Oct 6 14:34:17 UTC 2011


On 6 October 2011 14:11, David T. Lewis <lewis at mail.msen.com> wrote:
>
> On Wed, Oct 05, 2011 at 05:19:48PM +0200, Igor Stasenko wrote:
>>
>> So, my proposal is to add
>> TheArgC and TheArgV variables to exports table of system module,
>> in same way as on windows it uses to expose stWindow variable:
>>
>>
>> void *os_exports[][3] = {
>> ...
>>   {"","stWindow", &stWindow},
>>   {"", "argc" , &theArgc }
>> ....
>> };
>>
>>
>> then any plugin could lookup for given symbol using ioLoadFunction() function,
>> and if there is no such symbol, then ok.. it will answer null , fail
>> the primitive etc etc.
>>
>> So, there is no need to change an API, just need to add few entries to
>> os_exports structure.
>
> To check my understanding, do you mean #ioLoadFunction:From: as implemented
> in vm/sqNamedPrims.c, so the idea would be to treat the main VM as a module,
> and load functions that answer the argvec and envvec from that module?
>

Right. It is already treated as a module, so it is not new.

> Dave



-- 
Best regards,
Igor Stasenko.


More information about the Vm-dev mailing list