diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-11-29 13:55:08 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-11-29 13:55:08 -0200 |
commit | 3617e04e972417144169d28184188a082eb40cbb (patch) | |
tree | 16741a6a01385963b2ce70cfd01fd917f9b21148 /lapi.c | |
parent | 8c62bde36fe129454bc818b5ee073267f93fe4ab (diff) | |
download | lua-3617e04e972417144169d28184188a082eb40cbb.tar.gz lua-3617e04e972417144169d28184188a082eb40cbb.tar.bz2 lua-3617e04e972417144169d28184188a082eb40cbb.zip |
'lua_load' has an extra argument 'mode'
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? */ |