The parser doesn't need its own implementation of assert, and having its

own interfered with including Python.h.  Remove Python's assert.h.
This commit is contained in:
Tim Peters 2001-12-04 03:18:48 +00:00
parent db5a93cd6a
commit 1ca1296157
8 changed files with 18 additions and 38 deletions

View file

@ -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 */

View file

@ -1,11 +1,11 @@
/* Grammar implementation */
#include "Python.h"
#include "pgenheaders.h"
#include <ctype.h>
#include "assert.h"
#include "token.h"
#include "grammar.h"

View file

@ -1,8 +1,8 @@
/* Grammar subroutines needed by parser */
#include "Python.h"
#include "pgenheaders.h"
#include "assert.h"
#include "grammar.h"
#include "token.h"

View file

@ -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"

View file

@ -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"