summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cdeq.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-12-31 09:41:24 +0100
committerTyge Løvset <[email protected]>2022-12-31 09:41:24 +0100
commit91e79fc60713c1f09e940a7ee83ff2f8aa4f9d69 (patch)
treeb2f1eb8fef010ec490efcf0fb420b218ad23a4dd /include/stc/cdeq.h
parent89de800ff2e0a8389359a8a7a2684edaae8ce742 (diff)
downloadSTC-modified-91e79fc60713c1f09e940a7ee83ff2f8aa4f9d69.tar.gz
STC-modified-91e79fc60713c1f09e940a7ee83ff2f8aa4f9d69.zip
Internally renamed ccommon.h macros to uppercase. Lowercase macros are still supported via include/stc/priv/lowcase.h.
Diffstat (limited to 'include/stc/cdeq.h')
-rw-r--r--include/stc/cdeq.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/stc/cdeq.h b/include/stc/cdeq.h
index 9416d5b2..d9205e61 100644
--- a/include/stc/cdeq.h
+++ b/include/stc/cdeq.h
@@ -90,7 +90,7 @@ STC_INLINE size_t _cx_memb(_size)(const _cx_self* self) { return self->_le
STC_INLINE size_t _cx_memb(_capacity)(const _cx_self* self) { return self->_cap; }
STC_INLINE bool _cx_memb(_empty)(const _cx_self* self) { return !self->_len; }
STC_INLINE _cx_raw _cx_memb(_value_toraw)(const _cx_value* pval) { return i_keyto(pval); }
-STC_INLINE void _cx_memb(_swap)(_cx_self* a, _cx_self* b) { c_swap(_cx_self, *a, *b); }
+STC_INLINE void _cx_memb(_swap)(_cx_self* a, _cx_self* b) { c_SWAP(_cx_self, *a, *b); }
STC_INLINE _cx_value* _cx_memb(_front)(const _cx_self* self) { return self->data; }
STC_INLINE _cx_value* _cx_memb(_back)(const _cx_self* self)
{ return self->data + self->_len - 1; }
@@ -227,7 +227,7 @@ STC_DEF void
_cx_memb(_shrink_to_fit)(_cx_self *self) {
if (self->_len != self->_cap) {
memmove(self->_base, self->data, self->_len*sizeof(i_key));
- _cx_value* d = (_cx_value*)c_realloc(self->_base, self->_len*sizeof(i_key));
+ _cx_value* d = (_cx_value*)c_REALLOC(self->_base, self->_len*sizeof(i_key));
if (d) {
self->_base = d;
self->_cap = self->_len;
@@ -240,7 +240,7 @@ STC_DEF void
_cx_memb(_drop)(_cx_self* self) {
if (self->_base) {
_cx_memb(_clear)(self);
- c_free(self->_base);
+ c_FREE(self->_base);
}
}
@@ -248,7 +248,7 @@ static size_t
_cx_memb(_realloc_)(_cx_self* self, const size_t n) {
const size_t cap = (size_t)((float)self->_len*1.7f) + n + 7U;
const size_t nfront = _cdeq_nfront(self);
- _cx_value* d = (_cx_value*)c_realloc(self->_base, cap*sizeof(i_key));
+ _cx_value* d = (_cx_value*)c_REALLOC(self->_base, cap*sizeof(i_key));
if (!d)
return 0;
self->_cap = cap;