mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Automatically deduce the type in luax_pushtype, if possible
--HG-- branch : dynamiccore2
This commit is contained in:
@@ -77,7 +77,7 @@ int w_Canvas_newImageData(lua_State *L)
|
||||
love::image::ImageData *img = nullptr;
|
||||
luax_catchexcept(L, [&](){ img = canvas->newImageData(image, x, y, w, h); });
|
||||
|
||||
luax_pushtype(L, love::image::ImageData::type, img);
|
||||
luax_pushtype(L, img);
|
||||
img->release();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user