From 569eefbf73a6c41b16aa6dc2d4f1c52ebde54084 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 16 Jun 2004 17:22:43 -0300 Subject: [PATCH] detail --- lua.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua.c b/lua.c index cabc5592..112a20cc 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.125 2004/04/30 20:13:38 roberto Exp roberto $ +** $Id: lua.c,v 1.126 2004/05/31 18:51:50 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -143,8 +143,7 @@ static int dostring (const char *s, const char *name) { static int load_file (const char *name) { - lua_pushliteral(L, "require"); - lua_rawget(L, LUA_GLOBALSINDEX); + lua_getglobal(L, "require"); if (!lua_isfunction(L, -1)) { /* no `require' defined? */ lua_pop(L, 1); return file_input(name);