Latest from Jeffrey Ollie.
Infinite failure stack, some bugs fixed (fastmap, star_jump, register bug).
This commit is contained in:
parent
1681429ba8
commit
004c1e1d07
1937
Modules/regexpr.c
1937
Modules/regexpr.c
File diff suppressed because it is too large
Load Diff
|
@ -69,9 +69,7 @@ typedef struct re_registers
|
|||
#define re_set_syntax _Py_re_set_syntax
|
||||
#define re_compile_pattern _Py_re_compile_pattern
|
||||
#define re_match _Py_re_match
|
||||
#define re_match_2 _Py_re_match_2
|
||||
#define re_search _Py_re_search
|
||||
#define re_search_2 _Py_re_search_2
|
||||
#define re_compile_fastmap _Py_re_compile_fastmap
|
||||
#define re_comp _Py_re_comp
|
||||
#define re_exec _Py_re_exec
|
||||
|
@ -96,20 +94,12 @@ char *re_compile_pattern(char *regex, int regex_size, regexp_t compiled);
|
|||
translation table, or NULL if it is not used. */
|
||||
|
||||
int re_match(regexp_t compiled, char *string, int size, int pos,
|
||||
regexp_registers_t regs);
|
||||
regexp_registers_t old_regs);
|
||||
/* This tries to match the regexp against the string. This returns the
|
||||
length of the matched portion, or -1 if the pattern could not be
|
||||
matched and -2 if an error (such as failure stack overflow) is
|
||||
encountered. */
|
||||
|
||||
int re_match_2(regexp_t compiled, char *string1, int size1,
|
||||
char *string2, int size2, int pos, regexp_registers_t regs,
|
||||
int mstop);
|
||||
/* This tries to match the regexp to the concatenation of string1 and
|
||||
string2. This returns the length of the matched portion, or -1 if the
|
||||
pattern could not be matched and -2 if an error (such as failure stack
|
||||
overflow) is encountered. */
|
||||
|
||||
int re_search(regexp_t compiled, char *string, int size, int startpos,
|
||||
int range, regexp_registers_t regs);
|
||||
/* This rearches for a substring matching the regexp. This returns the first
|
||||
|
@ -119,12 +109,6 @@ int re_search(regexp_t compiled, char *string, int size, int startpos,
|
|||
which a match must not go. This returns -1 if no match is found, and
|
||||
-2 if an error (such as failure stack overflow) is encountered. */
|
||||
|
||||
int re_search_2(regexp_t compiled, char *string1, int size1,
|
||||
char *string2, int size2, int startpos, int range,
|
||||
regexp_registers_t regs, int mstop);
|
||||
/* This is like re_search, but search from the concatenation of string1 and
|
||||
string2. */
|
||||
|
||||
void re_compile_fastmap(regexp_t compiled);
|
||||
/* This computes the fastmap for the regexp. For this to have any effect,
|
||||
the calling program must have initialized the fastmap field to point
|
||||
|
@ -146,9 +130,7 @@ extern int re_syntax;
|
|||
int re_set_syntax();
|
||||
char *re_compile_pattern();
|
||||
int re_match();
|
||||
int re_match_2();
|
||||
int re_search();
|
||||
int re_search_2();
|
||||
void re_compile_fastmap();
|
||||
char *re_comp();
|
||||
int re_exec();
|
||||
|
|
Loading…
Reference in New Issue