projects
/
users
/
gsingh
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e0bc7c
)
Define Trap and TrapMacro even in non-cassert builds.
author
Robert Haas
<rhaas@postgresql.org>
Fri, 28 Jun 2013 13:30:38 +0000
(09:30 -0400)
committer
Robert 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
patch
|
blob
|
blame
|
history
diff --git
a/src/include/c.h
b/src/include/c.h
index f2c9e12fb3478613baf286c4bbf1585831443b31..596118342dfc4e4ba32741a9a9f3296747047ce8 100644
(file)
--- a/
src/include/c.h
+++ b/
src/include/c.h
@@
-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>