mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-25054, bpo-1647489: Added support of splitting on zerowidth patterns. (#4471)
Also fixed searching patterns that could match an empty string.
This commit is contained in:
parent
e69fbb6a56
commit
70d56fb525
9 changed files with 128 additions and 117 deletions
|
@ -67,6 +67,7 @@ typedef struct {
|
|||
void* end; /* end of original string */
|
||||
/* attributes for the match object */
|
||||
PyObject* string;
|
||||
Py_buffer buffer;
|
||||
Py_ssize_t pos, endpos;
|
||||
int isbytes;
|
||||
int charsize; /* character size */
|
||||
|
@ -74,11 +75,12 @@ typedef struct {
|
|||
Py_ssize_t lastindex;
|
||||
Py_ssize_t lastmark;
|
||||
void** mark;
|
||||
int match_all;
|
||||
int must_advance;
|
||||
/* dynamically allocated stuff */
|
||||
char* data_stack;
|
||||
size_t data_stack_size;
|
||||
size_t data_stack_base;
|
||||
Py_buffer buffer;
|
||||
/* current repeat context */
|
||||
SRE_REPEAT *repeat;
|
||||
} SRE_STATE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue