aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/hashes.c
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-09-16 21:56:18 +0200
committerKim Alvefur <zash@zash.se>2014-09-16 21:56:18 +0200
commitc57e98cd7debd8d8ea46159cbbf2eb7597544d4c (patch)
tree7a2f8f679b522db52d967a34eb806b8f73ba59c4 /util-src/hashes.c
parenta685dfb89e5c8895a767011961d2289810b72a1e (diff)
downloadprosody-c57e98cd7debd8d8ea46159cbbf2eb7597544d4c.tar.gz
prosody-c57e98cd7debd8d8ea46159cbbf2eb7597544d4c.zip
util-src/*.c: Don't create globals when loaded
Diffstat (limited to 'util-src/hashes.c')
-rw-r--r--util-src/hashes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util-src/hashes.c b/util-src/hashes.c
index 33041e83..7ca00867 100644
--- a/util-src/hashes.c
+++ b/util-src/hashes.c
@@ -203,7 +203,8 @@ static const luaL_Reg Reg[] =
LUALIB_API int luaopen_util_hashes(lua_State *L)
{
- luaL_register(L, "hashes", Reg);
+ lua_newtable(L);
+ luaL_register(L, NULL, Reg);
lua_pushliteral(L, "version"); /** version */
lua_pushliteral(L, "-3.14");
lua_settable(L,-3);