* Patch from Silvio Clecio to adapt to new VMT methods (bug ID 30435)

git-svn-id: trunk@34471 -
This commit is contained in:
michael 2016-09-09 12:29:06 +00:00
parent 556b0fb837
commit 9e6077bee2

View File

@ -67,7 +67,7 @@ type
PMethodNameRec = ^TMethodNameRec; PMethodNameRec = ^TMethodNameRec;
TMethodNameRec = packed record TMethodNameRec = packed record
name : pshortstring; name : pshortstring;
addr : pointer; addr : codepointer;
end; end;
TMethodNameTable = packed record TMethodNameTable = packed record
@ -80,15 +80,15 @@ type
var var
methodTable : pMethodNameTable; methodTable : pMethodNameTable;
i : dword; i : dword;
vmt: TClass; vmt: PVmt;
idx: integer; idx: integer;
pmr: PMethodNameRec; pmr: PMethodNameRec;
begin begin
AList.Clear; AList.Clear;
vmt := aClass; vmt := PVmt(aClass);
while assigned(vmt) do while assigned(vmt) do
begin begin
methodTable := pMethodNameTable((Pointer(vmt) + vmtMethodTable)^); methodTable := pMethodNameTable(vmt^.vMethodTable);
if assigned(MethodTable) then if assigned(MethodTable) then
begin begin
pmr := @methodTable^.entries[0]; pmr := @methodTable^.entries[0];
@ -102,7 +102,7 @@ begin
Inc(pmr); Inc(pmr);
end; end;
end; end;
vmt := pClass(pointer(vmt) + vmtParent)^; vmt := vmt^.vParent;
end; end;
end; end;