@@ -915,8 +915,7 @@ provided by the addon:
915
915
napi_value Init(napi_env env, napi_value exports) {
916
916
napi_status status;
917
917
napi_property_descriptor desc =
918
- {"hello", Method, 0, 0, 0, napi_default, 0};
919
- if (status != napi_ok) return NULL;
918
+ {"hello", NULL, Method, NULL, NULL, NULL, napi_default, NULL};
920
919
status = napi_define_properties(env, exports, 1, &desc);
921
920
if (status != napi_ok) return NULL;
922
921
return exports;
@@ -943,7 +942,7 @@ To define a class so that new instances can be created (often used with
943
942
napi_value Init(napi_env env, napi_value exports) {
944
943
napi_status status;
945
944
napi_property_descriptor properties[] = {
946
- { "value", NULL, GetValue, SetValue, 0 , napi_default, 0 },
945
+ { "value", NULL, NULL, GetValue, SetValue, NULL , napi_default, NULL },
947
946
DECLARE_NAPI_METHOD("plusOne", PlusOne),
948
947
DECLARE_NAPI_METHOD("multiply", Multiply),
949
948
};
@@ -2405,8 +2404,8 @@ if (status != napi_ok) return status;
2405
2404
2406
2405
// Set the properties
2407
2406
napi_property_descriptor descriptors[] = {
2408
- { "foo", NULL, 0, 0, 0 , fooValue, napi_default, 0 },
2409
- { "bar", NULL, 0, 0, 0 , barValue, napi_default, 0 }
2407
+ { "foo", NULL, NULL, NULL, NULL , fooValue, napi_default, NULL },
2408
+ { "bar", NULL, NULL, NULL, NULL , barValue, napi_default, NULL }
2410
2409
}
2411
2410
status = napi_define_properties(env,
2412
2411
obj,
0 commit comments