IDL [string] attribute (was svn commit: samba r11105 ...)
Jelmer Vernooij
jelmer at samba.org
Tue Oct 18 16:44:30 GMT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Tridge,
tridge at samba.org wrote:
>> wchar_t would work in Samba as well - it's an alias for uint16,
>> but latter is used more often at the moment.
>
> I'd prefer not to use wchar_t, as it implies (at least to me) that
> each element of the array is a whole character, whereas with UTF16
> (which is what we have to deal with from windows) a character might
> be either 1 or 2 16 bit values.
> I far prefer to use uint16, which very clearly implies an array of
> 16 bit values, and perhaps is less likely to lead to assumptions
> about character boundaries.
>
> This is particularly important as when windows specifies a length
> for these arrays, it doesn't specify the character length, it
> specifies the "number of 16 bit quantities".
Ah, ok - makes sense. I don't have any strong feelings for using
either one in Samba's IDL, just as long as wchar_t is supported (so we
can easily support IDL written for other IDL compilers). I'll keep
uint16 in Samba's IDL.
Cheers,
Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDVSZtPa9Uoh7vUnYRAl/eAKCQUmRGRE0qICT2vrWh/3JekOHCUACfYTjR
1346ghSwl00oCXkLVHCC+lA=
=1jFW
-----END PGP SIGNATURE-----
More information about the samba-technical
mailing list