From: Stefan Behnel Date: Wed, 12 Sep 2007 08:15:04 +0000 (+0200) Subject: merge from 0.9.6.6 X-Git-Tag: 0.9.6.14~29^2~129^2~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=974520e57ee34eb739d000001d114c7909916737;p=cython.git merge from 0.9.6.6 --- 974520e57ee34eb739d000001d114c7909916737 diff --cc Cython/Compiler/PyrexTypes.py index 27eb2780,d05db0ce..6853f67f --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@@ -709,10 -714,9 +714,11 @@@ class CStringType to_py_function = "PyString_FromString" from_py_function = "PyString_AsString" + exception_value = "NULL" def literal_code(self, value): + if isinstance(value, unicode): + value = value.encode("UTF-8") return '"%s"' % value