GeezerVison is showing github.com — n-api: create N-API version 7 · nodejs/node@ca11816
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file 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 number | Diff line number | Diff line change |
|---|
@@ -3554,10 +3554,10 @@ defined in [Section 7.2.14][] of the ECMAScript Language Specification. | 3554 | 3554 | added: | 3555 | 3555 | - v13.0.0 | 3556 | 3556 | - v12.16.0 | | 3557 | + - v10.22.0 | | 3558 | +napiVersion: 7 | 3557 | 3559 | --> | 3558 | 3560 |
| 3559 | | -> Stability: 1 - Experimental | 3560 | | - | 3561 | 3561 | ```c | 3562 | 3562 | napi_status napi_detach_arraybuffer(napi_env env, | 3563 | 3563 | napi_value arraybuffer) | @@ -3582,10 +3582,10 @@ defined in [Section 24.1.1.3][] of the ECMAScript Language Specification. | 3582 | 3582 | added: | 3583 | 3583 | - v13.3.0 | 3584 | 3584 | - v12.16.0 | | 3585 | + - v10.22.0 | | 3586 | +napiVersion: 7 | 3585 | 3587 | --> | 3586 | 3588 |
| 3587 | | -> Stability: 1 - Experimental | 3588 | | - | 3589 | 3589 | ```c | 3590 | 3590 | napi_status napi_is_detached_arraybuffer(napi_env env, | 3591 | 3591 | napi_value arraybuffer, | |
Collapse file Copy file name to clipboardExpand all lines: src/js_native_api.h +5-2Lines changed: 5 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 17 | 17 | // functions available in a new version of N-API that is not yet ported in all | 18 | 18 | // LTS versions, they can set NAPI_VERSION knowing that they have specifically | 19 | 19 | // depended on that version. | 20 | | -#define NAPI_VERSION 6 | | 20 | +#define NAPI_VERSION 7 | 21 | 21 | #endif | 22 | 22 | #endif | 23 | 23 |
| @@ -529,14 +529,17 @@ NAPI_EXTERN napi_status napi_get_instance_data(napi_env env, | 529 | 529 | void** data); | 530 | 530 | #endif // NAPI_VERSION >= 6 | 531 | 531 |
| 532 | | -#ifdef NAPI_EXPERIMENTAL | | 532 | +#if NAPI_VERSION >= 7 | 533 | 533 | // ArrayBuffer detaching | 534 | 534 | NAPI_EXTERN napi_status napi_detach_arraybuffer(napi_env env, | 535 | 535 | napi_value arraybuffer); | 536 | 536 |
| 537 | 537 | NAPI_EXTERN napi_status napi_is_detached_arraybuffer(napi_env env, | 538 | 538 | napi_value value, | 539 | 539 | bool* result); | | 540 | +#endif // NAPI_VERSION >= 7 | | 541 | + | | 542 | +#ifdef NAPI_EXPERIMENTAL | 540 | 543 | // Type tagging | 541 | 544 | NAPI_EXTERN napi_status napi_type_tag_object(napi_env env, | 542 | 545 | napi_value value, | |
Collapse file Copy file name to clipboardExpand all lines: src/node_version.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 93 | 93 |
| 94 | 94 | // The NAPI_VERSION provided by this version of the runtime. This is the version | 95 | 95 | // which the Node binary being built supports. | 96 | | -#define NAPI_VERSION 6 | | 96 | +#define NAPI_VERSION 7 | 97 | 97 |
| 98 | 98 | #endif // SRC_NODE_VERSION_H_ |
Collapse file 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 number | Diff line number | Diff line change |
|---|
@@ -33,7 +33,7 @@ assert.notStrictEqual(test_general.testGetPrototype(baseObject), | 33 | 33 | test_general.testGetPrototype(extendedObject)); | 34 | 34 |
| 35 | 35 | // Test version management functions | 36 | | -assert.strictEqual(test_general.testGetVersion(), 6); | | 36 | +assert.strictEqual(test_general.testGetVersion(), 7); | 37 | 37 |
| 38 | 38 | [ | 39 | 39 | 123, | |
Collapse file 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 number | Diff line number | Diff line change |
|---|
| 1 | | -#define NAPI_EXPERIMENTAL | 2 | 1 | #include <js_native_api.h> | 3 | 2 | #include <string.h> | 4 | 3 | #include <stdlib.h> | |
|