mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
node-api: declare type napi_cleanup_hook
Declare type `napi_cleanup_hook` so that the function signature can be shared across the codebase. PR-URL: https://github.com/nodejs/node/pull/45391 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
This commit is contained in:
1 parent
e0a271e41b
commit
4a4f2802ec
4 files changed
+34
-9
No files matched your search
+6
-4
@@ -671,8 +671,9 @@ void NAPI_CDECL napi_module_register(napi_module* mod) {
|
||||
node::node_module_register(nm);
|
||||
}
|
||||
|
||||
napi_status NAPI_CDECL napi_add_env_cleanup_hook(
|
||||
napi_env env, void(NAPI_CDECL* fun)(void* arg), void* arg) {
|
||||
napi_status NAPI_CDECL napi_add_env_cleanup_hook(napi_env env,
|
||||
napi_cleanup_hook fun,
|
||||
void* arg) {
|
||||
CHECK_ENV(env);
|
||||
CHECK_ARG(env, fun);
|
||||
|
||||
@@ -681,8 +682,9 @@ napi_status NAPI_CDECL napi_add_env_cleanup_hook(
|
||||
return napi_ok;
|
||||
}
|
||||
|
||||
napi_status NAPI_CDECL napi_remove_env_cleanup_hook(
|
||||
napi_env env, void(NAPI_CDECL* fun)(void* arg), void* arg) {
|
||||
napi_status NAPI_CDECL napi_remove_env_cleanup_hook(napi_env env,
|
||||
napi_cleanup_hook fun,
|
||||
void* arg) {
|
||||
CHECK_ENV(env);
|
||||
CHECK_ARG(env, fun);
|
||||
|
||||
|
||||
Reference in new issue
Block a user