Hey!
Hurray for rubber duck problem solving!
...
Persistent<Object> module_exports;
...
void default_c_api_callback( int uuid ) {
Local<Function> callback = Local<Function>::Cast(
Local<Object>::New( module_exports )
->Get( String::NewFromUtf8( Isolate::GetCurrent(), "callbacks" ) )
-> Get( uuid ) );
}
...
void Init( Handle<Object> exports, Handle<Object> module ) {
module_exports.Reset( Isolate::GetCurrent(), exports );
...
}
NODE_MODULE( cApiBindings, Init )
HTH,
Gabriel
--
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/6f2c1c3c-8004-4749-9979-9e40095d9956%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.