-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misleading description in doc about napi_get_typedarray_info
#244
Comments
Thanks for catching this. PR to fix nodejs/node#20747. |
1 task
mhdawson
added a commit
to mhdawson/io.js
that referenced
this issue
May 15, 2018
The data pointer returned for the typedarray has already been adjusted by the offset so it does not point to the start of the buffer, instead id points to the start of the first element. I think we probably would have liked it to point to the start of the buffer, but we can't change as that would be a breaking change. Update the doc to match the implementation. Fixes: nodejs/node-addon-api#244
MylesBorins
pushed a commit
to nodejs/node
that referenced
this issue
May 29, 2018
The data pointer returned for the typedarray has already been adjusted by the offset so it does not point to the start of the buffer, instead id points to the start of the first element. I think we probably would have liked it to point to the start of the buffer, but we can't change as that would be a breaking change. Update the doc to match the implementation. PR-URL: #20747 Fixes: nodejs/node-addon-api#244 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In https://nodejs.org/dist/latest-v9.x/docs/api/n-api.html#n_api_napi_typedarray_type
It seems that the data is started from
&data[byte_offset]
,but actually in
node_api.cc
,So, the doc should clarify that the out arg
data
actually points to&data[byte_offset]
.The text was updated successfully, but these errors were encountered: