aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-11-29 13:55:08 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-11-29 13:55:08 -0200
commit3617e04e972417144169d28184188a082eb40cbb (patch)
tree16741a6a01385963b2ce70cfd01fd917f9b21148 /lapi.c
parent8c62bde36fe129454bc818b5ee073267f93fe4ab (diff)
downloadlua-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lapi.c b/lapi.c
index 5f266cf1..acc991c3 100644
--- a/lapi.c
+++ b/lapi.c
@@ -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
970LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data, 970LUA_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? */