Closed slw287r closed 4 months ago
Hi, Heng:
I have compiling issues when using the _clear() call and found that the implementation line is dropped out of the r24 version. Add back the second line fix the issue.
_clear()
Thanks for the excellent lib.
https://github.com/attractivechaos/khashl/blob/592c23b2039fb74e230167aff8dd1b7e32287b75/khashl.h#L362
SCOPE khint_t prefix##_put(HType *h, khkey_t key, int *absent) { HType##_cs_bucket_t t; t.key = key, t.hash = __hash_fn(key); return prefix##_cs_putp(h, &t, absent); } \ SCOPE void prefix##_clear(HType *h) { if (h && h->used) { uint32_t n_buckets = 1U << h->bits; memset(h->used, 0, __kh_fsize(n_buckets) * sizeof(khint32_t)); h->count = 0; }}
Thanks a lot for all these reports! prefix##_clear() should work now. Let me know if you see new problems. Thanks again.
Hi, Heng:
I have compiling issues when using the
_clear()
call and found that the implementation line is dropped out of the r24 version. Add back the second line fix the issue.Thanks for the excellent lib.
https://github.com/attractivechaos/khashl/blob/592c23b2039fb74e230167aff8dd1b7e32287b75/khashl.h#L362