diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-29 13:20:48 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-29 13:20:48 -0300 |
commit | e6e543a534832d7bb5680cee9d3b589a69c5e2cc (patch) | |
tree | 934ca8b2d6411cad63174f699857f82875940622 /luaconf.h | |
parent | 1c9c8869741897d67b64a27410f3856d34415e87 (diff) | |
download | lua-e6e543a534832d7bb5680cee9d3b589a69c5e2cc.tar.gz lua-e6e543a534832d7bb5680cee9d3b589a69c5e2cc.tar.bz2 lua-e6e543a534832d7bb5680cee9d3b589a69c5e2cc.zip |
better control for compatibility code
Diffstat (limited to 'luaconf.h')
-rw-r--r-- | luaconf.h | 31 |
1 files changed, 26 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.38 2005/03/21 18:12:07 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.39 2005/03/29 14:30:16 roberto Exp roberto $ |
3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -229,11 +229,32 @@ | |||
229 | 229 | ||
230 | 230 | ||
231 | /* | 231 | /* |
232 | ** CHANGE here (undefining both luaL_getn and luaL_setn) if you want | 232 | @@ LUA_COMPAT_GETN controls compatibility with old getn behavior. |
233 | ** exact compatibility with the behavior of setn/getn in Lua 5.0. | 233 | ** CHANGE it to 1 if you want exact compatibility with the behavior of |
234 | ** setn/getn in Lua 5.0. | ||
234 | */ | 235 | */ |
235 | #define luaL_getn(L,i) lua_objsize(L, i) | 236 | #define LUA_COMPAT_GETN 0 |
236 | #define luaL_setn(L,i,j) ((void)0) /* no op! */ | 237 | |
238 | /* | ||
239 | @@ LUA_COMPAT_PATH controls compatibility about LUA_PATH. | ||
240 | ** CHANGE it to 1 if you want `require' to look for global LUA_PATH | ||
241 | ** before checking package.path. | ||
242 | */ | ||
243 | #define LUA_COMPAT_PATH 0 | ||
244 | |||
245 | /* | ||
246 | @@ LUA_COMPAT_LOADLIB controls compatibility about global loadlib. | ||
247 | ** CHANGE it to 1 if you want a global `loadlib' function (otherwise | ||
248 | ** the function is only available as `package.loadlib'). | ||
249 | */ | ||
250 | #define LUA_COMPAT_LOADLIB 1 | ||
251 | |||
252 | /* | ||
253 | @@ LUA_COMPAT_VARARG controls compatibility with old vararg feature. | ||
254 | ** CHANGE it to 1 if you want vararg functions that do not use `...' | ||
255 | ** to get an `arg' table with their extra arguments. | ||
256 | */ | ||
257 | #define LUA_COMPAT_VARARG 1 | ||
237 | 258 | ||
238 | 259 | ||
239 | /* | 260 | /* |