New submission from STINNER Victor <victor.stin...@haypocalc.com>:

mbcs codec functions are surrounded by:

#if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
(especially in unicodeobject.c and _codecsmodule.c)

or

#ifdef MS_WIN32
(in unicodeobject.h)

or

#if defined(MS_WINDOWS) && !defined(__BORLANDC__)
(in timemodule.c)

I think that all of these tests are wrong. We should just check that we are 
compiling under Windows: mbcs functions don't use the wchar_t type. And it's 
better to use the same test in all tests (MS_WIN32 vs MS_WINDOWS).

Attached patch replaces all #ifdef (except the one in timemodule.c because I 
don't know what to do with the BORLAND check, does anyone use this compiler?).

I suppose that my patch doesn't change anything in pratice because mbcs is used 
in many places and noboby complained that mbcs encoding was missing on Windows.

----------
components: Unicode, Windows
files: ifdef_mbcs.patch
keywords: patch
messages: 114350
nosy: brian.curtin, haypo, tim.golden
priority: normal
severity: normal
status: open
title: #ifdef and mbcs: don't check for defined(HAVE_USABLE_WCHAR_T)
versions: Python 3.2
Added file: http://bugs.python.org/file18577/ifdef_mbcs.patch

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

Reply via email to