mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Proper DEBUG flag
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
|
||||
#include "private/macros.h"
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define assert(e) ((void)0)
|
||||
#else
|
||||
#ifdef DEBUG
|
||||
#define assert(e) ((void) ((e) ? ((void)0) : __assert(#e, __FILE__, __LINE__)))
|
||||
#else
|
||||
#define assert(e) ((void)0)
|
||||
#endif
|
||||
|
||||
LIBA_BEGIN_DECLS
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define assert(e) ((void)0)
|
||||
#else
|
||||
#define assert(e) ((void) ((e) ? ((void)0) : __assert(#e, __FILE__, __LINE__)))
|
||||
#endif
|
||||
|
||||
void __assert(const char * expression, const char * file, int line) {
|
||||
abort();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user