浏览代码

* TClassData also needs alignment dummies

git-svn-id: trunk@42807 -
svenbarth 6 年之前
父节点
当前提交
2dc771b7ba
共有 1 个文件被更改,包括 20 次插入8 次删除
  1. 20 8
      rtl/objpas/typinfo.pp

+ 20 - 8
rtl/objpas/typinfo.pp

@@ -578,18 +578,30 @@ unit TypInfo;
       private
         function GetUnitName: ShortString; inline;
         function GetPropertyTable: PPropData; inline;
+      public
+        property UnitName: ShortString read GetUnitName;
+        property PropertyTable: PPropData read GetPropertyTable;
       public
         {$ifdef PROVIDE_ATTR_TABLE}
         AttributeTable : PAttributeTable;
         {$endif}
-        ClassType : TClass;
-        Parent : PPTypeInfo;
-        PropCount : SmallInt;
-        property UnitName: ShortString read GetUnitName;
-        property PropertyTable: PPropData read GetPropertyTable;
-      private
-        UnitNameField : ShortString;
-        { PropertyTable: TPropData }
+        case TTypeKind of
+          tkClass: (
+            ClassType : TClass;
+            Parent : PPTypeInfo;
+            PropCount : SmallInt;
+            UnitNameField : ShortString;
+            { PropertyTable: TPropData }
+          );
+          { include for proper alignment }
+          tkInt64: (
+            dummy: Int64;
+          );
+{$ifndef FPUNONE}
+          tkFloat: (
+            FloatType : TFloatType
+          );
+{$endif}
       end;
 
       PTypeData = ^TTypeData;