mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Automatically deduce the type in luax_pushtype, if possible
--HG-- branch : dynamiccore2
This commit is contained in:
@@ -73,7 +73,7 @@ int w_newImageData(lua_State *L)
|
||||
memcpy(t->getData(), bytes, t->getSize());
|
||||
}
|
||||
|
||||
luax_pushtype(L, ImageData::type, t);
|
||||
luax_pushtype(L, t);
|
||||
t->release();
|
||||
return 1;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ int w_newImageData(lua_State *L)
|
||||
[&](bool) { data->release(); }
|
||||
);
|
||||
|
||||
luax_pushtype(L, ImageData::type, t);
|
||||
luax_pushtype(L, t);
|
||||
t->release();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user