Skip to content

Commit 6dc6dad

Browse files
tniessenMylesBorins
authored andcommitted
doc: avoid referring to C array size
The size of arrays is measured in bytes in C, not in the number of elements. The napi_get_cb_info function takes the length of the array, that is, the number of elements it can contain, and not its size. PR-URL: #35300 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]>
1 parent 0a847ca commit 6dc6dad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/n-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4388,8 +4388,8 @@ napi_status napi_get_cb_info(napi_env env,
43884388

43894389
* `[in] env`: The environment that the API is invoked under.
43904390
* `[in] cbinfo`: The callback info passed into the callback function.
4391-
* `[in-out] argc`: Specifies the size of the provided `argv` array and receives
4392-
the actual count of arguments.
4391+
* `[in-out] argc`: Specifies the length of the provided `argv` array and
4392+
receives the actual count of arguments.
43934393
* `[out] argv`: Buffer to which the `napi_value` representing the arguments are
43944394
copied. If there are more arguments than the provided count, only the
43954395
requested number of arguments are copied. If there are fewer arguments

0 commit comments

Comments
 (0)