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:
@@ -282,7 +282,7 @@ int w_ImageData_encode(lua_State *L)
|
||||
love::filesystem::FileData *filedata = nullptr;
|
||||
luax_catchexcept(L, [&](){ filedata = t->encode(format, filename.c_str()); });
|
||||
|
||||
luax_pushtype(L, love::filesystem::FileData::type, filedata);
|
||||
luax_pushtype(L, filedata);
|
||||
filedata->release();
|
||||
|
||||
if (hasfilename)
|
||||
|
||||
Reference in New Issue
Block a user