mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-06 12:38:29 +02:00
* fix alignment of ParamList
* fix test for architectures using aligned rtti git-svn-id: trunk@42516 -
This commit is contained in:
parent
911a59a721
commit
1a67ffdd22
@ -714,7 +714,10 @@ unit TypInfo;
|
||||
tkMethod:
|
||||
(MethodKind : TMethodKind;
|
||||
ParamCount : Byte;
|
||||
ParamList : array[0..1023] of Char
|
||||
case Boolean of
|
||||
False: (ParamList : array[0..1023] of Char);
|
||||
{ dummy for proper alignment }
|
||||
True: (ParamListDummy : Word);
|
||||
{in reality ParamList is a array[1..ParamCount] of:
|
||||
record
|
||||
Flags : TParamFlags;
|
||||
|
@ -281,6 +281,8 @@ begin
|
||||
v := 0;
|
||||
for i:= 1 to DTypeData^.ParamCount do
|
||||
begin
|
||||
{ due to the uncommon usage pattern, the alignment approach is uncommon as well }
|
||||
Inc(CurrentParamPosition,AlignTParamFlags(@DTypeData^.ParamList[CurrentParamPosition])-@DTypeData^.ParamList[CurrentParamPosition]);
|
||||
{ First Handle the ParamFlag }
|
||||
Flag:=pword(@DTypeData^.ParamList[CurrentParamPosition])^;
|
||||
Flags:=TParamFlags(Flag);
|
||||
|
Loading…
Reference in New Issue
Block a user