diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-07-11 14:50:31 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-07-11 14:50:31 -0300 |
| commit | 6b8725b0eec4379ec810727cc1dccae6feeff21e (patch) | |
| tree | cfd6f09122a98e90c0fd67eac4908a3d95475b49 | |
| parent | 6955666290c7fd1e74126679441686223804ce06 (diff) | |
| download | lua-6b8725b0eec4379ec810727cc1dccae6feeff21e.tar.gz lua-6b8725b0eec4379ec810727cc1dccae6feeff21e.tar.bz2 lua-6b8725b0eec4379ec810727cc1dccae6feeff21e.zip | |
new macro LUA_COMPAT to control some compatibility macros
| -rw-r--r-- | lua.h | 4 | ||||
| -rw-r--r-- | luaconf.h | 10 |
2 files changed, 12 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.227 2008/02/11 19:16:02 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.228 2008/05/09 16:51:44 roberto Exp roberto $ |
| 3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
| 4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) | 4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) |
| 5 | ** See Copyright Notice at the end of this file | 5 | ** See Copyright Notice at the end of this file |
| @@ -282,6 +282,7 @@ LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud); | |||
| 282 | /* | 282 | /* |
| 283 | ** compatibility macros and functions | 283 | ** compatibility macros and functions |
| 284 | */ | 284 | */ |
| 285 | #if defined(LUA_COMPAT) | ||
| 285 | 286 | ||
| 286 | #define lua_strlen(L,i) lua_objlen(L, (i)) | 287 | #define lua_strlen(L,i) lua_objlen(L, (i)) |
| 287 | 288 | ||
| @@ -294,6 +295,7 @@ LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud); | |||
| 294 | #define lua_Chunkreader lua_Reader | 295 | #define lua_Chunkreader lua_Reader |
| 295 | #define lua_Chunkwriter lua_Writer | 296 | #define lua_Chunkwriter lua_Writer |
| 296 | 297 | ||
| 298 | #endif | ||
| 297 | 299 | ||
| 298 | 300 | ||
| 299 | /* | 301 | /* |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.97 2008/04/07 18:58:42 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.98 2008/06/25 15:27:12 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 | */ |
| @@ -324,6 +324,14 @@ | |||
| 324 | 324 | ||
| 325 | 325 | ||
| 326 | /* | 326 | /* |
| 327 | @@ LUA_COMPAT includes some macros and functions that supply some | ||
| 328 | @* compatibility with previous versions. | ||
| 329 | ** CHANGE it (undefine it) if you do not need these compatibility facilities. | ||
| 330 | */ | ||
| 331 | #define LUA_COMPAT | ||
| 332 | |||
| 333 | |||
| 334 | /* | ||
| 327 | @@ LUA_COMPAT_VARARG controls compatibility with old vararg feature. | 335 | @@ LUA_COMPAT_VARARG controls compatibility with old vararg feature. |
| 328 | ** CHANGE it to undefined as soon as your programs use only '...' to | 336 | ** CHANGE it to undefined as soon as your programs use only '...' to |
| 329 | ** access vararg parameters (instead of the old 'arg' table). | 337 | ** access vararg parameters (instead of the old 'arg' table). |
