@@ -915,8 +915,7 @@ provided by the addon:
915915napi_value Init(napi_env env, napi_value exports) {
916916 napi_status status;
917917 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};
920919 status = napi_define_properties(env, exports, 1, &desc);
921920 if (status != napi_ok) return NULL;
922921 return exports;
@@ -943,7 +942,7 @@ To define a class so that new instances can be created (often used with
943942napi_value Init(napi_env env, napi_value exports) {
944943 napi_status status;
945944 napi_property_descriptor properties[] = {
946- { "value", NULL, GetValue, SetValue, 0 , napi_default, 0 },
945+ { "value", NULL, NULL, GetValue, SetValue, NULL , napi_default, NULL },
947946 DECLARE_NAPI_METHOD("plusOne", PlusOne),
948947 DECLARE_NAPI_METHOD("multiply", Multiply),
949948 };
@@ -2405,8 +2404,8 @@ if (status != napi_ok) return status;
24052404
24062405// Set the properties
24072406napi_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 }
24102409}
24112410status = napi_define_properties(env,
24122411 obj,
0 commit comments