diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-04-11 07:48:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-11 07:48:40 (GMT) |
commit | cd8295ff758891f21084a6a5ad3403d35dda38f7 (patch) | |
tree | a77f829dea34198a7f36658c6e22baf4bc0bf5f5 /Modules/sre.h | |
parent | 7ec43a73092d43c6c95e7dd2669f49d54b57966f (diff) | |
download | cpython-cd8295ff758891f21084a6a5ad3403d35dda38f7.zip cpython-cd8295ff758891f21084a6a5ad3403d35dda38f7.tar.gz cpython-cd8295ff758891f21084a6a5ad3403d35dda38f7.tar.bz2 |
bpo-39943: Add the const qualifier to pointers on non-mutable PyUnicode data. (GH-19345)
Diffstat (limited to 'Modules/sre.h')
-rw-r--r-- | Modules/sre.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/sre.h b/Modules/sre.h index a728488..9b0d8b1 100644 --- a/Modules/sre.h +++ b/Modules/sre.h @@ -54,17 +54,17 @@ typedef struct { typedef struct SRE_REPEAT_T { Py_ssize_t count; - SRE_CODE* pattern; /* points to REPEAT operator arguments */ - void* last_ptr; /* helper to check for infinite loops */ + const SRE_CODE* pattern; /* points to REPEAT operator arguments */ + const void* last_ptr; /* helper to check for infinite loops */ struct SRE_REPEAT_T *prev; /* points to previous repeat context */ } SRE_REPEAT; typedef struct { /* string pointers */ - void* ptr; /* current position (also end of current slice) */ - void* beginning; /* start of original string */ - void* start; /* start of current slice */ - void* end; /* end of original string */ + const void* ptr; /* current position (also end of current slice) */ + const void* beginning; /* start of original string */ + const void* start; /* start of current slice */ + const void* end; /* end of original string */ /* attributes for the match object */ PyObject* string; Py_buffer buffer; @@ -74,7 +74,7 @@ typedef struct { /* registers */ Py_ssize_t lastindex; Py_ssize_t lastmark; - void** mark; + const void** mark; int match_all; int must_advance; /* dynamically allocated stuff */ |