diff Include/pyerrors.h @ 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 861065256487
children b9c912e2c3c0
line wrap: on
line diff
--- a/Include/pyerrors.h	Thu Nov 21 18:33:28 2002 +0000
+++ b/Include/pyerrors.h	Thu Nov 21 20:08:33 2002 +0000
@@ -138,8 +138,10 @@
 PyAPI_FUNC(void) PyErr_SyntaxLocation(char *, int);
 PyAPI_FUNC(PyObject *) PyErr_ProgramText(char *, int);
 
+#ifdef Py_USING_UNICODE
 /* The following functions are used to create and modify unicode
    exceptions from C */
+
 /* create a UnicodeDecodeError object */
 PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_Create(
 	const char *, const char *, int, int, int, const char *);
@@ -198,6 +200,7 @@
 	PyObject *, const char *);
 PyAPI_FUNC(int) PyUnicodeTranslateError_SetReason(
 	PyObject *, const char *);
+#endif
 
 
 /* These APIs aren't really part of the error implementation, but