|
@@ -77,11 +77,12 @@ enD;
|
|
|
|
|
|
type
|
|
type
|
|
pObjVMT = ^TObjVMT;
|
|
pObjVMT = ^TObjVMT;
|
|
|
|
+ ppObjVMT = ^pObjVMT;
|
|
TObjVMT =
|
|
TObjVMT =
|
|
record
|
|
record
|
|
fInstanceSize: UInt;
|
|
fInstanceSize: UInt;
|
|
fInstanceSize2: Int;
|
|
fInstanceSize2: Int;
|
|
- fParent: pObjVMT;
|
|
|
|
|
|
+ fParent: ppObjVMT;
|
|
enD;
|
|
enD;
|
|
|
|
|
|
Function GetInstanceSize(AVMT: pObjVMT): UInt;
|
|
Function GetInstanceSize(AVMT: pObjVMT): UInt;
|
|
@@ -93,7 +94,7 @@ Function GetVMTPtrOffset(AVMT: pObjVMT): UInt;
|
|
begin
|
|
begin
|
|
if (AVMT.fParent = nil) then
|
|
if (AVMT.fParent = nil) then
|
|
Result := GetInstanceSize(AVMT) - SizeOf(ptr) else
|
|
Result := GetInstanceSize(AVMT) - SizeOf(ptr) else
|
|
- Result := GetVMTPtrOffset(AVMT.fParent);
|
|
|
|
|
|
+ Result := GetVMTPtrOffset(AVMT.fParent^);
|
|
enD;
|
|
enD;
|
|
|
|
|
|
Function SetVMT(Obj: ptr; AVMT: ptr): Bool;
|
|
Function SetVMT(Obj: ptr; AVMT: ptr): Bool;
|