summaryrefslogtreecommitdiffstats
path: root/Parser/parsetok.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-10-19 18:03:34 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-10-19 18:03:34 (GMT)
commitc679227e31245b0e8dec74a1f7cc77710541d985 (patch)
tree0ed52ac2bd85d0cad42e39aec5437a603750425b /Parser/parsetok.c
parent80ab13067e9b8fbd02a05a4863e26b04938b77f5 (diff)
downloadcpython-c679227e31245b0e8dec74a1f7cc77710541d985.zip
cpython-c679227e31245b0e8dec74a1f7cc77710541d985.tar.gz
cpython-c679227e31245b0e8dec74a1f7cc77710541d985.tar.bz2
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Diffstat (limited to 'Parser/parsetok.c')
-rw-r--r--Parser/parsetok.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index 2df9159..b4957b8 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -94,7 +94,8 @@ PyParser_ParseStringFlagsFilenameEx(const char *s, const char *filename_str,
node *
PyParser_ParseFile(FILE *fp, const char *filename, grammar *g, int start,
- char *ps1, char *ps2, perrdetail *err_ret)
+ const char *ps1, const char *ps2,
+ perrdetail *err_ret)
{
return PyParser_ParseFileFlags(fp, filename, NULL,
g, start, ps1, ps2, err_ret, 0);
@@ -103,7 +104,8 @@ PyParser_ParseFile(FILE *fp, const char *filename, grammar *g, int start,
node *
PyParser_ParseFileFlags(FILE *fp, const char *filename, const char *enc,
grammar *g, int start,
- char *ps1, char *ps2, perrdetail *err_ret, int flags)
+ const char *ps1, const char *ps2,
+ perrdetail *err_ret, int flags)
{
int iflags = flags;
return PyParser_ParseFileFlagsEx(fp, filename, enc, g, start, ps1,
@@ -113,15 +115,15 @@ PyParser_ParseFileFlags(FILE *fp, const char *filename, const char *enc,
node *
PyParser_ParseFileObject(FILE *fp, PyObject *filename,
const char *enc, grammar *g, int start,
- char *ps1, char *ps2, perrdetail *err_ret,
- int *flags)
+ const char *ps1, const char *ps2,
+ perrdetail *err_ret, int *flags)
{
struct tok_state *tok;
if (initerr(err_ret, filename) < 0)
return NULL;
- if ((tok = PyTokenizer_FromFile(fp, (char *)enc, ps1, ps2)) == NULL) {
+ if ((tok = PyTokenizer_FromFile(fp, enc, ps1, ps2)) == NULL) {
err_ret->error = E_NOMEM;
return NULL;
}
@@ -135,7 +137,8 @@ PyParser_ParseFileObject(FILE *fp, PyObject *filename,
node *
PyParser_ParseFileFlagsEx(FILE *fp, const char *filename,
const char *enc, grammar *g, int start,
- char *ps1, char *ps2, perrdetail *err_ret, int *flags)
+ const char *ps1, const char *ps2,
+ perrdetail *err_ret, int *flags)
{
node *n;
PyObject *fileobj = NULL;