aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-01-02 15:46:32 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-01-02 15:46:32 -0200
commit964c503a63af6df00cb3dfca0283be61655b535e (patch)
tree70d2da360649261c439f2564c8c9fa1a896ce1ab
parent90d87e3a78e567f3db307d2c90a63386c881c68d (diff)
downloadlua-964c503a63af6df00cb3dfca0283be61655b535e.tar.gz
lua-964c503a63af6df00cb3dfca0283be61655b535e.tar.bz2
lua-964c503a63af6df00cb3dfca0283be61655b535e.zip
LUA_COMPAT2.5 may use #ifdef instead of #if
-rw-r--r--lapi.c4
-rw-r--r--lbuiltin.c4
-rw-r--r--ltm.c4
-rw-r--r--lua.h10
-rw-r--r--makefile8
5 files changed, 13 insertions, 17 deletions
diff --git a/lapi.c b/lapi.c
index 5a3b0d26..2bcabed0 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 1.15 1997/12/18 18:32:39 roberto Exp roberto $ 2** $Id: lapi.c,v 1.16 1997/12/22 17:52:20 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -580,7 +580,7 @@ lua_Object lua_getref (int ref)
580 580
581 581
582 582
583#if LUA_COMPAT2_5 583#ifdef LUA_COMPAT2_5
584/* 584/*
585** API: set a function as a fallback 585** API: set a function as a fallback
586*/ 586*/
diff --git a/lbuiltin.c b/lbuiltin.c
index 2a2ed4d8..0acb19cb 100644
--- a/lbuiltin.c
+++ b/lbuiltin.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbuiltin.c,v 1.19 1997/12/18 18:32:39 roberto Exp roberto $ 2** $Id: lbuiltin.c,v 1.20 1997/12/30 17:57:45 roberto Exp roberto $
3** Built-in functions 3** Built-in functions
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -464,7 +464,7 @@ static void testC (void)
464** Internal functions 464** Internal functions
465*/ 465*/
466static struct luaL_reg int_funcs[] = { 466static struct luaL_reg int_funcs[] = {
467#if LUA_COMPAT2_5 467#ifdef LUA_COMPAT2_5
468 {"setfallback", luaT_setfallback}, 468 {"setfallback", luaT_setfallback},
469#endif 469#endif
470#ifdef DEBUG 470#ifdef DEBUG
diff --git a/ltm.c b/ltm.c
index 6cda2973..3c788f41 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 1.11 1997/12/11 17:21:11 roberto Exp roberto $ 2** $Id: ltm.c,v 1.12 1997/12/15 16:17:20 roberto Exp roberto $
3** Tag methods 3** Tag methods
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -174,7 +174,7 @@ char *luaT_travtagmethods (int (*fn)(TObject *))
174* =================================================================== 174* ===================================================================
175* compatibility with old fallback system 175* compatibility with old fallback system
176*/ 176*/
177#if LUA_COMPAT2_5 177#ifdef LUA_COMPAT2_5
178 178
179#include "lapi.h" 179#include "lapi.h"
180 180
diff --git a/lua.h b/lua.h
index bb9b65dd..58e776f6 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.11 1997/12/15 17:47:55 roberto Exp roberto $ 2** $Id: lua.h,v 1.12 1997/12/18 18:32:39 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil 4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
5** e-mail: lua@tecgraf.puc-rio.br 5** e-mail: lua@tecgraf.puc-rio.br
@@ -146,15 +146,11 @@ long lua_collectgarbage (long limit);
146 146
147/* ========================================================================== 147/* ==========================================================================
148** for compatibility with old versions. Avoid using these macros/functions 148** for compatibility with old versions. Avoid using these macros/functions
149** If your program does not use any of these, define LUA_COMPAT2_5 to 0 149** If your program does need any of these, define LUA_COMPAT2_5
150*/ 150*/
151 151
152#ifndef LUA_COMPAT2_5
153#define LUA_COMPAT2_5 1
154#endif
155
156 152
157#if LUA_COMPAT2_5 153#ifdef LUA_COMPAT2_5
158 154
159 155
160lua_Object lua_setfallback (char *event, lua_CFunction fallback); 156lua_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 @@
1# 1#
2## $Id: makefile,v 1.7 1997/12/17 20:48:58 roberto Exp roberto $ 2## $Id: makefile,v 1.8 1997/12/23 19:24:36 roberto Exp roberto $
3## Makefile 3## Makefile
4## See Copyright Notice in lua.h 4## See Copyright Notice in lua.h
5# 5#
@@ -15,11 +15,11 @@
15# facilities ("strerror" and "locale.h"). Although they are ANSI, 15# facilities ("strerror" and "locale.h"). Although they are ANSI,
16# SunOS does not comply; so, add "-DOLD_ANSI" on SunOS 16# SunOS does not comply; so, add "-DOLD_ANSI" on SunOS
17# 17#
18# define LUA_COMPAT2_5=0 if yous system does not need to be compatible with 18# define LUA_COMPAT2_5 if yous system does need to be compatible with
19# version 2.5 (or older) 19# version 2.5 (or older)
20 20
21CONFIG = -DPOPEN -D_POSIX_SOURCE -DLUA_COMPAT2_5=0 21CONFIG = -DPOPEN -D_POSIX_SOURCE
22#CONFIG = -DLUA_COMPAT2_5=0 -DOLD_ANSI -DDEBUG 22#CONFIG = -DLUA_COMPAT2_5 -DOLD_ANSI -DDEBUG
23 23
24 24
25# Compilation parameters 25# Compilation parameters