| 992 | |
| 993 | #if defined(LUA_USE_DUMP) |
| 994 | LUA_API int lua_dump (lua_State *L, lua_Writer writer, void *data) { |
| 995 | int status; |
| 996 | TValue *o; |
| 997 | lua_lock(L); |
| 998 | api_checknelems(L, 1); |
| 999 | o = L->top - 1; |
| 1000 | if (isLfunction(o)) |
| 1001 | status = luaU_dump(L, getproto(o), writer, data, 0); |
| 1002 | else |
| 1003 | status = 1; |
| 1004 | lua_unlock(L); |
| 1005 | return status; |
| 1006 | } |
| 1007 | #endif |
| 1008 | |
| 1009 | LUA_API int lua_status (lua_State *L) { |