This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: constify ada_decode_symbol
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 24 Jan 2013 21:46:52 +0400
- Subject: Re: RFC: constify ada_decode_symbol
- References: <87mwvztxby.fsf@fleche.redhat.com>
> ada_decode_symbol can be a little more const-correct.
> It still needs a cast, due to how it writes into 'gsymbol', but the
> resulting API is better, as it exposes more const-ness to the caller.
>
> Tested by rebuilding.
>
> Tom
>
> * ada-lang.h (ada_decode_symbol): Make return type const.
> * ada-lang.c (ada_decode_symbol): Likewise.
Thanks, Tom. I also think this is better, so please feel free to
go ahead and commit. I think I have another patch that adds constness
that's in our tree, and I haven't checked yet whether it could be
applied to the FSF tree. I'll try to work on that next week.
Cheers,
--
Joel