diff options
author | Guido van Rossum <guido@python.org> | 2001-10-15 17:23:13 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-10-15 17:23:13 (GMT) |
commit | 5aace07fe00d36fc0bf639ef38c3fc7cdc87eeea (patch) | |
tree | 79eb6e57ef350a789c32cf5d265b62576b7fd40c /Include/node.h | |
parent | a8bcf80e7bde79c722d4cb76ded118d9dd0ffbca (diff) | |
download | cpython-5aace07fe00d36fc0bf639ef38c3fc7cdc87eeea.zip cpython-5aace07fe00d36fc0bf639ef38c3fc7cdc87eeea.tar.gz cpython-5aace07fe00d36fc0bf639ef38c3fc7cdc87eeea.tar.bz2 |
Use an assert() for the REQ() macro instead of making up our own
assertion.
Diffstat (limited to 'Include/node.h')
-rw-r--r-- | Include/node.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Include/node.h b/Include/node.h index df6e518..59f4d72 100644 --- a/Include/node.h +++ b/Include/node.h @@ -27,16 +27,7 @@ extern DL_IMPORT(void) PyNode_Free(node *n); #define STR(n) ((n)->n_str) /* Assert that the type of a node is what we expect */ -#ifndef Py_DEBUG -#define REQ(n, type) { /*pass*/ ; } -#else -#define REQ(n, type) \ - { if (TYPE(n) != (type)) { \ - fprintf(stderr, "FATAL: node type %d, required %d\n", \ - TYPE(n), type); \ - abort(); \ - } } -#endif +#define REQ(n, type) assert(TYPE(n) == (type)) extern DL_IMPORT(void) PyNode_ListTree(node *); |