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

login
register
mail settings
Submitter Yuya Nishihara
Date Aug. 13, 2015, 10:48 a.m.
Message ID <6f1931a8e6a31c650a4d.1439462888@mimosa>
Download mbox | patch
Permalink /patch/10201/
State Accepted
Headers show

Comments

Yuya Nishihara - Aug. 13, 2015, 10:48 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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

Patch

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;