Don't unconditionally define NDEBUG so as to not interfere with other code.

This commit is contained in:
dnbaker 2019-05-06 10:46:54 -04:00
parent 810f9d209b
commit 28b3d95c5b

11
xxh3.h
View File

@ -47,8 +47,11 @@
#define XXH_INLINE_ALL
#include "xxhash.h"
#define NDEBUG
#include <assert.h>
#ifndef NDEBUG
# define NDEBUG
# define UNDEF_NDEBUG
# include <assert.h>
#endif
/* === Compiler versions === */
@ -803,4 +806,8 @@ XXH_PUBLIC_API XXH128_hash_t XXH128(const void* data, size_t len, XXH64_hash_t s
return XXH3_128bits_withSeed(data, len, seed);
}
#ifdef UNDEF_NDEBUG
# undef NDEBUG
#endif
#endif /* XXH3_H */