parsers: use PyTuple_SET_ITEM() to fill new marker tuples
authorYuya Nishihara <yuya@tcha.org>
Sat, 05 Sep 2015 16:41:21 +0900
changeset 26213 4d6cdea33f37
parent 26212 0d8df1f510c6
child 26214 46605888faf3
parsers: use PyTuple_SET_ITEM() to fill new marker tuples Because we know these tuples have no member yet, PyTuple_SetItem() isn't necessary.
mercurial/parsers.c
--- a/mercurial/parsers.c	Sat Sep 05 12:56:53 2015 +0900
+++ b/mercurial/parsers.c	Sat Sep 05 16:41:21 2015 +0900
@@ -2564,7 +2564,7 @@
 			Py_DECREF(list);
 			return NULL;
 		}
-		PyTuple_SetItem(list, i, hash);
+		PyTuple_SET_ITEM(list, i, hash);
 		source += hashwidth;
 	}
 	return list;
@@ -2647,7 +2647,7 @@
 		if (!tmp) {
 			goto bail;
 		}
-		PyTuple_SetItem(metadata, i, tmp);
+		PyTuple_SET_ITEM(metadata, i, tmp);
 	}
 	ret = Py_BuildValue("(OOHO(di)O)", prec, succs, flags,
 			    metadata, mtime, (int)tz * 60, parents);