From: Stefan Behnel Date: Tue, 12 Aug 2008 09:55:42 +0000 (+0200) Subject: docstrings in classes were neither escaped nor byte encoded X-Git-Tag: 0.9.8.1~61 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f6df9115230bd573790cd0b508adadc58c6ba718;p=cython.git docstrings in classes were neither escaped nor byte encoded --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index b39fc13d..266fc4d6 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -12,7 +12,8 @@ import TypeSlots from PyrexTypes import py_object_type, error_type, CTypedefType, CFuncType from Symtab import ModuleScope, LocalScope, GeneratorLocalScope, \ StructOrUnionScope, PyClassScope, CClassScope -from Cython.Utils import open_new_file, replace_suffix, EncodedString +from Cython.Utils import open_new_file, replace_suffix +from Cython.Utils import EncodedString, escape_byte_string import Options import ControlFlow @@ -1522,7 +1523,7 @@ class DefNode(FuncDefNode): code.putln( 'static char %s[] = "%s";' % ( self.entry.doc_cname, - self.entry.doc)) + escape_byte_string(self.entry.doc.utf8encode()))) if with_pymethdef: code.put( "static PyMethodDef %s = " %