diff options
author | Isaac Brodsky <isaac@isaacbrodsky.com> | 2021-10-08 03:59:56 +0300 |
---|---|---|
committer | Michael Dawson <mdawson@devrus.com> | 2021-10-14 00:25:22 +0300 |
commit | 4cf5563147cd562335ec02c4a78f9397a30e6701 (patch) | |
tree | d1cac7916374248072f19da1cc97ed8f07c77294 /doc/api/n-api.md | |
parent | 95cf944736d948c6bf6b079eecb14ae70130740d (diff) |
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: https://github.com/nodejs/node/pull/40371
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/n-api.md')
-rw-r--r-- | doc/api/n-api.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 2113ca7ca88..9c1d9b896e6 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -2821,6 +2821,8 @@ Returns `napi_ok` if the API succeeded. This API returns various properties of a typed array. +Any of the out parameters may be `NULL` if that property is unneeded. + *Warning*: Use caution while using this API since the underlying data buffer is managed by the VM. @@ -2851,6 +2853,8 @@ napi_status napi_get_dataview_info(napi_env env, Returns `napi_ok` if the API succeeded. +Any of the out parameters may be `NULL` if that property is unneeded. + This API returns various properties of a `DataView`. #### napi_get_date_value |