summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-12-04 03:18:48 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-12-04 03:18:48 (GMT)
commit1ca12961579c6a27597fc95b610b01af37734827 (patch)
treeada4e6065f27ec8f8260a8799009188913abcd87 /Parser
parentdb5a93cd6adcdf21ade2d7299a42cbeb475e656f (diff)
downloadcpython-1ca12961579c6a27597fc95b610b01af37734827.zip
cpython-1ca12961579c6a27597fc95b610b01af37734827.tar.gz
cpython-1ca12961579c6a27597fc95b610b01af37734827.tar.bz2
The parser doesn't need its own implementation of assert, and having its
own interfered with including Python.h. Remove Python's assert.h.
Diffstat (limited to 'Parser')
-rw-r--r--Parser/assert.h19
-rw-r--r--Parser/grammar.c2
-rw-r--r--Parser/grammar1.c2
-rw-r--r--Parser/parser.c2
-rw-r--r--Parser/pgen.c2
5 files changed, 4 insertions, 23 deletions
diff --git a/Parser/assert.h b/Parser/assert.h
deleted file mode 100644
index d4ed72c..0000000
--- a/Parser/assert.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef Py_ASSERT_H
-#define Py_ASSERT_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifdef MPW /* This is for MPW's File command */
-
-#define assert(e) { if (!(e)) { printf("### Python: Assertion failed:\n\
- File %s; Line %d\n", __FILE__, __LINE__); abort(); } }
-#else
-#define assert(e) { if (!(e)) { printf("Assertion failed\n"); abort(); } }
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* !Py_ASSERT_H */
diff --git a/Parser/grammar.c b/Parser/grammar.c
index 2a0574d..2cc15b58 100644
--- a/Parser/grammar.c
+++ b/Parser/grammar.c
@@ -1,11 +1,11 @@
/* Grammar implementation */
+#include "Python.h"
#include "pgenheaders.h"
#include <ctype.h>
-#include "assert.h"
#include "token.h"
#include "grammar.h"
diff --git a/Parser/grammar1.c b/Parser/grammar1.c
index b2631b7..912d387 100644
--- a/Parser/grammar1.c
+++ b/Parser/grammar1.c
@@ -1,8 +1,8 @@
/* Grammar subroutines needed by parser */
+#include "Python.h"
#include "pgenheaders.h"
-#include "assert.h"
#include "grammar.h"
#include "token.h"
diff --git a/Parser/parser.c b/Parser/parser.c
index a9125e2..3914143 100644
--- a/Parser/parser.c
+++ b/Parser/parser.c
@@ -5,8 +5,8 @@
/* XXX To do: error recovery */
+#include "Python.h"
#include "pgenheaders.h"
-#include "assert.h"
#include "token.h"
#include "grammar.h"
#include "node.h"
diff --git a/Parser/pgen.c b/Parser/pgen.c
index 47c817f..55ce7a1 100644
--- a/Parser/pgen.c
+++ b/Parser/pgen.c
@@ -4,8 +4,8 @@
/* For a description, see the comments at end of this file */
+#include "Python.h"
#include "pgenheaders.h"
-#include "assert.h"
#include "token.h"
#include "node.h"
#include "grammar.h"