mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Clean up
This commit is contained in:
parent
1491dc64c9
commit
eaf90b445d
2 changed files with 1 additions and 6 deletions
|
@ -129,7 +129,7 @@ const TString* luaT_objtypenamestr(lua_State* L, const TValue* o)
|
|||
if (ttisstring(type))
|
||||
return tsvalue(type);
|
||||
}
|
||||
if (ttislightuserdata(o) && o->extra[0] != 0)
|
||||
if (ttislightuserdata(o))
|
||||
{
|
||||
const TString* name = L->global->lightuserdataname[o->extra[0]];
|
||||
|
||||
|
|
|
@ -1674,11 +1674,6 @@ TEST_CASE("LightuserdataApi")
|
|||
|
||||
void* value = (void*)0x12345678;
|
||||
|
||||
lua_pushlightuserdata(L, value);
|
||||
CHECK(lua_lightuserdatatag(L, -1) == 0);
|
||||
CHECK(lua_tolightuserdatatagged(L, -1, 0) == value);
|
||||
CHECK(lua_tolightuserdatatagged(L, -1, 1) == nullptr);
|
||||
|
||||
lua_pushlightuserdatatagged(L, value, 1);
|
||||
CHECK(lua_lightuserdatatag(L, -1) == 1);
|
||||
CHECK(lua_tolightuserdatatagged(L, -1, 0) == nullptr);
|
||||
|
|
Loading…
Add table
Reference in a new issue