MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / Array_fastRemove

Function Array_fastRemove

Source/Lua/LuaManual.cpp:1733–1757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1731}
1732
1733int 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
1753tolua_lerror:
1754 tolua_error(L, "#ferror in function 'Array_fastRemove'.", &tolua_err);
1755 return 0;
1756#endif
1757}
1758
1759int Array_add(lua_State* L) {
1760 /* 1 self, 2 value */

Callers

nothing calls this directly

Calls 8

tolua_isusertypeFunction · 0.85
tolua_isnoobjFunction · 0.85
tolua_tousertypeFunction · 0.85
tolua_errorFunction · 0.85
Dora_getValueFunction · 0.85
fastRemoveMethod · 0.80
getMethod · 0.65
lua_pushbooleanFunction · 0.50

Tested by

no test coverage detected