@@ -22,9 +22,8 @@ class lua_State;
2222
2323/*
2424** Extra types for collectable non-values
25+ ** Note: LUA_TUPVAL and LUA_TPROTO now defined in ltvalue.h
2526*/
26- inline constexpr int LUA_TUPVAL = LUA_NUMTYPES; /* upvalues */
27- inline constexpr int LUA_TPROTO = (LUA_NUMTYPES+1 ); /* function prototypes */
2827inline constexpr int LUA_TDEADKEY = (LUA_NUMTYPES+2 ); /* removed keys in tables */
2928
3029
@@ -38,21 +37,9 @@ inline constexpr int LUA_TOTALTYPES = (LUA_TPROTO + 2);
3837** {==================================================================
3938** Nil
4039** ===================================================================
40+ ** Note: LUA_VNIL, LUA_VEMPTY, LUA_VABSTKEY, LUA_VNOTABLE now defined in ltvalue.h
4141*/
4242
43- /* Standard nil */
44- inline constexpr int LUA_VNIL = makevariant(LUA_TNIL, 0 );
45-
46- /* Empty slot (which might be different from a slot containing nil) */
47- inline constexpr int LUA_VEMPTY = makevariant(LUA_TNIL, 1 );
48-
49- /* Value returned for a key not found in a table (absent key) */
50- inline constexpr int LUA_VABSTKEY = makevariant(LUA_TNIL, 2 );
51-
52- /* Special variant to signal that a fast get is accessing a non-table */
53- inline constexpr int LUA_VNOTABLE = makevariant(LUA_TNIL, 3 );
54-
55-
5643/* macro to test for (any kind of) nil */
5744constexpr bool ttisnil (const TValue* v) noexcept { return checktype (v, LUA_TNIL); }
5845
@@ -115,12 +102,9 @@ inline void setempty(TValue* v) noexcept { settt_(v, LUA_VEMPTY); }
115102** {==================================================================
116103** Booleans
117104** ===================================================================
105+ ** Note: LUA_VFALSE, LUA_VTRUE now defined in ltvalue.h
118106*/
119107
120-
121- inline constexpr int LUA_VFALSE = makevariant(LUA_TBOOLEAN, 0 );
122- inline constexpr int LUA_VTRUE = makevariant(LUA_TBOOLEAN, 1 );
123-
124108constexpr bool ttisboolean (const TValue* o) noexcept { return checktype (o, LUA_TBOOLEAN); }
125109constexpr bool ttisfalse (const TValue* o) noexcept { return checktag (o, LUA_VFALSE); }
126110constexpr bool ttistrue (const TValue* o) noexcept { return checktag (o, LUA_VTRUE); }
@@ -146,10 +130,9 @@ inline void setbtvalue(TValue* obj) noexcept { obj->setTrue(); }
146130** {==================================================================
147131** Threads
148132** ===================================================================
133+ ** Note: LUA_VTHREAD now defined in ltvalue.h
149134*/
150135
151- inline constexpr int LUA_VTHREAD = makevariant(LUA_TTHREAD, 0 );
152-
153136constexpr bool ttisthread (const TValue* o) noexcept { return checktag (o, ctb (LUA_VTHREAD)); }
154137
155138constexpr bool TValue::isThread () const noexcept { return checktag (this , ctb (LUA_VTHREAD)); }
@@ -165,12 +148,9 @@ inline lua_State* thvalue(const TValue* o) noexcept { return o->threadValue(); }
165148** {==================================================================
166149** Numbers
167150** ===================================================================
151+ ** Note: LUA_VNUMINT, LUA_VNUMFLT now defined in ltvalue.h
168152*/
169153
170- /* Variant tags for numbers */
171- inline constexpr int LUA_VNUMINT = makevariant(LUA_TNUMBER, 0 ); /* integer numbers */
172- inline constexpr int LUA_VNUMFLT = makevariant(LUA_TNUMBER, 1 ); /* float numbers */
173-
174154constexpr bool ttisnumber (const TValue* o) noexcept { return checktype (o, LUA_TNUMBER); }
175155constexpr bool ttisfloat (const TValue* o) noexcept { return checktag (o, LUA_VNUMFLT); }
176156constexpr bool ttisinteger (const TValue* o) noexcept { return checktag (o, LUA_VNUMINT); }
@@ -339,17 +319,9 @@ inline bool TValue::hasRightType() const noexcept { return typeTag() == gcValue(
339319** {==================================================================
340320** Userdata
341321** ===================================================================
322+ ** Note: LUA_VLIGHTUSERDATA, LUA_VUSERDATA now defined in ltvalue.h
342323*/
343324
344-
345- /*
346- ** Light userdata should be a variant of userdata, but for compatibility
347- ** reasons they are also different types.
348- */
349- inline constexpr int LUA_VLIGHTUSERDATA = makevariant(LUA_TLIGHTUSERDATA, 0 );
350-
351- inline constexpr int LUA_VUSERDATA = makevariant(LUA_TUSERDATA, 0 );
352-
353325constexpr bool ttislightuserdata (const TValue* o) noexcept { return checktag (o, LUA_VLIGHTUSERDATA); }
354326constexpr bool ttisfulluserdata (const TValue* o) noexcept { return checktag (o, ctb (LUA_VUSERDATA)); }
355327
0 commit comments