summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cstack.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-12-29 00:28:50 +0100
committerTyge Løvset <[email protected]>2022-12-29 00:28:50 +0100
commit0761c13f316cc98ae7756f3527931aa86bed5016 (patch)
treee90777558956fcf91d6b1c958e0c3a6fb0ab007f /include/stc/cstack.h
parentd623c6c85071b9af5d607bb5d9aceceaea05220a (diff)
downloadSTC-modified-0761c13f316cc98ae7756f3527931aa86bed5016.tar.gz
STC-modified-0761c13f316cc98ae7756f3527931aa86bed5016.zip
Restructuring of some headers into include/algo folder. Some API changes *_replace*() functions have been renamed, and a few minor API changes.
Diffstat (limited to 'include/stc/cstack.h')
-rw-r--r--include/stc/cstack.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/stc/cstack.h b/include/stc/cstack.h
index 73d0e2e1..e4b64848 100644
--- a/include/stc/cstack.h
+++ b/include/stc/cstack.h
@@ -52,6 +52,9 @@ STC_INLINE _cx_self _cx_memb(_init)(void) {
}
#ifdef i_capacity
+#define cstack_INITIALIZER(T, ...) \
+ {.data=__VA_ARGS__, ._len=sizeof((T[])__VA_ARGS__)/sizeof(T)}
+
STC_INLINE void _cx_memb(_create)(_cx_self* self)
{ self->_len = 0; }
#else