On Nov 12, 2008, at 7:15 PM, Michael Abshoff wrote: > Robert Bradshaw wrote: >> On Nov 12, 2008, at 6:04 PM, Hoyt Koepke wrote: > > <SNIP> > > >> It looks like your line is just before a loop? What is going on here >> is that the compiler periodically emmits something that says "I'm at >> this spot now" and the annotator tries to make correspondences >> between the Cython and C code based on that. If you finish a line, >> but the compiler doesn't explicitly say it's working on the next >> line, then all the extra stuff gets appended to the end. This also >> happens at the end of functions, etc. where there is cleanup code >> that gets tagged onto the last line. >> >>> If you'd like me to file a bug report, I'd be happy to. I'm >>> using the >>> latest version of cython from the repo, 1321:6e8c09631af4. >> >> Yes, please do. Try and get it down to the smallest example that >> generates this behavior, if possible. > > I have something in the same direction: some of the "boilerplate" code > that Cython generates is appended at the end of the generated file. On > occasion I run into issues in Sage for example that I debug and the > issue points to that area of the code. It is not always clear > initially > that I am in that area of the code and at least the first time it > happened it did cause some confusion until I figured it out that the > code I was staring at did not come from the pyx file. So can we change > the code generation so that it adds some extra information to those > generated code sections? It is certainly not something life > threatening, > so feel free to ignore this feature request.
Yes, what we need to do is have the compiler emmit a position marker that says it's entering boilerplate code, just like the "real" positions it uses. I think a lot of people would benifit from this. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
