svaarala / duktape-wiki

Duktape Wiki
24 stars 14 forks source link

Note on getting underlying plain buffer from C code #62

Open svaarala opened 9 years ago

svaarala commented 9 years ago

Now involves Duktape.Buffer():

Type1J commented 9 years ago

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