saghul / sjs

Skookum JS: a JavaScript runtime
http://sjs.saghul.net
MIT License
97 stars 13 forks source link

Add ability to get a sjs_vm_t* from a duk_context* #36

Closed saghul closed 8 years ago

saghul commented 8 years ago

We should set the udata field in duk_create_heap, and then use http://duktape.org/api.html#duk_get_memory_functions to get the pointer back.

Something like sjs_vm_get_vm(duk_context* ctx)