From 6dc6dadfc69407051b756a638bf0c23624804aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Tue, 22 Sep 2020 20:22:26 +0200 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/35300 Reviewed-By: Anna Henningsen Reviewed-By: Michael Dawson Reviewed-By: Colin Ihrig Reviewed-By: Jiawen Geng Reviewed-By: Chengzhong Wu Reviewed-By: Gabriel Schulhof --- doc/api/n-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 793405318c1c79..18f8a596029f56 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -4388,8 +4388,8 @@ napi_status napi_get_cb_info(napi_env env, * `[in] env`: The environment that the API is invoked under. * `[in] cbinfo`: The callback info passed into the callback function. -* `[in-out] argc`: Specifies the size of the provided `argv` array and receives - the actual count of arguments. +* `[in-out] argc`: Specifies the length of the provided `argv` array and + receives the actual count of arguments. * `[out] argv`: Buffer to which the `napi_value` representing the arguments are copied. If there are more arguments than the provided count, only the requested number of arguments are copied. If there are fewer arguments