summaryrefslogtreecommitdiffhomepage
path: root/include/stc/csptr.h
AgeCommit message (Collapse)Author
2021-12-22Renamed csptr to carc. i_key/val_ref renamed to i_key/val_sptr. Change ↵Tyge Løvset
inspired by Rust Arc/Rc. cbox name is taken from Rust Box type.
2021-12-22Renamed '_rawvalue\b' to '_raw'Tyge Løvset
2021-12-22Changed the c_apply() and c_apply_pair() to one new c_apply() API. Added ↵Tyge Løvset
c_pair(v) for convenience.
2021-12-21Minor improvement.Tyge Løvset
2021-12-21Fixed and simplified cbox and csptr.Tyge Løvset
2021-12-19Global rename of `_equ\b` => `_eq`. In practice `i_equ` must renamed to ↵Tyge Løvset
`i_eq` in user code if used.
2021-12-19First commit for Version 3 of STC. Main changes are consistent rename of ↵Tyge Løvset
'_del' to '_drop' and '_compare' to '_cmp'. Also i_key_ref (earlier i_key_sptr) and i_val_ref replaced by more general i_key_bind/i_val_bind.
2021-12-16Changed default comparison of csbox and csptr objects to comparing addresses ↵Tyge Løvset
to containing objects. If i_cmp is defined, it is used instead.
2021-12-12- Added **cbox** type: container of one element: similar to std::unique_ptr ↵Tyge Løvset
/ Rust Box. - Replaced example for **csptr** in docs. - Added [**c_forpair**](docs/ccommon_api.md) macro: for-loop with "structural binding" as in c++. - Deprecated *csptr_X_make()*. Renamed to *csptr_X_new()*. Corresponding **cbox** method is *cbox_X_new()*. - Deprecated *c_default_fromraw(raw)*. Renamed to *c_default_clone(raw)*. - Deprecated `i_key_csptr` / `i_val_csptr`. Use `i_key_ref` / `i_val_ref` when specifying containers with **csptr** or **cbox** elements. - Deprecated `i_cnt`. Use `i_type` instead to define the full container type name. - Bugfixes and docs updates.
2021-12-02shared_ptr atomic count: Using stdatomics.h for other compilers than gcc, ↵Tyge Løvset
clang or msvc.
2021-12-02Merge branch 'master' of github.com:tylov/STC into masterTyge Løvset
2021-12-02Breaking changes for i_fwd and i_cmp_none:Tyge Løvset
- Removed: i_cmp_none and i_fwd (replaced by c_no_compare and c_is_fwd args to i_opt). - Added compile-time disabling of clonable and comparable container elements, controlled by i_opt (c_no_clone | c_no_compare) - Added i_opt: can define multiple compile-time options: c_no_compare, c_no_clone, c_no_atomic, c_is_fwd: may be combined with | separator. - Except for csptr, when i_del / i_valdel / i_keydel is defined, also i_from / i_keyfrom / i_valfrom must be defined or i_opt c_no_clone. - For struct elements, either i_cmp must be defined (as before), or define i_opt c_no_compare for non-associative containers.
2021-11-26internal renamingsTyge Løvset
2021-11-26Fixed atomic_decrement final.Tyge Løvset
2021-11-26Bugfix of c_atomic_decrement() asm version in csptr.h. Some cleanupTyge Løvset
2021-11-24Deprecated c_no_compare(). Define i_cmp_none instead when you have/want no ↵Tyge Løvset
element comparison for cvec, cdeq, clist, csptr. Will give compile time error if functions depending on comparisons are used.
2021-11-21BREAKING CHANGE: Replaced c_new(T) with c_new(T, ...). This now is similar ↵Tyge Løvset
to the c++ new operator. The previous c_new(T) is renamed to c_alloc(T), and c_new_n(T,n) => c_alloc_n(T,n). Old usage of c_new() will fail as it requires additional argument. Sorry for the inconvenience.
2021-10-29renamed _cx_..._t to _cx_...Tyge Løvset
2021-10-29renamed cx_..._t to _cx_..._t, and Self to _cx_selfTyge Løvset
2021-09-22Fix: allow csptr self-take.Tyge Løvset
2021-09-22Reworked shared pointers, with some smaller API changes.Tyge Løvset
2021-09-22Fixed bug in csptr_copy on self assign.Tyge Løvset
2021-09-21Added copy(self, other) function to all containers. Fixed some docs.Tyge Løvset
2021-09-17Added example sharedptr.c and fixed some doc.Tyge Løvset
2021-09-17Added shared pointer csptr support + test.Tyge Løvset
2021-09-07Switched to lowercase input define symbols, e.g. i_KEY => i_key, etc.Tyge Løvset
2021-09-05New usage style. only cvec is functional. see vec_test_new.cTyge Løvset
2021-08-31Maintenance cleanup.Tyge Løvset
2021-06-11Added missing csptr_X_init() and csptr_X_use_count().Tyge Løvset
2021-06-09Revert to csptr_X_reset_with() to keep API, also better name.Tyge Løvset
2021-06-09Update to csptr docs.Tyge Løvset
2021-06-09Updated API and docs.Tyge Løvset
2021-06-09Updated header example.Tyge Løvset
2021-06-08Merge branch 'master' of https://github.com/tylo-work/C99Containers into masterTyge Løvset
2021-06-08Cleanup on atomics ops.Tyge Løvset
2021-06-07Improved csptr: cstr_make() as fast as std::shared_ptr::make_shared (single ↵Tyge Løvset
malloc). Added assign(), copy().
2021-06-02- Backported csmap_v1.h (with malloced nodes) to match csmap.Tyge Løvset
- Updated csmap/cmap to separate out types in order to later have incomplete values support. - Added incomplete value support to csptr. I question the need because recursive structures should not use shared_ptr. - Added c_forinitdel() macro, support up to 3 variables.
2021-05-20Moved stc folder into include folder.Tyge Løvset