Skip to content

0.4.1 - Refactor KLS_Region as an optional feature

Pre-release
Pre-release
Compare
Choose a tag to compare
@jgabaut jgabaut released this 03 Mar 14:31
· 2 commits to master since this release
dd2ce58

What's Changed

Breaking

These changes may cause minor breakage when updating from a previous version.

Any previous code should work as expected by defining KOLISEO_HAS_REGION macro before header inclusion.

  • All KLS_Region functionalities are now an optional feature
    • Building without defining KOLISEO_HAS_REGION provides a slimmer API.
  • Move pop() functions under experimental feature
    • Building without defining KOLISEO_HAS_EXPER doesn't include them.
  • Add kls_conf_init() as a convenience (since a designated initialiser would have to be coded as feature-sensitive over the Region-only field)
  • KLS_Stats's worst_pushcall_time requires KLS_DEBUG_CORE
  • Pack name starts with $(SHARED_LIB)

Updating

A good approach to updating would be:

  • Trying to build without defining KOLISEO_HAS_REGION
  • Ensuring to use kls_conf_init() if you don't like having preprocessor macros in your code
  • Otherwise, a wise macro-guarding of your previously-non-optional functions with the should be all that's needed.

New

  • Add KLS_PUSH_STR() macros to push C strings to a Koliseo
  • Support arbitrary allocation function for backing buffer
    • kls_new_alloc() takes a malloc-like function pointer to use
    • Defining KLS_DEFAULT_ALLOCF to be the name of your function will ensure your custom function will be called even on plain kls_new() calls
  • Add KLS_PUSH_EX() macros to automate passing a description field to pushes (defaults to passed type stringification)

Notes

  • Move title banner shenanigans under an optional feature
  • Bump amboso to 2.0.4
  • Bump invil to 0.2.8

PR - feat: 0.4.1 KLS_Region is an optional feature by @jgabaut

Full Changelog: 0.4.0...0.4.1