From 1de5587184eb2d8d9f379c661f77f7e450764894 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 12 Jun 2000 10:52:05 -0300 Subject: [PATCH] `lua.h' is included before any other Lua header file --- lapi.c | 5 +++-- lauxlib.c | 5 +++-- lbuffer.c | 4 +++- lbuiltin.c | 5 +++-- lcode.c | 4 +++- ldblib.c | 5 +++-- ldebug.c | 5 +++-- ldo.c | 5 +++-- lfunc.c | 4 +++- lgc.c | 5 +++-- linit.c | 3 ++- liolib.c | 5 +++-- llex.c | 4 +++- lmathlib.c | 5 +++-- lmem.c | 5 +++-- lobject.c | 5 +++-- lparser.c | 4 +++- lref.c | 5 +++-- lstate.c | 4 +++- lstring.c | 5 +++-- lstrlib.c | 5 +++-- ltable.c | 5 +++-- ltests.c | 5 +++-- ltm.c | 4 +++- lua.c | 3 ++- lundump.c | 4 +++- lvm.c | 4 +++- lzio.c | 4 +++- 28 files changed, 82 insertions(+), 44 deletions(-) diff --git a/lapi.c b/lapi.c index 586b9874..291d04c1 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.83 2000/06/06 16:31:41 roberto Exp roberto $ +** $Id: lapi.c,v 1.84 2000/06/08 17:48:31 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -9,6 +9,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lapi.h" #include "lauxlib.h" #include "ldo.h" @@ -21,7 +23,6 @@ #include "lstring.h" #include "ltable.h" #include "ltm.h" -#include "lua.h" #include "lvm.h" diff --git a/lauxlib.c b/lauxlib.c index b9976053..1a057b2d 100644 --- a/lauxlib.c +++ b/lauxlib.c @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.c,v 1.27 2000/03/30 17:19:48 roberto Exp roberto $ +** $Id: lauxlib.c,v 1.28 2000/05/24 13:54:49 roberto Exp roberto $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -16,8 +16,9 @@ #define LUA_REENTRANT -#include "lauxlib.h" #include "lua.h" + +#include "lauxlib.h" #include "luadebug.h" diff --git a/lbuffer.c b/lbuffer.c index 043ed5a3..5361ba75 100644 --- a/lbuffer.c +++ b/lbuffer.c @@ -1,5 +1,5 @@ /* -** $Id: lbuffer.c,v 1.12 2000/03/03 14:58:26 roberto Exp roberto $ +** $Id: lbuffer.c,v 1.13 2000/05/24 13:54:49 roberto Exp roberto $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -9,6 +9,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lauxlib.h" #include "lmem.h" #include "lstate.h" diff --git a/lbuiltin.c b/lbuiltin.c index 6be64092..f7ba5839 100644 --- a/lbuiltin.c +++ b/lbuiltin.c @@ -1,5 +1,5 @@ /* -** $Id: lbuiltin.c,v 1.114 2000/06/06 16:31:41 roberto Exp roberto $ +** $Id: lbuiltin.c,v 1.115 2000/06/08 17:48:31 roberto Exp roberto $ ** Built-in functions ** See Copyright Notice in lua.h */ @@ -21,6 +21,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lapi.h" #include "lauxlib.h" #include "lbuiltin.h" @@ -32,7 +34,6 @@ #include "lstring.h" #include "ltable.h" #include "ltm.h" -#include "lua.h" #include "lundump.h" #include "lvm.h" diff --git a/lcode.c b/lcode.c index 844ceea0..dad9fc8d 100644 --- a/lcode.c +++ b/lcode.c @@ -1,5 +1,5 @@ /* -** $Id: lcode.c,v 1.33 2000/05/24 18:04:17 roberto Exp roberto $ +** $Id: lcode.c,v 1.34 2000/06/05 14:56:18 roberto Exp roberto $ ** Code generator for Lua ** See Copyright Notice in lua.h */ @@ -9,6 +9,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lcode.h" #include "ldo.h" #include "llex.h" diff --git a/ldblib.c b/ldblib.c index 2593ba56..4d7afb57 100644 --- a/ldblib.c +++ b/ldblib.c @@ -1,5 +1,5 @@ /* -** $Id: ldblib.c,v 1.15 2000/05/12 19:49:18 roberto Exp roberto $ +** $Id: ldblib.c,v 1.16 2000/05/24 13:54:49 roberto Exp roberto $ ** Interface from Lua to its debug API ** See Copyright Notice in lua.h */ @@ -11,8 +11,9 @@ #define LUA_REENTRANT -#include "lauxlib.h" #include "lua.h" + +#include "lauxlib.h" #include "luadebug.h" #include "lualib.h" diff --git a/ldebug.c b/ldebug.c index 470be6dc..6d26029b 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 1.21 2000/05/30 19:00:31 roberto Exp roberto $ +** $Id: ldebug.c,v 1.22 2000/06/08 17:48:31 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -9,6 +9,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lapi.h" #include "lauxlib.h" #include "ldebug.h" @@ -18,7 +20,6 @@ #include "lstate.h" #include "ltable.h" #include "ltm.h" -#include "lua.h" #include "luadebug.h" diff --git a/ldo.c b/ldo.c index 6c4c0ece..2d62c777 100644 --- a/ldo.c +++ b/ldo.c @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 1.76 2000/05/24 13:54:49 roberto Exp roberto $ +** $Id: ldo.c,v 1.77 2000/05/30 19:00:31 roberto Exp roberto $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ @@ -12,6 +12,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lauxlib.h" #include "ldebug.h" #include "ldo.h" @@ -23,7 +25,6 @@ #include "lstring.h" #include "ltable.h" #include "ltm.h" -#include "lua.h" #include "luadebug.h" #include "lundump.h" #include "lvm.h" diff --git a/lfunc.c b/lfunc.c index 8893fa5b..39753bdc 100644 --- a/lfunc.c +++ b/lfunc.c @@ -1,5 +1,5 @@ /* -** $Id: lfunc.c,v 1.22 2000/05/24 13:54:49 roberto Exp roberto $ +** $Id: lfunc.c,v 1.23 2000/05/30 19:00:31 roberto Exp roberto $ ** Auxiliary functions to manipulate prototypes and closures ** See Copyright Notice in lua.h */ @@ -9,6 +9,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lfunc.h" #include "lmem.h" #include "lstate.h" diff --git a/lgc.c b/lgc.c index edb521ed..bc0494f0 100644 --- a/lgc.c +++ b/lgc.c @@ -1,11 +1,13 @@ /* -** $Id: lgc.c,v 1.55 2000/06/05 20:07:53 roberto Exp roberto $ +** $Id: lgc.c,v 1.56 2000/06/08 17:48:31 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ #define LUA_REENTRANT +#include "lua.h" + #include "ldo.h" #include "lfunc.h" #include "lgc.h" @@ -16,7 +18,6 @@ #include "lstring.h" #include "ltable.h" #include "ltm.h" -#include "lua.h" diff --git a/linit.c b/linit.c index a7ce2b32..3e2baeff 100644 --- a/linit.c +++ b/linit.c @@ -1,5 +1,5 @@ /* -** $Id: linit.c,v 1.2 1999/11/22 13:12:07 roberto Exp roberto $ +** $Id: linit.c,v 1.3 1999/12/06 11:43:09 roberto Exp roberto $ ** Initialization of libraries for lua.c ** See Copyright Notice in lua.h */ @@ -7,6 +7,7 @@ #define LUA_REENTRANT #include "lua.h" + #include "lualib.h" diff --git a/liolib.c b/liolib.c index 07406523..b2d24e62 100644 --- a/liolib.c +++ b/liolib.c @@ -1,5 +1,5 @@ /* -** $Id: liolib.c,v 1.65 2000/05/26 19:17:57 roberto Exp roberto $ +** $Id: liolib.c,v 1.66 2000/05/30 18:55:16 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -14,8 +14,9 @@ #define LUA_REENTRANT -#include "lauxlib.h" #include "lua.h" + +#include "lauxlib.h" #include "luadebug.h" #include "lualib.h" diff --git a/llex.c b/llex.c index f4b92b0c..a49358f8 100644 --- a/llex.c +++ b/llex.c @@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 1.61 2000/05/25 18:59:59 roberto Exp roberto $ +** $Id: llex.c,v 1.62 2000/05/26 14:04:04 roberto Exp roberto $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ @@ -11,6 +11,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lauxlib.h" #include "llex.h" #include "lmem.h" diff --git a/lmathlib.c b/lmathlib.c index 8ed5deae..9399e7c0 100644 --- a/lmathlib.c +++ b/lmathlib.c @@ -1,5 +1,5 @@ /* -** $Id: lmathlib.c,v 1.23 1999/12/27 17:33:22 roberto Exp roberto $ +** $Id: lmathlib.c,v 1.24 2000/03/10 18:37:44 roberto Exp roberto $ ** Standard mathematical library ** See Copyright Notice in lua.h */ @@ -10,8 +10,9 @@ #define LUA_REENTRANT -#include "lauxlib.h" #include "lua.h" + +#include "lauxlib.h" #include "lualib.h" diff --git a/lmem.c b/lmem.c index 70f2e4e7..b60285a6 100644 --- a/lmem.c +++ b/lmem.c @@ -1,5 +1,5 @@ /* -** $Id: lmem.c,v 1.31 2000/05/29 14:48:03 roberto Exp roberto $ +** $Id: lmem.c,v 1.32 2000/05/31 16:53:30 roberto Exp roberto $ ** Interface to Memory Manager ** See Copyright Notice in lua.h */ @@ -9,10 +9,11 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lmem.h" #include "lobject.h" #include "lstate.h" -#include "lua.h" /* diff --git a/lobject.c b/lobject.c index 26a6855e..d500fd1c 100644 --- a/lobject.c +++ b/lobject.c @@ -1,5 +1,5 @@ /* -** $Id: lobject.c,v 1.39 2000/05/24 13:54:49 roberto Exp roberto $ +** $Id: lobject.c,v 1.40 2000/06/08 17:48:31 roberto Exp roberto $ ** Some generic functions over Lua objects ** See Copyright Notice in lua.h */ @@ -9,9 +9,10 @@ #define LUA_REENTRANT -#include "lobject.h" #include "lua.h" +#include "lobject.h" + const char *const luaO_typenames[] = { /* ORDER LUA_T */ "userdata", "number", "string", "table", "function", "function", "nil", diff --git a/lparser.c b/lparser.c index 4e0962be..daa796b6 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 1.93 2000/05/30 19:00:31 roberto Exp roberto $ +** $Id: lparser.c,v 1.94 2000/06/05 14:56:18 roberto Exp roberto $ ** LL(1) Parser and code generator for Lua ** See Copyright Notice in lua.h */ @@ -10,6 +10,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lcode.h" #include "lfunc.h" #include "llex.h" diff --git a/lref.c b/lref.c index 42ee5eda..97072843 100644 --- a/lref.c +++ b/lref.c @@ -1,5 +1,5 @@ /* -** $Id: lref.c,v 1.12 2000/05/24 13:54:49 roberto Exp roberto $ +** $Id: lref.c,v 1.13 2000/06/08 17:48:31 roberto Exp roberto $ ** reference mechanism ** See Copyright Notice in lua.h */ @@ -7,11 +7,12 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lapi.h" #include "lmem.h" #include "lref.h" #include "lstate.h" -#include "lua.h" int lua_ref (lua_State *L, int lock) { diff --git a/lstate.c b/lstate.c index 7ba9bcff..24df5d4b 100644 --- a/lstate.c +++ b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 1.25 2000/03/31 16:28:45 roberto Exp roberto $ +** $Id: lstate.c,v 1.26 2000/05/08 19:32:53 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -9,6 +9,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lauxlib.h" #include "lbuiltin.h" #include "ldo.h" diff --git a/lstring.c b/lstring.c index ebae208a..c265d3d4 100644 --- a/lstring.c +++ b/lstring.c @@ -1,5 +1,5 @@ /* -** $Id: lstring.c,v 1.36 2000/05/10 16:33:20 roberto Exp roberto $ +** $Id: lstring.c,v 1.37 2000/05/24 13:54:49 roberto Exp roberto $ ** String table (keeps all strings handled by Lua) ** See Copyright Notice in lua.h */ @@ -9,11 +9,12 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lmem.h" #include "lobject.h" #include "lstate.h" #include "lstring.h" -#include "lua.h" diff --git a/lstrlib.c b/lstrlib.c index da75bbd7..5935d826 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.42 2000/05/02 18:32:22 roberto Exp roberto $ +** $Id: lstrlib.c,v 1.43 2000/05/24 13:54:49 roberto Exp roberto $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -13,8 +13,9 @@ #define LUA_REENTRANT -#include "lauxlib.h" #include "lua.h" + +#include "lauxlib.h" #include "lualib.h" diff --git a/ltable.c b/ltable.c index 2e88a894..535326e3 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 1.46 2000/06/06 16:31:41 roberto Exp roberto $ +** $Id: ltable.c,v 1.47 2000/06/08 17:48:31 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -20,13 +20,14 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lauxlib.h" #include "lmem.h" #include "lobject.h" #include "lstate.h" #include "lstring.h" #include "ltable.h" -#include "lua.h" #define gcsize(L, n) numblocks(L, n*2, sizeof(Hash)) diff --git a/ltests.c b/ltests.c index c7e2ad55..4a071fae 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 1.23 2000/06/02 19:10:01 roberto Exp roberto $ +** $Id: ltests.c,v 1.24 2000/06/08 17:48:31 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -11,6 +11,8 @@ #include +#include "lua.h" + #include "lapi.h" #include "lauxlib.h" #include "lcode.h" @@ -20,7 +22,6 @@ #include "lstate.h" #include "lstring.h" #include "ltable.h" -#include "lua.h" #include "luadebug.h" diff --git a/ltm.c b/ltm.c index 1fdff400..c2bd04fc 100644 --- a/ltm.c +++ b/ltm.c @@ -1,5 +1,5 @@ /* -** $Id: ltm.c,v 1.41 2000/05/30 18:54:49 roberto Exp roberto $ +** $Id: ltm.c,v 1.42 2000/06/08 17:48:31 roberto Exp roberto $ ** Tag methods ** See Copyright Notice in lua.h */ @@ -10,6 +10,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lauxlib.h" #include "lmem.h" #include "lobject.h" diff --git a/lua.c b/lua.c index fadc3688..8c4ef826 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.37 2000/04/14 17:46:29 roberto Exp roberto $ +** $Id: lua.c,v 1.38 2000/05/10 17:00:21 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -11,6 +11,7 @@ #include #include "lua.h" + #include "luadebug.h" #include "lualib.h" diff --git a/lundump.c b/lundump.c index 11ada16d..97ceccaf 100644 --- a/lundump.c +++ b/lundump.c @@ -1,5 +1,5 @@ /* -** $Id: lundump.c,v 1.20 2000/04/25 16:44:31 roberto Exp roberto $ +** $Id: lundump.c,v 1.21 2000/05/08 19:32:53 roberto Exp roberto $ ** load bytecodes from files ** See Copyright Notice in lua.h */ @@ -9,6 +9,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lauxlib.h" #include "lfunc.h" #include "lmem.h" diff --git a/lvm.c b/lvm.c index 9e57fb59..c15385a4 100644 --- a/lvm.c +++ b/lvm.c @@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 1.113 2000/06/06 16:31:41 roberto Exp roberto $ +** $Id: lvm.c,v 1.114 2000/06/08 17:48:31 roberto Exp roberto $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -11,6 +11,8 @@ #define LUA_REENTRANT +#include "lua.h" + #include "lapi.h" #include "lauxlib.h" #include "ldebug.h" diff --git a/lzio.c b/lzio.c index cecd16a1..c523ece5 100644 --- a/lzio.c +++ b/lzio.c @@ -1,5 +1,5 @@ /* -** $Id: lzio.c,v 1.11 2000/03/03 14:58:26 roberto Exp roberto $ +** $Id: lzio.c,v 1.12 2000/05/24 13:54:49 roberto Exp roberto $ ** a generic input stream interface ** See Copyright Notice in lua.h */ @@ -9,6 +9,8 @@ #include #include +#include "lua.h" + #include "lzio.h"