diff options
author | Mike Pall <mike> | 2017-03-30 11:40:49 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2017-03-30 11:40:49 +0200 |
commit | dc320ca70f2c5bb3977b82853bcee6dad2523d01 (patch) | |
tree | ca0e9eaa1143b8d0d62d2489db8021d0c21f647f /src | |
parent | c29afcb1a3f633fd970cf893d261d7f53728bc69 (diff) | |
download | luajit-dc320ca70f2c5bb3977b82853bcee6dad2523d01.tar.gz luajit-dc320ca70f2c5bb3977b82853bcee6dad2523d01.tar.bz2 luajit-dc320ca70f2c5bb3977b82853bcee6dad2523d01.zip |
Remove old Lua 5.0 compatibility defines.
Suggested by François Perrad.
Diffstat (limited to 'src')
-rw-r--r-- | src/lauxlib.h | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/lauxlib.h b/src/lauxlib.h index fed1491b..91ff4ea9 100644 --- a/src/lauxlib.h +++ b/src/lauxlib.h | |||
@@ -15,9 +15,6 @@ | |||
15 | #include "lua.h" | 15 | #include "lua.h" |
16 | 16 | ||
17 | 17 | ||
18 | #define luaL_getn(L,i) ((int)lua_objlen(L, i)) | ||
19 | #define luaL_setn(L,i,j) ((void)0) /* no op! */ | ||
20 | |||
21 | /* extra error code for `luaL_load' */ | 18 | /* extra error code for `luaL_load' */ |
22 | #define LUA_ERRFILE (LUA_ERRERR+1) | 19 | #define LUA_ERRFILE (LUA_ERRERR+1) |
23 | 20 | ||
@@ -58,6 +55,10 @@ LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...); | |||
58 | LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def, | 55 | LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def, |
59 | const char *const lst[]); | 56 | const char *const lst[]); |
60 | 57 | ||
58 | /* pre-defined references */ | ||
59 | #define LUA_NOREF (-2) | ||
60 | #define LUA_REFNIL (-1) | ||
61 | |||
61 | LUALIB_API int (luaL_ref) (lua_State *L, int t); | 62 | LUALIB_API int (luaL_ref) (lua_State *L, int t); |
62 | LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref); | 63 | LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref); |
63 | 64 | ||
@@ -147,21 +148,4 @@ LUALIB_API void (luaL_pushresult) (luaL_Buffer *B); | |||
147 | 148 | ||
148 | /* }====================================================== */ | 149 | /* }====================================================== */ |
149 | 150 | ||
150 | |||
151 | /* compatibility with ref system */ | ||
152 | |||
153 | /* pre-defined references */ | ||
154 | #define LUA_NOREF (-2) | ||
155 | #define LUA_REFNIL (-1) | ||
156 | |||
157 | #define lua_ref(L,lock) ((lock) ? luaL_ref(L, LUA_REGISTRYINDEX) : \ | ||
158 | (lua_pushstring(L, "unlocked references are obsolete"), lua_error(L), 0)) | ||
159 | |||
160 | #define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref)) | ||
161 | |||
162 | #define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, (ref)) | ||
163 | |||
164 | |||
165 | #define luaL_reg luaL_Reg | ||
166 | |||
167 | #endif | 151 | #endif |