Skip to content

Commit d33c012

Browse files
committed
pythongh-100061 Add github issue number on comments
1 parent 43dc3cf commit d33c012

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Lib/test/test_re.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,6 +2303,7 @@ def test_possessive_quantifiers(self):
23032303
self.assertIsNone(re.match("^x{}+$", "xxx"))
23042304
self.assertTrue(re.match("^x{}+$", "x{}"))
23052305

2306+
# gh-100061
23062307
self.assertEqual(re.match('((.(?!C))++)', 'ABCD').span(), (0, 1))
23072308

23082309
def test_fullmatch_possessive_quantifiers(self):

Modules/_sre/sre_lib.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,9 @@ SRE(match)(SRE_STATE* state, const SRE_CODE* pattern, int toplevel)
13341334
MARK_POP(ctx->lastmark);
13351335
LASTMARK_RESTORE();
13361336

1337-
/* Restore the global Input Stream pointer */
1337+
/* Restore the global Input Stream pointer
1338+
since it can change after the jump.
1339+
See gh-100061 */
13381340
state->ptr = ptr;
13391341

13401342
/* We have sufficient matches, so exit loop. */

0 commit comments

Comments
 (0)