[Python-Dev] Re: [Python-checkins]
python/dist/src/Objects unicodeobject.c, 2.197, 2.198
Jeff Epler
jepler at unpythonic.net
Wed Sep 17 10:59:11 EDT 2003
On Wed, Sep 17, 2003 at 10:08:13AM +0200, M.-A. Lemburg wrote:
> No question there, but wouldn't it be easier to test such a platform
> and then fallback to "unigned int" in case wchar_t is found to
> be a signed value ?
This inaccurate comment created by configure [from 2.3b1] implies that
sds/2 already expects wchar_t to be unsigned if it is to be usable:
if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
then
PY_UNICODE_TYPE="wchar_t"
AC_DEFINE(HAVE_USABLE_WCHAR_T, 1,
[Define if you have a useable wchar_t type defined in wchar.h; useable
means wchar_t must be 16-bit unsigned type. (see
Include/unicodeobject.h).])
AC_DEFINE(PY_UNICODE_TYPE,wchar_t)
... but configure doesn't actually check for signedness, and the "16-bit"
part is inaccurate. (it must be 16 bits for ucs-2, or 32-bits for ucs-4)
Jeff
More information about the Python-Dev
mailing list