]> granicus.if.org Git - python/commitdiff
Reverting last change so we don't have to think about the assert macro
authorBarry Warsaw <barry@python.org>
Wed, 28 Nov 2001 21:34:34 +0000 (21:34 +0000)
committerBarry Warsaw <barry@python.org>
Wed, 28 Nov 2001 21:34:34 +0000 (21:34 +0000)
redefinition problem.

Parser/grammar1.c

index 45af139dac390555b89c1fb0a297f04df85fa3b0..b2631b785d5471c2357b3c05947b6ec35911407a 100644 (file)
@@ -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;
                }
        }