This is the mail archive of the
mailing list for the Archer project.
Re: [[inferior events] partial cleanup for copy_py_list
- From: sami wagiaalla <swagiaal at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Project Archer <archer at sourceware dot org>
- Date: Wed, 15 Dec 2010 10:57:49 -0500
- Subject: Re: [[inferior events] partial cleanup for copy_py_list
- References: <firstname.lastname@example.org>
On 12/14/2010 04:41 PM, Tom Tromey wrote:
This fixes some issues in copy_py_list, but not all.
The patch changes it to check PyList_Append.
I think it should probably use an iterator to go through the list.
Otherwise it is susceptible to a bug where another thread changes the
list while we are iterating over it.
Hmm I did not know we had the option of using a safe iterator. If we do
then that eliminates the need for copy_py_list in the first place;
copy_py_list is used to make the call back of listeners safe against one
listener editing the list during the iteration by removing an element.
Still, ok to push in this form?
Yes. And thanks for the cleanups.