Fix Channel:push and other functions that accept love objects and store them in Variants internally. Cleaned up Variant code a bit.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-09-30 11:11:14 -03:00
parent b838d0de54
commit bc980b0f20
3 changed files with 38 additions and 52 deletions
+2 -1
View File
@@ -74,7 +74,8 @@ int w_wait(lua_State *L)
int w_push(lua_State *L)
{
StrongRef<Message> m(Message::fromLua(L, 1), Acquire::NORETAIN);
StrongRef<Message> m;
luax_catchexcept(L, [&]() { m.set(Message::fromLua(L, 1), Acquire::NORETAIN); });
luax_pushboolean(L, m.get() != nullptr);