diff options
author | Gabriel Schulhof <gabriel.schulhof@intel.com> | 2020-09-15 03:20:57 +0300 |
---|---|---|
committer | Gabriel Schulhof <gabriel.schulhof@intel.com> | 2020-09-19 05:58:39 +0300 |
commit | 31b3202d5902e7fa105949758677ea09643d8c5f (patch) | |
tree | cdd55b3a6e4ec30f7dfd66305452d2ceb346cec4 /src | |
parent | f4586c902a721164c8af3c0e11db859f102dfe2e (diff) |
n-api: create N-API version 7
Mark `napi_detach_arraybuffer` and `napi_is_detached_arraybuffer` as
stable.
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: https://github.com/nodejs/node/pull/35199
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <mdawson@devrus.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/js_native_api.h | 7 | ||||
-rw-r--r-- | src/node_version.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/js_native_api.h b/src/js_native_api.h index d0d975c2b45..bd8bd35d7b7 100644 --- a/src/js_native_api.h +++ b/src/js_native_api.h @@ -17,7 +17,7 @@ // functions available in a new version of N-API that is not yet ported in all // LTS versions, they can set NAPI_VERSION knowing that they have specifically // depended on that version. -#define NAPI_VERSION 6 +#define NAPI_VERSION 7 #endif #endif @@ -529,7 +529,7 @@ NAPI_EXTERN napi_status napi_get_instance_data(napi_env env, void** data); #endif // NAPI_VERSION >= 6 -#ifdef NAPI_EXPERIMENTAL +#if NAPI_VERSION >= 7 // ArrayBuffer detaching NAPI_EXTERN napi_status napi_detach_arraybuffer(napi_env env, napi_value arraybuffer); @@ -537,6 +537,9 @@ NAPI_EXTERN napi_status napi_detach_arraybuffer(napi_env env, NAPI_EXTERN napi_status napi_is_detached_arraybuffer(napi_env env, napi_value value, bool* result); +#endif // NAPI_VERSION >= 7 + +#ifdef NAPI_EXPERIMENTAL // Type tagging NAPI_EXTERN napi_status napi_type_tag_object(napi_env env, napi_value value, diff --git a/src/node_version.h b/src/node_version.h index b9670f57bde..c6a011c618a 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -93,6 +93,6 @@ // The NAPI_VERSION provided by this version of the runtime. This is the version // which the Node binary being built supports. -#define NAPI_VERSION 6 +#define NAPI_VERSION 7 #endif // SRC_NODE_VERSION_H_ |