| 186 | |
| 187 | |
| 188 | static int str_dump(lua_State *L) { |
| 189 | luaL_Buffer b; |
| 190 | int strip = lua_toboolean(L, 2); |
| 191 | luaL_checktype(L, 1, LUA_TFUNCTION); |
| 192 | lua_settop(L, 1); |
| 193 | luaL_buffinit(L, &b); |
| 194 | if (lua_dump(L, writer, &b, strip) != 0) |
| 195 | return luaL_error(L, "unable to dump given function"); |
| 196 | luaL_pushresult(&b); |
| 197 | return 1; |
| 198 | } |
| 199 | |
| 200 | |
| 201 |
nothing calls this directly
no test coverage detected