summaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-04-10 15:27:23 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-04-10 15:27:23 -0300
commit672bb67ee6b3f1c705fca4537824e6190c4a8d57 (patch)
treeb5177e0595a029176a8bcfd21f23dbeb4bcdbb0e /lua.c
parent90df6b7a542f39281181d39674756aa759bfad07 (diff)
downloadlua-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lua.c b/lua.c
index 964ecdb0..a6405f6a 100644
--- a/lua.c
+++ b/lua.c
@@ -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
308static int handle_luainit (lua_State *L) { 308static 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