Commit 5f44a434 by Andrew Burgess

libiberty/hashtab: More const parameters

Makes some parameters const in libiberty's hashtab library.

include/ChangeLog:

        * hashtab.h (htab_remove_elt): Make a parameter const.
        (htab_remove_elt_with_hash): Likewise.

libiberty/ChangeLog:

        * hashtab.c (htab_remove_elt): Make a parameter const.
        (htab_remove_elt_with_hash): Likewise.
parent a2155f7d
2020-02-05 Andrew Burgess <andrew.burgess@embecosm.com>
* hashtab.h (htab_remove_elt): Make a parameter const.
(htab_remove_elt_with_hash): Likewise.
2020-01-10 Thomas Schwinge <thomas@codesourcery.com> 2020-01-10 Thomas Schwinge <thomas@codesourcery.com>
* gomp-constants.h (enum gomp_device_property): Remove. * gomp-constants.h (enum gomp_device_property): Remove.
......
...@@ -173,8 +173,8 @@ extern void * htab_find_with_hash (htab_t, const void *, hashval_t); ...@@ -173,8 +173,8 @@ extern void * htab_find_with_hash (htab_t, const void *, hashval_t);
extern void ** htab_find_slot_with_hash (htab_t, const void *, extern void ** htab_find_slot_with_hash (htab_t, const void *,
hashval_t, enum insert_option); hashval_t, enum insert_option);
extern void htab_clear_slot (htab_t, void **); extern void htab_clear_slot (htab_t, void **);
extern void htab_remove_elt (htab_t, void *); extern void htab_remove_elt (htab_t, const void *);
extern void htab_remove_elt_with_hash (htab_t, void *, hashval_t); extern void htab_remove_elt_with_hash (htab_t, const void *, hashval_t);
extern void htab_traverse (htab_t, htab_trav, void *); extern void htab_traverse (htab_t, htab_trav, void *);
extern void htab_traverse_noresize (htab_t, htab_trav, void *); extern void htab_traverse_noresize (htab_t, htab_trav, void *);
......
2020-02-05 Andrew Burgess <andrew.burgess@embecosm.com>
* hashtab.c (htab_remove_elt): Make a parameter const.
(htab_remove_elt_with_hash): Likewise.
2020-01-23 Alexandre Oliva <oliva@adacore.com> 2020-01-23 Alexandre Oliva <oliva@adacore.com>
* argv.c (writeargv): Output empty args as "". * argv.c (writeargv): Output empty args as "".
......
...@@ -709,7 +709,7 @@ htab_find_slot (htab_t htab, const PTR element, enum insert_option insert) ...@@ -709,7 +709,7 @@ htab_find_slot (htab_t htab, const PTR element, enum insert_option insert)
element in the hash table, this function does nothing. */ element in the hash table, this function does nothing. */
void void
htab_remove_elt (htab_t htab, PTR element) htab_remove_elt (htab_t htab, const PTR element)
{ {
htab_remove_elt_with_hash (htab, element, (*htab->hash_f) (element)); htab_remove_elt_with_hash (htab, element, (*htab->hash_f) (element));
} }
...@@ -720,7 +720,7 @@ htab_remove_elt (htab_t htab, PTR element) ...@@ -720,7 +720,7 @@ htab_remove_elt (htab_t htab, PTR element)
function does nothing. */ function does nothing. */
void void
htab_remove_elt_with_hash (htab_t htab, PTR element, hashval_t hash) htab_remove_elt_with_hash (htab_t htab, const PTR element, hashval_t hash)
{ {
PTR *slot; PTR *slot;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment