From e786cf6f75b378f6d67642ffb3c9d45efa27724b Mon Sep 17 00:00:00 2001 From: Thomas Hunger Date: Tue, 9 Oct 2007 17:20:56 +0200 Subject: [PATCH] bugfix: avoid emitting code that closes a comment in the annotation comment --- Cython/Compiler/Code.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Code.py b/Cython/Compiler/Code.py index b2278849..7c54d6ff 100644 --- a/Cython/Compiler/Code.py +++ b/Cython/Compiler/Code.py @@ -85,7 +85,8 @@ class CCodeWriter: try: return self.input_file_contents[file] except KeyError: - F = open(file).readlines() + F = [line.replace('*/', '*[inserted by cython to avoid comment closer]/') + for line in open(file).readlines()] self.input_file_contents[file] = F return F -- 2.26.2