mirror of
https://github.com/love2d/love.git
synced 2026-08-14 10:13:46 +02:00
Imported some of the dynamiccore branch from love-experiments:
- Type names for love's Lua objects are specified as an argument to luax_register_type, rather than being statically defined in an array. - luax_register_type takes a variable number of method array arguments, for registering superclass methods without copying them into the subclass' method array. Also removed most of the header declarations for wrapper functions.
This commit is contained in:
@@ -124,7 +124,7 @@ int w_Rasterizer_hasGlyphs(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const luaL_Reg functions[] =
|
||||
const luaL_Reg w_Rasterizer_functions[] =
|
||||
{
|
||||
{ "getHeight", w_Rasterizer_getHeight },
|
||||
{ "getAdvance", w_Rasterizer_getAdvance },
|
||||
@@ -139,7 +139,7 @@ static const luaL_Reg functions[] =
|
||||
|
||||
extern "C" int luaopen_rasterizer(lua_State *L)
|
||||
{
|
||||
return luax_register_type(L, FONT_RASTERIZER_ID, functions);
|
||||
return luax_register_type(L, FONT_RASTERIZER_ID, "Rasterizer", w_Rasterizer_functions, nullptr);
|
||||
}
|
||||
|
||||
} // font
|
||||
|
||||
Reference in New Issue
Block a user