From 2feda80fd35fcb2a7b191b8b102e718f7b29b67f Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Tue, 13 Apr 2010 15:14:23 -0300 Subject: [PATCH] quick fix for annotations not working with string source descriptors --- Cython/Compiler/Annotate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cython/Compiler/Annotate.py b/Cython/Compiler/Annotate.py index 4a073c97..d2dbb6a0 100644 --- a/Cython/Compiler/Annotate.py +++ b/Cython/Compiler/Annotate.py @@ -44,7 +44,7 @@ class AnnotationCCodeWriter(CCodeWriter): if pos is not None: CCodeWriter.mark_pos(self, pos) if self.last_pos: - pos_code = self.code.setdefault(self.last_pos[0].filename,{}) + pos_code = self.code.setdefault(self.last_pos[0].get_description(),{}) code = pos_code.get(self.last_pos[1], "") pos_code[self.last_pos[1]] = code + self.annotation_buffer.getvalue() self.annotation_buffer = StringIO() -- 2.26.2