mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Replaced most cases of type bits and type name strings in love's Lua wrapper code with type id's.
--HG-- branch : minor
This commit is contained in:
@@ -29,7 +29,7 @@ namespace box2d
|
||||
|
||||
World *luax_checkworld(lua_State *L, int idx)
|
||||
{
|
||||
World *w = luax_checktype<World>(L, idx, "World", PHYSICS_WORLD_T);
|
||||
World *w = luax_checktype<World>(L, idx, PHYSICS_WORLD_ID);
|
||||
if (!w->isValid())
|
||||
luaL_error(L, "Attempt to use destroyed world.");
|
||||
return w;
|
||||
@@ -191,7 +191,7 @@ int w_World_destroy(lua_State *L)
|
||||
|
||||
int w_World_isDestroyed(lua_State *L)
|
||||
{
|
||||
World *w = luax_checktype<World>(L, 1, "World", PHYSICS_WORLD_T);
|
||||
World *w = luax_checktype<World>(L, 1, PHYSICS_WORLD_ID);
|
||||
luax_pushboolean(L, !w->isValid());
|
||||
return 1;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ static const luaL_Reg functions[] =
|
||||
|
||||
extern "C" int luaopen_world(lua_State *L)
|
||||
{
|
||||
return luax_register_type(L, "World", functions);
|
||||
return luax_register_type(L, PHYSICS_WORLD_ID, functions);
|
||||
}
|
||||
|
||||
} // box2d
|
||||
|
||||
Reference in New Issue
Block a user