Zth (libzth)
Loading...
Searching...
No Matches
indirection.h File Reference
#include <libzth/macros.h>
#include <libzth/fiber.h>
#include <libzth/init.h>
#include <libzth/util.h>

Go to the source code of this file.

Classes

struct  zth_indirection_t
 

Macros

#define ZTH_INDIRECT_PROLOGUE(func, ...)
 
#define ZTH_INDIRECT_PROLOGUEV(func, ...)
 

Typedefs

typedef void() zth_logv_t(char const *fmt, va_list arg)
 
typedef int() zth_main_fiber_t(int argc, char **argv)
 
typedef void() zth_assert_handler_t(char const *file, int line, char const *expr)
 
typedef int() zth_postdeinit_t()
 
typedef void() zth_preinit_t()
 
typedef void() zth_terminate_t()
 

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.
 

Variables

zth_indirection_t zth_indirection
 

Macro Definition Documentation

◆ ZTH_INDIRECT_PROLOGUE

#define ZTH_INDIRECT_PROLOGUE (   func,
  ... 
)
Value:
if(::zth_indirection.func) \
return ::zth_indirection.func(__VA_ARGS__);
zth_indirection_t zth_indirection

Definition at line 131 of file indirection.h.

◆ ZTH_INDIRECT_PROLOGUEV

#define ZTH_INDIRECT_PROLOGUEV (   func,
  ... 
)
Value:
if(::zth_indirection.func) { \
::zth_indirection.func(__VA_ARGS__); \
return; \
}

Definition at line 135 of file indirection.h.

Typedef Documentation

◆ zth_assert_handler_t

typedef void() zth_assert_handler_t(char const *file, int line, char const *expr)

Definition at line 42 of file indirection.h.

◆ zth_logv_t

typedef void() zth_logv_t(char const *fmt, va_list arg)

Definition at line 40 of file indirection.h.

◆ zth_main_fiber_t

typedef int() zth_main_fiber_t(int argc, char **argv)

Definition at line 41 of file indirection.h.

◆ zth_postdeinit_t

typedef int() zth_postdeinit_t()

Definition at line 43 of file indirection.h.

◆ zth_preinit_t

typedef void() zth_preinit_t()

Definition at line 44 of file indirection.h.

◆ zth_terminate_t

typedef void() zth_terminate_t()

Definition at line 45 of file indirection.h.

Variable Documentation

◆ zth_indirection

zth_indirection_t zth_indirection
extern

Definition at line 10 of file indirection.cpp.