summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-18 19:21:00 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-18 19:21:00 (GMT)
commit3a50e7056ebfb835785c84df925d79bde6d0d209 (patch)
tree6a6f61d276043fc53dc3290cd74ed7aab3506eab /Python
parent1e73a2467f312f7b5ebef515cca6d3a16cf36f97 (diff)
downloadcpython-3a50e7056ebfb835785c84df925d79bde6d0d209.zip
cpython-3a50e7056ebfb835785c84df925d79bde6d0d209.tar.gz
cpython-3a50e7056ebfb835785c84df925d79bde6d0d209.tar.bz2
Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignore
error handlers on all Windows versions. The MBCS codec is now supporting all error handlers, instead of only replace to encode and ignore to decode.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index a6e7c46..0f2f050 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -67,7 +67,7 @@ static void initsigs(void);
static void call_py_exitfuncs(void);
static void wait_for_thread_shutdown(void);
static void call_ll_exitfuncs(void);
-extern void _PyUnicode_Init(void);
+extern int _PyUnicode_Init(void);
extern void _PyUnicode_Fini(void);
extern int _PyLong_Init(void);
extern void PyLong_Fini(void);
@@ -261,7 +261,8 @@ Py_InitializeEx(int install_sigs)
Py_FatalError("Py_Initialize: can't make modules_reloading dictionary");
/* Init Unicode implementation; relies on the codec registry */
- _PyUnicode_Init();
+ if (_PyUnicode_Init() < 0)
+ Py_FatalError("Py_Initialize: can't initialize unicode");
bimod = _PyBuiltin_Init();
if (bimod == NULL)