[Tarantool-patches] [PATCH] sysprof: make sysprof internal API funcs static
Maxim Kokryashkin
max.kokryashkin at gmail.com
Wed May 11 11:25:21 MSK 2022
Make sysprof internal Lua API functions static to avoid their exposure.
Part of tarantool/tarantool#781
---
Branch: https://github.com/tarantool/luajit/tree/fckxorg/sysprof-rc-full-ci
src/lib_misc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/lib_misc.c b/src/lib_misc.c
index 370307a7..01dc1bea 100644
--- a/src/lib_misc.c
+++ b/src/lib_misc.c
@@ -162,7 +162,7 @@ static int on_stop_cb_default(void *opt, uint8_t *buf)
#define SYSPROF_DEFAULT_INTERVAL 10
#define SYSPROF_DEFAULT_OUTPUT "sysprof.bin"
-int set_output_path(const char *path, struct luam_Sysprof_Options *opt) {
+static int set_output_path(const char *path, struct luam_Sysprof_Options *opt) {
struct profile_ctx *ctx = opt->ctx;
int fd = 0;
lua_assert(path != NULL);
@@ -174,7 +174,7 @@ int set_output_path(const char *path, struct luam_Sysprof_Options *opt) {
return PROFILE_SUCCESS;
}
-int parse_sysprof_opts(lua_State *L, struct luam_Sysprof_Options *opt, int idx) {
+static int parse_sysprof_opts(lua_State *L, struct luam_Sysprof_Options *opt, int idx) {
GCtab *options = lj_lib_checktab(L, idx);
/* Get profiling mode. */
@@ -248,7 +248,7 @@ int parse_sysprof_opts(lua_State *L, struct luam_Sysprof_Options *opt, int idx)
return PROFILE_SUCCESS;
}
-int parse_options(lua_State *L, struct luam_Sysprof_Options *opt)
+static int parse_options(lua_State *L, struct luam_Sysprof_Options *opt)
{
if (lua_gettop(L) != 1)
return PROFILE_ERRUSE;
@@ -259,7 +259,7 @@ int parse_options(lua_State *L, struct luam_Sysprof_Options *opt)
return parse_sysprof_opts(L, opt, 1);
}
-int sysprof_error(lua_State *L, int status)
+static int sysprof_error(lua_State *L, int status)
{
switch (status) {
case PROFILE_ERRUSE:
--
2.35.1
More information about the Tarantool-patches
mailing list