diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 50e71d7b572d43..42db6e3a9e9535 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -552,7 +552,7 @@ thrown to immediately terminate the process. added: v8.2.0 --> ```C -NAPI_EXTERN NAPI_NO_RETURN void napi_fatal_error(const char* location, +NAPI_NO_RETURN void napi_fatal_error(const char* location, size_t location_len, const char* message, size_t message_len); diff --git a/test/addons-napi/test_function/test_function.c b/test/addons-napi/test_function/test_function.c index 749c0616f50028..99a699bfea0c87 100644 --- a/test/addons-napi/test_function/test_function.c +++ b/test/addons-napi/test_function/test_function.c @@ -28,7 +28,7 @@ napi_value TestCallFunction(napi_env env, napi_callback_info info) { void TestFunctionName(napi_env env, napi_callback_info info) {} -void Init(napi_env env, napi_value exports, napi_value module, void* priv) { +napi_value Init(napi_env env, napi_value exports) { napi_value fn1; NAPI_CALL(env, napi_create_function( env, NULL, -1, TestCallFunction, NULL, &fn1)); @@ -44,6 +44,8 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { NAPI_CALL(env, napi_set_named_property(env, exports, "TestCall", fn1)); NAPI_CALL(env, napi_set_named_property(env, exports, "TestName", fn2)); NAPI_CALL(env, napi_set_named_property(env, exports, "TestNameShort", fn3)); + + return exports; } NAPI_MODULE(NODE_GYP_MODULE_NAME, Init)