浏览代码

* move RTTI declarations to their own header file

git-svn-id: trunk@39248 -
svenbarth 7 年之前
父节点
当前提交
b75324a4f2
共有 3 个文件被更改,包括 28 次插入7 次删除
  1. 1 0
      .gitattributes
  2. 26 0
      rtl/inc/rttidecl.inc
  3. 1 7
      rtl/inc/system.inc

+ 1 - 0
.gitattributes

@@ -9382,6 +9382,7 @@ rtl/inc/readme -text
 rtl/inc/real2str.inc svneol=native#text/plain
 rtl/inc/resh.inc svneol=native#text/plain
 rtl/inc/rtti.inc svneol=native#text/plain
+rtl/inc/rttidecl.inc svneol=native#text/plain
 rtl/inc/rttih.inc svneol=native#text/plain
 rtl/inc/sfpu128.pp svneol=native#text/pascal
 rtl/inc/sfpux80.pp svneol=native#text/pascal

+ 26 - 0
rtl/inc/rttidecl.inc

@@ -0,0 +1,26 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2018 by Sven Barth
+    member of the Free Pascal development team
+
+    Contains various RTTI related, private declarations that are used inside
+    the system unit before rtti.inc might be included.
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+
+type
+  PTypeKind = ^TTypeKind;
+
+const
+  // all potentially managed types
+  tkManagedTypes   = [tkAstring,tkWstring,tkUstring,tkArray,
+                     tkObject,tkRecord,tkDynArray,tkInterface,tkVariant];
+

+ 1 - 7
rtl/inc/system.inc

@@ -469,13 +469,7 @@ function aligntoqword(p : pointer) : pointer;inline;
 ****************************************************************************}
 
 {$ifdef FPC_HAS_FEATURE_RTTI}
-type
-  PTypeKind = ^TTypeKind;
-
-const
-  // all potentially managed types
-  tkManagedTypes   = [tkAstring,tkWstring,tkUstring,tkArray,
-                     tkObject,tkRecord,tkDynArray,tkInterface,tkVariant];
+{$i rttidecl.inc}
 {$endif FPC_HAS_FEATURE_RTTI}
 
 {*****************************************************************************