summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2001-06-26 15:11:00 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2001-06-26 15:11:00 (GMT)
commit3083163dc12024e9d46d4e2d752645256b7ba7c3 (patch)
treef7d0dee10edf6b5c6682b83cbc2c69b187eb3b2a /Objects
parentba1867304503e76f8cb64cb87fe97c008ac956d7 (diff)
downloadcpython-3083163dc12024e9d46d4e2d752645256b7ba7c3.zip
cpython-3083163dc12024e9d46d4e2d752645256b7ba7c3.tar.gz
cpython-3083163dc12024e9d46d4e2d752645256b7ba7c3.tar.bz2
experimental UCS-4 support: don't assume that MS_WIN32 implies
HAVE_USABLE_WCHAR_T
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 4bb8fb2..ba606f5 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1379,7 +1379,7 @@ PyObject *unicodeescape_string(const Py_UNICODE *s,
while (size-- > 0) {
Py_UNICODE ch = *s++;
/* Escape quotes */
- if (quotes && (ch == q[1] || ch == '\\')) {
+ if (quotes && (ch == (Py_UNICODE) q[1] || ch == '\\')) {
*p++ = '\\';
*p++ = (char) ch;
}
@@ -1831,7 +1831,7 @@ PyObject *PyUnicode_AsASCIIString(PyObject *unicode)
NULL);
}
-#ifdef MS_WIN32
+#if defined(MS_WIN32) && defined(HAVE_USABLE_WCHAR_T)
/* --- MBCS codecs for Windows -------------------------------------------- */