quick fix for annotations not working with string source descriptors
authorLisandro Dalcin <dalcinl@gmail.com>
Tue, 13 Apr 2010 18:14:23 +0000 (15:14 -0300)
committerLisandro Dalcin <dalcinl@gmail.com>
Tue, 13 Apr 2010 18:14:23 +0000 (15:14 -0300)
Cython/Compiler/Annotate.py

index 4a073c97efbb68f5aac7224552793fd4335cf208..d2dbb6a0154694fda5b464841a75ccdad8c8a97a 100644 (file)
@@ -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()