blob: e97534e791a0c9c3ca2847b49111c0426055e62d [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 Rossumfd71b9e2000-06-30 23:50:40 +00008Copyright (c) 2000, BeOpen.com.
9Copyright (c) 1995-2000, Corporation for National Research Initiatives.
10Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
11All rights reserved.
Guido van Rossumf70e43a1991-02-19 12:39:46 +000012
Guido van Rossumfd71b9e2000-06-30 23:50:40 +000013See the file "Misc/COPYRIGHT" for information on usage and
14redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Guido van Rossumf70e43a1991-02-19 12:39:46 +000015******************************************************************/
16
Guido van Rossumb6775db1994-08-01 11:34:53 +000017#ifdef MPW /* This is for MPW's File command */
18
19#define assert(e) { if (!(e)) { printf("### Python: Assertion failed:\n\
20 File %s; Line %d\n", __FILE__, __LINE__); abort(); } }
21#else
Guido van Rossum85a5fbb1990-10-14 12:07:46 +000022#define assert(e) { if (!(e)) { printf("Assertion failed\n"); abort(); } }
Guido van Rossumb6775db1994-08-01 11:34:53 +000023#endif
Guido van Rossuma3309961993-07-28 09:05:47 +000024
25#ifdef __cplusplus
26}
27#endif
28#endif /* !Py_ASSERT_H */