aboutsummaryrefslogtreecommitdiff
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
commitd85a5daf253cfae20df8dde7fe6699cc830b7cf5 (patch)
treeb6835f22a75d0512208d11d46a0189f44c4f87db /gdb/bcache.c
parent374983f555df3df60025049178afe2e3f1993edc (diff)
downloadgdb-d85a5daf253cfae20df8dde7fe6699cc830b7cf5.zip
gdb-d85a5daf253cfae20df8dde7fe6699cc830b7cf5.tar.gz
gdb-d85a5daf253cfae20df8dde7fe6699cc830b7cf5.tar.bz2
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 0f9c2a2..753a916 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;