diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-04-10 15:27:23 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-04-10 15:27:23 -0300 |
commit | 672bb67ee6b3f1c705fca4537824e6190c4a8d57 (patch) | |
tree | b5177e0595a029176a8bcfd21f23dbeb4bcdbb0e /lua.c | |
parent | 90df6b7a542f39281181d39674756aa759bfad07 (diff) | |
download | lua-672bb67ee6b3f1c705fca4537824e6190c4a8d57.tar.gz lua-672bb67ee6b3f1c705fca4537824e6190c4a8d57.tar.bz2 lua-672bb67ee6b3f1c705fca4537824e6190c4a8d57.zip |
environment variable names should be configurable
Diffstat (limited to 'lua.c')
-rw-r--r-- | lua.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.c,v 1.156 2005/12/29 12:30:16 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.157 2005/12/29 16:23:32 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 | */ |
@@ -306,12 +306,12 @@ static int runargs (lua_State *L, char **argv, int n) { | |||
306 | 306 | ||
307 | 307 | ||
308 | static int handle_luainit (lua_State *L) { | 308 | static int handle_luainit (lua_State *L) { |
309 | const char *init = getenv("LUA_INIT"); | 309 | const char *init = getenv(LUA_INIT); |
310 | if (init == NULL) return 0; /* status OK */ | 310 | if (init == NULL) return 0; /* status OK */ |
311 | else if (init[0] == '@') | 311 | else if (init[0] == '@') |
312 | return dofile(L, init+1); | 312 | return dofile(L, init+1); |
313 | else | 313 | else |
314 | return dostring(L, init, "=LUA_INIT"); | 314 | return dostring(L, init, "=" LUA_INIT); |
315 | } | 315 | } |
316 | 316 | ||
317 | 317 | ||