mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
Marc-Andre Lemburg:
The attached patch set includes a workaround to get Python with Unicode compile on BSDI 4.x (courtesy Thomas Wouters; the cause is a bug in the BSDI wchar.h header file) and Python interfaces for the MBCS codec donated by Mark Hammond. Also included are some minor corrections w/r to the docs of the new "es" and "es#" parser markers (use PyMem_Free() instead of free(); thanks to Mark Hammond for finding these). The unicodedata tests are now in a separate file (test_unicodedata.py) to avoid problems if the module cannot be found.
This commit is contained in:
parent
66d4513975
commit
24bdb0474f
9 changed files with 116 additions and 56 deletions
|
@ -82,6 +82,10 @@ Unicode Integration Proposal (see file Misc/unicode.txt).
|
|||
#endif
|
||||
|
||||
#ifdef HAVE_WCHAR_H
|
||||
/* Work around a cosmetic bug in BSDI 4.x wchar.h; thanks to Thomas Wouters */
|
||||
# ifdef _HAVE_BSDI
|
||||
# include <time.h>
|
||||
# endif
|
||||
# include "wchar.h"
|
||||
#endif
|
||||
|
||||
|
@ -562,7 +566,9 @@ extern DL_IMPORT(PyObject *) PyUnicode_TranslateCharmap(
|
|||
);
|
||||
|
||||
#ifdef MS_WIN32
|
||||
|
||||
/* --- MBCS codecs for Windows -------------------------------------------- */
|
||||
|
||||
extern DL_IMPORT(PyObject*) PyUnicode_DecodeMBCS(
|
||||
const char *string, /* MBCS encoded string */
|
||||
int length, /* size of string */
|
||||
|
@ -579,8 +585,8 @@ extern DL_IMPORT(PyObject*) PyUnicode_EncodeMBCS(
|
|||
const char *errors /* error handling */
|
||||
);
|
||||
|
||||
|
||||
#endif /* MS_WIN32 */
|
||||
|
||||
/* --- Methods & Slots ----------------------------------------------------
|
||||
|
||||
These are capable of handling Unicode objects and strings on input
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue