node-api: make object property arrays const

Signed-off-by: umuoy1 <burningdian@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65621
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
This commit is contained in:
Yilong Li authored and Antoine du Hamel committed 2026-09-15 10:49:21 +02:00
1 parent acd2bb10ce
commit 51d094e26b
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -55,8 +55,8 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_create_object(napi_env env,
NAPI_EXTERN napi_status NAPI_CDECL
node_api_create_object_with_properties(napi_env env,
napi_value prototype_or_null,
napi_value* property_names,
napi_value* property_values,
const napi_value* property_names,
const napi_value* property_values,
size_t property_count,
napi_value* result);
#endif // NAPI_EXPERIMENTAL
+2 -2
View File
@@ -1621,8 +1621,8 @@ napi_status NAPI_CDECL napi_create_object(napi_env env, napi_value* result) {
napi_status NAPI_CDECL
node_api_create_object_with_properties(napi_env env,
napi_value prototype_or_null,
napi_value* property_names,
napi_value* property_values,
const napi_value* property_names,
const napi_value* property_values,
size_t property_count,
napi_value* result) {
CHECK_ENV_NOT_IN_GC(env);