diff options
Diffstat (limited to 'src/compat.c')
-rw-r--r-- | src/compat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compat.c b/src/compat.c index 1290f70..34ffdaf 100644 --- a/src/compat.c +++ b/src/compat.c | |||
@@ -2,10 +2,11 @@ | |||
2 | #include "compat.h" | 2 | #include "compat.h" |
3 | 3 | ||
4 | #if LUA_VERSION_NUM==501 | 4 | #if LUA_VERSION_NUM==501 |
5 | |||
5 | /* | 6 | /* |
6 | ** Adapted from Lua 5.2 | 7 | ** Adapted from Lua 5.2 |
7 | */ | 8 | */ |
8 | LUASOCKET_PRIVATE void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { | 9 | void luasocket_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { |
9 | luaL_checkstack(L, nup+1, "too many upvalues"); | 10 | luaL_checkstack(L, nup+1, "too many upvalues"); |
10 | for (; l->name != NULL; l++) { /* fill the table with given functions */ | 11 | for (; l->name != NULL; l++) { /* fill the table with given functions */ |
11 | int i; | 12 | int i; |
@@ -21,7 +22,7 @@ LUASOCKET_PRIVATE void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) | |||
21 | /* | 22 | /* |
22 | ** Duplicated from Lua 5.2 | 23 | ** Duplicated from Lua 5.2 |
23 | */ | 24 | */ |
24 | LUASOCKET_PRIVATE void *luaL_testudata (lua_State *L, int ud, const char *tname) { | 25 | void *luasocket_testudata (lua_State *L, int ud, const char *tname) { |
25 | void *p = lua_touserdata(L, ud); | 26 | void *p = lua_touserdata(L, ud); |
26 | if (p != NULL) { /* value is a userdata? */ | 27 | if (p != NULL) { /* value is a userdata? */ |
27 | if (lua_getmetatable(L, ud)) { /* does it have a metatable? */ | 28 | if (lua_getmetatable(L, ud)) { /* does it have a metatable? */ |