| 231 | |
| 232 | |
| 233 | static int str_dump (lua_State *L) { |
| 234 | struct str_Writer state; |
| 235 | int strip = lua_toboolean(L, 2); |
| 236 | luaL_checktype(L, 1, LUA_TFUNCTION); |
| 237 | lua_settop(L, 1); /* ensure function is on the top of the stack */ |
| 238 | state.init = 0; |
| 239 | if (l_unlikely(lua_dump(L, writer, &state, strip) != 0)) |
| 240 | return luaL_error(L, "unable to dump given function"); |
| 241 | luaL_pushresult(&state.B); |
| 242 | return 1; |
| 243 | } |
| 244 | |
| 245 | |
| 246 |
nothing calls this directly
no test coverage detected