Browse Source

* fix TClassData by including the AttributeTable at the right location

git-svn-id: trunk@42370 -
svenbarth 6 years ago
parent
commit
c17dafc2f9
1 changed files with 16 additions and 14 deletions
  1. 16 14
      rtl/objpas/typinfo.pp

+ 16 - 14
rtl/objpas/typinfo.pp

@@ -248,6 +248,21 @@ unit TypInfo;
 {$endif}
 
 {$PACKRECORDS C}
+
+      TAttributeProc = function : TCustomAttribute;
+      PAttributeProcList = ^TAttributeProcList;
+      TAttributeProcList = array[0..$ffff] of TAttributeProc;
+
+      TAttributeData =
+      {$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}
+      packed
+      {$endif}
+      record
+        AttributeCount: word;
+        AttributesList: TAttributeProcList;
+      end;
+      PAttributeData = ^TAttributeData;
+
       // members of TTypeData
       TArrayTypeData =
 {$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}
@@ -507,6 +522,7 @@ unit TypInfo;
         ClassType : TClass;
         Parent : PPTypeInfo;
         PropCount : SmallInt;
+        AttributeTable : PAttributeData;
         property UnitName: ShortString read GetUnitName;
         property PropertyTable: PPropData read GetPropertyTable;
       private
@@ -514,20 +530,6 @@ unit TypInfo;
         { PropertyTable: TPropData }
       end;
 
-      TAttributeProc = function : TCustomAttribute;
-      PAttributeProcList = ^TAttributeProcList;
-      TAttributeProcList = array[0..$ffff] of TAttributeProc;
-
-      TAttributeData =
-{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}
-      packed
-{$endif}
-      record
-        AttributeCount: word;
-        AttributesList: TAttributeProcList;
-      end;
-      PAttributeData = ^TAttributeData;
-
       PTypeData = ^TTypeData;
       TTypeData =
 {$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}