-
-
Notifications
You must be signed in to change notification settings - Fork 493
Closed
Description
[out] data: The data buffer underlying the typed array.
[out] byte_offset: The byte offset within the data buffer from which to start projecting the TypedArray.
It seems that the data is started from &data[byte_offset],
but actually in node_api.cc,
if (data != nullptr) {
*data = static_cast<uint8_t*>(buffer->GetContents().Data()) +
array->ByteOffset();
}
if (byte_offset != nullptr) {
*byte_offset = array->ByteOffset();
}
So, the doc should clarify that the out arg data actually points to &data[byte_offset].
Metadata
Metadata
Assignees
Labels
No labels