Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 43866:8ed0280c2ab6
Replace PyObject_Unicode with PyObject_Str everywhere, and remove the
#define for PyObject_Unicode in object.h.
| author | Thomas Heller <theller@ctypes.org> |
|---|---|
| date | Thu, 15 Nov 2007 20:48:54 +0000 |
| parents | ee081609cee8 |
| children | 00048fedbaa0 |
line wrap: on
line diff
--- a/Python/pythonrun.c Thu Nov 15 20:03:00 2007 +0000 +++ b/Python/pythonrun.c Thu Nov 15 20:48:54 2007 +0000 @@ -911,7 +911,7 @@ } v = PySys_GetObject("ps1"); if (v != NULL) { - v = PyObject_Unicode(v); + v = PyObject_Str(v); if (v == NULL) PyErr_Clear(); else if (PyUnicode_Check(v)) @@ -919,7 +919,7 @@ } w = PySys_GetObject("ps2"); if (w != NULL) { - w = PyObject_Unicode(w); + w = PyObject_Str(w); if (w == NULL) PyErr_Clear(); else if (PyUnicode_Check(w)) @@ -1373,7 +1373,7 @@ else err = PyFile_WriteObject(exception, f, Py_PRINT_RAW); if (err == 0 && (value != Py_None)) { - PyObject *s = PyObject_Unicode(value); + PyObject *s = PyObject_Str(value); /* only print colon if the str() of the object is not the empty string */ @@ -1687,7 +1687,7 @@ PyObject *type, *value, *tb; PyErr_Fetch(&type, &value, &tb); if (value != NULL) { - u = PyObject_Unicode(value); + u = PyObject_Str(value); if (u != NULL) { msg = PyUnicode_AsString(u); }
