IDL [string] attribute (was svn commit: samba r11105 ...)

tridge at tridge at
Tue Oct 18 01:55:59 GMT 2005


 > 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". 

Cheers, Tridge

More information about the samba-technical mailing list