[Pyrex] crash Pyrex Compiler in 3 lines (plus fix)
David McNab
david at rebirthing.co.nz
Fri May 23 07:38:00 CEST 2003
Hi,
Here's a 3-liner that crashes Pyrex:
cdef extern unsigned float fred_()
def fred():
return fred_()
Yep - the 'unsigned float' is totally wrong. But Pyrex hits an internal
inconsistency in its error reporting.
Bug is in Pyrex/Compiler/Errors.py, circa line 22.
Replacing:
pos_str = '%s:%d:%d' % position
with:
try:
pos_str = '%s:%d:%d' % position
except:
pos_str = position
seems to fix it. But maybe the experts have a cleaner fix in mind.
Cheers
David
More information about the Pyrex
mailing list