Przeglądaj źródła

* adjust AlignTypeData to take a Pointer as argument as it also needs to be used for e.g. subrecords inside TTypeData (e.g. the property table of interfaces)

git-svn-id: trunk@35321 -
svenbarth 8 lat temu
rodzic
commit
8e510da317
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      rtl/objpas/typinfo.pp

+ 4 - 4
rtl/objpas/typinfo.pp

@@ -495,7 +495,7 @@ unit typinfo;
 
 // general property handling
 Function GetTypeData(TypeInfo : PTypeInfo) : PTypeData;
-Function AlignTypeData(p : PTypeData) : PTypeData;
+Function AlignTypeData(p : Pointer) : Pointer;
 
 Function GetPropInfo(TypeInfo: PTypeInfo;const PropName: string): PPropInfo;
 Function GetPropInfo(TypeInfo: PTypeInfo;const PropName: string; AKinds: TTypeKinds): PPropInfo;
@@ -872,7 +872,7 @@ begin
 end;
 
 
-Function AlignTypeData(p : PTypeData) : PTypeData;
+Function AlignTypeData(p : Pointer) : Pointer;
 {$push}
 {$packrecords c}
   type
@@ -884,9 +884,9 @@ Function AlignTypeData(p : PTypeData) : PTypeData;
 begin
 {$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
 {$ifdef VER3_0}
-  Result:=PTypeData(align(p,SizeOf(Pointer)));
+  Result:=Pointer(align(p,SizeOf(Pointer)));
 {$else VER3_0}
-  Result:=PTypeData(align(p,PtrInt(@TAlignCheck(nil^).q)))
+  Result:=Pointer(align(p,PtrInt(@TAlignCheck(nil^).q)))
 {$endif VER3_0}
 {$else FPC_REQUIRES_PROPER_ALIGNMENT}
   Result:=p;