aboutsummaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-06-16 17:22:43 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-06-16 17:22:43 -0300
commit569eefbf73a6c41b16aa6dc2d4f1c52ebde54084 (patch)
tree16d8a1ab50a7430e8a30f5aeb268d394924ce39f /lua.c
parent5e4ea9a831b1c1538a2a8b1250336f3954c74319 (diff)
downloadlua-569eefbf73a6c41b16aa6dc2d4f1c52ebde54084.tar.gz
lua-569eefbf73a6c41b16aa6dc2d4f1c52ebde54084.tar.bz2
lua-569eefbf73a6c41b16aa6dc2d4f1c52ebde54084.zip
detail
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c5
1 files 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 @@
1/* 1/*
2** $Id: lua.c,v 1.125 2004/04/30 20:13:38 roberto Exp roberto $ 2** $Id: lua.c,v 1.126 2004/05/31 18:51:50 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*/
@@ -143,8 +143,7 @@ static int dostring (const char *s, const char *name) {
143 143
144 144
145static int load_file (const char *name) { 145static int load_file (const char *name) {
146 lua_pushliteral(L, "require"); 146 lua_getglobal(L, "require");
147 lua_rawget(L, LUA_GLOBALSINDEX);
148 if (!lua_isfunction(L, -1)) { /* no `require' defined? */ 147 if (!lua_isfunction(L, -1)) { /* no `require' defined? */
149 lua_pop(L, 1); 148 lua_pop(L, 1);
150 return file_input(name); 149 return file_input(name);