Cog changes to variable declarations in Plugins

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cog changes to variable declarations in Plugins

Rob Withers
 
Eliot,

I am working with OSProcessPlugin.  It has not yet been ported to Cog.
Under Cygwin, I was able to generate the plugin and compile it.  I am
confused about how I was able to generate it.  The Win32OSProcessPlugin
class has methods which state things like:

        self var: 'result' type: 'BOOL'.
        self var: 'h' declareC: 'static HANDLE h= 0'.

I thought this had changed in Cog and we needed to use:

        <var: 'result' type: 'BOOL'>
        <var: 'h' declareC: 'static HANDLE h= 0'>

as well as:

        <returnTypeC: 'unsigned char *'>
        <export: true>
        <static: false>

and so on.

Do these changes need to be made to make OSProcessPlugin work correctly?

Thanks,
Rob

Reply | Threaded
Open this post in threaded view
|

Re: Cog changes to variable declarations in Plugins

Eliot Miranda-2
 


On Sun, Jul 25, 2010 at 9:48 AM, Rob Withers <[hidden email]> wrote:

Eliot,

I am working with OSProcessPlugin.  It has not yet been ported to Cog. Under Cygwin, I was able to generate the plugin and compile it.  I am confused about how I was able to generate it.  The Win32OSProcessPlugin class has methods which state things like:

       self var: 'result' type: 'BOOL'.
       self var: 'h' declareC: 'static HANDLE h= 0'.

I thought this had changed in Cog and we needed to use:

       <var: 'result' type: 'BOOL'>
       <var: 'h' declareC: 'static HANDLE h= 0'>

as well as:

       <returnTypeC: 'unsigned char *'>
       <export: true>
       <static: false>

and so on.

Do these changes need to be made to make OSProcessPlugin work correctly?

No, they don't have to be made.  The Cog VMMaker supports both the old and the new style declarations.

cheers
Eliot
 

Thanks,
Rob