summaryrefslogtreecommitdiffstats
path: root/Parser/pegen.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-06-12 17:44:32 (GMT)
committerGitHub <noreply@github.com>2021-06-12 17:44:32 (GMT)
commitc43317d41e7248405f40864bcc62f675805f4fd0 (patch)
tree665e1cc2011cca8ca4d271e7ca34bd9be8302c23 /Parser/pegen.h
parentb441e99d89a3f05210cc36ade57699384986ca00 (diff)
downloadcpython-c43317d41e7248405f40864bcc62f675805f4fd0.zip
cpython-c43317d41e7248405f40864bcc62f675805f4fd0.tar.gz
cpython-c43317d41e7248405f40864bcc62f675805f4fd0.tar.bz2
[3.10] Add more const modifiers. (GH-26691). (GH-26692)
(cherry picked from commit be8b631b7a587aa781245e14c8cca32970e1be5b) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Parser/pegen.h')
-rw-r--r--Parser/pegen.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Parser/pegen.h b/Parser/pegen.h
index 1540da0..161a498 100644
--- a/Parser/pegen.h
+++ b/Parser/pegen.h
@@ -202,7 +202,7 @@ CHECK_CALL_NULL_ALLOWED(Parser *p, void *result)
#define CHECK(type, result) ((type) CHECK_CALL(p, result))
#define CHECK_NULL_ALLOWED(type, result) ((type) CHECK_CALL_NULL_ALLOWED(p, result))
-PyObject *_PyPegen_new_type_comment(Parser *, char *);
+PyObject *_PyPegen_new_type_comment(Parser *, const char *);
Py_LOCAL_INLINE(PyObject *)
NEW_TYPE_COMMENT(Parser *p, Token *tc)
@@ -210,7 +210,7 @@ NEW_TYPE_COMMENT(Parser *p, Token *tc)
if (tc == NULL) {
return NULL;
}
- char *bytes = PyBytes_AsString(tc->bytes);
+ const char *bytes = PyBytes_AsString(tc->bytes);
if (bytes == NULL) {
goto error;
}
@@ -242,7 +242,7 @@ INVALID_VERSION_CHECK(Parser *p, int version, char *msg, void *node)
#define CHECK_VERSION(type, version, msg, node) ((type) INVALID_VERSION_CHECK(p, version, msg, node))
arg_ty _PyPegen_add_type_comment_to_arg(Parser *, arg_ty, Token *);
-PyObject *_PyPegen_new_identifier(Parser *, char *);
+PyObject *_PyPegen_new_identifier(Parser *, const char *);
Parser *_PyPegen_Parser_New(struct tok_state *, int, int, int, int *, PyArena *);
void _PyPegen_Parser_Free(Parser *);
mod_ty _PyPegen_run_parser_from_file_pointer(FILE *, int, PyObject *, const char *,