Skip to content

Commit ce2c162

Browse files
authored
feat!: fix node_api_create_object_with_properties name (#193)
1 parent aa569f0 commit ce2c162

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

packages/emnapi/include/node/js_native_api.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_create_object(napi_env env,
5959
#ifdef NAPI_EXPERIMENTAL
6060
#define NODE_API_EXPERIMENTAL_HAS_CREATE_OBJECT_WITH_PROPERTIES
6161
NAPI_EXTERN napi_status NAPI_CDECL
62-
napi_create_object_with_properties(napi_env env,
63-
napi_value prototype_or_null,
64-
napi_value* property_names,
65-
napi_value* property_values,
66-
size_t property_count,
67-
napi_value* result);
62+
node_api_create_object_with_properties(napi_env env,
63+
napi_value prototype_or_null,
64+
napi_value* property_names,
65+
napi_value* property_values,
66+
size_t property_count,
67+
napi_value* result);
6868
#endif // NAPI_EXPERIMENTAL
6969

7070
NAPI_EXTERN napi_status NAPI_CDECL napi_create_array(napi_env env,

packages/emnapi/src/value/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export function napi_create_object (env: napi_env, result: Pointer<napi_value>):
199199
/**
200200
* @__sig ipppppp
201201
*/
202-
export function napi_create_object_with_properties (
202+
export function node_api_create_object_with_properties (
203203
env: napi_env,
204204
prototype_or_null: napi_value,
205205
property_names: Pointer<napi_value>,

packages/test/object/test_object.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ static napi_value TestCreateObjectWithProperties(napi_env env,
743743
napi_value null_prototype;
744744
NODE_API_CALL(env, napi_get_null(env, &null_prototype));
745745
NODE_API_CALL(env,
746-
napi_create_object_with_properties(
746+
node_api_create_object_with_properties(
747747
env, null_prototype, names, values, 3, &result));
748748

749749
return result;
@@ -753,9 +753,9 @@ static napi_value TestCreateObjectWithPropertiesEmpty(napi_env env,
753753
napi_callback_info info) {
754754
napi_value result;
755755

756-
NODE_API_CALL(
757-
env,
758-
napi_create_object_with_properties(env, NULL, NULL, NULL, 0, &result));
756+
NODE_API_CALL(env,
757+
node_api_create_object_with_properties(
758+
env, NULL, NULL, NULL, 0, &result));
759759

760760
return result;
761761
}
@@ -788,7 +788,7 @@ static napi_value TestCreateObjectWithCustomPrototype(napi_env env,
788788
NODE_API_CALL(env, napi_create_int32(env, 42, &values[0]));
789789

790790
NODE_API_CALL(env,
791-
napi_create_object_with_properties(
791+
node_api_create_object_with_properties(
792792
env, prototype, names, values, 1, &result));
793793

794794
return result;

0 commit comments

Comments
 (0)