[quickjs-devel] Help with C++/opaque pointer passing

  • From: Weckso Flannigan <weckso@xxxxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Sun, 15 Dec 2019 13:39:12 -0600

Howdy, I could use some help getting a class pointer passed around
when JS calls back into my C++ code.

See https://pastebin.com/YSMnJVcT

I suspect I'm missing an export on the C++ side or import on the JS
side, but any reference to testclass.* results in "testclass is not
defined". Working on porting an existing C++ app from mujs to quickjs
with hope that we'll see some pretty dramatic improvements. Also,
since this app is threaded, I assume that JS_NewClassID needs
concurrency protection? Anything else?

thanks

-W

Other related posts: