home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Programming / Python2 / Python20_source / Parser / assert.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-10-25  |  405 b   |  20 lines

  1. #ifndef Py_ASSERT_H
  2. #define Py_ASSERT_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7.  
  8. #ifdef MPW /* This is for MPW's File command */
  9.  
  10. #define assert(e) { if (!(e)) { printf("### Python: Assertion failed:\n\
  11.     File %s; Line %d\n", __FILE__, __LINE__); abort(); } }
  12. #else
  13. #define assert(e) { if (!(e)) { printf("Assertion failed\n"); abort(); } }
  14. #endif
  15.  
  16. #ifdef __cplusplus
  17. }
  18. #endif
  19. #endif /* !Py_ASSERT_H */
  20.