Define Trap and TrapMacro even in non-cassert builds.

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
pull/6/head
Robert Haas 12 years ago
parent 9e0bc7c1e8
commit 5ee73525d5
  1. 3
      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>

Loading…
Cancel
Save