diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.156 2011/10/31 17:48:51 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.157 2011/11/16 18:51:36 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 | */ |
@@ -968,13 +968,13 @@ LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, | |||
968 | 968 | ||
969 | 969 | ||
970 | LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data, | 970 | LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data, |
971 | const char *chunkname) { | 971 | const char *chunkname, const char *mode) { |
972 | ZIO z; | 972 | ZIO z; |
973 | int status; | 973 | int status; |
974 | lua_lock(L); | 974 | lua_lock(L); |
975 | if (!chunkname) chunkname = "?"; | 975 | if (!chunkname) chunkname = "?"; |
976 | luaZ_init(L, &z, reader, data); | 976 | luaZ_init(L, &z, reader, data); |
977 | status = luaD_protectedparser(L, &z, chunkname); | 977 | status = luaD_protectedparser(L, &z, chunkname, mode); |
978 | if (status == LUA_OK) { /* no errors? */ | 978 | if (status == LUA_OK) { /* no errors? */ |
979 | LClosure *f = clLvalue(L->top - 1); /* get newly created function */ | 979 | LClosure *f = clLvalue(L->top - 1); /* get newly created function */ |
980 | if (f->nupvalues == 1) { /* does it have one upvalue? */ | 980 | if (f->nupvalues == 1) { /* does it have one upvalue? */ |