changeset 30110:79f438f5dd02

osutil: use PyLongObject in recvfds PyIntObject doesn't exist in Python 3. While PyIntObject is preferred on Python 2 because it is a fixed capacity and faster, the difference between PyIntObject and PyLongObject for scenarios where performance isn't critical or the caller isn't performing type checking shouldn't be relevant. So change recvfds to return a list of longs instead of ints on Python 2.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 09 Oct 2016 13:41:18 +0200
parents 96a2278ee732
children a989fa78dafa
files mercurial/osutil.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/osutil.c	Sun Oct 09 12:37:10 2016 +0200
+++ b/mercurial/osutil.c	Sun Oct 09 13:41:18 2016 +0200
@@ -706,7 +706,7 @@
 	if (!rfdslist)
 		goto bail;
 	for (i = 0; i < rfdscount; i++) {
-		PyObject *obj = PyInt_FromLong(rfds[i]);
+		PyObject *obj = PyLong_FromLong(rfds[i]);
 		if (!obj)
 			goto bail;
 		PyList_SET_ITEM(rfdslist, i, obj);