summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-11-28 21:34:34 (GMT)
committerBarry Warsaw <barry@python.org>2001-11-28 21:34:34 (GMT)
commit5947af5ac38b29baa7886c340fd804eee463bddc (patch)
treee9f7338954410970e0bb9ed6f574d63e331f4806
parent350306953ace94b6326d63edd1dd5ebb915c9630 (diff)
downloadcpython-5947af5ac38b29baa7886c340fd804eee463bddc.zip
cpython-5947af5ac38b29baa7886c340fd804eee463bddc.tar.gz
cpython-5947af5ac38b29baa7886c340fd804eee463bddc.tar.bz2
Reverting last change so we don't have to think about the assert macro
redefinition problem.
-rw-r--r--Parser/grammar1.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Parser/grammar1.c b/Parser/grammar1.c
index 45af139..b2631b7 100644
--- a/Parser/grammar1.c
+++ b/Parser/grammar1.c
@@ -1,4 +1,4 @@
-#include "Python.h"
+
/* Grammar subroutines needed by parser */
#include "pgenheaders.h"
@@ -39,7 +39,7 @@ PyGrammar_LabelRepr(label *lb)
return "EMPTY";
else if (ISNONTERMINAL(lb->lb_type)) {
if (lb->lb_str == NULL) {
- PyOS_snprintf(buf, sizeof(buf), "NT%d", lb->lb_type);
+ sprintf(buf, "NT%d", lb->lb_type);
return buf;
}
else
@@ -49,9 +49,8 @@ PyGrammar_LabelRepr(label *lb)
if (lb->lb_str == NULL)
return _PyParser_TokenNames[lb->lb_type];
else {
- PyOS_snprintf(buf, sizeof(buf), "%.32s(%.32s)",
- _PyParser_TokenNames[lb->lb_type],
- lb->lb_str);
+ sprintf(buf, "%.32s(%.32s)",
+ _PyParser_TokenNames[lb->lb_type], lb->lb_str);
return buf;
}
}