mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-39943: Add the const qualifier to pointers on non-mutable PyUnicode data. (GH-19345)
This commit is contained in:
parent
7ec43a7309
commit
cd8295ff75
27 changed files with 250 additions and 221 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue