@@ -8,9 +8,10 @@ use crate::assert_napi_ok;
88use crate :: napi_get_callback_info;
99use crate :: napi_new_property;
1010
11- // Experimental NAPI function not yet in napi-sys crate
11+ // Experimental NAPI function - renamed from napi_ to node_api_ prefix
12+ // per https://github.com/nodejs/node/pull/61319
1213unsafe extern "C" {
13- fn napi_create_object_with_properties (
14+ fn node_api_create_object_with_properties (
1415 env : napi_env ,
1516 prototype_or_null : napi_value ,
1617 property_names : * const napi_value ,
@@ -121,7 +122,7 @@ extern "C" fn test_create_object_with_properties(
121122 let mut null_proto: napi_value = ptr:: null_mut ( ) ;
122123 assert_napi_ok ! ( napi_get_null( env, & mut null_proto) ) ;
123124
124- assert_napi_ok ! ( napi_create_object_with_properties (
125+ assert_napi_ok ! ( node_api_create_object_with_properties (
125126 env,
126127 null_proto,
127128 names. as_ptr( ) ,
@@ -139,7 +140,7 @@ extern "C" fn test_create_object_with_properties_empty(
139140) -> napi_value {
140141 let mut result: napi_value = ptr:: null_mut ( ) ;
141142
142- assert_napi_ok ! ( napi_create_object_with_properties (
143+ assert_napi_ok ! ( node_api_create_object_with_properties (
143144 env,
144145 ptr:: null_mut( ) ,
145146 ptr:: null( ) ,
@@ -192,7 +193,7 @@ extern "C" fn test_create_object_with_custom_prototype(
192193 assert_napi_ok ! ( napi_create_int32( env, 42 , & mut values[ 0 ] ) ) ;
193194
194195 let mut result: napi_value = ptr:: null_mut ( ) ;
195- assert_napi_ok ! ( napi_create_object_with_properties (
196+ assert_napi_ok ! ( node_api_create_object_with_properties (
196197 env,
197198 prototype,
198199 names. as_ptr( ) ,
0 commit comments