[fpc-devel] Re: WinCE port patches

Florian Klaempfl F.Klaempfl at gmx.de
Tue Jul 5 22:00:19 CEST 2005


Yury Sidorov wrote:

> From: "Hans-Peter Diettrich" <DrDiettrich at compuserve.de>
> 
>>> 2. Define new types PSysChar/SysString to correspond either 
>>> PChar/AnsiString
>>> or PWideChar/WideString depending from OS type.
>>
>>
>> It's not a good idea to have String as WideString *without* reference
>> counting on WinCE, and Wide or Ansi strings *with* reference counting in
>> other cases.
> 
> 
> I did not say anything about ref-counting in strings. WideStrings are 
> refcounted as well as AnsiStrings.
> 
> I meant the following:
> 
> In WinCE system unit define:
> 
> type
>  PSysChar = PWideChar;
>  SysString = WideString;
> 
> Then modify some OS related RTL variables/functions to use theese 
> PSysChar/SysString types.
> For example:
> 
> var
>  cmdline: PSysChar;
> ...
> function paramstr(l : longint) : SysString;

I would leave it an ansistring. Experience showed that people expect 
that functions behave on all OSes the same way. Add an additional paramstrw.

> ...
> 
> System units for non-unicode OSes will define theese types as:
> 
> type
>  PSysChar = PChar;
>  SysString = AnsiString;
> 
> Yury Sidorov.
> 
> 
> 
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel





More information about the fpc-devel mailing list