duktape-wiki icon indicating copy to clipboard operation
duktape-wiki copied to clipboard

Note on getting underlying plain buffer from C code

Open svaarala opened this issue 8 years ago • 1 comments

Now involves Duktape.Buffer():

  • https://github.com/svaarala/duktape/issues/190#issuecomment-155080448

svaarala avatar Nov 10 '15 12:11 svaarala

@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.

Type1J avatar Nov 10 '15 13:11 Type1J