mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 19:29:27 +02:00
+ Fixed typinfo count of properties
This commit is contained in:
parent
6b71ea1c62
commit
b661b37184
@ -357,8 +357,12 @@ unit typinfo;
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
TD:=GetTypeData(TypeInfo);
|
TD:=GetTypeData(TypeInfo);
|
||||||
Count:=TD^.PropCount;
|
// Get this objects published properties count
|
||||||
TP:=PPropInfo(@TD^.UnitName+Length(TD^.UnitName)+1);
|
// Delphi uses propdata for this...
|
||||||
|
TP:=(@TD^.UnitName+Length(TD^.UnitName)+1);
|
||||||
|
Count:=PLongint(TP)^;
|
||||||
|
// Now point TP to first propinfo record.
|
||||||
|
Inc(Longint(TP),SizeOF(Word));
|
||||||
While Count>0 do
|
While Count>0 do
|
||||||
begin
|
begin
|
||||||
PropList^[0]:=TP;
|
PropList^[0]:=TP;
|
||||||
@ -405,7 +409,7 @@ unit typinfo;
|
|||||||
GetMem(TempList,Count*SizeOf(Pointer));
|
GetMem(TempList,Count*SizeOf(Pointer));
|
||||||
Try
|
Try
|
||||||
GetPropInfos(TypeInfo,TempList);
|
GetPropInfos(TypeInfo,TempList);
|
||||||
For I:=0 to COunt-1 do
|
For I:=0 to Count-1 do
|
||||||
begin
|
begin
|
||||||
PropInfo:=TempList^[i];
|
PropInfo:=TempList^[i];
|
||||||
If PropInfo^.PropType^.Kind in TypeKinds then
|
If PropInfo^.PropType^.Kind in TypeKinds then
|
||||||
@ -645,8 +649,8 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.12 1998-11-24 15:03:32 michael
|
Revision 1.13 1998-11-25 16:47:03 michael
|
||||||
Implemented most important methods.
|
+ Fixed typinfo count of properties
|
||||||
|
|
||||||
Revision 1.11 1998/09/24 23:45:28 peter
|
Revision 1.11 1998/09/24 23:45:28 peter
|
||||||
* updated for auto objpas loading
|
* updated for auto objpas loading
|
||||||
|
Loading…
Reference in New Issue
Block a user