Procházet zdrojové kódy

* Fixed WideString on wince. WideString=UnicodeString on wince. Bug #14304.

git-svn-id: trunk@13510 -
yury před 16 roky
rodič
revize
e82e4ae806
4 změnil soubory, kde provedl 10 přidání a 11 odebrání
  1. 1 1
      compiler/options.pas
  2. 1 1
      compiler/psystem.pas
  3. 8 8
      rtl/inc/rtti.inc
  4. 0 1
      rtl/wince/system.pp

+ 1 - 1
compiler/options.pas

@@ -2753,7 +2753,7 @@ begin
   set_system_macro('FPC_PATCH',patch_nr);
   set_system_macro('FPC_FULLVERSION',Format('%d%.02d%.02d',[StrToInt(version_nr),StrToInt(release_nr),StrToInt(patch_nr)]));
 
-  if not(target_info.system in system_all_windows) then
+  if not(target_info.system in system_windows) then
     def_system_macro('FPC_WIDESTRING_EQUAL_UNICODESTRING');
 
   for i:=low(tfeature) to high(tfeature) do

+ 1 - 1
compiler/psystem.pas

@@ -164,7 +164,7 @@ implementation
         { should we give a length to the default long and ansi string definition ?? }
         clongstringtype:=tstringdef.createlong(-1);
         cansistringtype:=tstringdef.createansi;
-        if target_info.system in system_all_windows then
+        if target_info.system in system_windows then
           cwidestringtype:=tstringdef.createwide
         else
           cwidestringtype:=tstringdef.createunicode;

+ 8 - 8
rtl/inc/rtti.inc

@@ -161,13 +161,13 @@ begin
         PPointer(Data)^:=nil;
       end;
 {$endif VER2_2}
-{$ifdef WINDOWS}
+{$ifndef FPC_WIDESTRING_EQUAL_UNICODESTRING}
     tkWstring :
       begin
         fpc_WideStr_Decr_Ref(PPointer(Data)^);
         PPointer(Data)^:=nil;
       end;
-{$endif WINDOWS}
+{$endif FPC_WIDESTRING_EQUAL_UNICODESTRING}
     tkArray :
       arrayrtti(data,typeinfo,@int_finalize);
     tkObject,
@@ -194,10 +194,10 @@ begin
   case PByte(TypeInfo)^ of
     tkAstring :
       fpc_AnsiStr_Incr_Ref(PPointer(Data)^);
-{$ifdef WINDOWS}
+{$ifndef FPC_WIDESTRING_EQUAL_UNICODESTRING}
     tkWstring :
       fpc_WideStr_Incr_Ref(PPointer(Data)^);
-{$endif WINDOWS}
+{$endif FPC_WIDESTRING_EQUAL_UNICODESTRING}
 {$ifndef VER2_2}
     tkUstring :
       fpc_UnicodeStr_Incr_Ref(PPointer(Data)^);
@@ -227,10 +227,10 @@ begin
     { see AddRef for comment about below construct (JM) }
     tkAstring:
       fpc_AnsiStr_Decr_Ref(PPointer(Data)^);
-{$ifdef WINDOWS}
+{$ifndef FPC_WIDESTRING_EQUAL_UNICODESTRING}
     tkWstring:
       fpc_WideStr_Decr_Ref(PPointer(Data)^);
-{$endif WINDOWS}
+{$endif FPC_WIDESTRING_EQUAL_UNICODESTRING}
 {$ifndef VER2_2}
     tkUString:
       fpc_UnicodeStr_Decr_Ref(PPointer(Data)^);
@@ -272,10 +272,10 @@ begin
         fpc_AnsiStr_Decr_Ref(PPointer(Dest)^);
         PPointer(Dest)^:=PPointer(Src)^;
       end;
-{$ifdef WINDOWS}
+{$ifndef FPC_WIDESTRING_EQUAL_UNICODESTRING}
     tkWstring:
       fpc_WideStr_Assign(PPointer(Dest)^,PPointer(Src)^);
-{$endif WINDOWS}
+{$endif FPC_WIDESTRING_EQUAL_UNICODESTRING}
 {$ifndef VER2_2}
     tkUstring:
       fpc_UnicodeStr_Assign(PPointer(Dest)^,PPointer(Src)^);

+ 0 - 1
rtl/wince/system.pp

@@ -1842,7 +1842,6 @@ initialization
   { Reset internal error variable }
   errno:=0;
   initvariantmanager;
-  initwidestringmanager;
 {$ifndef VER2_2}
   initunicodestringmanager;
 {$endif VER2_2}