mdrubin / ironclad

Automatically exported from code.google.com/p/ironclad
Other
0 stars 0 forks source link

Lists not necessarily synchronised #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by fwere...@gmail.com on 20 Jan 2009 at 7:57

GoogleCodeExporter commented 8 years ago
To 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.

Original comment by fwere...@gmail.com on 26 Jan 2009 at 8:20