This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: make thread_list static
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 28 Nov 2012 09:27:11 +0000
- Subject: Re: RFC: make thread_list static
- References: <87y5hmdhl0.fsf@fleche.redhat.com>
On 11/27/2012 06:30 PM, Tom Tromey wrote:
> I've had this patch on a branch for a while and thought I would send it
> today.
>
> I noticed that thread_list is only used in one place outside of
> thread.c. It seems generally preferable to me to keep things like this
> private. So, this patch makes it static and updates the one user.
Well, if you ask me, I can't agree since I had added it recently (git blame
points at last July). :-)
This was after getting sick of writing callback-style iterators in the itsets
run-control work, and introducing the macro there first. This isn't different
from ALL_OBJFILES and several other similar macros in the tree (which I realize
from this that you'd rather remove). We could switch to callback-style before pushing
those patches in, but, IMO, the convenience and readability of the resulting code
trumps the implementation detail exposure detail.
--
Pedro Alves