[PATCH 1 of 4] reachableroots: pass NULL to PySet_New() as it expects a pointer, not an int

Yuya Nishihara yuya at tcha.org
Thu Aug 13 10:48:08 UTC 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1439456313 -32400
#      Thu Aug 13 17:58:33 2015 +0900
# Node ID 6f1931a8e6a31c650a4df10048914634e14da642
# Parent  b0dd557e1c5530c4b765e08c12fb90b4540c3af4
reachableroots: pass NULL to PySet_New() as it expects a pointer, not an int

diff --git a/mercurial/parsers.c b/mercurial/parsers.c
--- a/mercurial/parsers.c
+++ b/mercurial/parsers.c
@@ -1144,7 +1144,7 @@ static PyObject *reachableroots(indexObj
 		includepath = 1;
 
 	/* Initialize return set */
-	reachable = PySet_New(0);
+	reachable = PySet_New(NULL);
 	if (reachable == NULL) {
 		PyErr_NoMemory();
 		goto bail;


More information about the Mercurial-devel mailing list