[Python-checkins] CVS: python/dist/src/Include node.h,2.18,2.19

Guido van Rossum gvanrossum@users.sourceforge.net
Mon, 15 Oct 2001 10:23:15 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv22162

Modified Files:
	node.h 
Log Message:
Use an assert() for the REQ() macro instead of making up our own
assertion.


Index: node.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/node.h,v
retrieving revision 2.18
retrieving revision 2.19
diff -C2 -d -r2.18 -r2.19
*** node.h	2000/09/01 23:29:26	2.18
--- node.h	2001/10/15 17:23:13	2.19
***************
*** 28,41 ****
  
  /* 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
  
  extern DL_IMPORT(void) PyNode_ListTree(node *);
--- 28,32 ----
  
  /* Assert that the type of a node is what we expect */
! #define REQ(n, type) assert(TYPE(n) == (type))
  
  extern DL_IMPORT(void) PyNode_ListTree(node *);