mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-20 00:58:15 +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:
|
tkMethod:
|
||||||
(MethodKind : TMethodKind;
|
(MethodKind : TMethodKind;
|
||||||
ParamCount : Byte;
|
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:
|
{in reality ParamList is a array[1..ParamCount] of:
|
||||||
record
|
record
|
||||||
Flags : TParamFlags;
|
Flags : TParamFlags;
|
||||||
|
@ -281,6 +281,8 @@ begin
|
|||||||
v := 0;
|
v := 0;
|
||||||
for i:= 1 to DTypeData^.ParamCount do
|
for i:= 1 to DTypeData^.ParamCount do
|
||||||
begin
|
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 }
|
{ First Handle the ParamFlag }
|
||||||
Flag:=pword(@DTypeData^.ParamList[CurrentParamPosition])^;
|
Flag:=pword(@DTypeData^.ParamList[CurrentParamPosition])^;
|
||||||
Flags:=TParamFlags(Flag);
|
Flags:=TParamFlags(Flag);
|
||||||
|
Loading…
Reference in New Issue
Block a user