summaryrefslogtreecommitdiff
path: root/gdb/bcache.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-02-23 03:57:26 +0000
committerJim Blandy <jimb@codesourcery.com>2002-02-23 03:57:26 +0000
commit2943e61864b5f8e18de9ec2ce0938d1b7d99ba8b (patch)
treef78643f50895f011ff0399b618f62b62a7d3a214 /gdb/bcache.c
parent1664aa01938f63bdc2355531bd70d0a301208e3d (diff)
downloadgdb-2943e61864b5f8e18de9ec2ce0938d1b7d99ba8b.tar.gz
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.
Diffstat (limited to 'gdb/bcache.c')
-rw-r--r--gdb/bcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/bcache.c b/gdb/bcache.c
index 0f9c2a25ccc..753a916d2e8 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -33,7 +33,7 @@
*/
unsigned long
-hash(void *addr, int length)
+hash(const void *addr, int length)
{
const unsigned char *k, *e;
unsigned long h;
@@ -127,7 +127,7 @@ expand_hash_table (struct bcache *bcache)
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. */
void *
-bcache (void *addr, int length, struct bcache *bcache)
+bcache (const void *addr, int length, struct bcache *bcache)
{
int hash_index;
struct bstring *s;