| 1731 | } |
| 1732 | |
| 1733 | int Array_fastRemove(lua_State* L) { |
| 1734 | /* 1 self, 2 value */ |
| 1735 | #ifndef TOLUA_RELEASE |
| 1736 | tolua_Error tolua_err; |
| 1737 | if (!tolua_isusertype(L, 1, "Array"_slice, 0, &tolua_err) || !tolua_isnoobj(L, 3, &tolua_err)) { |
| 1738 | goto tolua_lerror; |
| 1739 | } |
| 1740 | #endif |
| 1741 | { |
| 1742 | Array* self = r_cast<Array*>(tolua_tousertype(L, 1, 0)); |
| 1743 | #ifndef TOLUA_RELEASE |
| 1744 | if (!self) tolua_error(L, "invalid 'self' in function 'Array_fastRemove'", nullptr); |
| 1745 | #endif |
| 1746 | auto value = Dora_getValue(L, 2); |
| 1747 | if (!value) tolua_error(L, "expecting value to remove, got nil", nullptr); |
| 1748 | bool result = self->fastRemove(value.get()); |
| 1749 | lua_pushboolean(L, result ? 1 : 0); |
| 1750 | return 1; |
| 1751 | } |
| 1752 | #ifndef TOLUA_RELEASE |
| 1753 | tolua_lerror: |
| 1754 | tolua_error(L, "#ferror in function 'Array_fastRemove'.", &tolua_err); |
| 1755 | return 0; |
| 1756 | #endif |
| 1757 | } |
| 1758 | |
| 1759 | int Array_add(lua_State* L) { |
| 1760 | /* 1 self, 2 value */ |
nothing calls this directly
no test coverage detected