Skip to content
Myr

Add arraddn back with void return and deprecated

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

authored by Andreas Molzer · committed by Andreas Molzer · parent e485c7d · Browse files · 1 file+4 added−0 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−0 removed

  • other:+4 added−0 removed

1 file+4 added−0 removed

modified:stb_ds.h+4 added
395 unmodified lines
396#define arrpop stbds_arrpop397#define arrfree stbds_arrfree398#define arraddnptr stbds_arraddnptr399#define arraddnoff stbds_arraddnoff400// deprecated401#define arraddn stbds_arraddn402#define arrsetlen stbds_arrsetlen403#define arrlast stbds_arrlast404#define arrins stbds_arrins405#define arrinsn stbds_arrinsn
123 unmodified lines
529#define stbds_arrlenu(a) ((a) ? stbds_header(a)->length : 0)530#define stbds_arrput(a,v) (stbds_arrmaybegrow(a,1), (a)[stbds_header(a)->length++] = (v))531#define stbds_arrpush stbds_arrput // synonym532#define stbds_arrpop(a) (stbds_header(a)->length--, (a)[stbds_header(a)->length])533// deprecated534#define stbds_arraddn(a,n) ((void)(stbds_arraddnoff(a, n)))535#define stbds_arraddnptr(a,n) (stbds_arrmaybegrow(a,n), stbds_header(a)->length += (n), &(a)[stbds_header(a)->length-(n)])536#define stbds_arraddnoff(a,n) (stbds_arrmaybegrow(a,n), stbds_header(a)->length += (n), stbds_header(a)->length-(n))537#define stbds_arrlast(a) ((a)[stbds_header(a)->length-1])538#define stbds_arrfree(a) ((void) ((a) ? STBDS_FREE(NULL,stbds_header(a)) : (void)0), (a)=NULL)
1302 unmodified lines