]> granicus.if.org Git - postgresql/commitdiff
Define Trap and TrapMacro even in non-cassert builds.
authorRobert Haas <rhaas@postgresql.org>
Fri, 28 Jun 2013 13:30:38 +0000 (09:30 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 28 Jun 2013 13:33:34 +0000 (09:33 -0400)
In some cases, the use of these macros may be preferable to Assert()
or AssertMacro(), since this way the caller can set the trap message.

Andres Freund and Robert Haas

src/include/c.h

index f2c9e12fb3478613baf286c4bbf1585831443b31..596118342dfc4e4ba32741a9a9f3296747047ce8 100644 (file)
@@ -573,6 +573,9 @@ typedef NameData *Name;
 #define AssertMacro(condition) ((void)true)
 #define AssertArg(condition)
 #define AssertState(condition)
+#define Trap(condition, errorType)
+#define TrapMacro(condition, errorType)        (true)
+
 #elif defined(FRONTEND)
 
 #include <assert.h>