Skip to content
Myr

Merge branch 'master' of https://github.com/rsachetto/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 1737c34, caf9608 · Browse files · 1 file+4 added−1 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+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:stb_ds.h+4 added-1 removed
210 unmodified lines
211 hmputs212 shputs213 T hmputs(T*, T item)214 T shputs(T*, T item)215 Returns the structure corresponding to 'key' in the hashmap.215 Inserts a struct with T.key and T.value into the hashmap. If the struct is already216 present in the hashmap, updates it.217218 hmdel219 shdel220 int hmdel(T*, TK key)
99 unmodified lines
320#define arrlen stbds_arrlen321#define arrlenu stbds_arrlenu322#define arrput stbds_arrput323#define arrpush stbds_arrput324#define arrpop stbds_arrpop325#define arrfree stbds_arrfree326#define arraddn stbds_arraddn327#define arrsetlen stbds_arrsetlen328#define arrlast stbds_arrlast
107 unmodified lines
436#define stbds_arrlen(a) ((a) ? (ptrdiff_t) stbds_header(a)->length : 0)437#define stbds_arrlenu(a) ((a) ? stbds_header(a)->length : 0)438#define stbds_arrput(a,v) (stbds_arrmaybegrow(a,1), (a)[stbds_header(a)->length++] = (v))439#define stbds_arrpush stbds_arrput // synonym440#define stbds_arrpop(a) (stbds_header(a)->length--, (a)[stbds_header(a)->length])441#define stbds_arraddn(a,n) (stbds_arrmaybegrow(a,n), stbds_header(a)->length += (n))442#define stbds_arrlast(a) ((a)[stbds_header(a)->length-1])443#define stbds_arrfree(a) ((void) ((a) ? realloc(stbds_header(a),0) : 0), (a)=NULL)444#define stbds_arrdel(a,i) stbds_arrdeln(a,i,1)
1197 unmodified lines