Skip to content

Commit

Permalink
apply zuiderkwast suggestion
Browse files Browse the repository at this point in the history
Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Nov 21, 2024
1 parent 1f651d9 commit 376bd5a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,24 +186,23 @@ void functionsLibCtxClearCurrent(int async) {
}

/* Free the given functions ctx */
void functionsLibCtxFreeGeneric(functionsLibCtx *functions_lib_ctx, int async) {
static void functionsLibCtxFreeGeneric(functionsLibCtx *functions_lib_ctx, int async) {
if (async) {
freeFunctionsAsync(functions_lib_ctx);
return;
} else {
functionsLibCtxFree(functions_lib_ctx);
}
}

/* Free the given functions ctx */
void functionsLibCtxFree(functionsLibCtx *functions_lib_ctx) {
functionsLibCtxClear(functions_lib_ctx);
dictRelease(functions_lib_ctx->functions);
dictRelease(functions_lib_ctx->libraries);
dictRelease(functions_lib_ctx->engines_stats);
zfree(functions_lib_ctx);
}

/* Free the given functions ctx */
void functionsLibCtxFree(functionsLibCtx *functions_lib_ctx) {
functionsLibCtxFreeGeneric(functions_lib_ctx, 0);
}

/* Swap the current functions ctx with the given one.
* Free the old functions ctx. */
void functionsLibCtxSwapWithCurrent(functionsLibCtx *new_lib_ctx, int async) {
Expand Down

0 comments on commit 376bd5a

Please sign in to comment.