Add const to first parameter of find_entry, iterate_table, and lookup.

This commit is contained in:
Ulrich Drepper 2001-12-10 01:18:36 +00:00
parent ba2dfdef58
commit a352ab4ca5
2 changed files with 7 additions and 7 deletions

View File

@ -70,7 +70,7 @@ hash_entry;
/* Prototypes for local functions. */
static void insert_entry_2 (hash_table *htab, const void *key, size_t keylen,
unsigned long hval, size_t idx, void *data);
static size_t lookup (hash_table *htab, const void *key, size_t keylen,
static size_t lookup (const hash_table *htab, const void *key, size_t keylen,
unsigned long int hval);
static unsigned long compute_hashval (const void *key, size_t keylen);
static int is_prime (unsigned long int candidate);
@ -188,7 +188,7 @@ insert_entry_2 (htab, key, keylen, hval, idx, data)
int
find_entry (htab, key, keylen, result)
hash_table *htab;
const hash_table *htab;
const void *key;
size_t keylen;
void **result;
@ -224,7 +224,7 @@ set_entry (htab, key, keylen, newval)
int
iterate_table (htab, ptr, key, keylen, data)
hash_table *htab;
const hash_table *htab;
void **ptr;
const void **key;
size_t *keylen;
@ -256,7 +256,7 @@ iterate_table (htab, ptr, key, keylen, data)
static size_t
lookup (htab, key, keylen, hval)
hash_table *htab;
const hash_table *htab;
const void *key;
size_t keylen;
unsigned long int hval;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
@ -37,12 +37,12 @@ extern int init_hash (hash_table *htab, unsigned long int init_size) __THROW;
extern int delete_hash (hash_table *htab) __THROW;
extern int insert_entry (hash_table *htab, const void *key, size_t keylen,
void *data) __THROW;
extern int find_entry (hash_table *htab, const void *key, size_t keylen,
extern int find_entry (const hash_table *htab, const void *key, size_t keylen,
void **result) __THROW;
extern int set_entry (hash_table *htab, const void *key, size_t keylen,
void *newval) __THROW;
extern int iterate_table (hash_table *htab, void **ptr,
extern int iterate_table (const hash_table *htab, void **ptr,
const void **key, size_t *keylen, void **data)
__THROW;