]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rgw: s/bool/bint/
authorKefu Chai <kchai@redhat.com>
Thu, 3 Dec 2020 08:04:19 +0000 (16:04 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 5 Dec 2020 14:09:21 +0000 (22:09 +0800)
when compile a pure python cythonized binding, bool is not defined
because, i think, Cython does not include <stdbool.h> by default.
so use bint indead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/rgw/rgw.pyx

index 3385d063e810b8e62a8d5f791bb6b887ace7b943..123c57d2ee009a4367b5a3b9dc6d85ddbade3a58 100644 (file)
@@ -5,7 +5,6 @@ This module is a thin wrapper around rgw_file.
 
 from cpython cimport PyObject, ref, exc, array
 from libc.stdint cimport *
-from libcpp cimport bool
 from libc.stdlib cimport malloc, realloc, free
 from cstat cimport stat
 
@@ -163,7 +162,7 @@ cdef make_ex(ret, msg):
         return Error(msg + (": error code %d" % ret))
 
 
-cdef bool readdir_cb(const char *name, void *arg, uint64_t offset, stat *st, uint32_t st_mask, uint32_t flags) \
+cdef bint readdir_cb(const char *name, void *arg, uint64_t offset, stat *st, uint32_t st_mask, uint32_t flags) \
 except? -9000 with gil:
     if exc.PyErr_Occurred():
         return False
@@ -371,7 +370,7 @@ cdef class LibRGWFS(object):
         cdef:
             rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler
             uint64_t _offset = offset
-            bool _eof
+            bint _eof
             uint32_t _flags = flags
         with nogil:
             ret = rgw_readdir(self.fs, _dir_handler, &_offset, &readdir_cb,