diff --git a/lapi.c b/lapi.c index 5a3b0d26..2bcabed0 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.15 1997/12/18 18:32:39 roberto Exp roberto $ +** $Id: lapi.c,v 1.16 1997/12/22 17:52:20 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -580,7 +580,7 @@ lua_Object lua_getref (int ref) -#if LUA_COMPAT2_5 +#ifdef LUA_COMPAT2_5 /* ** API: set a function as a fallback */ diff --git a/lbuiltin.c b/lbuiltin.c index 2a2ed4d8..0acb19cb 100644 --- a/lbuiltin.c +++ b/lbuiltin.c @@ -1,5 +1,5 @@ /* -** $Id: lbuiltin.c,v 1.19 1997/12/18 18:32:39 roberto Exp roberto $ +** $Id: lbuiltin.c,v 1.20 1997/12/30 17:57:45 roberto Exp roberto $ ** Built-in functions ** See Copyright Notice in lua.h */ @@ -464,7 +464,7 @@ static void testC (void) ** Internal functions */ static struct luaL_reg int_funcs[] = { -#if LUA_COMPAT2_5 +#ifdef LUA_COMPAT2_5 {"setfallback", luaT_setfallback}, #endif #ifdef DEBUG diff --git a/ltm.c b/ltm.c index 6cda2973..3c788f41 100644 --- a/ltm.c +++ b/ltm.c @@ -1,5 +1,5 @@ /* -** $Id: ltm.c,v 1.11 1997/12/11 17:21:11 roberto Exp roberto $ +** $Id: ltm.c,v 1.12 1997/12/15 16:17:20 roberto Exp roberto $ ** Tag methods ** See Copyright Notice in lua.h */ @@ -174,7 +174,7 @@ char *luaT_travtagmethods (int (*fn)(TObject *)) * =================================================================== * compatibility with old fallback system */ -#if LUA_COMPAT2_5 +#ifdef LUA_COMPAT2_5 #include "lapi.h" diff --git a/lua.h b/lua.h index bb9b65dd..58e776f6 100644 --- a/lua.h +++ b/lua.h @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.11 1997/12/15 17:47:55 roberto Exp roberto $ +** $Id: lua.h,v 1.12 1997/12/18 18:32:39 roberto Exp roberto $ ** Lua - An Extensible Extension Language ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil ** e-mail: lua@tecgraf.puc-rio.br @@ -146,15 +146,11 @@ long lua_collectgarbage (long limit); /* ========================================================================== ** for compatibility with old versions. Avoid using these macros/functions -** If your program does not use any of these, define LUA_COMPAT2_5 to 0 +** If your program does need any of these, define LUA_COMPAT2_5 */ -#ifndef LUA_COMPAT2_5 -#define LUA_COMPAT2_5 1 -#endif - -#if LUA_COMPAT2_5 +#ifdef LUA_COMPAT2_5 lua_Object lua_setfallback (char *event, lua_CFunction fallback); diff --git a/makefile b/makefile index 5a9e3aa6..fbf4939a 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,5 @@ # -## $Id: makefile,v 1.7 1997/12/17 20:48:58 roberto Exp roberto $ +## $Id: makefile,v 1.8 1997/12/23 19:24:36 roberto Exp roberto $ ## Makefile ## See Copyright Notice in lua.h # @@ -15,11 +15,11 @@ # facilities ("strerror" and "locale.h"). Although they are ANSI, # SunOS does not comply; so, add "-DOLD_ANSI" on SunOS # -# define LUA_COMPAT2_5=0 if yous system does not need to be compatible with +# define LUA_COMPAT2_5 if yous system does need to be compatible with # version 2.5 (or older) -CONFIG = -DPOPEN -D_POSIX_SOURCE -DLUA_COMPAT2_5=0 -#CONFIG = -DLUA_COMPAT2_5=0 -DOLD_ANSI -DDEBUG +CONFIG = -DPOPEN -D_POSIX_SOURCE +#CONFIG = -DLUA_COMPAT2_5 -DOLD_ANSI -DDEBUG # Compilation parameters