style: remove extra const keyword from interfaces
Const variables in prototypes don't add much value, but make the code larger and redundant. Remove these const keywords. Note, this doesn't apply to pointers to const memory.
This commit is contained in:
11
src/hash.h
11
src/hash.h
@@ -18,23 +18,22 @@
|
||||
|
||||
typedef struct _hash_t hash_t;
|
||||
|
||||
typedef void (*hash_free_func)(const xmpp_ctx_t *const ctx, void *p);
|
||||
typedef void (*hash_free_func)(const xmpp_ctx_t *ctx, void *p);
|
||||
|
||||
/** allocate and initialize a new hash table */
|
||||
hash_t *
|
||||
hash_new(xmpp_ctx_t *const ctx, const int size, hash_free_func free_func);
|
||||
hash_t *hash_new(xmpp_ctx_t *ctx, int size, hash_free_func free_func);
|
||||
|
||||
/** allocate a new reference to an existing hash table */
|
||||
hash_t *hash_clone(hash_t *const table);
|
||||
hash_t *hash_clone(hash_t *table);
|
||||
|
||||
/** release a hash table when no longer needed */
|
||||
void hash_release(hash_t *const table);
|
||||
void hash_release(hash_t *table);
|
||||
|
||||
/** add a key, value pair to a hash table.
|
||||
* each key can appear only once; the value of any
|
||||
* identical key will be replaced
|
||||
*/
|
||||
int hash_add(hash_t *table, const char *const key, void *data);
|
||||
int hash_add(hash_t *table, const char *key, void *data);
|
||||
|
||||
/** look up a key in a hash table */
|
||||
void *hash_get(hash_t *table, const char *key);
|
||||
|
||||
Reference in New Issue
Block a user