summaryrefslogtreecommitdiffstats
path: root/Modules/sre.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-11-22 22:04:39 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-11-22 22:04:39 (GMT)
commit726a57d45f8606ad5a33f7c6bbd1e8c2f8cfbdef (patch)
tree9ca6ccf2b5ee118ccf1fd0e7b47fcaf9f833cda7 /Modules/sre.h
parente3d75c63cd100675f96cd5c152ccd021ba9e6ebb (diff)
downloadcpython-726a57d45f8606ad5a33f7c6bbd1e8c2f8cfbdef.zip
cpython-726a57d45f8606ad5a33f7c6bbd1e8c2f8cfbdef.tar.gz
cpython-726a57d45f8606ad5a33f7c6bbd1e8c2f8cfbdef.tar.bz2
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.
Diffstat (limited to 'Modules/sre.h')
-rw-r--r--Modules/sre.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/sre.h b/Modules/sre.h
index b632165..9af5e40 100644
--- a/Modules/sre.h
+++ b/Modules/sre.h
@@ -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 */