Skip to content

Commit

Permalink
kh_put return value should be found index
Browse files Browse the repository at this point in the history
  • Loading branch information
ksss committed Apr 11, 2014
1 parent b6cfe0e commit 91f68f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/mruby/khash.h
Expand Up @@ -190,15 +190,16 @@ kh_fill_flags(uint8_t *p, uint8_t c, size_t len)
h->keys[del_k] = key; \
h->ed_flags[del_k/4] &= ~__m_del[del_k%4]; \
h->size++; \
return del_k; \
} \
else { \
/* put at empty */ \
h->keys[k] = key; \
h->ed_flags[k/4] &= ~__m_empty[k%4]; \
h->size++; \
h->n_occupied++; \
return k; \
} \
return k; \
} \
void kh_del_##name(mrb_state *mrb, kh_##name##_t *h, khint_t x) \
{ \
Expand Down

0 comments on commit 91f68f7

Please sign in to comment.