summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2005-10-01 17:06:00 (GMT)
committerGeorg Brandl <georg@python.org>2005-10-01 17:06:00 (GMT)
commitd45014b236f5a8707c104bb5b47bbb006e3bd4f3 (patch)
tree9e41632a3c326f4c72dec845bb6d4ceb1f0697eb
parent8b813db2ef90ae83c3c6dcaa7ac3122290c9faf4 (diff)
downloadcpython-d45014b236f5a8707c104bb5b47bbb006e3bd4f3.zip
cpython-d45014b236f5a8707c104bb5b47bbb006e3bd4f3.tar.gz
cpython-d45014b236f5a8707c104bb5b47bbb006e3bd4f3.tar.bz2
Fix PyString_Format so that the "%s" format works again when Unicode is not
enabled.
-rw-r--r--Objects/stringobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 05deb3a..5797eb9 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -4083,7 +4083,9 @@ PyString_Format(PyObject *format, PyObject *args)
argidx = argidx_start;
goto unicode;
}
+#endif
temp = _PyObject_Str(v);
+#ifdef Py_USING_UNICODE
if (temp != NULL && PyUnicode_Check(temp)) {
Py_DECREF(temp);
fmt = fmt_start;