aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/json1.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r--ext/misc/json1.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c
index 7fcd7342a..787b46982 100644
--- a/ext/misc/json1.c
+++ b/ext/misc/json1.c
@@ -26,6 +26,15 @@
#include "sqlite3ext.h"
#endif
SQLITE_EXTENSION_INIT1
+
+/* If compiling this extension separately (why would anybody do that when
+** it is built into the amalgamation?) we must set NDEBUG if SQLITE_DEBUG
+** is not defined *before* including <assert.h>, in order to disable asserts().
+*/
+#if !defined(SQLITE_AMALGAMATION) && !defined(SQLITE_DEBUG)
+# define NDEBUG 1
+#endif
+
#include <assert.h>
#include <string.h>
#include <stdlib.h>