mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
db5a93cd6a
commit
1ca1296157
8 changed files with 18 additions and 38 deletions
|
@ -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 */
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
/* Grammar implementation */
|
||||
|
||||
#include "Python.h"
|
||||
#include "pgenheaders.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "assert.h"
|
||||
#include "token.h"
|
||||
#include "grammar.h"
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
/* Grammar subroutines needed by parser */
|
||||
|
||||
#include "Python.h"
|
||||
#include "pgenheaders.h"
|
||||
#include "assert.h"
|
||||
#include "grammar.h"
|
||||
#include "token.h"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue