summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-07-11 11:08:38 (GMT)
committerGuido van Rossum <guido@python.org>1997-07-11 11:08:38 (GMT)
commit63e18195b8b7a064488d106537703861f08aa415 (patch)
treecd7d7e012f265cb6488c1e669718debdabc69674 /Modules
parent443389fd2e94d43f9029510829f85267cc968577 (diff)
downloadcpython-63e18195b8b7a064488d106537703861f08aa415.zip
cpython-63e18195b8b7a064488d106537703861f08aa415.tar.gz
cpython-63e18195b8b7a064488d106537703861f08aa415.tar.bz2
New version from Jeffrey after I complained about some glaring bugs.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/reopmodule.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/reopmodule.c b/Modules/reopmodule.c
index 0d12210..2ac467f 100644
--- a/Modules/reopmodule.c
+++ b/Modules/reopmodule.c
@@ -119,6 +119,10 @@ reop_match(self, args)
PyErr_SetString(ReopError, "match failure");
return NULL;
}
+ if (result == -1) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
return makeresult(&re_regs, num_regs);
}
@@ -162,6 +166,10 @@ reop_search(self, args)
PyErr_SetString(ReopError, "match failure");
return NULL;
}
+ if (result == -1) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
return makeresult(&re_regs, num_regs);
}