summaryrefslogtreecommitdiffstats
path: root/src/pybind/rados/rados.pyx
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2020-04-01 14:20:13 +0200
committerKefu Chai <kchai@redhat.com>2020-04-07 14:33:47 +0200
commitad2bbbc1edb29d3623299fd25f72458623415a96 (patch)
tree2968896dc15e2a783d3e0d68596b69a9c33c73cd /src/pybind/rados/rados.pyx
parentqa,tes: s/xrange/range/ (diff)
downloadceph-ad2bbbc1edb29d3623299fd25f72458623415a96.tar.xz
ceph-ad2bbbc1edb29d3623299fd25f72458623415a96.zip
pybind: s/xrange/range/
fortunately, cython does not complain at seeing xrange, but let's drop the last bit of python2. Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'src/pybind/rados/rados.pyx')
-rw-r--r--src/pybind/rados/rados.pyx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pybind/rados/rados.pyx b/src/pybind/rados/rados.pyx
index 79016893731..8d2052c1783 100644
--- a/src/pybind/rados/rados.pyx
+++ b/src/pybind/rados/rados.pyx
@@ -640,7 +640,7 @@ cdef size_t * to_csize_t_array(list_int):
cdef size_t *ret = <size_t *>malloc(len(list_int) * sizeof(size_t))
if ret == NULL:
raise MemoryError("malloc failed")
- for i in xrange(len(list_int)):
+ for i in range(len(list_int)):
ret[i] = <size_t>list_int[i]
return ret
@@ -649,7 +649,7 @@ cdef char ** to_bytes_array(list_bytes):
cdef char **ret = <char **>malloc(len(list_bytes) * sizeof(char *))
if ret == NULL:
raise MemoryError("malloc failed")
- for i in xrange(len(list_bytes)):
+ for i in range(len(list_bytes)):
ret[i] = <char *>list_bytes[i]
return ret