Skip to content
Snippets Groups Projects
Commit d4640dd1 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Remove const modifier from mh_node macros

parent f9f648e6
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ void tc_space_free(struct tc_spaces *s) ...@@ -59,7 +59,7 @@ void tc_space_free(struct tc_spaces *s)
mh_int_t pos = 0; mh_int_t pos = 0;
while (pos != mh_end(space->hash_log)) { while (pos != mh_end(space->hash_log)) {
if (mh_exist((space->hash_log), pos)) { if (mh_exist((space->hash_log), pos)) {
struct tc_key *k = (struct tc_key *) struct tc_key *k =
*mh_pk_node(space->hash_log, pos); *mh_pk_node(space->hash_log, pos);
free(k); free(k);
} }
...@@ -68,7 +68,7 @@ void tc_space_free(struct tc_spaces *s) ...@@ -68,7 +68,7 @@ void tc_space_free(struct tc_spaces *s)
pos = 0; pos = 0;
while (pos != mh_end(space->hash_snap)) { while (pos != mh_end(space->hash_snap)) {
if (mh_exist((space->hash_snap), pos)) { if (mh_exist((space->hash_snap), pos)) {
struct tc_key *k = (struct tc_key *) struct tc_key *k =
*mh_pk_node(space->hash_snap, pos); *mh_pk_node(space->hash_snap, pos);
free(k); free(k);
} }
......
...@@ -162,10 +162,10 @@ void _mh(dump)(struct _mh(t) *h); ...@@ -162,10 +162,10 @@ void _mh(dump)(struct _mh(t) *h);
#define put_slot(h, node, hash_arg, eq_arg) \ #define put_slot(h, node, hash_arg, eq_arg) \
_mh(put_slot)(h, node, hash_arg, eq_arg) _mh(put_slot)(h, node, hash_arg, eq_arg)
static inline const mh_node_t * static inline mh_node_t *
_mh(node)(struct _mh(t) *h, mh_int_t x) _mh(node)(struct _mh(t) *h, mh_int_t x)
{ {
return (const mh_node_t *) &(h->p[x]); return (mh_node_t *) &(h->p[x]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment