Mercurial > cpython-lru_cache-weakref
diff Python/codecs.c @ 26318:910fa739f4a4 legacy-trunk
Fix PEP 293 related problems with --disable-unicode builds
reported by Michael Hudson in
http://mail.python.org/pipermail/python-dev/2002-November/030299.html
| author | Walter Dörwald <walter@livinglogic.de> |
|---|---|
| date | Thu, 21 Nov 2002 20:08:33 +0000 |
| parents | d32588c88633 |
| children | 60bd7af0324e |
line wrap: on
line diff
--- a/Python/codecs.c Thu Nov 21 18:33:28 2002 +0000 +++ b/Python/codecs.c Thu Nov 21 20:08:33 2002 +0000 @@ -486,6 +486,7 @@ } +#ifdef Py_USING_UNICODE PyObject *PyCodec_IgnoreErrors(PyObject *exc) { int end; @@ -728,6 +729,7 @@ return NULL; } } +#endif static PyObject *strict_errors(PyObject *self, PyObject *exc) { @@ -735,6 +737,7 @@ } +#ifdef Py_USING_UNICODE static PyObject *ignore_errors(PyObject *self, PyObject *exc) { return PyCodec_IgnoreErrors(exc); @@ -757,6 +760,7 @@ { return PyCodec_BackslashReplaceErrors(exc); } +#endif void _PyCodecRegistry_Init(void) @@ -774,6 +778,7 @@ METH_O } }, +#ifdef Py_USING_UNICODE { "ignore", { @@ -806,6 +811,7 @@ METH_O } } +#endif }; if (_PyCodec_SearchPath == NULL) _PyCodec_SearchPath = PyList_New(0);
