aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/lbaselib.c b/lbaselib.c
index ffa753a1..43981dc7 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.209 2009/02/06 18:38:47 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.210 2009/02/07 12:23:15 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -323,12 +323,17 @@ static int luaB_load (lua_State *L) {
323} 323}
324 324
325 325
326static int dofilecont (lua_State *L) {
327 return lua_gettop(L) - 1;
328}
329
330
326static int luaB_dofile (lua_State *L) { 331static int luaB_dofile (lua_State *L) {
327 const char *fname = luaL_optstring(L, 1, NULL); 332 const char *fname = luaL_optstring(L, 1, NULL);
328 lua_settop(L, 1); 333 lua_settop(L, 1);
329 if (luaL_loadfile(L, fname) != LUA_OK) lua_error(L); 334 if (luaL_loadfile(L, fname) != LUA_OK) lua_error(L);
330 lua_call(L, 0, LUA_MULTRET); 335 lua_callcont(L, 0, LUA_MULTRET, dofilecont);
331 return lua_gettop(L) - 1; 336 return dofilecont(L);
332} 337}
333 338
334 339