diff options
| -rw-r--r-- | lua.c | 5 | ||||
| -rw-r--r-- | luaconf.h | 4 |
2 files changed, 4 insertions, 5 deletions
| @@ -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 | ||
| 138 | static const char *get_prompt (lua_State *L, int firstline) { | 138 | static 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 */ |
| @@ -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 |
