From a05f62428818f10bc9600f22d28f8157bd541d0e Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 3 Dec 2020 16:04:19 +0800 Subject: [PATCH] pybind/rgw: s/bool/bint/ when compile a pure python cythonized binding, bool is not defined because, i think, Cython does not include by default. so use bint indead. Signed-off-by: Kefu Chai --- src/pybind/rgw/rgw.pyx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pybind/rgw/rgw.pyx b/src/pybind/rgw/rgw.pyx index 3385d063e81..123c57d2ee0 100644 --- a/src/pybind/rgw/rgw.pyx +++ b/src/pybind/rgw/rgw.pyx @@ -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 = 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, -- 2.39.5