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

View File

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

View File

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