diff options
-rw-r--r-- | lua.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.c,v 1.177 2009/12/11 13:40:44 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.178 2009/12/17 12:26:09 roberto Exp roberto $ |
3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -31,8 +31,8 @@ | |||
31 | #define LUA_MAXINPUT 512 | 31 | #define LUA_MAXINPUT 512 |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #if !defined(LUA_INIT) | 34 | #if !defined(LUA_INIT_VAR) |
35 | #define LUA_INIT "LUA_INIT" | 35 | #define LUA_INIT_VAR "LUA_INIT" |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | 38 | ||
@@ -394,12 +394,12 @@ static int runargs (lua_State *L, char **argv, int n) { | |||
394 | 394 | ||
395 | 395 | ||
396 | static int handle_luainit (lua_State *L) { | 396 | static int handle_luainit (lua_State *L) { |
397 | const char *init = getenv(LUA_INIT); | 397 | const char *init = getenv(LUA_INIT_VAR); |
398 | if (init == NULL) return LUA_OK; | 398 | if (init == NULL) return LUA_OK; |
399 | else if (init[0] == '@') | 399 | else if (init[0] == '@') |
400 | return dofile(L, init+1); | 400 | return dofile(L, init+1); |
401 | else | 401 | else |
402 | return dostring(L, init, "=" LUA_INIT); | 402 | return dostring(L, init, "=" LUA_INIT_VAR); |
403 | } | 403 | } |
404 | 404 | ||
405 | 405 | ||