[fpc-devel] Small Wstrings problem

Florian Klaempfl F.Klaempfl at gmx.de
Mon Jun 27 21:19:18 CEST 2005


Martin Schreiber wrote:

> On Monday 27 June 2005 13.53, Florian Klaempfl wrote:
> 
> 
>>That won't like people who count on delphi compatibility. Maybe we should
>>make the widestring heap allocation through the widestring manager so
>>heaptrace can hook it.
> 
> 
> Then the other way around, a new widestring which is reference counted
> on all platforms for people like, me who count on cross platform 
> portability. So i can write
> 
> type 
>  {$ifdef FPC}
>  mywidestring  = FPCwidestring;
> {$else}
>  mywidestring = widestring;
> {$endif}
> 
> and exchange 'widestring' by 'mywidestring' 10'000 times...
> In most times i use widestrings and not ansistrings and i estimate
> the performance gain of the FPC widestrings over the not reference
> counted delphi strings.

Maybe we should reconsider the idea of a new string type: ref. counting 
and containing a field contain the encoding. The widestring is very 
windows specific anyways.





More information about the fpc-devel mailing list