Commit 23ad7ca2 authored by Guido van Rossum's avatar Guido van Rossum

CFunctions' doc strings should be Unicode.

parent 400f5eb5
......@@ -135,7 +135,7 @@ meth_get__doc__(PyCFunctionObject *m, void *closure)
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 @@ Py_FindMethodInChain(PyMethodChain *chain, PyObject *self, const char *name)
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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment