##// END OF EJS Templates
py3: use integer division for the value passed to xrange...
Rodrigo Damazio Bovendorp -
r42724:f3fa10a5 default
parent child Browse files
Show More
@@ -5,7 +5,7 b''
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from __future__ import absolute_import
8 from __future__ import absolute_import, division
9
9
10 import ctypes
10 import ctypes
11 import ctypes.util
11 import ctypes.util
@@ -149,7 +149,7 b' if not pycompat.iswindows:'
149 cmsg.cmsg_type != _SCM_RIGHTS):
149 cmsg.cmsg_type != _SCM_RIGHTS):
150 return []
150 return []
151 rfds = ctypes.cast(cmsg.cmsg_data, ctypes.POINTER(ctypes.c_int))
151 rfds = ctypes.cast(cmsg.cmsg_data, ctypes.POINTER(ctypes.c_int))
152 rfdscount = ((cmsg.cmsg_len - _cmsghdr.cmsg_data.offset) /
152 rfdscount = ((cmsg.cmsg_len - _cmsghdr.cmsg_data.offset) //
153 ctypes.sizeof(ctypes.c_int))
153 ctypes.sizeof(ctypes.c_int))
154 return [rfds[i] for i in pycompat.xrange(rfdscount)]
154 return [rfds[i] for i in pycompat.xrange(rfdscount)]
155
155
General Comments 0
You need to be logged in to leave comments. Login now