This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients lemburg, mark.dickinson, rpetrov, vstinner
Date 2009-01-27.08:49:08
SpamBayes Score 4.7462816e-09
Marked as misclassified No
Message-id <497ECA83.2050800@egenix.com>
In-reply-to <1232989019.52.0.74079377924.issue4474@psf.upfronthosting.co.za>
Content
On 2009-01-26 17:56, STINNER Victor wrote:
> STINNER Victor <victor.stinner@haypocalc.com> added the comment:
> 
> @marketdickinson, @lemburg: ping! I updated the patch, does it look 
> better?

Yes, but there are a few things that still need fixing:

 * SIZEOF_WCHAR_T is not defined for Windows builds, so needs
   to be added to PC/pyconfig.h (OTOH wchar_t is 2 bytes on Windows)
 * USE_WCHAR_SURROGATE should be #defined just before the
   function and #undef'ed right after it; I'd also use a more
   accurate name
 * please use pre-processor indents, e.g.
   #ifdef ...
   # define ...
   #endif

I'd write

#if (Py_UNICODE_SIZE == 2) && defined((SIZEOF_WCHAR_T) && (SIZEOF_WCHAR_T > 2)
# define CONVERT_WCHAR_TO_SURROGATES
#endif

...

#undef CONVERT_WCHAR_TO_SURROGATES

Thanks.
History
Date User Action Args
2009-01-27 08:49:11lemburgsetrecipients: + lemburg, mark.dickinson, vstinner, rpetrov
2009-01-27 08:49:10lemburglinkissue4474 messages
2009-01-27 08:49:08lemburgcreate