blob: d4ed72c006b7edb5ccfdea5e45d118303a503300 [file] [log] [blame]
Guido van Rossuma3309961993-07-28 09:05:47 +00001#ifndef Py_ASSERT_H
2#define Py_ASSERT_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
Guido van Rossumf70e43a1991-02-19 12:39:46 +00007
Guido van Rossumb6775db1994-08-01 11:34:53 +00008#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 Rossum85a5fbb1990-10-14 12:07:46 +000013#define assert(e) { if (!(e)) { printf("Assertion failed\n"); abort(); } }
Guido van Rossumb6775db1994-08-01 11:34:53 +000014#endif
Guido van Rossuma3309961993-07-28 09:05:47 +000015
16#ifdef __cplusplus
17}
18#endif
19#endif /* !Py_ASSERT_H */