mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Build type information on first use (load-time), instead of using a hardcoded list
--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, IMAGE_IMAGE_DATA_ID, t);
|
||||
luax_pushtype(L, ImageData::type, t);
|
||||
t->release();
|
||||
return 1;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ int w_newImageData(lua_State *L)
|
||||
[&](bool) { data->release(); }
|
||||
);
|
||||
|
||||
luax_pushtype(L, IMAGE_IMAGE_DATA_ID, t);
|
||||
luax_pushtype(L, ImageData::type, t);
|
||||
t->release();
|
||||
return 1;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ int w_newCompressedData(lua_State *L)
|
||||
[&](bool) { data->release(); }
|
||||
);
|
||||
|
||||
luax_pushtype(L, IMAGE_COMPRESSED_IMAGE_DATA_ID, t);
|
||||
luax_pushtype(L, CompressedImageData::type, t);
|
||||
t->release();
|
||||
return 1;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ extern "C" int luaopen_love_image(lua_State *L)
|
||||
WrappedModule w;
|
||||
w.module = instance;
|
||||
w.name = "image";
|
||||
w.type = MODULE_IMAGE_ID;
|
||||
w.type = &Image::type;
|
||||
w.functions = functions;
|
||||
w.types = types;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user