浏览代码

compiler: define FPC_UNICODESTRINGS when UnicodeString is a default string type (for issue #0023861)

git-svn-id: trunk@23601 -
paul 12 年之前
父节点
当前提交
8db6118965
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      compiler/scanner.pas

+ 3 - 0
compiler/scanner.pas

@@ -345,12 +345,15 @@ implementation
                 include(current_settings.localswitches,cs_refcountedstrings);
                 if changeinit then
                   include(init_settings.localswitches,cs_refcountedstrings);
+                if m_default_unicodestring in current_settings.modeswitches then
+                  def_system_macro('FPC_UNICODESTRINGS');
               end
             else
               begin
                 exclude(current_settings.localswitches,cs_refcountedstrings);
                 if changeinit then
                   exclude(init_settings.localswitches,cs_refcountedstrings);
+                undef_system_macro('FPC_UNICODESTRINGS');
               end;
           end;