原文链接 GCObject Lua使用union GCObject来表示所有的垃圾回收对象: 182 /* 183 ** Union of all collectable objects 184 */ 185 union GCObject { 186 GCheader gch; /* common header */ 187 union TString ts; 188 union Udata u; 189 union Closure cl;
原文链接 Lua使用TString结构体代表一个字符串对象。 /* ** Header for string value; string bytes follow the end of this structure */ typedef union TString { L_Umaxalign dummy; /* ensures maximum alignment for strings */ struct { CommonHeader; lu_byte extra; /* reserved words for short strings; "has hash"