@@ -56,7 +56,7 @@ there to be one or more C++ wrapper modules that provide an inlineable C++
56
56
API. Binaries built with these wrapper modules will depend on the symbols
57
57
for the N-API C based functions exported by Node.js. These wrappers are not
58
58
part of N-API, nor will they be maintained as part of Node.js. One such
59
- example is: [node-api](https://github.com/nodejs/node-api).
59
+ example is: [node-addon- api](https://github.com/nodejs/node-addon -api).
60
60
61
61
In order to use the N-API functions, include the file
62
62
[node_api.h](https://github.com/nodejs/node/blob/master/src/node_api.h)
@@ -89,7 +89,9 @@ typedef enum {
89
89
napi_generic_failure,
90
90
napi_pending_exception,
91
91
napi_cancelled,
92
- napi_status_last
92
+ napi_escape_called_twice,
93
+ napi_handle_scope_mismatch,
94
+ napi_callback_scope_mismatch
93
95
} napi_status;
94
96
```
95
97
If additional information is required upon an API returning a failed status,
@@ -605,7 +607,7 @@ that has a loop which iterates through the elements in a large array:
605
607
```C
606
608
for (int i = 0; i < 1000000; i++) {
607
609
napi_value result;
608
- napi_status status = napi_get_element(e , object, i, &result);
610
+ napi_status status = napi_get_element(env , object, i, &result);
609
611
if (status != napi_ok) {
610
612
break;
611
613
}
@@ -642,7 +644,7 @@ for (int i = 0; i < 1000000; i++) {
642
644
break;
643
645
}
644
646
napi_value result;
645
- status = napi_get_element(e , object, i, &result);
647
+ status = napi_get_element(env , object, i, &result);
646
648
if (status != napi_ok) {
647
649
break;
648
650
}
@@ -2495,10 +2497,10 @@ performed using a N-API call).
2495
2497
property to be a JavaScript function represented by `method`. If this is
2496
2498
passed in, set `value`, `getter` and `setter` to `NULL` (since these members
2497
2499
won't be used).
2498
- - `data`: The callback data passed into `method`, `getter` and `setter` if
2499
- this function is invoked.
2500
2500
- `attributes`: The attributes associated with the particular property.
2501
2501
See [`napi_property_attributes`](#n_api_napi_property_attributes).
2502
+ - `data`: The callback data passed into `method`, `getter` and `setter` if
2503
+ this function is invoked.
2502
2504
2503
2505
### Functions
2504
2506
#### napi_get_property_names
0 commit comments