diff options
Diffstat (limited to 'src/lstrlib.c')
-rw-r--r-- | src/lstrlib.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/lstrlib.c b/src/lstrlib.c index 7a03489..8ac753d 100644 --- a/src/lstrlib.c +++ b/src/lstrlib.c @@ -137,25 +137,6 @@ static int str_char (lua_State *L) { } -static int writer (lua_State *L, const void* b, size_t size, void* B) { - (void)L; - luaL_addlstring((luaL_Buffer*) B, (const char *)b, size); - return 0; -} - - -static int str_dump (lua_State *L) { - luaL_Buffer b; - luaL_checktype(L, 1, LUA_TFUNCTION); - lua_settop(L, 1); - luaL_buffinit(L,&b); - if (lua_dump(L, writer, &b) != 0) - luaL_error(L, "unable to dump given function"); - luaL_pushresult(&b); - return 1; -} - - /* ** {====================================================== @@ -827,7 +808,7 @@ static int str_format (lua_State *L) { static const luaL_Reg strlib[] = { {"byte", str_byte}, {"char", str_char}, - {"dump", str_dump}, + /* no 'dump' without sandboxing 'loadstring', etc. */ {"find", str_find}, {"format", str_format}, {"gfind", gfind_nodef}, |