[Cython] Another annotator bug

Dag Sverre Seljebotn dagss at student.matnat.uio.no
Mon Aug 18 15:50:58 CEST 2008


Dag Sverre Seljebotn wrote:
> Hoyt Koepke wrote:
>> Hello,
>>
>> In continuing to play around with the annotation function, I've found
>> another bug (and I think I have it patched as well).  For me, it shows
>> up when there is an error in my code.  It doesn't seem to matter what
>> that error is, as I've fixed several and still get the same backtrace.
>>  This is in r1071
>>
>> After running cython -a transforms.pyx, it prints out an error message
>> and then raises
>>
>> The problem is that self.last_pos is not always assigned in the
>> constructor of AnnotationCCodeWriter, which seems to be the case on my
>> code.  I've attached a patch which fixes it for me
>> (patch-last_pos.diff).  In looking at the code, it seems that
> 
> I believe the right thing to do here is to copy last_pos in create_from 
> (see below), but I'm not commiting as I'd like Robert to confirm (as 
> there's going to be a release today). The cleanup of self.annotator is 
> correct.
> 
> Thanks!

Attaching a patch properly doing the above.

-- 
Dag Sverre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: annotation_fix.diff
Type: text/x-diff
Size: 1049 bytes
Desc: not available
Url : http://codespeak.net/pipermail/cython-dev/attachments/20080818/dd0150dd/attachment.bin 


More information about the Cython-dev mailing list