Skip to content

Commit d983942

Browse files
umuoy1aduh95
authored andcommitted
node-api: make object property arrays const
Signed-off-by: umuoy1 <burningdian@gmail.com> PR-URL: #65621 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
1 parent b282765 commit d983942

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/js_native_api.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_create_object(napi_env env,
5555
NAPI_EXTERN napi_status NAPI_CDECL
5656
node_api_create_object_with_properties(napi_env env,
5757
napi_value prototype_or_null,
58-
napi_value* property_names,
59-
napi_value* property_values,
58+
const napi_value* property_names,
59+
const napi_value* property_values,
6060
size_t property_count,
6161
napi_value* result);
6262
#endif // NAPI_EXPERIMENTAL

‎src/js_native_api_v8.cc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,8 +1615,8 @@ napi_status NAPI_CDECL napi_create_object(napi_env env, napi_value* result) {
16151615
napi_status NAPI_CDECL
16161616
node_api_create_object_with_properties(napi_env env,
16171617
napi_value prototype_or_null,
1618-
napi_value* property_names,
1619-
napi_value* property_values,
1618+
const napi_value* property_names,
1619+
const napi_value* property_values,
16201620
size_t property_count,
16211621
napi_value* result) {
16221622
CHECK_ENV_NOT_IN_GC(env);

0 commit comments

Comments
 (0)