Browse Source

+ added System.CodePointer - a pointer that is able to hold a procedure address in the current memory model

git-svn-id: trunk@24839 -
nickysn 12 years ago
parent
commit
3e1e5cb7e8
1 changed files with 9 additions and 0 deletions
  1. 9 0
      rtl/inc/systemh.inc

+ 9 - 0
rtl/inc/systemh.inc

@@ -318,6 +318,7 @@ Type
   ValUInt = qword;
   NativeInt  = PtrInt;
   NativeUint = PtrUint;
+  CodePointer = Pointer;
 {$endif CPU64}
 
 {$ifdef CPU32}
@@ -329,6 +330,7 @@ Type
   ValUInt = Cardinal;
   NativeInt  = PtrInt;
   NativeUint = PtrUint;
+  CodePointer = Pointer;
 {$endif CPU32}
 
 {$ifdef CPU16}
@@ -341,6 +343,13 @@ Type
     PtrInt = Integer;
     PtrUInt = Word;
   {$endif}
+  {$if defined(FPC_X86_CODE_FAR)}
+    CodePointer = FarPointer;
+  {$elseif defined(FPC_X86_CODE_NEAR)}
+    CodePointer = NearPointer;
+  {$else}
+    CodePointer = Pointer;
+  {$endif}
   ValSInt = Integer;
   ValUInt = Word;
   NativeInt  = Integer;