diff options
| -rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index a26fd2f..fed2cc9 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -2068,6 +2068,8 @@ PyUnicode_FromObject(register PyObject *obj) /* XXX Perhaps we should make this API an alias of PyObject_Str() instead ?! */ if (PyUnicode_CheckExact(obj)) { + if (PyUnicode_READY(obj)) + return NULL; Py_INCREF(obj); return obj; } |
