[Backport to 2-5maint of r52147 | andrew.kuchling ; the buildbots seem OK
with this change.]
Cause a PyObject_Malloc() failure to trigger a MemoryError, and then
add 'if (PyErr_Occurred())' checks to various places so that NULL is
returned properly.
diff --git a/Misc/NEWS b/Misc/NEWS
index 85587eb..7a8e4de 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -49,6 +49,7 @@
- Fix itertools.count(n) to work with negative numbers again.
+- Make regex engine raise MemoryError if allocating memory fails.
Library
-------