You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey thx a ton actually your one line example there was key for helping to solve this at least for my case.
I had previously gotten tripped up with scope and declaring new variables and pointers for the ctx object; supplying it directly as context.ctx skips the need to do the extra 'rigamarole'.
Here is my example, not sure if its 'simpler' but it does let one re-use the same context outside of main ie- in other functions across the program.
This test calls the quickjs original C function:
js_init_module_os()
to load the os module....https://github.com/ftk/quickjspp/blob/master/test/class.cpp
however, seems there is also a fair amount of rigaramole going on there to get that function to work with quickjspp context...
my question is there a simpler way to import the os module?
I want to use the context outside of main()
The text was updated successfully, but these errors were encountered: