summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cpque.h
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2023-05-09 04:40:24 +0200
committerTyge Lovset <[email protected]>2023-05-09 04:40:24 +0200
commit99d94309f31f082b505180d2cb7c1c6c2215e9f0 (patch)
treeb4dd5aec779eff711e5e3fea0d356301c3969cd2 /include/stc/cpque.h
parent2f11c7cf36690a1493344189b6a011c26ee58a9b (diff)
downloadSTC-modified-99d94309f31f082b505180d2cb7c1c6c2215e9f0.tar.gz
STC-modified-99d94309f31f082b505180d2cb7c1c6c2215e9f0.zip
reverted cco_await_done => cco_await_at.
Diffstat (limited to 'include/stc/cpque.h')
-rw-r--r--include/stc/cpque.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/stc/cpque.h b/include/stc/cpque.h
index c76621cd..85002c67 100644
--- a/include/stc/cpque.h
+++ b/include/stc/cpque.h
@@ -36,7 +36,7 @@ typedef i_keyraw _cx_raw;
STC_API void _cx_memb(_make_heap)(_cx_self* self);
STC_API void _cx_memb(_erase_at)(_cx_self* self, intptr_t idx);
-STC_API void _cx_memb(_push)(_cx_self* self, _cx_value value);
+STC_API _cx_value* _cx_memb(_push)(_cx_self* self, _cx_value value);
STC_INLINE _cx_self _cx_memb(_init)(void)
{ return c_LITERAL(_cx_self){NULL}; }
@@ -144,7 +144,7 @@ _cx_memb(_erase_at)(_cx_self* self, const intptr_t idx) {
_cx_memb(_sift_down_)(self, idx + 1, n);
}
-STC_DEF void
+STC_DEF _cx_value*
_cx_memb(_push)(_cx_self* self, _cx_value value) {
if (self->_len == self->_cap)
_cx_memb(_reserve)(self, self->_len*3/2 + 4);
@@ -153,6 +153,7 @@ _cx_memb(_push)(_cx_self* self, _cx_value value) {
for (; c > 1 && (i_less((&arr[c/2]), (&value))); c /= 2)
arr[c] = arr[c/2];
arr[c] = value;
+ return arr + c;
}
#endif