Skip to content

Commit

Permalink
add xh_del_int
Browse files Browse the repository at this point in the history
  • Loading branch information
nyuichi committed Jun 14, 2014
1 parent 47a31fd commit ddc2ea2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ static inline void xh_destroy(xhash *x);

static inline xh_entry *xh_get_int(xhash *x, int key);
static inline xh_entry *xh_put_int(xhash *x, int key, void *val);
static inline void xh_del_int(xhash *x, int key);

typedef struct xh_iter {
xhash *x;
Expand Down Expand Up @@ -257,6 +258,12 @@ xh_del(xhash *x, const void *key)
x->count--;
}

static inline void
xh_del_int(xhash *x, int key)
{
return xh_del(x, (void *)(intmax_t)key);
}

static inline void
xh_clear(xhash *x)
{
Expand Down

0 comments on commit ddc2ea2

Please sign in to comment.