Просмотр исходного кода

+ also added PCodePointer and PPCodePointer

git-svn-id: trunk@24841 -
nickysn 12 лет назад
Родитель
Сommit
54c4c8155b
3 измененных файлов с 9 добавлено и 6 удалено
  1. 5 5
      rtl/inc/objpas.inc
  2. 1 1
      rtl/inc/objpash.inc
  3. 3 0
      rtl/inc/systemh.inc

+ 5 - 5
rtl/inc/objpas.inc

@@ -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;

+ 1 - 1
rtl/inc/objpash.inc

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

+ 3 - 0
rtl/inc/systemh.inc

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