Skip to content
Myr

Merge branch 'hmlen-null' of https://github.com/phoekz/stb into working

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parents 8f0bade, fad8903 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:stb_ds.h+3 added-2 removed
320 unmodified lines
321322 Sean Barrett -- library, idea for dynamic array API/implementation323 Per Vognsen -- idea for hash table API/implementation324 Rafael Sachetto -- arrpop()325 Vinh Truong326*/327328#ifdef STBDS_UNIT_TESTS329#define _CRT_SECURE_NO_WARNINGS
180 unmodified lines
510 ((void) ((p) != NULL ? stbds_hmfree_func((p)-1,sizeof*(p),STBDS_OFFSETOF((p),key)),0 : 0),(p)=NULL)511512#define stbds_hmgets(t, k) (*stbds_hmgetp(t,k))513#define stbds_hmget(t, k) (stbds_hmgetp(t,k)->value)513#define stbds_hmlen(t) (stbds_arrlen((t)-1)-1)514#define stbds_hmlenu(t) (stbds_arrlenu((t)-1)-1)514#define stbds_hmlen(t) ((t) ? (ptrdiff_t) stbds_header((t)-1)->length-1 : 0)515#define stbds_hmlenu(t) ((t) ? stbds_header((t)-1)->length-1 : 0)516517#define stbds_shput(t, k, v) \518 ((t) = stbds_hmput_key_wrapper((t), sizeof *(t), (void*) (k), sizeof (t)->key, STBDS_HM_STRING), \519 (t)[stbds_temp(t-1)].value = (v))
1169 unmodified lines