Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 1 | #ifndef Py_ASSERT_H |
| 2 | #define Py_ASSERT_H |
| 3 | #ifdef __cplusplus |
| 4 | extern "C" { |
| 5 | #endif |
| 6 | |
Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 7 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 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 |
Guido van Rossum | 85a5fbb | 1990-10-14 12:07:46 +0000 | [diff] [blame] | 13 | #define assert(e) { if (!(e)) { printf("Assertion failed\n"); abort(); } } |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 14 | #endif |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 15 | |
| 16 | #ifdef __cplusplus |
| 17 | } |
| 18 | #endif |
| 19 | #endif /* !Py_ASSERT_H */ |