From 100adecab2dbbb8cc6e1def4c39c13ddb7c210aa Mon Sep 17 00:00:00 2001 From: peterzhb Date: Mon, 3 Apr 2017 10:56:13 -0400 Subject: [PATCH] add lua5.2 compatibility --- lsignal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lsignal.c b/lsignal.c index eb95a71..4fed090 100644 --- a/lsignal.c +++ b/lsignal.c @@ -344,6 +344,12 @@ int luaopen_signal(lua_State *L) int i = 0; /* add the library */ + // lua5.2 +// lua_newtable(L); +// luaL_setfuncs(L, lsignal_lib, 0); +// lua_pushvalue(L, -1); +// lua_setglobal(L, "signal"); + // lua5.1 luaL_register(L, "signal", lsignal_lib); /* push lua_signals table into the registry */