summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-07-15 14:38:13 (GMT)
committerGuido van Rossum <guido@python.org>1997-07-15 14:38:13 (GMT)
commit04a1d74229058d204ce570e3727f438c31c1a176 (patch)
treed6f03b05ee10b228f6fe19d1df1304b0c0d33fb0 /Modules
parent70f107f63ddf8be78bc985ba2892e615396b25d6 (diff)
downloadcpython-04a1d74229058d204ce570e3727f438c31c1a176.zip
cpython-04a1d74229058d204ce570e3727f438c31c1a176.tar.gz
cpython-04a1d74229058d204ce570e3727f438c31c1a176.tar.bz2
Jeffrey's newest
Diffstat (limited to 'Modules')
-rw-r--r--Modules/reopmodule.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/Modules/reopmodule.c b/Modules/reopmodule.c
index 2ac467f..9b928f5 100644
--- a/Modules/reopmodule.c
+++ b/Modules/reopmodule.c
@@ -87,13 +87,13 @@ reop_match(self, args)
char *string;
int fastmaplen, stringlen;
int can_be_null, anchor, i;
- int num_regs, flags, pos, result;
+ int flags, pos, result;
struct re_pattern_buffer bufp;
struct re_registers re_regs;
if (!PyArg_Parse(args, "(s#iiis#is#i)",
&(bufp.buffer), &(bufp.allocated),
- &num_regs, &flags, &can_be_null,
+ &(bufp.num_registers), &flags, &can_be_null,
&(bufp.fastmap), &fastmaplen,
&anchor,
&string, &stringlen,
@@ -106,10 +106,9 @@ reop_match(self, args)
bufp.fastmap_accurate=1;
bufp.can_be_null=can_be_null;
bufp.uses_registers=1;
- bufp.num_registers=num_regs;
bufp.anchor=anchor;
- for(i=0; i<num_regs; i++) {re_regs.start[i]=-1; re_regs.end[i]=-1;}
+ for(i=0; i<bufp.num_registers; i++) {re_regs.start[i]=-1; re_regs.end[i]=-1;}
result = re_match(&bufp,
string, stringlen, pos,
@@ -123,7 +122,7 @@ reop_match(self, args)
Py_INCREF(Py_None);
return Py_None;
}
- return makeresult(&re_regs, num_regs);
+ return makeresult(&re_regs, bufp.num_registers);
}
static PyObject *
@@ -134,13 +133,13 @@ reop_search(self, args)
char *string;
int fastmaplen, stringlen;
int can_be_null, anchor, i;
- int num_regs, flags, pos, result;
+ int flags, pos, result;
struct re_pattern_buffer bufp;
struct re_registers re_regs;
if (!PyArg_Parse(args, "(s#iiis#is#i)",
&(bufp.buffer), &(bufp.allocated),
- &num_regs, &flags, &can_be_null,
+ &(bufp.num_registers), &flags, &can_be_null,
&(bufp.fastmap), &fastmaplen,
&anchor,
&string, &stringlen,
@@ -153,10 +152,9 @@ reop_search(self, args)
bufp.fastmap_accurate=1;
bufp.can_be_null=can_be_null;
bufp.uses_registers=1;
- bufp.num_registers=1;
bufp.anchor=anchor;
- for(i=0; i<num_regs; i++) {re_regs.start[i]=-1; re_regs.end[i]=-1;}
+ for(i=0; i<bufp.num_registers; i++) {re_regs.start[i]=-1; re_regs.end[i]=-1;}
result = re_search(&bufp,
string, stringlen, pos, stringlen-pos,
@@ -170,7 +168,7 @@ reop_search(self, args)
Py_INCREF(Py_None);
return Py_None;
}
- return makeresult(&re_regs, num_regs);
+ return makeresult(&re_regs, bufp.num_registers);
}
#if 0