aboutsummaryrefslogtreecommitdiff
path: root/include/pdp_debug.h
blob: a5e48fca6e4f2cb8569b6b399f82a8ed0aacd124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef __PDP_DEBUG_H_
#define __PDP_DEBUG_H_

#include "pdp_config.h" // needed for PDP_DEBUG define

void pdp_assert_hook (char *condition, char *file, int line);



#if PDP_DEBUG
#define PDP_ASSERT(x) if (!(x)) {pdp_assert_hook(#x, __FILE__, __LINE__);}
#else
#define PDP_ASSERT(x)
#endif

#endif //__PDP_DEBUG_H_