Skip to content

Commit bf79987

Browse files
implausiblejasnell
authored andcommitted
src: mark internally exported functions as explicitly internal
PR-URL: #37000 Fixes: #36349 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 1fe571a commit bf79987

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/api/hooks.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static void RunAsyncCleanupHook(void* arg) {
145145
info->fun(info->arg, FinishAsyncCleanupHook, info);
146146
}
147147

148-
ACHHandle* AddEnvironmentCleanupHookRaw(
148+
ACHHandle* AddEnvironmentCleanupHookInternal(
149149
Isolate* isolate,
150150
AsyncCleanupHook fun,
151151
void* arg) {
@@ -160,7 +160,7 @@ ACHHandle* AddEnvironmentCleanupHookRaw(
160160
return new ACHHandle { info };
161161
}
162162

163-
void RemoveEnvironmentCleanupHookRaw(
163+
void RemoveEnvironmentCleanupHookInternal(
164164
ACHHandle* handle) {
165165
if (handle->info->started) return;
166166
handle->info->self.reset();

src/node.h

+8-4
Original file line numberDiff line numberDiff line change
@@ -925,21 +925,25 @@ struct ACHHandle;
925925
struct NODE_EXTERN DeleteACHHandle { void operator()(ACHHandle*) const; };
926926
typedef std::unique_ptr<ACHHandle, DeleteACHHandle> AsyncCleanupHookHandle;
927927

928-
NODE_EXTERN ACHHandle* AddEnvironmentCleanupHookRaw(
928+
/* This function is not intended to be used externally, it exists to aid in
929+
* keeping ABI compatibility between Node and Electron. */
930+
NODE_EXTERN ACHHandle* AddEnvironmentCleanupHookInternal(
929931
v8::Isolate* isolate,
930932
void (*fun)(void* arg, void (*cb)(void*), void* cbarg),
931933
void* arg);
932934
inline AsyncCleanupHookHandle AddEnvironmentCleanupHook(
933935
v8::Isolate* isolate,
934936
void (*fun)(void* arg, void (*cb)(void*), void* cbarg),
935937
void* arg) {
936-
return AsyncCleanupHookHandle(AddEnvironmentCleanupHookRaw(isolate, fun,
938+
return AsyncCleanupHookHandle(AddEnvironmentCleanupHookInternal(isolate, fun,
937939
arg));
938940
}
939941

940-
NODE_EXTERN void RemoveEnvironmentCleanupHookRaw(ACHHandle* holder);
942+
/* This function is not intended to be used externally, it exists to aid in
943+
* keeping ABI compatibility between Node and Electron. */
944+
NODE_EXTERN void RemoveEnvironmentCleanupHookInternal(ACHHandle* holder);
941945
inline void RemoveEnvironmentCleanupHook(AsyncCleanupHookHandle holder) {
942-
RemoveEnvironmentCleanupHookRaw(holder.get());
946+
RemoveEnvironmentCleanupHookInternal(holder.get());
943947
}
944948

945949
/* Returns the id of the current execution context. If the return value is

0 commit comments

Comments
 (0)