LUA_COMPAT2.5 may use #ifdef instead of #if
This commit is contained in:
4
lapi.c
4
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
|
** Lua API
|
||||||
** See Copyright Notice in lua.h
|
** 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
|
** API: set a function as a fallback
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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
|
** Built-in functions
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -464,7 +464,7 @@ static void testC (void)
|
|||||||
** Internal functions
|
** Internal functions
|
||||||
*/
|
*/
|
||||||
static struct luaL_reg int_funcs[] = {
|
static struct luaL_reg int_funcs[] = {
|
||||||
#if LUA_COMPAT2_5
|
#ifdef LUA_COMPAT2_5
|
||||||
{"setfallback", luaT_setfallback},
|
{"setfallback", luaT_setfallback},
|
||||||
#endif
|
#endif
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|||||||
4
ltm.c
4
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
|
** Tag methods
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -174,7 +174,7 @@ char *luaT_travtagmethods (int (*fn)(TObject *))
|
|||||||
* ===================================================================
|
* ===================================================================
|
||||||
* compatibility with old fallback system
|
* compatibility with old fallback system
|
||||||
*/
|
*/
|
||||||
#if LUA_COMPAT2_5
|
#ifdef LUA_COMPAT2_5
|
||||||
|
|
||||||
#include "lapi.h"
|
#include "lapi.h"
|
||||||
|
|
||||||
|
|||||||
10
lua.h
10
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
|
** Lua - An Extensible Extension Language
|
||||||
** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
|
** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
|
||||||
** e-mail: lua@tecgraf.puc-rio.br
|
** 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
|
** 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
|
|
||||||
|
|
||||||
|
#ifdef LUA_COMPAT2_5
|
||||||
#if LUA_COMPAT2_5
|
|
||||||
|
|
||||||
|
|
||||||
lua_Object lua_setfallback (char *event, lua_CFunction fallback);
|
lua_Object lua_setfallback (char *event, lua_CFunction fallback);
|
||||||
|
|||||||
8
makefile
8
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
|
## Makefile
|
||||||
## See Copyright Notice in lua.h
|
## See Copyright Notice in lua.h
|
||||||
#
|
#
|
||||||
@@ -15,11 +15,11 @@
|
|||||||
# facilities ("strerror" and "locale.h"). Although they are ANSI,
|
# facilities ("strerror" and "locale.h"). Although they are ANSI,
|
||||||
# SunOS does not comply; so, add "-DOLD_ANSI" on SunOS
|
# 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)
|
# version 2.5 (or older)
|
||||||
|
|
||||||
CONFIG = -DPOPEN -D_POSIX_SOURCE -DLUA_COMPAT2_5=0
|
CONFIG = -DPOPEN -D_POSIX_SOURCE
|
||||||
#CONFIG = -DLUA_COMPAT2_5=0 -DOLD_ANSI -DDEBUG
|
#CONFIG = -DLUA_COMPAT2_5 -DOLD_ANSI -DDEBUG
|
||||||
|
|
||||||
|
|
||||||
# Compilation parameters
|
# Compilation parameters
|
||||||
|
|||||||
Reference in New Issue
Block a user