The PyList_GETITEM macro will not work correctly on lists which map to an existing IronPython list.
The PyList_SETITEM macro won't work either, EXCEPT in the only context in which we've actually seen it: filling in the values in an entirely new PyListObject's data.
Accesses through API functions should work fine.
Comment #1
Posted on Jan 26, 2009 by Swift CamelTo clarify: the PyList_GETITEM macro does not pick up changes to the list that happen after the list has crossed the boundary. In the usual case -- in which a list is constructed, passed to CPython, and subsequently left alone -- there shouldn't be any problem.
If anyone can find a real-world case in which this behaviour is not good enough, please let us know and we'll make this issue more of a priority.
Status: Accepted
Labels:
Type-Defect
Priority-Low