From 2070b18a4fc4745b33c9274ca0416c9b1d5000c0 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 10 Apr 2010 20:06:40 +0200 Subject: [PATCH] Py3 fixes --- Cython/Compiler/ModuleNode.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 56fb98b7..55c386d1 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -408,7 +408,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): for module in modules: defined_here = module is env modulecode.putln("/* Module declarations from %s */" % - module.qualified_name.encode("ASCII", "ignore")) + module.qualified_name) self.generate_global_declarations(module, modulecode, defined_here) self.generate_cfunction_predeclarations(module, modulecode, defined_here) @@ -632,11 +632,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): def generate_includes(self, env, cimported_modules, code): includes = [] for filename in env.include_files: - # fake decoding of filenames to their original byte sequence - if filename[0] == '<' and filename[-1] == '>': - code.putln('#include %s' % filename) + byte_decoded_filenname = str(filename) + if byte_decoded_filenname[0] == '<' and byte_decoded_filenname[-1] == '>': + code.putln('#include %s' % byte_decoded_filenname) else: - code.putln('#include "%s"' % filename) + code.putln('#include "%s"' % byte_decoded_filenname) def generate_filename_table(self, code): code.putln("") -- 2.26.2