This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] [python] Fix Python 3 build and testsuite issues
- From: Tom Tromey <tromey at redhat dot com>
- To: Phil Muldoon <pmuldoon at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 19 Aug 2013 12:34:22 -0600
- Subject: Re: [patch] [python] Fix Python 3 build and testsuite issues
- References: <521230C8 dot 2040803 at redhat dot com> <878uzxlkl1 dot fsf at fleche dot redhat dot com> <52124B8D dot 6010609 at redhat dot com>
>> sorted_list = list(_sort_list())
Phil> I avoided this because I did not want to convert an iterable to a list
Phil> (the new dict.keys/values/items returns a lightweight iterator instead
Phil> of a list.) My thoughts were that creating an imap or map like object
Phil> would be cheaper than creating a list from a lightweight iterator.
Perhaps it's a wash.
But the old code was also simpler to understand.
Phil> You mentioned
Phil> it applies elsewhere in the patchset? The only similar path is for the
Phil> filename, but that always creates a newly allocated string from
Phil> python_string_to_host_string. There is no other
Phil> newly-allocated/referenced pointer split in the code path in this
Phil> patch?
Yeah, I misread the filename handling hunk.
Sorry about that.
Tom