summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/object.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c
index e1dd470..47907bc 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -346,8 +346,10 @@ PyObject_Unicode(PyObject *v)
Py_INCREF(v);
return v;
}
- else if (PyString_Check(v))
+ else if (PyString_Check(v)) {
+ Py_INCREF(v);
res = v;
+ }
else if (v->ob_type->tp_str != NULL)
res = (*v->ob_type->tp_str)(v);
else {