From 55957b2ed6624f69db03bf065442b1254025e1c2 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 12 Aug 2008 14:25:27 +0200 Subject: [PATCH] the module docstring didn't get escaped --- Cython/Compiler/ModuleNode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index a1b56fdc..4752456d 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -23,7 +23,7 @@ import Version from Errors import error, warning from PyrexTypes import py_object_type -from Cython.Utils import open_new_file, replace_suffix +from Cython.Utils import open_new_file, replace_suffix, escape_byte_string def check_c_classes(module_node): @@ -508,7 +508,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln('static const char **%s;' % Naming.filetable_cname) if env.doc: code.putln('') - code.putln('static char %s[] = "%s";' % (env.doc_cname, env.doc)) + code.putln('static char %s[] = "%s";' % ( + env.doc_cname, escape_byte_string(env.doc.utf8encode()))) def generate_extern_c_macro_definition(self, code): name = Naming.extern_c_macro -- 2.26.2