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 bc9e5f7

Browse filesBrowse files
vmorozaduh95
authored andcommitted
node-api: fix node_api_create_object_with_properties name
PR-URL: #61319 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent e91b296 commit bc9e5f7
Copy full SHA for bc9e5f7

5 files changed

+25-25Lines changed: 25 additions & 25 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎benchmark/napi/create_object_with_properties/binding.cc‎

Copy file name to clipboardExpand all lines: benchmark/napi/create_object_with_properties/binding.cc
+1-1Lines 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

Collapse file

‎doc/api/n-api.md‎

Copy file name to clipboardExpand all lines: doc/api/n-api.md
+7-7Lines changed: 7 additions & 7 deletions
  • Display the source diff
  • Display the rich diff
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: v25.2.0
@@ -2654,12 +2654,12 @@ added: v25.2.0
26542654
> Stability: 1 - Experimental
26552655

26562656
```cpp
2657-
napi_status napi_create_object_with_properties(napi_env env,
2658-
napi_value prototype_or_null,
2659-
const napi_value* property_names,
2660-
const napi_value* property_values,
2661-
size_t property_count,
2662-
napi_value* result)
2657+
napi_status node_api_create_object_with_properties(napi_env env,
2658+
napi_value prototype_or_null,
2659+
const napi_value* property_names,
2660+
const napi_value* property_values,
2661+
size_t property_count,
2662+
napi_value* result)
26632663
```
26642664

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

‎src/js_native_api.h‎

Copy file name to clipboardExpand all lines: src/js_native_api.h
+6-6Lines 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,
Collapse file

‎src/js_native_api_v8.cc‎

Copy file name to clipboardExpand all lines: src/js_native_api_v8.cc
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,12 +1613,12 @@ napi_status NAPI_CDECL napi_create_object(napi_env env, napi_value* result) {
16131613
}
16141614

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

Collapse file

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

Copy file name to clipboardExpand all lines: test/js-native-api/test_object/test_object.c
+5-5Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.