]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/PyModule: use Py_ssize_t for the PyList index
authorKefu Chai <kchai@redhat.com>
Sat, 8 May 2021 12:59:07 +0000 (20:59 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 11 May 2021 01:31:52 +0000 (09:31 +0800)
commit52d1473f13eb47cbf3bb6412e09d6a1dc7879f0e
tree77ee3ff94c9517919287231638c0c32ae90ca4ea
parent0eb12bc41819b1e3a11250378b7580c8b45a8483
mgr/PyModule: use Py_ssize_t for the PyList index

also silences the warnings like:

mgr/PyModule.cc:574:30: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'Py_ssize_t' {aka 'int'} [-Wsign-compare]
  574 |       for (unsigned i = 0; i < PyList_Size(p); ++i) {
      |                            ~~^~~~~~~~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mgr/PyModule.cc