| 273 | |
| 274 | |
| 275 | static int Dump(lua_State* L, lua_Writer writer, void* data, bool strip) { |
| 276 | int status; |
| 277 | TValue* o; |
| 278 | lua_lock(L); |
| 279 | api_checknelems(L, 1); |
| 280 | o = L->top - 1; |
| 281 | if (isLfunction(o)) { |
| 282 | status = luaU_dump(L, clvalue(o)->l.p, writer, data, strip ? 1 : 0); |
| 283 | } |
| 284 | else { |
| 285 | status = 1; |
| 286 | } |
| 287 | lua_unlock(L); |
| 288 | return status; |
| 289 | } |
| 290 | |
| 291 | |
| 292 | int LuaExtras::dump(lua_State* L) { |