Data Structures | Macros | Typedefs
defs.h File Reference
#include <assert.h>
#include <stdarg.h>

Go to the source code of this file.

Data Structures

struct  message
 

Macros

#define EVENT_HANDLER_MAX_ARGC   10
 
#define VA_EVENT_INIT(event, h, a)
 

Typedefs

typedef void(* argv_callback) (void **argv)
 
typedef struct message Event
 
typedef void(* event_scheduler) (Event event, void *data)
 

Macro Definition Documentation

◆ EVENT_HANDLER_MAX_ARGC

#define EVENT_HANDLER_MAX_ARGC   10

◆ VA_EVENT_INIT

#define VA_EVENT_INIT (   event,
  h,
 
)
Value:
do { \
assert(a <= EVENT_HANDLER_MAX_ARGC); \
(event)->handler = h; \
if (a) { \
va_list args; \
va_start(args, a); \
for (int i = 0; i < a; i++) { \
(event)->argv[i] = va_arg(args, void *); \
} \
va_end(args); \
} \
} while (0)

Typedef Documentation

◆ argv_callback

typedef void(* argv_callback) (void **argv)

◆ Event

typedef struct message Event

◆ event_scheduler

typedef void(* event_scheduler) (Event event, void *data)
i
static void int i
Definition: edit.c:2997
argv
static int typval_T argv[3]
Definition: eval.c:6533
event
void event(char *name, Array args, bool *args_consumed) FUNC_API_NOEXPORT
args
va_list args
Definition: log.c:149
EVENT_HANDLER_MAX_ARGC
#define EVENT_HANDLER_MAX_ARGC
Definition: defs.h:7