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