summaryrefslogtreecommitdiffstats
path: root/Parser/tokenizer.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/tokenizer.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/tokenizer.c')
-rw-r--r--Parser/tokenizer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index dafb4bd..5bf7e84 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -31,7 +31,7 @@
|| c == '_'\
|| (c >= 128))
-extern char *PyOS_Readline(FILE *, FILE *, char *);
+extern char *PyOS_Readline(FILE *, FILE *, const char *);
/* Return malloc'ed string including trailing \n;
empty malloc'ed string for EOF;
NULL if interrupted */
@@ -780,7 +780,7 @@ PyTokenizer_FromString(const char *str, int exec_input)
struct tok_state *tok = tok_new();
if (tok == NULL)
return NULL;
- str = (char *)decode_str(str, exec_input, tok);
+ str = decode_str(str, exec_input, tok);
if (str == NULL) {
PyTokenizer_Free(tok);
return NULL;
@@ -823,7 +823,8 @@ PyTokenizer_FromUTF8(const char *str, int exec_input)
/* Set up tokenizer for file */
struct tok_state *
-PyTokenizer_FromFile(FILE *fp, char* enc, char *ps1, char *ps2)
+PyTokenizer_FromFile(FILE *fp, const char* enc,
+ const char *ps1, const char *ps2)
{
struct tok_state *tok = tok_new();
if (tok == NULL)