Message167143
I was debugging this bug reported against gdb:
http://sourceware.org/bugzilla/show_bug.cgi?id=14386
It turns out that what went wrong in this code was that
PyIter_Check evaluates to 0 when its argument is a
Python list.
This happens because the PyIter_Check macro looks at the
tp_iternext field; but this field is 0 in PyList_Type.
I am not sure of the correct fix; but PyIter_Check is not
faithfully reflecting what PyObject_GetIter does.
Maybe it isn't intended to; but anyway it seems that
checking tp_iter would maybe be a better approximation.
Even if PyIter_Check remains as-is, I think it would be nice
if the documentation were more specific about what it
actually does.
FWIW I'm modifying gdb not to use this function. |
|
Date |
User |
Action |
Args |
2012-08-01 16:40:31 | tromey | set | recipients:
+ tromey |
2012-08-01 16:40:31 | tromey | set | messageid: <1343839231.18.0.262983756093.issue15529@psf.upfronthosting.co.za> |
2012-08-01 16:40:30 | tromey | link | issue15529 messages |
2012-08-01 16:40:29 | tromey | create | |
|