mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +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:
@@ -101,7 +101,6 @@ Variant::Variant(love::Type udatatype, void *userdata)
|
||||
if (udatatype != INVALID_ID)
|
||||
{
|
||||
Proxy *p = (Proxy *) userdata;
|
||||
flags = p->flags;
|
||||
data.userdata = p->object;
|
||||
p->object->retain();
|
||||
}
|
||||
@@ -223,11 +222,7 @@ void Variant::toLua(lua_State *L)
|
||||
break;
|
||||
case FUSERDATA:
|
||||
if (udatatype != INVALID_ID)
|
||||
{
|
||||
const char *name = NULL;
|
||||
love::types.find(udatatype, name);
|
||||
luax_pushtype(L, name, flags, (love::Object *) data.userdata);
|
||||
}
|
||||
luax_pushtype(L, udatatype, (love::Object *) data.userdata);
|
||||
else
|
||||
lua_pushlightuserdata(L, data.userdata);
|
||||
// I know this is not the same
|
||||
|
||||
Reference in New Issue
Block a user