mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #28765: _sre.compile() now checks the type of groupindex and indexgroup
groupindex must a dictionary and indexgroup must be a tuple. Previously, indexgroup was a list. Use a tuple to reduce the memory usage.
This commit is contained in:
parent
e3d75c63cd
commit
726a57d45f
5 changed files with 10 additions and 10 deletions
|
@ -27,8 +27,8 @@
|
|||
typedef struct {
|
||||
PyObject_VAR_HEAD
|
||||
Py_ssize_t groups; /* must be first! */
|
||||
PyObject* groupindex;
|
||||
PyObject* indexgroup;
|
||||
PyObject* groupindex; /* dict */
|
||||
PyObject* indexgroup; /* tuple */
|
||||
/* compatibility */
|
||||
PyObject* pattern; /* pattern source (or None) */
|
||||
int flags; /* flags used when compiling pattern source */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue