aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c5
1 files changed, 3 insertions, 2 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;