mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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>
This commit is contained in:
@@ -3558,10 +3558,9 @@ added:
|
||||
- v13.0.0
|
||||
- v12.16.0
|
||||
- v10.22.0
|
||||
napiVersion: 7
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```c
|
||||
napi_status napi_detach_arraybuffer(napi_env env,
|
||||
napi_value arraybuffer)
|
||||
@@ -3587,10 +3586,9 @@ added:
|
||||
- v13.3.0
|
||||
- v12.16.0
|
||||
- v10.22.0
|
||||
napiVersion: 7
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```c
|
||||
napi_status napi_is_detached_arraybuffer(napi_env env,
|
||||
napi_value arraybuffer,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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_
|
||||
|
||||
@@ -33,7 +33,7 @@ assert.notStrictEqual(test_general.testGetPrototype(baseObject),
|
||||
test_general.testGetPrototype(extendedObject));
|
||||
|
||||
// Test version management functions
|
||||
assert.strictEqual(test_general.testGetVersion(), 6);
|
||||
assert.strictEqual(test_general.testGetVersion(), 7);
|
||||
|
||||
[
|
||||
123,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#define NAPI_EXPERIMENTAL
|
||||
#include <js_native_api.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
Reference in New Issue
Block a user