Skip to content
This repository was archived by the owner on Dec 29, 2024. It is now read-only.

Commit 48105a6

Browse files
authored
Fix regression issues (#145)
1 parent 836ef08 commit 48105a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/metatables.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ void LuaState::createObjectMetatable() {
510510
}
511511

512512
// just in case they want to raise an error
513-
Variant ret = arg1.call("__gc", getAPI(inner_state));
513+
Variant ret = arg1.call("__gc", Ref<LuaAPI>(getAPI(inner_state)));
514514
if (LuaError *err = dynamic_cast<LuaError *>(ret.operator Object *())) {
515515
LuaState::pushVariant(inner_state, ret);
516516
}
@@ -523,7 +523,7 @@ void LuaState::createObjectMetatable() {
523523
return 0;
524524
}
525525

526-
LuaState::pushVariant(inner_state, arg1.call("__tostring"));
526+
LuaState::pushVariant(inner_state, arg1.call("__tostring", Ref<LuaAPI>(getAPI(inner_state))));
527527
return 1;
528528
});
529529

@@ -543,7 +543,7 @@ void LuaState::createObjectMetatable() {
543543
return 0;
544544
}
545545

546-
LuaState::pushVariant(inner_state, arg1.call("__len"));
546+
LuaState::pushVariant(inner_state, arg1.call("__len", Ref<LuaAPI>(getAPI(inner_state))));
547547
return 1;
548548
});
549549

@@ -553,7 +553,7 @@ void LuaState::createObjectMetatable() {
553553
return 0;
554554
}
555555

556-
LuaState::pushVariant(inner_state, arg1.call("__unm"));
556+
LuaState::pushVariant(inner_state, arg1.call("__unm", Ref<LuaAPI>(getAPI(inner_state))));
557557
return 1;
558558
});
559559

0 commit comments

Comments
 (0)