aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-08-25 16:55:38 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-08-25 16:55:38 -0300
commitbe666a662b79e12c300dbf6d74d0a6626acac06f (patch)
tree249086c6ea347aa389b2302ae188dd8a3ed3263a
parent39cdbce23edfd443699e396900a70de3fcff46c7 (diff)
downloadlua-be666a662b79e12c300dbf6d74d0a6626acac06f.tar.gz
lua-be666a662b79e12c300dbf6d74d0a6626acac06f.tar.bz2
lua-be666a662b79e12c300dbf6d74d0a6626acac06f.zip
detail
-rw-r--r--lua.c5
-rw-r--r--luaconf.h4
2 files changed, 4 insertions, 5 deletions
diff --git a/lua.c b/lua.c
index 40da9b16..28975968 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.146 2005/06/28 13:01:50 roberto Exp roberto $ 2** $Id: lua.c,v 1.147 2005/08/25 15:39:16 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*/
@@ -137,8 +137,7 @@ static int dolibrary (lua_State *L, const char *name) {
137 137
138static const char *get_prompt (lua_State *L, int firstline) { 138static const char *get_prompt (lua_State *L, int firstline) {
139 const char *p; 139 const char *p;
140 lua_pushstring(L, firstline ? "_PROMPT" : "_PROMPT2"); 140 lua_getfield(L, LUA_GLOBALSINDEX, firstline ? "_PROMPT" : "_PROMPT2");
141 lua_rawget(L, LUA_GLOBALSINDEX);
142 p = lua_tostring(L, -1); 141 p = lua_tostring(L, -1);
143 if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2); 142 if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2);
144 lua_pop(L, 1); /* remove global */ 143 lua_pop(L, 1); /* remove global */
diff --git a/luaconf.h b/luaconf.h
index 8a57dddd..fc5c2db0 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.60 2005/08/17 18:32:09 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.61 2005/08/22 19:58:29 roberto Exp roberto $
3** Configuration file for Lua 3** Configuration file for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -631,7 +631,7 @@ union luai_Cast { double l_d; long l_l; };
631#else 631#else
632 632
633#define lua_popen(L,c,m) \ 633#define lua_popen(L,c,m) \
634 ((void)c, (void)m, luaL_error(L, LUA_QL("popen") "not supported"), NULL) 634 ((void)c, (void)m, luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0)
635#define lua_pclose(L,file) ((void)file, 0) 635#define lua_pclose(L,file) ((void)file, 0)
636 636
637#endif 637#endif