Software /
code /
prosody
Comparison
util-src/signal.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 | 3284:867d6413fe0a |
child | 6412:0e94f89d0e62 |
comparison
equal
deleted
inserted
replaced
6407:4bbd198cf3e6 | 6411:6c8f6364bc48 |
---|---|
382 int luaopen_util_signal(lua_State *L) | 382 int luaopen_util_signal(lua_State *L) |
383 { | 383 { |
384 int i = 0; | 384 int i = 0; |
385 | 385 |
386 /* add the library */ | 386 /* add the library */ |
387 luaL_register(L, "signal", lsignal_lib); | 387 lua_newtable(L); |
388 luaL_register(L, NULL, lsignal_lib); | |
388 | 389 |
389 /* push lua_signals table into the registry */ | 390 /* push lua_signals table into the registry */ |
390 /* put the signals inside the library table too, | 391 /* put the signals inside the library table too, |
391 * they are only a reference */ | 392 * they are only a reference */ |
392 lua_pushstring(L, LUA_SIGNAL); | 393 lua_pushstring(L, LUA_SIGNAL); |