mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +02:00
Removed love.event.addListener/removeListener/clearListeners.
They take away too much control from the main game code, which makes it harder to implement things like gamestates without modifying library code.
This commit is contained in:
+1
-11
@@ -243,17 +243,7 @@ int luax_register_module(lua_State *L, const WrappedModule &m)
|
||||
|
||||
// Register all the functions.
|
||||
if (m.functions != nullptr)
|
||||
{
|
||||
const luaL_Reg *l = m.functions;
|
||||
|
||||
for (; l->name != nullptr; l++)
|
||||
{
|
||||
// Set the module's table as an upvalue for the module's functions.
|
||||
lua_pushvalue(L, -1);
|
||||
lua_pushcclosure(L, l->func, 1);
|
||||
lua_setfield(L, -2, l->name);
|
||||
}
|
||||
}
|
||||
luax_setfuncs(L, m.functions);
|
||||
|
||||
// Register types.
|
||||
if (m.types != nullptr)
|
||||
|
||||
Reference in New Issue
Block a user