diff options
author | Tom Tromey <tromey@adacore.com> | 2023-02-16 08:10:59 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-02-16 08:10:59 -0700 |
commit | 6f63b61dd116becf96f47bb2dec61edd59f88a08 (patch) | |
tree | 3e47e61e0baf2be6c7d43e6277e8288d67210a90 /gdb/ada-lang.c | |
parent | 1e159729d97194857b4241fe1b5c327bd12a0945 (diff) | |
download | gdb-6f63b61dd116becf96f47bb2dec61edd59f88a08.zip gdb-6f63b61dd116becf96f47bb2dec61edd59f88a08.tar.gz gdb-6f63b61dd116becf96f47bb2dec61edd59f88a08.tar.bz2 |
Constify ada_main_name
Unlike the other *_main_name functions, ada_main_name returns a
non-const "char *". This is strange, though, because the caller
should not in fact modify or free this pointer. This patch changes
this function to constify its return type.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index ec85729..b5afba3 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -805,8 +805,8 @@ ada_update_initial_language (enum language lang) The result is good until the next call. Return NULL if the main procedure doesn't appear to be in Ada. */ -char * -ada_main_name (void) +const char * +ada_main_name () { struct bound_minimal_symbol msym; static gdb::unique_xmalloc_ptr<char> main_program_name; |