]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix PyString_Format so that the "%s" format works again when Unicode is not
authorGeorg Brandl <georg@python.org>
Sat, 1 Oct 2005 17:06:00 +0000 (17:06 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 1 Oct 2005 17:06:00 +0000 (17:06 +0000)
enabled.

Objects/stringobject.c

index 05deb3a98c7760a4be0101bc00de4417a806d06f..5797eb91efce5034af7ae9aea7563d11d9789212 100644 (file)
@@ -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;