Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n-api: create N-API version 7 #35199

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3538,10 +3538,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)
Expand All @@ -3567,10 +3566,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,
Expand Down
5 changes: 4 additions & 1 deletion src/js_native_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,17 @@ 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);

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,
Expand Down
1 change: 0 additions & 1 deletion test/js-native-api/test_typedarray/test_typedarray.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define NAPI_EXPERIMENTAL
#include <js_native_api.h>
#include <string.h>
#include <stdlib.h>
Expand Down