* adjusted tests as SizeOf(TParamFlags) = 1 does not need to be true anymore

git-svn-id: trunk@35264 -
This commit is contained in:
svenbarth 2017-01-08 12:43:59 +00:00
parent 25842d70c8
commit fd465ff500
2 changed files with 6 additions and 4 deletions

View File

@ -209,7 +209,7 @@ var
ProcessThisProperty : boolean;
Fu_ResultType: String;
Flags: TParamFlags;
Flag:byte;
Flag:word;
Definition: String;
begin
// Finding property type
@ -275,7 +275,7 @@ begin
for i:= 1 to DTypeData^.ParamCount do
begin
{ First Handle the ParamFlag }
Flag:=byte(DTypeData^.ParamList[CurrentParamPosition]);
Flag:=pword(@DTypeData^.ParamList[CurrentParamPosition])^;
Flags:=TParamFlags(Flag);
writeln('ord(Flags):',ord(DTypeData^.ParamList[CurrentParamPosition]));
// For i:= 1 to NumI do
@ -294,7 +294,7 @@ begin
then Definition := Definition+('out ');
{ Next char is the length of the ParamName}
inc(CurrentParamPosition);
inc(CurrentParamPosition,SizeOf(TParamFlags));
ParamNameLength := ord( DTypeData^.ParamList[CurrentParamPosition]);
{ Next extract the Name of the Parameter }
ParamName := '';

View File

@ -40,7 +40,9 @@ begin
// for i:=0 to ParamCount-1 do begin
// SizeOf(TParamFlags) is 4, but the data is only 1 byte
Len:=1; // typinfo.pp comment is wrong: SizeOf(TParamFlags)
//Len:=1; // typinfo.pp comment is wrong: SizeOf(TParamFlags)
// Note by SB (2017-01-08): No longer true since typinfo uses packed sets
Len:=SizeOf(TParamFlags);
inc(Offset,Len);
// read ParamName