[Python-checkins] python/dist/src/Modules _sre.c,2.107,2.108
niemeyer at users.sourceforge.net
niemeyer at users.sourceforge.net
Fri Sep 3 20:12:03 CEST 2004
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2859/Modules
Modified Files:
_sre.c
Log Message:
Fixing bug #817234, which made SRE get into an infinite loop on
empty final matches with finditer(). New test cases included
for this bug and for #581080.
Index: _sre.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v
retrieving revision 2.107
retrieving revision 2.108
diff -u -d -r2.107 -r2.108
--- _sre.c 15 Jul 2004 15:54:04 -0000 2.107
+++ _sre.c 3 Sep 2004 18:11:59 -0000 2.108
@@ -539,7 +539,7 @@
break;
case SRE_OP_ANY_ALL:
- /* repeated dot wildcare. skip to the end of the target
+ /* repeated dot wildcard. skip to the end of the target
string, and backtrack from there */
TRACE(("|%p|%p|COUNT ANY_ALL\n", pattern, ptr));
ptr = end;
@@ -3244,8 +3244,7 @@
match = pattern_new_match((PatternObject*) self->pattern,
state, status);
- if ((status == 0 || state->ptr == state->start) &&
- state->ptr < state->end)
+ if (status == 0 || state->ptr == state->start)
state->start = (void*) ((char*) state->ptr + state->charsize);
else
state->start = state->ptr;
@@ -3276,8 +3275,7 @@
match = pattern_new_match((PatternObject*) self->pattern,
state, status);
- if ((status == 0 || state->ptr == state->start) &&
- state->ptr < state->end)
+ if (status == 0 || state->ptr == state->start)
state->start = (void*) ((char*) state->ptr + state->charsize);
else
state->start = state->ptr;
More information about the Python-checkins
mailing list