CFunctions' doc strings should be Unicode.
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index 5f5d595..d7dc280 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -135,7 +135,7 @@
const char *doc = m->m_ml->ml_doc;
if (doc != NULL)
- return PyString_FromString(doc);
+ return PyUnicode_FromString(doc);
Py_INCREF(Py_None);
return Py_None;
}
@@ -284,7 +284,7 @@
if (strcmp(name, "__doc__") == 0) {
const char *doc = self->ob_type->tp_doc;
if (doc != NULL)
- return PyString_FromString(doc);
+ return PyUnicode_FromString(doc);
}
}
while (chain != NULL) {