Skip to content

Commit 5aace07

Browse files
committed
Use an assert() for the REQ() macro instead of making up our own
assertion.
1 parent a8bcf80 commit 5aace07

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

Include/node.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,7 @@ extern DL_IMPORT(void) PyNode_Free(node *n);
2727
#define STR(n) ((n)->n_str)
2828

2929
/* Assert that the type of a node is what we expect */
30-
#ifndef Py_DEBUG
31-
#define REQ(n, type) { /*pass*/ ; }
32-
#else
33-
#define REQ(n, type) \
34-
{ if (TYPE(n) != (type)) { \
35-
fprintf(stderr, "FATAL: node type %d, required %d\n", \
36-
TYPE(n), type); \
37-
abort(); \
38-
} }
39-
#endif
30+
#define REQ(n, type) assert(TYPE(n) == (type))
4031

4132
extern DL_IMPORT(void) PyNode_ListTree(node *);
4233

0 commit comments

Comments
 (0)