From 91f8721328eaab19d0613f6b5377849fe252c9c0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 4 Dec 2020 08:15:14 -0700 Subject: [PATCH] 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. --- gdb/ChangeLog | 5 +++++ gdb/value.c | 2 +- gdb/value.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) 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. */ -- 2.30.2