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: [3/4] RFC: introduce gdb_vecs.h


On Thu, Jan 19, 2012 at 01:26:20PM -0700, Tom Tromey wrote:
> I needed a VEC(char_ptr) in another header for patch #4; but this is a
> pain because it is already defined in tracepoint.h, so there can be
> clashes depending.
> 
> This patch introduces gdb_vecs.h and moves the DEF_VEC_P there.
> We could add other vector definitions there as well.
> 
> This is a bit of a hack, but I think it is basically the best we can do
> given how vec.h works.
> 
> Another possibility here is just including vec.h from defs.h and doing
> the DEF_VEC_P there.  I thought I'd pull this patch out separately in
> case anybody prefers that approach, or some other; I can implement it.
> 
> Tom
> 
> 2012-01-19  Tom Tromey  <tromey@redhat.com>
> 
> 	* ada-lang.c: Include gdb_vecs.h.
> 	* charset.c: Include gdb_vecs.h.
> 	* tracepoint.h: Include gdb_vecs.h.
> 	* gdb_vecs.h: New file.

FWIW, I tend to prefer the approach you took better. It's not a strong
preference, but if several places use the same type of vec, why not
share its declaration?

-- 
Joel


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