summaryrefslogtreecommitdiff
path: root/Python/codecs.c
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2002-11-21 20:08:33 +0000
committerWalter Dörwald <walter@livinglogic.de>2002-11-21 20:08:33 +0000
commitd8c6e6f5b3d679edc49a0a0096596d713582bf7e (patch)
tree429c63c52486ef449d11c6375182ed0bbf3a04f6 /Python/codecs.c
parent85c0e301208cf4f804afda5e0f00200f40c61a67 (diff)
downloadcpython-d8c6e6f5b3d679edc49a0a0096596d713582bf7e.tar.gz
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
Diffstat (limited to 'Python/codecs.c')
-rw-r--r--Python/codecs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index 1424bb5b70..9302a3d870 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -486,6 +486,7 @@ PyObject *PyCodec_StrictErrors(PyObject *exc)
}
+#ifdef Py_USING_UNICODE
PyObject *PyCodec_IgnoreErrors(PyObject *exc)
{
int end;
@@ -728,6 +729,7 @@ PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
return NULL;
}
}
+#endif
static PyObject *strict_errors(PyObject *self, PyObject *exc)
{
@@ -735,6 +737,7 @@ static PyObject *strict_errors(PyObject *self, PyObject *exc)
}
+#ifdef Py_USING_UNICODE
static PyObject *ignore_errors(PyObject *self, PyObject *exc)
{
return PyCodec_IgnoreErrors(exc);
@@ -757,6 +760,7 @@ static PyObject *backslashreplace_errors(PyObject *self, PyObject *exc)
{
return PyCodec_BackslashReplaceErrors(exc);
}
+#endif
void _PyCodecRegistry_Init(void)
@@ -774,6 +778,7 @@ void _PyCodecRegistry_Init(void)
METH_O
}
},
+#ifdef Py_USING_UNICODE
{
"ignore",
{
@@ -806,6 +811,7 @@ void _PyCodecRegistry_Init(void)
METH_O
}
}
+#endif
};
if (_PyCodec_SearchPath == NULL)
_PyCodec_SearchPath = PyList_New(0);