Ver Fonte

* set up $MinEnumSize and $PackSet so that it matches the compiler's settings for types added in the future

git-svn-id: trunk@39254 -
svenbarth há 7 anos atrás
pai
commit
eb06ac8ce8
1 ficheiros alterados com 17 adições e 0 exclusões
  1. 17 0
      rtl/inc/rttidecl.inc

+ 17 - 0
rtl/inc/rttidecl.inc

@@ -23,6 +23,16 @@
   {$define USE_PACKED}
 {$endif}
 
+{$ifndef VER3_0}
+{ 3.1.1 and newer also (re)stores $MinEnumSize and $PackSet upon $Push/$Pop }
+{$push}
+{$endif}
+
+{$MINENUMSIZE 1   this saves a lot of memory }
+{$ifdef FPC_RTTI_PACKSET1}
+{ for Delphi compatibility }
+{$packset 1}
+{$endif}
 
 type
   PTypeKind = ^TTypeKind;
@@ -118,3 +128,10 @@ type
     Dims:array[0..255] of Pointer;
   end;
 
+
+{$ifdef VER3_0}
+{$MINENUMSIZE DEFAULT}
+{$PACKSET DEFAULT}
+{$else}
+{$pop}
+{$endif}