Skip to content

The New Year's Eve Release

Latest
Compare
Choose a tag to compare
@P-p-H-d P-p-H-d released this 31 Dec 12:58
· 92 commits to master since this release

The main new features of this release are:

  • Generic Interface providing way to have the exact same code working on any registered type (like C++). Once the user registers the oplist of its own type, the provided function macros will handle this type like any other (using _Generic & typeof). See example However, the interface is still a WIP.
  • Exception memory model with RAII support (using M_LET): The destructor of stack variables are called when the exception is triggered. Previously written code using M_LET is fully compatible. Add macro M_CHAIN_OBJ to handle partially initially object. In C++ mode, it uses C++ try/catch. Otherwise it uses setjmp/longjmp. Release Limitation: not all M*LIB functions are exception aware (some functions may leave the object in a partial state when an exception is triggered). See example
  • Provide way of avoiding code duplication for multiple source C files (Using compiler extension) - either globally or per container instance. See M_USE_EXTERN_DECL & M_USE_DECL & M_USE_EXTERN_FINE_GRAINED and example and this

Other new features are:

  • Make Function Object interface trivially copyable
  • INIT_WITH support for shared pointer
  • Add more Emplace support for other containers (Tuple, ...)
  • Add string_it_set_ref & string_pop_u & string_cat_vprintf (by Kitterion)
  • Change M_BY_NARGS semantics
  • Add threads backend for FreeRTOS tasks.
  • Add M_WORKER_SPAWN_DEF2 for providing specialization and type-safe variant of m_worker_spawn.

And the usual update:

  • Add examples
  • Improve coverage of test suite (>99%)
  • Fix build issue with FreeBSD
  • Fix bugs (in particular in parsing incorrect data)
  • Remove new warnings by new version of compilers
  • Improve documentation