+ also added PCodePointer and PPCodePointer

git-svn-id: trunk@24841 -
This commit is contained in:
nickysn 2013-06-09 17:30:03 +00:00
parent 9b59809ac3
commit 54c4c8155b
3 changed files with 9 additions and 6 deletions

View File

@ -561,7 +561,7 @@
PMsgIntTable = ^TMsgIntTable;
TMsgIntTable = record
index : dword;
method : pointer;
method : codepointer;
end;
PMsgInt = ^TMsgInt;
@ -716,23 +716,23 @@
etVirtualMethodResult:
begin
// IOffset is relative to the VMT, not to instance.
Getter.code := PPointer(PByte(PPointer(Instance)^) + IEntry^.IOffset)^;
Getter.code := PCodePointer(PByte(PPointer(Instance)^) + IEntry^.IOffset)^;
TInterfaceGetter(Getter)(obj);
end;
etVirtualMethodClass:
begin
// IOffset is relative to the VMT, not to instance.
Getter.code := PPointer(PByte(PPointer(Instance)^) + IEntry^.IOffset)^;
Getter.code := PCodePointer(PByte(PPointer(Instance)^) + IEntry^.IOffset)^;
TObject(obj) := TClassGetter(Getter)();
end;
etStaticMethodResult:
begin
Getter.code := Pointer(IEntry^.IOffset);
Getter.code := CodePointer(IEntry^.IOffset);
TInterfaceGetter(Getter)(obj);
end;
etStaticMethodClass:
begin
Getter.code := Pointer(IEntry^.IOffset);
Getter.code := CodePointer(IEntry^.IOffset);
TObject(obj) := TClassGetter(Getter)();
end;
end;

View File

@ -83,7 +83,7 @@
{ to access the message table from outside }
TMsgStrTable = record
name : pshortstring;
method : pointer;
method : codepointer;
end;
PMsgStrTable = ^TMsgStrTable;

View File

@ -452,6 +452,9 @@ type
PPointer = ^Pointer;
PPPointer = ^PPointer;
PCodePointer = ^CodePointer;
PPCodePointer = ^PCodePointer;
PBoolean = ^Boolean;
PWordBool = ^WordBool;
PLongBool = ^LongBool;