internal.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros

#define | evhtp_likely(x) (x)
#define | evhtp_unlikely(x) (x)
#define | TAILQ_FOREACH_SAFE(var, head, field, tvar)
#define | evhtp_safe_free(_var, _freefn)
#define | evhtp_assert(x)
#define | evhtp_alloc_assert(x)
#define | evhtp_assert_fmt(x, fmt, ...)
#define | evhtp_errno_assert(x)

## Macro Definition Documentation

## evhtp_alloc_assert

#define evhtp_alloc_assert | ( |  | x | ) |

Value:
do { \
if (evhtp_unlikely(!x)) { \
fprintf(stderr, "Out of memory (%s:%s:%d)\n", \
__func__, __FILE__, __LINE__); \
fflush(stderr); \
abort(); \
} \
} while (0)
evhtp_unlikely
#define evhtp_unlikely(x)
Definition: internal.h:18

Definition at line 44 of file internal.h.

## evhtp_assert

#define evhtp_assert | ( |  | x | ) |

Value:
do { \
if (evhtp_unlikely(!(x))) { \
fprintf(stderr, "Assertion failed: %s (%s:%s:%d)\n", # x, \
__func__, __FILE__, __LINE__); \
fflush(stderr); \
abort(); \
} \
} while (0)
evhtp_unlikely
#define evhtp_unlikely(x)
Definition: internal.h:18

Definition at line 34 of file internal.h.

## evhtp_assert_fmt

#define evhtp_assert_fmt | ( |  | x,
|  |  | fmt,
|  |  | ...
| ) |  |

Value:
do { \
if (evhtp_unlikely(!(x))) { \
fprintf(stderr, "Assertion failed: %s (%s:%s:%d) " fmt "\n", \
# x, __func__, __FILE__, __LINE__, __VA_ARGS__); \
fflush(stderr); \
abort(); \
} \
} while (0)
evhtp_unlikely
#define evhtp_unlikely(x)
Definition: internal.h:18

Definition at line 54 of file internal.h.

## evhtp_errno_assert

#define evhtp_errno_assert | ( |  | x | ) |

Value:
do { \
if (evhtp_unlikely(!(x))) { \
fprintf(stderr, "%s [%d] (%s:%s:%d)\n", \
strerror(errno), errno, \
__func__, __FILE__, __LINE__); \
fflush(stderr); \
abort(); \
} \
} while (0)
evhtp_unlikely
#define evhtp_unlikely(x)
Definition: internal.h:18

Definition at line 64 of file internal.h.

## evhtp_likely

#define evhtp_likely | ( |  | x | ) | (x)

Definition at line 17 of file internal.h.

## evhtp_safe_free

#define evhtp_safe_free | ( |  | _var,
|  |  | _freefn
| ) |  |

Value:
do { \
_freefn((_var)); \
(_var) = NULL; \
} while (0)

Definition at line 28 of file internal.h.

## evhtp_unlikely

#define evhtp_unlikely | ( |  | x | ) | (x)

Definition at line 18 of file internal.h.

## TAILQ_FOREACH_SAFE

#define TAILQ_FOREACH_SAFE | ( |  | var,
|  |  | head,
|  |  | field,
|  |  | tvar
| ) |  |

Value:
for ((var) = TAILQ_FIRST((head)); \
(var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
(var) = (tvar))

Definition at line 22 of file internal.h.