detail (changing some names of macros)
This commit is contained in:
14
lua.c
14
lua.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lua.c,v 1.205 2012/05/23 15:37:09 roberto Exp roberto $
|
||||
** $Id: lua.c,v 1.206 2012/09/29 20:07:06 roberto Exp roberto $
|
||||
** Lua stand-alone interpreter
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -31,12 +31,12 @@
|
||||
#define LUA_MAXINPUT 512
|
||||
#endif
|
||||
|
||||
#if !defined(LUA_INIT)
|
||||
#define LUA_INIT "LUA_INIT"
|
||||
#if !defined(LUA_INIT_VAR)
|
||||
#define LUA_INIT_VAR "LUA_INIT"
|
||||
#endif
|
||||
|
||||
#define LUA_INITVERSION \
|
||||
LUA_INIT "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR
|
||||
#define LUA_INITVARVERSION \
|
||||
LUA_INIT_VAR "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR
|
||||
|
||||
|
||||
/*
|
||||
@@ -421,10 +421,10 @@ static int runargs (lua_State *L, char **argv, int n) {
|
||||
|
||||
|
||||
static int handle_luainit (lua_State *L) {
|
||||
const char *name = "=" LUA_INITVERSION;
|
||||
const char *name = "=" LUA_INITVARVERSION;
|
||||
const char *init = getenv(name + 1);
|
||||
if (init == NULL) {
|
||||
name = "=" LUA_INIT;
|
||||
name = "=" LUA_INIT_VAR;
|
||||
init = getenv(name + 1); /* try alternative name */
|
||||
}
|
||||
if (init == NULL) return LUA_OK;
|
||||
|
||||
Reference in New Issue
Block a user