Hi,
This patch fix constness warning in the GnuLib hash module.
Regards,
--
Yoann Vandoorselaere | Responsable R&D / CTO | PreludeIDS Technologies
Tel: +33 (0)8 70 70 21 58 Fax: +33(0)4 78 42 21 58
http://www.prelude-ids.com
Index: lib/hash.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/hash.c,v
retrieving revision 1.38
diff -u -r1.38 hash.c
--- lib/hash.c 14 May 2005 06:03:58 -0000 1.38
+++ lib/hash.c 16 May 2005 12:55:13 -0000
@@ -905,7 +905,7 @@
Return NULL if the storage required for insertion cannot be allocated. */
void *
-hash_insert (Hash_table *table, const void *entry)
+hash_insert (Hash_table *table, void *entry)
{
void *data;
struct hash_entry *bucket;
@@ -929,11 +929,11 @@
/* Add ENTRY in the overflow of the bucket. */
- new_entry->data = (void *) entry;
+ new_entry->data = entry;
new_entry->next = bucket->next;
bucket->next = new_entry;
table->n_entries++;
- return (void *) entry;
+ return entry;
}
/* Add ENTRY right in the bucket head. */
@@ -980,7 +980,7 @@
table, don't modify the table and return NULL. */
void *
-hash_delete (Hash_table *table, const void *entry)
+hash_delete (Hash_table *table, void *entry)
{
void *data;
struct hash_entry *bucket;
Index: lib/hash.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/hash.h,v
retrieving revision 1.16
diff -u -r1.16 hash.h
--- lib/hash.h 14 May 2005 06:03:58 -0000 1.16
+++ lib/hash.h 16 May 2005 12:55:13 -0000
@@ -82,7 +82,7 @@
/* Insertion and deletion. */
bool hash_rehash (Hash_table *, size_t);
-void *hash_insert (Hash_table *, const void *);
-void *hash_delete (Hash_table *, const void *);
+void *hash_insert (Hash_table *, void *);
+void *hash_delete (Hash_table *, void *);
#endif
_______________________________________________
bug-gnulib mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnulib