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):
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