aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.h
diff options
context:
space:
mode:
author lemon<lsof@mailbox.org>2023-06-04 13:15:15 +0200
committer lemon<lsof@mailbox.org>2023-06-04 13:15:15 +0200
commitd8f63a7c8f9ec6c1213e219d4b6d5d30ce595cdd (patch)
tree84f2f383fcd129332b3a0a6a7bb85666e7569934 /common.h
parent45cd3d8d6eeccc42f7e0b23f7871b29f3ce6f7e7 (diff)
evaluate call args backwards
Diffstat (limited to 'common.h')
-rw-r--r--common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common.h b/common.h
index 0bdd21a..6246f02 100644
--- a/common.h
+++ b/common.h
@@ -315,6 +315,7 @@ void freearena(struct arena *);
void vinit_(void **p, int *pcap, void *inlbuf, int cap, uint siz);
void vpush_(void **p, int *pcap, uint *pn, uint siz);
void *vpushn_(void **p, int *pcap, uint *pn, uint siz, const void *dat, uint ndat);
+void vresize_(void **p, int *pcap, uint *pn, uint siz, uint N);
extern void free(void *);
#define VINIT(inlbuf, Cap) { (inlbuf), (Cap) }
#define vfree(v) ((v)->_cap < 0 ? free((v)->p) : (void)0, memset((v), 0, sizeof*(v)))
@@ -322,6 +323,7 @@ extern void free(void *);
#define vpush(v, x) (vpush_((void **)&(v)->p, &(v)->_cap, &(v)->n, sizeof *(v)->p), \
(v)->p[(v)->n++] = (x))
#define vpushn(v, xs, N) vpushn_((void **)&(v)->p, &(v)->_cap, &(v)->n, sizeof *(v)->p, xs, N)
+#define vresize(v, N) vresize_((void **)&(v)->p, &(v)->_cap, &(v)->n, sizeof *(v)->p, N)
struct bitset { uvlong u; };
enum { BSNBIT = 8 * sizeof(uvlong) };