mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
patch for re.sub bug, by AMK.
This commit is contained in:
parent
193338afeb
commit
816671c666
3 changed files with 7 additions and 6 deletions
|
@ -4424,7 +4424,8 @@ Returns: > 0 => success; value is the number of elements filled in
|
|||
|
||||
int
|
||||
pcre_exec(const pcre *external_re, const pcre_extra *external_extra,
|
||||
const char *subject, int length, int options, int *offsets, int offsetcount)
|
||||
const char *subject, int length, int start_pos, int options,
|
||||
int *offsets, int offsetcount)
|
||||
{
|
||||
/* The "volatile" directives are to make gcc -Wall stop complaining
|
||||
that these variables can be clobbered by the longjmp. Hopefully
|
||||
|
@ -4433,7 +4434,7 @@ int resetcount, ocount;
|
|||
int first_char = -1;
|
||||
match_data match_block;
|
||||
const uschar *start_bits = NULL;
|
||||
const uschar *start_match = (const uschar *)subject;
|
||||
const uschar *start_match = (const uschar *)subject + start_pos;
|
||||
const uschar *end_subject;
|
||||
const real_pcre *re = (const real_pcre *)external_re;
|
||||
const real_pcre_extra *extra = (const real_pcre_extra *)external_extra;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue