On Sat, 16 Mar 2019, Bart wrote:

On Wed, Mar 13, 2019 at 6:51 PM Michael Van Canneyt
<mich...@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.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to