Skip to content

Commit 4724e07

Browse files
isaacbrodskytargos
authored andcommitted
doc: indicate n-api out params that may be NULL
This is useful information to have for applications that don't need to read the other properties. The implementation checks for `nullptr`, see: https://github.com/nodejs/node/blob/master/src/js_native_api_v8.cc#L2879 PR-URL: #40371 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent e2c9e1c commit 4724e07

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/n-api.md

+4
Original file line numberDiff line numberDiff line change
@@ -2821,6 +2821,8 @@ Returns `napi_ok` if the API succeeded.
28212821

28222822
This API returns various properties of a typed array.
28232823

2824+
Any of the out parameters may be `NULL` if that property is unneeded.
2825+
28242826
*Warning*: Use caution while using this API since the underlying data buffer
28252827
is managed by the VM.
28262828

@@ -2851,6 +2853,8 @@ napi_status napi_get_dataview_info(napi_env env,
28512853

28522854
Returns `napi_ok` if the API succeeded.
28532855

2856+
Any of the out parameters may be `NULL` if that property is unneeded.
2857+
28542858
This API returns various properties of a `DataView`.
28552859

28562860
#### napi_get_date_value

0 commit comments

Comments
 (0)