mirror of
https://github.com/python/cpython.git
synced 2025-11-09 14:06:30 +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
|
|
@ -407,7 +407,6 @@ $(PGEN): $(PGENOBJS)
|
||||||
$(CC) $(OPT) $(PGENOBJS) $(LIBS) -o $(PGEN)
|
$(CC) $(OPT) $(PGENOBJS) $(LIBS) -o $(PGEN)
|
||||||
|
|
||||||
Parser/grammar.o: $(srcdir)/Parser/grammar.c \
|
Parser/grammar.o: $(srcdir)/Parser/grammar.c \
|
||||||
$(srcdir)/Parser/assert.h \
|
|
||||||
$(srcdir)/Include/token.h \
|
$(srcdir)/Include/token.h \
|
||||||
$(srcdir)/Include/grammar.h
|
$(srcdir)/Include/grammar.h
|
||||||
Parser/metagrammar.o: $(srcdir)/Parser/metagrammar.c
|
Parser/metagrammar.o: $(srcdir)/Parser/metagrammar.c
|
||||||
|
|
|
||||||
|
|
@ -792,7 +792,7 @@ md5module.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\clas
|
||||||
$(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \
|
$(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \
|
||||||
$(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h
|
$(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h
|
||||||
|
|
||||||
mpzmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_PARSER)\assert.h $(PY_INCLUDE)\ceval.h \
|
mpzmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \
|
||||||
$(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \
|
$(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \
|
||||||
pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \
|
pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \
|
||||||
$(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h \
|
$(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h \
|
||||||
|
|
@ -972,7 +972,7 @@ regexmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \
|
||||||
$(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \
|
$(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \
|
||||||
$(PY_INCLUDE)\tupleobject.h
|
$(PY_INCLUDE)\tupleobject.h
|
||||||
|
|
||||||
regexpr.obj: $(PY_INCLUDE)\abstract.h $(PY_PARSER)\assert.h $(PY_INCLUDE)\ceval.h \
|
regexpr.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \
|
||||||
$(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \
|
$(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \
|
||||||
pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \
|
pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \
|
||||||
$(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h \
|
$(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h \
|
||||||
|
|
@ -1415,7 +1415,7 @@ listobject.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\cla
|
||||||
$(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \
|
$(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \
|
||||||
$(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h
|
$(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h
|
||||||
|
|
||||||
longobject.obj: $(PY_INCLUDE)\abstract.h $(PY_PARSER)\assert.h $(PY_INCLUDE)\ceval.h \
|
longobject.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \
|
||||||
$(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \
|
$(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \
|
||||||
pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \
|
pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \
|
||||||
$(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h \
|
$(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h \
|
||||||
|
|
@ -1565,11 +1565,11 @@ firstsets.obj: $(PY_INCLUDE)\bitset.h pyconfig.h $(PY_INCLUDE)\grammar.h \
|
||||||
$(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h $(PY_INCLUDE)\pgenheaders.h \
|
$(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h $(PY_INCLUDE)\pgenheaders.h \
|
||||||
$(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h
|
$(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h
|
||||||
|
|
||||||
grammar.obj: $(PY_PARSER)\assert.h $(PY_INCLUDE)\bitset.h pyconfig.h \
|
grammar.obj: $(PY_INCLUDE)\bitset.h pyconfig.h \
|
||||||
$(PY_INCLUDE)\grammar.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \
|
$(PY_INCLUDE)\grammar.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \
|
||||||
$(PY_INCLUDE)\pgenheaders.h $(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h
|
$(PY_INCLUDE)\pgenheaders.h $(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h
|
||||||
|
|
||||||
grammar1.obj: $(PY_PARSER)\assert.h $(PY_INCLUDE)\bitset.h pyconfig.h \
|
grammar1.obj: $(PY_INCLUDE)\bitset.h pyconfig.h \
|
||||||
$(PY_INCLUDE)\grammar.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \
|
$(PY_INCLUDE)\grammar.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \
|
||||||
$(PY_INCLUDE)\pgenheaders.h $(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h
|
$(PY_INCLUDE)\pgenheaders.h $(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h
|
||||||
|
|
||||||
|
|
@ -1590,7 +1590,7 @@ myreadline.obj: pyconfig.h $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\mymalloc.h \
|
||||||
node.obj: pyconfig.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h $(PY_INCLUDE)\node.h \
|
node.obj: pyconfig.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h $(PY_INCLUDE)\node.h \
|
||||||
$(PY_INCLUDE)\pgenheaders.h $(PY_INCLUDE)\pydebug.h
|
$(PY_INCLUDE)\pgenheaders.h $(PY_INCLUDE)\pydebug.h
|
||||||
|
|
||||||
parser.obj: $(PY_PARSER)\assert.h $(PY_INCLUDE)\bitset.h pyconfig.h $(PY_INCLUDE)\errcode.h \
|
parser.obj: $(PY_INCLUDE)\bitset.h pyconfig.h $(PY_INCLUDE)\errcode.h \
|
||||||
$(PY_INCLUDE)\grammar.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \
|
$(PY_INCLUDE)\grammar.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \
|
||||||
$(PY_INCLUDE)\node.h $(PY_PARSER)\parser.h $(PY_INCLUDE)\pgenheaders.h \
|
$(PY_INCLUDE)\node.h $(PY_PARSER)\parser.h $(PY_INCLUDE)\pgenheaders.h \
|
||||||
$(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h
|
$(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h
|
||||||
|
|
@ -1601,7 +1601,7 @@ parsetok.obj: $(PY_INCLUDE)\bitset.h pyconfig.h $(PY_INCLUDE)\errcode.h \
|
||||||
$(PY_INCLUDE)\pgenheaders.h $(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h \
|
$(PY_INCLUDE)\pgenheaders.h $(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h \
|
||||||
$(PY_PARSER)\tokenizer.h
|
$(PY_PARSER)\tokenizer.h
|
||||||
|
|
||||||
pgen.obj: $(PY_PARSER)\assert.h $(PY_INCLUDE)\bitset.h pyconfig.h $(PY_INCLUDE)\grammar.h \
|
pgen.obj: $(PY_INCLUDE)\bitset.h pyconfig.h $(PY_INCLUDE)\grammar.h \
|
||||||
$(PY_INCLUDE)\metagrammar.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \
|
$(PY_INCLUDE)\metagrammar.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \
|
||||||
$(PY_INCLUDE)\node.h $(PY_PARSER)\pgen.h $(PY_INCLUDE)\pgenheaders.h \
|
$(PY_INCLUDE)\node.h $(PY_PARSER)\pgen.h $(PY_INCLUDE)\pgenheaders.h \
|
||||||
$(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h
|
$(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\token.h
|
||||||
|
|
|
||||||
|
|
@ -611,7 +611,7 @@ md5module.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \
|
||||||
pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \
|
pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \
|
||||||
traceback.h tupleobject.h
|
traceback.h tupleobject.h
|
||||||
|
|
||||||
mpzmodule.obj: abstract.h assert.h ceval.h classobject.h cobject.h \
|
mpzmodule.obj: abstract.h ceval.h classobject.h cobject.h \
|
||||||
complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \
|
complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \
|
||||||
funcobject.h import.h intobject.h intrcheck.h listobject.h \
|
funcobject.h import.h intobject.h intrcheck.h listobject.h \
|
||||||
longintrepr.h longobject.h methodobject.h modsupport.h \
|
longintrepr.h longobject.h methodobject.h modsupport.h \
|
||||||
|
|
@ -716,7 +716,7 @@ regexmodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \
|
||||||
pythonrun.h rangeobject.h regexpr.h sliceobject.h stringobject.h \
|
pythonrun.h rangeobject.h regexpr.h sliceobject.h stringobject.h \
|
||||||
sysmodule.h traceback.h tupleobject.h
|
sysmodule.h traceback.h tupleobject.h
|
||||||
|
|
||||||
regexpr.obj: abstract.h assert.h ceval.h classobject.h cobject.h \
|
regexpr.obj: abstract.h ceval.h classobject.h cobject.h \
|
||||||
complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \
|
complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \
|
||||||
funcobject.h import.h intobject.h intrcheck.h listobject.h \
|
funcobject.h import.h intobject.h intrcheck.h listobject.h \
|
||||||
longobject.h methodobject.h modsupport.h moduleobject.h mymalloc.h \
|
longobject.h methodobject.h modsupport.h moduleobject.h mymalloc.h \
|
||||||
|
|
@ -987,7 +987,7 @@ listobject.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \
|
||||||
pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \
|
pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \
|
||||||
traceback.h tupleobject.h
|
traceback.h tupleobject.h
|
||||||
|
|
||||||
longobject.obj: abstract.h assert.h ceval.h classobject.h cobject.h \
|
longobject.obj: abstract.h ceval.h classobject.h cobject.h \
|
||||||
complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \
|
complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \
|
||||||
funcobject.h import.h intobject.h intrcheck.h listobject.h \
|
funcobject.h import.h intobject.h intrcheck.h listobject.h \
|
||||||
longintrepr.h longobject.h methodobject.h modsupport.h \
|
longintrepr.h longobject.h methodobject.h modsupport.h \
|
||||||
|
|
@ -1076,10 +1076,10 @@ bitset.obj: bitset.h pyconfig.h mymalloc.h myproto.h pgenheaders.h pydebug.h
|
||||||
firstsets.obj: bitset.h pyconfig.h grammar.h mymalloc.h myproto.h \
|
firstsets.obj: bitset.h pyconfig.h grammar.h mymalloc.h myproto.h \
|
||||||
pgenheaders.h pydebug.h token.h
|
pgenheaders.h pydebug.h token.h
|
||||||
|
|
||||||
grammar.obj: assert.h bitset.h pyconfig.h grammar.h mymalloc.h myproto.h \
|
grammar.obj: bitset.h pyconfig.h grammar.h mymalloc.h myproto.h \
|
||||||
pgenheaders.h pydebug.h token.h
|
pgenheaders.h pydebug.h token.h
|
||||||
|
|
||||||
grammar1.obj: assert.h bitset.h pyconfig.h grammar.h mymalloc.h myproto.h \
|
grammar1.obj: bitset.h pyconfig.h grammar.h mymalloc.h myproto.h \
|
||||||
pgenheaders.h pydebug.h token.h
|
pgenheaders.h pydebug.h token.h
|
||||||
|
|
||||||
intrcheck.obj: pyconfig.h intrcheck.h mymalloc.h myproto.h
|
intrcheck.obj: pyconfig.h intrcheck.h mymalloc.h myproto.h
|
||||||
|
|
@ -1094,14 +1094,14 @@ myreadline.obj: pyconfig.h intrcheck.h mymalloc.h myproto.h
|
||||||
|
|
||||||
node.obj: pyconfig.h mymalloc.h myproto.h node.h pgenheaders.h pydebug.h
|
node.obj: pyconfig.h mymalloc.h myproto.h node.h pgenheaders.h pydebug.h
|
||||||
|
|
||||||
parser.obj: assert.h bitset.h pyconfig.h errcode.h grammar.h mymalloc.h \
|
parser.obj: bitset.h pyconfig.h errcode.h grammar.h mymalloc.h \
|
||||||
myproto.h node.h parser.h pgenheaders.h pydebug.h token.h
|
myproto.h node.h parser.h pgenheaders.h pydebug.h token.h
|
||||||
|
|
||||||
parsetok.obj: bitset.h pyconfig.h errcode.h grammar.h mymalloc.h myproto.h \
|
parsetok.obj: bitset.h pyconfig.h errcode.h grammar.h mymalloc.h myproto.h \
|
||||||
node.h parser.h parsetok.h pgenheaders.h pydebug.h token.h \
|
node.h parser.h parsetok.h pgenheaders.h pydebug.h token.h \
|
||||||
tokenizer.h
|
tokenizer.h
|
||||||
|
|
||||||
pgen.obj: assert.h bitset.h pyconfig.h grammar.h metagrammar.h mymalloc.h \
|
pgen.obj: bitset.h pyconfig.h grammar.h metagrammar.h mymalloc.h \
|
||||||
myproto.h node.h pgen.h pgenheaders.h pydebug.h token.h
|
myproto.h node.h pgen.h pgenheaders.h pydebug.h token.h
|
||||||
|
|
||||||
pgenmain.obj: bitset.h pyconfig.h grammar.h mymalloc.h myproto.h node.h \
|
pgenmain.obj: bitset.h pyconfig.h grammar.h mymalloc.h myproto.h node.h \
|
||||||
|
|
|
||||||
|
|
@ -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 */
|
/* Grammar implementation */
|
||||||
|
|
||||||
|
#include "Python.h"
|
||||||
#include "pgenheaders.h"
|
#include "pgenheaders.h"
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "assert.h"
|
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
#include "grammar.h"
|
#include "grammar.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
/* Grammar subroutines needed by parser */
|
/* Grammar subroutines needed by parser */
|
||||||
|
|
||||||
|
#include "Python.h"
|
||||||
#include "pgenheaders.h"
|
#include "pgenheaders.h"
|
||||||
#include "assert.h"
|
|
||||||
#include "grammar.h"
|
#include "grammar.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
/* XXX To do: error recovery */
|
/* XXX To do: error recovery */
|
||||||
|
|
||||||
|
#include "Python.h"
|
||||||
#include "pgenheaders.h"
|
#include "pgenheaders.h"
|
||||||
#include "assert.h"
|
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
#include "grammar.h"
|
#include "grammar.h"
|
||||||
#include "node.h"
|
#include "node.h"
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
/* For a description, see the comments at end of this file */
|
/* For a description, see the comments at end of this file */
|
||||||
|
|
||||||
|
#include "Python.h"
|
||||||
#include "pgenheaders.h"
|
#include "pgenheaders.h"
|
||||||
#include "assert.h"
|
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
#include "node.h"
|
#include "node.h"
|
||||||
#include "grammar.h"
|
#include "grammar.h"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue