Преглед на файлове

* set objpas.integer = smallint on 16-bit and 8-bit CPUs. Rationale:
1) Delphi 1 compatibility
2) we reclaim pascal's 'Integer' type to be the integer type (at least 16 bits
in size) that is the most efficient to work with on the target processor

git-svn-id: trunk@27048 -

nickysn преди 11 години
родител
ревизия
f2cf516529
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8 0
      rtl/objpas/objpas.pp

+ 8 - 0
rtl/objpas/objpas.pp

@@ -22,11 +22,19 @@ unit objpas;
   interface
   interface
 
 
     { first, in object pascal, the integer type must be redefined }
     { first, in object pascal, the integer type must be redefined }
+{$ifdef CPU16}
+    const
+       MaxInt  = MaxSmallint;
+    type
+       Integer  = smallint;
+       PInteger = ^Integer;
+{$else CPU16}
     const
     const
        MaxInt  = MaxLongint;
        MaxInt  = MaxLongint;
     type
     type
        Integer  = longint;
        Integer  = longint;
        PInteger = ^Integer;
        PInteger = ^Integer;
+{$endif CPU16}
 
 
        { Ansistring are the default }
        { Ansistring are the default }
        PString = PAnsiString;
        PString = PAnsiString;