Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ca11816

Browse filesBrowse files
Gabriel Schulhofruyadorno
authored andcommitted
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: #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>
1 parent 6119e95 commit ca11816
Copy full SHA for ca11816

File tree

Expand file treeCollapse file tree

5 files changed

+11
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+11
-9
lines changed
Open diff view settings
Collapse file

‎doc/api/n-api.md‎

Copy file name to clipboardExpand all lines: doc/api/n-api.md
+4-4Lines changed: 4 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -3554,10 +3554,10 @@ defined in [Section 7.2.14][] of the ECMAScript Language Specification.
35543554
added:
35553555
- v13.0.0
35563556
- v12.16.0
3557+
- v10.22.0
3558+
napiVersion: 7
35573559
-->
35583560

3559-
> Stability: 1 - Experimental
3560-
35613561
```c
35623562
napi_status napi_detach_arraybuffer(napi_env env,
35633563
napi_value arraybuffer)
@@ -3582,10 +3582,10 @@ defined in [Section 24.1.1.3][] of the ECMAScript Language Specification.
35823582
added:
35833583
- v13.3.0
35843584
- v12.16.0
3585+
- v10.22.0
3586+
napiVersion: 7
35853587
-->
35863588

3587-
> Stability: 1 - Experimental
3588-
35893589
```c
35903590
napi_status napi_is_detached_arraybuffer(napi_env env,
35913591
napi_value arraybuffer,
Collapse file

‎src/js_native_api.h‎

Copy file name to clipboardExpand all lines: src/js_native_api.h
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// functions available in a new version of N-API that is not yet ported in all
1818
// LTS versions, they can set NAPI_VERSION knowing that they have specifically
1919
// depended on that version.
20-
#define NAPI_VERSION 6
20+
#define NAPI_VERSION 7
2121
#endif
2222
#endif
2323

@@ -529,14 +529,17 @@ NAPI_EXTERN napi_status napi_get_instance_data(napi_env env,
529529
void** data);
530530
#endif // NAPI_VERSION >= 6
531531

532-
#ifdef NAPI_EXPERIMENTAL
532+
#if NAPI_VERSION >= 7
533533
// ArrayBuffer detaching
534534
NAPI_EXTERN napi_status napi_detach_arraybuffer(napi_env env,
535535
napi_value arraybuffer);
536536

537537
NAPI_EXTERN napi_status napi_is_detached_arraybuffer(napi_env env,
538538
napi_value value,
539539
bool* result);
540+
#endif // NAPI_VERSION >= 7
541+
542+
#ifdef NAPI_EXPERIMENTAL
540543
// Type tagging
541544
NAPI_EXTERN napi_status napi_type_tag_object(napi_env env,
542545
napi_value value,
Collapse file

‎src/node_version.h‎

Copy file name to clipboardExpand all lines: src/node_version.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@
9393

9494
// The NAPI_VERSION provided by this version of the runtime. This is the version
9595
// which the Node binary being built supports.
96-
#define NAPI_VERSION 6
96+
#define NAPI_VERSION 7
9797

9898
#endif // SRC_NODE_VERSION_H_
Collapse file

‎test/js-native-api/test_general/test.js‎

Copy file name to clipboardExpand all lines: test/js-native-api/test_general/test.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ assert.notStrictEqual(test_general.testGetPrototype(baseObject),
3333
test_general.testGetPrototype(extendedObject));
3434

3535
// Test version management functions
36-
assert.strictEqual(test_general.testGetVersion(), 6);
36+
assert.strictEqual(test_general.testGetVersion(), 7);
3737

3838
[
3939
123,
Collapse file

‎test/js-native-api/test_typedarray/test_typedarray.c‎

Copy file name to clipboardExpand all lines: test/js-native-api/test_typedarray/test_typedarray.c
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#define NAPI_EXPERIMENTAL
21
#include <js_native_api.h>
32
#include <string.h>
43
#include <stdlib.h>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.