Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5947af5

Browse files
committed
Reverting last change so we don't have to think about the assert macro
redefinition problem.
1 parent 3503069 commit 5947af5

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Parser/grammar1.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Python.h"
1+
22
/* Grammar subroutines needed by parser */
33

44
#include "pgenheaders.h"
@@ -39,7 +39,7 @@ PyGrammar_LabelRepr(label *lb)
3939
return "EMPTY";
4040
else if (ISNONTERMINAL(lb->lb_type)) {
4141
if (lb->lb_str == NULL) {
42-
PyOS_snprintf(buf, sizeof(buf), "NT%d", lb->lb_type);
42+
sprintf(buf, "NT%d", lb->lb_type);
4343
return buf;
4444
}
4545
else
@@ -49,9 +49,8 @@ PyGrammar_LabelRepr(label *lb)
4949
if (lb->lb_str == NULL)
5050
return _PyParser_TokenNames[lb->lb_type];
5151
else {
52-
PyOS_snprintf(buf, sizeof(buf), "%.32s(%.32s)",
53-
_PyParser_TokenNames[lb->lb_type],
54-
lb->lb_str);
52+
sprintf(buf, "%.32s(%.32s)",
53+
_PyParser_TokenNames[lb->lb_type], lb->lb_str);
5554
return buf;
5655
}
5756
}

0 commit comments

Comments
 (0)