diff Objects/methodobject.c @ 42755:42b39cb536d9

CFunctions' doc strings should be Unicode.
author Guido van Rossum <guido@python.org>
date Thu, 23 Aug 2007 23:35:15 +0000
parents 74a3c6826683
children b7bfa780a882
line wrap: on
line diff
--- a/Objects/methodobject.c	Thu Aug 23 22:56:55 2007 +0000
+++ b/Objects/methodobject.c	Thu Aug 23 23:35:15 2007 +0000
@@ -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) {