From: Tom Tromey Date: Fri, 4 Dec 2020 15:15:14 +0000 (-0700) Subject: Constify value_internal_function_name X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91f8721328eaab19d0613f6b5377849fe252c9c0;p=binutils-gdb.git Constify value_internal_function_name I noticed that value_internal_function_name should have a const return type. This patch makes this change. gdb/ChangeLog 2020-12-04 Tom Tromey * value.c (value_internal_function_name): Make return type const. * value.h (value_internal_function_name): Make return type const. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ea51985c99a..959e377888b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-12-04 Tom Tromey + + * value.c (value_internal_function_name): Make return type const. + * value.h (value_internal_function_name): Make return type const. + 2020-12-04 Luis Machado * aarch64-tdep.c (submask, bit, bits): Remove. diff --git a/gdb/value.c b/gdb/value.c index 0087fe577a1..eba5bce6d2e 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -2397,7 +2397,7 @@ create_internal_function (const char *name, return ifn; } -char * +const char * value_internal_function_name (struct value *val) { struct internal_function *ifn; diff --git a/gdb/value.h b/gdb/value.h index 2bd1999dc8f..d026c8ed950 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1198,7 +1198,7 @@ struct value *call_internal_function (struct gdbarch *gdbarch, struct value *function, int argc, struct value **argv); -char *value_internal_function_name (struct value *); +const char *value_internal_function_name (struct value *); /* Build a value wrapping and representing WORKER. The value takes ownership of the xmethod_worker object. */