summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-10-31 17:36:13 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-10-31 17:36:13 (GMT)
commit742b2f8d7a6b728e925ad83f704af0ff5fb06848 (patch)
tree6d0e89dd6123ed3534a49b6e37a3e8a7740a3e28
parent3cb90241fc9d95612879bd8f479c7a059108ef0a (diff)
downloadcpython-742b2f8d7a6b728e925ad83f704af0ff5fb06848.zip
cpython-742b2f8d7a6b728e925ad83f704af0ff5fb06848.tar.gz
cpython-742b2f8d7a6b728e925ad83f704af0ff5fb06848.tar.bz2
make PyGrammar_LabelRepr return a const char * (closes #16369)
-rw-r--r--Include/grammar.h2
-rw-r--r--Parser/grammar1.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Include/grammar.h b/Include/grammar.h
index 8426da3..862f6a8 100644
--- a/Include/grammar.h
+++ b/Include/grammar.h
@@ -76,7 +76,7 @@ dfa *PyGrammar_FindDFA(grammar *g, int type);
int addlabel(labellist *ll, int type, char *str);
int findlabel(labellist *ll, int type, char *str);
-char *PyGrammar_LabelRepr(label *lb);
+const char *PyGrammar_LabelRepr(label *lb);
void translatelabels(grammar *g);
void addfirstsets(grammar *g);
diff --git a/Parser/grammar1.c b/Parser/grammar1.c
index 1f7d264..4b5aa8a 100644
--- a/Parser/grammar1.c
+++ b/Parser/grammar1.c
@@ -30,7 +30,7 @@ PyGrammar_FindDFA(grammar *g, register int type)
#endif
}
-char *
+const char *
PyGrammar_LabelRepr(label *lb)
{
static char buf[100];