changeset 26010:2c03e521a0c5

reachableroots: return NULL if we're throwing an exception Based on my reading of [0] and surrounding sections, if we want an exception to be properly raised when something goes wrong in the C code, we need to make sure we return NULL here. Do so. https://docs.python.org/2/extending/extending.html#back-to-the-example
author Augie Fackler <augie@google.com>
date Tue, 11 Aug 2015 14:53:47 -0400
parents bbb698697efc
children ce77436162a5
files mercurial/parsers.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/parsers.c	Tue Aug 11 15:34:10 2015 -0400
+++ b/mercurial/parsers.c	Tue Aug 11 14:53:47 2015 -0400
@@ -1232,9 +1232,7 @@
 release_reachable:
 	Py_XDECREF(reachable);
 bail:
-	val = Py_None;
-	Py_INCREF(Py_None);
-	return val;
+	return NULL;
 }
 
 static PyObject *compute_phases_map_sets(indexObject *self, PyObject *args)