bellard / quickjs

Public repository of the QuickJS Javascript Engine.
https://bellard.org/quickjs
Other
8.51k stars 892 forks source link

Add `JS_NewTypedArray()` #272

Closed xeioex closed 6 months ago

chqrlie commented 6 months ago

@xeioex: After further thinking, I am not sure about the arguments to C API JS_NewTypedArray: It should probably take a size_t length and a const void * to optionally initialize the array contents. argc + argv is for JavaScript methods.

What is your use case?

xeioex commented 6 months ago

@chqrlie

Agree, size_t length and a const void * to optionally initialize the array contents is suffice for my case.

xeioex commented 6 months ago

@chqrlie

I will prepare the updated API and PR.