Marc-Andre Lemburg <m...@egenix.com> added the comment:

Daniel Stutzbach wrote:
> 
> Daniel Stutzbach <dan...@stutzbachenterprises.com> added the comment:
> 
> The underlying problem here is that SIZEOF_WCHAR_T is not defined in 
> pyconfig.h on Windows.  My patch assumed that it would be defined on all 
> platforms where HAVE_WCHAR_H is defined (I had checked ./configure, but 
> forgotten Windows).
> 
> This has come up before and caused problems for other projects that assume 
> including python.h will define SIZEOF_WCHAR_T on all platforms with 
> HAVE_WCHAR_H:
> http://bugs.python.org/issue4474
> http://trac.wxwidgets.org/ticket/12013
> 
> The problem with my patch can be solved in one of two ways:
> 1. In PC/pyconfig.h, #define SIZEOF_WCHAR_T 2, or
> 2. Change the #if's to: HAVE_USABLE_WCHAR_T || Py_UNICODE_SIZE == 
> SIZEOF_WCHAR_T
> 
> I prefer option #1, but it's also a more visible change than my original 
> patch and may warrant its own issue.  Thoughts?

It possible, we should do the right thing and implement #1.

One thing I'm not sure about is how other Windows compilers deal
with wchar_t, e.g. MinGW or the Borland compiler. I suppose
that they all use the standard Windows C lib, so the parameter
should be 2 for them as well, but I'm not 100% sure.

----------
title: 32-bit wchar_t doesn't need to be unsigned to be usable (I think) -> 
32-bit wchar_t doesn't need to be unsigned to be usable     (I think)

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8781>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to