mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 14:29:44 +02:00
* use NameIndex in GetPropInfos
git-svn-id: trunk@2004 -
This commit is contained in:
parent
ff1f800de5
commit
6238b1a917
@ -600,25 +600,24 @@ Var
|
||||
TP : PPropInfo;
|
||||
Count : Longint;
|
||||
begin
|
||||
TD:=GetTypeData(TypeInfo);
|
||||
// Get this objects TOTAL published properties count
|
||||
TP:=aligntoptr(PPropInfo(aligntoptr((@TD^.UnitName+Length(TD^.UnitName)+1))));
|
||||
Count:=PWord(TP)^;
|
||||
// Now point TP to first propinfo record.
|
||||
Inc(Pointer(TP),SizeOF(Word));
|
||||
tp:=aligntoptr(tp);
|
||||
While Count>0 do
|
||||
begin
|
||||
PropList^[0]:=TP;
|
||||
Inc(Pointer(PropList),SizeOf(Pointer));
|
||||
// Point to TP next propinfo record.
|
||||
// Located at Name[Length(Name)+1] !
|
||||
TP:=aligntoptr(PPropInfo(pointer(@TP^.Name)+PByte(@TP^.Name)^+1));
|
||||
Dec(Count);
|
||||
end;
|
||||
// recursive call for parent info.
|
||||
If TD^.Parentinfo<>Nil then
|
||||
GetPropInfos (TD^.ParentInfo,PropList);
|
||||
repeat
|
||||
TD:=GetTypeData(TypeInfo);
|
||||
// Get this objects TOTAL published properties count
|
||||
TP:=aligntoptr(PPropInfo(aligntoptr((@TD^.UnitName+Length(TD^.UnitName)+1))));
|
||||
Count:=PWord(TP)^;
|
||||
// Now point TP to first propinfo record.
|
||||
Inc(Pointer(TP),SizeOF(Word));
|
||||
tp:=aligntoptr(tp);
|
||||
While Count>0 do
|
||||
begin
|
||||
PropList^[TP^.NameIndex]:=TP;
|
||||
// Point to TP next propinfo record.
|
||||
// Located at Name[Length(Name)+1] !
|
||||
TP:=aligntoptr(PPropInfo(pointer(@TP^.Name)+PByte(@TP^.Name)^+1));
|
||||
Dec(Count);
|
||||
end;
|
||||
TypeInfo:=TD^.Parentinfo;
|
||||
until TypeInfo=nil;
|
||||
end;
|
||||
|
||||
Procedure InsertProp (PL : PProplist;PI : PPropInfo; Count : longint);
|
||||
|
Loading…
Reference in New Issue
Block a user