Automatically deduce the type in luax_pushtype, if possible

--HG--
branch : dynamiccore2
This commit is contained in:
Bart van Strien
2016-11-13 17:38:42 +01:00
parent 7dd960619d
commit 5d43c9601a
32 changed files with 121 additions and 106 deletions
+1 -1
View File
@@ -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)