diff -cr ../Python-1.5.orig/Modules/pcre.h ./Modules/pcre.h *** ../Python-1.5.orig/Modules/pcre.h Mon Dec 22 23:46:46 1997 --- Modules/pcre.h Thu Mar 12 19:44:43 1998 *************** *** 57,67 **** #ifdef FOR_PYTHON extern pcre *pcre_compile(const char *, int, const char **, int *, PyObject *); #else extern pcre *pcre_compile(const char *, int, const char **, int *); - #endif extern int pcre_exec(const pcre *, const pcre_extra *, const char *, int, int, int *, int); extern int pcre_info(const pcre *, int *, int *); extern pcre_extra *pcre_study(const pcre *, int, const char **); extern const char *pcre_version(void); --- 57,69 ---- #ifdef FOR_PYTHON extern pcre *pcre_compile(const char *, int, const char **, int *, PyObject *); + extern int pcre_exec(const pcre *, const pcre_extra *, const char *, + int, int, int, int *, int); #else extern pcre *pcre_compile(const char *, int, const char **, int *); extern int pcre_exec(const pcre *, const pcre_extra *, const char *, int, int, int *, int); + #endif extern int pcre_info(const pcre *, int *, int *); extern pcre_extra *pcre_study(const pcre *, int, const char **); extern const char *pcre_version(void); diff -cr ../Python-1.5.orig/Modules/pcremodule.c ./Modules/pcremodule.c *** ../Python-1.5.orig/Modules/pcremodule.c Mon Dec 22 23:46:48 1997 --- Modules/pcremodule.c Thu Mar 12 19:44:03 1998 *************** *** 115,121 **** return NULL; if (endpos == -1) {endpos = stringlen;} count = pcre_exec(self->regex, self->regex_extra, ! (char *)string+pos, endpos - pos, options, offsets, sizeof(offsets)/sizeof(int) ); /* If an error occurred during the match, and an exception was raised, just return NULL and leave the exception alone. The most likely --- 115,121 ---- return NULL; if (endpos == -1) {endpos = stringlen;} count = pcre_exec(self->regex, self->regex_extra, ! (char *)string, endpos, pos, options, offsets, sizeof(offsets)/sizeof(int) ); /* If an error occurred during the match, and an exception was raised, just return NULL and leave the exception alone. The most likely *************** *** 143,150 **** /* If the group wasn't affected by the match, return -1, -1 */ if (start<0 || count<=i) {start=end=-1;} - else - {start += pos; end +=pos;} v=Py_BuildValue("ii", start, end); if (v==NULL) {Py_DECREF(list); return NULL;} PyList_SetItem(list, i, v); --- 143,148 ---- diff -cr ../Python-1.5.orig/Modules/pypcre.c ./Modules/pypcre.c *** ../Python-1.5.orig/Modules/pypcre.c Mon Dec 22 23:46:52 1997 --- Modules/pypcre.c Thu Mar 12 19:46:04 1998 *************** *** 4419,4425 **** int pcre_exec(const pcre *external_re, const pcre_extra *external_extra, ! const char *subject, int length, 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 --- 4424,4431 ---- int pcre_exec(const pcre *external_re, const pcre_extra *external_extra, ! 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 *************** *** 4428,4434 **** int first_char = -1; match_data match_block; const uschar *start_bits = NULL; ! const uschar *start_match = (const uschar *)subject; const uschar *end_subject; const real_pcre *re = (const real_pcre *)external_re; const real_pcre_extra *extra = (const real_pcre_extra *)external_extra; --- 4434,4440 ---- int first_char = -1; match_data match_block; const uschar *start_bits = NULL; ! 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;