mirror of
https://github.com/lua/lua
synced 2025-04-16 01:42:48 +03:00
macro name change: LUA_INIT->LUA_INIT_VAR
This commit is contained in:
parent
2108754e46
commit
adc6a4865b
10
lua.c
10
lua.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lua.c,v 1.177 2009/12/11 13:40:44 roberto Exp roberto $
|
** $Id: lua.c,v 1.178 2009/12/17 12:26:09 roberto Exp roberto $
|
||||||
** Lua stand-alone interpreter
|
** Lua stand-alone interpreter
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -31,8 +31,8 @@
|
|||||||
#define LUA_MAXINPUT 512
|
#define LUA_MAXINPUT 512
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LUA_INIT)
|
#if !defined(LUA_INIT_VAR)
|
||||||
#define LUA_INIT "LUA_INIT"
|
#define LUA_INIT_VAR "LUA_INIT"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -394,12 +394,12 @@ static int runargs (lua_State *L, char **argv, int n) {
|
|||||||
|
|
||||||
|
|
||||||
static int handle_luainit (lua_State *L) {
|
static int handle_luainit (lua_State *L) {
|
||||||
const char *init = getenv(LUA_INIT);
|
const char *init = getenv(LUA_INIT_VAR);
|
||||||
if (init == NULL) return LUA_OK;
|
if (init == NULL) return LUA_OK;
|
||||||
else if (init[0] == '@')
|
else if (init[0] == '@')
|
||||||
return dofile(L, init+1);
|
return dofile(L, init+1);
|
||||||
else
|
else
|
||||||
return dostring(L, init, "=" LUA_INIT);
|
return dostring(L, init, "=" LUA_INIT_VAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user