public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: cgen: constify GETT helpers
@ 2022-10-31 16:54 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2022-10-31 16:54 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ead2618501e8ba696bf29de635a9a5f6a1ba1b0e

commit ead2618501e8ba696bf29de635a9a5f6a1ba1b0e
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Wed Oct 26 22:30:13 2022 +0545

    sim: cgen: constify GETT helpers
    
    These functions only read from memory, so mark the pointer as const.

Diff:
---
 sim/common/cgen-mem.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sim/common/cgen-mem.h b/sim/common/cgen-mem.h
index 873194f3e3e..15ba8724b3b 100644
--- a/sim/common/cgen-mem.h
+++ b/sim/common/cgen-mem.h
@@ -181,13 +181,13 @@ DECLARE_SETMEM (DF, 8) /* TAGS: SETMEMDF */
    only used when interfacing with the outside world (e.g. gdb).  */
 
 #define DECLARE_GETT_EXTERN(mode, size) \
-extern mode XCONCAT2 (GETT,mode) (unsigned char *);
+extern mode XCONCAT2 (GETT,mode) (const unsigned char *);
 
 #if defined (MEMOPS_DEFINE_INLINE)
 #define DECLARE_GETT(mode, size) \
 DECLARE_GETT_EXTERN (mode, size) \
 mode \
-XCONCAT2 (GETT,mode) (unsigned char *p) \
+XCONCAT2 (GETT,mode) (const unsigned char *p) \
 { \
   mode tmp; \
   memcpy (&tmp, p, sizeof (mode)); \

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-31 16:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 16:54 [binutils-gdb] sim: cgen: constify GETT helpers Michael Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).