mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01: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 Backport-PR-URL: https://github.com/nodejs/node/pull/35336 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:
parent
b83f9a56fc
commit
54c2bc2e62
|
|
@ -2951,10 +2951,9 @@ of the ECMAScript Language Specification.
|
|||
### napi_detach_arraybuffer
|
||||
<!-- YAML
|
||||
added: v10.22.0
|
||||
napiVersion: 7
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
napi_status napi_detach_arraybuffer(napi_env env,
|
||||
napi_value arraybuffer)
|
||||
|
|
@ -2977,10 +2976,9 @@ defined in [Section 24.1.1.3][] of the ECMAScript Language Specification.
|
|||
### napi_is_detached_arraybuffer
|
||||
<!-- YAML
|
||||
added: v10.22.0
|
||||
napiVersion: 7
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
napi_status napi_is_detached_arraybuffer(napi_env env,
|
||||
napi_value arraybuffer,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,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
|
||||
|
||||
|
|
@ -752,7 +752,7 @@ napi_get_all_property_names(napi_env env,
|
|||
|
||||
#endif // NAPI_VERSION >= 6
|
||||
|
||||
#ifdef NAPI_EXPERIMENTAL
|
||||
#if NAPI_VERSION >= 7
|
||||
// ArrayBuffer detaching
|
||||
NAPI_EXTERN napi_status
|
||||
napi_detach_arraybuffer(napi_env env,
|
||||
|
|
@ -762,7 +762,7 @@ NAPI_EXTERN napi_status
|
|||
napi_is_detached_arraybuffer(napi_env env,
|
||||
napi_value value,
|
||||
bool* result);
|
||||
#endif // NAPI_EXPERIMENTAL
|
||||
#endif // NAPI_VERSION >= 7
|
||||
|
||||
EXTERN_C_END
|
||||
|
||||
|
|
|
|||
|
|
@ -115,6 +115,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_
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ assert.notStrictEqual(test_general.testGetPrototype(baseObject),
|
|||
|
||||
// test version management functions
|
||||
// expected version is currently 4
|
||||
assert.strictEqual(test_general.testGetVersion(), 6);
|
||||
assert.strictEqual(test_general.testGetVersion(), 7);
|
||||
|
||||
const [ major, minor, patch, release ] = test_general.testGetNodeVersion();
|
||||
assert.strictEqual(process.version.split('-')[0],
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
#define NAPI_EXPERIMENTAL
|
||||
#include <node_api.h>
|
||||
#include <string.h>
|
||||
#include "../common.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user