From 8274875f4602c9a1f78d4dfd05373d7a9426b26b Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 4 Nov 2019 16:38:45 -0500 Subject: [PATCH] doc: fix up N-API doc * Add missing N-API version info * Fix N-API version info for napi_extended_error_info PR-URL: https://github.com/nodejs/node/pull/30254 Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca Reviewed-By: Jiawen Geng --- doc/api/n-api.md | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index afd3b3344d36f9..56229a6779aeaf 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -727,8 +727,8 @@ is provided which returns a `napi_extended_error_info` structure. The format of the `napi_extended_error_info` structure is as follows: ```C @@ -1367,7 +1367,7 @@ napiVersion: 1 ```C NAPI_EXTERN napi_status napi_create_reference(napi_env env, napi_value value, - int initial_refcount, + uint32_t initial_refcount, napi_ref* result); ``` @@ -1410,7 +1410,7 @@ napiVersion: 1 ```C NAPI_EXTERN napi_status napi_reference_ref(napi_env env, napi_ref ref, - int* result); + uint32_t* result); ``` * `[in] env`: The environment that the API is invoked under. @@ -1431,7 +1431,7 @@ napiVersion: 1 ```C NAPI_EXTERN napi_status napi_reference_unref(napi_env env, napi_ref ref, - int* result); + uint32_t* result);); ``` * `[in] env`: The environment that the API is invoked under. @@ -1838,6 +1838,7 @@ structure, in most cases using a `TypedArray` will suffice. #### napi_create_date ```C @@ -2517,6 +2518,7 @@ This API returns various properties of a `DataView`. #### napi_get_date_value ```C @@ -3137,6 +3139,7 @@ This API checks if the `Object` passed in is a buffer. ### napi_is_date ```C @@ -3803,12 +3806,12 @@ napiVersion: 1 --> ```C -napi_status napi_call_function(napi_env env, - napi_value recv, - napi_value func, - int argc, - const napi_value* argv, - napi_value* result) +NAPI_EXTERN napi_status napi_call_function(napi_env env, + napi_value recv, + napi_value func, + size_t argc, + const napi_value* argv, + napi_value* result); ``` * `[in] env`: The environment that the API is invoked under. @@ -4273,6 +4276,7 @@ JavaScript object becomes garbage-collected. ```C @@ -4539,13 +4543,13 @@ changes: --> ```C -napi_status napi_make_callback(napi_env env, - napi_async_context async_context, - napi_value recv, - napi_value func, - int argc, - const napi_value* argv, - napi_value* result) +NAPI_EXTERN napi_status napi_make_callback(napi_env env, + napi_async_context async_context, + napi_value recv, + napi_value func, + size_t argc, + const napi_value* argv, + napi_value* result); ``` * `[in] env`: The environment that the API is invoked under.