summaryrefslogtreecommitdiffstats
path: root/Parser/parsetok.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-12-11 14:04:59 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-12-11 14:04:59 (GMT)
commit95292d6caa3af3196c5b9f5f95dae209815c09e5 (patch)
tree193e6e6a45f1e1319e4bb4ba07a3fee838a2ca5d /Parser/parsetok.c
parent0e88c9f65d163c0c8551d0f079a19b71a8a9e3ca (diff)
downloadcpython-95292d6caa3af3196c5b9f5f95dae209815c09e5.zip
cpython-95292d6caa3af3196c5b9f5f95dae209815c09e5.tar.gz
cpython-95292d6caa3af3196c5b9f5f95dae209815c09e5.tar.bz2
Constify filenames and scripts. Fixes #651362.
Diffstat (limited to 'Parser/parsetok.c')
-rw-r--r--Parser/parsetok.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index d70e2d6..82a5450 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -15,17 +15,17 @@ int Py_TabcheckFlag;
/* Forward */
static node *parsetok(struct tok_state *, grammar *, int, perrdetail *, int);
-static void initerr(perrdetail *err_ret, char* filename);
+static void initerr(perrdetail *err_ret, const char* filename);
/* Parse input coming from a string. Return error code, print some errors. */
node *
-PyParser_ParseString(char *s, grammar *g, int start, perrdetail *err_ret)
+PyParser_ParseString(const char *s, grammar *g, int start, perrdetail *err_ret)
{
return PyParser_ParseStringFlags(s, g, start, err_ret, 0);
}
node *
-PyParser_ParseStringFlags(char *s, grammar *g, int start,
+PyParser_ParseStringFlags(const char *s, grammar *g, int start,
perrdetail *err_ret, int flags)
{
return PyParser_ParseStringFlagsFilename(s, NULL,
@@ -33,7 +33,7 @@ PyParser_ParseStringFlags(char *s, grammar *g, int start,
}
node *
-PyParser_ParseStringFlagsFilename(char *s, char *filename,
+PyParser_ParseStringFlagsFilename(const char *s, const char *filename,
grammar *g, int start,
perrdetail *err_ret, int flags)
{
@@ -60,7 +60,7 @@ PyParser_ParseStringFlagsFilename(char *s, char *filename,
/* Parse input coming from a file. Return error code, print some errors. */
node *
-PyParser_ParseFile(FILE *fp, char *filename, grammar *g, int start,
+PyParser_ParseFile(FILE *fp, const char *filename, grammar *g, int start,
char *ps1, char *ps2, perrdetail *err_ret)
{
return PyParser_ParseFileFlags(fp, filename, g, start, ps1, ps2,
@@ -68,7 +68,7 @@ PyParser_ParseFile(FILE *fp, char *filename, grammar *g, int start,
}
node *
-PyParser_ParseFileFlags(FILE *fp, char *filename, grammar *g, int start,
+PyParser_ParseFileFlags(FILE *fp, const char *filename, grammar *g, int start,
char *ps1, char *ps2, perrdetail *err_ret, int flags)
{
struct tok_state *tok;
@@ -201,7 +201,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
}
static void
-initerr(perrdetail *err_ret, char* filename)
+initerr(perrdetail *err_ret, const char* filename)
{
err_ret->error = E_OK;
err_ret->filename = filename;