reachableroots: if allocating a new set fails, use PyErr_NoMemory()
My inspection of the implementation of PySet_New() indicates that it
does *not* reliably set an exception in the cases where it returns
NULL (as far as I can tell it'll never do that!), so let's set that up
ourselves.
--- a/mercurial/parsers.c Thu Aug 06 22:11:20 2015 -0700
+++ b/mercurial/parsers.c Tue Aug 11 14:49:40 2015 -0400
@@ -1143,8 +1143,10 @@
/* Initialize return set */
reachable = PySet_New(0);
- if (reachable == NULL)
+ if (reachable == NULL) {
+ PyErr_NoMemory();
goto bail;
+ }
/* Initialize internal datastructures */
tovisit = (int *)malloc((len + 1) * sizeof(int));