Software /
code /
prosody
Diff
util-src/strbitop.c @ 12469:2b3adaa6d38e
util.strbitop: Reduce scope of functions
Equivalent to 'local' in Lua, these functions are exported via the
luaopen_ function, which is the only one needing to be visible outside
of the file.
Pointed out by Link Mauve at some point, but there wasn't really any
rush here.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 23 Apr 2022 14:29:43 +0200 |
parent | 11175:235537247aa3 |
child | 12575:1f6f05a98fcd |
line wrap: on
line diff
--- a/util-src/strbitop.c Wed Apr 20 22:41:54 2022 +0200 +++ b/util-src/strbitop.c Sat Apr 23 14:29:43 2022 +0200 @@ -14,7 +14,7 @@ /* TODO Deduplicate code somehow */ -int strop_and(lua_State *L) { +static int strop_and(lua_State *L) { luaL_Buffer buf; size_t a, b, i; const char *str_a = luaL_checklstring(L, 1, &a); @@ -35,7 +35,7 @@ return 1; } -int strop_or(lua_State *L) { +static int strop_or(lua_State *L) { luaL_Buffer buf; size_t a, b, i; const char *str_a = luaL_checklstring(L, 1, &a); @@ -56,7 +56,7 @@ return 1; } -int strop_xor(lua_State *L) { +static int strop_xor(lua_State *L) { luaL_Buffer buf; size_t a, b, i; const char *str_a = luaL_checklstring(L, 1, &a);