[fpc-devel] TRegistry and Unicode
Michael Van Canneyt
michael at freepascal.org
Sat Mar 16 16:36:04 CET 2019
On Sat, 16 Mar 2019, Bart wrote:
> On Wed, Mar 13, 2019 at 6:51 PM Michael Van Canneyt
> <michael at freepascal.org> wrote:
>
>> What you could do is
>>
>> TUniCodestringArray = Array of UniCodeString;
>>
>> Function GetKeyNames : TUniCodestringArray;
>> Function GetValueNames : TUniCodestringArray;
>>
>> The TStringList versions can call these and do the conversion.
>
> I have already declared TUnicodeStringArray in the Registry unit and
> use it for Read/WriteStringList.
>
> I was about to implement GetKeyNames/GetValueNames this way, but hit a snag.
> The type TUnicodeStringArray must then be know to the XMLReg unit as
> well, since these functions call TXMLRegistry functions (in
> non-windows implementation).
> I can declare the type there as well, but for the compiler these will
> be 2 different types.
In Delphi yes, but normally not in FPC. If the base type is the same, 2
array definitions will be assignment-compatible.
Michael.
More information about the fpc-devel
mailing list