mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +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:
@@ -48,11 +48,6 @@ int w_FileData_getExtension(lua_State *L)
|
||||
|
||||
static const luaL_Reg w_FileData_functions[] =
|
||||
{
|
||||
// Data
|
||||
{ "getString", w_Data_getString },
|
||||
{ "getPointer", w_Data_getPointer },
|
||||
{ "getSize", w_Data_getSize },
|
||||
|
||||
{ "getFilename", w_FileData_getFilename },
|
||||
{ "getExtension", w_FileData_getExtension },
|
||||
|
||||
@@ -61,7 +56,7 @@ static const luaL_Reg w_FileData_functions[] =
|
||||
|
||||
extern "C" int luaopen_filedata(lua_State *L)
|
||||
{
|
||||
return luax_register_type(L, FILESYSTEM_FILE_DATA_ID, w_FileData_functions);
|
||||
return luax_register_type(L, FILESYSTEM_FILE_DATA_ID, "FileData", w_Data_functions, w_FileData_functions, nullptr);
|
||||
}
|
||||
|
||||
} // filesystem
|
||||
|
||||
Reference in New Issue
Block a user