[Python-3000-checkins] r57363 - python/branches/py3k/Objects/methodobject.c

guido.van.rossum python-3000-checkins at python.org
Fri Aug 24 01:35:16 CEST 2007


Author: guido.van.rossum
Date: Fri Aug 24 01:35:15 2007
New Revision: 57363

Modified:
   python/branches/py3k/Objects/methodobject.c
Log:
CFunctions' doc strings should be Unicode.


Modified: python/branches/py3k/Objects/methodobject.c
==============================================================================
--- python/branches/py3k/Objects/methodobject.c	(original)
+++ python/branches/py3k/Objects/methodobject.c	Fri Aug 24 01:35:15 2007
@@ -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) {


More information about the Python-3000-checkins mailing list