duktape-wiki
duktape-wiki copied to clipboard
Note on getting underlying plain buffer from C code
Now involves Duktape.Buffer()
:
- https://github.com/svaarala/duktape/issues/190#issuecomment-155080448
@svaarala: I tried the first approach that you menchened in #190 (extend duk_push_buffer_object()) before looking at the docs or the Duktape source because there are a few other API calls that intepret their meaning from the type on the top of the stack. I think that that's the most intuitive approach, and as you said, it causes the least problems for future API versions.