Fix PyString_Format so that the "%s" format works again when Unicode is not

enabled.
This commit is contained in:
Georg Brandl 2005-10-01 17:06:00 +00:00
parent 8b813db2ef
commit d45014b236
1 changed files with 2 additions and 0 deletions

View File

@ -4083,7 +4083,9 @@ PyString_Format(PyObject *format, PyObject *args)
argidx = argidx_start; argidx = argidx_start;
goto unicode; goto unicode;
} }
#endif
temp = _PyObject_Str(v); temp = _PyObject_Str(v);
#ifdef Py_USING_UNICODE
if (temp != NULL && PyUnicode_Check(temp)) { if (temp != NULL && PyUnicode_Check(temp)) {
Py_DECREF(temp); Py_DECREF(temp);
fmt = fmt_start; fmt = fmt_start;