aboutsummaryrefslogtreecommitdiff
path: root/src/except.c
diff options
context:
space:
mode:
authorDiego Nehab <diego.nehab@gmail.com>2015-08-21 15:39:34 -0300
committerDiego Nehab <diego.nehab@gmail.com>2015-08-21 15:39:34 -0300
commite75444ccd1f30a3b5fbc7cec4a85e831bd0560ed (patch)
tree71475c18fee070c770fc0fe25d0859b7d54c8fbb /src/except.c
parent321c0c9b1f7b6b83cd83b58e7e259f53eca69373 (diff)
downloadluasocket-e75444ccd1f30a3b5fbc7cec4a85e831bd0560ed.tar.gz
luasocket-e75444ccd1f30a3b5fbc7cec4a85e831bd0560ed.tar.bz2
luasocket-e75444ccd1f30a3b5fbc7cec4a85e831bd0560ed.zip
New compat.h module implements luaL_setfuncs.
Makes initialization code simpler everywhere.
Diffstat (limited to 'src/except.c')
-rw-r--r--src/except.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/except.c b/src/except.c
index 4faa208..261ac98 100644
--- a/src/except.c
+++ b/src/except.c
@@ -6,6 +6,7 @@
6 6
7#include "lua.h" 7#include "lua.h"
8#include "lauxlib.h" 8#include "lauxlib.h"
9#include "compat.h"
9 10
10#include "except.h" 11#include "except.h"
11 12
@@ -117,10 +118,6 @@ static int global_protect(lua_State *L) {
117* Init module 118* Init module
118\*-------------------------------------------------------------------------*/ 119\*-------------------------------------------------------------------------*/
119int except_open(lua_State *L) { 120int except_open(lua_State *L) {
120#if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE)
121 luaL_setfuncs(L, func, 0); 121 luaL_setfuncs(L, func, 0);
122#else
123 luaL_openlib(L, NULL, func, 0);
124#endif
125 return 0; 122 return 0;
126} 123}