diff options
author | animalize <animalize@users.noreply.github.com> | 2019-02-18 13:26:37 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-02-18 13:26:37 (GMT) |
commit | 4a7f44a2ed49ff1e87db062e7177a56c6e4bbdb0 (patch) | |
tree | 6daa91592d1d09f5b8ed34a1121e600a8bb03d74 /Modules/_sre.c | |
parent | 02c04f26dfa637db7091b7e16036a980bbf40893 (diff) | |
download | cpython-4a7f44a2ed49ff1e87db062e7177a56c6e4bbdb0.zip cpython-4a7f44a2ed49ff1e87db062e7177a56c6e4bbdb0.tar.gz cpython-4a7f44a2ed49ff1e87db062e7177a56c6e4bbdb0.tar.bz2 |
bpo-34294: re module, fix wrong capturing groups in rare cases. (GH-11546)
Need to reset capturing groups between two SRE(match) callings in loops, this fixes wrong capturing groups in rare cases.
Also add a missing index in re.rst.
Diffstat (limited to 'Modules/_sre.c')
-rw-r--r-- | Modules/_sre.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c index 75f030c..21c41b5 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -340,7 +340,7 @@ _sre_unicode_tolower_impl(PyObject *module, int character) LOCAL(void) state_reset(SRE_STATE* state) { - /* FIXME: dynamic! */ + /* state->mark will be set to 0 in SRE_OP_MARK dynamically. */ /*memset(state->mark, 0, sizeof(*state->mark) * SRE_MARK_SIZE);*/ state->lastmark = -1; |