Skip to content

Commit dfd1f3c

Browse files
committed
node-api: fix node_api_create_object_with_properties name
1 parent d91543a commit dfd1f3c

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

benchmark/napi/create_object_with_properties/binding.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static napi_value CreateObjectWithPropertiesNew(napi_env env,
5858

5959
for (uint32_t i = 0; i < params.count; i++) {
6060
napi_value obj;
61-
napi_create_object_with_properties(
61+
node_api_create_object_with_properties(
6262
env, null_prototype, global_names, global_values, 20, &obj);
6363
}
6464

doc/api/n-api.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,7 +2645,7 @@ It is the equivalent of doing `new Object()` in JavaScript.
26452645
The JavaScript `Object` type is described in [Section object type][] of the
26462646
ECMAScript Language Specification.
26472647

2648-
#### `napi_create_object_with_properties`
2648+
#### `node_api_create_object_with_properties`
26492649

26502650
<!-- YAML
26512651
added:
@@ -2656,12 +2656,12 @@ added:
26562656
> Stability: 1 - Experimental
26572657

26582658
```cpp
2659-
napi_status napi_create_object_with_properties(napi_env env,
2660-
napi_value prototype_or_null,
2661-
const napi_value* property_names,
2662-
const napi_value* property_values,
2663-
size_t property_count,
2664-
napi_value* result)
2659+
napi_status node_api_create_object_with_properties(napi_env env,
2660+
napi_value prototype_or_null,
2661+
const napi_value* property_names,
2662+
const napi_value* property_values,
2663+
size_t property_count,
2664+
napi_value* result)
26652665
```
26662666

26672667
* `[in] env`: The environment that the API is invoked under.

src/js_native_api.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_create_object(napi_env env,
5353
#ifdef NAPI_EXPERIMENTAL
5454
#define NODE_API_EXPERIMENTAL_HAS_CREATE_OBJECT_WITH_PROPERTIES
5555
NAPI_EXTERN napi_status NAPI_CDECL
56-
napi_create_object_with_properties(napi_env env,
57-
napi_value prototype_or_null,
58-
napi_value* property_names,
59-
napi_value* property_values,
60-
size_t property_count,
61-
napi_value* result);
56+
node_api_create_object_with_properties(napi_env env,
57+
napi_value prototype_or_null,
58+
napi_value* property_names,
59+
napi_value* property_values,
60+
size_t property_count,
61+
napi_value* result);
6262
#endif // NAPI_EXPERIMENTAL
6363

6464
NAPI_EXTERN napi_status NAPI_CDECL napi_create_array(napi_env env,

src/js_native_api_v8.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,12 +1614,12 @@ napi_status NAPI_CDECL napi_create_object(napi_env env, napi_value* result) {
16141614
}
16151615

16161616
napi_status NAPI_CDECL
1617-
napi_create_object_with_properties(napi_env env,
1618-
napi_value prototype_or_null,
1619-
napi_value* property_names,
1620-
napi_value* property_values,
1621-
size_t property_count,
1622-
napi_value* result) {
1617+
node_api_create_object_with_properties(napi_env env,
1618+
napi_value prototype_or_null,
1619+
napi_value* property_names,
1620+
napi_value* property_values,
1621+
size_t property_count,
1622+
napi_value* result) {
16231623
CHECK_ENV_NOT_IN_GC(env);
16241624
CHECK_ARG(env, result);
16251625

test/js-native-api/test_object/test_object.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ static napi_value TestCreateObjectWithProperties(napi_env env,
732732
napi_value null_prototype;
733733
NODE_API_CALL(env, napi_get_null(env, &null_prototype));
734734
NODE_API_CALL(env,
735-
napi_create_object_with_properties(
735+
node_api_create_object_with_properties(
736736
env, null_prototype, names, values, 3, &result));
737737

738738
return result;
@@ -742,9 +742,9 @@ static napi_value TestCreateObjectWithPropertiesEmpty(napi_env env,
742742
napi_callback_info info) {
743743
napi_value result;
744744

745-
NODE_API_CALL(
746-
env,
747-
napi_create_object_with_properties(env, NULL, NULL, NULL, 0, &result));
745+
NODE_API_CALL(env,
746+
node_api_create_object_with_properties(
747+
env, NULL, NULL, NULL, 0, &result));
748748

749749
return result;
750750
}
@@ -777,7 +777,7 @@ static napi_value TestCreateObjectWithCustomPrototype(napi_env env,
777777
NODE_API_CALL(env, napi_create_int32(env, 42, &values[0]));
778778

779779
NODE_API_CALL(env,
780-
napi_create_object_with_properties(
780+
node_api_create_object_with_properties(
781781
env, prototype, names, values, 1, &result));
782782

783783
return result;

0 commit comments

Comments
 (0)