summaryrefslogtreecommitdiffhomepage
path: root/examples
AgeCommit message (Collapse)Author
2021-12-12Try fix ptr_elems.c. Some more docs for cbox. Temporarily comment out ↵Tyge Løvset
benchmark Action
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-26Bugfix of c_atomic_decrement() asm version in csptr.h. Some cleanupTyge Løvset
2021-11-25Updated int params constness. Updated random.c example.Tyge 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-23BUGFIX: c_default_hash32() was buggy in ccommon.h - fixed.Tyge Løvset
2021-11-21Fixed option_mkdir.c return value.Tyge Løvset
2021-11-20Added carr_X_idx().Tyge Løvset
2021-11-12Added example option.cTyge Løvset
2021-11-03Changed carrN_X_at() to return const value*. Added mutable carrN_X_elem().Tyge Løvset
2021-11-03Changed container_X_get() and container_X_at() to return const value* (or ↵Tyge Løvset
const mapped*). Added container_X_getmut() for mutable version. Updated docs.
2021-10-30Fixed docs alignments.Tyge Løvset
2021-10-29Swapped .._equals() and _equalto() functions for consistencyTyge Løvset
2021-10-29Renamed ..._value_t -> ..._value, etc. Deprecated, still works for cvec, ↵Tyge Løvset
cdeq, cmap, csmap, cslist
2021-10-29renamed cx_..._t to _cx_..._t, and Self to _cx_selfTyge Løvset
2021-10-28updated shootouts, fixed some warningsTyge Løvset
2021-10-26Added some examples and updated docs. Removed cvec_X_erase() and ↵Tyge Løvset
cdeq_X_erase() - may be used wrong. Use cvec_X_erase_n() instead. Fixed type-bug in cpque.h (same was in cqueue.h).
2021-10-23Fixed bug in c_realloc() call ion cstack. Added assert in cmap_X_at(). Added ↵Tyge Løvset
a c++ example.
2021-10-18names.txt had dos line-ends also in linux.Tyge Lovset
2021-10-16Changed c_hash_default() function. Was bad on long strings. Updated mapmap.c ↵Tyge Løvset
example.
2021-10-13Maintenance update. template.h now includes cstr.h when i_key_str or ↵Tyge Løvset
i_val_str is defined. Minor optimizations.
2021-10-06Updates to previous commit on cvec and cdeq. Some example improvements.tylo
2021-10-06Remove side-effects from i_valdel() invocations in case it's a macro func.Tyge Lovset
2021-10-05Changed recommended order of defining template parameters.Tyge Løvset
2021-10-04Added c_autodefer() macro (again). Depressed warning with c_no_compare().Tyge Løvset
2021-10-04Removed c_apply_pair_n() macro. Small improvements in examples.Tyge Løvset
2021-10-02Some example improvements.Tyge Løvset
2021-09-30Update sptr_ex.cTyge Løvset
2021-09-30More cleanup. i_fwd is rarely needed, so removed F_tag. Use i_fwd define ↵Tyge Løvset
flag instead.
2021-09-29Changed forward declaration to support user defined container names with i_cnt.Tyge Løvset
2021-09-29Changed how to specify shared pointers in containers.Tyge Løvset
2021-09-28Added c_apply_n() and c_apply_pair_n() macros. Rewrote cpque.c example.Tyge Løvset
2021-09-24Another define fix in template.h. Added 2d string example in new_arr.cTyge Løvset
2021-09-24Reworked csptr docs. Made static members to inline (ccommon.h).Tyge Løvset
2021-09-23Cleanup: Replaced c_emplace() macro with more general ↵Tyge Løvset
c_apply()/c_apply_pair() macros, and removed c_var() macro. Removed CX_emplace_items() member functions in containers used by c_emplace().
2021-09-23Found bug/leak thanks to sanitizer:Tyge Løvset
#define i_key_csptr int // correct, auto setup cmp, keydel, keyfrom. #define i_key csptr_int // wrong unless cmp, keydel, keyfrom is also defined (correctly).
2021-09-23Added sptr_ex.c example + minors.Tyge Løvset
2021-09-23Moved new examples from tests folder to examplesTyge Løvset
2021-09-21Added copy(self, other) function to all containers. Fixed some docs.Tyge Løvset
2021-09-20Renamed macros: breaking changes for Version 2.0!Tyge Lovset
c_forvar => c_autovar c_forscope => c_autoscope c_forauto => c_auto Removed: c_fordefer(x); use c_forscope(0, x) instead. Added: c_exitauto; // continue
2021-09-19Corrected example output.Tyge Løvset
2021-09-19Replaced the two csptr doc examples with a better one. Same as sharedptr.c ↵Tyge Løvset
in examples.
2021-09-19Remove warnings.Tyge Løvset
2021-09-19Fixed errors caused by gcc -std=c99 -pedantic.Tyge Løvset
2021-09-19Fixed birthday.c double delete.Tyge Løvset
2021-09-19Merge branch 'master' of github.com:tylov/STC into masterTyge Løvset
2021-09-19Merge pull request #11 from Kamilcuk/masterTyge Løvset
Add build system and CI/CD testing