Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3503069 commit 5947af5Copy full SHA for 5947af5
1 file changed
Parser/grammar1.c
@@ -1,4 +1,4 @@
1
-#include "Python.h"
+
2
/* Grammar subroutines needed by parser */
3
4
#include "pgenheaders.h"
@@ -39,7 +39,7 @@ PyGrammar_LabelRepr(label *lb)
39
return "EMPTY";
40
else if (ISNONTERMINAL(lb->lb_type)) {
41
if (lb->lb_str == NULL) {
42
- PyOS_snprintf(buf, sizeof(buf), "NT%d", lb->lb_type);
+ sprintf(buf, "NT%d", lb->lb_type);
43
return buf;
44
}
45
else
@@ -49,9 +49,8 @@ PyGrammar_LabelRepr(label *lb)
49
if (lb->lb_str == NULL)
50
return _PyParser_TokenNames[lb->lb_type];
51
else {
52
- PyOS_snprintf(buf, sizeof(buf), "%.32s(%.32s)",
53
- _PyParser_TokenNames[lb->lb_type],
54
- lb->lb_str);
+ sprintf(buf, "%.32s(%.32s)",
+ _PyParser_TokenNames[lb->lb_type], lb->lb_str);
55
56
57
0 commit comments