This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: make thread_list static


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]