diff options
| author | Lou Berger <lberger@labn.net> | 2019-05-02 06:34:17 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-02 06:34:17 -0400 |
| commit | eefbfd1d276d3c31ac87256785f463b840c55797 (patch) | |
| tree | 1c78b93a46dc5ce031e24209369ee460aa19ca55 /lib/typesafe.h | |
| parent | 5390986617ff6f1f0047287c873a97b1048074eb (diff) | |
| parent | be6f84af73d0f9cc28c485512cba200aecded424 (diff) | |
Merge pull request #4236 from donaldsharp/zebra_diet
Zebra diet
Diffstat (limited to 'lib/typesafe.h')
| -rw-r--r-- | lib/typesafe.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/typesafe.h b/lib/typesafe.h index bbf3ce8f1c..94002da599 100644 --- a/lib/typesafe.h +++ b/lib/typesafe.h @@ -275,7 +275,7 @@ macro_pure size_t prefix ## _count(struct prefix##_head *h) \ #define DECLARE_SORTLIST_UNIQ(prefix, type, field, cmpfn) \ _DECLARE_SORTLIST(prefix, type, field, cmpfn, cmpfn) \ \ -macro_inline type *prefix ## _find(struct prefix##_head *h, const type *item) \ +macro_inline type *prefix ## _find(const struct prefix##_head *h, const type *item) \ { \ struct ssort_item *sitem = h->sh.first; \ int cmpval = 0; \ @@ -383,7 +383,7 @@ macro_inline type *prefix ## _add(struct prefix##_head *h, type *item) \ *np = &item->field.hi; \ return NULL; \ } \ -macro_inline type *prefix ## _find(struct prefix##_head *h, const type *item) \ +macro_inline type *prefix ## _find(const struct prefix##_head *h, const type *item) \ { \ if (!h->hh.tabshift) \ return NULL; \ @@ -576,7 +576,7 @@ macro_inline int prefix ## __cmp(const struct sskip_item *a, \ return cmpfn(container_of(a, type, field.si), \ container_of(b, type, field.si)); \ } \ -macro_inline type *prefix ## _find(struct prefix##_head *h, const type *item) \ +macro_inline type *prefix ## _find(const struct prefix##_head *h, const type *item) \ { \ struct sskip_item *sitem = typesafe_skiplist_find(&h->sh, \ &item->field.si, &prefix ## __cmp); \ |
