From ff3b4a35446ad4ef5b0d7e6b04d1aa481cbb21cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Thomas?= Date: Tue, 5 Aug 2008 14:26:28 +0000 Subject: [PATCH] Minimize (textual) differences with standard Lua and Lualong (removing extra white space, etc). --- src/lua/lauxlib.c | 3 +++ src/lua/linit.c | 1 + src/lua/lstate.c | 1 + src/lua/lua.c | 1 + src/lua/lua.h | 2 ++ 5 files changed, 8 insertions(+) diff --git a/src/lua/lauxlib.c b/src/lua/lauxlib.c index 96b01ff9..9d4bb626 100644 --- a/src/lua/lauxlib.c +++ b/src/lua/lauxlib.c @@ -623,6 +623,7 @@ LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s) { /* }====================================================== */ + static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) { (void)ud; (void)osize; @@ -634,6 +635,7 @@ static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) { return realloc(ptr, nsize); } + static int panic (lua_State *L) { (void)L; /* to avoid warnings */ fprintf(stderr, "PANIC: unprotected error in call to Lua API (%s)\n", @@ -647,3 +649,4 @@ LUALIB_API lua_State *luaL_newstate (void) { if (L) lua_atpanic(L, &panic); return L; } + diff --git a/src/lua/linit.c b/src/lua/linit.c index a5f0cf63..527e6749 100644 --- a/src/lua/linit.c +++ b/src/lua/linit.c @@ -39,3 +39,4 @@ LUALIB_API void luaL_openlibs (lua_State *L) { lua_call(L, 1, 0); } } + diff --git a/src/lua/lstate.c b/src/lua/lstate.c index f0db420d..d72d57a1 100644 --- a/src/lua/lstate.c +++ b/src/lua/lstate.c @@ -139,6 +139,7 @@ void luaE_freethread (lua_State *L, lua_State *L1) { luaM_freemem(L, fromstate(L1), state_size(lua_State)); } + LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { int i; lua_State *L; diff --git a/src/lua/lua.c b/src/lua/lua.c index d7755bec..1da3e1ae 100644 --- a/src/lua/lua.c +++ b/src/lua/lua.c @@ -373,6 +373,7 @@ static int pmain (lua_State *L) { return 0; } + int lua_main (int argc, char **argv) { int status; struct Smain s; diff --git a/src/lua/lua.h b/src/lua/lua.h index e1afbf3e..d72a6fab 100644 --- a/src/lua/lua.h +++ b/src/lua/lua.h @@ -12,8 +12,10 @@ #include #include + #include "luaconf.h" + #define LUA_VERSION "Lua 5.1" #define LUA_RELEASE "Lua 5.1.3" #define LUA_VERSION_NUM 501