aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/strbitop.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-src/strbitop.c')
-rw-r--r--util-src/strbitop.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/util-src/strbitop.c b/util-src/strbitop.c
index 89fce661..75cfea81 100644
--- a/util-src/strbitop.c
+++ b/util-src/strbitop.c
@@ -8,13 +8,10 @@
#include <lua.h>
#include <lauxlib.h>
-#if (LUA_VERSION_NUM == 501)
-#define luaL_setfuncs(L, R, N) luaL_register(L, NULL, R)
-#endif
/* 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 +32,7 @@ int strop_and(lua_State *L) {
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 +53,7 @@ int strop_or(lua_State *L) {
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);
@@ -77,7 +74,7 @@ int strop_xor(lua_State *L) {
return 1;
}
-LUA_API int luaopen_util_strbitop(lua_State *L) {
+LUA_API int luaopen_prosody_util_strbitop(lua_State *L) {
luaL_Reg exports[] = {
{ "sand", strop_and },
{ "sor", strop_or },
@@ -89,3 +86,7 @@ LUA_API int luaopen_util_strbitop(lua_State *L) {
luaL_setfuncs(L, exports, 0);
return 1;
}
+
+LUA_API int luaopen_util_strbitop(lua_State *L) {
+ return luaopen_prosody_util_strbitop(L);
+}