Browse Source

* use the correct alignment for the field following the unit name of an interface (raw or not doesn't matter)

git-svn-id: trunk@35410 -
svenbarth 8 years ago
parent
commit
fd1047c715
1 changed files with 4 additions and 4 deletions
  1. 4 4
      rtl/objpas/typinfo.pp

+ 4 - 4
rtl/objpas/typinfo.pp

@@ -2674,7 +2674,7 @@ var
   p: PByte;
 begin
   p := PByte(@UnitNameField[0]) + SizeOf(UnitNameField[0]) + Length(UnitNameField);
-  Result := aligntoptr(p);
+  Result := AlignTypeData(p);
 end;
 
 function TInterfaceData.GetMethodTable: PIntfMethodTable;
@@ -2691,14 +2691,14 @@ end;
 
 function TInterfaceRawData.GetIIDStr: ShortString;
 begin
-  Result := PShortString(PByte(@UnitNameField[0]) + SizeOf(UnitNameField[0]) + Length(UnitNameField))^;
+  Result := PShortString(AlignTypeData(PByte(@UnitNameField[0]) + SizeOf(UnitNameField[0]) + Length(UnitNameField)))^;
 end;
 
 function TInterfaceRawData.GetPropertyTable: PPropData;
 var
   p: PByte;
 begin
-  p := PByte(@UnitNameField[0]) + SizeOf(UnitNameField[0]) + Length(UnitNameField);
+  p := AlignTypeData(PByte(@UnitNameField[0]) + SizeOf(UnitNameField[0]) + Length(UnitNameField));
   p := p + SizeOf(p^) + p^;
   Result := aligntoptr(p);
 end;
@@ -2750,7 +2750,7 @@ end;
 
 function TTypeData.GetIIDStr: ShortString;
 begin
-  Result := PShortString(Pointer(@RawIntfUnit) + Length(RawIntfUnit) + 1)^;
+  Result := PShortString(AlignTypeData(Pointer(@RawIntfUnit) + Length(RawIntfUnit) + 1))^;
 end;
 
 function TTypeData.GetElType: PTypeInfo;