File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2819,7 +2819,9 @@ struct luaw::pusher<Return (*)(Args...)> {
28192819 auto param = l.to <std::decay_t <FirstArg>>(i, false , &failed, &exists);
28202820 if (failed) {
28212821 luaL_error (l.L (), " The %dth argument conversion failed" , counter);
2822- return Return (); // never runs here
2822+ // Never runs here.
2823+ // Do not return Return() to enable functions with reference results.
2824+ // return Return();
28232825 }
28242826 bind<Callee, FirstArg, RestArgs...> b (std::forward<Callee>(c),
28252827 std::move (param));
@@ -4786,7 +4788,9 @@ struct luaw::registrar<Return (Class::*)(Args...)> {
47864788 auto f = [mf, &l](ObjectType o, Args... args) -> Return {
47874789 if (!o) {
47884790 luaL_error (l.L (), " Calling member function by null pointer of object" );
4789- return Return (); // never runs here
4791+ // Never runs here.
4792+ // Do not return Return() to enable functions with reference results.
4793+ // return Return();
47904794 }
47914795 PEACALM_LUAW_ASSERT (o);
47924796 return mf (*o, std::move (args)...);
You can’t perform that action at this time.
0 commit comments