From fd1047c715f6b732a0e6a4e22b3873dacdc21a13 Mon Sep 17 00:00:00 2001 From: svenbarth Date: Fri, 10 Feb 2017 16:02:23 +0000 Subject: [PATCH] * 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 - --- rtl/objpas/typinfo.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtl/objpas/typinfo.pp b/rtl/objpas/typinfo.pp index f5b5f997c2..171a260696 100644 --- a/rtl/objpas/typinfo.pp +++ b/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;