aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lstrlib.c5
-rw-r--r--lua.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/lstrlib.c b/lstrlib.c
index bd2d7151..9bafa5e4 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.184 2014/01/08 18:34:34 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.185 2014/01/09 16:21:28 roberto Exp roberto $
3** Standard library for string operations and pattern-matching 3** Standard library for string operations and pattern-matching
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -178,10 +178,11 @@ static int writer (lua_State *L, const void *b, size_t size, void *B) {
178 178
179static int str_dump (lua_State *L) { 179static int str_dump (lua_State *L) {
180 luaL_Buffer b; 180 luaL_Buffer b;
181 int strip = lua_toboolean(L, 2);
181 luaL_checktype(L, 1, LUA_TFUNCTION); 182 luaL_checktype(L, 1, LUA_TFUNCTION);
182 lua_settop(L, 1); 183 lua_settop(L, 1);
183 luaL_buffinit(L,&b); 184 luaL_buffinit(L,&b);
184 if (lua_dump(L, writer, &b) != 0) 185 if (lua_dump(L, writer, &b, strip) != 0)
185 return luaL_error(L, "unable to dump given function"); 186 return luaL_error(L, "unable to dump given function");
186 luaL_pushresult(&b); 187 luaL_pushresult(&b);
187 return 1; 188 return 1;
diff --git a/lua.h b/lua.h
index 95fb3f9c..1738b6d8 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.298 2013/12/30 20:47:58 roberto Exp roberto $ 2** $Id: lua.h,v 1.299 2014/02/13 12:11:34 roberto Exp roberto $
3** Lua - A Scripting Language 3** Lua - A Scripting Language
4** Lua.org, PUC-Rio, Brazil (http://www.lua.org) 4** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
5** See Copyright Notice at the end of this file 5** See Copyright Notice at the end of this file
@@ -270,7 +270,7 @@ LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt,
270 const char *chunkname, 270 const char *chunkname,
271 const char *mode); 271 const char *mode);
272 272
273LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data); 273LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data, int strip);
274 274
275 275
276/* 276/*