浏览代码

Fix MSVC build.

Mike Pall 10 年之前
父节点
当前提交
71ecc051dc
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      src/lj_obj.h

+ 8 - 3
src/lj_obj.h

@@ -175,18 +175,23 @@ typedef LJ_ALIGN(8) union TValue {
 #if LJ_GC64
   GCRef gcr;		/* GCobj reference with tag. */
   int64_t it64;
-#endif
+  struct {
+    LJ_ENDIAN_LOHI(
+      int32_t i;	/* Integer value. */
+    , uint32_t it;	/* Internal object tag. Must overlap MSW of number. */
+    )
+  };
+#else
   struct {
     LJ_ENDIAN_LOHI(
       union {
-#if !LJ_GC64
 	GCRef gcr;	/* GCobj reference (if any). */
-#endif
 	int32_t i;	/* Integer value. */
       };
     , uint32_t it;	/* Internal object tag. Must overlap MSW of number. */
     )
   };
+#endif
 #if LJ_FR2
   int64_t ftsz;		/* Frame type and size of previous frame, or PC. */
 #else