Software /
code /
prosody
Comparison
util-src/windows.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 | 5864:22b1d18eb919 |
child | 6412:0e94f89d0e62 |
comparison
equal
deleted
inserted
replaced
6407:4bbd198cf3e6 | 6411:6c8f6364bc48 |
---|---|
79 { "set_consolecolor", Lset_consolecolor }, | 79 { "set_consolecolor", Lset_consolecolor }, |
80 { NULL, NULL } | 80 { NULL, NULL } |
81 }; | 81 }; |
82 | 82 |
83 LUALIB_API int luaopen_util_windows(lua_State *L) { | 83 LUALIB_API int luaopen_util_windows(lua_State *L) { |
84 luaL_register(L, "windows", Reg); | 84 lua_newtable(L); |
85 luaL_register(L, NULL, Reg); | |
85 lua_pushliteral(L, "version"); /** version */ | 86 lua_pushliteral(L, "version"); /** version */ |
86 lua_pushliteral(L, "-3.14"); | 87 lua_pushliteral(L, "-3.14"); |
87 lua_settable(L,-3); | 88 lua_settable(L,-3); |
88 return 1; | 89 return 1; |
89 } | 90 } |