from collections import Iterable
+cimport rados
+
+
cdef extern from "Python.h":
# These are in cpython/string.pxd, but use "object" types instead of
# PyObject*, which invokes assumptions in cpython that we need to
else:
return Error(msg + (": error code %d" % ret))
-cdef rados_ioctx_t convert_ioctx(ioctx) except? NULL:
- return <rados_ioctx_t><uintptr_t>ioctx.io.value
+
+cdef rados_ioctx_t convert_ioctx(rados.Ioctx ioctx) except? NULL:
+ return <rados_ioctx_t>ioctx.io
cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr):
return 0
["rbd.pyx"],
libraries=["rbd"]
)
- ], build_dir=os.environ.get("CYTHON_BUILD_DIR", None)),
+ ], build_dir=os.environ.get("CYTHON_BUILD_DIR", None), include_path=[
+ os.path.join(os.path.dirname(__file__), "..", "rados")]
+ ),
cmdclass={
"egg_info": EggInfoCommand,
},