Browse Source

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

git-svn-id: trunk@23601 -
paul 12 years ago
parent
commit
8db6118965
1 changed files with 3 additions and 0 deletions
  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;