mirror of
https://github.com/love2d/love.git
synced 2026-08-14 10:13:46 +02:00
Automatically deduce the type in luax_pushtype, if possible
--HG-- branch : dynamiccore2
This commit is contained in:
@@ -38,7 +38,7 @@ int w_Source_clone(lua_State *L)
|
||||
Source *t = luax_checksource(L, 1);
|
||||
Source *clone = nullptr;
|
||||
luax_catchexcept(L, [&](){ clone = t->clone(); });
|
||||
luax_pushtype(L, love::audio::Source::type, clone);
|
||||
luax_pushtype(L, clone);
|
||||
clone->release();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user