From be666a662b79e12c300dbf6d74d0a6626acac06f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 25 Aug 2005 16:55:38 -0300 Subject: detail --- lua.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lua.c') diff --git a/lua.c b/lua.c index 40da9b16..28975968 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.146 2005/06/28 13:01:50 roberto Exp roberto $ +** $Id: lua.c,v 1.147 2005/08/25 15:39:16 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -137,8 +137,7 @@ static int dolibrary (lua_State *L, const char *name) { static const char *get_prompt (lua_State *L, int firstline) { const char *p; - lua_pushstring(L, firstline ? "_PROMPT" : "_PROMPT2"); - lua_rawget(L, LUA_GLOBALSINDEX); + lua_getfield(L, LUA_GLOBALSINDEX, firstline ? "_PROMPT" : "_PROMPT2"); p = lua_tostring(L, -1); if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2); lua_pop(L, 1); /* remove global */ -- cgit v1.2.3-55-g6feb