the module docstring didn't get escaped
authorStefan Behnel <scoder@users.berlios.de>
Tue, 12 Aug 2008 12:25:27 +0000 (14:25 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 12 Aug 2008 12:25:27 +0000 (14:25 +0200)
Cython/Compiler/ModuleNode.py

index a1b56fdc4e7cbd8c9b97daf0badf84017e31a8ac..4752456d8033c32f1220afab5e9a869edd0769e1 100644 (file)
@@ -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