summaryrefslogtreecommitdiffhomepage
path: root/include/stc/carc.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-10-25 14:08:43 +0200
committerTyge Løvset <[email protected]>2022-10-25 14:08:43 +0200
commit89429e8e8242df35bc482c13c4a9f2b23e62e51d (patch)
tree2a5a82ec84e6e71299d455e5683bc9193b3fe6f2 /include/stc/carc.h
parent538fdd51a7e530adf2ab31a76deb9ac8e52f525e (diff)
downloadSTC-modified-89429e8e8242df35bc482c13c4a9f2b23e62e51d.tar.gz
STC-modified-89429e8e8242df35bc482c13c4a9f2b23e62e51d.zip
More and hopefully final fixes of cbox/carc.
API change: _from = _make, _new => _from
Diffstat (limited to 'include/stc/carc.h')
-rw-r--r--include/stc/carc.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/stc/carc.h b/include/stc/carc.h
index 91de0931..4e03af9b 100644
--- a/include/stc/carc.h
+++ b/include/stc/carc.h
@@ -113,7 +113,7 @@ STC_INLINE _cx_self _cx_memb(_from_ptr)(_cx_value* p) {
}
// c++: std::make_shared<_cx_value>(val)
-STC_INLINE _cx_self _cx_memb(_from)(_cx_value val) {
+STC_INLINE _cx_self _cx_memb(_make)(_cx_value val) {
_cx_self ptr;
_cx_carc_rep *rep = c_alloc(_cx_carc_rep);
*(ptr.use_count = &rep->counter) = 1;
@@ -150,11 +150,11 @@ STC_INLINE void _cx_memb(_reset_to)(_cx_self* self, _cx_value* p) {
}
#ifndef _i_no_emplace
-STC_INLINE _cx_self _cx_memb(_new)(_cx_raw raw)
- { return _cx_memb(_from)(i_keyfrom(raw)); }
+STC_INLINE _cx_self _cx_memb(_from)(_cx_raw raw)
+ { return _cx_memb(_make)(i_keyfrom(raw)); }
#else
-STC_INLINE _cx_self _cx_memb(_new)(_cx_value val)
- { return _cx_memb(_from)(val); }
+STC_INLINE _cx_self _cx_memb(_from)(_cx_value val)
+ { return _cx_memb(_make)(val); }
#endif
// does not use i_keyclone, so OK to always define.