* 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 -
This commit is contained in:
svenbarth 2017-02-10 16:02:23 +00:00
parent ca11a4baaa
commit fd1047c715

View File

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