From 2943e61864b5f8e18de9ec2ce0938d1b7d99ba8b Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Sat, 23 Feb 2002 03:57:26 +0000 Subject: Indicate that the bcache functions don't change the strings they're passed. * bcache.h (bcache, hash): Add `const' keywords to declarations. * bcache.c (bcache, hash): Add `const' keywords to definitions. --- gdb/bcache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/bcache.h') diff --git a/gdb/bcache.h b/gdb/bcache.h index 6b32c577d4f..2b03ead5a34 100644 --- a/gdb/bcache.h +++ b/gdb/bcache.h @@ -113,7 +113,7 @@ struct bcache { /* Find a copy of the LENGTH bytes at ADDR in BCACHE. If BCACHE has never seen those bytes before, add a copy of them to BCACHE. In either case, return a pointer to BCACHE's copy of that string. */ -extern void *bcache (void *addr, int length, struct bcache *bcache); +extern void *bcache (const void *addr, int length, struct bcache *bcache); /* Free all the storage that BCACHE refers to. The result is a valid, but empty, bcache. This does not free BCACHE itself, since that @@ -126,5 +126,5 @@ extern void free_bcache (struct bcache *bcache); `printf_filtered' and its ilk. */ extern void print_bcache_statistics (struct bcache *bcache, char *type); /* The hash function */ -extern unsigned long hash(void *addr, int length); +extern unsigned long hash(const void *addr, int length); #endif /* BCACHE_H */ -- cgit v1.2.1