aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lapi.c b/lapi.c
index 17014d47..b1439d1e 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.112 2010/01/21 16:49:21 roberto Exp roberto $ 2** $Id: lapi.c,v 2.113 2010/02/09 11:55:37 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -882,6 +882,12 @@ LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data,
882 if (!chunkname) chunkname = "?"; 882 if (!chunkname) chunkname = "?";
883 luaZ_init(L, &z, reader, data); 883 luaZ_init(L, &z, reader, data);
884 status = luaD_protectedparser(L, &z, chunkname); 884 status = luaD_protectedparser(L, &z, chunkname);
885 if (status == LUA_OK) {
886 Closure *f = clvalue(L->top - 1);
887 lua_assert(!f->c.isC);
888 if (f->l.nupvalues == 1)
889 sethvalue(L, f->l.upvals[0]->v, G(L)->l_gt);
890 }
885 lua_unlock(L); 891 lua_unlock(L);
886 return status; 892 return status;
887} 893}