Merge branch 'hmlen-null' of https://github.com/phoekz/stb into working
This commit is contained in:
commit
f9910f1f9a
5
stb_ds.h
5
stb_ds.h
@ -322,6 +322,7 @@ CREDITS
|
||||
Sean Barrett -- library, idea for dynamic array API/implementation
|
||||
Per Vognsen -- idea for hash table API/implementation
|
||||
Rafael Sachetto -- arrpop()
|
||||
Vinh Truong
|
||||
*/
|
||||
|
||||
#ifdef STBDS_UNIT_TESTS
|
||||
@ -510,8 +511,8 @@ extern void * stbds_shmode_func(size_t elemsize, int mode);
|
||||
|
||||
#define stbds_hmgets(t, k) (*stbds_hmgetp(t,k))
|
||||
#define stbds_hmget(t, k) (stbds_hmgetp(t,k)->value)
|
||||
#define stbds_hmlen(t) (stbds_arrlen((t)-1)-1)
|
||||
#define stbds_hmlenu(t) (stbds_arrlenu((t)-1)-1)
|
||||
#define stbds_hmlen(t) ((t) ? (ptrdiff_t) stbds_header((t)-1)->length-1 : 0)
|
||||
#define stbds_hmlenu(t) ((t) ? stbds_header((t)-1)->length-1 : 0)
|
||||
|
||||
#define stbds_shput(t, k, v) \
|
||||
((t) = stbds_hmput_key_wrapper((t), sizeof *(t), (void*) (k), sizeof (t)->key, STBDS_HM_STRING), \
|
||||
|
Loading…
Reference in New Issue
Block a user