# HG changeset patch # User Kim Alvefur # Date 1650716983 -7200 # Node ID 2b3adaa6d38e672f87df142c38bf4228c11efe96 # Parent 3538366840095ee091d0b416c453b42c5a679de5 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. diff -r 353836684009 -r 2b3adaa6d38e util-src/strbitop.c --- 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);