|
Zth (libzth)
|
Indirection support for C API functions. More...
Functions | |
| void | zth_logv_indirect (zth_logv_t *func) |
| Set the function pointer for zth_logv. | |
| void | zth_main_fiber_indirect (zth_main_fiber_t *func) |
| Set the function pointer for main_fiber. | |
| void | zth_assert_handler_indirect (zth_assert_handler_t *func) |
| Set the function pointer for zth_assert_handler. | |
| void | zth_postdeinit_indirect (zth_postdeinit_t *func) |
| Set the function pointer for zth_postdeinit. | |
| void | zth_preinit_indirect (zth_preinit_t *func) |
| Set the function pointer for zth_preinit. | |
| void | zth_terminate_indirect (zth_terminate_t *func) |
| Set the function pointer for zth_terminate. | |
| void | zth_indirect (zth_indirection_t const *indirection) |
| Set all function indirection pointers. | |
Indirection support for C API functions.
Several low-level functions can be overridden. For a static library, these are defined as weak symbols, allowing the application do define its own version. For a shared library, this does not work for all targets. So, this interface allows injecting function pointers to be called for the low-level functions.
| void zth_assert_handler_indirect | ( | zth_assert_handler_t * | func | ) |
Set the function pointer for zth_assert_handler.
Definition at line 96 of file indirection.cpp.
| void zth_indirect | ( | zth_indirection_t const * | indirection | ) |
Set all function indirection pointers.
| indirection | the struct with function pointers to set. If nullptr, all pointers are reset. |
Definition at line 133 of file indirection.cpp.
| void zth_logv_indirect | ( | zth_logv_t * | func | ) |
Set the function pointer for zth_logv.
Definition at line 78 of file indirection.cpp.
| void zth_main_fiber_indirect | ( | zth_main_fiber_t * | func | ) |
Set the function pointer for main_fiber.
Definition at line 87 of file indirection.cpp.
| void zth_postdeinit_indirect | ( | zth_postdeinit_t * | func | ) |
Set the function pointer for zth_postdeinit.
Definition at line 105 of file indirection.cpp.
| void zth_preinit_indirect | ( | zth_preinit_t * | func | ) |
Set the function pointer for zth_preinit.
Definition at line 114 of file indirection.cpp.
| void zth_terminate_indirect | ( | zth_terminate_t * | func | ) |
Set the function pointer for zth_terminate.
Definition at line 123 of file indirection.cpp.