Software /
code /
prosody
Diff
util-src/hashes.c @ 6411:6c8f6364bc48
util-src/*.c: Don't create globals when loaded
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 16 Sep 2014 21:56:18 +0200 |
parent | 5774:6ef79af0c445 |
child | 6412:0e94f89d0e62 |
line wrap: on
line diff
--- a/util-src/hashes.c Thu Sep 11 00:55:51 2014 +0200 +++ b/util-src/hashes.c Tue Sep 16 21:56:18 2014 +0200 @@ -203,7 +203,8 @@ 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);