[fpc-devel] Re: WinCE port patches
Hans-Peter Diettrich
DrDiettrich at compuserve.de
Mon Jul 4 11:14:39 CEST 2005
Yury Sidorov wrote:
> So what way should we go?
>
> 1. Leave RTL string types as is (PChar/AnsiString) and perform conversion
> from Unicode if needed.
No problem.
> 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.
> 3. Be avare of UNICODE define and produce fully Unicode RTL if it is defined
> and ANSI RTL if it is not defined.
As above, exchangable Char and String types only should differ in the
character size, not in the automatic handling of string memory
(refcount, copy-on-write...).
Does anybody know good reasons for making strings *not* reference
counted?
Is this behaviour related to inter-task communication?
What about transferring strings from one process to another one, on
various platforms?
How do MS compilers handle code written for both Ansi and Unicode
environments, and the related data types? How are string arguments (out)
handled in Windows API's?
Is this Microsoft way a good model for other platforms?
DoDi
More information about the fpc-devel
mailing list