On Wed, Sep 17, 2014 at 1:09 PM, Peter Stoyanov <[email protected]> wrote:
> It is in the javascript file, that i pass to node::CreateEnvironmet():
>
> function stateInit()
> {
>     return 0;
> }
>
> and it is called later from C++.
>
> I am trying to figure out, where exactly in node.js the javascript file that
> is passed is compiled and run. I am reading the code but at some point I am
> losing the track.

Your script is executed as a module.  If you want to expose it to C++,
you need to make it globally visible:

  global.stateInit = function() { return 0 };

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHQurc9Ni-YnXFOve-XX4zPhcfsLcN653hOD1e%2BdA_w8TxXOzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to