GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: clarify behavior of napi_get_typedarray_info · nodejs/node@19deaa5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • n-api.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/n-api.md‎

Copy file name to clipboardExpand all lines: doc/api/n-api.md
+6-2Lines changed: 6 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,8 @@ napi_status napi_get_arraybuffer_info(napi_env env,
24472447

24482448
* `[in] env`: The environment that the API is invoked under.
24492449
* `[in] arraybuffer`: `napi_value` representing the `ArrayBuffer` being queried.
2450-
* `[out] data`: The underlying data buffer of the `ArrayBuffer`.
2450+
* `[out] data`: The underlying data buffer of the `ArrayBuffer`. If byte_length
2451+
is `0`, this may be `NULL` or any other pointer value.
24512452
* `[out] byte_length`: Length in bytes of the underlying data buffer.
24522453

24532454
Returns `napi_ok` if the API succeeded.
@@ -2479,6 +2480,7 @@ napi_status napi_get_buffer_info(napi_env env,
24792480
* `[in] env`: The environment that the API is invoked under.
24802481
* `[in] value`: `napi_value` representing the `node::Buffer` being queried.
24812482
* `[out] data`: The underlying data buffer of the `node::Buffer`.
2483+
If length is `0`, this may be `NULL` or any other pointer value.
24822484
* `[out] length`: Length in bytes of the underlying data buffer.
24832485

24842486
Returns `napi_ok` if the API succeeded.
@@ -2532,7 +2534,8 @@ napi_status napi_get_typedarray_info(napi_env env,
25322534
* `[out] length`: The number of elements in the `TypedArray`.
25332535
* `[out] data`: The data buffer underlying the `TypedArray` adjusted by
25342536
the `byte_offset` value so that it points to the first element in the
2535-
`TypedArray`.
2537+
`TypedArray`. If the length of the array is `0`, this may be `NULL` or
2538+
any other pointer value.
25362539
* `[out] arraybuffer`: The `ArrayBuffer` underlying the `TypedArray`.
25372540
* `[out] byte_offset`: The byte offset within the underlying native array
25382541
at which the first element of the arrays is located. The value for the data
@@ -2567,6 +2570,7 @@ napi_status napi_get_dataview_info(napi_env env,
25672570
properties to query.
25682571
* `[out] byte_length`: `Number` of bytes in the `DataView`.
25692572
* `[out] data`: The data buffer underlying the `DataView`.
2573+
If byte_length is `0`, this may be `NULL` or any other pointer value.
25702574
* `[out] arraybuffer`: `ArrayBuffer` underlying the `DataView`.
25712575
* `[out] byte_offset`: The byte offset within the data buffer from which
25722576
to start projecting the `DataView`.

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.