Bug Summary

File:home/bhubbard/working/src/ceph/build/src/pybind/cephfs2/cephfs.c
Warning:line 4126, column 160
Potential leak of memory pointed to by '__pyx_v_ret'

Annotated Source Code

[?] Use j/k keys for keyboard navigation

1/* Generated by Cython 0.23.4 */
2
3/* BEGIN: Cython Metadata
4{
5 "distutils": {
6 "depends": [
7 "/usr/include/python2.7/Python.h",
8 "/usr/include/python2.7/pythread.h"
9 ],
10 "extra_compile_args": [
11 "-fno-strict-aliasing",
12 "-DNDEBUG",
13 "-g",
14 "-fwrapv",
15 "-O2",
16 "-Wall",
17 "-Wstrict-prototypes",
18 "-Wdate-time",
19 "-D_FORTIFY_SOURCE=2",
20 "-g",
21 "-fstack-protector-strong",
22 "-Wformat",
23 "-Werror=format-security"
24 ],
25 "extra_link_args": [
26 "-Wl,-Bsymbolic-functions",
27 "-Wl,-z,relro",
28 "-Xlinker",
29 "-export-dynamic",
30 "-Wl,-O1",
31 "-Wl,-Bsymbolic-functions"
32 ],
33 "include_dirs": [
34 "/usr/include/python2.7"
35 ],
36 "libraries": [
37 "cephfs",
38 "pthread",
39 "dl",
40 "util",
41 "m"
42 ],
43 "library_dirs": [
44 "/usr/lib",
45 "/usr/lib/python2.7/config-x86_64-linux-gnu"
46 ]
47 }
48}
49END: Cython Metadata */
50
51#define PY_SSIZE_T_CLEAN
52#include "Python.h"
53#ifndef Py_PYTHON_H
54 #error Python headers needed to compile C extensions, please install development version of Python.
55#elif PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x02060000 || (0x03000000 <= PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
&& PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03020000)
56 #error Cython requires Python 2.6+ or Python 3.2+.
57#else
58#define CYTHON_ABI"0_23_4" "0_23_4"
59#include <stddef.h>
60#ifndef offsetof
61#define offsetof(type, member)__builtin_offsetof(type, member) ( (size_t) & ((type*)0) -> member )
62#endif
63#if !defined(WIN32) && !defined(MS_WINDOWS)
64 #ifndef __stdcall
65 #define __stdcall
66 #endif
67 #ifndef __cdecl
68 #define __cdecl
69 #endif
70 #ifndef __fastcall
71 #define __fastcall
72 #endif
73#endif
74#ifndef DL_IMPORT
75 #define DL_IMPORT(t)t t
76#endif
77#ifndef DL_EXPORT
78 #define DL_EXPORT(t)t t
79#endif
80#ifndef PY_LONG_LONGlong long
81 #define PY_LONG_LONGlong long LONG_LONG
82#endif
83#ifndef Py_HUGE_VAL(__builtin_huge_val())
84 #define Py_HUGE_VAL(__builtin_huge_val()) HUGE_VAL(__builtin_huge_val())
85#endif
86#ifdef PYPY_VERSION
87#define CYTHON_COMPILING_IN_PYPY0 1
88#define CYTHON_COMPILING_IN_CPYTHON1 0
89#else
90#define CYTHON_COMPILING_IN_PYPY0 0
91#define CYTHON_COMPILING_IN_CPYTHON1 1
92#endif
93#if !defined(CYTHON_USE_PYLONG_INTERNALS1) && CYTHON_COMPILING_IN_CPYTHON1 && PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x02070000
94#define CYTHON_USE_PYLONG_INTERNALS1 1
95#endif
96#if CYTHON_COMPILING_IN_PYPY0 && PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x02070600 && !defined(Py_OptimizeFlag)
97#define Py_OptimizeFlag 0
98#endif
99#define __PYX_BUILD_PY_SSIZE_T"n" "n"
100#define CYTHON_FORMAT_SSIZE_T"z" "z"
101#if PY_MAJOR_VERSION2 < 3
102 #define __Pyx_BUILTIN_MODULE_NAME"__builtin__" "__builtin__"
103 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline
, lnos)
\
104 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
105 #define __Pyx_DefaultClassTypePyClass_Type PyClass_Type
106#else
107 #define __Pyx_BUILTIN_MODULE_NAME"__builtin__" "builtins"
108 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline
, lnos)
\
109 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
110 #define __Pyx_DefaultClassTypePyClass_Type PyType_Type
111#endif
112#ifndef Py_TPFLAGS_CHECKTYPES(1L<<4)
113 #define Py_TPFLAGS_CHECKTYPES(1L<<4) 0
114#endif
115#ifndef Py_TPFLAGS_HAVE_INDEX(1L<<17)
116 #define Py_TPFLAGS_HAVE_INDEX(1L<<17) 0
117#endif
118#ifndef Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)
119 #define Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21) 0
120#endif
121#ifndef Py_TPFLAGS_HAVE_FINALIZE0
122 #define Py_TPFLAGS_HAVE_FINALIZE0 0
123#endif
124#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
> 0x03030000 && defined(PyUnicode_KIND)
125 #define CYTHON_PEP393_ENABLED0 1
126 #define __Pyx_PyUnicode_READY(op)(0) (likely(PyUnicode_IS_READY(op))__builtin_expect(!!(PyUnicode_IS_READY(op)), 1) ?\
127 0 : _PyUnicode_Ready((PyObject *)(op)))
128 #define __Pyx_PyUnicode_GET_LENGTH(u)(((PyUnicodeObject *)(u))->length) PyUnicode_GET_LENGTH(u)
129 #define __Pyx_PyUnicode_READ_CHAR(u, i)((Py_UCS4)((((PyUnicodeObject *)(u))->str)[i])) PyUnicode_READ_CHAR(u, i)
130 #define __Pyx_PyUnicode_KIND(u)(sizeof(Py_UNICODE)) PyUnicode_KIND(u)
131 #define __Pyx_PyUnicode_DATA(u)((void*)(((PyUnicodeObject *)(u))->str)) PyUnicode_DATA(u)
132 #define __Pyx_PyUnicode_READ(k, d, i)((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) PyUnicode_READ(k, d, i)
133#else
134 #define CYTHON_PEP393_ENABLED0 0
135 #define __Pyx_PyUnicode_READY(op)(0) (0)
136 #define __Pyx_PyUnicode_GET_LENGTH(u)(((PyUnicodeObject *)(u))->length) PyUnicode_GET_SIZE(u)(((PyUnicodeObject *)(u))->length)
137 #define __Pyx_PyUnicode_READ_CHAR(u, i)((Py_UCS4)((((PyUnicodeObject *)(u))->str)[i])) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)(((PyUnicodeObject *)(u))->str)[i]))
138 #define __Pyx_PyUnicode_KIND(u)(sizeof(Py_UNICODE)) (sizeof(Py_UNICODE))
139 #define __Pyx_PyUnicode_DATA(u)((void*)(((PyUnicodeObject *)(u))->str)) ((void*)PyUnicode_AS_UNICODE(u)(((PyUnicodeObject *)(u))->str))
140 #define __Pyx_PyUnicode_READ(k, d, i)((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
141#endif
142#if CYTHON_COMPILING_IN_PYPY0
143 #define __Pyx_PyUnicode_Concat(a, b)PyUnicodeUCS4_Concat(a, b) PyNumber_Add(a, b)
144 #define __Pyx_PyUnicode_ConcatSafe(a, b)((__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0) || __builtin_expect
(!!((b) == (&_Py_NoneStruct)), 0)) ? PyNumber_Add(a, b) :
PyUnicodeUCS4_Concat(a, b))
PyNumber_Add(a, b)
145#else
146 #define __Pyx_PyUnicode_Concat(a, b)PyUnicodeUCS4_Concat(a, b) PyUnicode_ConcatPyUnicodeUCS4_Concat(a, b)
147 #define __Pyx_PyUnicode_ConcatSafe(a, b)((__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0) || __builtin_expect
(!!((b) == (&_Py_NoneStruct)), 0)) ? PyNumber_Add(a, b) :
PyUnicodeUCS4_Concat(a, b))
((unlikely((a) == Py_None)__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0) || unlikely((b) == Py_None)__builtin_expect(!!((b) == (&_Py_NoneStruct)), 0)) ?\
148 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)PyUnicodeUCS4_Concat(a, b))
149#endif
150#if CYTHON_COMPILING_IN_PYPY0 && !defined(PyUnicode_ContainsPyUnicodeUCS4_Contains)
151 #define PyUnicode_ContainsPyUnicodeUCS4_Contains(u, s) PySequence_Contains(u, s)
152#endif
153#define __Pyx_PyString_FormatSafe(a, b)((__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0)) ? PyNumber_Remainder
(a, b) : PyString_Format(a, b))
((unlikely((a) == Py_None)__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)PyString_Format(a, b))
154#define __Pyx_PyUnicode_FormatSafe(a, b)((__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0)) ? PyNumber_Remainder
(a, b) : PyUnicodeUCS4_Format(a, b))
((unlikely((a) == Py_None)__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0)) ? PyNumber_Remainder(a, b) : PyUnicode_FormatPyUnicodeUCS4_Format(a, b))
155#if PY_MAJOR_VERSION2 >= 3
156 #define __Pyx_PyString_Format(a, b)PyString_Format(a, b) PyUnicode_FormatPyUnicodeUCS4_Format(a, b)
157#else
158 #define __Pyx_PyString_Format(a, b)PyString_Format(a, b) PyString_Format(a, b)
159#endif
160#if PY_MAJOR_VERSION2 >= 3
161 #define PyBaseString_Type PyUnicode_Type
162 #define PyStringObject PyUnicodeObject
163 #define PyString_Type PyUnicode_Type
164 #define PyString_Check PyUnicode_Check
165 #define PyString_CheckExact PyUnicode_CheckExact
166#endif
167#if PY_MAJOR_VERSION2 >= 3
168 #define __Pyx_PyBaseString_Check(obj)(((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L
<<27))) != 0) || ((((((PyObject*)(obj))->ob_type))->
tp_flags & ((1L<<28))) != 0))
PyUnicode_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<
28))) != 0)
169 #define __Pyx_PyBaseString_CheckExact(obj)(((((PyObject*)(obj))->ob_type) == &PyString_Type) || (
(((PyObject*)(obj))->ob_type) == &PyUnicode_Type))
PyUnicode_CheckExact(obj)((((PyObject*)(obj))->ob_type) == &PyUnicode_Type)
170#else
171 #define __Pyx_PyBaseString_Check(obj)(((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L
<<27))) != 0) || ((((((PyObject*)(obj))->ob_type))->
tp_flags & ((1L<<28))) != 0))
(PyString_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<
27))) != 0)
|| PyUnicode_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<
28))) != 0)
)
172 #define __Pyx_PyBaseString_CheckExact(obj)(((((PyObject*)(obj))->ob_type) == &PyString_Type) || (
(((PyObject*)(obj))->ob_type) == &PyUnicode_Type))
(PyString_CheckExact(obj)((((PyObject*)(obj))->ob_type) == &PyString_Type) || PyUnicode_CheckExact(obj)((((PyObject*)(obj))->ob_type) == &PyUnicode_Type))
173#endif
174#ifndef PySet_CheckExact
175 #define PySet_CheckExact(obj)((((PyObject*)(obj))->ob_type) == &PySet_Type) (Py_TYPE(obj)(((PyObject*)(obj))->ob_type) == &PySet_Type)
176#endif
177#define __Pyx_TypeCheck(obj, type)((((PyObject*)(obj))->ob_type) == ((PyTypeObject *)type) ||
PyType_IsSubtype((((PyObject*)(obj))->ob_type), ((PyTypeObject
*)type)))
PyObject_TypeCheck(obj, (PyTypeObject *)type)((((PyObject*)(obj))->ob_type) == ((PyTypeObject *)type) ||
PyType_IsSubtype((((PyObject*)(obj))->ob_type), ((PyTypeObject
*)type)))
178#if PY_MAJOR_VERSION2 >= 3
179 #define PyIntObject PyLongObject
180 #define PyInt_Type PyLong_Type
181 #define PyInt_Check(op)((((op)->ob_type)->tp_flags & ((1L<<23))) != 0
)
PyLong_Check(op)((((((PyObject*)(op))->ob_type))->tp_flags & ((1L<<
24))) != 0)
182 #define PyInt_CheckExact(op)((op)->ob_type == &PyInt_Type) PyLong_CheckExact(op)((((PyObject*)(op))->ob_type) == &PyLong_Type)
183 #define PyInt_FromString PyLong_FromString
184 #define PyInt_FromUnicode PyLong_FromUnicode
185 #define PyInt_FromLong PyLong_FromLong
186 #define PyInt_FromSize_t PyLong_FromSize_t
187 #define PyInt_FromSsize_t PyLong_FromSsize_t
188 #define PyInt_AsLong PyLong_AsLong
189 #define PyInt_AS_LONG PyLong_AS_LONG
190 #define PyInt_AsSsize_t PyLong_AsSsize_t
191 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
192 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
193 #define PyNumber_Int PyNumber_Long
194#endif
195#if PY_MAJOR_VERSION2 >= 3
196 #define PyBoolObject PyLongObject
197#endif
198#if PY_MAJOR_VERSION2 >= 3 && CYTHON_COMPILING_IN_PYPY0
199 #ifndef PyUnicode_InternFromString
200 #define PyUnicode_InternFromString(s) PyUnicode_FromStringPyUnicodeUCS4_FromString(s)
201 #endif
202#endif
203#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030200A4
204 typedef long Py_hash_t;
205 #define __Pyx_PyInt_FromHash_tPyInt_FromLong PyInt_FromLong
206 #define __Pyx_PyInt_AsHash_tPyInt_AsLong PyInt_AsLong
207#else
208 #define __Pyx_PyInt_FromHash_tPyInt_FromLong PyInt_FromSsize_t
209 #define __Pyx_PyInt_AsHash_tPyInt_AsLong PyInt_AsSsize_t
210#endif
211#if PY_MAJOR_VERSION2 >= 3
212 #define __Pyx_PyMethod_New(func, self, klass)PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
213#else
214 #define __Pyx_PyMethod_New(func, self, klass)PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
215#endif
216#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030500B1
217#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
218#define __Pyx_PyType_AsAsync(obj)((void*)0) (Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_as_async)
219#elif CYTHON_COMPILING_IN_CPYTHON1 && PY_MAJOR_VERSION2 >= 3
220typedef struct {
221 unaryfunc am_await;
222 unaryfunc am_aiter;
223 unaryfunc am_anext;
224} __Pyx_PyAsyncMethodsStruct;
225#define __Pyx_PyType_AsAsync(obj)((void*)0) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_reserved))
226#else
227#define __Pyx_PyType_AsAsync(obj)((void*)0) NULL((void*)0)
228#endif
229#ifndef CYTHON_RESTRICT__restrict__
230 #if defined(__GNUC__4)
231 #define CYTHON_RESTRICT__restrict__ __restrict__
232 #elif defined(_MSC_VER) && _MSC_VER >= 1400
233 #define CYTHON_RESTRICT__restrict__ __restrict
234 #elif defined (__STDC_VERSION__199901L) && __STDC_VERSION__199901L >= 199901L
235 #define CYTHON_RESTRICT__restrict__ restrict
236 #else
237 #define CYTHON_RESTRICT__restrict__
238 #endif
239#endif
240#define __Pyx_void_to_None(void_result)((void)(void_result), ( ((PyObject*)((&_Py_NoneStruct)))->
ob_refcnt++), (&_Py_NoneStruct))
((void)(void_result), Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), Py_None(&_Py_NoneStruct))
241
242#ifndef CYTHON_INLINE__inline__
243 #if defined(__GNUC__4)
244 #define CYTHON_INLINE__inline__ __inline__
245 #elif defined(_MSC_VER)
246 #define CYTHON_INLINE__inline__ __inline
247 #elif defined (__STDC_VERSION__199901L) && __STDC_VERSION__199901L >= 199901L
248 #define CYTHON_INLINE__inline__ inline
249 #else
250 #define CYTHON_INLINE__inline__
251 #endif
252#endif
253
254#if defined(WIN32) || defined(MS_WINDOWS)
255 #define _USE_MATH_DEFINES
256#endif
257#include <math.h>
258#ifdef NAN(__builtin_nanf (""))
259#define __PYX_NAN()((float) (__builtin_nanf (""))) ((float) NAN(__builtin_nanf ("")))
260#else
261static CYTHON_INLINE__inline__ float __PYX_NAN()((float) (__builtin_nanf (""))) {
262 float value;
263 memset(&value, 0xFF, sizeof(value));
264 return value;
265}
266#endif
267
268
269#if PY_MAJOR_VERSION2 >= 3
270 #define __Pyx_PyNumber_Divide(x,y)PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
271 #define __Pyx_PyNumber_InPlaceDivide(x,y)PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
272#else
273 #define __Pyx_PyNumber_Divide(x,y)PyNumber_Divide(x,y) PyNumber_Divide(x,y)
274 #define __Pyx_PyNumber_InPlaceDivide(x,y)PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
275#endif
276
277#ifndef __PYX_EXTERN_Cextern
278 #ifdef __cplusplus
279 #define __PYX_EXTERN_Cextern extern "C"
280 #else
281 #define __PYX_EXTERN_Cextern extern
282 #endif
283#endif
284
285#define __PYX_HAVE__cephfs
286#define __PYX_HAVE_API__cephfs
287#include "string.h"
288#include "stdio.h"
289#include "pythread.h"
290#include "errno.h"
291#include "stdint.h"
292#include "stdlib.h"
293#include "rados/librados.h"
294#include "sys/statvfs.h"
295#include "dirent.h"
296#include "time.h"
297#include "sys/types.h"
298#include "cephfs/ceph_statx.h"
299#include "cephfs/libcephfs.h"
300#ifdef _OPENMP
301#include <omp.h>
302#endif /* _OPENMP */
303
304#ifdef PYREX_WITHOUT_ASSERTIONS
305#define CYTHON_WITHOUT_ASSERTIONS
306#endif
307
308#ifndef CYTHON_UNUSED__attribute__ ((__unused__))
309# if defined(__GNUC__4)
310# if !(defined(__cplusplus)) || (__GNUC__4 > 3 || (__GNUC__4 == 3 && __GNUC_MINOR__2 >= 4))
311# define CYTHON_UNUSED__attribute__ ((__unused__)) __attribute__ ((__unused__))
312# else
313# define CYTHON_UNUSED__attribute__ ((__unused__))
314# endif
315# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
316# define CYTHON_UNUSED__attribute__ ((__unused__)) __attribute__ ((__unused__))
317# else
318# define CYTHON_UNUSED__attribute__ ((__unused__))
319# endif
320#endif
321#ifndef CYTHON_NCP_UNUSED
322# if CYTHON_COMPILING_IN_CPYTHON1
323# define CYTHON_NCP_UNUSED
324# else
325# define CYTHON_NCP_UNUSED CYTHON_UNUSED__attribute__ ((__unused__))
326# endif
327#endif
328typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
329 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
330
331#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 0
332#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0 0
333#define __PYX_DEFAULT_STRING_ENCODING"" ""
334#define __Pyx_PyObject_FromStringPyString_FromString __Pyx_PyBytes_FromStringPyString_FromString
335#define __Pyx_PyObject_FromStringAndSizePyString_FromStringAndSize __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize
336#define __Pyx_uchar_cast(c)((unsigned char)c) ((unsigned char)c)
337#define __Pyx_long_cast(x)((long)x) ((long)x)
338#define __Pyx_fits_Py_ssize_t(v, type, is_signed)( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(v < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || v == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(v > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
v == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(v < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || v == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) )
(\
339 (sizeof(type) < sizeof(Py_ssize_t)) ||\
340 (sizeof(type) > sizeof(Py_ssize_t) &&\
341 likely(v < (type)PY_SSIZE_T_MAX ||\__builtin_expect(!!(v < (type)((Py_ssize_t)(((size_t)-1)>>
1)) || v == (type)((Py_ssize_t)(((size_t)-1)>>1))), 1)
342 v == (type)PY_SSIZE_T_MAX)__builtin_expect(!!(v < (type)((Py_ssize_t)(((size_t)-1)>>
1)) || v == (type)((Py_ssize_t)(((size_t)-1)>>1))), 1)
&&\
343 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\__builtin_expect(!!(v > (type)(-((Py_ssize_t)(((size_t)-1)
>>1))-1) || v == (type)(-((Py_ssize_t)(((size_t)-1)>>
1))-1)), 1)
344 v == (type)PY_SSIZE_T_MIN)__builtin_expect(!!(v > (type)(-((Py_ssize_t)(((size_t)-1)
>>1))-1) || v == (type)(-((Py_ssize_t)(((size_t)-1)>>
1))-1)), 1)
)) ||\
345 (sizeof(type) == sizeof(Py_ssize_t) &&\
346 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\__builtin_expect(!!(v < (type)((Py_ssize_t)(((size_t)-1)>>
1)) || v == (type)((Py_ssize_t)(((size_t)-1)>>1))), 1)
347 v == (type)PY_SSIZE_T_MAX)__builtin_expect(!!(v < (type)((Py_ssize_t)(((size_t)-1)>>
1)) || v == (type)((Py_ssize_t)(((size_t)-1)>>1))), 1)
)) )
348#if defined (__cplusplus) && __cplusplus >= 201103L
349 #include <cstdlib>
350 #define __Pyx_sst_abs(value)labs(value) std::abs(value)
351#elif SIZEOF_INT4 >= SIZEOF_SIZE_T8
352 #define __Pyx_sst_abs(value)labs(value) abs(value)
353#elif SIZEOF_LONG8 >= SIZEOF_SIZE_T8
354 #define __Pyx_sst_abs(value)labs(value) labs(value)
355#elif defined (_MSC_VER) && defined (_M_X64)
356 #define __Pyx_sst_abs(value)labs(value) _abs64(value)
357#elif defined (__STDC_VERSION__199901L) && __STDC_VERSION__199901L >= 199901L
358 #define __Pyx_sst_abs(value)labs(value) llabs(value)
359#elif defined (__GNUC__4)
360 #define __Pyx_sst_abs(value)labs(value) __builtin_llabs(value)
361#else
362 #define __Pyx_sst_abs(value)labs(value) ((value<0) ? -value : value)
363#endif
364static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsString(PyObject*);
365static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
366#define __Pyx_PyByteArray_FromString(s)PyByteArray_FromStringAndSize((const char*)s, strlen((const char
*)s))
PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
367#define __Pyx_PyByteArray_FromStringAndSize(s, l)PyByteArray_FromStringAndSize((const char*)s, l) PyByteArray_FromStringAndSize((const char*)s, l)
368#define __Pyx_PyBytes_FromStringPyString_FromString PyBytes_FromStringPyString_FromString
369#define __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize PyBytes_FromStringAndSizePyString_FromStringAndSize
370static CYTHON_INLINE__inline__ PyObject* __Pyx_PyUnicode_FromString(const char*);
371#if PY_MAJOR_VERSION2 < 3
372 #define __Pyx_PyStr_FromStringPyString_FromString __Pyx_PyBytes_FromStringPyString_FromString
373 #define __Pyx_PyStr_FromStringAndSizePyString_FromStringAndSize __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize
374#else
375 #define __Pyx_PyStr_FromStringPyString_FromString __Pyx_PyUnicode_FromString
376 #define __Pyx_PyStr_FromStringAndSizePyString_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
377#endif
378#define __Pyx_PyObject_AsSString(s)((signed char*) __Pyx_PyObject_AsString(s)) ((signed char*) __Pyx_PyObject_AsString(s))
379#define __Pyx_PyObject_AsUString(s)((unsigned char*) __Pyx_PyObject_AsString(s)) ((unsigned char*) __Pyx_PyObject_AsString(s))
380#define __Pyx_PyObject_FromCString(s)PyString_FromString((const char*)s) __Pyx_PyObject_FromStringPyString_FromString((const char*)s)
381#define __Pyx_PyBytes_FromCString(s)PyString_FromString((const char*)s) __Pyx_PyBytes_FromStringPyString_FromString((const char*)s)
382#define __Pyx_PyByteArray_FromCString(s)PyByteArray_FromStringAndSize((const char*)(const char*)s, strlen
((const char*)(const char*)s))
__Pyx_PyByteArray_FromString((const char*)s)PyByteArray_FromStringAndSize((const char*)(const char*)s, strlen
((const char*)(const char*)s))
383#define __Pyx_PyStr_FromCString(s)PyString_FromString((const char*)s) __Pyx_PyStr_FromStringPyString_FromString((const char*)s)
384#define __Pyx_PyUnicode_FromCString(s)__Pyx_PyUnicode_FromString((const char*)s) __Pyx_PyUnicode_FromString((const char*)s)
385#if PY_MAJOR_VERSION2 < 3
386static CYTHON_INLINE__inline__ size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
387{
388 const Py_UNICODE *u_end = u;
389 while (*u_end++) ;
390 return (size_t)(u_end - u - 1);
391}
392#else
393#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
394#endif
395#define __Pyx_PyUnicode_FromUnicode(u)PyUnicodeUCS4_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) PyUnicode_FromUnicodePyUnicodeUCS4_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
396#define __Pyx_PyUnicode_FromUnicodeAndLengthPyUnicodeUCS4_FromUnicode PyUnicode_FromUnicodePyUnicodeUCS4_FromUnicode
397#define __Pyx_PyUnicode_AsUnicodePyUnicodeUCS4_AsUnicode PyUnicode_AsUnicodePyUnicodeUCS4_AsUnicode
398#define __Pyx_NewRef(obj)(( ((PyObject*)(obj))->ob_refcnt++), obj) (Py_INCREF(obj)( ((PyObject*)(obj))->ob_refcnt++), obj)
399#define __Pyx_Owned_Py_None(b)(( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&
_Py_NoneStruct))
__Pyx_NewRef(Py_None)(( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&
_Py_NoneStruct))
400#define __Pyx_PyBool_FromLong(b)((b) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct)))->
ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : (( ((PyObject
*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt++), ((PyObject
*) &_Py_ZeroStruct)))
((b) ? __Pyx_NewRef(Py_True)(( ((PyObject*)(((PyObject *) &_Py_TrueStruct)))->ob_refcnt
++), ((PyObject *) &_Py_TrueStruct))
: __Pyx_NewRef(Py_False)(( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++), ((PyObject *) &_Py_ZeroStruct))
)
401static CYTHON_INLINE__inline__ int __Pyx_PyObject_IsTrue(PyObject*);
402static CYTHON_INLINE__inline__ PyObject* __Pyx_PyNumber_Int(PyObject* x);
403static CYTHON_INLINE__inline__ Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
404static CYTHON_INLINE__inline__ PyObject * __Pyx_PyInt_FromSize_t(size_t);
405#if CYTHON_COMPILING_IN_CPYTHON1
406#define __pyx_PyFloat_AsDouble(x)(((((PyObject*)(x))->ob_type) == &PyFloat_Type) ? (((PyFloatObject
*)(x))->ob_fval) : PyFloat_AsDouble(x))
(PyFloat_CheckExact(x)((((PyObject*)(x))->ob_type) == &PyFloat_Type) ? PyFloat_AS_DOUBLE(x)(((PyFloatObject *)(x))->ob_fval) : PyFloat_AsDouble(x))
407#else
408#define __pyx_PyFloat_AsDouble(x)(((((PyObject*)(x))->ob_type) == &PyFloat_Type) ? (((PyFloatObject
*)(x))->ob_fval) : PyFloat_AsDouble(x))
PyFloat_AsDouble(x)
409#endif
410#define __pyx_PyFloat_AsFloat(x)((float) (((((PyObject*)(x))->ob_type) == &PyFloat_Type
) ? (((PyFloatObject *)(x))->ob_fval) : PyFloat_AsDouble(x
)))
((float) __pyx_PyFloat_AsDouble(x)(((((PyObject*)(x))->ob_type) == &PyFloat_Type) ? (((PyFloatObject
*)(x))->ob_fval) : PyFloat_AsDouble(x))
)
411#if PY_MAJOR_VERSION2 < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0
412static int __Pyx_sys_getdefaultencoding_not_ascii;
413static int __Pyx_init_sys_getdefaultencoding_params(void) {
414 PyObject* sys;
415 PyObject* default_encoding = NULL((void*)0);
416 PyObject* ascii_chars_u = NULL((void*)0);
417 PyObject* ascii_chars_b = NULL((void*)0);
418 const char* default_encoding_c;
419 sys = PyImport_ImportModule("sys");
420 if (!sys) goto bad;
421 default_encoding = PyObject_CallMethod_PyObject_CallMethod_SizeT(sys, (char*) "getdefaultencoding", NULL((void*)0));
422 Py_DECREF(sys)do { if ( --((PyObject*)(sys))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(sys)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(sys)))); } while (0)
;
423 if (!default_encoding) goto bad;
424 default_encoding_c = PyBytes_AsStringPyString_AsString(default_encoding);
425 if (!default_encoding_c) goto bad;
426 if (strcmp(default_encoding_c, "ascii")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p
(default_encoding_c) && __builtin_constant_p ("ascii"
) && (__s1_len = __builtin_strlen (default_encoding_c
), __s2_len = __builtin_strlen ("ascii"), (!((size_t)(const void
*)((default_encoding_c) + 1) - (size_t)(const void *)(default_encoding_c
) == 1) || __s1_len >= 4) && (!((size_t)(const void
*)(("ascii") + 1) - (size_t)(const void *)("ascii") == 1) ||
__s2_len >= 4)) ? __builtin_strcmp (default_encoding_c, "ascii"
) : (__builtin_constant_p (default_encoding_c) && ((size_t
)(const void *)((default_encoding_c) + 1) - (size_t)(const void
*)(default_encoding_c) == 1) && (__s1_len = __builtin_strlen
(default_encoding_c), __s1_len < 4) ? (__builtin_constant_p
("ascii") && ((size_t)(const void *)(("ascii") + 1) -
(size_t)(const void *)("ascii") == 1) ? __builtin_strcmp (default_encoding_c
, "ascii") : (__extension__ ({ const unsigned char *__s2 = (const
unsigned char *) (const char *) ("ascii"); int __result = ((
(const unsigned char *) (const char *) (default_encoding_c))[
0] - __s2[0]); if (__s1_len > 0 && __result == 0) {
__result = (((const unsigned char *) (const char *) (default_encoding_c
))[1] - __s2[1]); if (__s1_len > 1 && __result == 0
) { __result = (((const unsigned char *) (const char *) (default_encoding_c
))[2] - __s2[2]); if (__s1_len > 2 && __result == 0
) __result = (((const unsigned char *) (const char *) (default_encoding_c
))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
"ascii") && ((size_t)(const void *)(("ascii") + 1) - (
size_t)(const void *)("ascii") == 1) && (__s2_len = __builtin_strlen
("ascii"), __s2_len < 4) ? (__builtin_constant_p (default_encoding_c
) && ((size_t)(const void *)((default_encoding_c) + 1
) - (size_t)(const void *)(default_encoding_c) == 1) ? __builtin_strcmp
(default_encoding_c, "ascii") : (- (__extension__ ({ const unsigned
char *__s2 = (const unsigned char *) (const char *) (default_encoding_c
); int __result = (((const unsigned char *) (const char *) ("ascii"
))[0] - __s2[0]); if (__s2_len > 0 && __result == 0
) { __result = (((const unsigned char *) (const char *) ("ascii"
))[1] - __s2[1]); if (__s2_len > 1 && __result == 0
) { __result = (((const unsigned char *) (const char *) ("ascii"
))[2] - __s2[2]); if (__s2_len > 2 && __result == 0
) __result = (((const unsigned char *) (const char *) ("ascii"
))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (default_encoding_c
, "ascii")))); })
== 0) {
427 __Pyx_sys_getdefaultencoding_not_ascii = 0;
428 } else {
429 char ascii_chars[128];
430 int c;
431 for (c = 0; c < 128; c++) {
432 ascii_chars[c] = c;
433 }
434 __Pyx_sys_getdefaultencoding_not_ascii = 1;
435 ascii_chars_u = PyUnicode_DecodeASCIIPyUnicodeUCS4_DecodeASCII(ascii_chars, 128, NULL((void*)0));
436 if (!ascii_chars_u) goto bad;
437 ascii_chars_b = PyUnicode_AsEncodedStringPyUnicodeUCS4_AsEncodedString(ascii_chars_u, default_encoding_c, NULL((void*)0));
438 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b)((((((PyObject*)(ascii_chars_b))->ob_type))->tp_flags &
((1L<<27))) != 0)
|| memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b)(((PyStringObject *)(ascii_chars_b))->ob_sval), 128) != 0) {
439 PyErr_Format(
440 PyExc_ValueError,
441 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
442 default_encoding_c);
443 goto bad;
444 }
445 Py_DECREF(ascii_chars_u)do { if ( --((PyObject*)(ascii_chars_u))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(ascii_chars_u)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(ascii_chars_u))))
; } while (0)
;
446 Py_DECREF(ascii_chars_b)do { if ( --((PyObject*)(ascii_chars_b))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(ascii_chars_b)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(ascii_chars_b))))
; } while (0)
;
447 }
448 Py_DECREF(default_encoding)do { if ( --((PyObject*)(default_encoding))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(default_encoding)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(default_encoding
)))); } while (0)
;
449 return 0;
450bad:
451 Py_XDECREF(default_encoding)do { if ((default_encoding) == ((void*)0)) ; else do { if ( --
((PyObject*)(default_encoding))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(default_encoding)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(default_encoding)))); }
while (0); } while (0)
;
452 Py_XDECREF(ascii_chars_u)do { if ((ascii_chars_u) == ((void*)0)) ; else do { if ( --((
PyObject*)(ascii_chars_u))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(ascii_chars_u)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(ascii_chars_u)))); } while (0); }
while (0)
;
453 Py_XDECREF(ascii_chars_b)do { if ((ascii_chars_b) == ((void*)0)) ; else do { if ( --((
PyObject*)(ascii_chars_b))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(ascii_chars_b)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(ascii_chars_b)))); } while (0); }
while (0)
;
454 return -1;
455}
456#endif
457#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0 && PY_MAJOR_VERSION2 >= 3
458#define __Pyx_PyUnicode_FromStringAndSize(c_str, size)PyUnicodeUCS4_Decode(c_str, size, "", ((void*)0)) PyUnicode_DecodeUTF8PyUnicodeUCS4_DecodeUTF8(c_str, size, NULL((void*)0))
459#else
460#define __Pyx_PyUnicode_FromStringAndSize(c_str, size)PyUnicodeUCS4_Decode(c_str, size, "", ((void*)0)) PyUnicode_DecodePyUnicodeUCS4_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING"", NULL((void*)0))
461#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0
462static char* __PYX_DEFAULT_STRING_ENCODING"";
463static int __Pyx_init_sys_getdefaultencoding_params(void) {
464 PyObject* sys;
465 PyObject* default_encoding = NULL((void*)0);
466 char* default_encoding_c;
467 sys = PyImport_ImportModule("sys");
468 if (!sys) goto bad;
469 default_encoding = PyObject_CallMethod_PyObject_CallMethod_SizeT(sys, (char*) (const char*) "getdefaultencoding", NULL((void*)0));
470 Py_DECREF(sys)do { if ( --((PyObject*)(sys))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(sys)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(sys)))); } while (0)
;
471 if (!default_encoding) goto bad;
472 default_encoding_c = PyBytes_AsStringPyString_AsString(default_encoding);
473 if (!default_encoding_c) goto bad;
474 __PYX_DEFAULT_STRING_ENCODING"" = (char*) malloc(strlen(default_encoding_c));
475 if (!__PYX_DEFAULT_STRING_ENCODING"") goto bad;
476 strcpy(__PYX_DEFAULT_STRING_ENCODING"", default_encoding_c);
477 Py_DECREF(default_encoding)do { if ( --((PyObject*)(default_encoding))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(default_encoding)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(default_encoding
)))); } while (0)
;
478 return 0;
479bad:
480 Py_XDECREF(default_encoding)do { if ((default_encoding) == ((void*)0)) ; else do { if ( --
((PyObject*)(default_encoding))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(default_encoding)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(default_encoding)))); }
while (0); } while (0)
;
481 return -1;
482}
483#endif
484#endif
485
486
487/* Test for GCC > 2.95 */
488#if defined(__GNUC__4) && (__GNUC__4 > 2 || (__GNUC__4 == 2 && (__GNUC_MINOR__2 > 95)))
489 #define likely(x)__builtin_expect(!!(x), 1) __builtin_expect(!!(x), 1)
490 #define unlikely(x)__builtin_expect(!!(x), 0) __builtin_expect(!!(x), 0)
491#else /* !__GNUC__ or GCC < 2.95 */
492 #define likely(x)__builtin_expect(!!(x), 1) (x)
493 #define unlikely(x)__builtin_expect(!!(x), 0) (x)
494#endif /* __GNUC__ */
495
496static PyObject *__pyx_m;
497static PyObject *__pyx_d;
498static PyObject *__pyx_b;
499static PyObject *__pyx_empty_tuple;
500static PyObject *__pyx_empty_bytes;
501static int __pyx_lineno;
502static int __pyx_clineno = 0;
503static const char * __pyx_cfilenm= __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/cephfs2/cephfs.c";
504static const char *__pyx_filename;
505
506
507static const char *__pyx_f[] = {
508 "cephfs.pyx",
509 "type.pxd",
510 "bool.pxd",
511 "complex.pxd",
512 "rados.pxd",
513};
514
515/*--- Type declarations ---*/
516struct __pyx_obj_5rados_Rados;
517struct __pyx_obj_5rados_Ioctx;
518struct __pyx_obj_6cephfs_DirResult;
519struct __pyx_obj_6cephfs_LibCephFS;
520
521/* "rados.pxd":14
522 *
523 *
524 * cdef class Rados(object): # <<<<<<<<<<<<<<
525 * cdef:
526 * rados_t cluster
527 */
528struct __pyx_obj_5rados_Rados {
529 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
530 rados_t cluster;
531 PyObject *state;
532 PyObject *monitor_callback;
533 PyObject *monitor_callback2;
534 PyObject *parsed_args;
535 PyObject *conf_defaults;
536 PyObject *conffile;
537 PyObject *rados_id;
538};
539
540
541/* "rados.pxd":26
542 *
543 *
544 * cdef class Ioctx(object): # <<<<<<<<<<<<<<
545 * cdef:
546 * rados_ioctx_t io
547 */
548struct __pyx_obj_5rados_Ioctx {
549 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
550 rados_ioctx_t io;
551 PyObject *name;
552 PyObject *state;
553 PyObject *locator_key;
554 PyObject *nspace;
555 PyObject *safe_completions;
556 PyObject *complete_completions;
557 PyObject *lock;
558};
559
560
561/* "cephfs.pyx":284
562 * "st_blocks", "st_atime", "st_mtime", "st_ctime"])
563 *
564 * cdef class DirResult(object): # <<<<<<<<<<<<<<
565 * cdef LibCephFS lib
566 * cdef ceph_dir_result* handle
567 */
568struct __pyx_obj_6cephfs_DirResult {
569 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
570 struct __pyx_obj_6cephfs_LibCephFS *lib;
571 struct ceph_dir_result *handle;
572};
573
574
575/* "cephfs.pyx":396
576 *
577 *
578 * cdef class LibCephFS(object): # <<<<<<<<<<<<<<
579 * """libcephfs python wrapper"""
580 *
581 */
582struct __pyx_obj_6cephfs_LibCephFS {
583 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
584 PyObject *state;
585 struct ceph_mount_info *cluster;
586};
587
588
589/* --- Runtime support code (head) --- */
590#ifndef CYTHON_REFNANNY0
591 #define CYTHON_REFNANNY0 0
592#endif
593#if CYTHON_REFNANNY0
594 typedef struct {
595 void (*INCREF)(void*, PyObject*, int);
596 void (*DECREF)(void*, PyObject*, int);
597 void (*GOTREF)(void*, PyObject*, int);
598 void (*GIVEREF)(void*, PyObject*, int);
599 void* (*SetupContext)(const char*, int, const char*);
600 void (*FinishContext)(void**);
601 } __Pyx_RefNannyAPIStruct;
602 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL((void*)0);
603 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
604 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL((void*)0);
605#ifdef WITH_THREAD1
606 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
607 if (acquire_gil) {\
608 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
609 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__609, __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/cephfs2/cephfs.c");\
610 PyGILState_Release(__pyx_gilstate_save);\
611 } else {\
612 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__612, __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/cephfs2/cephfs.c");\
613 }
614#else
615 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
616 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__616, __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/cephfs2/cephfs.c")
617#endif
618 #define __Pyx_RefNannyFinishContext()\
619 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
620 #define __Pyx_INCREF(r)( ((PyObject*)(r))->ob_refcnt++) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__620)
621 #define __Pyx_DECREF(r)do { if ( --((PyObject*)(r))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(r)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(r)))); } while (0)
__Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__621)
622 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__622)
623 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__623)
624 #define __Pyx_XINCREF(r)do { if ((r) == ((void*)0)) ; else ( ((PyObject*)(r))->ob_refcnt
++); } while (0)
do { if((r) != NULL((void*)0)) {__Pyx_INCREF(r)( ((PyObject*)(r))->ob_refcnt++); }} while(0)
625 #define __Pyx_XDECREF(r)do { if ((r) == ((void*)0)) ; else do { if ( --((PyObject*)(r
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(r
)))); } while (0); } while (0)
do { if((r) != NULL((void*)0)) {__Pyx_DECREF(r)do { if ( --((PyObject*)(r))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(r)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(r)))); } while (0)
; }} while(0)
626 #define __Pyx_XGOTREF(r) do { if((r) != NULL((void*)0)) {__Pyx_GOTREF(r); }} while(0)
627 #define __Pyx_XGIVEREF(r) do { if((r) != NULL((void*)0)) {__Pyx_GIVEREF(r);}} while(0)
628#else
629 #define __Pyx_RefNannyDeclarations
630 #define __Pyx_RefNannySetupContext(name, acquire_gil)
631 #define __Pyx_RefNannyFinishContext()
632 #define __Pyx_INCREF(r)( ((PyObject*)(r))->ob_refcnt++) Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++)
633 #define __Pyx_DECREF(r)do { if ( --((PyObject*)(r))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(r)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(r)))); } while (0)
Py_DECREF(r)do { if ( --((PyObject*)(r))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(r)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(r)))); } while (0)
634 #define __Pyx_GOTREF(r)
635 #define __Pyx_GIVEREF(r)
636 #define __Pyx_XINCREF(r)do { if ((r) == ((void*)0)) ; else ( ((PyObject*)(r))->ob_refcnt
++); } while (0)
Py_XINCREF(r)do { if ((r) == ((void*)0)) ; else ( ((PyObject*)(r))->ob_refcnt
++); } while (0)
637 #define __Pyx_XDECREF(r)do { if ((r) == ((void*)0)) ; else do { if ( --((PyObject*)(r
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(r
)))); } while (0); } while (0)
Py_XDECREF(r)do { if ((r) == ((void*)0)) ; else do { if ( --((PyObject*)(r
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(r
)))); } while (0); } while (0)
638 #define __Pyx_XGOTREF(r)
639 #define __Pyx_XGIVEREF(r)
640#endif
641#define __Pyx_XDECREF_SET(r, v)do { PyObject *tmp = (PyObject *) r; r = v; do { if ((tmp) ==
((void*)0)) ; else do { if ( --((PyObject*)(tmp))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0); } while (0)
do {\
642 PyObject *tmp = (PyObject *) r;\
643 r = v; __Pyx_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;\
644 } while (0)
645#define __Pyx_DECREF_SET(r, v)do { PyObject *tmp = (PyObject *) r; r = v; do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
do {\
646 PyObject *tmp = (PyObject *) r;\
647 r = v; __Pyx_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;\
648 } while (0)
649#define __Pyx_CLEAR(r)do { PyObject* tmp = ((PyObject*)(r)); r = ((void*)0); do { if
( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp)))); } while (0);} while(0)
do { PyObject* tmp = ((PyObject*)(r)); r = NULL((void*)0); __Pyx_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;} while(0)
650#define __Pyx_XCLEAR(r)do { if((r) != ((void*)0)) {PyObject* tmp = ((PyObject*)(r));
r = ((void*)0); do { if ( --((PyObject*)(tmp))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0);}} while(0)
do { if((r) != NULL((void*)0)) {PyObject* tmp = ((PyObject*)(r)); r = NULL((void*)0); __Pyx_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;}} while(0)
651
652#if CYTHON_COMPILING_IN_CPYTHON1
653static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
654 PyTypeObject* tp = Py_TYPE(obj)(((PyObject*)(obj))->ob_type);
655 if (likely(tp->tp_getattro)__builtin_expect(!!(tp->tp_getattro), 1))
656 return tp->tp_getattro(obj, attr_name);
657#if PY_MAJOR_VERSION2 < 3
658 if (likely(tp->tp_getattr)__builtin_expect(!!(tp->tp_getattr), 1))
659 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)(((PyStringObject *)(attr_name))->ob_sval));
660#endif
661 return PyObject_GetAttr(obj, attr_name);
662}
663#else
664#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
665#endif
666
667static PyObject *__Pyx_GetBuiltinName(PyObject *name);
668
669static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
670 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
671
672static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
673
674static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
675 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
676 const char* function_name);
677
678static CYTHON_INLINE__inline__ PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
679
680#if CYTHON_COMPILING_IN_CPYTHON1
681static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
682#else
683#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
684#endif
685
686#if CYTHON_COMPILING_IN_CPYTHON1
687#define __Pyx_PyObject_DelAttrStr(o,n)__Pyx_PyObject_SetAttrStr(o,n,((void*)0)) __Pyx_PyObject_SetAttrStr(o,n,NULL((void*)0))
688static CYTHON_INLINE__inline__ int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
689 PyTypeObject* tp = Py_TYPE(obj)(((PyObject*)(obj))->ob_type);
690 if (likely(tp->tp_setattro)__builtin_expect(!!(tp->tp_setattro), 1))
691 return tp->tp_setattro(obj, attr_name, value);
692#if PY_MAJOR_VERSION2 < 3
693 if (likely(tp->tp_setattr)__builtin_expect(!!(tp->tp_setattr), 1))
694 return tp->tp_setattr(obj, PyString_AS_STRING(attr_name)(((PyStringObject *)(attr_name))->ob_sval), value);
695#endif
696 return PyObject_SetAttr(obj, attr_name, value);
697}
698#else
699#define __Pyx_PyObject_DelAttrStr(o,n)__Pyx_PyObject_SetAttrStr(o,n,((void*)0)) PyObject_DelAttr(o,n)PyObject_SetAttr((o),(n),((void*)0))
700#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
701#endif
702
703#if CYTHON_COMPILING_IN_CPYTHON1
704static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
705#endif
706
707static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
708
709static CYTHON_INLINE__inline__ int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
710 int result = PySequence_Contains(seq, item);
711 return unlikely(result < 0)__builtin_expect(!!(result < 0), 0) ? result : (result == (eq == Py_EQ2));
712}
713
714#if CYTHON_COMPILING_IN_CPYTHON1
715static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
716#else
717#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL((void*)0))
718#endif
719
720static CYTHON_INLINE__inline__ void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
721static CYTHON_INLINE__inline__ void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
722
723static void __Pyx_WriteUnraisable(const char *name, int clineno,
724 int lineno, const char *filename,
725 int full_traceback, int nogil);
726
727static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
728
729static CYTHON_INLINE__inline__ void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
730static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
731
732static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
733
734#if CYTHON_COMPILING_IN_CPYTHON1
735static CYTHON_INLINE__inline__ int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
736 PyListObject* L = (PyListObject*) list;
737 Py_ssize_t len = Py_SIZE(list)(((PyVarObject*)(list))->ob_size);
738 if (likely(L->allocated > len)__builtin_expect(!!(L->allocated > len), 1)) {
739 Py_INCREF(x)( ((PyObject*)(x))->ob_refcnt++);
740 PyList_SET_ITEM(list, len, x)(((PyListObject *)(list))->ob_item[len] = (x));
741 Py_SIZE(list)(((PyVarObject*)(list))->ob_size) = len+1;
742 return 0;
743 }
744 return PyList_Append(list, x);
745}
746#else
747#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
748#endif
749
750#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)(( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) ) ? __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list
, wraparound, boundscheck) : (is_list ? (PyErr_SetString(PyExc_IndexError
, "list index out of range"), (PyObject*)((void*)0)) : __Pyx_GetItemInt_Generic
(o, to_py_func(i))))
\
751 (__Pyx_fits_Py_ssize_t(i, type, is_signed)( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) )
?\
752 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
753 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL((void*)0)) :\
754 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
755#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)(( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) ) ? __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound
, boundscheck) : (PyErr_SetString(PyExc_IndexError, "list index out of range"
), (PyObject*)((void*)0)))
\
756 (__Pyx_fits_Py_ssize_t(i, type, is_signed)( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) )
?\
757 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
758 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL((void*)0)))
759static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
760 int wraparound, int boundscheck);
761#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)(( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) ) ? __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound
, boundscheck) : (PyErr_SetString(PyExc_IndexError, "tuple index out of range"
), (PyObject*)((void*)0)))
\
762 (__Pyx_fits_Py_ssize_t(i, type, is_signed)( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) )
?\
763 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
764 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL((void*)0)))
765static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
766 int wraparound, int boundscheck);
767static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
768static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
769 int is_list, int wraparound, int boundscheck);
770
771static CYTHON_INLINE__inline__ int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
772
773static CYTHON_INLINE__inline__ int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
774 const char *name, int exact);
775
776#include <string.h>
777
778static CYTHON_INLINE__inline__ int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
779
780static CYTHON_INLINE__inline__ int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
781
782#if PY_MAJOR_VERSION2 >= 3
783#define __Pyx_PyString_Equals__Pyx_PyBytes_Equals __Pyx_PyUnicode_Equals
784#else
785#define __Pyx_PyString_Equals__Pyx_PyBytes_Equals __Pyx_PyBytes_Equals
786#endif
787
788static CYTHON_INLINE__inline__ int __Pyx_IterFinish(void);
789
790static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
791
792static CYTHON_INLINE__inline__ void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
793
794static CYTHON_INLINE__inline__ void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
795
796static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
797
798static CYTHON_INLINE__inline__ void __Pyx_RaiseNoneNotIterableError(void);
799
800static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
801
802static CYTHON_INLINE__inline__ int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
803 int is_tuple, int has_known_size, int decref_tuple);
804
805static CYTHON_INLINE__inline__ PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
806 Py_ssize_t* p_orig_length, int* p_is_dict);
807static CYTHON_INLINE__inline__ int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
808 PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
809
810static CYTHON_INLINE__inline__ void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
811
812static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
813
814static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
815
816static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
817
818static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
819 PyObject *mkw, PyObject *modname, PyObject *doc);
820static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
821 PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
822
823static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
824
825#define __Pyx_CyFunction_USED1 1
826#include <structmember.h>
827#define __Pyx_CYFUNCTION_STATICMETHOD0x01 0x01
828#define __Pyx_CYFUNCTION_CLASSMETHOD0x02 0x02
829#define __Pyx_CYFUNCTION_CCLASS0x04 0x04
830#define __Pyx_CyFunction_GetClosure(f)(((__pyx_CyFunctionObject *) (f))->func_closure)\
831 (((__pyx_CyFunctionObject *) (f))->func_closure)
832#define __Pyx_CyFunction_GetClassObj(f)(((__pyx_CyFunctionObject *) (f))->func_classobj)\
833 (((__pyx_CyFunctionObject *) (f))->func_classobj)
834#define __Pyx_CyFunction_Defaults(type, f)((type *)(((__pyx_CyFunctionObject *) (f))->defaults))\
835 ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
836#define __Pyx_CyFunction_SetDefaultsGetter(f, g)((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)\
837 ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
838typedef struct {
839 PyCFunctionObject func;
840#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030500A0
841 PyObject *func_weakreflist;
842#endif
843 PyObject *func_dict;
844 PyObject *func_name;
845 PyObject *func_qualname;
846 PyObject *func_doc;
847 PyObject *func_globals;
848 PyObject *func_code;
849 PyObject *func_closure;
850 PyObject *func_classobj;
851 void *defaults;
852 int defaults_pyobjects;
853 int flags;
854 PyObject *defaults_tuple;
855 PyObject *defaults_kwdict;
856 PyObject *(*defaults_getter)(PyObject *);
857 PyObject *func_annotations;
858} __pyx_CyFunctionObject;
859static PyTypeObject *__pyx_CyFunctionType = 0;
860#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)__Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname
, self, module, globals, code)
\
861 __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
862static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
863 int flags, PyObject* qualname,
864 PyObject *self,
865 PyObject *module, PyObject *globals,
866 PyObject* code);
867static CYTHON_INLINE__inline__ void *__Pyx_CyFunction_InitDefaults(PyObject *m,
868 size_t size,
869 int pyobjects);
870static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
871 PyObject *tuple);
872static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
873 PyObject *dict);
874static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
875 PyObject *dict);
876static int __pyx_CyFunction_init(void);
877
878typedef struct {
879 int code_line;
880 PyCodeObject* code_object;
881} __Pyx_CodeObjectCacheEntry;
882struct __Pyx_CodeObjectCache {
883 int count;
884 int max_count;
885 __Pyx_CodeObjectCacheEntry* entries;
886};
887static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL((void*)0)};
888static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
889static PyCodeObject *__pyx_find_code_object(int code_line);
890static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
891
892static void __Pyx_AddTraceback(const char *funcname, int c_line,
893 int py_line, const char *filename);
894
895static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_long(long value);
896
897static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_int(int value);
898
899static CYTHON_INLINE__inline__ int __Pyx_PyInt_As_int(PyObject *);
900
901#ifndef __PYX_FORCE_INIT_THREADS0
902 #define __PYX_FORCE_INIT_THREADS0 0
903#endif
904
905static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value);
906
907static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value);
908
909static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value);
910
911static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);
912
913static CYTHON_INLINE__inline__ int64_t __Pyx_PyInt_As_int64_t(PyObject *);
914
915static CYTHON_INLINE__inline__ uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);
916
917static CYTHON_INLINE__inline__ size_t __Pyx_PyInt_As_size_t(PyObject *);
918
919static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint16_t(uint16_t value);
920
921static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);
922
923static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_time_t(time_t value);
924
925static CYTHON_INLINE__inline__ mode_t __Pyx_PyInt_As_mode_t(PyObject *);
926
927static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_mode_t(mode_t value);
928
929static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_int64_t(int64_t value);
930
931static CYTHON_INLINE__inline__ long __Pyx_PyInt_As_long(PyObject *);
932
933static int __Pyx_check_binary_version(void);
934
935#if !defined(__Pyx_PyIdentifier_FromString)
936#if PY_MAJOR_VERSION2 < 3
937 #define __Pyx_PyIdentifier_FromString(s)PyString_FromString(s) PyString_FromString(s)
938#else
939 #define __Pyx_PyIdentifier_FromString(s)PyString_FromString(s) PyUnicode_FromStringPyUnicodeUCS4_FromString(s)
940#endif
941#endif
942
943static PyObject *__Pyx_ImportModule(const char *name);
944
945static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
946
947static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
948
949
950/* Module declarations from 'cpython.version' */
951
952/* Module declarations from '__builtin__' */
953
954/* Module declarations from 'cpython.type' */
955static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
956
957/* Module declarations from 'libc.string' */
958
959/* Module declarations from 'libc.stdio' */
960
961/* Module declarations from 'cpython.object' */
962
963/* Module declarations from 'cpython.ref' */
964
965/* Module declarations from 'cpython.exc' */
966
967/* Module declarations from 'cpython.module' */
968
969/* Module declarations from 'cpython.mem' */
970
971/* Module declarations from 'cpython.tuple' */
972
973/* Module declarations from 'cpython.list' */
974
975/* Module declarations from 'cpython.sequence' */
976
977/* Module declarations from 'cpython.mapping' */
978
979/* Module declarations from 'cpython.iterator' */
980
981/* Module declarations from 'cpython.number' */
982
983/* Module declarations from 'cpython.int' */
984
985/* Module declarations from '__builtin__' */
986
987/* Module declarations from 'cpython.bool' */
988static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
989
990/* Module declarations from 'cpython.long' */
991
992/* Module declarations from 'cpython.float' */
993
994/* Module declarations from '__builtin__' */
995
996/* Module declarations from 'cpython.complex' */
997static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
998
999/* Module declarations from 'cpython.string' */
1000
1001/* Module declarations from 'cpython.unicode' */
1002
1003/* Module declarations from 'cpython.dict' */
1004
1005/* Module declarations from 'cpython.instance' */
1006
1007/* Module declarations from 'cpython.function' */
1008
1009/* Module declarations from 'cpython.method' */
1010
1011/* Module declarations from 'cpython.weakref' */
1012
1013/* Module declarations from 'cpython.getargs' */
1014
1015/* Module declarations from 'cpython.pythread' */
1016
1017/* Module declarations from 'cpython.pystate' */
1018
1019/* Module declarations from 'cpython.cobject' */
1020
1021/* Module declarations from 'cpython.oldbuffer' */
1022
1023/* Module declarations from 'cpython.set' */
1024
1025/* Module declarations from 'cpython.buffer' */
1026
1027/* Module declarations from 'cpython.bytes' */
1028
1029/* Module declarations from 'cpython.pycapsule' */
1030
1031/* Module declarations from 'cpython' */
1032
1033/* Module declarations from 'libc' */
1034
1035/* Module declarations from 'libc.errno' */
1036
1037/* Module declarations from 'libc.stdint' */
1038
1039/* Module declarations from 'libc.stdlib' */
1040
1041/* Module declarations from 'rados' */
1042static PyTypeObject *__pyx_ptype_5rados_Rados = 0;
1043static PyTypeObject *__pyx_ptype_5rados_Ioctx = 0;
1044
1045/* Module declarations from 'cephfs' */
1046static PyTypeObject *__pyx_ptype_6cephfs_DirResult = 0;
1047static PyTypeObject *__pyx_ptype_6cephfs_LibCephFS = 0;
1048static PyObject *__pyx_v_6cephfs_errno_to_exception = 0;
1049static PyObject *__pyx_f_6cephfs_make_ex(PyObject *, PyObject *); /*proto*/
1050static char *__pyx_f_6cephfs_opt_str(PyObject *); /*proto*/
1051static char **__pyx_f_6cephfs_to_bytes_array(PyObject *); /*proto*/
1052static void *__pyx_f_6cephfs_realloc_chk(void *, size_t); /*proto*/
1053#define __Pyx_MODULE_NAME"cephfs" "cephfs"
1054int __pyx_module_is_main_cephfs = 0;
1055
1056/* Implementation of 'cephfs' */
1057static PyObject *__pyx_builtin_Exception;
1058static PyObject *__pyx_builtin_super;
1059static PyObject *__pyx_builtin_TypeError;
1060static PyObject *__pyx_builtin_MemoryError;
1061static PyObject *__pyx_builtin_xrange;
1062static char __pyx_k_l[] = "l";
1063static char __pyx_k_r[] = "r";
1064static char __pyx_k_s[] = "s";
1065static char __pyx_k_v[] = "v";
1066static char __pyx_k_w[] = "w";
1067static char __pyx_k__7[] = "";
1068static char __pyx_k_fd[] = "fd";
1069static char __pyx_k_os[] = "os";
1070static char __pyx_k__13[] = "/";
1071static char __pyx_k__38[] = "+";
1072static char __pyx_k_buf[] = "buf";
1073static char __pyx_k_doc[] = "__doc__";
1074static char __pyx_k_dst[] = "dst";
1075static char __pyx_k_opt[] = "opt";
1076static char __pyx_k_src[] = "src";
1077static char __pyx_k_str[] = "__str__";
1078static char __pyx_k_sys[] = "sys";
1079static char __pyx_k_val[] = "val";
1080static char __pyx_k_args[] = "args";
1081static char __pyx_k_argv[] = "argv";
1082static char __pyx_k_conf[] = "conf";
1083static char __pyx_k_cstr[] = "cstr";
1084static char __pyx_k_init[] = "__init__";
1085static char __pyx_k_main[] = "__main__";
1086static char __pyx_k_mode[] = "mode";
1087static char __pyx_k_name[] = "name";
1088static char __pyx_k_path[] = "path";
1089static char __pyx_k_self[] = "self";
1090static char __pyx_k_size[] = "size";
1091static char __pyx_k_test[] = "__test__";
1092static char __pyx_k_type[] = "type_";
1093static char __pyx_k_Error[] = "Error";
1094static char __pyx_k_close[] = "close";
1095static char __pyx_k_d_ino[] = "d_ino";
1096static char __pyx_k_d_off[] = "d_off";
1097static char __pyx_k_errno[] = "errno";
1098static char __pyx_k_flags[] = "flags";
1099static char __pyx_k_mount[] = "mount";
1100static char __pyx_k_owner[] = "owner";
1101static char __pyx_k_range[] = "range";
1102static char __pyx_k_super[] = "super";
1103static char __pyx_k_utf_8[] = "utf-8";
1104static char __pyx_k_value[] = "value";
1105static char __pyx_k_DT_DIR[] = "DT_DIR";
1106static char __pyx_k_DT_LNK[] = "DT_LNK";
1107static char __pyx_k_DT_REG[] = "DT_REG";
1108static char __pyx_k_NoData[] = "NoData";
1109static char __pyx_k_O_RDWR[] = "O_RDWR";
1110static char __pyx_k_cephfs[] = "cephfs";
1111static char __pyx_k_create[] = "create";
1112static char __pyx_k_d_name[] = "d_name";
1113static char __pyx_k_d_type[] = "d_type";
1114static char __pyx_k_decode[] = "decode";
1115static char __pyx_k_encode[] = "encode";
1116static char __pyx_k_f_flag[] = "f_flag";
1117static char __pyx_k_f_fsid[] = "f_fsid";
1118static char __pyx_k_format[] = "format";
1119static char __pyx_k_import[] = "__import__";
1120static char __pyx_k_init_2[] = "init";
1121static char __pyx_k_is_dir[] = "is_dir";
1122static char __pyx_k_module[] = "__module__";
1123static char __pyx_k_offset[] = "offset";
1124static char __pyx_k_option[] = "option";
1125static char __pyx_k_source[] = "source";
1126static char __pyx_k_st_dev[] = "st_dev";
1127static char __pyx_k_st_gid[] = "st_gid";
1128static char __pyx_k_st_ino[] = "st_ino";
1129static char __pyx_k_st_uid[] = "st_uid";
1130static char __pyx_k_whence[] = "whence";
1131static char __pyx_k_xrange[] = "xrange";
1132static char __pyx_k_Errno_d[] = ": {} [Errno {:d}]";
1133static char __pyx_k_IOError[] = "IOError";
1134static char __pyx_k_NoSpace[] = "NoSpace";
1135static char __pyx_k_OSError[] = "OSError";
1136static char __pyx_k_O_CREAT[] = "O_CREAT";
1137static char __pyx_k_O_TRUNC[] = "O_TRUNC";
1138static char __pyx_k_auth_id[] = "auth_id";
1139static char __pyx_k_f_bfree[] = "f_bfree";
1140static char __pyx_k_f_bsize[] = "f_bsize";
1141static char __pyx_k_f_ffree[] = "f_ffree";
1142static char __pyx_k_f_files[] = "f_files";
1143static char __pyx_k_is_file[] = "is_file";
1144static char __pyx_k_mounted[] = "mounted";
1145static char __pyx_k_newname[] = "newname";
1146static char __pyx_k_prepare[] = "__prepare__";
1147static char __pyx_k_readdir[] = "readdir";
1148static char __pyx_k_st_mode[] = "st_mode";
1149static char __pyx_k_st_rdev[] = "st_rdev";
1150static char __pyx_k_st_size[] = "st_size";
1151static char __pyx_k_DirEntry[] = "DirEntry";
1152static char __pyx_k_O_RDONLY[] = "O_RDONLY";
1153static char __pyx_k_O_WRONLY[] = "O_WRONLY";
1154static char __pyx_k_conf_set[] = "conf_set";
1155static char __pyx_k_conffile[] = "conffile";
1156static char __pyx_k_d_reclen[] = "d_reclen";
1157static char __pyx_k_datetime[] = "datetime";
1158static char __pyx_k_encoding[] = "encoding";
1159static char __pyx_k_existing[] = "existing";
1160static char __pyx_k_f_bavail[] = "f_bavail";
1161static char __pyx_k_f_blocks[] = "f_blocks";
1162static char __pyx_k_f_favail[] = "f_favail";
1163static char __pyx_k_f_frsize[] = "f_frsize";
1164static char __pyx_k_list_str[] = "list_str";
1165static char __pyx_k_mds_spec[] = "mds_spec";
1166static char __pyx_k_qualname[] = "__qualname__";
1167static char __pyx_k_shutdown[] = "shutdown";
1168static char __pyx_k_st_atime[] = "st_atime";
1169static char __pyx_k_st_ctime[] = "st_ctime";
1170static char __pyx_k_st_mtime[] = "st_mtime";
1171static char __pyx_k_st_nlink[] = "st_nlink";
1172static char __pyx_k_str_type[] = "str_type";
1173static char __pyx_k_strerror[] = "strerror";
1174static char __pyx_k_Exception[] = "Exception";
1175static char __pyx_k_TypeError[] = "TypeError";
1176static char __pyx_k_cstr_list[] = "cstr_list";
1177static char __pyx_k_f_namemax[] = "f_namemax";
1178static char __pyx_k_iteritems[] = "iteritems";
1179static char __pyx_k_metaclass[] = "__metaclass__";
1180static char __pyx_k_operation[] = "operation";
1181static char __pyx_k_st_blocks[] = "st_blocks";
1182static char __pyx_k_traceback[] = "traceback";
1183static char __pyx_k_OutOfRange[] = "OutOfRange";
1184static char __pyx_k_StatResult[] = "StatResult";
1185static char __pyx_k_WouldBlock[] = "WouldBlock";
1186static char __pyx_k_configfile[] = "configfile";
1187static char __pyx_k_input_data[] = "input_data";
1188static char __pyx_k_mount_root[] = "mount_root";
1189static char __pyx_k_namedtuple[] = "namedtuple";
1190static char __pyx_k_rados_inst[] = "rados_inst";
1191static char __pyx_k_st_blksize[] = "st_blksize";
1192static char __pyx_k_0_1_Errno_2[] = "{0}: {1} [Errno {2}]";
1193static char __pyx_k_EWOULDBLOCK[] = "EWOULDBLOCK";
1194static char __pyx_k_MemoryError[] = "MemoryError";
1195static char __pyx_k_collections[] = "collections";
1196static char __pyx_k_configuring[] = "configuring";
1197static char __pyx_k_decode_cstr[] = "decode_cstr";
1198static char __pyx_k_destination[] = "destination";
1199static char __pyx_k_initialized[] = "initialized";
1200static char __pyx_k_InvalidValue[] = "InvalidValue";
1201static char __pyx_k_ObjectExists[] = "ObjectExists";
1202static char __pyx_k_chdir_failed[] = "chdir failed";
1203static char __pyx_k_fsync_failed[] = "fsync failed";
1204static char __pyx_k_syncdataonly[] = "syncdataonly";
1205static char __pyx_k_version_info[] = "version_info";
1206static char __pyx_k_OSError___str[] = "OSError.__str__";
1207static char __pyx_k_error_in_fsat[] = "error in fsat";
1208static char __pyx_k_error_in_link[] = "error in link";
1209static char __pyx_k_error_in_open[] = "error in open {}";
1210static char __pyx_k_error_in_read[] = "error in read";
1211static char __pyx_k_error_in_stat[] = "error in stat: {}";
1212static char __pyx_k_fromtimestamp[] = "fromtimestamp";
1213static char __pyx_k_malloc_failed[] = "malloc failed";
1214static char __pyx_k_require_state[] = "require_state";
1215static char __pyx_k_uninitialized[] = "uninitialized";
1216static char __pyx_k_OSError___init[] = "OSError.__init__";
1217static char __pyx_k_ObjectNotEmpty[] = "ObjectNotEmpty";
1218static char __pyx_k_ObjectNotFound[] = "ObjectNotFound";
1219static char __pyx_k_conf_read_file[] = "conf_read_file";
1220static char __pyx_k_error_in_chmod[] = "error in chmod {}";
1221static char __pyx_k_error_in_close[] = "error in close";
1222static char __pyx_k_error_in_lseek[] = "error in lseek";
1223static char __pyx_k_error_in_mkdir[] = "error in mkdir {}";
1224static char __pyx_k_error_in_rmdir[] = "error in rmdir {}";
1225static char __pyx_k_error_in_umask[] = "error in umask";
1226static char __pyx_k_error_in_write[] = "error in write";
1227static char __pyx_k_is_symbol_file[] = "is_symbol_file";
1228static char __pyx_k_opendir_failed[] = "opendir failed";
1229static char __pyx_k_realloc_failed[] = "realloc failed";
1230static char __pyx_k_sync_fs_failed[] = "sync_fs failed";
1231static char __pyx_k_DirEntry_is_dir[] = "DirEntry.is_dir";
1232static char __pyx_k_PermissionError[] = "PermissionError";
1233static char __pyx_k_closedir_failed[] = "closedir failed";
1234static char __pyx_k_dir_is_not_open[] = "dir is not open";
1235static char __pyx_k_error_in_mkdirs[] = "error in mkdirs {}";
1236static char __pyx_k_error_in_unlink[] = "error in unlink: {}";
1237static char __pyx_k_filesystem_name[] = "filesystem_name";
1238static char __pyx_k_statfs_failed_s[] = "statfs failed: %s";
1239static char __pyx_k_DirEntry_is_file[] = "DirEntry.is_file";
1240static char __pyx_k_error_in_symlink[] = "error in symlink";
1241static char __pyx_k_l_must_be_an_int[] = "l must be an int";
1242static char __pyx_k_create_with_rados[] = "create_with_rados";
1243static char __pyx_k_error_in_getxattr[] = "error in getxattr";
1244static char __pyx_k_error_in_readlink[] = "error in readlink";
1245static char __pyx_k_error_in_setxattr[] = "error in setxattr";
1246static char __pyx_k_fd_must_be_an_int[] = "fd must be an int";
1247static char __pyx_k_error_in_rename_to[] = "error in rename {} to {}";
1248static char __pyx_k_LibCephFSStateError[] = "LibCephFSStateError";
1249static char __pyx_k_buf_must_be_a_bytes[] = "buf must be a bytes";
1250static char __pyx_k_flags_must_be_a_int[] = "flags must be a int";
1251static char __pyx_k_mode_must_be_an_int[] = "mode must be an int";
1252static char __pyx_k_OperationNotSupported[] = "OperationNotSupported";
1253static char __pyx_k_offset_must_be_an_int[] = "offset must be an int";
1254static char __pyx_k_value_must_be_a_bytes[] = "value must be a bytes";
1255static char __pyx_k_whence_must_be_an_int[] = "whence must be an int";
1256static char __pyx_k_error_calling_conf_get[] = "error calling conf_get";
1257static char __pyx_k_error_calling_conf_set[] = "error calling conf_set";
1258static char __pyx_k_DirEntry_is_symbol_file[] = "DirEntry.is_symbol_file";
1259static char __pyx_k_error_calling_ceph_init[] = "error calling ceph_init";
1260static char __pyx_k_error_calling_ceph_mount[] = "error calling ceph_mount";
1261static char __pyx_k_operation_must_be_an_int[] = "operation must be an int";
1262static char __pyx_k_conf_must_be_dict_or_None[] = "conf must be dict or None";
1263static char __pyx_k_error_calling_ceph_unmount[] = "error calling ceph_unmount";
1264static char __pyx_k_error_calling_conf_read_file[] = "error calling conf_read_file";
1265static char __pyx_k_open_flags_doesn_t_support_s[] = "open flags doesn't support %s";
1266static char __pyx_k_error_calling_ceph_abort_conn[] = "error calling ceph_abort_conn";
1267static char __pyx_k_error_calling_conf_parse_argv[] = "error calling conf_parse_argv";
1268static char __pyx_k_home_bhubbard_working_src_ceph[] = "/home/bhubbard/working/src/ceph/src/pybind/cephfs/cephfs.pyx";
1269static char __pyx_k_This_module_is_a_thin_wrapper_a[] = "\nThis module is a thin wrapper around libcephfs.\n";
1270static char __pyx_k_s_must_be_encodeable_as_a_bytea[] = "%s must be encodeable as a bytearray";
1271static char __pyx_k_May_not_pass_RADOS_instance_as_w[] = "May not pass RADOS instance as well as other configuration";
1272static char __pyx_k_You_cannot_perform_that_operatio[] = "You cannot perform that operation on a CephFS object in state %s.";
1273static char __pyx_k_error_calling_ceph_select_filesy[] = "error calling ceph_select_filesystem";
1274static char __pyx_k_flags_must_be_a_string_or_an_int[] = "flags must be a string or an integer";
1275static char __pyx_k_libcephfs_initialize_failed_with[] = "libcephfs_initialize failed with error code: %d";
1276static PyObject *__pyx_kp_s_0_1_Errno_2;
1277static PyObject *__pyx_n_s_DT_DIR;
1278static PyObject *__pyx_n_s_DT_LNK;
1279static PyObject *__pyx_n_s_DT_REG;
1280static PyObject *__pyx_n_s_DirEntry;
1281static PyObject *__pyx_n_s_DirEntry_is_dir;
1282static PyObject *__pyx_n_s_DirEntry_is_file;
1283static PyObject *__pyx_n_s_DirEntry_is_symbol_file;
1284static PyObject *__pyx_n_s_EWOULDBLOCK;
1285static PyObject *__pyx_kp_s_Errno_d;
1286static PyObject *__pyx_n_s_Error;
1287static PyObject *__pyx_n_s_Exception;
1288static PyObject *__pyx_n_s_IOError;
1289static PyObject *__pyx_n_s_InvalidValue;
1290static PyObject *__pyx_n_s_LibCephFSStateError;
1291static PyObject *__pyx_kp_s_May_not_pass_RADOS_instance_as_w;
1292static PyObject *__pyx_n_s_MemoryError;
1293static PyObject *__pyx_n_s_NoData;
1294static PyObject *__pyx_n_s_NoSpace;
1295static PyObject *__pyx_n_s_OSError;
1296static PyObject *__pyx_n_s_OSError___init;
1297static PyObject *__pyx_n_s_OSError___str;
1298static PyObject *__pyx_n_s_O_CREAT;
1299static PyObject *__pyx_n_s_O_RDONLY;
1300static PyObject *__pyx_n_s_O_RDWR;
1301static PyObject *__pyx_n_s_O_TRUNC;
1302static PyObject *__pyx_n_s_O_WRONLY;
1303static PyObject *__pyx_n_s_ObjectExists;
1304static PyObject *__pyx_n_s_ObjectNotEmpty;
1305static PyObject *__pyx_n_s_ObjectNotFound;
1306static PyObject *__pyx_n_s_OperationNotSupported;
1307static PyObject *__pyx_n_s_OutOfRange;
1308static PyObject *__pyx_n_s_PermissionError;
1309static PyObject *__pyx_n_s_StatResult;
1310static PyObject *__pyx_n_s_TypeError;
1311static PyObject *__pyx_n_s_WouldBlock;
1312static PyObject *__pyx_kp_s_You_cannot_perform_that_operatio;
1313static PyObject *__pyx_kp_b__13;
1314static PyObject *__pyx_kp_s__38;
1315static PyObject *__pyx_kp_b__7;
1316static PyObject *__pyx_kp_s__7;
1317static PyObject *__pyx_n_s_args;
1318static PyObject *__pyx_n_s_argv;
1319static PyObject *__pyx_n_s_auth_id;
1320static PyObject *__pyx_n_s_buf;
1321static PyObject *__pyx_kp_s_buf_must_be_a_bytes;
1322static PyObject *__pyx_n_s_cephfs;
1323static PyObject *__pyx_kp_s_chdir_failed;
1324static PyObject *__pyx_n_s_close;
1325static PyObject *__pyx_kp_s_closedir_failed;
1326static PyObject *__pyx_n_s_collections;
1327static PyObject *__pyx_n_s_conf;
1328static PyObject *__pyx_kp_s_conf_must_be_dict_or_None;
1329static PyObject *__pyx_n_s_conf_read_file;
1330static PyObject *__pyx_n_s_conf_set;
1331static PyObject *__pyx_n_s_conffile;
1332static PyObject *__pyx_n_s_configfile;
1333static PyObject *__pyx_n_s_configuring;
1334static PyObject *__pyx_n_s_create;
1335static PyObject *__pyx_n_s_create_with_rados;
1336static PyObject *__pyx_n_s_cstr;
1337static PyObject *__pyx_n_s_cstr_list;
1338static PyObject *__pyx_n_s_d_ino;
1339static PyObject *__pyx_n_s_d_name;
1340static PyObject *__pyx_n_s_d_off;
1341static PyObject *__pyx_n_s_d_reclen;
1342static PyObject *__pyx_n_s_d_type;
1343static PyObject *__pyx_n_s_datetime;
1344static PyObject *__pyx_n_s_decode;
1345static PyObject *__pyx_n_s_decode_cstr;
1346static PyObject *__pyx_n_s_destination;
1347static PyObject *__pyx_kp_s_dir_is_not_open;
1348static PyObject *__pyx_n_s_doc;
1349static PyObject *__pyx_n_s_dst;
1350static PyObject *__pyx_n_s_encode;
1351static PyObject *__pyx_n_s_encoding;
1352static PyObject *__pyx_n_s_errno;
1353static PyObject *__pyx_kp_s_error_calling_ceph_abort_conn;
1354static PyObject *__pyx_kp_s_error_calling_ceph_init;
1355static PyObject *__pyx_kp_s_error_calling_ceph_mount;
1356static PyObject *__pyx_kp_s_error_calling_ceph_select_filesy;
1357static PyObject *__pyx_kp_s_error_calling_ceph_unmount;
1358static PyObject *__pyx_kp_s_error_calling_conf_get;
1359static PyObject *__pyx_kp_s_error_calling_conf_parse_argv;
1360static PyObject *__pyx_kp_s_error_calling_conf_read_file;
1361static PyObject *__pyx_kp_s_error_calling_conf_set;
1362static PyObject *__pyx_kp_s_error_in_chmod;
1363static PyObject *__pyx_kp_s_error_in_close;
1364static PyObject *__pyx_kp_s_error_in_fsat;
1365static PyObject *__pyx_kp_s_error_in_getxattr;
1366static PyObject *__pyx_kp_s_error_in_link;
1367static PyObject *__pyx_kp_s_error_in_lseek;
1368static PyObject *__pyx_kp_s_error_in_mkdir;
1369static PyObject *__pyx_kp_s_error_in_mkdirs;
1370static PyObject *__pyx_kp_s_error_in_open;
1371static PyObject *__pyx_kp_s_error_in_read;
1372static PyObject *__pyx_kp_s_error_in_readlink;
1373static PyObject *__pyx_kp_s_error_in_rename_to;
1374static PyObject *__pyx_kp_s_error_in_rmdir;
1375static PyObject *__pyx_kp_s_error_in_setxattr;
1376static PyObject *__pyx_kp_s_error_in_stat;
1377static PyObject *__pyx_kp_s_error_in_symlink;
1378static PyObject *__pyx_kp_s_error_in_umask;
1379static PyObject *__pyx_kp_s_error_in_unlink;
1380static PyObject *__pyx_kp_s_error_in_write;
1381static PyObject *__pyx_n_s_existing;
1382static PyObject *__pyx_n_s_f_bavail;
1383static PyObject *__pyx_n_s_f_bfree;
1384static PyObject *__pyx_n_s_f_blocks;
1385static PyObject *__pyx_n_s_f_bsize;
1386static PyObject *__pyx_n_s_f_favail;
1387static PyObject *__pyx_n_s_f_ffree;
1388static PyObject *__pyx_n_s_f_files;
1389static PyObject *__pyx_n_s_f_flag;
1390static PyObject *__pyx_n_s_f_frsize;
1391static PyObject *__pyx_n_s_f_fsid;
1392static PyObject *__pyx_n_s_f_namemax;
1393static PyObject *__pyx_n_s_fd;
1394static PyObject *__pyx_kp_s_fd_must_be_an_int;
1395static PyObject *__pyx_n_s_filesystem_name;
1396static PyObject *__pyx_n_s_flags;
1397static PyObject *__pyx_kp_s_flags_must_be_a_int;
1398static PyObject *__pyx_kp_s_flags_must_be_a_string_or_an_int;
1399static PyObject *__pyx_n_s_format;
1400static PyObject *__pyx_n_s_fromtimestamp;
1401static PyObject *__pyx_kp_s_fsync_failed;
1402static PyObject *__pyx_kp_s_home_bhubbard_working_src_ceph;
1403static PyObject *__pyx_n_s_import;
1404static PyObject *__pyx_n_s_init;
1405static PyObject *__pyx_n_s_init_2;
1406static PyObject *__pyx_n_s_initialized;
1407static PyObject *__pyx_n_s_input_data;
1408static PyObject *__pyx_n_s_is_dir;
1409static PyObject *__pyx_n_s_is_file;
1410static PyObject *__pyx_n_s_is_symbol_file;
1411static PyObject *__pyx_n_s_iteritems;
1412static PyObject *__pyx_n_s_l;
1413static PyObject *__pyx_kp_s_l_must_be_an_int;
1414static PyObject *__pyx_kp_s_libcephfs_initialize_failed_with;
1415static PyObject *__pyx_n_s_list_str;
1416static PyObject *__pyx_n_s_main;
1417static PyObject *__pyx_kp_s_malloc_failed;
1418static PyObject *__pyx_n_s_mds_spec;
1419static PyObject *__pyx_n_s_metaclass;
1420static PyObject *__pyx_n_s_mode;
1421static PyObject *__pyx_kp_s_mode_must_be_an_int;
1422static PyObject *__pyx_n_s_module;
1423static PyObject *__pyx_n_s_mount;
1424static PyObject *__pyx_n_s_mount_root;
1425static PyObject *__pyx_n_s_mounted;
1426static PyObject *__pyx_n_s_name;
1427static PyObject *__pyx_n_s_namedtuple;
1428static PyObject *__pyx_n_s_newname;
1429static PyObject *__pyx_n_s_offset;
1430static PyObject *__pyx_kp_s_offset_must_be_an_int;
1431static PyObject *__pyx_kp_s_open_flags_doesn_t_support_s;
1432static PyObject *__pyx_kp_s_opendir_failed;
1433static PyObject *__pyx_n_s_operation;
1434static PyObject *__pyx_kp_s_operation_must_be_an_int;
1435static PyObject *__pyx_n_s_opt;
1436static PyObject *__pyx_n_s_option;
1437static PyObject *__pyx_n_s_os;
1438static PyObject *__pyx_n_s_owner;
1439static PyObject *__pyx_n_s_path;
1440static PyObject *__pyx_n_s_prepare;
1441static PyObject *__pyx_n_s_qualname;
1442static PyObject *__pyx_n_s_r;
1443static PyObject *__pyx_n_s_rados_inst;
1444static PyObject *__pyx_n_s_range;
1445static PyObject *__pyx_n_s_readdir;
1446static PyObject *__pyx_kp_s_realloc_failed;
1447static PyObject *__pyx_n_s_require_state;
1448static PyObject *__pyx_n_s_s;
1449static PyObject *__pyx_kp_s_s_must_be_encodeable_as_a_bytea;
1450static PyObject *__pyx_n_s_self;
1451static PyObject *__pyx_n_s_shutdown;
1452static PyObject *__pyx_n_s_size;
1453static PyObject *__pyx_n_s_source;
1454static PyObject *__pyx_n_s_src;
1455static PyObject *__pyx_n_s_st_atime;
1456static PyObject *__pyx_n_s_st_blksize;
1457static PyObject *__pyx_n_s_st_blocks;
1458static PyObject *__pyx_n_s_st_ctime;
1459static PyObject *__pyx_n_s_st_dev;
1460static PyObject *__pyx_n_s_st_gid;
1461static PyObject *__pyx_n_s_st_ino;
1462static PyObject *__pyx_n_s_st_mode;
1463static PyObject *__pyx_n_s_st_mtime;
1464static PyObject *__pyx_n_s_st_nlink;
1465static PyObject *__pyx_n_s_st_rdev;
1466static PyObject *__pyx_n_s_st_size;
1467static PyObject *__pyx_n_s_st_uid;
1468static PyObject *__pyx_kp_s_statfs_failed_s;
1469static PyObject *__pyx_n_s_str;
1470static PyObject *__pyx_n_s_str_type;
1471static PyObject *__pyx_n_s_strerror;
1472static PyObject *__pyx_n_s_super;
1473static PyObject *__pyx_kp_s_sync_fs_failed;
1474static PyObject *__pyx_n_s_syncdataonly;
1475static PyObject *__pyx_n_s_sys;
1476static PyObject *__pyx_n_s_test;
1477static PyObject *__pyx_n_s_traceback;
1478static PyObject *__pyx_n_s_type;
1479static PyObject *__pyx_n_s_uninitialized;
1480static PyObject *__pyx_kp_s_utf_8;
1481static PyObject *__pyx_n_s_v;
1482static PyObject *__pyx_n_s_val;
1483static PyObject *__pyx_n_s_value;
1484static PyObject *__pyx_kp_s_value_must_be_a_bytes;
1485static PyObject *__pyx_n_s_version_info;
1486static PyObject *__pyx_n_s_w;
1487static PyObject *__pyx_n_s_whence;
1488static PyObject *__pyx_kp_s_whence_must_be_an_int;
1489static PyObject *__pyx_n_s_xrange;
1490static PyObject *__pyx_pf_6cephfs_7OSError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errno, PyObject *__pyx_v_strerror); /* proto */
1491static PyObject *__pyx_pf_6cephfs_7OSError_2__str__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
1492static PyObject *__pyx_pf_6cephfs_8DirEntry_is_dir(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
1493static PyObject *__pyx_pf_6cephfs_8DirEntry_2is_symbol_file(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
1494static PyObject *__pyx_pf_6cephfs_8DirEntry_4is_file(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
1495static void __pyx_pf_6cephfs_9DirResult___dealloc__(struct __pyx_obj_6cephfs_DirResult *__pyx_v_self); /* proto */
1496static PyObject *__pyx_pf_6cephfs_9DirResult_2__enter__(struct __pyx_obj_6cephfs_DirResult *__pyx_v_self); /* proto */
1497static PyObject *__pyx_pf_6cephfs_9DirResult_4__exit__(struct __pyx_obj_6cephfs_DirResult *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback); /* proto */
1498static PyObject *__pyx_pf_6cephfs_9DirResult_6readdir(struct __pyx_obj_6cephfs_DirResult *__pyx_v_self); /* proto */
1499static PyObject *__pyx_pf_6cephfs_9DirResult_8close(struct __pyx_obj_6cephfs_DirResult *__pyx_v_self); /* proto */
1500static PyObject *__pyx_pf_6cephfs_cstr(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_name, PyObject *__pyx_v_encoding, PyObject *__pyx_v_opt); /* proto */
1501static PyObject *__pyx_pf_6cephfs_2cstr_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_list_str, PyObject *__pyx_v_name, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_encoding); /* proto */
1502static PyObject *__pyx_pf_6cephfs_4decode_cstr(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_encoding); /* proto */
1503static PyObject *__pyx_pf_6cephfs_9LibCephFS_require_state(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
1504static int __pyx_pf_6cephfs_9LibCephFS_2__cinit__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_conffile, PyObject *__pyx_v_auth_id, PyObject *__pyx_v_rados_inst); /* proto */
1505static PyObject *__pyx_pf_6cephfs_9LibCephFS_4create_with_rados(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, struct __pyx_obj_5rados_Rados *__pyx_v_rados_inst); /* proto */
1506static PyObject *__pyx_pf_6cephfs_9LibCephFS_6create(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_conffile, PyObject *__pyx_v_auth_id); /* proto */
1507static PyObject *__pyx_pf_6cephfs_9LibCephFS_8conf_read_file(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_conffile); /* proto */
1508static PyObject *__pyx_pf_6cephfs_9LibCephFS_10conf_parse_argv(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_argv); /* proto */
1509static PyObject *__pyx_pf_6cephfs_9LibCephFS_12shutdown(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1510static PyObject *__pyx_pf_6cephfs_9LibCephFS_14__enter__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1511static PyObject *__pyx_pf_6cephfs_9LibCephFS_16__exit__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback); /* proto */
1512static void __pyx_pf_6cephfs_9LibCephFS_18__dealloc__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1513static PyObject *__pyx_pf_6cephfs_9LibCephFS_20version(CYTHON_UNUSED__attribute__ ((__unused__)) struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1514static PyObject *__pyx_pf_6cephfs_9LibCephFS_22conf_get(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_option); /* proto */
1515static PyObject *__pyx_pf_6cephfs_9LibCephFS_24conf_set(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_option, PyObject *__pyx_v_val); /* proto */
1516static PyObject *__pyx_pf_6cephfs_9LibCephFS_26init(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1517static PyObject *__pyx_pf_6cephfs_9LibCephFS_28mount(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_mount_root, PyObject *__pyx_v_filesystem_name); /* proto */
1518static PyObject *__pyx_pf_6cephfs_9LibCephFS_30unmount(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1519static PyObject *__pyx_pf_6cephfs_9LibCephFS_32abort_conn(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1520static PyObject *__pyx_pf_6cephfs_9LibCephFS_34get_instance_id(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1521static PyObject *__pyx_pf_6cephfs_9LibCephFS_36statfs(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
1522static PyObject *__pyx_pf_6cephfs_9LibCephFS_38sync_fs(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1523static PyObject *__pyx_pf_6cephfs_9LibCephFS_40fsync(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, int __pyx_v_fd, int __pyx_v_syncdataonly); /* proto */
1524static PyObject *__pyx_pf_6cephfs_9LibCephFS_42getcwd(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1525static PyObject *__pyx_pf_6cephfs_9LibCephFS_44chdir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
1526static PyObject *__pyx_pf_6cephfs_9LibCephFS_46opendir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
1527static PyObject *__pyx_pf_6cephfs_9LibCephFS_48readdir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, struct __pyx_obj_6cephfs_DirResult *__pyx_v_handle); /* proto */
1528static PyObject *__pyx_pf_6cephfs_9LibCephFS_50closedir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, struct __pyx_obj_6cephfs_DirResult *__pyx_v_handle); /* proto */
1529static PyObject *__pyx_pf_6cephfs_9LibCephFS_52mkdir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode); /* proto */
1530static PyObject *__pyx_pf_6cephfs_9LibCephFS_54chmod(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode); /* proto */
1531static PyObject *__pyx_pf_6cephfs_9LibCephFS_56mkdirs(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode); /* proto */
1532static PyObject *__pyx_pf_6cephfs_9LibCephFS_58rmdir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
1533static PyObject *__pyx_pf_6cephfs_9LibCephFS_60open(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_flags, PyObject *__pyx_v_mode); /* proto */
1534static PyObject *__pyx_pf_6cephfs_9LibCephFS_62close(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd); /* proto */
1535static PyObject *__pyx_pf_6cephfs_9LibCephFS_64read(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_offset, PyObject *__pyx_v_l); /* proto */
1536static PyObject *__pyx_pf_6cephfs_9LibCephFS_66write(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_buf, PyObject *__pyx_v_offset); /* proto */
1537static PyObject *__pyx_pf_6cephfs_9LibCephFS_68flock(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_operation, PyObject *__pyx_v_owner); /* proto */
1538static PyObject *__pyx_pf_6cephfs_9LibCephFS_70getxattr(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_name, PyObject *__pyx_v_size); /* proto */
1539static PyObject *__pyx_pf_6cephfs_9LibCephFS_72setxattr(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_name, PyObject *__pyx_v_value, PyObject *__pyx_v_flags); /* proto */
1540static PyObject *__pyx_pf_6cephfs_9LibCephFS_74stat(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
1541static PyObject *__pyx_pf_6cephfs_9LibCephFS_76fstat(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd); /* proto */
1542static PyObject *__pyx_pf_6cephfs_9LibCephFS_78symlink(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_existing, PyObject *__pyx_v_newname); /* proto */
1543static PyObject *__pyx_pf_6cephfs_9LibCephFS_80link(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_existing, PyObject *__pyx_v_newname); /* proto */
1544static PyObject *__pyx_pf_6cephfs_9LibCephFS_82readlink(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_size); /* proto */
1545static PyObject *__pyx_pf_6cephfs_9LibCephFS_84unlink(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
1546static PyObject *__pyx_pf_6cephfs_9LibCephFS_86rename(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_src, PyObject *__pyx_v_dst); /* proto */
1547static PyObject *__pyx_pf_6cephfs_9LibCephFS_88mds_command(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_mds_spec, PyObject *__pyx_v_args, PyObject *__pyx_v_input_data); /* proto */
1548static PyObject *__pyx_pf_6cephfs_9LibCephFS_90umask(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_mode); /* proto */
1549static PyObject *__pyx_pf_6cephfs_9LibCephFS_92lseek(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_offset, PyObject *__pyx_v_whence); /* proto */
1550static PyObject *__pyx_pf_6cephfs_9LibCephFS_5state___get__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1551static int __pyx_pf_6cephfs_9LibCephFS_5state_2__set__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1552static int __pyx_pf_6cephfs_9LibCephFS_5state_4__del__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self); /* proto */
1553static PyObject *__pyx_tp_new_6cephfs_DirResult(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1554static PyObject *__pyx_tp_new_6cephfs_LibCephFS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1555static PyObject *__pyx_int_0;
1556static PyObject *__pyx_int_3;
1557static PyObject *__pyx_int_4;
1558static PyObject *__pyx_int_10;
1559static PyObject *__pyx_int_12;
1560static PyObject *__pyx_int_255;
1561static PyObject *__pyx_tuple_;
1562static PyObject *__pyx_tuple__2;
1563static PyObject *__pyx_tuple__3;
1564static PyObject *__pyx_tuple__4;
1565static PyObject *__pyx_tuple__5;
1566static PyObject *__pyx_tuple__6;
1567static PyObject *__pyx_tuple__8;
1568static PyObject *__pyx_tuple__9;
1569static PyObject *__pyx_tuple__10;
1570static PyObject *__pyx_tuple__11;
1571static PyObject *__pyx_tuple__12;
1572static PyObject *__pyx_tuple__14;
1573static PyObject *__pyx_tuple__15;
1574static PyObject *__pyx_tuple__16;
1575static PyObject *__pyx_tuple__17;
1576static PyObject *__pyx_tuple__18;
1577static PyObject *__pyx_tuple__19;
1578static PyObject *__pyx_tuple__20;
1579static PyObject *__pyx_tuple__21;
1580static PyObject *__pyx_tuple__22;
1581static PyObject *__pyx_tuple__23;
1582static PyObject *__pyx_tuple__24;
1583static PyObject *__pyx_tuple__25;
1584static PyObject *__pyx_tuple__26;
1585static PyObject *__pyx_tuple__27;
1586static PyObject *__pyx_tuple__28;
1587static PyObject *__pyx_tuple__29;
1588static PyObject *__pyx_tuple__30;
1589static PyObject *__pyx_tuple__31;
1590static PyObject *__pyx_tuple__32;
1591static PyObject *__pyx_tuple__33;
1592static PyObject *__pyx_tuple__34;
1593static PyObject *__pyx_tuple__35;
1594static PyObject *__pyx_tuple__36;
1595static PyObject *__pyx_tuple__37;
1596static PyObject *__pyx_tuple__39;
1597static PyObject *__pyx_tuple__40;
1598static PyObject *__pyx_tuple__41;
1599static PyObject *__pyx_tuple__42;
1600static PyObject *__pyx_tuple__43;
1601static PyObject *__pyx_tuple__44;
1602static PyObject *__pyx_tuple__45;
1603static PyObject *__pyx_tuple__46;
1604static PyObject *__pyx_tuple__47;
1605static PyObject *__pyx_tuple__48;
1606static PyObject *__pyx_tuple__49;
1607static PyObject *__pyx_tuple__50;
1608static PyObject *__pyx_tuple__51;
1609static PyObject *__pyx_tuple__52;
1610static PyObject *__pyx_tuple__53;
1611static PyObject *__pyx_tuple__54;
1612static PyObject *__pyx_tuple__55;
1613static PyObject *__pyx_tuple__56;
1614static PyObject *__pyx_tuple__57;
1615static PyObject *__pyx_tuple__58;
1616static PyObject *__pyx_tuple__59;
1617static PyObject *__pyx_tuple__60;
1618static PyObject *__pyx_tuple__61;
1619static PyObject *__pyx_tuple__62;
1620static PyObject *__pyx_tuple__63;
1621static PyObject *__pyx_tuple__64;
1622static PyObject *__pyx_tuple__65;
1623static PyObject *__pyx_tuple__66;
1624static PyObject *__pyx_tuple__67;
1625static PyObject *__pyx_tuple__68;
1626static PyObject *__pyx_tuple__69;
1627static PyObject *__pyx_tuple__70;
1628static PyObject *__pyx_tuple__71;
1629static PyObject *__pyx_tuple__72;
1630static PyObject *__pyx_tuple__73;
1631static PyObject *__pyx_tuple__74;
1632static PyObject *__pyx_tuple__75;
1633static PyObject *__pyx_tuple__77;
1634static PyObject *__pyx_tuple__79;
1635static PyObject *__pyx_tuple__81;
1636static PyObject *__pyx_tuple__83;
1637static PyObject *__pyx_tuple__85;
1638static PyObject *__pyx_tuple__87;
1639static PyObject *__pyx_tuple__89;
1640static PyObject *__pyx_codeobj__76;
1641static PyObject *__pyx_codeobj__78;
1642static PyObject *__pyx_codeobj__80;
1643static PyObject *__pyx_codeobj__82;
1644static PyObject *__pyx_codeobj__84;
1645static PyObject *__pyx_codeobj__86;
1646static PyObject *__pyx_codeobj__88;
1647static PyObject *__pyx_codeobj__90;
1648
1649/* "cephfs.pyx":161
1650 *
1651 * class OSError(Error):
1652 * def __init__(self, errno, strerror): # <<<<<<<<<<<<<<
1653 * super(OSError, self).__init__(errno, strerror)
1654 * self.errno = errno
1655 */
1656
1657/* Python wrapper */
1658static PyObject *__pyx_pw_6cephfs_7OSError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1659static PyMethodDef __pyx_mdef_6cephfs_7OSError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6cephfs_7OSError_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0};
1660static PyObject *__pyx_pw_6cephfs_7OSError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1661 PyObject *__pyx_v_self = 0;
1662 PyObject *__pyx_v_errno = 0;
1663 PyObject *__pyx_v_strerror = 0;
1664 int __pyx_lineno = 0;
1665 const char *__pyx_filename = NULL((void*)0);
1666 int __pyx_clineno = 0;
1667 PyObject *__pyx_r = 0;
1668 __Pyx_RefNannyDeclarations
1669 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
1670 {
1671 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_errno,&__pyx_n_s_strerror,0};
1672 PyObject* values[3] = {0,0,0};
1673 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
1674 Py_ssize_t kw_args;
1675 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
1676 switch (pos_args) {
1677 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
1678 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
1679 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
1680 case 0: break;
1681 default: goto __pyx_L5_argtuple_error;
1682 }
1683 kw_args = PyDict_Size(__pyx_kwds);
1684 switch (pos_args) {
1685 case 0:
1686 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
1687 else goto __pyx_L5_argtuple_error;
1688 case 1:
1689 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno
)) != 0), 1)
) kw_args--;
1690 else {
1691 __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__1691; goto __pyx_L3_error;}
1692 }
1693 case 2:
1694 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_strerror)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_strerror
)) != 0), 1)
) kw_args--;
1695 else {
1696 __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__1696; goto __pyx_L3_error;}
1697 }
1698 }
1699 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
1700 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__1700; goto __pyx_L3_error;}
1701 }
1702 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
1703 goto __pyx_L5_argtuple_error;
1704 } else {
1705 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
1706 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
1707 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
1708 }
1709 __pyx_v_self = values[0];
1710 __pyx_v_errno = values[1];
1711 __pyx_v_strerror = values[2];
1712 }
1713 goto __pyx_L4_argument_unpacking_done;
1714 __pyx_L5_argtuple_error:;
1715 __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__1715; goto __pyx_L3_error;}
1716 __pyx_L3_error:;
1717 __Pyx_AddTraceback("cephfs.OSError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
1718 __Pyx_RefNannyFinishContext();
1719 return NULL((void*)0);
1720 __pyx_L4_argument_unpacking_done:;
1721 __pyx_r = __pyx_pf_6cephfs_7OSError___init__(__pyx_self, __pyx_v_self, __pyx_v_errno, __pyx_v_strerror);
1722
1723 /* function exit code */
1724 __Pyx_RefNannyFinishContext();
1725 return __pyx_r;
1726}
1727
1728static PyObject *__pyx_pf_6cephfs_7OSError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errno, PyObject *__pyx_v_strerror) {
1729 PyObject *__pyx_r = NULL((void*)0);
1730 __Pyx_RefNannyDeclarations
1731 PyObject *__pyx_t_1 = NULL((void*)0);
1732 PyObject *__pyx_t_2 = NULL((void*)0);
1733 PyObject *__pyx_t_3 = NULL((void*)0);
1734 Py_ssize_t __pyx_t_4;
1735 PyObject *__pyx_t_5 = NULL((void*)0);
1736 int __pyx_lineno = 0;
1737 const char *__pyx_filename = NULL((void*)0);
1738 int __pyx_clineno = 0;
1739 __Pyx_RefNannySetupContext("__init__", 0);
1740
1741 /* "cephfs.pyx":162
1742 * class OSError(Error):
1743 * def __init__(self, errno, strerror):
1744 * super(OSError, self).__init__(errno, strerror) # <<<<<<<<<<<<<<
1745 * self.errno = errno
1746 * self.strerror = strerror
1747 */
1748 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__1748; goto __pyx_L1_error;}
1749 __Pyx_GOTREF(__pyx_t_2);
1750 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__1750; goto __pyx_L1_error;}
1751 __Pyx_GOTREF(__pyx_t_3);
1752 __Pyx_GIVEREF(__pyx_t_2);
1753 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
1754 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
1755 __Pyx_GIVEREF(__pyx_v_self);
1756 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
1757 __pyx_t_2 = 0;
1758 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__1758; goto __pyx_L1_error;}
1759 __Pyx_GOTREF(__pyx_t_2);
1760 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
1761 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__1761; goto __pyx_L1_error;}
1762 __Pyx_GOTREF(__pyx_t_3);
1763 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
1764 __pyx_t_2 = NULL((void*)0);
1765 __pyx_t_4 = 0;
1766 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
1767 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
1768 if (likely(__pyx_t_2)__builtin_expect(!!(__pyx_t_2), 1)) {
1769 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
1770 __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++);
1771 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
1772 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
1773 __pyx_t_4 = 1;
1774 }
1775 }
1776 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__1776; goto __pyx_L1_error;}
1777 __Pyx_GOTREF(__pyx_t_5);
1778 if (__pyx_t_2) {
1779 __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_2); __pyx_t_2 = NULL((void*)0);
1780 }
1781 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
1782 __Pyx_GIVEREF(__pyx_v_errno);
1783 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_errno
)
;
1784 __Pyx_INCREF(__pyx_v_strerror)( ((PyObject*)(__pyx_v_strerror))->ob_refcnt++);
1785 __Pyx_GIVEREF(__pyx_v_strerror);
1786 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_strerror)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_v_strerror
)
;
1787 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__1787; goto __pyx_L1_error;}
1788 __Pyx_GOTREF(__pyx_t_1);
1789 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
1790 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
1791 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
1792
1793 /* "cephfs.pyx":163
1794 * def __init__(self, errno, strerror):
1795 * super(OSError, self).__init__(errno, strerror)
1796 * self.errno = errno # <<<<<<<<<<<<<<
1797 * self.strerror = strerror
1798 *
1799 */
1800 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_errno, __pyx_v_errno) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__1800; goto __pyx_L1_error;}
1801
1802 /* "cephfs.pyx":164
1803 * super(OSError, self).__init__(errno, strerror)
1804 * self.errno = errno
1805 * self.strerror = strerror # <<<<<<<<<<<<<<
1806 *
1807 * def __str__(self):
1808 */
1809 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strerror, __pyx_v_strerror) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__1809; goto __pyx_L1_error;}
1810
1811 /* "cephfs.pyx":161
1812 *
1813 * class OSError(Error):
1814 * def __init__(self, errno, strerror): # <<<<<<<<<<<<<<
1815 * super(OSError, self).__init__(errno, strerror)
1816 * self.errno = errno
1817 */
1818
1819 /* function exit code */
1820 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
1821 goto __pyx_L0;
1822 __pyx_L1_error:;
1823 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
1824 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
1825 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
1826 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
1827 __Pyx_AddTraceback("cephfs.OSError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
1828 __pyx_r = NULL((void*)0);
1829 __pyx_L0:;
1830 __Pyx_XGIVEREF(__pyx_r);
1831 __Pyx_RefNannyFinishContext();
1832 return __pyx_r;
1833}
1834
1835/* "cephfs.pyx":166
1836 * self.strerror = strerror
1837 *
1838 * def __str__(self): # <<<<<<<<<<<<<<
1839 * return '{0}: {1} [Errno {2}]'.format(self.strerror, os.strerror(self.errno), self.errno)
1840 *
1841 */
1842
1843/* Python wrapper */
1844static PyObject *__pyx_pw_6cephfs_7OSError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
1845static PyMethodDef __pyx_mdef_6cephfs_7OSError_3__str__ = {"__str__", (PyCFunction)__pyx_pw_6cephfs_7OSError_3__str__, METH_O0x0008, 0};
1846static PyObject *__pyx_pw_6cephfs_7OSError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
1847 PyObject *__pyx_r = 0;
1848 __Pyx_RefNannyDeclarations
1849 __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
1850 __pyx_r = __pyx_pf_6cephfs_7OSError_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));
1851
1852 /* function exit code */
1853 __Pyx_RefNannyFinishContext();
1854 return __pyx_r;
1855}
1856
1857static PyObject *__pyx_pf_6cephfs_7OSError_2__str__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self) {
1858 PyObject *__pyx_r = NULL((void*)0);
1859 __Pyx_RefNannyDeclarations
1860 PyObject *__pyx_t_1 = NULL((void*)0);
1861 PyObject *__pyx_t_2 = NULL((void*)0);
1862 PyObject *__pyx_t_3 = NULL((void*)0);
1863 PyObject *__pyx_t_4 = NULL((void*)0);
1864 PyObject *__pyx_t_5 = NULL((void*)0);
1865 PyObject *__pyx_t_6 = NULL((void*)0);
1866 PyObject *__pyx_t_7 = NULL((void*)0);
1867 PyObject *__pyx_t_8 = NULL((void*)0);
1868 Py_ssize_t __pyx_t_9;
1869 int __pyx_lineno = 0;
1870 const char *__pyx_filename = NULL((void*)0);
1871 int __pyx_clineno = 0;
1872 __Pyx_RefNannySetupContext("__str__", 0);
1873
1874 /* "cephfs.pyx":167
1875 *
1876 * def __str__(self):
1877 * return '{0}: {1} [Errno {2}]'.format(self.strerror, os.strerror(self.errno), self.errno) # <<<<<<<<<<<<<<
1878 *
1879 *
1880 */
1881 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
1882 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_Errno_2, __pyx_n_s_format); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__1882; goto __pyx_L1_error;}
1883 __Pyx_GOTREF(__pyx_t_2);
1884 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strerror); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__1884; goto __pyx_L1_error;}
1885 __Pyx_GOTREF(__pyx_t_3);
1886 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__1886; goto __pyx_L1_error;}
1887 __Pyx_GOTREF(__pyx_t_5);
1888 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strerror); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__1888; goto __pyx_L1_error;}
1889 __Pyx_GOTREF(__pyx_t_6);
1890 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
1891 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errno); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__1891; goto __pyx_L1_error;}
1892 __Pyx_GOTREF(__pyx_t_5);
1893 __pyx_t_7 = NULL((void*)0);
1894 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type
)), 0)
) {
1895 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self);
1896 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
1897 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func);
1898 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
1899 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
1900 __Pyx_DECREF_SET(__pyx_t_6, function)do { PyObject *tmp = (PyObject *) __pyx_t_6; __pyx_t_6 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
1901 }
1902 }
1903 if (!__pyx_t_7) {
1904 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__1904; goto __pyx_L1_error;}
1905 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
1906 __Pyx_GOTREF(__pyx_t_4);
1907 } else {
1908 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__1908; goto __pyx_L1_error;}
1909 __Pyx_GOTREF(__pyx_t_8);
1910 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
1911 __Pyx_GIVEREF(__pyx_t_5);
1912 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_5);
1913 __pyx_t_5 = 0;
1914 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__1914; goto __pyx_L1_error;}
1915 __Pyx_GOTREF(__pyx_t_4);
1916 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
1917 }
1918 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
1919 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errno); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__1919; goto __pyx_L1_error;}
1920 __Pyx_GOTREF(__pyx_t_6);
1921 __pyx_t_8 = NULL((void*)0);
1922 __pyx_t_9 = 0;
1923 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
1924 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
1925 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
1926 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
1927 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
1928 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
1929 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
1930 __pyx_t_9 = 1;
1931 }
1932 }
1933 __pyx_t_5 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__1933; goto __pyx_L1_error;}
1934 __Pyx_GOTREF(__pyx_t_5);
1935 if (__pyx_t_8) {
1936 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
1937 }
1938 __Pyx_GIVEREF(__pyx_t_3);
1939 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_9] = __pyx_t_3
)
;
1940 __Pyx_GIVEREF(__pyx_t_4);
1941 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, __pyx_t_4)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_9] = __pyx_t_4
)
;
1942 __Pyx_GIVEREF(__pyx_t_6);
1943 PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_9, __pyx_t_6)(((PyTupleObject *)(__pyx_t_5))->ob_item[2+__pyx_t_9] = __pyx_t_6
)
;
1944 __pyx_t_3 = 0;
1945 __pyx_t_4 = 0;
1946 __pyx_t_6 = 0;
1947 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__1947; goto __pyx_L1_error;}
1948 __Pyx_GOTREF(__pyx_t_1);
1949 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
1950 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
1951 __pyx_r = __pyx_t_1;
1952 __pyx_t_1 = 0;
1953 goto __pyx_L0;
1954
1955 /* "cephfs.pyx":166
1956 * self.strerror = strerror
1957 *
1958 * def __str__(self): # <<<<<<<<<<<<<<
1959 * return '{0}: {1} [Errno {2}]'.format(self.strerror, os.strerror(self.errno), self.errno)
1960 *
1961 */
1962
1963 /* function exit code */
1964 __pyx_L1_error:;
1965 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
1966 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
1967 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
1968 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
1969 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
1970 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
1971 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
1972 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
1973 __Pyx_AddTraceback("cephfs.OSError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
1974 __pyx_r = NULL((void*)0);
1975 __pyx_L0:;
1976 __Pyx_XGIVEREF(__pyx_r);
1977 __Pyx_RefNannyFinishContext();
1978 return __pyx_r;
1979}
1980
1981/* "cephfs.pyx":248
1982 *
1983 *
1984 * cdef make_ex(ret, msg): # <<<<<<<<<<<<<<
1985 * """
1986 * Translate a librados return code into an exception.
1987 */
1988
1989static PyObject *__pyx_f_6cephfs_make_ex(PyObject *__pyx_v_ret, PyObject *__pyx_v_msg) {
1990 PyObject *__pyx_r = NULL((void*)0);
1991 __Pyx_RefNannyDeclarations
1992 PyObject *__pyx_t_1 = NULL((void*)0);
1993 int __pyx_t_2;
1994 int __pyx_t_3;
1995 PyObject *__pyx_t_4 = NULL((void*)0);
1996 PyObject *__pyx_t_5 = NULL((void*)0);
1997 Py_ssize_t __pyx_t_6;
1998 PyObject *__pyx_t_7 = NULL((void*)0);
1999 PyObject *__pyx_t_8 = NULL((void*)0);
2000 PyObject *__pyx_t_9 = NULL((void*)0);
2001 PyObject *__pyx_t_10 = NULL((void*)0);
2002 PyObject *__pyx_t_11 = NULL((void*)0);
2003 int __pyx_lineno = 0;
2004 const char *__pyx_filename = NULL((void*)0);
2005 int __pyx_clineno = 0;
2006 __Pyx_RefNannySetupContext("make_ex", 0);
2007 __Pyx_INCREF(__pyx_v_ret)( ((PyObject*)(__pyx_v_ret))->ob_refcnt++);
2008
2009 /* "cephfs.pyx":258
2010 * :returns: a subclass of :class:`Error`
2011 * """
2012 * ret = abs(ret) # <<<<<<<<<<<<<<
2013 * if ret in errno_to_exception:
2014 * return errno_to_exception[ret](ret, msg)
2015 */
2016 __pyx_t_1 = PyNumber_Absolute(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__2016; goto __pyx_L1_error;}
2017 __Pyx_GOTREF(__pyx_t_1);
2018 __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_ret; __pyx_v_ret = __pyx_t_1
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
2019 __pyx_t_1 = 0;
2020
2021 /* "cephfs.pyx":259
2022 * """
2023 * ret = abs(ret)
2024 * if ret in errno_to_exception: # <<<<<<<<<<<<<<
2025 * return errno_to_exception[ret](ret, msg)
2026 * else:
2027 */
2028 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_ret, __pyx_v_6cephfs_errno_to_exception, Py_EQ2)); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__2028; goto __pyx_L1_error;}
2029 __pyx_t_3 = (__pyx_t_2 != 0);
2030 if (__pyx_t_3) {
2031
2032 /* "cephfs.pyx":260
2033 * ret = abs(ret)
2034 * if ret in errno_to_exception:
2035 * return errno_to_exception[ret](ret, msg) # <<<<<<<<<<<<<<
2036 * else:
2037 * return Error(msg + ': {} [Errno {:d}]'.format(os.strerror(ret), ret))
2038 */
2039 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
2040 __pyx_t_4 = PyObject_GetItem(__pyx_v_6cephfs_errno_to_exception, __pyx_v_ret); if (unlikely(__pyx_t_4 == NULL)__builtin_expect(!!(__pyx_t_4 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__2040; goto __pyx_L1_error;};
2041 __Pyx_GOTREF(__pyx_t_4);
2042 __pyx_t_5 = NULL((void*)0);
2043 __pyx_t_6 = 0;
2044 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 0)
) {
2045 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
2046 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
2047 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
2048 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
2049 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
2050 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
2051 __pyx_t_6 = 1;
2052 }
2053 }
2054 __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__2054; goto __pyx_L1_error;}
2055 __Pyx_GOTREF(__pyx_t_7);
2056 if (__pyx_t_5) {
2057 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
2058 }
2059 __Pyx_INCREF(__pyx_v_ret)( ((PyObject*)(__pyx_v_ret))->ob_refcnt++);
2060 __Pyx_GIVEREF(__pyx_v_ret);
2061 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_ret)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+__pyx_t_6] = __pyx_v_ret
)
;
2062 __Pyx_INCREF(__pyx_v_msg)( ((PyObject*)(__pyx_v_msg))->ob_refcnt++);
2063 __Pyx_GIVEREF(__pyx_v_msg);
2064 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_msg)(((PyTupleObject *)(__pyx_t_7))->ob_item[1+__pyx_t_6] = __pyx_v_msg
)
;
2065 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__2065; goto __pyx_L1_error;}
2066 __Pyx_GOTREF(__pyx_t_1);
2067 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
2068 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
2069 __pyx_r = __pyx_t_1;
2070 __pyx_t_1 = 0;
2071 goto __pyx_L0;
2072
2073 /* "cephfs.pyx":259
2074 * """
2075 * ret = abs(ret)
2076 * if ret in errno_to_exception: # <<<<<<<<<<<<<<
2077 * return errno_to_exception[ret](ret, msg)
2078 * else:
2079 */
2080 }
2081
2082 /* "cephfs.pyx":262
2083 * return errno_to_exception[ret](ret, msg)
2084 * else:
2085 * return Error(msg + ': {} [Errno {:d}]'.format(os.strerror(ret), ret)) # <<<<<<<<<<<<<<
2086 *
2087 *
2088 */
2089 /*else*/ {
2090 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
2091 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2091; goto __pyx_L1_error;}
2092 __Pyx_GOTREF(__pyx_t_4);
2093 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Errno_d, __pyx_n_s_format); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2093; goto __pyx_L1_error;}
2094 __Pyx_GOTREF(__pyx_t_5);
2095 __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2095; goto __pyx_L1_error;}
2096 __Pyx_GOTREF(__pyx_t_9);
2097 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_strerror); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2097; goto __pyx_L1_error;}
2098 __Pyx_GOTREF(__pyx_t_10);
2099 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
2100 __pyx_t_9 = NULL((void*)0);
2101 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_10))__builtin_expect(!!(((__pyx_t_10)->ob_type == &PyMethod_Type
)), 0)
) {
2102 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10)(((PyMethodObject *)__pyx_t_10) -> im_self);
2103 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
2104 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10)(((PyMethodObject *)__pyx_t_10) -> im_func);
2105 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
2106 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
2107 __Pyx_DECREF_SET(__pyx_t_10, function)do { PyObject *tmp = (PyObject *) __pyx_t_10; __pyx_t_10 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
2108 }
2109 }
2110 if (!__pyx_t_9) {
2111 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_ret); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2111; goto __pyx_L1_error;}
2112 __Pyx_GOTREF(__pyx_t_8);
2113 } else {
2114 __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2114; goto __pyx_L1_error;}
2115 __Pyx_GOTREF(__pyx_t_11);
2116 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
2117 __Pyx_INCREF(__pyx_v_ret)( ((PyObject*)(__pyx_v_ret))->ob_refcnt++);
2118 __Pyx_GIVEREF(__pyx_v_ret);
2119 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_ret)(((PyTupleObject *)(__pyx_t_11))->ob_item[0+1] = __pyx_v_ret
)
;
2120 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2120; goto __pyx_L1_error;}
2121 __Pyx_GOTREF(__pyx_t_8);
2122 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
2123 }
2124 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
2125 __pyx_t_10 = NULL((void*)0);
2126 __pyx_t_6 = 0;
2127 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
2128 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
2129 if (likely(__pyx_t_10)__builtin_expect(!!(__pyx_t_10), 1)) {
2130 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
2131 __Pyx_INCREF(__pyx_t_10)( ((PyObject*)(__pyx_t_10))->ob_refcnt++);
2132 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
2133 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
2134 __pyx_t_6 = 1;
2135 }
2136 }
2137 __pyx_t_11 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2137; goto __pyx_L1_error;}
2138 __Pyx_GOTREF(__pyx_t_11);
2139 if (__pyx_t_10) {
2140 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_10); __pyx_t_10 = NULL((void*)0);
2141 }
2142 __Pyx_GIVEREF(__pyx_t_8);
2143 PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_t_8)(((PyTupleObject *)(__pyx_t_11))->ob_item[0+__pyx_t_6] = __pyx_t_8
)
;
2144 __Pyx_INCREF(__pyx_v_ret)( ((PyObject*)(__pyx_v_ret))->ob_refcnt++);
2145 __Pyx_GIVEREF(__pyx_v_ret);
2146 PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_v_ret)(((PyTupleObject *)(__pyx_t_11))->ob_item[1+__pyx_t_6] = __pyx_v_ret
)
;
2147 __pyx_t_8 = 0;
2148 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2148; goto __pyx_L1_error;}
2149 __Pyx_GOTREF(__pyx_t_7);
2150 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
2151 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
2152 __pyx_t_5 = PyNumber_Add(__pyx_v_msg, __pyx_t_7); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2152; goto __pyx_L1_error;}
2153 __Pyx_GOTREF(__pyx_t_5);
2154 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
2155 __pyx_t_7 = NULL((void*)0);
2156 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 0)
) {
2157 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
2158 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
2159 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
2160 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
2161 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
2162 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
2163 }
2164 }
2165 if (!__pyx_t_7) {
2166 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2166; goto __pyx_L1_error;}
2167 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
2168 __Pyx_GOTREF(__pyx_t_1);
2169 } else {
2170 __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2170; goto __pyx_L1_error;}
2171 __Pyx_GOTREF(__pyx_t_11);
2172 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
2173 __Pyx_GIVEREF(__pyx_t_5);
2174 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_11))->ob_item[0+1] = __pyx_t_5
)
;
2175 __pyx_t_5 = 0;
2176 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__2176; goto __pyx_L1_error;}
2177 __Pyx_GOTREF(__pyx_t_1);
2178 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
2179 }
2180 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
2181 __pyx_r = __pyx_t_1;
2182 __pyx_t_1 = 0;
2183 goto __pyx_L0;
2184 }
2185
2186 /* "cephfs.pyx":248
2187 *
2188 *
2189 * cdef make_ex(ret, msg): # <<<<<<<<<<<<<<
2190 * """
2191 * Translate a librados return code into an exception.
2192 */
2193
2194 /* function exit code */
2195 __pyx_L1_error:;
2196 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
2197 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
2198 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
2199 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
2200 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
2201 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
2202 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
2203 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
2204 __Pyx_AddTraceback("cephfs.make_ex", __pyx_clineno, __pyx_lineno, __pyx_filename);
2205 __pyx_r = 0;
2206 __pyx_L0:;
2207 __Pyx_XDECREF(__pyx_v_ret)do { if ((__pyx_v_ret) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_ret))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_ret)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_ret)))); } while (0); } while (0)
;
2208 __Pyx_XGIVEREF(__pyx_r);
2209 __Pyx_RefNannyFinishContext();
2210 return __pyx_r;
2211}
2212
2213/* "cephfs.pyx":270
2214 * DT_REG = 0xA
2215 * DT_LNK = 0xC
2216 * def is_dir(self): # <<<<<<<<<<<<<<
2217 * return self.d_type == self.DT_DIR
2218 *
2219 */
2220
2221/* Python wrapper */
2222static PyObject *__pyx_pw_6cephfs_8DirEntry_1is_dir(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
2223static PyMethodDef __pyx_mdef_6cephfs_8DirEntry_1is_dir = {"is_dir", (PyCFunction)__pyx_pw_6cephfs_8DirEntry_1is_dir, METH_O0x0008, 0};
2224static PyObject *__pyx_pw_6cephfs_8DirEntry_1is_dir(PyObject *__pyx_self, PyObject *__pyx_v_self) {
2225 PyObject *__pyx_r = 0;
2226 __Pyx_RefNannyDeclarations
2227 __Pyx_RefNannySetupContext("is_dir (wrapper)", 0);
2228 __pyx_r = __pyx_pf_6cephfs_8DirEntry_is_dir(__pyx_self, ((PyObject *)__pyx_v_self));
2229
2230 /* function exit code */
2231 __Pyx_RefNannyFinishContext();
2232 return __pyx_r;
2233}
2234
2235static PyObject *__pyx_pf_6cephfs_8DirEntry_is_dir(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self) {
2236 PyObject *__pyx_r = NULL((void*)0);
2237 __Pyx_RefNannyDeclarations
2238 PyObject *__pyx_t_1 = NULL((void*)0);
2239 PyObject *__pyx_t_2 = NULL((void*)0);
2240 PyObject *__pyx_t_3 = NULL((void*)0);
2241 int __pyx_lineno = 0;
2242 const char *__pyx_filename = NULL((void*)0);
2243 int __pyx_clineno = 0;
2244 __Pyx_RefNannySetupContext("is_dir", 0);
2245
2246 /* "cephfs.pyx":271
2247 * DT_LNK = 0xC
2248 * def is_dir(self):
2249 * return self.d_type == self.DT_DIR # <<<<<<<<<<<<<<
2250 *
2251 * def is_symbol_file(self):
2252 */
2253 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
2254 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_d_type); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__2254; goto __pyx_L1_error;}
2255 __Pyx_GOTREF(__pyx_t_1);
2256 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_DT_DIR); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__2256; goto __pyx_L1_error;}
2257 __Pyx_GOTREF(__pyx_t_2);
2258 __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ2); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__2258; goto __pyx_L1_error;}
2259 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
2260 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
2261 __pyx_r = __pyx_t_3;
2262 __pyx_t_3 = 0;
2263 goto __pyx_L0;
2264
2265 /* "cephfs.pyx":270
2266 * DT_REG = 0xA
2267 * DT_LNK = 0xC
2268 * def is_dir(self): # <<<<<<<<<<<<<<
2269 * return self.d_type == self.DT_DIR
2270 *
2271 */
2272
2273 /* function exit code */
2274 __pyx_L1_error:;
2275 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
2276 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
2277 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
2278 __Pyx_AddTraceback("cephfs.DirEntry.is_dir", __pyx_clineno, __pyx_lineno, __pyx_filename);
2279 __pyx_r = NULL((void*)0);
2280 __pyx_L0:;
2281 __Pyx_XGIVEREF(__pyx_r);
2282 __Pyx_RefNannyFinishContext();
2283 return __pyx_r;
2284}
2285
2286/* "cephfs.pyx":273
2287 * return self.d_type == self.DT_DIR
2288 *
2289 * def is_symbol_file(self): # <<<<<<<<<<<<<<
2290 * return self.d_type == self.DT_LNK
2291 *
2292 */
2293
2294/* Python wrapper */
2295static PyObject *__pyx_pw_6cephfs_8DirEntry_3is_symbol_file(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
2296static PyMethodDef __pyx_mdef_6cephfs_8DirEntry_3is_symbol_file = {"is_symbol_file", (PyCFunction)__pyx_pw_6cephfs_8DirEntry_3is_symbol_file, METH_O0x0008, 0};
2297static PyObject *__pyx_pw_6cephfs_8DirEntry_3is_symbol_file(PyObject *__pyx_self, PyObject *__pyx_v_self) {
2298 PyObject *__pyx_r = 0;
2299 __Pyx_RefNannyDeclarations
2300 __Pyx_RefNannySetupContext("is_symbol_file (wrapper)", 0);
2301 __pyx_r = __pyx_pf_6cephfs_8DirEntry_2is_symbol_file(__pyx_self, ((PyObject *)__pyx_v_self));
2302
2303 /* function exit code */
2304 __Pyx_RefNannyFinishContext();
2305 return __pyx_r;
2306}
2307
2308static PyObject *__pyx_pf_6cephfs_8DirEntry_2is_symbol_file(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self) {
2309 PyObject *__pyx_r = NULL((void*)0);
2310 __Pyx_RefNannyDeclarations
2311 PyObject *__pyx_t_1 = NULL((void*)0);
2312 PyObject *__pyx_t_2 = NULL((void*)0);
2313 PyObject *__pyx_t_3 = NULL((void*)0);
2314 int __pyx_lineno = 0;
2315 const char *__pyx_filename = NULL((void*)0);
2316 int __pyx_clineno = 0;
2317 __Pyx_RefNannySetupContext("is_symbol_file", 0);
2318
2319 /* "cephfs.pyx":274
2320 *
2321 * def is_symbol_file(self):
2322 * return self.d_type == self.DT_LNK # <<<<<<<<<<<<<<
2323 *
2324 * def is_file(self):
2325 */
2326 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
2327 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_d_type); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__2327; goto __pyx_L1_error;}
2328 __Pyx_GOTREF(__pyx_t_1);
2329 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_DT_LNK); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__2329; goto __pyx_L1_error;}
2330 __Pyx_GOTREF(__pyx_t_2);
2331 __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ2); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__2331; goto __pyx_L1_error;}
2332 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
2333 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
2334 __pyx_r = __pyx_t_3;
2335 __pyx_t_3 = 0;
2336 goto __pyx_L0;
2337
2338 /* "cephfs.pyx":273
2339 * return self.d_type == self.DT_DIR
2340 *
2341 * def is_symbol_file(self): # <<<<<<<<<<<<<<
2342 * return self.d_type == self.DT_LNK
2343 *
2344 */
2345
2346 /* function exit code */
2347 __pyx_L1_error:;
2348 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
2349 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
2350 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
2351 __Pyx_AddTraceback("cephfs.DirEntry.is_symbol_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
2352 __pyx_r = NULL((void*)0);
2353 __pyx_L0:;
2354 __Pyx_XGIVEREF(__pyx_r);
2355 __Pyx_RefNannyFinishContext();
2356 return __pyx_r;
2357}
2358
2359/* "cephfs.pyx":276
2360 * return self.d_type == self.DT_LNK
2361 *
2362 * def is_file(self): # <<<<<<<<<<<<<<
2363 * return self.d_type == self.DT_REG
2364 *
2365 */
2366
2367/* Python wrapper */
2368static PyObject *__pyx_pw_6cephfs_8DirEntry_5is_file(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
2369static PyMethodDef __pyx_mdef_6cephfs_8DirEntry_5is_file = {"is_file", (PyCFunction)__pyx_pw_6cephfs_8DirEntry_5is_file, METH_O0x0008, 0};
2370static PyObject *__pyx_pw_6cephfs_8DirEntry_5is_file(PyObject *__pyx_self, PyObject *__pyx_v_self) {
2371 PyObject *__pyx_r = 0;
2372 __Pyx_RefNannyDeclarations
2373 __Pyx_RefNannySetupContext("is_file (wrapper)", 0);
2374 __pyx_r = __pyx_pf_6cephfs_8DirEntry_4is_file(__pyx_self, ((PyObject *)__pyx_v_self));
2375
2376 /* function exit code */
2377 __Pyx_RefNannyFinishContext();
2378 return __pyx_r;
2379}
2380
2381static PyObject *__pyx_pf_6cephfs_8DirEntry_4is_file(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self) {
2382 PyObject *__pyx_r = NULL((void*)0);
2383 __Pyx_RefNannyDeclarations
2384 PyObject *__pyx_t_1 = NULL((void*)0);
2385 PyObject *__pyx_t_2 = NULL((void*)0);
2386 PyObject *__pyx_t_3 = NULL((void*)0);
2387 int __pyx_lineno = 0;
2388 const char *__pyx_filename = NULL((void*)0);
2389 int __pyx_clineno = 0;
2390 __Pyx_RefNannySetupContext("is_file", 0);
2391
2392 /* "cephfs.pyx":277
2393 *
2394 * def is_file(self):
2395 * return self.d_type == self.DT_REG # <<<<<<<<<<<<<<
2396 *
2397 * StatResult = namedtuple('StatResult',
2398 */
2399 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
2400 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_d_type); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__2400; goto __pyx_L1_error;}
2401 __Pyx_GOTREF(__pyx_t_1);
2402 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_DT_REG); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__2402; goto __pyx_L1_error;}
2403 __Pyx_GOTREF(__pyx_t_2);
2404 __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ2); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__2404; goto __pyx_L1_error;}
2405 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
2406 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
2407 __pyx_r = __pyx_t_3;
2408 __pyx_t_3 = 0;
2409 goto __pyx_L0;
2410
2411 /* "cephfs.pyx":276
2412 * return self.d_type == self.DT_LNK
2413 *
2414 * def is_file(self): # <<<<<<<<<<<<<<
2415 * return self.d_type == self.DT_REG
2416 *
2417 */
2418
2419 /* function exit code */
2420 __pyx_L1_error:;
2421 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
2422 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
2423 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
2424 __Pyx_AddTraceback("cephfs.DirEntry.is_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
2425 __pyx_r = NULL((void*)0);
2426 __pyx_L0:;
2427 __Pyx_XGIVEREF(__pyx_r);
2428 __Pyx_RefNannyFinishContext();
2429 return __pyx_r;
2430}
2431
2432/* "cephfs.pyx":296
2433 * # return d
2434 *
2435 * def __dealloc__(self): # <<<<<<<<<<<<<<
2436 * self.close()
2437 *
2438 */
2439
2440/* Python wrapper */
2441static void __pyx_pw_6cephfs_9DirResult_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
2442static void __pyx_pw_6cephfs_9DirResult_1__dealloc__(PyObject *__pyx_v_self) {
2443 __Pyx_RefNannyDeclarations
2444 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
2445 __pyx_pf_6cephfs_9DirResult___dealloc__(((struct __pyx_obj_6cephfs_DirResult *)__pyx_v_self));
2446
2447 /* function exit code */
2448 __Pyx_RefNannyFinishContext();
2449}
2450
2451static void __pyx_pf_6cephfs_9DirResult___dealloc__(struct __pyx_obj_6cephfs_DirResult *__pyx_v_self) {
2452 __Pyx_RefNannyDeclarations
2453 PyObject *__pyx_t_1 = NULL((void*)0);
2454 PyObject *__pyx_t_2 = NULL((void*)0);
2455 PyObject *__pyx_t_3 = NULL((void*)0);
2456 int __pyx_lineno = 0;
2457 const char *__pyx_filename = NULL((void*)0);
2458 int __pyx_clineno = 0;
2459 __Pyx_RefNannySetupContext("__dealloc__", 0);
2460
2461 /* "cephfs.pyx":297
2462 *
2463 * def __dealloc__(self):
2464 * self.close() # <<<<<<<<<<<<<<
2465 *
2466 * def __enter__(self):
2467 */
2468 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__2468; goto __pyx_L1_error;}
2469 __Pyx_GOTREF(__pyx_t_2);
2470 __pyx_t_3 = NULL((void*)0);
2471 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
2472 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
2473 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
2474 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
2475 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
2476 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
2477 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
2478 }
2479 }
2480 if (__pyx_t_3) {
2481 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__2481; goto __pyx_L1_error;}
2482 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
2483 } else {
2484 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__2484; goto __pyx_L1_error;}
2485 }
2486 __Pyx_GOTREF(__pyx_t_1);
2487 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
2488 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
2489
2490 /* "cephfs.pyx":296
2491 * # return d
2492 *
2493 * def __dealloc__(self): # <<<<<<<<<<<<<<
2494 * self.close()
2495 *
2496 */
2497
2498 /* function exit code */
2499 goto __pyx_L0;
2500 __pyx_L1_error:;
2501 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
2502 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
2503 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
2504 __Pyx_WriteUnraisable("cephfs.DirResult.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
2505 __pyx_L0:;
2506 __Pyx_RefNannyFinishContext();
2507}
2508
2509/* "cephfs.pyx":299
2510 * self.close()
2511 *
2512 * def __enter__(self): # <<<<<<<<<<<<<<
2513 * if not self.handle:
2514 * raise make_ex(errno.EBADF, "dir is not open")
2515 */
2516
2517/* Python wrapper */
2518static PyObject *__pyx_pw_6cephfs_9DirResult_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
2519static PyObject *__pyx_pw_6cephfs_9DirResult_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
2520 PyObject *__pyx_r = 0;
2521 __Pyx_RefNannyDeclarations
2522 __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
2523 __pyx_r = __pyx_pf_6cephfs_9DirResult_2__enter__(((struct __pyx_obj_6cephfs_DirResult *)__pyx_v_self));
2524
2525 /* function exit code */
2526 __Pyx_RefNannyFinishContext();
2527 return __pyx_r;
2528}
2529
2530static PyObject *__pyx_pf_6cephfs_9DirResult_2__enter__(struct __pyx_obj_6cephfs_DirResult *__pyx_v_self) {
2531 PyObject *__pyx_r = NULL((void*)0);
2532 __Pyx_RefNannyDeclarations
2533 int __pyx_t_1;
2534 PyObject *__pyx_t_2 = NULL((void*)0);
2535 PyObject *__pyx_t_3 = NULL((void*)0);
2536 int __pyx_lineno = 0;
2537 const char *__pyx_filename = NULL((void*)0);
2538 int __pyx_clineno = 0;
2539 __Pyx_RefNannySetupContext("__enter__", 0);
2540
2541 /* "cephfs.pyx":300
2542 *
2543 * def __enter__(self):
2544 * if not self.handle: # <<<<<<<<<<<<<<
2545 * raise make_ex(errno.EBADF, "dir is not open")
2546 * self.lib.require_state("mounted")
2547 */
2548 __pyx_t_1 = ((!(__pyx_v_self->handle != 0)) != 0);
2549 if (__pyx_t_1) {
2550
2551 /* "cephfs.pyx":301
2552 * def __enter__(self):
2553 * if not self.handle:
2554 * raise make_ex(errno.EBADF, "dir is not open") # <<<<<<<<<<<<<<
2555 * self.lib.require_state("mounted")
2556 * with nogil:
2557 */
2558 __pyx_t_2 = __Pyx_PyInt_From_int(EBADF9); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__2558; goto __pyx_L1_error;}
2559 __Pyx_GOTREF(__pyx_t_2);
2560 __pyx_t_3 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_dir_is_not_open); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__2560; goto __pyx_L1_error;}
2561 __Pyx_GOTREF(__pyx_t_3);
2562 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
2563 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
2564 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
2565 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__2565; goto __pyx_L1_error;}
2566
2567 /* "cephfs.pyx":300
2568 *
2569 * def __enter__(self):
2570 * if not self.handle: # <<<<<<<<<<<<<<
2571 * raise make_ex(errno.EBADF, "dir is not open")
2572 * self.lib.require_state("mounted")
2573 */
2574 }
2575
2576 /* "cephfs.pyx":302
2577 * if not self.handle:
2578 * raise make_ex(errno.EBADF, "dir is not open")
2579 * self.lib.require_state("mounted") # <<<<<<<<<<<<<<
2580 * with nogil:
2581 * ceph_rewinddir(self.lib.cluster, self.handle)
2582 */
2583 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->lib), __pyx_n_s_require_state); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__2583; goto __pyx_L1_error;}
2584 __Pyx_GOTREF(__pyx_t_3);
2585 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__2585; goto __pyx_L1_error;}
2586 __Pyx_GOTREF(__pyx_t_2);
2587 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
2588 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
2589
2590 /* "cephfs.pyx":303
2591 * raise make_ex(errno.EBADF, "dir is not open")
2592 * self.lib.require_state("mounted")
2593 * with nogil: # <<<<<<<<<<<<<<
2594 * ceph_rewinddir(self.lib.cluster, self.handle)
2595 * return self
2596 */
2597 {
2598 #ifdef WITH_THREAD1
2599 PyThreadState *_save;
2600 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
2601 #endif
2602 /*try:*/ {
2603
2604 /* "cephfs.pyx":304
2605 * self.lib.require_state("mounted")
2606 * with nogil:
2607 * ceph_rewinddir(self.lib.cluster, self.handle) # <<<<<<<<<<<<<<
2608 * return self
2609 *
2610 */
2611 ceph_rewinddir(__pyx_v_self->lib->cluster, __pyx_v_self->handle);
2612 }
2613
2614 /* "cephfs.pyx":303
2615 * raise make_ex(errno.EBADF, "dir is not open")
2616 * self.lib.require_state("mounted")
2617 * with nogil: # <<<<<<<<<<<<<<
2618 * ceph_rewinddir(self.lib.cluster, self.handle)
2619 * return self
2620 */
2621 /*finally:*/ {
2622 /*normal exit:*/{
2623 #ifdef WITH_THREAD1
2624 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
2625 #endif
2626 goto __pyx_L6;
2627 }
2628 __pyx_L6:;
2629 }
2630 }
2631
2632 /* "cephfs.pyx":305
2633 * with nogil:
2634 * ceph_rewinddir(self.lib.cluster, self.handle)
2635 * return self # <<<<<<<<<<<<<<
2636 *
2637 * def __exit__(self, type_, value, traceback):
2638 */
2639 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
2640 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
2641 __pyx_r = ((PyObject *)__pyx_v_self);
2642 goto __pyx_L0;
2643
2644 /* "cephfs.pyx":299
2645 * self.close()
2646 *
2647 * def __enter__(self): # <<<<<<<<<<<<<<
2648 * if not self.handle:
2649 * raise make_ex(errno.EBADF, "dir is not open")
2650 */
2651
2652 /* function exit code */
2653 __pyx_L1_error:;
2654 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
2655 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
2656 __Pyx_AddTraceback("cephfs.DirResult.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2657 __pyx_r = NULL((void*)0);
2658 __pyx_L0:;
2659 __Pyx_XGIVEREF(__pyx_r);
2660 __Pyx_RefNannyFinishContext();
2661 return __pyx_r;
2662}
2663
2664/* "cephfs.pyx":307
2665 * return self
2666 *
2667 * def __exit__(self, type_, value, traceback): # <<<<<<<<<<<<<<
2668 * self.close()
2669 * return False
2670 */
2671
2672/* Python wrapper */
2673static PyObject *__pyx_pw_6cephfs_9DirResult_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2674static PyObject *__pyx_pw_6cephfs_9DirResult_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2675 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_ = 0;
2676 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value = 0;
2677 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback = 0;
2678 int __pyx_lineno = 0;
2679 const char *__pyx_filename = NULL((void*)0);
2680 int __pyx_clineno = 0;
2681 PyObject *__pyx_r = 0;
2682 __Pyx_RefNannyDeclarations
2683 __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
2684 {
2685 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_traceback,0};
2686 PyObject* values[3] = {0,0,0};
2687 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
2688 Py_ssize_t kw_args;
2689 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
2690 switch (pos_args) {
2691 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
2692 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
2693 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
2694 case 0: break;
2695 default: goto __pyx_L5_argtuple_error;
2696 }
2697 kw_args = PyDict_Size(__pyx_kwds);
2698 switch (pos_args) {
2699 case 0:
2700 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type
)) != 0), 1)
) kw_args--;
2701 else goto __pyx_L5_argtuple_error;
2702 case 1:
2703 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value
)) != 0), 1)
) kw_args--;
2704 else {
2705 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__2705; goto __pyx_L3_error;}
2706 }
2707 case 2:
2708 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback
)) != 0), 1)
) kw_args--;
2709 else {
2710 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__2710; goto __pyx_L3_error;}
2711 }
2712 }
2713 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
2714 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__exit__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__2714; goto __pyx_L3_error;}
2715 }
2716 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
2717 goto __pyx_L5_argtuple_error;
2718 } else {
2719 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
2720 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
2721 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
2722 }
2723 __pyx_v_type_ = values[0];
2724 __pyx_v_value = values[1];
2725 __pyx_v_traceback = values[2];
2726 }
2727 goto __pyx_L4_argument_unpacking_done;
2728 __pyx_L5_argtuple_error:;
2729 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__2729; goto __pyx_L3_error;}
2730 __pyx_L3_error:;
2731 __Pyx_AddTraceback("cephfs.DirResult.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2732 __Pyx_RefNannyFinishContext();
2733 return NULL((void*)0);
2734 __pyx_L4_argument_unpacking_done:;
2735 __pyx_r = __pyx_pf_6cephfs_9DirResult_4__exit__(((struct __pyx_obj_6cephfs_DirResult *)__pyx_v_self), __pyx_v_type_, __pyx_v_value, __pyx_v_traceback);
2736
2737 /* function exit code */
2738 __Pyx_RefNannyFinishContext();
2739 return __pyx_r;
2740}
2741
2742static PyObject *__pyx_pf_6cephfs_9DirResult_4__exit__(struct __pyx_obj_6cephfs_DirResult *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback) {
2743 PyObject *__pyx_r = NULL((void*)0);
2744 __Pyx_RefNannyDeclarations
2745 PyObject *__pyx_t_1 = NULL((void*)0);
2746 PyObject *__pyx_t_2 = NULL((void*)0);
2747 PyObject *__pyx_t_3 = NULL((void*)0);
2748 int __pyx_lineno = 0;
2749 const char *__pyx_filename = NULL((void*)0);
2750 int __pyx_clineno = 0;
2751 __Pyx_RefNannySetupContext("__exit__", 0);
2752
2753 /* "cephfs.pyx":308
2754 *
2755 * def __exit__(self, type_, value, traceback):
2756 * self.close() # <<<<<<<<<<<<<<
2757 * return False
2758 *
2759 */
2760 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__2760; goto __pyx_L1_error;}
2761 __Pyx_GOTREF(__pyx_t_2);
2762 __pyx_t_3 = NULL((void*)0);
2763 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
2764 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
2765 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
2766 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
2767 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
2768 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
2769 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
2770 }
2771 }
2772 if (__pyx_t_3) {
2773 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__2773; goto __pyx_L1_error;}
2774 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
2775 } else {
2776 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__2776; goto __pyx_L1_error;}
2777 }
2778 __Pyx_GOTREF(__pyx_t_1);
2779 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
2780 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
2781
2782 /* "cephfs.pyx":309
2783 * def __exit__(self, type_, value, traceback):
2784 * self.close()
2785 * return False # <<<<<<<<<<<<<<
2786 *
2787 * def readdir(self):
2788 */
2789 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
2790 __Pyx_INCREF(Py_False)( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++)
;
2791 __pyx_r = Py_False((PyObject *) &_Py_ZeroStruct);
2792 goto __pyx_L0;
2793
2794 /* "cephfs.pyx":307
2795 * return self
2796 *
2797 * def __exit__(self, type_, value, traceback): # <<<<<<<<<<<<<<
2798 * self.close()
2799 * return False
2800 */
2801
2802 /* function exit code */
2803 __pyx_L1_error:;
2804 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
2805 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
2806 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
2807 __Pyx_AddTraceback("cephfs.DirResult.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2808 __pyx_r = NULL((void*)0);
2809 __pyx_L0:;
2810 __Pyx_XGIVEREF(__pyx_r);
2811 __Pyx_RefNannyFinishContext();
2812 return __pyx_r;
2813}
2814
2815/* "cephfs.pyx":311
2816 * return False
2817 *
2818 * def readdir(self): # <<<<<<<<<<<<<<
2819 * self.lib.require_state("mounted")
2820 *
2821 */
2822
2823/* Python wrapper */
2824static PyObject *__pyx_pw_6cephfs_9DirResult_7readdir(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
2825static PyObject *__pyx_pw_6cephfs_9DirResult_7readdir(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
2826 PyObject *__pyx_r = 0;
2827 __Pyx_RefNannyDeclarations
2828 __Pyx_RefNannySetupContext("readdir (wrapper)", 0);
2829 __pyx_r = __pyx_pf_6cephfs_9DirResult_6readdir(((struct __pyx_obj_6cephfs_DirResult *)__pyx_v_self));
2830
2831 /* function exit code */
2832 __Pyx_RefNannyFinishContext();
2833 return __pyx_r;
2834}
2835
2836static PyObject *__pyx_pf_6cephfs_9DirResult_6readdir(struct __pyx_obj_6cephfs_DirResult *__pyx_v_self) {
2837 struct dirent *__pyx_v_dirent;
2838 PyObject *__pyx_r = NULL((void*)0);
2839 __Pyx_RefNannyDeclarations
2840 PyObject *__pyx_t_1 = NULL((void*)0);
2841 PyObject *__pyx_t_2 = NULL((void*)0);
2842 int __pyx_t_3;
2843 PyObject *__pyx_t_4 = NULL((void*)0);
2844 int __pyx_lineno = 0;
2845 const char *__pyx_filename = NULL((void*)0);
2846 int __pyx_clineno = 0;
2847 __Pyx_RefNannySetupContext("readdir", 0);
2848
2849 /* "cephfs.pyx":312
2850 *
2851 * def readdir(self):
2852 * self.lib.require_state("mounted") # <<<<<<<<<<<<<<
2853 *
2854 * with nogil:
2855 */
2856 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->lib), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__2856; goto __pyx_L1_error;}
2857 __Pyx_GOTREF(__pyx_t_1);
2858 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__2, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__2858; goto __pyx_L1_error;}
2859 __Pyx_GOTREF(__pyx_t_2);
2860 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
2861 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
2862
2863 /* "cephfs.pyx":314
2864 * self.lib.require_state("mounted")
2865 *
2866 * with nogil: # <<<<<<<<<<<<<<
2867 * dirent = ceph_readdir(self.lib.cluster, self.handle)
2868 * if not dirent:
2869 */
2870 {
2871 #ifdef WITH_THREAD1
2872 PyThreadState *_save;
2873 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
2874 #endif
2875 /*try:*/ {
2876
2877 /* "cephfs.pyx":315
2878 *
2879 * with nogil:
2880 * dirent = ceph_readdir(self.lib.cluster, self.handle) # <<<<<<<<<<<<<<
2881 * if not dirent:
2882 * return None
2883 */
2884 __pyx_v_dirent = ceph_readdir(__pyx_v_self->lib->cluster, __pyx_v_self->handle);
2885 }
2886
2887 /* "cephfs.pyx":314
2888 * self.lib.require_state("mounted")
2889 *
2890 * with nogil: # <<<<<<<<<<<<<<
2891 * dirent = ceph_readdir(self.lib.cluster, self.handle)
2892 * if not dirent:
2893 */
2894 /*finally:*/ {
2895 /*normal exit:*/{
2896 #ifdef WITH_THREAD1
2897 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
2898 #endif
2899 goto __pyx_L5;
2900 }
2901 __pyx_L5:;
2902 }
2903 }
2904
2905 /* "cephfs.pyx":316
2906 * with nogil:
2907 * dirent = ceph_readdir(self.lib.cluster, self.handle)
2908 * if not dirent: # <<<<<<<<<<<<<<
2909 * return None
2910 *
2911 */
2912 __pyx_t_3 = ((!(__pyx_v_dirent != 0)) != 0);
2913 if (__pyx_t_3) {
2914
2915 /* "cephfs.pyx":317
2916 * dirent = ceph_readdir(self.lib.cluster, self.handle)
2917 * if not dirent:
2918 * return None # <<<<<<<<<<<<<<
2919 *
2920 * return DirEntry(d_ino=dirent.d_ino,
2921 */
2922 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
2923 __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
2924 __pyx_r = Py_None(&_Py_NoneStruct);
2925 goto __pyx_L0;
2926
2927 /* "cephfs.pyx":316
2928 * with nogil:
2929 * dirent = ceph_readdir(self.lib.cluster, self.handle)
2930 * if not dirent: # <<<<<<<<<<<<<<
2931 * return None
2932 *
2933 */
2934 }
2935
2936 /* "cephfs.pyx":319
2937 * return None
2938 *
2939 * return DirEntry(d_ino=dirent.d_ino, # <<<<<<<<<<<<<<
2940 * d_off=dirent.d_off,
2941 * d_reclen=dirent.d_reclen,
2942 */
2943 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
2944 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DirEntry); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__2944; goto __pyx_L1_error;}
2945 __Pyx_GOTREF(__pyx_t_2);
2946 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__2946; goto __pyx_L1_error;}
2947 __Pyx_GOTREF(__pyx_t_1);
2948 __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_dirent->d_ino); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__2948; goto __pyx_L1_error;}
2949 __Pyx_GOTREF(__pyx_t_4);
2950 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_d_ino, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__2950; goto __pyx_L1_error;}
2951 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
2952
2953 /* "cephfs.pyx":320
2954 *
2955 * return DirEntry(d_ino=dirent.d_ino,
2956 * d_off=dirent.d_off, # <<<<<<<<<<<<<<
2957 * d_reclen=dirent.d_reclen,
2958 * d_type=dirent.d_type,
2959 */
2960 __pyx_t_4 = __Pyx_PyInt_From_unsigned_long(__pyx_v_dirent->d_off); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__2960; goto __pyx_L1_error;}
2961 __Pyx_GOTREF(__pyx_t_4);
2962 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_d_off, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__2962; goto __pyx_L1_error;}
2963 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
2964
2965 /* "cephfs.pyx":321
2966 * return DirEntry(d_ino=dirent.d_ino,
2967 * d_off=dirent.d_off,
2968 * d_reclen=dirent.d_reclen, # <<<<<<<<<<<<<<
2969 * d_type=dirent.d_type,
2970 * d_name=dirent.d_name)
2971 */
2972 __pyx_t_4 = __Pyx_PyInt_From_unsigned_short(__pyx_v_dirent->d_reclen); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__2972; goto __pyx_L1_error;}
2973 __Pyx_GOTREF(__pyx_t_4);
2974 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_d_reclen, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__2974; goto __pyx_L1_error;}
2975 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
2976
2977 /* "cephfs.pyx":322
2978 * d_off=dirent.d_off,
2979 * d_reclen=dirent.d_reclen,
2980 * d_type=dirent.d_type, # <<<<<<<<<<<<<<
2981 * d_name=dirent.d_name)
2982 *
2983 */
2984 __pyx_t_4 = __Pyx_PyInt_From_unsigned_char(__pyx_v_dirent->d_type); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__2984; goto __pyx_L1_error;}
2985 __Pyx_GOTREF(__pyx_t_4);
2986 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_d_type, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__2986; goto __pyx_L1_error;}
2987 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
2988
2989 /* "cephfs.pyx":323
2990 * d_reclen=dirent.d_reclen,
2991 * d_type=dirent.d_type,
2992 * d_name=dirent.d_name) # <<<<<<<<<<<<<<
2993 *
2994 * def close(self):
2995 */
2996 __pyx_t_4 = __Pyx_PyObject_FromStringPyString_FromString(__pyx_v_dirent->d_name); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__2996; goto __pyx_L1_error;}
2997 __Pyx_GOTREF(__pyx_t_4);
2998 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_d_name, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__2998; goto __pyx_L1_error;}
2999 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
3000
3001 /* "cephfs.pyx":319
3002 * return None
3003 *
3004 * return DirEntry(d_ino=dirent.d_ino, # <<<<<<<<<<<<<<
3005 * d_off=dirent.d_off,
3006 * d_reclen=dirent.d_reclen,
3007 */
3008 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__3008; goto __pyx_L1_error;}
3009 __Pyx_GOTREF(__pyx_t_4);
3010 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
3011 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
3012 __pyx_r = __pyx_t_4;
3013 __pyx_t_4 = 0;
3014 goto __pyx_L0;
3015
3016 /* "cephfs.pyx":311
3017 * return False
3018 *
3019 * def readdir(self): # <<<<<<<<<<<<<<
3020 * self.lib.require_state("mounted")
3021 *
3022 */
3023
3024 /* function exit code */
3025 __pyx_L1_error:;
3026 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
3027 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
3028 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
3029 __Pyx_AddTraceback("cephfs.DirResult.readdir", __pyx_clineno, __pyx_lineno, __pyx_filename);
3030 __pyx_r = NULL((void*)0);
3031 __pyx_L0:;
3032 __Pyx_XGIVEREF(__pyx_r);
3033 __Pyx_RefNannyFinishContext();
3034 return __pyx_r;
3035}
3036
3037/* "cephfs.pyx":325
3038 * d_name=dirent.d_name)
3039 *
3040 * def close(self): # <<<<<<<<<<<<<<
3041 * if self.handle:
3042 * self.lib.require_state("mounted")
3043 */
3044
3045/* Python wrapper */
3046static PyObject *__pyx_pw_6cephfs_9DirResult_9close(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
3047static PyObject *__pyx_pw_6cephfs_9DirResult_9close(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
3048 PyObject *__pyx_r = 0;
3049 __Pyx_RefNannyDeclarations
3050 __Pyx_RefNannySetupContext("close (wrapper)", 0);
3051 __pyx_r = __pyx_pf_6cephfs_9DirResult_8close(((struct __pyx_obj_6cephfs_DirResult *)__pyx_v_self));
3052
3053 /* function exit code */
3054 __Pyx_RefNannyFinishContext();
3055 return __pyx_r;
3056}
3057
3058static PyObject *__pyx_pf_6cephfs_9DirResult_8close(struct __pyx_obj_6cephfs_DirResult *__pyx_v_self) {
3059 int __pyx_v_ret;
3060 PyObject *__pyx_r = NULL((void*)0);
3061 __Pyx_RefNannyDeclarations
3062 int __pyx_t_1;
3063 PyObject *__pyx_t_2 = NULL((void*)0);
3064 PyObject *__pyx_t_3 = NULL((void*)0);
3065 int __pyx_lineno = 0;
3066 const char *__pyx_filename = NULL((void*)0);
3067 int __pyx_clineno = 0;
3068 __Pyx_RefNannySetupContext("close", 0);
3069
3070 /* "cephfs.pyx":326
3071 *
3072 * def close(self):
3073 * if self.handle: # <<<<<<<<<<<<<<
3074 * self.lib.require_state("mounted")
3075 * with nogil:
3076 */
3077 __pyx_t_1 = (__pyx_v_self->handle != 0);
3078 if (__pyx_t_1) {
3079
3080 /* "cephfs.pyx":327
3081 * def close(self):
3082 * if self.handle:
3083 * self.lib.require_state("mounted") # <<<<<<<<<<<<<<
3084 * with nogil:
3085 * ret = ceph_closedir(self.lib.cluster, self.handle)
3086 */
3087 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->lib), __pyx_n_s_require_state); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__3087; goto __pyx_L1_error;}
3088 __Pyx_GOTREF(__pyx_t_2);
3089 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__3089; goto __pyx_L1_error;}
3090 __Pyx_GOTREF(__pyx_t_3);
3091 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
3092 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
3093
3094 /* "cephfs.pyx":328
3095 * if self.handle:
3096 * self.lib.require_state("mounted")
3097 * with nogil: # <<<<<<<<<<<<<<
3098 * ret = ceph_closedir(self.lib.cluster, self.handle)
3099 * if ret < 0:
3100 */
3101 {
3102 #ifdef WITH_THREAD1
3103 PyThreadState *_save;
3104 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
3105 #endif
3106 /*try:*/ {
3107
3108 /* "cephfs.pyx":329
3109 * self.lib.require_state("mounted")
3110 * with nogil:
3111 * ret = ceph_closedir(self.lib.cluster, self.handle) # <<<<<<<<<<<<<<
3112 * if ret < 0:
3113 * raise make_ex(ret, "closedir failed")
3114 */
3115 __pyx_v_ret = ceph_closedir(__pyx_v_self->lib->cluster, __pyx_v_self->handle);
3116 }
3117
3118 /* "cephfs.pyx":328
3119 * if self.handle:
3120 * self.lib.require_state("mounted")
3121 * with nogil: # <<<<<<<<<<<<<<
3122 * ret = ceph_closedir(self.lib.cluster, self.handle)
3123 * if ret < 0:
3124 */
3125 /*finally:*/ {
3126 /*normal exit:*/{
3127 #ifdef WITH_THREAD1
3128 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
3129 #endif
3130 goto __pyx_L6;
3131 }
3132 __pyx_L6:;
3133 }
3134 }
3135
3136 /* "cephfs.pyx":330
3137 * with nogil:
3138 * ret = ceph_closedir(self.lib.cluster, self.handle)
3139 * if ret < 0: # <<<<<<<<<<<<<<
3140 * raise make_ex(ret, "closedir failed")
3141 * self.handle = NULL
3142 */
3143 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
3144 if (__pyx_t_1) {
3145
3146 /* "cephfs.pyx":331
3147 * ret = ceph_closedir(self.lib.cluster, self.handle)
3148 * if ret < 0:
3149 * raise make_ex(ret, "closedir failed") # <<<<<<<<<<<<<<
3150 * self.handle = NULL
3151 *
3152 */
3153 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__3153; goto __pyx_L1_error;}
3154 __Pyx_GOTREF(__pyx_t_3);
3155 __pyx_t_2 = __pyx_f_6cephfs_make_ex(__pyx_t_3, __pyx_kp_s_closedir_failed); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__3155; goto __pyx_L1_error;}
3156 __Pyx_GOTREF(__pyx_t_2);
3157 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
3158 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
3159 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
3160 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__3160; goto __pyx_L1_error;}
3161
3162 /* "cephfs.pyx":330
3163 * with nogil:
3164 * ret = ceph_closedir(self.lib.cluster, self.handle)
3165 * if ret < 0: # <<<<<<<<<<<<<<
3166 * raise make_ex(ret, "closedir failed")
3167 * self.handle = NULL
3168 */
3169 }
3170
3171 /* "cephfs.pyx":332
3172 * if ret < 0:
3173 * raise make_ex(ret, "closedir failed")
3174 * self.handle = NULL # <<<<<<<<<<<<<<
3175 *
3176 * def cstr(val, name, encoding="utf-8", opt=False):
3177 */
3178 __pyx_v_self->handle = NULL((void*)0);
3179
3180 /* "cephfs.pyx":326
3181 *
3182 * def close(self):
3183 * if self.handle: # <<<<<<<<<<<<<<
3184 * self.lib.require_state("mounted")
3185 * with nogil:
3186 */
3187 }
3188
3189 /* "cephfs.pyx":325
3190 * d_name=dirent.d_name)
3191 *
3192 * def close(self): # <<<<<<<<<<<<<<
3193 * if self.handle:
3194 * self.lib.require_state("mounted")
3195 */
3196
3197 /* function exit code */
3198 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
3199 goto __pyx_L0;
3200 __pyx_L1_error:;
3201 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
3202 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
3203 __Pyx_AddTraceback("cephfs.DirResult.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
3204 __pyx_r = NULL((void*)0);
3205 __pyx_L0:;
3206 __Pyx_XGIVEREF(__pyx_r);
3207 __Pyx_RefNannyFinishContext();
3208 return __pyx_r;
3209}
3210
3211/* "cephfs.pyx":334
3212 * self.handle = NULL
3213 *
3214 * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<<
3215 * """
3216 * Create a byte string from a Python string
3217 */
3218
3219/* Python wrapper */
3220static PyObject *__pyx_pw_6cephfs_1cstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3221static char __pyx_doc_6cephfs_cstr[] = "\n Create a byte string from a Python string\n\n :param basestring val: Python string\n :param str name: Name of the string parameter, for exceptions\n :param str encoding: Encoding to use\n :param bool opt: If True, None is allowed\n :rtype: bytes\n :raises: :class:`InvalidArgument`\n ";
3222static PyMethodDef __pyx_mdef_6cephfs_1cstr = {"cstr", (PyCFunction)__pyx_pw_6cephfs_1cstr, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_cstr};
3223static PyObject *__pyx_pw_6cephfs_1cstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3224 PyObject *__pyx_v_val = 0;
3225 PyObject *__pyx_v_name = 0;
3226 PyObject *__pyx_v_encoding = 0;
3227 PyObject *__pyx_v_opt = 0;
3228 int __pyx_lineno = 0;
3229 const char *__pyx_filename = NULL((void*)0);
3230 int __pyx_clineno = 0;
3231 PyObject *__pyx_r = 0;
3232 __Pyx_RefNannyDeclarations
3233 __Pyx_RefNannySetupContext("cstr (wrapper)", 0);
3234 {
3235 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val,&__pyx_n_s_name,&__pyx_n_s_encoding,&__pyx_n_s_opt,0};
3236 PyObject* values[4] = {0,0,0,0};
3237 values[2] = ((PyObject *)__pyx_kp_s_utf_8);
3238 values[3] = ((PyObject *)Py_False((PyObject *) &_Py_ZeroStruct));
3239 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
3240 Py_ssize_t kw_args;
3241 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
3242 switch (pos_args) {
3243 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
3244 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
3245 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
3246 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
3247 case 0: break;
3248 default: goto __pyx_L5_argtuple_error;
3249 }
3250 kw_args = PyDict_Size(__pyx_kwds);
3251 switch (pos_args) {
3252 case 0:
3253 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val
)) != 0), 1)
) kw_args--;
3254 else goto __pyx_L5_argtuple_error;
3255 case 1:
3256 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
3257 else {
3258 __Pyx_RaiseArgtupleInvalid("cstr", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__3258; goto __pyx_L3_error;}
3259 }
3260 case 2:
3261 if (kw_args > 0) {
3262 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding);
3263 if (value) { values[2] = value; kw_args--; }
3264 }
3265 case 3:
3266 if (kw_args > 0) {
3267 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opt);
3268 if (value) { values[3] = value; kw_args--; }
3269 }
3270 }
3271 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
3272 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cstr") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "cstr") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__3272; goto __pyx_L3_error;}
3273 }
3274 } else {
3275 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
3276 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
3277 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
3278 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
3279 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
3280 break;
3281 default: goto __pyx_L5_argtuple_error;
3282 }
3283 }
3284 __pyx_v_val = values[0];
3285 __pyx_v_name = values[1];
3286 __pyx_v_encoding = values[2];
3287 __pyx_v_opt = values[3];
3288 }
3289 goto __pyx_L4_argument_unpacking_done;
3290 __pyx_L5_argtuple_error:;
3291 __Pyx_RaiseArgtupleInvalid("cstr", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__3291; goto __pyx_L3_error;}
3292 __pyx_L3_error:;
3293 __Pyx_AddTraceback("cephfs.cstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
3294 __Pyx_RefNannyFinishContext();
3295 return NULL((void*)0);
3296 __pyx_L4_argument_unpacking_done:;
3297 __pyx_r = __pyx_pf_6cephfs_cstr(__pyx_self, __pyx_v_val, __pyx_v_name, __pyx_v_encoding, __pyx_v_opt);
3298
3299 /* function exit code */
3300 __Pyx_RefNannyFinishContext();
3301 return __pyx_r;
3302}
3303
3304static PyObject *__pyx_pf_6cephfs_cstr(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_name, PyObject *__pyx_v_encoding, PyObject *__pyx_v_opt) {
3305 PyObject *__pyx_v_v = NULL((void*)0);
3306 PyObject *__pyx_r = NULL((void*)0);
3307 __Pyx_RefNannyDeclarations
3308 int __pyx_t_1;
3309 int __pyx_t_2;
3310 int __pyx_t_3;
3311 PyObject *__pyx_t_4 = NULL((void*)0);
3312 PyObject *__pyx_t_5 = NULL((void*)0);
3313 PyObject *__pyx_t_6 = NULL((void*)0);
3314 PyObject *__pyx_t_7 = NULL((void*)0);
3315 PyObject *__pyx_t_8 = NULL((void*)0);
3316 PyObject *__pyx_t_9 = NULL((void*)0);
3317 PyObject *__pyx_t_10 = NULL((void*)0);
3318 PyObject *__pyx_t_11 = NULL((void*)0);
3319 int __pyx_lineno = 0;
3320 const char *__pyx_filename = NULL((void*)0);
3321 int __pyx_clineno = 0;
3322 __Pyx_RefNannySetupContext("cstr", 0);
3323
3324 /* "cephfs.pyx":345
3325 * :raises: :class:`InvalidArgument`
3326 * """
3327 * if opt and val is None: # <<<<<<<<<<<<<<
3328 * return None
3329 * if isinstance(val, bytes):
3330 */
3331 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opt); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__3331; goto __pyx_L1_error;}
3332 if (__pyx_t_2) {
3333 } else {
3334 __pyx_t_1 = __pyx_t_2;
3335 goto __pyx_L4_bool_binop_done;
3336 }
3337 __pyx_t_2 = (__pyx_v_val == Py_None(&_Py_NoneStruct));
3338 __pyx_t_3 = (__pyx_t_2 != 0);
3339 __pyx_t_1 = __pyx_t_3;
3340 __pyx_L4_bool_binop_done:;
3341 if (__pyx_t_1) {
3342
3343 /* "cephfs.pyx":346
3344 * """
3345 * if opt and val is None:
3346 * return None # <<<<<<<<<<<<<<
3347 * if isinstance(val, bytes):
3348 * return val
3349 */
3350 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
3351 __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
3352 __pyx_r = Py_None(&_Py_NoneStruct);
3353 goto __pyx_L0;
3354
3355 /* "cephfs.pyx":345
3356 * :raises: :class:`InvalidArgument`
3357 * """
3358 * if opt and val is None: # <<<<<<<<<<<<<<
3359 * return None
3360 * if isinstance(val, bytes):
3361 */
3362 }
3363
3364 /* "cephfs.pyx":347
3365 * if opt and val is None:
3366 * return None
3367 * if isinstance(val, bytes): # <<<<<<<<<<<<<<
3368 * return val
3369 * else:
3370 */
3371 __pyx_t_1 = PyBytes_Check(__pyx_v_val)((((((PyObject*)(__pyx_v_val))->ob_type))->tp_flags &
((1L<<27))) != 0)
;
3372 __pyx_t_3 = (__pyx_t_1 != 0);
3373 if (__pyx_t_3) {
3374
3375 /* "cephfs.pyx":348
3376 * return None
3377 * if isinstance(val, bytes):
3378 * return val # <<<<<<<<<<<<<<
3379 * else:
3380 * try:
3381 */
3382 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
3383 __Pyx_INCREF(__pyx_v_val)( ((PyObject*)(__pyx_v_val))->ob_refcnt++);
3384 __pyx_r = __pyx_v_val;
3385 goto __pyx_L0;
3386
3387 /* "cephfs.pyx":347
3388 * if opt and val is None:
3389 * return None
3390 * if isinstance(val, bytes): # <<<<<<<<<<<<<<
3391 * return val
3392 * else:
3393 */
3394 }
3395
3396 /* "cephfs.pyx":350
3397 * return val
3398 * else:
3399 * try: # <<<<<<<<<<<<<<
3400 * v = val.encode(encoding)
3401 * except:
3402 */
3403 /*else*/ {
3404 {
3405 __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
3406 __Pyx_XGOTREF(__pyx_t_4);
3407 __Pyx_XGOTREF(__pyx_t_5);
3408 __Pyx_XGOTREF(__pyx_t_6);
3409 /*try:*/ {
3410
3411 /* "cephfs.pyx":351
3412 * else:
3413 * try:
3414 * v = val.encode(encoding) # <<<<<<<<<<<<<<
3415 * except:
3416 * raise TypeError('%s must be encodeable as a bytearray' % name)
3417 */
3418 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__3418; goto __pyx_L7_error;}
3419 __Pyx_GOTREF(__pyx_t_8);
3420 __pyx_t_9 = NULL((void*)0);
3421 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 1)
) {
3422 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
3423 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
3424 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
3425 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
3426 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
3427 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
3428 }
3429 }
3430 if (!__pyx_t_9) {
3431 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_encoding); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__3431; goto __pyx_L7_error;}
3432 __Pyx_GOTREF(__pyx_t_7);
3433 } else {
3434 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__3434; goto __pyx_L7_error;}
3435 __Pyx_GOTREF(__pyx_t_10);
3436 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
3437 __Pyx_INCREF(__pyx_v_encoding)( ((PyObject*)(__pyx_v_encoding))->ob_refcnt++);
3438 __Pyx_GIVEREF(__pyx_v_encoding);
3439 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_encoding)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_v_encoding
)
;
3440 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__3440; goto __pyx_L7_error;}
3441 __Pyx_GOTREF(__pyx_t_7);
3442 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
3443 }
3444 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
3445 __pyx_v_v = __pyx_t_7;
3446 __pyx_t_7 = 0;
3447
3448 /* "cephfs.pyx":350
3449 * return val
3450 * else:
3451 * try: # <<<<<<<<<<<<<<
3452 * v = val.encode(encoding)
3453 * except:
3454 */
3455 }
3456 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
3457 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
3458 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
3459 goto __pyx_L14_try_end;
3460 __pyx_L7_error:;
3461 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
3462 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
3463 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
3464 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
3465
3466 /* "cephfs.pyx":352
3467 * try:
3468 * v = val.encode(encoding)
3469 * except: # <<<<<<<<<<<<<<
3470 * raise TypeError('%s must be encodeable as a bytearray' % name)
3471 * assert isinstance(v, bytes)
3472 */
3473 /*except:*/ {
3474 __Pyx_AddTraceback("cephfs.cstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
3475 if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__3475; goto __pyx_L9_except_error;}
3476 __Pyx_GOTREF(__pyx_t_7);
3477 __Pyx_GOTREF(__pyx_t_8);
3478 __Pyx_GOTREF(__pyx_t_10);
3479
3480 /* "cephfs.pyx":353
3481 * v = val.encode(encoding)
3482 * except:
3483 * raise TypeError('%s must be encodeable as a bytearray' % name) # <<<<<<<<<<<<<<
3484 * assert isinstance(v, bytes)
3485 * return v
3486 */
3487 __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_s_must_be_encodeable_as_a_bytea, __pyx_v_name)PyString_Format(__pyx_kp_s_s_must_be_encodeable_as_a_bytea, __pyx_v_name
)
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__3487; goto __pyx_L9_except_error;}
3488 __Pyx_GOTREF(__pyx_t_9);
3489 __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__3489; goto __pyx_L9_except_error;}
3490 __Pyx_GOTREF(__pyx_t_11);
3491 __Pyx_GIVEREF(__pyx_t_9);
3492 PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_9);
3493 __pyx_t_9 = 0;
3494 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__3494; goto __pyx_L9_except_error;}
3495 __Pyx_GOTREF(__pyx_t_9);
3496 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
3497 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
3498 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
3499 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__3499; goto __pyx_L9_except_error;}
3500 }
3501 __pyx_L9_except_error:;
3502
3503 /* "cephfs.pyx":350
3504 * return val
3505 * else:
3506 * try: # <<<<<<<<<<<<<<
3507 * v = val.encode(encoding)
3508 * except:
3509 */
3510 __Pyx_XGIVEREF(__pyx_t_4);
3511 __Pyx_XGIVEREF(__pyx_t_5);
3512 __Pyx_XGIVEREF(__pyx_t_6);
3513 __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
3514 goto __pyx_L1_error;
3515 __pyx_L14_try_end:;
3516 }
3517
3518 /* "cephfs.pyx":354
3519 * except:
3520 * raise TypeError('%s must be encodeable as a bytearray' % name)
3521 * assert isinstance(v, bytes) # <<<<<<<<<<<<<<
3522 * return v
3523 *
3524 */
3525 #ifndef CYTHON_WITHOUT_ASSERTIONS
3526 if (unlikely(!Py_OptimizeFlag)__builtin_expect(!!(!Py_OptimizeFlag), 0)) {
3527 __pyx_t_3 = PyBytes_Check(__pyx_v_v)((((((PyObject*)(__pyx_v_v))->ob_type))->tp_flags &
((1L<<27))) != 0)
;
3528 if (unlikely(!(__pyx_t_3 != 0))__builtin_expect(!!(!(__pyx_t_3 != 0)), 0)) {
3529 PyErr_SetNone(PyExc_AssertionError);
3530 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__3530; goto __pyx_L1_error;}
3531 }
3532 }
3533 #endif
3534
3535 /* "cephfs.pyx":355
3536 * raise TypeError('%s must be encodeable as a bytearray' % name)
3537 * assert isinstance(v, bytes)
3538 * return v # <<<<<<<<<<<<<<
3539 *
3540 * def cstr_list(list_str, name, encoding="utf-8"):
3541 */
3542 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
3543 __Pyx_INCREF(__pyx_v_v)( ((PyObject*)(__pyx_v_v))->ob_refcnt++);
3544 __pyx_r = __pyx_v_v;
3545 goto __pyx_L0;
3546 }
3547
3548 /* "cephfs.pyx":334
3549 * self.handle = NULL
3550 *
3551 * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<<
3552 * """
3553 * Create a byte string from a Python string
3554 */
3555
3556 /* function exit code */
3557 __pyx_L1_error:;
3558 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
3559 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
3560 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
3561 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
3562 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
3563 __Pyx_AddTraceback("cephfs.cstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
3564 __pyx_r = NULL((void*)0);
3565 __pyx_L0:;
3566 __Pyx_XDECREF(__pyx_v_v)do { if ((__pyx_v_v) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_v))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_v_v)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_v)))); } while (0); } while (0)
;
3567 __Pyx_XGIVEREF(__pyx_r);
3568 __Pyx_RefNannyFinishContext();
3569 return __pyx_r;
3570}
3571
3572/* "cephfs.pyx":357
3573 * return v
3574 *
3575 * def cstr_list(list_str, name, encoding="utf-8"): # <<<<<<<<<<<<<<
3576 * return [cstr(s, name) for s in list_str]
3577 *
3578 */
3579
3580/* Python wrapper */
3581static PyObject *__pyx_pw_6cephfs_3cstr_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3582static PyMethodDef __pyx_mdef_6cephfs_3cstr_list = {"cstr_list", (PyCFunction)__pyx_pw_6cephfs_3cstr_list, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0};
3583static PyObject *__pyx_pw_6cephfs_3cstr_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3584 PyObject *__pyx_v_list_str = 0;
3585 PyObject *__pyx_v_name = 0;
3586 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_encoding = 0;
3587 int __pyx_lineno = 0;
3588 const char *__pyx_filename = NULL((void*)0);
3589 int __pyx_clineno = 0;
3590 PyObject *__pyx_r = 0;
3591 __Pyx_RefNannyDeclarations
3592 __Pyx_RefNannySetupContext("cstr_list (wrapper)", 0);
3593 {
3594 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_list_str,&__pyx_n_s_name,&__pyx_n_s_encoding,0};
3595 PyObject* values[3] = {0,0,0};
3596 values[2] = ((PyObject *)__pyx_kp_s_utf_8);
3597 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
3598 Py_ssize_t kw_args;
3599 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
3600 switch (pos_args) {
3601 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
3602 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
3603 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
3604 case 0: break;
3605 default: goto __pyx_L5_argtuple_error;
3606 }
3607 kw_args = PyDict_Size(__pyx_kwds);
3608 switch (pos_args) {
3609 case 0:
3610 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_list_str)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_list_str
)) != 0), 1)
) kw_args--;
3611 else goto __pyx_L5_argtuple_error;
3612 case 1:
3613 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
3614 else {
3615 __Pyx_RaiseArgtupleInvalid("cstr_list", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__3615; goto __pyx_L3_error;}
3616 }
3617 case 2:
3618 if (kw_args > 0) {
3619 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding);
3620 if (value) { values[2] = value; kw_args--; }
3621 }
3622 }
3623 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
3624 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cstr_list") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "cstr_list") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__3624; goto __pyx_L3_error;}
3625 }
3626 } else {
3627 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
3628 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
3629 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
3630 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
3631 break;
3632 default: goto __pyx_L5_argtuple_error;
3633 }
3634 }
3635 __pyx_v_list_str = values[0];
3636 __pyx_v_name = values[1];
3637 __pyx_v_encoding = values[2];
3638 }
3639 goto __pyx_L4_argument_unpacking_done;
3640 __pyx_L5_argtuple_error:;
3641 __Pyx_RaiseArgtupleInvalid("cstr_list", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__3641; goto __pyx_L3_error;}
3642 __pyx_L3_error:;
3643 __Pyx_AddTraceback("cephfs.cstr_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
3644 __Pyx_RefNannyFinishContext();
3645 return NULL((void*)0);
3646 __pyx_L4_argument_unpacking_done:;
3647 __pyx_r = __pyx_pf_6cephfs_2cstr_list(__pyx_self, __pyx_v_list_str, __pyx_v_name, __pyx_v_encoding);
3648
3649 /* function exit code */
3650 __Pyx_RefNannyFinishContext();
3651 return __pyx_r;
3652}
3653
3654static PyObject *__pyx_pf_6cephfs_2cstr_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_list_str, PyObject *__pyx_v_name, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_encoding) {
3655 PyObject *__pyx_v_s = NULL((void*)0);
3656 PyObject *__pyx_r = NULL((void*)0);
3657 __Pyx_RefNannyDeclarations
3658 PyObject *__pyx_t_1 = NULL((void*)0);
3659 PyObject *__pyx_t_2 = NULL((void*)0);
3660 Py_ssize_t __pyx_t_3;
3661 PyObject *(*__pyx_t_4)(PyObject *);
3662 PyObject *__pyx_t_5 = NULL((void*)0);
3663 PyObject *__pyx_t_6 = NULL((void*)0);
3664 PyObject *__pyx_t_7 = NULL((void*)0);
3665 Py_ssize_t __pyx_t_8;
3666 PyObject *__pyx_t_9 = NULL((void*)0);
3667 int __pyx_lineno = 0;
3668 const char *__pyx_filename = NULL((void*)0);
3669 int __pyx_clineno = 0;
3670 __Pyx_RefNannySetupContext("cstr_list", 0);
3671
3672 /* "cephfs.pyx":358
3673 *
3674 * def cstr_list(list_str, name, encoding="utf-8"):
3675 * return [cstr(s, name) for s in list_str] # <<<<<<<<<<<<<<
3676 *
3677 *
3678 */
3679 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
3680 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3680; goto __pyx_L1_error;}
3681 __Pyx_GOTREF(__pyx_t_1);
3682 if (likely(PyList_CheckExact(__pyx_v_list_str))__builtin_expect(!!(((((PyObject*)(__pyx_v_list_str))->ob_type
) == &PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_v_list_str)((((PyObject*)(__pyx_v_list_str))->ob_type) == &PyTuple_Type
)
) {
3683 __pyx_t_2 = __pyx_v_list_str; __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++); __pyx_t_3 = 0;
3684 __pyx_t_4 = NULL((void*)0);
3685 } else {
3686 __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_list_str); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3686; goto __pyx_L1_error;}
3687 __Pyx_GOTREF(__pyx_t_2);
3688 __pyx_t_4 = Py_TYPE(__pyx_t_2)(((PyObject*)(__pyx_t_2))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3688; goto __pyx_L1_error;}
3689 }
3690 for (;;) {
3691 if (likely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 1)) {
3692 if (likely(PyList_CheckExact(__pyx_t_2))__builtin_expect(!!(((((PyObject*)(__pyx_t_2))->ob_type) ==
&PyList_Type)), 1)
) {
3693 if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)(((PyVarObject*)(__pyx_t_2))->ob_size)) break;
3694 #if CYTHON_COMPILING_IN_CPYTHON1
3695 __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3)(((PyListObject *)(__pyx_t_2))->ob_item[__pyx_t_3]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_3++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3695; goto __pyx_L1_error;}
3696 #else
3697 __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3)( (((PyObject*)(__pyx_t_2))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_2, __pyx_t_3) )
; __pyx_t_3++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3697; goto __pyx_L1_error;}
3698 __Pyx_GOTREF(__pyx_t_5);
3699 #endif
3700 } else {
3701 if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)(((PyVarObject*)(__pyx_t_2))->ob_size)) break;
3702 #if CYTHON_COMPILING_IN_CPYTHON1
3703 __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)(((PyTupleObject *)(__pyx_t_2))->ob_item[__pyx_t_3]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_3++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3703; goto __pyx_L1_error;}
3704 #else
3705 __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3)( (((PyObject*)(__pyx_t_2))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_2, __pyx_t_3) )
; __pyx_t_3++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3705; goto __pyx_L1_error;}
3706 __Pyx_GOTREF(__pyx_t_5);
3707 #endif
3708 }
3709 } else {
3710 __pyx_t_5 = __pyx_t_4(__pyx_t_2);
3711 if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {
3712 PyObject* exc_type = PyErr_Occurred();
3713 if (exc_type) {
3714 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
3715 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3715; goto __pyx_L1_error;}
3716 }
3717 break;
3718 }
3719 __Pyx_GOTREF(__pyx_t_5);
3720 }
3721 __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_v_s; __pyx_v_s = __pyx_t_5
; do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0); } while (0)
;
3722 __pyx_t_5 = 0;
3723 __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3723; goto __pyx_L1_error;}
3724 __Pyx_GOTREF(__pyx_t_6);
3725 __pyx_t_7 = NULL((void*)0);
3726 __pyx_t_8 = 0;
3727 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type
)), 0)
) {
3728 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self);
3729 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
3730 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func);
3731 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
3732 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
3733 __Pyx_DECREF_SET(__pyx_t_6, function)do { PyObject *tmp = (PyObject *) __pyx_t_6; __pyx_t_6 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
3734 __pyx_t_8 = 1;
3735 }
3736 }
3737 __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3737; goto __pyx_L1_error;}
3738 __Pyx_GOTREF(__pyx_t_9);
3739 if (__pyx_t_7) {
3740 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
3741 }
3742 __Pyx_INCREF(__pyx_v_s)( ((PyObject*)(__pyx_v_s))->ob_refcnt++);
3743 __Pyx_GIVEREF(__pyx_v_s);
3744 PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_s)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+__pyx_t_8] = __pyx_v_s
)
;
3745 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
3746 __Pyx_GIVEREF(__pyx_v_name);
3747 PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_name)(((PyTupleObject *)(__pyx_t_9))->ob_item[1+__pyx_t_8] = __pyx_v_name
)
;
3748 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3748; goto __pyx_L1_error;}
3749 __Pyx_GOTREF(__pyx_t_5);
3750 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
3751 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
3752 if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_1, (PyObject
*)__pyx_t_5)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__3752; goto __pyx_L1_error;}
3753 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
3754 }
3755 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
3756 __pyx_r = __pyx_t_1;
3757 __pyx_t_1 = 0;
3758 goto __pyx_L0;
3759
3760 /* "cephfs.pyx":357
3761 * return v
3762 *
3763 * def cstr_list(list_str, name, encoding="utf-8"): # <<<<<<<<<<<<<<
3764 * return [cstr(s, name) for s in list_str]
3765 *
3766 */
3767
3768 /* function exit code */
3769 __pyx_L1_error:;
3770 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
3771 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
3772 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
3773 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
3774 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
3775 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
3776 __Pyx_AddTraceback("cephfs.cstr_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
3777 __pyx_r = NULL((void*)0);
3778 __pyx_L0:;
3779 __Pyx_XDECREF(__pyx_v_s)do { if ((__pyx_v_s) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_s))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_v_s)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_s)))); } while (0); } while (0)
;
3780 __Pyx_XGIVEREF(__pyx_r);
3781 __Pyx_RefNannyFinishContext();
3782 return __pyx_r;
3783}
3784
3785/* "cephfs.pyx":361
3786 *
3787 *
3788 * def decode_cstr(val, encoding="utf-8"): # <<<<<<<<<<<<<<
3789 * """
3790 * Decode a byte string into a Python string.
3791 */
3792
3793/* Python wrapper */
3794static PyObject *__pyx_pw_6cephfs_5decode_cstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3795static char __pyx_doc_6cephfs_4decode_cstr[] = "\n Decode a byte string into a Python string.\n\n :param bytes val: byte string\n :rtype: unicode or None\n ";
3796static PyMethodDef __pyx_mdef_6cephfs_5decode_cstr = {"decode_cstr", (PyCFunction)__pyx_pw_6cephfs_5decode_cstr, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_4decode_cstr};
3797static PyObject *__pyx_pw_6cephfs_5decode_cstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3798 PyObject *__pyx_v_val = 0;
3799 PyObject *__pyx_v_encoding = 0;
3800 int __pyx_lineno = 0;
3801 const char *__pyx_filename = NULL((void*)0);
3802 int __pyx_clineno = 0;
3803 PyObject *__pyx_r = 0;
3804 __Pyx_RefNannyDeclarations
3805 __Pyx_RefNannySetupContext("decode_cstr (wrapper)", 0);
3806 {
3807 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val,&__pyx_n_s_encoding,0};
3808 PyObject* values[2] = {0,0};
3809 values[1] = ((PyObject *)__pyx_kp_s_utf_8);
3810 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
3811 Py_ssize_t kw_args;
3812 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
3813 switch (pos_args) {
3814 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
3815 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
3816 case 0: break;
3817 default: goto __pyx_L5_argtuple_error;
3818 }
3819 kw_args = PyDict_Size(__pyx_kwds);
3820 switch (pos_args) {
3821 case 0:
3822 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val
)) != 0), 1)
) kw_args--;
3823 else goto __pyx_L5_argtuple_error;
3824 case 1:
3825 if (kw_args > 0) {
3826 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding);
3827 if (value) { values[1] = value; kw_args--; }
3828 }
3829 }
3830 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
3831 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_cstr") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "decode_cstr") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__3831; goto __pyx_L3_error;}
3832 }
3833 } else {
3834 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
3835 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
3836 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
3837 break;
3838 default: goto __pyx_L5_argtuple_error;
3839 }
3840 }
3841 __pyx_v_val = values[0];
3842 __pyx_v_encoding = values[1];
3843 }
3844 goto __pyx_L4_argument_unpacking_done;
3845 __pyx_L5_argtuple_error:;
3846 __Pyx_RaiseArgtupleInvalid("decode_cstr", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__3846; goto __pyx_L3_error;}
3847 __pyx_L3_error:;
3848 __Pyx_AddTraceback("cephfs.decode_cstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
3849 __Pyx_RefNannyFinishContext();
3850 return NULL((void*)0);
3851 __pyx_L4_argument_unpacking_done:;
3852 __pyx_r = __pyx_pf_6cephfs_4decode_cstr(__pyx_self, __pyx_v_val, __pyx_v_encoding);
3853
3854 /* function exit code */
3855 __Pyx_RefNannyFinishContext();
3856 return __pyx_r;
3857}
3858
3859static PyObject *__pyx_pf_6cephfs_4decode_cstr(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_encoding) {
3860 PyObject *__pyx_r = NULL((void*)0);
3861 __Pyx_RefNannyDeclarations
3862 int __pyx_t_1;
3863 int __pyx_t_2;
3864 PyObject *__pyx_t_3 = NULL((void*)0);
3865 PyObject *__pyx_t_4 = NULL((void*)0);
3866 PyObject *__pyx_t_5 = NULL((void*)0);
3867 PyObject *__pyx_t_6 = NULL((void*)0);
3868 int __pyx_lineno = 0;
3869 const char *__pyx_filename = NULL((void*)0);
3870 int __pyx_clineno = 0;
3871 __Pyx_RefNannySetupContext("decode_cstr", 0);
3872
3873 /* "cephfs.pyx":368
3874 * :rtype: unicode or None
3875 * """
3876 * if val is None: # <<<<<<<<<<<<<<
3877 * return None
3878 *
3879 */
3880 __pyx_t_1 = (__pyx_v_val == Py_None(&_Py_NoneStruct));
3881 __pyx_t_2 = (__pyx_t_1 != 0);
3882 if (__pyx_t_2) {
3883
3884 /* "cephfs.pyx":369
3885 * """
3886 * if val is None:
3887 * return None # <<<<<<<<<<<<<<
3888 *
3889 * return val.decode(encoding)
3890 */
3891 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
3892 __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
3893 __pyx_r = Py_None(&_Py_NoneStruct);
3894 goto __pyx_L0;
3895
3896 /* "cephfs.pyx":368
3897 * :rtype: unicode or None
3898 * """
3899 * if val is None: # <<<<<<<<<<<<<<
3900 * return None
3901 *
3902 */
3903 }
3904
3905 /* "cephfs.pyx":371
3906 * return None
3907 *
3908 * return val.decode(encoding) # <<<<<<<<<<<<<<
3909 *
3910 *
3911 */
3912 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
3913 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__3913; goto __pyx_L1_error;}
3914 __Pyx_GOTREF(__pyx_t_4);
3915 __pyx_t_5 = NULL((void*)0);
3916 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 1)
) {
3917 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
3918 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
3919 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
3920 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
3921 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
3922 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
3923 }
3924 }
3925 if (!__pyx_t_5) {
3926 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_encoding); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__3926; goto __pyx_L1_error;}
3927 __Pyx_GOTREF(__pyx_t_3);
3928 } else {
3929 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__3929; goto __pyx_L1_error;}
3930 __Pyx_GOTREF(__pyx_t_6);
3931 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
3932 __Pyx_INCREF(__pyx_v_encoding)( ((PyObject*)(__pyx_v_encoding))->ob_refcnt++);
3933 __Pyx_GIVEREF(__pyx_v_encoding);
3934 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_encoding)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_v_encoding
)
;
3935 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__3935; goto __pyx_L1_error;}
3936 __Pyx_GOTREF(__pyx_t_3);
3937 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
3938 }
3939 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
3940 __pyx_r = __pyx_t_3;
3941 __pyx_t_3 = 0;
3942 goto __pyx_L0;
3943
3944 /* "cephfs.pyx":361
3945 *
3946 *
3947 * def decode_cstr(val, encoding="utf-8"): # <<<<<<<<<<<<<<
3948 * """
3949 * Decode a byte string into a Python string.
3950 */
3951
3952 /* function exit code */
3953 __pyx_L1_error:;
3954 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
3955 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
3956 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
3957 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
3958 __Pyx_AddTraceback("cephfs.decode_cstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
3959 __pyx_r = NULL((void*)0);
3960 __pyx_L0:;
3961 __Pyx_XGIVEREF(__pyx_r);
3962 __Pyx_RefNannyFinishContext();
3963 return __pyx_r;
3964}
3965
3966/* "cephfs.pyx":374
3967 *
3968 *
3969 * cdef char* opt_str(s) except? NULL: # <<<<<<<<<<<<<<
3970 * if s is None:
3971 * return NULL
3972 */
3973
3974static char *__pyx_f_6cephfs_opt_str(PyObject *__pyx_v_s) {
3975 char *__pyx_r;
3976 __Pyx_RefNannyDeclarations
3977 int __pyx_t_1;
3978 int __pyx_t_2;
3979 char *__pyx_t_3;
3980 int __pyx_lineno = 0;
3981 const char *__pyx_filename = NULL((void*)0);
3982 int __pyx_clineno = 0;
3983 __Pyx_RefNannySetupContext("opt_str", 0);
3984
3985 /* "cephfs.pyx":375
3986 *
3987 * cdef char* opt_str(s) except? NULL:
3988 * if s is None: # <<<<<<<<<<<<<<
3989 * return NULL
3990 * return s
3991 */
3992 __pyx_t_1 = (__pyx_v_s == Py_None(&_Py_NoneStruct));
3993 __pyx_t_2 = (__pyx_t_1 != 0);
3994 if (__pyx_t_2) {
3995
3996 /* "cephfs.pyx":376
3997 * cdef char* opt_str(s) except? NULL:
3998 * if s is None:
3999 * return NULL # <<<<<<<<<<<<<<
4000 * return s
4001 *
4002 */
4003 __pyx_r = NULL((void*)0);
4004 goto __pyx_L0;
4005
4006 /* "cephfs.pyx":375
4007 *
4008 * cdef char* opt_str(s) except? NULL:
4009 * if s is None: # <<<<<<<<<<<<<<
4010 * return NULL
4011 * return s
4012 */
4013 }
4014
4015 /* "cephfs.pyx":377
4016 * if s is None:
4017 * return NULL
4018 * return s # <<<<<<<<<<<<<<
4019 *
4020 *
4021 */
4022 __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_s); if (unlikely((!__pyx_t_3) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_3) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__4022; goto __pyx_L1_error;}
4023 __pyx_r = __pyx_t_3;
4024 goto __pyx_L0;
4025
4026 /* "cephfs.pyx":374
4027 *
4028 *
4029 * cdef char* opt_str(s) except? NULL: # <<<<<<<<<<<<<<
4030 * if s is None:
4031 * return NULL
4032 */
4033
4034 /* function exit code */
4035 __pyx_L1_error:;
4036 __Pyx_AddTraceback("cephfs.opt_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
4037 __pyx_r = NULL((void*)0);
4038 __pyx_L0:;
4039 __Pyx_RefNannyFinishContext();
4040 return __pyx_r;
4041}
4042
4043/* "cephfs.pyx":380
4044 *
4045 *
4046 * cdef char ** to_bytes_array(list_bytes): # <<<<<<<<<<<<<<
4047 * cdef char **ret = <char **>malloc(len(list_bytes) * sizeof(char *))
4048 * if ret == NULL:
4049 */
4050
4051static char **__pyx_f_6cephfs_to_bytes_array(PyObject *__pyx_v_list_bytes) {
4052 char **__pyx_v_ret;
4053 Py_ssize_t __pyx_v_i;
4054 char **__pyx_r;
4055 __Pyx_RefNannyDeclarations
4056 Py_ssize_t __pyx_t_1;
4057 int __pyx_t_2;
4058 PyObject *__pyx_t_3 = NULL((void*)0);
4059 Py_ssize_t __pyx_t_4;
4060 char *__pyx_t_5;
4061 int __pyx_lineno = 0;
4062 const char *__pyx_filename = NULL((void*)0);
4063 int __pyx_clineno = 0;
4064 __Pyx_RefNannySetupContext("to_bytes_array", 0);
4065
4066 /* "cephfs.pyx":381
4067 *
4068 * cdef char ** to_bytes_array(list_bytes):
4069 * cdef char **ret = <char **>malloc(len(list_bytes) * sizeof(char *)) # <<<<<<<<<<<<<<
4070 * if ret == NULL:
4071 * raise MemoryError("malloc failed")
4072 */
4073 __pyx_t_1 = PyObject_LengthPyObject_Size(__pyx_v_list_bytes); if (unlikely(__pyx_t_1 == -1)__builtin_expect(!!(__pyx_t_1 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__4073; goto __pyx_L1_error;}
10
Taking false branch
4074 __pyx_v_ret = ((char **)malloc((__pyx_t_1 * (sizeof(char *)))));
11
Memory is allocated
4075
4076 /* "cephfs.pyx":382
4077 * cdef char ** to_bytes_array(list_bytes):
4078 * cdef char **ret = <char **>malloc(len(list_bytes) * sizeof(char *))
4079 * if ret == NULL: # <<<<<<<<<<<<<<
4080 * raise MemoryError("malloc failed")
4081 * for i in xrange(len(list_bytes)):
4082 */
4083 __pyx_t_2 = ((__pyx_v_ret == NULL((void*)0)) != 0);
12
Assuming '__pyx_v_ret' is not equal to NULL
4084 if (__pyx_t_2) {
13
Taking false branch
4085
4086 /* "cephfs.pyx":383
4087 * cdef char **ret = <char **>malloc(len(list_bytes) * sizeof(char *))
4088 * if ret == NULL:
4089 * raise MemoryError("malloc failed") # <<<<<<<<<<<<<<
4090 * for i in xrange(len(list_bytes)):
4091 * ret[i] = <char *>list_bytes[i]
4092 */
4093 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__4, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__4093; goto __pyx_L1_error;}
4094 __Pyx_GOTREF(__pyx_t_3);
4095 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4096 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4097 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__4097; goto __pyx_L1_error;}
4098
4099 /* "cephfs.pyx":382
4100 * cdef char ** to_bytes_array(list_bytes):
4101 * cdef char **ret = <char **>malloc(len(list_bytes) * sizeof(char *))
4102 * if ret == NULL: # <<<<<<<<<<<<<<
4103 * raise MemoryError("malloc failed")
4104 * for i in xrange(len(list_bytes)):
4105 */
4106 }
4107
4108 /* "cephfs.pyx":384
4109 * if ret == NULL:
4110 * raise MemoryError("malloc failed")
4111 * for i in xrange(len(list_bytes)): # <<<<<<<<<<<<<<
4112 * ret[i] = <char *>list_bytes[i]
4113 * return ret
4114 */
4115 __pyx_t_1 = PyObject_LengthPyObject_Size(__pyx_v_list_bytes); if (unlikely(__pyx_t_1 == -1)__builtin_expect(!!(__pyx_t_1 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__4115; goto __pyx_L1_error;}
14
Taking false branch
4116 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_1; __pyx_t_4+=1) {
15
Assuming '__pyx_t_4' is < '__pyx_t_1'
16
Loop condition is true. Entering loop body
19
Assuming '__pyx_t_4' is < '__pyx_t_1'
20
Loop condition is true. Entering loop body
23
Assuming '__pyx_t_4' is < '__pyx_t_1'
24
Loop condition is true. Entering loop body
4117 __pyx_v_i = __pyx_t_4;
4118
4119 /* "cephfs.pyx":385
4120 * raise MemoryError("malloc failed")
4121 * for i in xrange(len(list_bytes)):
4122 * ret[i] = <char *>list_bytes[i] # <<<<<<<<<<<<<<
4123 * return ret
4124 *
4125 */
4126 __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_list_bytes, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1)(( (sizeof(Py_ssize_t) < sizeof(Py_ssize_t)) || (sizeof(Py_ssize_t
) > sizeof(Py_ssize_t) && __builtin_expect(!!(__pyx_v_i
< (Py_ssize_t)((Py_ssize_t)(((size_t)-1)>>1)) || __pyx_v_i
== (Py_ssize_t)((Py_ssize_t)(((size_t)-1)>>1))), 1) &&
(!1 || __builtin_expect(!!(__pyx_v_i > (Py_ssize_t)(-((Py_ssize_t
)(((size_t)-1)>>1))-1) || __pyx_v_i == (Py_ssize_t)(-((
Py_ssize_t)(((size_t)-1)>>1))-1)), 1))) || (sizeof(Py_ssize_t
) == sizeof(Py_ssize_t) && (1 || __builtin_expect(!!(
__pyx_v_i < (Py_ssize_t)((Py_ssize_t)(((size_t)-1)>>
1)) || __pyx_v_i == (Py_ssize_t)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) ) ? __Pyx_GetItemInt_Fast(__pyx_v_list_bytes, (Py_ssize_t
)__pyx_v_i, 0, 1, 1) : (0 ? (PyErr_SetString(PyExc_IndexError
, "list index out of range"), (PyObject*)((void*)0)) : __Pyx_GetItemInt_Generic
(__pyx_v_list_bytes, PyInt_FromSsize_t(__pyx_v_i))))
; if (unlikely(__pyx_t_3 == NULL)__builtin_expect(!!(__pyx_t_3 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__4126; goto __pyx_L1_error;};
17
Taking false branch
21
Taking false branch
25
Taking true branch
26
Potential leak of memory pointed to by '__pyx_v_ret'
4127 __Pyx_GOTREF(__pyx_t_3);
4128 __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_5) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_5) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__4128; goto __pyx_L1_error;}
18
Taking false branch
22
Taking false branch
4129 (__pyx_v_ret[__pyx_v_i]) = ((char *)__pyx_t_5);
4130 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4131 }
4132
4133 /* "cephfs.pyx":386
4134 * for i in xrange(len(list_bytes)):
4135 * ret[i] = <char *>list_bytes[i]
4136 * return ret # <<<<<<<<<<<<<<
4137 *
4138 *
4139 */
4140 __pyx_r = __pyx_v_ret;
4141 goto __pyx_L0;
4142
4143 /* "cephfs.pyx":380
4144 *
4145 *
4146 * cdef char ** to_bytes_array(list_bytes): # <<<<<<<<<<<<<<
4147 * cdef char **ret = <char **>malloc(len(list_bytes) * sizeof(char *))
4148 * if ret == NULL:
4149 */
4150
4151 /* function exit code */
4152 __pyx_L1_error:;
4153 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
4154 __Pyx_WriteUnraisable("cephfs.to_bytes_array", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
4155 __pyx_r = 0;
4156 __pyx_L0:;
4157 __Pyx_RefNannyFinishContext();
4158 return __pyx_r;
4159}
4160
4161/* "cephfs.pyx":389
4162 *
4163 *
4164 * cdef void* realloc_chk(void* ptr, size_t size) except NULL: # <<<<<<<<<<<<<<
4165 * cdef void *ret = realloc(ptr, size)
4166 * if ret == NULL:
4167 */
4168
4169static void *__pyx_f_6cephfs_realloc_chk(void *__pyx_v_ptr, size_t __pyx_v_size) {
4170 void *__pyx_v_ret;
4171 void *__pyx_r;
4172 __Pyx_RefNannyDeclarations
4173 int __pyx_t_1;
4174 PyObject *__pyx_t_2 = NULL((void*)0);
4175 int __pyx_lineno = 0;
4176 const char *__pyx_filename = NULL((void*)0);
4177 int __pyx_clineno = 0;
4178 __Pyx_RefNannySetupContext("realloc_chk", 0);
4179
4180 /* "cephfs.pyx":390
4181 *
4182 * cdef void* realloc_chk(void* ptr, size_t size) except NULL:
4183 * cdef void *ret = realloc(ptr, size) # <<<<<<<<<<<<<<
4184 * if ret == NULL:
4185 * raise MemoryError("realloc failed")
4186 */
4187 __pyx_v_ret = realloc(__pyx_v_ptr, __pyx_v_size);
4188
4189 /* "cephfs.pyx":391
4190 * cdef void* realloc_chk(void* ptr, size_t size) except NULL:
4191 * cdef void *ret = realloc(ptr, size)
4192 * if ret == NULL: # <<<<<<<<<<<<<<
4193 * raise MemoryError("realloc failed")
4194 * return ret
4195 */
4196 __pyx_t_1 = ((__pyx_v_ret == NULL((void*)0)) != 0);
4197 if (__pyx_t_1) {
4198
4199 /* "cephfs.pyx":392
4200 * cdef void *ret = realloc(ptr, size)
4201 * if ret == NULL:
4202 * raise MemoryError("realloc failed") # <<<<<<<<<<<<<<
4203 * return ret
4204 *
4205 */
4206 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__4206; goto __pyx_L1_error;}
4207 __Pyx_GOTREF(__pyx_t_2);
4208 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4209 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
4210 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__4210; goto __pyx_L1_error;}
4211
4212 /* "cephfs.pyx":391
4213 * cdef void* realloc_chk(void* ptr, size_t size) except NULL:
4214 * cdef void *ret = realloc(ptr, size)
4215 * if ret == NULL: # <<<<<<<<<<<<<<
4216 * raise MemoryError("realloc failed")
4217 * return ret
4218 */
4219 }
4220
4221 /* "cephfs.pyx":393
4222 * if ret == NULL:
4223 * raise MemoryError("realloc failed")
4224 * return ret # <<<<<<<<<<<<<<
4225 *
4226 *
4227 */
4228 __pyx_r = __pyx_v_ret;
4229 goto __pyx_L0;
4230
4231 /* "cephfs.pyx":389
4232 *
4233 *
4234 * cdef void* realloc_chk(void* ptr, size_t size) except NULL: # <<<<<<<<<<<<<<
4235 * cdef void *ret = realloc(ptr, size)
4236 * if ret == NULL:
4237 */
4238
4239 /* function exit code */
4240 __pyx_L1_error:;
4241 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
4242 __Pyx_AddTraceback("cephfs.realloc_chk", __pyx_clineno, __pyx_lineno, __pyx_filename);
4243 __pyx_r = NULL((void*)0);
4244 __pyx_L0:;
4245 __Pyx_RefNannyFinishContext();
4246 return __pyx_r;
4247}
4248
4249/* "cephfs.pyx":402
4250 * cdef ceph_mount_info *cluster
4251 *
4252 * def require_state(self, *args): # <<<<<<<<<<<<<<
4253 * if self.state in args:
4254 * return
4255 */
4256
4257/* Python wrapper */
4258static PyObject *__pyx_pw_6cephfs_9LibCephFS_1require_state(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4259static PyObject *__pyx_pw_6cephfs_9LibCephFS_1require_state(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4260 PyObject *__pyx_v_args = 0;
4261 PyObject *__pyx_r = 0;
4262 __Pyx_RefNannyDeclarations
4263 __Pyx_RefNannySetupContext("require_state (wrapper)", 0);
4264 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0) && unlikely(PyDict_Size(__pyx_kwds) > 0)__builtin_expect(!!(PyDict_Size(__pyx_kwds) > 0), 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "require_state", 0))__builtin_expect(!!(!__Pyx_CheckKeywordStrings(__pyx_kwds, "require_state"
, 0)), 0)
) return NULL((void*)0);
4265 __Pyx_INCREF(__pyx_args)( ((PyObject*)(__pyx_args))->ob_refcnt++);
4266 __pyx_v_args = __pyx_args;
4267 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_require_state(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_args);
4268
4269 /* function exit code */
4270 __Pyx_XDECREF(__pyx_v_args)do { if ((__pyx_v_args) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_args))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_args)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_args)))); } while (0); } while
(0)
;
4271 __Pyx_RefNannyFinishContext();
4272 return __pyx_r;
4273}
4274
4275static PyObject *__pyx_pf_6cephfs_9LibCephFS_require_state(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_args) {
4276 PyObject *__pyx_r = NULL((void*)0);
4277 __Pyx_RefNannyDeclarations
4278 int __pyx_t_1;
4279 int __pyx_t_2;
4280 PyObject *__pyx_t_3 = NULL((void*)0);
4281 PyObject *__pyx_t_4 = NULL((void*)0);
4282 PyObject *__pyx_t_5 = NULL((void*)0);
4283 PyObject *__pyx_t_6 = NULL((void*)0);
4284 PyObject *__pyx_t_7 = NULL((void*)0);
4285 int __pyx_lineno = 0;
4286 const char *__pyx_filename = NULL((void*)0);
4287 int __pyx_clineno = 0;
4288 __Pyx_RefNannySetupContext("require_state", 0);
4289
4290 /* "cephfs.pyx":403
4291 *
4292 * def require_state(self, *args):
4293 * if self.state in args: # <<<<<<<<<<<<<<
4294 * return
4295 * raise LibCephFSStateError("You cannot perform that operation on a "
4296 */
4297 __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_self->state, __pyx_v_args, Py_EQ2)); if (unlikely(__pyx_t_1 < 0)__builtin_expect(!!(__pyx_t_1 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__4297; goto __pyx_L1_error;}
4298 __pyx_t_2 = (__pyx_t_1 != 0);
4299 if (__pyx_t_2) {
4300
4301 /* "cephfs.pyx":404
4302 * def require_state(self, *args):
4303 * if self.state in args:
4304 * return # <<<<<<<<<<<<<<
4305 * raise LibCephFSStateError("You cannot perform that operation on a "
4306 * "CephFS object in state %s." % (self.state))
4307 */
4308 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
4309 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
4310 goto __pyx_L0;
4311
4312 /* "cephfs.pyx":403
4313 *
4314 * def require_state(self, *args):
4315 * if self.state in args: # <<<<<<<<<<<<<<
4316 * return
4317 * raise LibCephFSStateError("You cannot perform that operation on a "
4318 */
4319 }
4320
4321 /* "cephfs.pyx":405
4322 * if self.state in args:
4323 * return
4324 * raise LibCephFSStateError("You cannot perform that operation on a " # <<<<<<<<<<<<<<
4325 * "CephFS object in state %s." % (self.state))
4326 *
4327 */
4328 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_LibCephFSStateError); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__4328; goto __pyx_L1_error;}
4329 __Pyx_GOTREF(__pyx_t_4);
4330
4331 /* "cephfs.pyx":406
4332 * return
4333 * raise LibCephFSStateError("You cannot perform that operation on a "
4334 * "CephFS object in state %s." % (self.state)) # <<<<<<<<<<<<<<
4335 *
4336 * def __cinit__(self, conf=None, conffile=None, auth_id=None, rados_inst=None):
4337 */
4338 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_You_cannot_perform_that_operatio, __pyx_v_self->state)PyString_Format(__pyx_kp_s_You_cannot_perform_that_operatio, __pyx_v_self
->state)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__4338; goto __pyx_L1_error;}
4339 __Pyx_GOTREF(__pyx_t_5);
4340 __pyx_t_6 = NULL((void*)0);
4341 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 0)
) {
4342 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
4343 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
4344 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
4345 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
4346 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
4347 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
4348 }
4349 }
4350 if (!__pyx_t_6) {
4351 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__4351; goto __pyx_L1_error;}
4352 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
4353 __Pyx_GOTREF(__pyx_t_3);
4354 } else {
4355 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__4355; goto __pyx_L1_error;}
4356 __Pyx_GOTREF(__pyx_t_7);
4357 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
4358 __Pyx_GIVEREF(__pyx_t_5);
4359 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_5);
4360 __pyx_t_5 = 0;
4361 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__4361; goto __pyx_L1_error;}
4362 __Pyx_GOTREF(__pyx_t_3);
4363 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
4364 }
4365 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
4366 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4367 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4368 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__4368; goto __pyx_L1_error;}
4369
4370 /* "cephfs.pyx":402
4371 * cdef ceph_mount_info *cluster
4372 *
4373 * def require_state(self, *args): # <<<<<<<<<<<<<<
4374 * if self.state in args:
4375 * return
4376 */
4377
4378 /* function exit code */
4379 __pyx_L1_error:;
4380 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
4381 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
4382 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
4383 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
4384 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
4385 __Pyx_AddTraceback("cephfs.LibCephFS.require_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
4386 __pyx_r = NULL((void*)0);
4387 __pyx_L0:;
4388 __Pyx_XGIVEREF(__pyx_r);
4389 __Pyx_RefNannyFinishContext();
4390 return __pyx_r;
4391}
4392
4393/* "cephfs.pyx":408
4394 * "CephFS object in state %s." % (self.state))
4395 *
4396 * def __cinit__(self, conf=None, conffile=None, auth_id=None, rados_inst=None): # <<<<<<<<<<<<<<
4397 * """Create a libcephfs wrapper
4398 *
4399 */
4400
4401/* Python wrapper */
4402static int __pyx_pw_6cephfs_9LibCephFS_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4403static int __pyx_pw_6cephfs_9LibCephFS_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4404 PyObject *__pyx_v_conf = 0;
4405 PyObject *__pyx_v_conffile = 0;
4406 PyObject *__pyx_v_auth_id = 0;
4407 PyObject *__pyx_v_rados_inst = 0;
4408 int __pyx_lineno = 0;
4409 const char *__pyx_filename = NULL((void*)0);
4410 int __pyx_clineno = 0;
4411 int __pyx_r;
4412 __Pyx_RefNannyDeclarations
4413 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
4414 {
4415 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conf,&__pyx_n_s_conffile,&__pyx_n_s_auth_id,&__pyx_n_s_rados_inst,0};
4416 PyObject* values[4] = {0,0,0,0};
4417 values[0] = ((PyObject *)Py_None(&_Py_NoneStruct));
4418 values[1] = ((PyObject *)Py_None(&_Py_NoneStruct));
4419 values[2] = ((PyObject *)Py_None(&_Py_NoneStruct));
4420 values[3] = ((PyObject *)Py_None(&_Py_NoneStruct));
4421 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
4422 Py_ssize_t kw_args;
4423 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
4424 switch (pos_args) {
4425 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
4426 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4427 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4428 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4429 case 0: break;
4430 default: goto __pyx_L5_argtuple_error;
4431 }
4432 kw_args = PyDict_Size(__pyx_kwds);
4433 switch (pos_args) {
4434 case 0:
4435 if (kw_args > 0) {
4436 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conf);
4437 if (value) { values[0] = value; kw_args--; }
4438 }
4439 case 1:
4440 if (kw_args > 0) {
4441 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conffile);
4442 if (value) { values[1] = value; kw_args--; }
4443 }
4444 case 2:
4445 if (kw_args > 0) {
4446 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_auth_id);
4447 if (value) { values[2] = value; kw_args--; }
4448 }
4449 case 3:
4450 if (kw_args > 0) {
4451 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rados_inst);
4452 if (value) { values[3] = value; kw_args--; }
4453 }
4454 }
4455 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
4456 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__cinit__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__4456; goto __pyx_L3_error;}
4457 }
4458 } else {
4459 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
4460 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
4461 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4462 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4463 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4464 case 0: break;
4465 default: goto __pyx_L5_argtuple_error;
4466 }
4467 }
4468 __pyx_v_conf = values[0];
4469 __pyx_v_conffile = values[1];
4470 __pyx_v_auth_id = values[2];
4471 __pyx_v_rados_inst = values[3];
4472 }
4473 goto __pyx_L4_argument_unpacking_done;
4474 __pyx_L5_argtuple_error:;
4475 __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__4475; goto __pyx_L3_error;}
4476 __pyx_L3_error:;
4477 __Pyx_AddTraceback("cephfs.LibCephFS.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4478 __Pyx_RefNannyFinishContext();
4479 return -1;
4480 __pyx_L4_argument_unpacking_done:;
4481 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_2__cinit__(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_conf, __pyx_v_conffile, __pyx_v_auth_id, __pyx_v_rados_inst);
4482
4483 /* function exit code */
4484 __Pyx_RefNannyFinishContext();
4485 return __pyx_r;
4486}
4487
4488static int __pyx_pf_6cephfs_9LibCephFS_2__cinit__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_conffile, PyObject *__pyx_v_auth_id, PyObject *__pyx_v_rados_inst) {
4489 int __pyx_r;
4490 __Pyx_RefNannyDeclarations
4491 int __pyx_t_1;
4492 int __pyx_t_2;
4493 int __pyx_t_3;
4494 PyObject *__pyx_t_4 = NULL((void*)0);
4495 PyObject *__pyx_t_5 = NULL((void*)0);
4496 PyObject *__pyx_t_6 = NULL((void*)0);
4497 PyObject *__pyx_t_7 = NULL((void*)0);
4498 Py_ssize_t __pyx_t_8;
4499 int __pyx_lineno = 0;
4500 const char *__pyx_filename = NULL((void*)0);
4501 int __pyx_clineno = 0;
4502 __Pyx_RefNannySetupContext("__cinit__", 0);
4503
4504 /* "cephfs.pyx":416
4505 * :rados_inst Rados opt: a rados.Rados instance
4506 * """
4507 * PyEval_InitThreads() # <<<<<<<<<<<<<<
4508 * self.state = "uninitialized"
4509 * if rados_inst is not None:
4510 */
4511 PyEval_InitThreads();
4512
4513 /* "cephfs.pyx":417
4514 * """
4515 * PyEval_InitThreads()
4516 * self.state = "uninitialized" # <<<<<<<<<<<<<<
4517 * if rados_inst is not None:
4518 * if auth_id is not None or conffile is not None or conf is not None:
4519 */
4520 __Pyx_INCREF(__pyx_n_s_uninitialized)( ((PyObject*)(__pyx_n_s_uninitialized))->ob_refcnt++);
4521 __Pyx_GIVEREF(__pyx_n_s_uninitialized);
4522 __Pyx_GOTREF(__pyx_v_self->state);
4523 __Pyx_DECREF(__pyx_v_self->state)do { if ( --((PyObject*)(__pyx_v_self->state))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
state)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->state)))); } while (0)
;
4524 __pyx_v_self->state = __pyx_n_s_uninitialized;
4525
4526 /* "cephfs.pyx":418
4527 * PyEval_InitThreads()
4528 * self.state = "uninitialized"
4529 * if rados_inst is not None: # <<<<<<<<<<<<<<
4530 * if auth_id is not None or conffile is not None or conf is not None:
4531 * raise make_ex(errno.EINVAL,
4532 */
4533 __pyx_t_1 = (__pyx_v_rados_inst != Py_None(&_Py_NoneStruct));
4534 __pyx_t_2 = (__pyx_t_1 != 0);
4535 if (__pyx_t_2) {
4536
4537 /* "cephfs.pyx":419
4538 * self.state = "uninitialized"
4539 * if rados_inst is not None:
4540 * if auth_id is not None or conffile is not None or conf is not None: # <<<<<<<<<<<<<<
4541 * raise make_ex(errno.EINVAL,
4542 * "May not pass RADOS instance as well as other configuration")
4543 */
4544 __pyx_t_1 = (__pyx_v_auth_id != Py_None(&_Py_NoneStruct));
4545 __pyx_t_3 = (__pyx_t_1 != 0);
4546 if (!__pyx_t_3) {
4547 } else {
4548 __pyx_t_2 = __pyx_t_3;
4549 goto __pyx_L5_bool_binop_done;
4550 }
4551 __pyx_t_3 = (__pyx_v_conffile != Py_None(&_Py_NoneStruct));
4552 __pyx_t_1 = (__pyx_t_3 != 0);
4553 if (!__pyx_t_1) {
4554 } else {
4555 __pyx_t_2 = __pyx_t_1;
4556 goto __pyx_L5_bool_binop_done;
4557 }
4558 __pyx_t_1 = (__pyx_v_conf != Py_None(&_Py_NoneStruct));
4559 __pyx_t_3 = (__pyx_t_1 != 0);
4560 __pyx_t_2 = __pyx_t_3;
4561 __pyx_L5_bool_binop_done:;
4562 if (__pyx_t_2) {
4563
4564 /* "cephfs.pyx":420
4565 * if rados_inst is not None:
4566 * if auth_id is not None or conffile is not None or conf is not None:
4567 * raise make_ex(errno.EINVAL, # <<<<<<<<<<<<<<
4568 * "May not pass RADOS instance as well as other configuration")
4569 *
4570 */
4571 __pyx_t_4 = __Pyx_PyInt_From_int(EINVAL22); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__4571; goto __pyx_L1_error;}
4572 __Pyx_GOTREF(__pyx_t_4);
4573 __pyx_t_5 = __pyx_f_6cephfs_make_ex(__pyx_t_4, __pyx_kp_s_May_not_pass_RADOS_instance_as_w); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__4573; goto __pyx_L1_error;}
4574 __Pyx_GOTREF(__pyx_t_5);
4575 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
4576 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
4577 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
4578 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__4578; goto __pyx_L1_error;}
4579
4580 /* "cephfs.pyx":419
4581 * self.state = "uninitialized"
4582 * if rados_inst is not None:
4583 * if auth_id is not None or conffile is not None or conf is not None: # <<<<<<<<<<<<<<
4584 * raise make_ex(errno.EINVAL,
4585 * "May not pass RADOS instance as well as other configuration")
4586 */
4587 }
4588
4589 /* "cephfs.pyx":423
4590 * "May not pass RADOS instance as well as other configuration")
4591 *
4592 * self.create_with_rados(rados_inst) # <<<<<<<<<<<<<<
4593 * else:
4594 * self.create(conf, conffile, auth_id)
4595 */
4596 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_with_rados); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__4596; goto __pyx_L1_error;}
4597 __Pyx_GOTREF(__pyx_t_4);
4598 __pyx_t_6 = NULL((void*)0);
4599 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 1)
) {
4600 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
4601 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
4602 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
4603 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
4604 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
4605 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
4606 }
4607 }
4608 if (!__pyx_t_6) {
4609 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_rados_inst); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__4609; goto __pyx_L1_error;}
4610 __Pyx_GOTREF(__pyx_t_5);
4611 } else {
4612 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__4612; goto __pyx_L1_error;}
4613 __Pyx_GOTREF(__pyx_t_7);
4614 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
4615 __Pyx_INCREF(__pyx_v_rados_inst)( ((PyObject*)(__pyx_v_rados_inst))->ob_refcnt++);
4616 __Pyx_GIVEREF(__pyx_v_rados_inst);
4617 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_rados_inst)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_v_rados_inst
)
;
4618 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__4618; goto __pyx_L1_error;}
4619 __Pyx_GOTREF(__pyx_t_5);
4620 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
4621 }
4622 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
4623 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
4624
4625 /* "cephfs.pyx":418
4626 * PyEval_InitThreads()
4627 * self.state = "uninitialized"
4628 * if rados_inst is not None: # <<<<<<<<<<<<<<
4629 * if auth_id is not None or conffile is not None or conf is not None:
4630 * raise make_ex(errno.EINVAL,
4631 */
4632 goto __pyx_L3;
4633 }
4634
4635 /* "cephfs.pyx":425
4636 * self.create_with_rados(rados_inst)
4637 * else:
4638 * self.create(conf, conffile, auth_id) # <<<<<<<<<<<<<<
4639 *
4640 * def create_with_rados(self, rados.Rados rados_inst):
4641 */
4642 /*else*/ {
4643 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__4643; goto __pyx_L1_error;}
4644 __Pyx_GOTREF(__pyx_t_4);
4645 __pyx_t_7 = NULL((void*)0);
4646 __pyx_t_8 = 0;
4647 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 1)
) {
4648 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
4649 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
4650 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
4651 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
4652 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
4653 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
4654 __pyx_t_8 = 1;
4655 }
4656 }
4657 __pyx_t_6 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__4657; goto __pyx_L1_error;}
4658 __Pyx_GOTREF(__pyx_t_6);
4659 if (__pyx_t_7) {
4660 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
4661 }
4662 __Pyx_INCREF(__pyx_v_conf)( ((PyObject*)(__pyx_v_conf))->ob_refcnt++);
4663 __Pyx_GIVEREF(__pyx_v_conf);
4664 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_conf)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_8] = __pyx_v_conf
)
;
4665 __Pyx_INCREF(__pyx_v_conffile)( ((PyObject*)(__pyx_v_conffile))->ob_refcnt++);
4666 __Pyx_GIVEREF(__pyx_v_conffile);
4667 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_conffile)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_8] = __pyx_v_conffile
)
;
4668 __Pyx_INCREF(__pyx_v_auth_id)( ((PyObject*)(__pyx_v_auth_id))->ob_refcnt++);
4669 __Pyx_GIVEREF(__pyx_v_auth_id);
4670 PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_v_auth_id)(((PyTupleObject *)(__pyx_t_6))->ob_item[2+__pyx_t_8] = __pyx_v_auth_id
)
;
4671 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__4671; goto __pyx_L1_error;}
4672 __Pyx_GOTREF(__pyx_t_5);
4673 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
4674 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
4675 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
4676 }
4677 __pyx_L3:;
4678
4679 /* "cephfs.pyx":408
4680 * "CephFS object in state %s." % (self.state))
4681 *
4682 * def __cinit__(self, conf=None, conffile=None, auth_id=None, rados_inst=None): # <<<<<<<<<<<<<<
4683 * """Create a libcephfs wrapper
4684 *
4685 */
4686
4687 /* function exit code */
4688 __pyx_r = 0;
4689 goto __pyx_L0;
4690 __pyx_L1_error:;
4691 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
4692 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
4693 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
4694 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
4695 __Pyx_AddTraceback("cephfs.LibCephFS.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4696 __pyx_r = -1;
4697 __pyx_L0:;
4698 __Pyx_RefNannyFinishContext();
4699 return __pyx_r;
4700}
4701
4702/* "cephfs.pyx":427
4703 * self.create(conf, conffile, auth_id)
4704 *
4705 * def create_with_rados(self, rados.Rados rados_inst): # <<<<<<<<<<<<<<
4706 * cdef int ret
4707 * with nogil:
4708 */
4709
4710/* Python wrapper */
4711static PyObject *__pyx_pw_6cephfs_9LibCephFS_5create_with_rados(PyObject *__pyx_v_self, PyObject *__pyx_v_rados_inst); /*proto*/
4712static PyObject *__pyx_pw_6cephfs_9LibCephFS_5create_with_rados(PyObject *__pyx_v_self, PyObject *__pyx_v_rados_inst) {
4713 CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_lineno = 0;
4714 CYTHON_UNUSED__attribute__ ((__unused__)) const char *__pyx_filename = NULL((void*)0);
4715 CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_clineno = 0;
4716 PyObject *__pyx_r = 0;
4717 __Pyx_RefNannyDeclarations
4718 __Pyx_RefNannySetupContext("create_with_rados (wrapper)", 0);
4719 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rados_inst), __pyx_ptype_5rados_Rados, 1, "rados_inst", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rados_inst
), __pyx_ptype_5rados_Rados, 1, "rados_inst", 0)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__4719; goto __pyx_L1_error;}
4720 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_4create_with_rados(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((struct __pyx_obj_5rados_Rados *)__pyx_v_rados_inst));
4721
4722 /* function exit code */
4723 goto __pyx_L0;
4724 __pyx_L1_error:;
4725 __pyx_r = NULL((void*)0);
4726 __pyx_L0:;
4727 __Pyx_RefNannyFinishContext();
4728 return __pyx_r;
4729}
4730
4731static PyObject *__pyx_pf_6cephfs_9LibCephFS_4create_with_rados(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, struct __pyx_obj_5rados_Rados *__pyx_v_rados_inst) {
4732 int __pyx_v_ret;
4733 PyObject *__pyx_r = NULL((void*)0);
4734 __Pyx_RefNannyDeclarations
4735 int __pyx_t_1;
4736 PyObject *__pyx_t_2 = NULL((void*)0);
4737 PyObject *__pyx_t_3 = NULL((void*)0);
4738 PyObject *__pyx_t_4 = NULL((void*)0);
4739 PyObject *__pyx_t_5 = NULL((void*)0);
4740 PyObject *__pyx_t_6 = NULL((void*)0);
4741 int __pyx_lineno = 0;
4742 const char *__pyx_filename = NULL((void*)0);
4743 int __pyx_clineno = 0;
4744 __Pyx_RefNannySetupContext("create_with_rados", 0);
4745
4746 /* "cephfs.pyx":429
4747 * def create_with_rados(self, rados.Rados rados_inst):
4748 * cdef int ret
4749 * with nogil: # <<<<<<<<<<<<<<
4750 * ret = ceph_create_from_rados(&self.cluster, rados_inst.cluster)
4751 * if ret != 0:
4752 */
4753 {
4754 #ifdef WITH_THREAD1
4755 PyThreadState *_save;
4756 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
4757 #endif
4758 /*try:*/ {
4759
4760 /* "cephfs.pyx":430
4761 * cdef int ret
4762 * with nogil:
4763 * ret = ceph_create_from_rados(&self.cluster, rados_inst.cluster) # <<<<<<<<<<<<<<
4764 * if ret != 0:
4765 * raise Error("libcephfs_initialize failed with error code: %d" % ret)
4766 */
4767 __pyx_v_ret = ceph_create_from_rados((&__pyx_v_self->cluster), __pyx_v_rados_inst->cluster);
4768 }
4769
4770 /* "cephfs.pyx":429
4771 * def create_with_rados(self, rados.Rados rados_inst):
4772 * cdef int ret
4773 * with nogil: # <<<<<<<<<<<<<<
4774 * ret = ceph_create_from_rados(&self.cluster, rados_inst.cluster)
4775 * if ret != 0:
4776 */
4777 /*finally:*/ {
4778 /*normal exit:*/{
4779 #ifdef WITH_THREAD1
4780 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
4781 #endif
4782 goto __pyx_L5;
4783 }
4784 __pyx_L5:;
4785 }
4786 }
4787
4788 /* "cephfs.pyx":431
4789 * with nogil:
4790 * ret = ceph_create_from_rados(&self.cluster, rados_inst.cluster)
4791 * if ret != 0: # <<<<<<<<<<<<<<
4792 * raise Error("libcephfs_initialize failed with error code: %d" % ret)
4793 * self.state = "configuring"
4794 */
4795 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
4796 if (__pyx_t_1) {
4797
4798 /* "cephfs.pyx":432
4799 * ret = ceph_create_from_rados(&self.cluster, rados_inst.cluster)
4800 * if ret != 0:
4801 * raise Error("libcephfs_initialize failed with error code: %d" % ret) # <<<<<<<<<<<<<<
4802 * self.state = "configuring"
4803 *
4804 */
4805 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__4805; goto __pyx_L1_error;}
4806 __Pyx_GOTREF(__pyx_t_3);
4807 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__4807; goto __pyx_L1_error;}
4808 __Pyx_GOTREF(__pyx_t_4);
4809 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_libcephfs_initialize_failed_with, __pyx_t_4)PyString_Format(__pyx_kp_s_libcephfs_initialize_failed_with, __pyx_t_4
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__4809; goto __pyx_L1_error;}
4810 __Pyx_GOTREF(__pyx_t_5);
4811 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
4812 __pyx_t_4 = NULL((void*)0);
4813 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
4814 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
4815 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
4816 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
4817 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
4818 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
4819 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
4820 }
4821 }
4822 if (!__pyx_t_4) {
4823 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__4823; goto __pyx_L1_error;}
4824 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
4825 __Pyx_GOTREF(__pyx_t_2);
4826 } else {
4827 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__4827; goto __pyx_L1_error;}
4828 __Pyx_GOTREF(__pyx_t_6);
4829 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
4830 __Pyx_GIVEREF(__pyx_t_5);
4831 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_t_5);
4832 __pyx_t_5 = 0;
4833 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__4833; goto __pyx_L1_error;}
4834 __Pyx_GOTREF(__pyx_t_2);
4835 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
4836 }
4837 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4838 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4839 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
4840 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__4840; goto __pyx_L1_error;}
4841
4842 /* "cephfs.pyx":431
4843 * with nogil:
4844 * ret = ceph_create_from_rados(&self.cluster, rados_inst.cluster)
4845 * if ret != 0: # <<<<<<<<<<<<<<
4846 * raise Error("libcephfs_initialize failed with error code: %d" % ret)
4847 * self.state = "configuring"
4848 */
4849 }
4850
4851 /* "cephfs.pyx":433
4852 * if ret != 0:
4853 * raise Error("libcephfs_initialize failed with error code: %d" % ret)
4854 * self.state = "configuring" # <<<<<<<<<<<<<<
4855 *
4856 * def create(self, conf=None, conffile=None, auth_id=None):
4857 */
4858 __Pyx_INCREF(__pyx_n_s_configuring)( ((PyObject*)(__pyx_n_s_configuring))->ob_refcnt++);
4859 __Pyx_GIVEREF(__pyx_n_s_configuring);
4860 __Pyx_GOTREF(__pyx_v_self->state);
4861 __Pyx_DECREF(__pyx_v_self->state)do { if ( --((PyObject*)(__pyx_v_self->state))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
state)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->state)))); } while (0)
;
4862 __pyx_v_self->state = __pyx_n_s_configuring;
4863
4864 /* "cephfs.pyx":427
4865 * self.create(conf, conffile, auth_id)
4866 *
4867 * def create_with_rados(self, rados.Rados rados_inst): # <<<<<<<<<<<<<<
4868 * cdef int ret
4869 * with nogil:
4870 */
4871
4872 /* function exit code */
4873 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
4874 goto __pyx_L0;
4875 __pyx_L1_error:;
4876 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
4877 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
4878 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
4879 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
4880 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
4881 __Pyx_AddTraceback("cephfs.LibCephFS.create_with_rados", __pyx_clineno, __pyx_lineno, __pyx_filename);
4882 __pyx_r = NULL((void*)0);
4883 __pyx_L0:;
4884 __Pyx_XGIVEREF(__pyx_r);
4885 __Pyx_RefNannyFinishContext();
4886 return __pyx_r;
4887}
4888
4889/* "cephfs.pyx":435
4890 * self.state = "configuring"
4891 *
4892 * def create(self, conf=None, conffile=None, auth_id=None): # <<<<<<<<<<<<<<
4893 * """
4894 * Create a mount handle for interacting with Ceph. All libcephfs
4895 */
4896
4897/* Python wrapper */
4898static PyObject *__pyx_pw_6cephfs_9LibCephFS_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4899static char __pyx_doc_6cephfs_9LibCephFS_6create[] = "\n Create a mount handle for interacting with Ceph. All libcephfs\n functions operate on a mount info handle.\n \n :param conf dict opt: settings overriding the default ones and conffile\n :param conffile str opt: the path to ceph.conf to override the default settings\n :auth_id str opt: the id used to authenticate the client entity\n ";
4900static PyObject *__pyx_pw_6cephfs_9LibCephFS_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4901 PyObject *__pyx_v_conf = 0;
4902 PyObject *__pyx_v_conffile = 0;
4903 PyObject *__pyx_v_auth_id = 0;
4904 int __pyx_lineno = 0;
4905 const char *__pyx_filename = NULL((void*)0);
4906 int __pyx_clineno = 0;
4907 PyObject *__pyx_r = 0;
4908 __Pyx_RefNannyDeclarations
4909 __Pyx_RefNannySetupContext("create (wrapper)", 0);
4910 {
4911 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conf,&__pyx_n_s_conffile,&__pyx_n_s_auth_id,0};
4912 PyObject* values[3] = {0,0,0};
4913 values[0] = ((PyObject *)Py_None(&_Py_NoneStruct));
4914 values[1] = ((PyObject *)Py_None(&_Py_NoneStruct));
4915 values[2] = ((PyObject *)Py_None(&_Py_NoneStruct));
4916 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
4917 Py_ssize_t kw_args;
4918 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
4919 switch (pos_args) {
4920 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4921 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4922 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4923 case 0: break;
4924 default: goto __pyx_L5_argtuple_error;
4925 }
4926 kw_args = PyDict_Size(__pyx_kwds);
4927 switch (pos_args) {
4928 case 0:
4929 if (kw_args > 0) {
4930 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conf);
4931 if (value) { values[0] = value; kw_args--; }
4932 }
4933 case 1:
4934 if (kw_args > 0) {
4935 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conffile);
4936 if (value) { values[1] = value; kw_args--; }
4937 }
4938 case 2:
4939 if (kw_args > 0) {
4940 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_auth_id);
4941 if (value) { values[2] = value; kw_args--; }
4942 }
4943 }
4944 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
4945 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "create") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__4945; goto __pyx_L3_error;}
4946 }
4947 } else {
4948 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
4949 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4950 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4951 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4952 case 0: break;
4953 default: goto __pyx_L5_argtuple_error;
4954 }
4955 }
4956 __pyx_v_conf = values[0];
4957 __pyx_v_conffile = values[1];
4958 __pyx_v_auth_id = values[2];
4959 }
4960 goto __pyx_L4_argument_unpacking_done;
4961 __pyx_L5_argtuple_error:;
4962 __Pyx_RaiseArgtupleInvalid("create", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__4962; goto __pyx_L3_error;}
4963 __pyx_L3_error:;
4964 __Pyx_AddTraceback("cephfs.LibCephFS.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
4965 __Pyx_RefNannyFinishContext();
4966 return NULL((void*)0);
4967 __pyx_L4_argument_unpacking_done:;
4968 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_6create(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_conf, __pyx_v_conffile, __pyx_v_auth_id);
4969
4970 /* function exit code */
4971 __Pyx_RefNannyFinishContext();
4972 return __pyx_r;
4973}
4974
4975static PyObject *__pyx_pf_6cephfs_9LibCephFS_6create(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_conffile, PyObject *__pyx_v_auth_id) {
4976 char *__pyx_v__auth_id;
4977 int __pyx_v_ret;
4978 PyObject *__pyx_v_key = NULL((void*)0);
4979 PyObject *__pyx_v_value = NULL((void*)0);
4980 PyObject *__pyx_r = NULL((void*)0);
4981 __Pyx_RefNannyDeclarations
4982 int __pyx_t_1;
4983 int __pyx_t_2;
4984 int __pyx_t_3;
4985 PyObject *__pyx_t_4 = NULL((void*)0);
4986 PyObject *__pyx_t_5 = NULL((void*)0);
4987 PyObject *__pyx_t_6 = NULL((void*)0);
4988 PyObject *__pyx_t_7 = NULL((void*)0);
4989 char *__pyx_t_8;
4990 PyObject *__pyx_t_9 = NULL((void*)0);
4991 Py_ssize_t __pyx_t_10;
4992 Py_ssize_t __pyx_t_11;
4993 int __pyx_t_12;
4994 int __pyx_t_13;
4995 Py_ssize_t __pyx_t_14;
4996 int __pyx_lineno = 0;
4997 const char *__pyx_filename = NULL((void*)0);
4998 int __pyx_clineno = 0;
4999 __Pyx_RefNannySetupContext("create", 0);
5000 __Pyx_INCREF(__pyx_v_conffile)( ((PyObject*)(__pyx_v_conffile))->ob_refcnt++);
5001 __Pyx_INCREF(__pyx_v_auth_id)( ((PyObject*)(__pyx_v_auth_id))->ob_refcnt++);
5002
5003 /* "cephfs.pyx":444
5004 * :auth_id str opt: the id used to authenticate the client entity
5005 * """
5006 * if conf is not None and not isinstance(conf, dict): # <<<<<<<<<<<<<<
5007 * raise TypeError("conf must be dict or None")
5008 * cstr(conffile, 'configfile', opt=True)
5009 */
5010 __pyx_t_2 = (__pyx_v_conf != Py_None(&_Py_NoneStruct));
5011 __pyx_t_3 = (__pyx_t_2 != 0);
5012 if (__pyx_t_3) {
5013 } else {
5014 __pyx_t_1 = __pyx_t_3;
5015 goto __pyx_L4_bool_binop_done;
5016 }
5017 __pyx_t_3 = PyDict_Check(__pyx_v_conf)((((((PyObject*)(__pyx_v_conf))->ob_type))->tp_flags &
((1L<<29))) != 0)
;
5018 __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0);
5019 __pyx_t_1 = __pyx_t_2;
5020 __pyx_L4_bool_binop_done:;
5021 if (__pyx_t_1) {
5022
5023 /* "cephfs.pyx":445
5024 * """
5025 * if conf is not None and not isinstance(conf, dict):
5026 * raise TypeError("conf must be dict or None") # <<<<<<<<<<<<<<
5027 * cstr(conffile, 'configfile', opt=True)
5028 * auth_id = cstr(auth_id, 'auth_id', opt=True)
5029 */
5030 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__5030; goto __pyx_L1_error;}
5031 __Pyx_GOTREF(__pyx_t_4);
5032 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
5033 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
5034 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__5034; goto __pyx_L1_error;}
5035
5036 /* "cephfs.pyx":444
5037 * :auth_id str opt: the id used to authenticate the client entity
5038 * """
5039 * if conf is not None and not isinstance(conf, dict): # <<<<<<<<<<<<<<
5040 * raise TypeError("conf must be dict or None")
5041 * cstr(conffile, 'configfile', opt=True)
5042 */
5043 }
5044
5045 /* "cephfs.pyx":446
5046 * if conf is not None and not isinstance(conf, dict):
5047 * raise TypeError("conf must be dict or None")
5048 * cstr(conffile, 'configfile', opt=True) # <<<<<<<<<<<<<<
5049 * auth_id = cstr(auth_id, 'auth_id', opt=True)
5050 *
5051 */
5052 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__5052; goto __pyx_L1_error;}
5053 __Pyx_GOTREF(__pyx_t_4);
5054 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__5054; goto __pyx_L1_error;}
5055 __Pyx_GOTREF(__pyx_t_5);
5056 __Pyx_INCREF(__pyx_v_conffile)( ((PyObject*)(__pyx_v_conffile))->ob_refcnt++);
5057 __Pyx_GIVEREF(__pyx_v_conffile);
5058 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_conffile)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_v_conffile
)
;
5059 __Pyx_INCREF(__pyx_n_s_configfile)( ((PyObject*)(__pyx_n_s_configfile))->ob_refcnt++);
5060 __Pyx_GIVEREF(__pyx_n_s_configfile);
5061 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_configfile)(((PyTupleObject *)(__pyx_t_5))->ob_item[1] = __pyx_n_s_configfile
)
;
5062 __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__5062; goto __pyx_L1_error;}
5063 __Pyx_GOTREF(__pyx_t_6);
5064 if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__5064; goto __pyx_L1_error;}
5065 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__5065; goto __pyx_L1_error;}
5066 __Pyx_GOTREF(__pyx_t_7);
5067 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
5068 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
5069 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
5070 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
5071
5072 /* "cephfs.pyx":447
5073 * raise TypeError("conf must be dict or None")
5074 * cstr(conffile, 'configfile', opt=True)
5075 * auth_id = cstr(auth_id, 'auth_id', opt=True) # <<<<<<<<<<<<<<
5076 *
5077 * cdef:
5078 */
5079 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__5079; goto __pyx_L1_error;}
5080 __Pyx_GOTREF(__pyx_t_7);
5081 __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__5081; goto __pyx_L1_error;}
5082 __Pyx_GOTREF(__pyx_t_6);
5083 __Pyx_INCREF(__pyx_v_auth_id)( ((PyObject*)(__pyx_v_auth_id))->ob_refcnt++);
5084 __Pyx_GIVEREF(__pyx_v_auth_id);
5085 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_auth_id)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_v_auth_id
)
;
5086 __Pyx_INCREF(__pyx_n_s_auth_id)( ((PyObject*)(__pyx_n_s_auth_id))->ob_refcnt++);
5087 __Pyx_GIVEREF(__pyx_n_s_auth_id);
5088 PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_auth_id)(((PyTupleObject *)(__pyx_t_6))->ob_item[1] = __pyx_n_s_auth_id
)
;
5089 __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__5089; goto __pyx_L1_error;}
5090 __Pyx_GOTREF(__pyx_t_5);
5091 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__5091; goto __pyx_L1_error;}
5092 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__5092; goto __pyx_L1_error;}
5093 __Pyx_GOTREF(__pyx_t_4);
5094 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
5095 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
5096 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
5097 __Pyx_DECREF_SET(__pyx_v_auth_id, __pyx_t_4)do { PyObject *tmp = (PyObject *) __pyx_v_auth_id; __pyx_v_auth_id
= __pyx_t_4; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
5098 __pyx_t_4 = 0;
5099
5100 /* "cephfs.pyx":450
5101 *
5102 * cdef:
5103 * char* _auth_id = opt_str(auth_id) # <<<<<<<<<<<<<<
5104 * int ret
5105 *
5106 */
5107 __pyx_t_8 = __pyx_f_6cephfs_opt_str(__pyx_v_auth_id); if (unlikely(__pyx_t_8 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_8 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__5107; goto __pyx_L1_error;}
5108 __pyx_v__auth_id = __pyx_t_8;
5109
5110 /* "cephfs.pyx":453
5111 * int ret
5112 *
5113 * with nogil: # <<<<<<<<<<<<<<
5114 * ret = ceph_create(&self.cluster, <const char*>_auth_id)
5115 * if ret != 0:
5116 */
5117 {
5118 #ifdef WITH_THREAD1
5119 PyThreadState *_save;
5120 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
5121 #endif
5122 /*try:*/ {
5123
5124 /* "cephfs.pyx":454
5125 *
5126 * with nogil:
5127 * ret = ceph_create(&self.cluster, <const char*>_auth_id) # <<<<<<<<<<<<<<
5128 * if ret != 0:
5129 * raise Error("libcephfs_initialize failed with error code: %d" % ret)
5130 */
5131 __pyx_v_ret = ceph_create((&__pyx_v_self->cluster), ((char const *)__pyx_v__auth_id));
5132 }
5133
5134 /* "cephfs.pyx":453
5135 * int ret
5136 *
5137 * with nogil: # <<<<<<<<<<<<<<
5138 * ret = ceph_create(&self.cluster, <const char*>_auth_id)
5139 * if ret != 0:
5140 */
5141 /*finally:*/ {
5142 /*normal exit:*/{
5143 #ifdef WITH_THREAD1
5144 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
5145 #endif
5146 goto __pyx_L8;
5147 }
5148 __pyx_L8:;
5149 }
5150 }
5151
5152 /* "cephfs.pyx":455
5153 * with nogil:
5154 * ret = ceph_create(&self.cluster, <const char*>_auth_id)
5155 * if ret != 0: # <<<<<<<<<<<<<<
5156 * raise Error("libcephfs_initialize failed with error code: %d" % ret)
5157 *
5158 */
5159 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
5160 if (__pyx_t_1) {
5161
5162 /* "cephfs.pyx":456
5163 * ret = ceph_create(&self.cluster, <const char*>_auth_id)
5164 * if ret != 0:
5165 * raise Error("libcephfs_initialize failed with error code: %d" % ret) # <<<<<<<<<<<<<<
5166 *
5167 * self.state = "configuring"
5168 */
5169 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__5169; goto __pyx_L1_error;}
5170 __Pyx_GOTREF(__pyx_t_5);
5171 __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__5171; goto __pyx_L1_error;}
5172 __Pyx_GOTREF(__pyx_t_6);
5173 __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_libcephfs_initialize_failed_with, __pyx_t_6)PyString_Format(__pyx_kp_s_libcephfs_initialize_failed_with, __pyx_t_6
)
; if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__5173; goto __pyx_L1_error;}
5174 __Pyx_GOTREF(__pyx_t_7);
5175 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
5176 __pyx_t_6 = NULL((void*)0);
5177 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
5178 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
5179 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
5180 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
5181 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
5182 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
5183 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
5184 }
5185 }
5186 if (!__pyx_t_6) {
5187 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__5187; goto __pyx_L1_error;}
5188 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
5189 __Pyx_GOTREF(__pyx_t_4);
5190 } else {
5191 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__5191; goto __pyx_L1_error;}
5192 __Pyx_GOTREF(__pyx_t_9);
5193 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
5194 __Pyx_GIVEREF(__pyx_t_7);
5195 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_7);
5196 __pyx_t_7 = 0;
5197 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__5197; goto __pyx_L1_error;}
5198 __Pyx_GOTREF(__pyx_t_4);
5199 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
5200 }
5201 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
5202 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
5203 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
5204 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__5204; goto __pyx_L1_error;}
5205
5206 /* "cephfs.pyx":455
5207 * with nogil:
5208 * ret = ceph_create(&self.cluster, <const char*>_auth_id)
5209 * if ret != 0: # <<<<<<<<<<<<<<
5210 * raise Error("libcephfs_initialize failed with error code: %d" % ret)
5211 *
5212 */
5213 }
5214
5215 /* "cephfs.pyx":458
5216 * raise Error("libcephfs_initialize failed with error code: %d" % ret)
5217 *
5218 * self.state = "configuring" # <<<<<<<<<<<<<<
5219 * if conffile is not None:
5220 * # read the default conf file when '' is given
5221 */
5222 __Pyx_INCREF(__pyx_n_s_configuring)( ((PyObject*)(__pyx_n_s_configuring))->ob_refcnt++);
5223 __Pyx_GIVEREF(__pyx_n_s_configuring);
5224 __Pyx_GOTREF(__pyx_v_self->state);
5225 __Pyx_DECREF(__pyx_v_self->state)do { if ( --((PyObject*)(__pyx_v_self->state))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
state)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->state)))); } while (0)
;
5226 __pyx_v_self->state = __pyx_n_s_configuring;
5227
5228 /* "cephfs.pyx":459
5229 *
5230 * self.state = "configuring"
5231 * if conffile is not None: # <<<<<<<<<<<<<<
5232 * # read the default conf file when '' is given
5233 * if conffile == '':
5234 */
5235 __pyx_t_1 = (__pyx_v_conffile != Py_None(&_Py_NoneStruct));
5236 __pyx_t_2 = (__pyx_t_1 != 0);
5237 if (__pyx_t_2) {
5238
5239 /* "cephfs.pyx":461
5240 * if conffile is not None:
5241 * # read the default conf file when '' is given
5242 * if conffile == '': # <<<<<<<<<<<<<<
5243 * conffile = None
5244 * self.conf_read_file(conffile)
5245 */
5246 __pyx_t_2 = (__Pyx_PyString_Equals__Pyx_PyBytes_Equals(__pyx_v_conffile, __pyx_kp_s__7, Py_EQ2)); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__5246; goto __pyx_L1_error;}
5247 if (__pyx_t_2) {
5248
5249 /* "cephfs.pyx":462
5250 * # read the default conf file when '' is given
5251 * if conffile == '':
5252 * conffile = None # <<<<<<<<<<<<<<
5253 * self.conf_read_file(conffile)
5254 * if conf is not None:
5255 */
5256 __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
5257 __Pyx_DECREF_SET(__pyx_v_conffile, Py_None)do { PyObject *tmp = (PyObject *) __pyx_v_conffile; __pyx_v_conffile
= (&_Py_NoneStruct); do { if ( --((PyObject*)(tmp))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); }
while (0); } while (0)
;
5258
5259 /* "cephfs.pyx":461
5260 * if conffile is not None:
5261 * # read the default conf file when '' is given
5262 * if conffile == '': # <<<<<<<<<<<<<<
5263 * conffile = None
5264 * self.conf_read_file(conffile)
5265 */
5266 }
5267
5268 /* "cephfs.pyx":463
5269 * if conffile == '':
5270 * conffile = None
5271 * self.conf_read_file(conffile) # <<<<<<<<<<<<<<
5272 * if conf is not None:
5273 * for key, value in conf.iteritems():
5274 */
5275 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_conf_read_file); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__5275; goto __pyx_L1_error;}
5276 __Pyx_GOTREF(__pyx_t_5);
5277 __pyx_t_9 = NULL((void*)0);
5278 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
5279 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
5280 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
5281 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
5282 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
5283 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
5284 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
5285 }
5286 }
5287 if (!__pyx_t_9) {
5288 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_conffile); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__5288; goto __pyx_L1_error;}
5289 __Pyx_GOTREF(__pyx_t_4);
5290 } else {
5291 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__5291; goto __pyx_L1_error;}
5292 __Pyx_GOTREF(__pyx_t_7);
5293 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
5294 __Pyx_INCREF(__pyx_v_conffile)( ((PyObject*)(__pyx_v_conffile))->ob_refcnt++);
5295 __Pyx_GIVEREF(__pyx_v_conffile);
5296 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_conffile)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_v_conffile
)
;
5297 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__5297; goto __pyx_L1_error;}
5298 __Pyx_GOTREF(__pyx_t_4);
5299 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
5300 }
5301 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
5302 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
5303
5304 /* "cephfs.pyx":459
5305 *
5306 * self.state = "configuring"
5307 * if conffile is not None: # <<<<<<<<<<<<<<
5308 * # read the default conf file when '' is given
5309 * if conffile == '':
5310 */
5311 }
5312
5313 /* "cephfs.pyx":464
5314 * conffile = None
5315 * self.conf_read_file(conffile)
5316 * if conf is not None: # <<<<<<<<<<<<<<
5317 * for key, value in conf.iteritems():
5318 * self.conf_set(key, value)
5319 */
5320 __pyx_t_2 = (__pyx_v_conf != Py_None(&_Py_NoneStruct));
5321 __pyx_t_1 = (__pyx_t_2 != 0);
5322 if (__pyx_t_1) {
5323
5324 /* "cephfs.pyx":465
5325 * self.conf_read_file(conffile)
5326 * if conf is not None:
5327 * for key, value in conf.iteritems(): # <<<<<<<<<<<<<<
5328 * self.conf_set(key, value)
5329 *
5330 */
5331 __pyx_t_10 = 0;
5332 if (unlikely(__pyx_v_conf == Py_None)__builtin_expect(!!(__pyx_v_conf == (&_Py_NoneStruct)), 0
)
) {
5333 PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
5334 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__5334; goto __pyx_L1_error;}
5335 }
5336 __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_conf, 0, __pyx_n_s_iteritems, (&__pyx_t_11), (&__pyx_t_12)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__5336; goto __pyx_L1_error;}
5337 __Pyx_GOTREF(__pyx_t_5);
5338 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
5339 __pyx_t_4 = __pyx_t_5;
5340 __pyx_t_5 = 0;
5341 while (1) {
5342 __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_11, &__pyx_t_10, &__pyx_t_5, &__pyx_t_7, NULL((void*)0), __pyx_t_12);
5343 if (unlikely(__pyx_t_13 == 0)__builtin_expect(!!(__pyx_t_13 == 0), 0)) break;
5344 if (unlikely(__pyx_t_13 == -1)__builtin_expect(!!(__pyx_t_13 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__5344; goto __pyx_L1_error;}
5345 __Pyx_GOTREF(__pyx_t_5);
5346 __Pyx_GOTREF(__pyx_t_7);
5347 __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_v_key; __pyx_v_key = __pyx_t_5
; do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0); } while (0)
;
5348 __pyx_t_5 = 0;
5349 __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7)do { PyObject *tmp = (PyObject *) __pyx_v_value; __pyx_v_value
= __pyx_t_7; do { if ((tmp) == ((void*)0)) ; else do { if ( --
((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp)))); } while (0); } while (0); } while (
0)
;
5350 __pyx_t_7 = 0;
5351
5352 /* "cephfs.pyx":466
5353 * if conf is not None:
5354 * for key, value in conf.iteritems():
5355 * self.conf_set(key, value) # <<<<<<<<<<<<<<
5356 *
5357 * def conf_read_file(self, conffile=None):
5358 */
5359 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_conf_set); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__5359; goto __pyx_L1_error;}
5360 __Pyx_GOTREF(__pyx_t_5);
5361 __pyx_t_9 = NULL((void*)0);
5362 __pyx_t_14 = 0;
5363 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
5364 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
5365 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
5366 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
5367 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
5368 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
5369 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
5370 __pyx_t_14 = 1;
5371 }
5372 }
5373 __pyx_t_6 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__5373; goto __pyx_L1_error;}
5374 __Pyx_GOTREF(__pyx_t_6);
5375 if (__pyx_t_9) {
5376 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
5377 }
5378 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
5379 __Pyx_GIVEREF(__pyx_v_key);
5380 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_v_key)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_14] = __pyx_v_key
)
;
5381 __Pyx_INCREF(__pyx_v_value)( ((PyObject*)(__pyx_v_value))->ob_refcnt++);
5382 __Pyx_GIVEREF(__pyx_v_value);
5383 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_v_value)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_14] = __pyx_v_value
)
;
5384 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__5384; goto __pyx_L1_error;}
5385 __Pyx_GOTREF(__pyx_t_7);
5386 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
5387 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
5388 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
5389 }
5390 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
5391
5392 /* "cephfs.pyx":464
5393 * conffile = None
5394 * self.conf_read_file(conffile)
5395 * if conf is not None: # <<<<<<<<<<<<<<
5396 * for key, value in conf.iteritems():
5397 * self.conf_set(key, value)
5398 */
5399 }
5400
5401 /* "cephfs.pyx":435
5402 * self.state = "configuring"
5403 *
5404 * def create(self, conf=None, conffile=None, auth_id=None): # <<<<<<<<<<<<<<
5405 * """
5406 * Create a mount handle for interacting with Ceph. All libcephfs
5407 */
5408
5409 /* function exit code */
5410 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
5411 goto __pyx_L0;
5412 __pyx_L1_error:;
5413 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
5414 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
5415 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
5416 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
5417 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
5418 __Pyx_AddTraceback("cephfs.LibCephFS.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
5419 __pyx_r = NULL((void*)0);
5420 __pyx_L0:;
5421 __Pyx_XDECREF(__pyx_v_key)do { if ((__pyx_v_key) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_key))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_key)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_key)))); } while (0); } while (0)
;
5422 __Pyx_XDECREF(__pyx_v_value)do { if ((__pyx_v_value) == ((void*)0)) ; else do { if ( --((
PyObject*)(__pyx_v_value))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(__pyx_v_value)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(__pyx_v_value)))); } while (0); }
while (0)
;
5423 __Pyx_XDECREF(__pyx_v_conffile)do { if ((__pyx_v_conffile) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_conffile))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_conffile)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_conffile)))); }
while (0); } while (0)
;
5424 __Pyx_XDECREF(__pyx_v_auth_id)do { if ((__pyx_v_auth_id) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_auth_id))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_auth_id)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_auth_id)))); } while
(0); } while (0)
;
5425 __Pyx_XGIVEREF(__pyx_r);
5426 __Pyx_RefNannyFinishContext();
5427 return __pyx_r;
5428}
5429
5430/* "cephfs.pyx":468
5431 * self.conf_set(key, value)
5432 *
5433 * def conf_read_file(self, conffile=None): # <<<<<<<<<<<<<<
5434 * """
5435 * Load the ceph configuration from the specified config file.
5436 */
5437
5438/* Python wrapper */
5439static PyObject *__pyx_pw_6cephfs_9LibCephFS_9conf_read_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5440static char __pyx_doc_6cephfs_9LibCephFS_8conf_read_file[] = "\n Load the ceph configuration from the specified config file.\n \n :param conffile str opt: the path to ceph.conf to override the default settings\n ";
5441static PyObject *__pyx_pw_6cephfs_9LibCephFS_9conf_read_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5442 PyObject *__pyx_v_conffile = 0;
5443 int __pyx_lineno = 0;
5444 const char *__pyx_filename = NULL((void*)0);
5445 int __pyx_clineno = 0;
5446 PyObject *__pyx_r = 0;
5447 __Pyx_RefNannyDeclarations
5448 __Pyx_RefNannySetupContext("conf_read_file (wrapper)", 0);
5449 {
5450 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conffile,0};
5451 PyObject* values[1] = {0};
5452 values[0] = ((PyObject *)Py_None(&_Py_NoneStruct));
5453 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
5454 Py_ssize_t kw_args;
5455 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
5456 switch (pos_args) {
5457 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5458 case 0: break;
5459 default: goto __pyx_L5_argtuple_error;
5460 }
5461 kw_args = PyDict_Size(__pyx_kwds);
5462 switch (pos_args) {
5463 case 0:
5464 if (kw_args > 0) {
5465 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conffile);
5466 if (value) { values[0] = value; kw_args--; }
5467 }
5468 }
5469 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
5470 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conf_read_file") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "conf_read_file") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__5470; goto __pyx_L3_error;}
5471 }
5472 } else {
5473 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
5474 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5475 case 0: break;
5476 default: goto __pyx_L5_argtuple_error;
5477 }
5478 }
5479 __pyx_v_conffile = values[0];
5480 }
5481 goto __pyx_L4_argument_unpacking_done;
5482 __pyx_L5_argtuple_error:;
5483 __Pyx_RaiseArgtupleInvalid("conf_read_file", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__5483; goto __pyx_L3_error;}
5484 __pyx_L3_error:;
5485 __Pyx_AddTraceback("cephfs.LibCephFS.conf_read_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
5486 __Pyx_RefNannyFinishContext();
5487 return NULL((void*)0);
5488 __pyx_L4_argument_unpacking_done:;
5489 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_8conf_read_file(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_conffile);
5490
5491 /* function exit code */
5492 __Pyx_RefNannyFinishContext();
5493 return __pyx_r;
5494}
5495
5496static PyObject *__pyx_pf_6cephfs_9LibCephFS_8conf_read_file(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_conffile) {
5497 char *__pyx_v__conffile;
5498 int __pyx_v_ret;
5499 PyObject *__pyx_r = NULL((void*)0);
5500 __Pyx_RefNannyDeclarations
5501 PyObject *__pyx_t_1 = NULL((void*)0);
5502 PyObject *__pyx_t_2 = NULL((void*)0);
5503 PyObject *__pyx_t_3 = NULL((void*)0);
5504 PyObject *__pyx_t_4 = NULL((void*)0);
5505 char *__pyx_t_5;
5506 int __pyx_t_6;
5507 int __pyx_lineno = 0;
5508 const char *__pyx_filename = NULL((void*)0);
5509 int __pyx_clineno = 0;
5510 __Pyx_RefNannySetupContext("conf_read_file", 0);
5511 __Pyx_INCREF(__pyx_v_conffile)( ((PyObject*)(__pyx_v_conffile))->ob_refcnt++);
5512
5513 /* "cephfs.pyx":474
5514 * :param conffile str opt: the path to ceph.conf to override the default settings
5515 * """
5516 * conffile = cstr(conffile, 'conffile', opt=True) # <<<<<<<<<<<<<<
5517 * cdef:
5518 * char *_conffile = opt_str(conffile)
5519 */
5520 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__5520; goto __pyx_L1_error;}
5521 __Pyx_GOTREF(__pyx_t_1);
5522 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__5522; goto __pyx_L1_error;}
5523 __Pyx_GOTREF(__pyx_t_2);
5524 __Pyx_INCREF(__pyx_v_conffile)( ((PyObject*)(__pyx_v_conffile))->ob_refcnt++);
5525 __Pyx_GIVEREF(__pyx_v_conffile);
5526 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_conffile)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_conffile
)
;
5527 __Pyx_INCREF(__pyx_n_s_conffile)( ((PyObject*)(__pyx_n_s_conffile))->ob_refcnt++);
5528 __Pyx_GIVEREF(__pyx_n_s_conffile);
5529 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_conffile)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_n_s_conffile
)
;
5530 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__5530; goto __pyx_L1_error;}
5531 __Pyx_GOTREF(__pyx_t_3);
5532 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__5532; goto __pyx_L1_error;}
5533 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__5533; goto __pyx_L1_error;}
5534 __Pyx_GOTREF(__pyx_t_4);
5535 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
5536 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
5537 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5538 __Pyx_DECREF_SET(__pyx_v_conffile, __pyx_t_4)do { PyObject *tmp = (PyObject *) __pyx_v_conffile; __pyx_v_conffile
= __pyx_t_4; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
5539 __pyx_t_4 = 0;
5540
5541 /* "cephfs.pyx":476
5542 * conffile = cstr(conffile, 'conffile', opt=True)
5543 * cdef:
5544 * char *_conffile = opt_str(conffile) # <<<<<<<<<<<<<<
5545 * with nogil:
5546 * ret = ceph_conf_read_file(self.cluster, <const char*>_conffile)
5547 */
5548 __pyx_t_5 = __pyx_f_6cephfs_opt_str(__pyx_v_conffile); if (unlikely(__pyx_t_5 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_5 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__5548; goto __pyx_L1_error;}
5549 __pyx_v__conffile = __pyx_t_5;
5550
5551 /* "cephfs.pyx":477
5552 * cdef:
5553 * char *_conffile = opt_str(conffile)
5554 * with nogil: # <<<<<<<<<<<<<<
5555 * ret = ceph_conf_read_file(self.cluster, <const char*>_conffile)
5556 * if ret != 0:
5557 */
5558 {
5559 #ifdef WITH_THREAD1
5560 PyThreadState *_save;
5561 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
5562 #endif
5563 /*try:*/ {
5564
5565 /* "cephfs.pyx":478
5566 * char *_conffile = opt_str(conffile)
5567 * with nogil:
5568 * ret = ceph_conf_read_file(self.cluster, <const char*>_conffile) # <<<<<<<<<<<<<<
5569 * if ret != 0:
5570 * raise make_ex(ret, "error calling conf_read_file")
5571 */
5572 __pyx_v_ret = ceph_conf_read_file(__pyx_v_self->cluster, ((char const *)__pyx_v__conffile));
5573 }
5574
5575 /* "cephfs.pyx":477
5576 * cdef:
5577 * char *_conffile = opt_str(conffile)
5578 * with nogil: # <<<<<<<<<<<<<<
5579 * ret = ceph_conf_read_file(self.cluster, <const char*>_conffile)
5580 * if ret != 0:
5581 */
5582 /*finally:*/ {
5583 /*normal exit:*/{
5584 #ifdef WITH_THREAD1
5585 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
5586 #endif
5587 goto __pyx_L5;
5588 }
5589 __pyx_L5:;
5590 }
5591 }
5592
5593 /* "cephfs.pyx":479
5594 * with nogil:
5595 * ret = ceph_conf_read_file(self.cluster, <const char*>_conffile)
5596 * if ret != 0: # <<<<<<<<<<<<<<
5597 * raise make_ex(ret, "error calling conf_read_file")
5598 *
5599 */
5600 __pyx_t_6 = ((__pyx_v_ret != 0) != 0);
5601 if (__pyx_t_6) {
5602
5603 /* "cephfs.pyx":480
5604 * ret = ceph_conf_read_file(self.cluster, <const char*>_conffile)
5605 * if ret != 0:
5606 * raise make_ex(ret, "error calling conf_read_file") # <<<<<<<<<<<<<<
5607 *
5608 * def conf_parse_argv(self, argv):
5609 */
5610 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__5610; goto __pyx_L1_error;}
5611 __Pyx_GOTREF(__pyx_t_4);
5612 __pyx_t_3 = __pyx_f_6cephfs_make_ex(__pyx_t_4, __pyx_kp_s_error_calling_conf_read_file); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__5612; goto __pyx_L1_error;}
5613 __Pyx_GOTREF(__pyx_t_3);
5614 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
5615 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5616 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5617 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__5617; goto __pyx_L1_error;}
5618
5619 /* "cephfs.pyx":479
5620 * with nogil:
5621 * ret = ceph_conf_read_file(self.cluster, <const char*>_conffile)
5622 * if ret != 0: # <<<<<<<<<<<<<<
5623 * raise make_ex(ret, "error calling conf_read_file")
5624 *
5625 */
5626 }
5627
5628 /* "cephfs.pyx":468
5629 * self.conf_set(key, value)
5630 *
5631 * def conf_read_file(self, conffile=None): # <<<<<<<<<<<<<<
5632 * """
5633 * Load the ceph configuration from the specified config file.
5634 */
5635
5636 /* function exit code */
5637 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
5638 goto __pyx_L0;
5639 __pyx_L1_error:;
5640 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
5641 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
5642 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
5643 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
5644 __Pyx_AddTraceback("cephfs.LibCephFS.conf_read_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
5645 __pyx_r = NULL((void*)0);
5646 __pyx_L0:;
5647 __Pyx_XDECREF(__pyx_v_conffile)do { if ((__pyx_v_conffile) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_conffile))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_conffile)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_conffile)))); }
while (0); } while (0)
;
5648 __Pyx_XGIVEREF(__pyx_r);
5649 __Pyx_RefNannyFinishContext();
5650 return __pyx_r;
5651}
5652
5653/* "cephfs.pyx":482
5654 * raise make_ex(ret, "error calling conf_read_file")
5655 *
5656 * def conf_parse_argv(self, argv): # <<<<<<<<<<<<<<
5657 * """
5658 * Parse the command line arguments and load the configuration parameters.
5659 */
5660
5661/* Python wrapper */
5662static PyObject *__pyx_pw_6cephfs_9LibCephFS_11conf_parse_argv(PyObject *__pyx_v_self, PyObject *__pyx_v_argv); /*proto*/
5663static char __pyx_doc_6cephfs_9LibCephFS_10conf_parse_argv[] = "\n Parse the command line arguments and load the configuration parameters.\n \n :param argv: the argument list\n ";
5664static PyObject *__pyx_pw_6cephfs_9LibCephFS_11conf_parse_argv(PyObject *__pyx_v_self, PyObject *__pyx_v_argv) {
5665 PyObject *__pyx_r = 0;
5666 __Pyx_RefNannyDeclarations
5667 __Pyx_RefNannySetupContext("conf_parse_argv (wrapper)", 0);
5668 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_10conf_parse_argv(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_argv));
5669
5670 /* function exit code */
5671 __Pyx_RefNannyFinishContext();
5672 return __pyx_r;
5673}
5674
5675static PyObject *__pyx_pf_6cephfs_9LibCephFS_10conf_parse_argv(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_argv) {
5676 PyObject *__pyx_v_cargv = NULL((void*)0);
5677 int __pyx_v__argc;
5678 char **__pyx_v__argv;
5679 int __pyx_v_ret;
5680 PyObject *__pyx_r = NULL((void*)0);
5681 __Pyx_RefNannyDeclarations
5682 PyObject *__pyx_t_1 = NULL((void*)0);
5683 PyObject *__pyx_t_2 = NULL((void*)0);
5684 PyObject *__pyx_t_3 = NULL((void*)0);
5685 Py_ssize_t __pyx_t_4;
5686 PyObject *__pyx_t_5 = NULL((void*)0);
5687 int __pyx_t_6;
5688 int __pyx_t_7;
5689 int __pyx_t_8;
5690 char const *__pyx_t_9;
5691 PyObject *__pyx_t_10 = NULL((void*)0);
5692 PyObject *__pyx_t_11 = NULL((void*)0);
5693 PyObject *__pyx_t_12 = NULL((void*)0);
5694 PyObject *__pyx_t_13 = NULL((void*)0);
5695 PyObject *__pyx_t_14 = NULL((void*)0);
5696 PyObject *__pyx_t_15 = NULL((void*)0);
5697 int __pyx_lineno = 0;
5698 const char *__pyx_filename = NULL((void*)0);
5699 int __pyx_clineno = 0;
5700 __Pyx_RefNannySetupContext("conf_parse_argv", 0);
5701
5702 /* "cephfs.pyx":488
5703 * :param argv: the argument list
5704 * """
5705 * self.require_state("configuring") # <<<<<<<<<<<<<<
5706 * cargv = cstr_list(argv, 'argv')
5707 * cdef:
5708 */
5709 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__5709; goto __pyx_L1_error;}
1
Taking false branch
5710 __Pyx_GOTREF(__pyx_t_1);
5711 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__5711; goto __pyx_L1_error;}
2
Taking false branch
5712 __Pyx_GOTREF(__pyx_t_2);
5713 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
5714 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
5715
5716 /* "cephfs.pyx":489
5717 * """
5718 * self.require_state("configuring")
5719 * cargv = cstr_list(argv, 'argv') # <<<<<<<<<<<<<<
5720 * cdef:
5721 * int _argc = len(argv)
5722 */
5723 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr_list); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__5723; goto __pyx_L1_error;}
3
Taking false branch
5724 __Pyx_GOTREF(__pyx_t_1);
5725 __pyx_t_3 = NULL((void*)0);
5726 __pyx_t_4 = 0;
5727 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
4
Taking false branch
5728 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
5729 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
5730 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
5731 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
5732 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
5733 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
5734 __pyx_t_4 = 1;
5735 }
5736 }
5737 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__5737; goto __pyx_L1_error;}
5
Taking false branch
5738 __Pyx_GOTREF(__pyx_t_5);
5739 if (__pyx_t_3) {
6
Taking false branch
5740 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
5741 }
5742 __Pyx_INCREF(__pyx_v_argv)( ((PyObject*)(__pyx_v_argv))->ob_refcnt++);
5743 __Pyx_GIVEREF(__pyx_v_argv);
5744 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_argv)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_argv
)
;
5745 __Pyx_INCREF(__pyx_n_s_argv)( ((PyObject*)(__pyx_n_s_argv))->ob_refcnt++);
5746 __Pyx_GIVEREF(__pyx_n_s_argv);
5747 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_argv)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_argv
)
;
5748 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__5748; goto __pyx_L1_error;}
7
Taking false branch
5749 __Pyx_GOTREF(__pyx_t_2);
5750 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
5751 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
5752 __pyx_v_cargv = __pyx_t_2;
5753 __pyx_t_2 = 0;
5754
5755 /* "cephfs.pyx":491
5756 * cargv = cstr_list(argv, 'argv')
5757 * cdef:
5758 * int _argc = len(argv) # <<<<<<<<<<<<<<
5759 * char **_argv = to_bytes_array(cargv)
5760 *
5761 */
5762 __pyx_t_4 = PyObject_LengthPyObject_Size(__pyx_v_argv); if (unlikely(__pyx_t_4 == -1)__builtin_expect(!!(__pyx_t_4 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__5762; goto __pyx_L1_error;}
8
Taking false branch
5763 __pyx_v__argc = __pyx_t_4;
5764
5765 /* "cephfs.pyx":492
5766 * cdef:
5767 * int _argc = len(argv)
5768 * char **_argv = to_bytes_array(cargv) # <<<<<<<<<<<<<<
5769 *
5770 * try:
5771 */
5772 __pyx_v__argv = __pyx_f_6cephfs_to_bytes_array(__pyx_v_cargv);
9
Calling '__pyx_f_6cephfs_to_bytes_array'
5773
5774 /* "cephfs.pyx":494
5775 * char **_argv = to_bytes_array(cargv)
5776 *
5777 * try: # <<<<<<<<<<<<<<
5778 * with nogil:
5779 * ret = ceph_conf_parse_argv(self.cluster, _argc,
5780 */
5781 /*try:*/ {
5782
5783 /* "cephfs.pyx":495
5784 *
5785 * try:
5786 * with nogil: # <<<<<<<<<<<<<<
5787 * ret = ceph_conf_parse_argv(self.cluster, _argc,
5788 * <const char **>_argv)
5789 */
5790 {
5791 #ifdef WITH_THREAD1
5792 PyThreadState *_save;
5793 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
5794 #endif
5795 /*try:*/ {
5796
5797 /* "cephfs.pyx":496
5798 * try:
5799 * with nogil:
5800 * ret = ceph_conf_parse_argv(self.cluster, _argc, # <<<<<<<<<<<<<<
5801 * <const char **>_argv)
5802 * if ret != 0:
5803 */
5804 __pyx_v_ret = ceph_conf_parse_argv(__pyx_v_self->cluster, __pyx_v__argc, ((char const **)__pyx_v__argv));
5805 }
5806
5807 /* "cephfs.pyx":495
5808 *
5809 * try:
5810 * with nogil: # <<<<<<<<<<<<<<
5811 * ret = ceph_conf_parse_argv(self.cluster, _argc,
5812 * <const char **>_argv)
5813 */
5814 /*finally:*/ {
5815 /*normal exit:*/{
5816 #ifdef WITH_THREAD1
5817 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
5818 #endif
5819 goto __pyx_L8;
5820 }
5821 __pyx_L8:;
5822 }
5823 }
5824
5825 /* "cephfs.pyx":498
5826 * ret = ceph_conf_parse_argv(self.cluster, _argc,
5827 * <const char **>_argv)
5828 * if ret != 0: # <<<<<<<<<<<<<<
5829 * raise make_ex(ret, "error calling conf_parse_argv")
5830 * finally:
5831 */
5832 __pyx_t_6 = ((__pyx_v_ret != 0) != 0);
5833 if (__pyx_t_6) {
5834
5835 /* "cephfs.pyx":499
5836 * <const char **>_argv)
5837 * if ret != 0:
5838 * raise make_ex(ret, "error calling conf_parse_argv") # <<<<<<<<<<<<<<
5839 * finally:
5840 * free(_argv)
5841 */
5842 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__5842; goto __pyx_L4_error;}
5843 __Pyx_GOTREF(__pyx_t_2);
5844 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_calling_conf_parse_argv); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__5844; goto __pyx_L4_error;}
5845 __Pyx_GOTREF(__pyx_t_1);
5846 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
5847 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5848 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
5849 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__5849; goto __pyx_L4_error;}
5850
5851 /* "cephfs.pyx":498
5852 * ret = ceph_conf_parse_argv(self.cluster, _argc,
5853 * <const char **>_argv)
5854 * if ret != 0: # <<<<<<<<<<<<<<
5855 * raise make_ex(ret, "error calling conf_parse_argv")
5856 * finally:
5857 */
5858 }
5859 }
5860
5861 /* "cephfs.pyx":501
5862 * raise make_ex(ret, "error calling conf_parse_argv")
5863 * finally:
5864 * free(_argv) # <<<<<<<<<<<<<<
5865 *
5866 * def shutdown(self):
5867 */
5868 /*finally:*/ {
5869 /*normal exit:*/{
5870 free(__pyx_v__argv);
5871 goto __pyx_L5;
5872 }
5873 /*exception exit:*/{
5874 __pyx_L4_error:;
5875 __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
5876 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
5877 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
5878 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
5879 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
5880 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
5881 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_10, &
__pyx_t_11, &__pyx_t_12) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
5882 __Pyx_XGOTREF(__pyx_t_10);
5883 __Pyx_XGOTREF(__pyx_t_11);
5884 __Pyx_XGOTREF(__pyx_t_12);
5885 __Pyx_XGOTREF(__pyx_t_13);
5886 __Pyx_XGOTREF(__pyx_t_14);
5887 __Pyx_XGOTREF(__pyx_t_15);
5888 __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
5889 {
5890 free(__pyx_v__argv);
5891 }
5892 if (PY_MAJOR_VERSION2 >= 3) {
5893 __Pyx_XGIVEREF(__pyx_t_13);
5894 __Pyx_XGIVEREF(__pyx_t_14);
5895 __Pyx_XGIVEREF(__pyx_t_15);
5896 __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
5897 }
5898 __Pyx_XGIVEREF(__pyx_t_10);
5899 __Pyx_XGIVEREF(__pyx_t_11);
5900 __Pyx_XGIVEREF(__pyx_t_12);
5901 __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
5902 __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
5903 __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
5904 goto __pyx_L1_error;
5905 }
5906 __pyx_L5:;
5907 }
5908
5909 /* "cephfs.pyx":482
5910 * raise make_ex(ret, "error calling conf_read_file")
5911 *
5912 * def conf_parse_argv(self, argv): # <<<<<<<<<<<<<<
5913 * """
5914 * Parse the command line arguments and load the configuration parameters.
5915 */
5916
5917 /* function exit code */
5918 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
5919 goto __pyx_L0;
5920 __pyx_L1_error:;
5921 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
5922 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
5923 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
5924 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
5925 __Pyx_AddTraceback("cephfs.LibCephFS.conf_parse_argv", __pyx_clineno, __pyx_lineno, __pyx_filename);
5926 __pyx_r = NULL((void*)0);
5927 __pyx_L0:;
5928 __Pyx_XDECREF(__pyx_v_cargv)do { if ((__pyx_v_cargv) == ((void*)0)) ; else do { if ( --((
PyObject*)(__pyx_v_cargv))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(__pyx_v_cargv)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(__pyx_v_cargv)))); } while (0); }
while (0)
;
5929 __Pyx_XGIVEREF(__pyx_r);
5930 __Pyx_RefNannyFinishContext();
5931 return __pyx_r;
5932}
5933
5934/* "cephfs.pyx":503
5935 * free(_argv)
5936 *
5937 * def shutdown(self): # <<<<<<<<<<<<<<
5938 * """
5939 * Unmount and destroy the ceph mount handle.
5940 */
5941
5942/* Python wrapper */
5943static PyObject *__pyx_pw_6cephfs_9LibCephFS_13shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
5944static char __pyx_doc_6cephfs_9LibCephFS_12shutdown[] = "\n Unmount and destroy the ceph mount handle.\n ";
5945static PyObject *__pyx_pw_6cephfs_9LibCephFS_13shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
5946 PyObject *__pyx_r = 0;
5947 __Pyx_RefNannyDeclarations
5948 __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
5949 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_12shutdown(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
5950
5951 /* function exit code */
5952 __Pyx_RefNannyFinishContext();
5953 return __pyx_r;
5954}
5955
5956static PyObject *__pyx_pf_6cephfs_9LibCephFS_12shutdown(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
5957 PyObject *__pyx_r = NULL((void*)0);
5958 __Pyx_RefNannyDeclarations
5959 PyObject *__pyx_t_1 = NULL((void*)0);
5960 int __pyx_t_2;
5961 int __pyx_t_3;
5962 int __pyx_lineno = 0;
5963 const char *__pyx_filename = NULL((void*)0);
5964 int __pyx_clineno = 0;
5965 __Pyx_RefNannySetupContext("shutdown", 0);
5966
5967 /* "cephfs.pyx":507
5968 * Unmount and destroy the ceph mount handle.
5969 * """
5970 * if self.state in ["initialized", "mounted"]: # <<<<<<<<<<<<<<
5971 * with nogil:
5972 * ceph_shutdown(self.cluster)
5973 */
5974 __Pyx_INCREF(__pyx_v_self->state)( ((PyObject*)(__pyx_v_self->state))->ob_refcnt++);
5975 __pyx_t_1 = __pyx_v_self->state;
5976 __pyx_t_3 = (__Pyx_PyString_Equals__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_n_s_initialized, Py_EQ2)); if (unlikely(__pyx_t_3 < 0)__builtin_expect(!!(__pyx_t_3 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__5976; goto __pyx_L1_error;}
5977 if (!__pyx_t_3) {
5978 } else {
5979 __pyx_t_2 = __pyx_t_3;
5980 goto __pyx_L4_bool_binop_done;
5981 }
5982 __pyx_t_3 = (__Pyx_PyString_Equals__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_n_s_mounted, Py_EQ2)); if (unlikely(__pyx_t_3 < 0)__builtin_expect(!!(__pyx_t_3 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__5982; goto __pyx_L1_error;}
5983 __pyx_t_2 = __pyx_t_3;
5984 __pyx_L4_bool_binop_done:;
5985 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
5986 __pyx_t_3 = (__pyx_t_2 != 0);
5987 if (__pyx_t_3) {
5988
5989 /* "cephfs.pyx":508
5990 * """
5991 * if self.state in ["initialized", "mounted"]:
5992 * with nogil: # <<<<<<<<<<<<<<
5993 * ceph_shutdown(self.cluster)
5994 * self.state = "shutdown"
5995 */
5996 {
5997 #ifdef WITH_THREAD1
5998 PyThreadState *_save;
5999 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
6000 #endif
6001 /*try:*/ {
6002
6003 /* "cephfs.pyx":509
6004 * if self.state in ["initialized", "mounted"]:
6005 * with nogil:
6006 * ceph_shutdown(self.cluster) # <<<<<<<<<<<<<<
6007 * self.state = "shutdown"
6008 *
6009 */
6010 ceph_shutdown(__pyx_v_self->cluster);
6011 }
6012
6013 /* "cephfs.pyx":508
6014 * """
6015 * if self.state in ["initialized", "mounted"]:
6016 * with nogil: # <<<<<<<<<<<<<<
6017 * ceph_shutdown(self.cluster)
6018 * self.state = "shutdown"
6019 */
6020 /*finally:*/ {
6021 /*normal exit:*/{
6022 #ifdef WITH_THREAD1
6023 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
6024 #endif
6025 goto __pyx_L8;
6026 }
6027 __pyx_L8:;
6028 }
6029 }
6030
6031 /* "cephfs.pyx":510
6032 * with nogil:
6033 * ceph_shutdown(self.cluster)
6034 * self.state = "shutdown" # <<<<<<<<<<<<<<
6035 *
6036 * def __enter__(self):
6037 */
6038 __Pyx_INCREF(__pyx_n_s_shutdown)( ((PyObject*)(__pyx_n_s_shutdown))->ob_refcnt++);
6039 __Pyx_GIVEREF(__pyx_n_s_shutdown);
6040 __Pyx_GOTREF(__pyx_v_self->state);
6041 __Pyx_DECREF(__pyx_v_self->state)do { if ( --((PyObject*)(__pyx_v_self->state))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
state)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->state)))); } while (0)
;
6042 __pyx_v_self->state = __pyx_n_s_shutdown;
6043
6044 /* "cephfs.pyx":507
6045 * Unmount and destroy the ceph mount handle.
6046 * """
6047 * if self.state in ["initialized", "mounted"]: # <<<<<<<<<<<<<<
6048 * with nogil:
6049 * ceph_shutdown(self.cluster)
6050 */
6051 }
6052
6053 /* "cephfs.pyx":503
6054 * free(_argv)
6055 *
6056 * def shutdown(self): # <<<<<<<<<<<<<<
6057 * """
6058 * Unmount and destroy the ceph mount handle.
6059 */
6060
6061 /* function exit code */
6062 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
6063 goto __pyx_L0;
6064 __pyx_L1_error:;
6065 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
6066 __Pyx_AddTraceback("cephfs.LibCephFS.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
6067 __pyx_r = NULL((void*)0);
6068 __pyx_L0:;
6069 __Pyx_XGIVEREF(__pyx_r);
6070 __Pyx_RefNannyFinishContext();
6071 return __pyx_r;
6072}
6073
6074/* "cephfs.pyx":512
6075 * self.state = "shutdown"
6076 *
6077 * def __enter__(self): # <<<<<<<<<<<<<<
6078 * self.mount()
6079 * return self
6080 */
6081
6082/* Python wrapper */
6083static PyObject *__pyx_pw_6cephfs_9LibCephFS_15__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
6084static PyObject *__pyx_pw_6cephfs_9LibCephFS_15__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
6085 PyObject *__pyx_r = 0;
6086 __Pyx_RefNannyDeclarations
6087 __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
6088 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_14__enter__(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
6089
6090 /* function exit code */
6091 __Pyx_RefNannyFinishContext();
6092 return __pyx_r;
6093}
6094
6095static PyObject *__pyx_pf_6cephfs_9LibCephFS_14__enter__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
6096 PyObject *__pyx_r = NULL((void*)0);
6097 __Pyx_RefNannyDeclarations
6098 PyObject *__pyx_t_1 = NULL((void*)0);
6099 PyObject *__pyx_t_2 = NULL((void*)0);
6100 PyObject *__pyx_t_3 = NULL((void*)0);
6101 int __pyx_lineno = 0;
6102 const char *__pyx_filename = NULL((void*)0);
6103 int __pyx_clineno = 0;
6104 __Pyx_RefNannySetupContext("__enter__", 0);
6105
6106 /* "cephfs.pyx":513
6107 *
6108 * def __enter__(self):
6109 * self.mount() # <<<<<<<<<<<<<<
6110 * return self
6111 *
6112 */
6113 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mount); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__6113; goto __pyx_L1_error;}
6114 __Pyx_GOTREF(__pyx_t_2);
6115 __pyx_t_3 = NULL((void*)0);
6116 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
6117 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
6118 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
6119 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
6120 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
6121 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
6122 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
6123 }
6124 }
6125 if (__pyx_t_3) {
6126 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__6126; goto __pyx_L1_error;}
6127 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6128 } else {
6129 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__6129; goto __pyx_L1_error;}
6130 }
6131 __Pyx_GOTREF(__pyx_t_1);
6132 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
6133 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6134
6135 /* "cephfs.pyx":514
6136 * def __enter__(self):
6137 * self.mount()
6138 * return self # <<<<<<<<<<<<<<
6139 *
6140 * def __exit__(self, type_, value, traceback):
6141 */
6142 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
6143 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
6144 __pyx_r = ((PyObject *)__pyx_v_self);
6145 goto __pyx_L0;
6146
6147 /* "cephfs.pyx":512
6148 * self.state = "shutdown"
6149 *
6150 * def __enter__(self): # <<<<<<<<<<<<<<
6151 * self.mount()
6152 * return self
6153 */
6154
6155 /* function exit code */
6156 __pyx_L1_error:;
6157 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
6158 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
6159 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
6160 __Pyx_AddTraceback("cephfs.LibCephFS.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6161 __pyx_r = NULL((void*)0);
6162 __pyx_L0:;
6163 __Pyx_XGIVEREF(__pyx_r);
6164 __Pyx_RefNannyFinishContext();
6165 return __pyx_r;
6166}
6167
6168/* "cephfs.pyx":516
6169 * return self
6170 *
6171 * def __exit__(self, type_, value, traceback): # <<<<<<<<<<<<<<
6172 * self.shutdown()
6173 * return False
6174 */
6175
6176/* Python wrapper */
6177static PyObject *__pyx_pw_6cephfs_9LibCephFS_17__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6178static PyObject *__pyx_pw_6cephfs_9LibCephFS_17__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6179 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_ = 0;
6180 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value = 0;
6181 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback = 0;
6182 int __pyx_lineno = 0;
6183 const char *__pyx_filename = NULL((void*)0);
6184 int __pyx_clineno = 0;
6185 PyObject *__pyx_r = 0;
6186 __Pyx_RefNannyDeclarations
6187 __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
6188 {
6189 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_traceback,0};
6190 PyObject* values[3] = {0,0,0};
6191 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
6192 Py_ssize_t kw_args;
6193 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
6194 switch (pos_args) {
6195 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6196 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6197 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6198 case 0: break;
6199 default: goto __pyx_L5_argtuple_error;
6200 }
6201 kw_args = PyDict_Size(__pyx_kwds);
6202 switch (pos_args) {
6203 case 0:
6204 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type
)) != 0), 1)
) kw_args--;
6205 else goto __pyx_L5_argtuple_error;
6206 case 1:
6207 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value
)) != 0), 1)
) kw_args--;
6208 else {
6209 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__6209; goto __pyx_L3_error;}
6210 }
6211 case 2:
6212 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback
)) != 0), 1)
) kw_args--;
6213 else {
6214 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__6214; goto __pyx_L3_error;}
6215 }
6216 }
6217 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
6218 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__exit__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__6218; goto __pyx_L3_error;}
6219 }
6220 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
6221 goto __pyx_L5_argtuple_error;
6222 } else {
6223 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6224 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6225 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6226 }
6227 __pyx_v_type_ = values[0];
6228 __pyx_v_value = values[1];
6229 __pyx_v_traceback = values[2];
6230 }
6231 goto __pyx_L4_argument_unpacking_done;
6232 __pyx_L5_argtuple_error:;
6233 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__6233; goto __pyx_L3_error;}
6234 __pyx_L3_error:;
6235 __Pyx_AddTraceback("cephfs.LibCephFS.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6236 __Pyx_RefNannyFinishContext();
6237 return NULL((void*)0);
6238 __pyx_L4_argument_unpacking_done:;
6239 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_16__exit__(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_type_, __pyx_v_value, __pyx_v_traceback);
6240
6241 /* function exit code */
6242 __Pyx_RefNannyFinishContext();
6243 return __pyx_r;
6244}
6245
6246static PyObject *__pyx_pf_6cephfs_9LibCephFS_16__exit__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback) {
6247 PyObject *__pyx_r = NULL((void*)0);
6248 __Pyx_RefNannyDeclarations
6249 PyObject *__pyx_t_1 = NULL((void*)0);
6250 PyObject *__pyx_t_2 = NULL((void*)0);
6251 PyObject *__pyx_t_3 = NULL((void*)0);
6252 int __pyx_lineno = 0;
6253 const char *__pyx_filename = NULL((void*)0);
6254 int __pyx_clineno = 0;
6255 __Pyx_RefNannySetupContext("__exit__", 0);
6256
6257 /* "cephfs.pyx":517
6258 *
6259 * def __exit__(self, type_, value, traceback):
6260 * self.shutdown() # <<<<<<<<<<<<<<
6261 * return False
6262 *
6263 */
6264 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__6264; goto __pyx_L1_error;}
6265 __Pyx_GOTREF(__pyx_t_2);
6266 __pyx_t_3 = NULL((void*)0);
6267 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
6268 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
6269 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
6270 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
6271 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
6272 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
6273 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
6274 }
6275 }
6276 if (__pyx_t_3) {
6277 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__6277; goto __pyx_L1_error;}
6278 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6279 } else {
6280 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__6280; goto __pyx_L1_error;}
6281 }
6282 __Pyx_GOTREF(__pyx_t_1);
6283 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
6284 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6285
6286 /* "cephfs.pyx":518
6287 * def __exit__(self, type_, value, traceback):
6288 * self.shutdown()
6289 * return False # <<<<<<<<<<<<<<
6290 *
6291 * def __dealloc__(self):
6292 */
6293 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
6294 __Pyx_INCREF(Py_False)( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++)
;
6295 __pyx_r = Py_False((PyObject *) &_Py_ZeroStruct);
6296 goto __pyx_L0;
6297
6298 /* "cephfs.pyx":516
6299 * return self
6300 *
6301 * def __exit__(self, type_, value, traceback): # <<<<<<<<<<<<<<
6302 * self.shutdown()
6303 * return False
6304 */
6305
6306 /* function exit code */
6307 __pyx_L1_error:;
6308 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
6309 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
6310 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
6311 __Pyx_AddTraceback("cephfs.LibCephFS.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6312 __pyx_r = NULL((void*)0);
6313 __pyx_L0:;
6314 __Pyx_XGIVEREF(__pyx_r);
6315 __Pyx_RefNannyFinishContext();
6316 return __pyx_r;
6317}
6318
6319/* "cephfs.pyx":520
6320 * return False
6321 *
6322 * def __dealloc__(self): # <<<<<<<<<<<<<<
6323 * self.shutdown()
6324 *
6325 */
6326
6327/* Python wrapper */
6328static void __pyx_pw_6cephfs_9LibCephFS_19__dealloc__(PyObject *__pyx_v_self); /*proto*/
6329static void __pyx_pw_6cephfs_9LibCephFS_19__dealloc__(PyObject *__pyx_v_self) {
6330 __Pyx_RefNannyDeclarations
6331 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
6332 __pyx_pf_6cephfs_9LibCephFS_18__dealloc__(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
6333
6334 /* function exit code */
6335 __Pyx_RefNannyFinishContext();
6336}
6337
6338static void __pyx_pf_6cephfs_9LibCephFS_18__dealloc__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
6339 __Pyx_RefNannyDeclarations
6340 PyObject *__pyx_t_1 = NULL((void*)0);
6341 PyObject *__pyx_t_2 = NULL((void*)0);
6342 PyObject *__pyx_t_3 = NULL((void*)0);
6343 int __pyx_lineno = 0;
6344 const char *__pyx_filename = NULL((void*)0);
6345 int __pyx_clineno = 0;
6346 __Pyx_RefNannySetupContext("__dealloc__", 0);
6347
6348 /* "cephfs.pyx":521
6349 *
6350 * def __dealloc__(self):
6351 * self.shutdown() # <<<<<<<<<<<<<<
6352 *
6353 * def version(self):
6354 */
6355 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__6355; goto __pyx_L1_error;}
6356 __Pyx_GOTREF(__pyx_t_2);
6357 __pyx_t_3 = NULL((void*)0);
6358 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
6359 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
6360 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
6361 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
6362 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
6363 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
6364 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
6365 }
6366 }
6367 if (__pyx_t_3) {
6368 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__6368; goto __pyx_L1_error;}
6369 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6370 } else {
6371 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__6371; goto __pyx_L1_error;}
6372 }
6373 __Pyx_GOTREF(__pyx_t_1);
6374 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
6375 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6376
6377 /* "cephfs.pyx":520
6378 * return False
6379 *
6380 * def __dealloc__(self): # <<<<<<<<<<<<<<
6381 * self.shutdown()
6382 *
6383 */
6384
6385 /* function exit code */
6386 goto __pyx_L0;
6387 __pyx_L1_error:;
6388 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
6389 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
6390 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
6391 __Pyx_WriteUnraisable("cephfs.LibCephFS.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
6392 __pyx_L0:;
6393 __Pyx_RefNannyFinishContext();
6394}
6395
6396/* "cephfs.pyx":523
6397 * self.shutdown()
6398 *
6399 * def version(self): # <<<<<<<<<<<<<<
6400 * """
6401 * Get the version number of the ``libcephfs`` C library.
6402 */
6403
6404/* Python wrapper */
6405static PyObject *__pyx_pw_6cephfs_9LibCephFS_21version(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
6406static char __pyx_doc_6cephfs_9LibCephFS_20version[] = "\n Get the version number of the ``libcephfs`` C library.\n\n :returns: a tuple of ``(major, minor, extra)`` components of the\n libcephfs version\n ";
6407static PyObject *__pyx_pw_6cephfs_9LibCephFS_21version(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
6408 PyObject *__pyx_r = 0;
6409 __Pyx_RefNannyDeclarations
6410 __Pyx_RefNannySetupContext("version (wrapper)", 0);
6411 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_20version(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
6412
6413 /* function exit code */
6414 __Pyx_RefNannyFinishContext();
6415 return __pyx_r;
6416}
6417
6418static PyObject *__pyx_pf_6cephfs_9LibCephFS_20version(CYTHON_UNUSED__attribute__ ((__unused__)) struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
6419 int __pyx_v_major;
6420 int __pyx_v_minor;
6421 int __pyx_v_extra;
6422 PyObject *__pyx_r = NULL((void*)0);
6423 __Pyx_RefNannyDeclarations
6424 PyObject *__pyx_t_1 = NULL((void*)0);
6425 PyObject *__pyx_t_2 = NULL((void*)0);
6426 PyObject *__pyx_t_3 = NULL((void*)0);
6427 PyObject *__pyx_t_4 = NULL((void*)0);
6428 int __pyx_lineno = 0;
6429 const char *__pyx_filename = NULL((void*)0);
6430 int __pyx_clineno = 0;
6431 __Pyx_RefNannySetupContext("version", 0);
6432
6433 /* "cephfs.pyx":531
6434 * """
6435 * cdef:
6436 * int major = 0 # <<<<<<<<<<<<<<
6437 * int minor = 0
6438 * int extra = 0
6439 */
6440 __pyx_v_major = 0;
6441
6442 /* "cephfs.pyx":532
6443 * cdef:
6444 * int major = 0
6445 * int minor = 0 # <<<<<<<<<<<<<<
6446 * int extra = 0
6447 * with nogil:
6448 */
6449 __pyx_v_minor = 0;
6450
6451 /* "cephfs.pyx":533
6452 * int major = 0
6453 * int minor = 0
6454 * int extra = 0 # <<<<<<<<<<<<<<
6455 * with nogil:
6456 * ceph_version(&major, &minor, &extra)
6457 */
6458 __pyx_v_extra = 0;
6459
6460 /* "cephfs.pyx":534
6461 * int minor = 0
6462 * int extra = 0
6463 * with nogil: # <<<<<<<<<<<<<<
6464 * ceph_version(&major, &minor, &extra)
6465 * return (major, minor, extra)
6466 */
6467 {
6468 #ifdef WITH_THREAD1
6469 PyThreadState *_save;
6470 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
6471 #endif
6472 /*try:*/ {
6473
6474 /* "cephfs.pyx":535
6475 * int extra = 0
6476 * with nogil:
6477 * ceph_version(&major, &minor, &extra) # <<<<<<<<<<<<<<
6478 * return (major, minor, extra)
6479 *
6480 */
6481 ceph_version((&__pyx_v_major), (&__pyx_v_minor), (&__pyx_v_extra));
6482 }
6483
6484 /* "cephfs.pyx":534
6485 * int minor = 0
6486 * int extra = 0
6487 * with nogil: # <<<<<<<<<<<<<<
6488 * ceph_version(&major, &minor, &extra)
6489 * return (major, minor, extra)
6490 */
6491 /*finally:*/ {
6492 /*normal exit:*/{
6493 #ifdef WITH_THREAD1
6494 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
6495 #endif
6496 goto __pyx_L5;
6497 }
6498 __pyx_L5:;
6499 }
6500 }
6501
6502 /* "cephfs.pyx":536
6503 * with nogil:
6504 * ceph_version(&major, &minor, &extra)
6505 * return (major, minor, extra) # <<<<<<<<<<<<<<
6506 *
6507 * def conf_get(self, option):
6508 */
6509 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
6510 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_major); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__6510; goto __pyx_L1_error;}
6511 __Pyx_GOTREF(__pyx_t_1);
6512 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_minor); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__6512; goto __pyx_L1_error;}
6513 __Pyx_GOTREF(__pyx_t_2);
6514 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_extra); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__6514; goto __pyx_L1_error;}
6515 __Pyx_GOTREF(__pyx_t_3);
6516 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__6516; goto __pyx_L1_error;}
6517 __Pyx_GOTREF(__pyx_t_4);
6518 __Pyx_GIVEREF(__pyx_t_1);
6519 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_t_1);
6520 __Pyx_GIVEREF(__pyx_t_2);
6521 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_4))->ob_item[1] = __pyx_t_2);
6522 __Pyx_GIVEREF(__pyx_t_3);
6523 PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)(((PyTupleObject *)(__pyx_t_4))->ob_item[2] = __pyx_t_3);
6524 __pyx_t_1 = 0;
6525 __pyx_t_2 = 0;
6526 __pyx_t_3 = 0;
6527 __pyx_r = __pyx_t_4;
6528 __pyx_t_4 = 0;
6529 goto __pyx_L0;
6530
6531 /* "cephfs.pyx":523
6532 * self.shutdown()
6533 *
6534 * def version(self): # <<<<<<<<<<<<<<
6535 * """
6536 * Get the version number of the ``libcephfs`` C library.
6537 */
6538
6539 /* function exit code */
6540 __pyx_L1_error:;
6541 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
6542 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
6543 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
6544 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
6545 __Pyx_AddTraceback("cephfs.LibCephFS.version", __pyx_clineno, __pyx_lineno, __pyx_filename);
6546 __pyx_r = NULL((void*)0);
6547 __pyx_L0:;
6548 __Pyx_XGIVEREF(__pyx_r);
6549 __Pyx_RefNannyFinishContext();
6550 return __pyx_r;
6551}
6552
6553/* "cephfs.pyx":538
6554 * return (major, minor, extra)
6555 *
6556 * def conf_get(self, option): # <<<<<<<<<<<<<<
6557 * """
6558 * Gets the configuration value as a string.
6559 */
6560
6561/* Python wrapper */
6562static PyObject *__pyx_pw_6cephfs_9LibCephFS_23conf_get(PyObject *__pyx_v_self, PyObject *__pyx_v_option); /*proto*/
6563static char __pyx_doc_6cephfs_9LibCephFS_22conf_get[] = "\n Gets the configuration value as a string.\n \n :param option: the config option to get\n ";
6564static PyObject *__pyx_pw_6cephfs_9LibCephFS_23conf_get(PyObject *__pyx_v_self, PyObject *__pyx_v_option) {
6565 PyObject *__pyx_r = 0;
6566 __Pyx_RefNannyDeclarations
6567 __Pyx_RefNannySetupContext("conf_get (wrapper)", 0);
6568 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_22conf_get(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_option));
6569
6570 /* function exit code */
6571 __Pyx_RefNannyFinishContext();
6572 return __pyx_r;
6573}
6574
6575static PyObject *__pyx_pf_6cephfs_9LibCephFS_22conf_get(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_option) {
6576 char *__pyx_v__option;
6577 size_t __pyx_v_length;
6578 char *__pyx_v_ret_buf;
6579 int __pyx_v_ret;
6580 PyObject *__pyx_r = NULL((void*)0);
6581 __Pyx_RefNannyDeclarations
6582 PyObject *__pyx_t_1 = NULL((void*)0);
6583 PyObject *__pyx_t_2 = NULL((void*)0);
6584 PyObject *__pyx_t_3 = NULL((void*)0);
6585 Py_ssize_t __pyx_t_4;
6586 PyObject *__pyx_t_5 = NULL((void*)0);
6587 char *__pyx_t_6;
6588 void *__pyx_t_7;
6589 int __pyx_t_8;
6590 PyObject *__pyx_t_9 = NULL((void*)0);
6591 int __pyx_t_10;
6592 int __pyx_t_11;
6593 char const *__pyx_t_12;
6594 PyObject *__pyx_t_13 = NULL((void*)0);
6595 PyObject *__pyx_t_14 = NULL((void*)0);
6596 PyObject *__pyx_t_15 = NULL((void*)0);
6597 PyObject *__pyx_t_16 = NULL((void*)0);
6598 PyObject *__pyx_t_17 = NULL((void*)0);
6599 PyObject *__pyx_t_18 = NULL((void*)0);
6600 int __pyx_lineno = 0;
6601 const char *__pyx_filename = NULL((void*)0);
6602 int __pyx_clineno = 0;
6603 __Pyx_RefNannySetupContext("conf_get", 0);
6604 __Pyx_INCREF(__pyx_v_option)( ((PyObject*)(__pyx_v_option))->ob_refcnt++);
6605
6606 /* "cephfs.pyx":544
6607 * :param option: the config option to get
6608 * """
6609 * self.require_state("configuring", "initialized", "mounted") # <<<<<<<<<<<<<<
6610 *
6611 * option = cstr(option, 'option')
6612 */
6613 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__6613; goto __pyx_L1_error;}
6614 __Pyx_GOTREF(__pyx_t_1);
6615 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__6615; goto __pyx_L1_error;}
6616 __Pyx_GOTREF(__pyx_t_2);
6617 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6618 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
6619
6620 /* "cephfs.pyx":546
6621 * self.require_state("configuring", "initialized", "mounted")
6622 *
6623 * option = cstr(option, 'option') # <<<<<<<<<<<<<<
6624 * cdef:
6625 * char *_option = option
6626 */
6627 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__6627; goto __pyx_L1_error;}
6628 __Pyx_GOTREF(__pyx_t_1);
6629 __pyx_t_3 = NULL((void*)0);
6630 __pyx_t_4 = 0;
6631 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
6632 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
6633 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
6634 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
6635 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
6636 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
6637 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
6638 __pyx_t_4 = 1;
6639 }
6640 }
6641 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__6641; goto __pyx_L1_error;}
6642 __Pyx_GOTREF(__pyx_t_5);
6643 if (__pyx_t_3) {
6644 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
6645 }
6646 __Pyx_INCREF(__pyx_v_option)( ((PyObject*)(__pyx_v_option))->ob_refcnt++);
6647 __Pyx_GIVEREF(__pyx_v_option);
6648 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_option)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_option
)
;
6649 __Pyx_INCREF(__pyx_n_s_option)( ((PyObject*)(__pyx_n_s_option))->ob_refcnt++);
6650 __Pyx_GIVEREF(__pyx_n_s_option);
6651 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_option)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_option
)
;
6652 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__6652; goto __pyx_L1_error;}
6653 __Pyx_GOTREF(__pyx_t_2);
6654 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
6655 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6656 __Pyx_DECREF_SET(__pyx_v_option, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_option; __pyx_v_option
= __pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
6657 __pyx_t_2 = 0;
6658
6659 /* "cephfs.pyx":548
6660 * option = cstr(option, 'option')
6661 * cdef:
6662 * char *_option = option # <<<<<<<<<<<<<<
6663 * size_t length = 20
6664 * char *ret_buf = NULL
6665 */
6666 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_option); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__6666; goto __pyx_L1_error;}
6667 __pyx_v__option = __pyx_t_6;
6668
6669 /* "cephfs.pyx":549
6670 * cdef:
6671 * char *_option = option
6672 * size_t length = 20 # <<<<<<<<<<<<<<
6673 * char *ret_buf = NULL
6674 *
6675 */
6676 __pyx_v_length = 20;
6677
6678 /* "cephfs.pyx":550
6679 * char *_option = option
6680 * size_t length = 20
6681 * char *ret_buf = NULL # <<<<<<<<<<<<<<
6682 *
6683 * try:
6684 */
6685 __pyx_v_ret_buf = NULL((void*)0);
6686
6687 /* "cephfs.pyx":552
6688 * char *ret_buf = NULL
6689 *
6690 * try: # <<<<<<<<<<<<<<
6691 * while True:
6692 * ret_buf = <char *>realloc_chk(ret_buf, length)
6693 */
6694 /*try:*/ {
6695
6696 /* "cephfs.pyx":553
6697 *
6698 * try:
6699 * while True: # <<<<<<<<<<<<<<
6700 * ret_buf = <char *>realloc_chk(ret_buf, length)
6701 * with nogil:
6702 */
6703 while (1) {
6704
6705 /* "cephfs.pyx":554
6706 * try:
6707 * while True:
6708 * ret_buf = <char *>realloc_chk(ret_buf, length) # <<<<<<<<<<<<<<
6709 * with nogil:
6710 * ret = ceph_conf_get(self.cluster, _option, ret_buf, length)
6711 */
6712 __pyx_t_7 = __pyx_f_6cephfs_realloc_chk(__pyx_v_ret_buf, __pyx_v_length); if (unlikely(__pyx_t_7 == NULL)__builtin_expect(!!(__pyx_t_7 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__6712; goto __pyx_L4_error;}
6713 __pyx_v_ret_buf = ((char *)__pyx_t_7);
6714
6715 /* "cephfs.pyx":555
6716 * while True:
6717 * ret_buf = <char *>realloc_chk(ret_buf, length)
6718 * with nogil: # <<<<<<<<<<<<<<
6719 * ret = ceph_conf_get(self.cluster, _option, ret_buf, length)
6720 * if ret == 0:
6721 */
6722 {
6723 #ifdef WITH_THREAD1
6724 PyThreadState *_save;
6725 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
6726 #endif
6727 /*try:*/ {
6728
6729 /* "cephfs.pyx":556
6730 * ret_buf = <char *>realloc_chk(ret_buf, length)
6731 * with nogil:
6732 * ret = ceph_conf_get(self.cluster, _option, ret_buf, length) # <<<<<<<<<<<<<<
6733 * if ret == 0:
6734 * return decode_cstr(ret_buf)
6735 */
6736 __pyx_v_ret = ceph_conf_get(__pyx_v_self->cluster, __pyx_v__option, __pyx_v_ret_buf, __pyx_v_length);
6737 }
6738
6739 /* "cephfs.pyx":555
6740 * while True:
6741 * ret_buf = <char *>realloc_chk(ret_buf, length)
6742 * with nogil: # <<<<<<<<<<<<<<
6743 * ret = ceph_conf_get(self.cluster, _option, ret_buf, length)
6744 * if ret == 0:
6745 */
6746 /*finally:*/ {
6747 /*normal exit:*/{
6748 #ifdef WITH_THREAD1
6749 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
6750 #endif
6751 goto __pyx_L12;
6752 }
6753 __pyx_L12:;
6754 }
6755 }
6756
6757 /* "cephfs.pyx":557
6758 * with nogil:
6759 * ret = ceph_conf_get(self.cluster, _option, ret_buf, length)
6760 * if ret == 0: # <<<<<<<<<<<<<<
6761 * return decode_cstr(ret_buf)
6762 * elif ret == -errno.ENAMETOOLONG:
6763 */
6764 __pyx_t_8 = ((__pyx_v_ret == 0) != 0);
6765 if (__pyx_t_8) {
6766
6767 /* "cephfs.pyx":558
6768 * ret = ceph_conf_get(self.cluster, _option, ret_buf, length)
6769 * if ret == 0:
6770 * return decode_cstr(ret_buf) # <<<<<<<<<<<<<<
6771 * elif ret == -errno.ENAMETOOLONG:
6772 * length = length * 2
6773 */
6774 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
6775 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__6775; goto __pyx_L4_error;}
6776 __Pyx_GOTREF(__pyx_t_1);
6777 __pyx_t_5 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_ret_buf); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__6777; goto __pyx_L4_error;}
6778 __Pyx_GOTREF(__pyx_t_5);
6779 __pyx_t_3 = NULL((void*)0);
6780 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
6781 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
6782 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
6783 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
6784 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
6785 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
6786 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
6787 }
6788 }
6789 if (!__pyx_t_3) {
6790 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__6790; goto __pyx_L4_error;}
6791 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
6792 __Pyx_GOTREF(__pyx_t_2);
6793 } else {
6794 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__6794; goto __pyx_L4_error;}
6795 __Pyx_GOTREF(__pyx_t_9);
6796 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
6797 __Pyx_GIVEREF(__pyx_t_5);
6798 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_5);
6799 __pyx_t_5 = 0;
6800 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__6800; goto __pyx_L4_error;}
6801 __Pyx_GOTREF(__pyx_t_2);
6802 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
6803 }
6804 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6805 __pyx_r = __pyx_t_2;
6806 __pyx_t_2 = 0;
6807 goto __pyx_L3_return;
6808
6809 /* "cephfs.pyx":557
6810 * with nogil:
6811 * ret = ceph_conf_get(self.cluster, _option, ret_buf, length)
6812 * if ret == 0: # <<<<<<<<<<<<<<
6813 * return decode_cstr(ret_buf)
6814 * elif ret == -errno.ENAMETOOLONG:
6815 */
6816 }
6817
6818 /* "cephfs.pyx":559
6819 * if ret == 0:
6820 * return decode_cstr(ret_buf)
6821 * elif ret == -errno.ENAMETOOLONG: # <<<<<<<<<<<<<<
6822 * length = length * 2
6823 * elif ret == -errno.ENOENT:
6824 */
6825 __pyx_t_8 = ((__pyx_v_ret == (-ENAMETOOLONG36)) != 0);
6826 if (__pyx_t_8) {
6827
6828 /* "cephfs.pyx":560
6829 * return decode_cstr(ret_buf)
6830 * elif ret == -errno.ENAMETOOLONG:
6831 * length = length * 2 # <<<<<<<<<<<<<<
6832 * elif ret == -errno.ENOENT:
6833 * return None
6834 */
6835 __pyx_v_length = (__pyx_v_length * 2);
6836
6837 /* "cephfs.pyx":559
6838 * if ret == 0:
6839 * return decode_cstr(ret_buf)
6840 * elif ret == -errno.ENAMETOOLONG: # <<<<<<<<<<<<<<
6841 * length = length * 2
6842 * elif ret == -errno.ENOENT:
6843 */
6844 goto __pyx_L13;
6845 }
6846
6847 /* "cephfs.pyx":561
6848 * elif ret == -errno.ENAMETOOLONG:
6849 * length = length * 2
6850 * elif ret == -errno.ENOENT: # <<<<<<<<<<<<<<
6851 * return None
6852 * else:
6853 */
6854 __pyx_t_8 = ((__pyx_v_ret == (-ENOENT2)) != 0);
6855 if (__pyx_t_8) {
6856
6857 /* "cephfs.pyx":562
6858 * length = length * 2
6859 * elif ret == -errno.ENOENT:
6860 * return None # <<<<<<<<<<<<<<
6861 * else:
6862 * raise make_ex(ret, "error calling conf_get")
6863 */
6864 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
6865 __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
6866 __pyx_r = Py_None(&_Py_NoneStruct);
6867 goto __pyx_L3_return;
6868
6869 /* "cephfs.pyx":561
6870 * elif ret == -errno.ENAMETOOLONG:
6871 * length = length * 2
6872 * elif ret == -errno.ENOENT: # <<<<<<<<<<<<<<
6873 * return None
6874 * else:
6875 */
6876 }
6877
6878 /* "cephfs.pyx":564
6879 * return None
6880 * else:
6881 * raise make_ex(ret, "error calling conf_get") # <<<<<<<<<<<<<<
6882 * finally:
6883 * free(ret_buf)
6884 */
6885 /*else*/ {
6886 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__6886; goto __pyx_L4_error;}
6887 __Pyx_GOTREF(__pyx_t_2);
6888 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_calling_conf_get); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__6888; goto __pyx_L4_error;}
6889 __Pyx_GOTREF(__pyx_t_1);
6890 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
6891 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6892 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6893 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__6893; goto __pyx_L4_error;}
6894 }
6895 __pyx_L13:;
6896 }
6897 }
6898
6899 /* "cephfs.pyx":566
6900 * raise make_ex(ret, "error calling conf_get")
6901 * finally:
6902 * free(ret_buf) # <<<<<<<<<<<<<<
6903 *
6904 * def conf_set(self, option, val):
6905 */
6906 /*finally:*/ {
6907 /*normal exit:*/{
6908 free(__pyx_v_ret_buf);
6909 goto __pyx_L5;
6910 }
6911 /*exception exit:*/{
6912 __pyx_L4_error:;
6913 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
6914 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
6915 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
6916 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
6917 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
6918 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
6919 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
6920 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_13, &
__pyx_t_14, &__pyx_t_15) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
6921 __Pyx_XGOTREF(__pyx_t_13);
6922 __Pyx_XGOTREF(__pyx_t_14);
6923 __Pyx_XGOTREF(__pyx_t_15);
6924 __Pyx_XGOTREF(__pyx_t_16);
6925 __Pyx_XGOTREF(__pyx_t_17);
6926 __Pyx_XGOTREF(__pyx_t_18);
6927 __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
6928 {
6929 free(__pyx_v_ret_buf);
6930 }
6931 if (PY_MAJOR_VERSION2 >= 3) {
6932 __Pyx_XGIVEREF(__pyx_t_16);
6933 __Pyx_XGIVEREF(__pyx_t_17);
6934 __Pyx_XGIVEREF(__pyx_t_18);
6935 __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
6936 }
6937 __Pyx_XGIVEREF(__pyx_t_13);
6938 __Pyx_XGIVEREF(__pyx_t_14);
6939 __Pyx_XGIVEREF(__pyx_t_15);
6940 __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
6941 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
6942 __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
6943 goto __pyx_L1_error;
6944 }
6945 __pyx_L3_return: {
6946 __pyx_t_18 = __pyx_r;
6947 __pyx_r = 0;
6948 free(__pyx_v_ret_buf);
6949 __pyx_r = __pyx_t_18;
6950 __pyx_t_18 = 0;
6951 goto __pyx_L0;
6952 }
6953 __pyx_L5:;
6954 }
6955
6956 /* "cephfs.pyx":538
6957 * return (major, minor, extra)
6958 *
6959 * def conf_get(self, option): # <<<<<<<<<<<<<<
6960 * """
6961 * Gets the configuration value as a string.
6962 */
6963
6964 /* function exit code */
6965 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
6966 goto __pyx_L0;
6967 __pyx_L1_error:;
6968 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
6969 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
6970 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
6971 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
6972 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
6973 __Pyx_AddTraceback("cephfs.LibCephFS.conf_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
6974 __pyx_r = NULL((void*)0);
6975 __pyx_L0:;
6976 __Pyx_XDECREF(__pyx_v_option)do { if ((__pyx_v_option) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_option))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_option)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_option)))); } while
(0); } while (0)
;
6977 __Pyx_XGIVEREF(__pyx_r);
6978 __Pyx_RefNannyFinishContext();
6979 return __pyx_r;
6980}
6981
6982/* "cephfs.pyx":568
6983 * free(ret_buf)
6984 *
6985 * def conf_set(self, option, val): # <<<<<<<<<<<<<<
6986 * """
6987 * Sets a configuration value from a string.
6988 */
6989
6990/* Python wrapper */
6991static PyObject *__pyx_pw_6cephfs_9LibCephFS_25conf_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6992static char __pyx_doc_6cephfs_9LibCephFS_24conf_set[] = "\n Sets a configuration value from a string.\n \n :param option: the configuration option to set\n :param value: the value of the configuration option to set\n ";
6993static PyObject *__pyx_pw_6cephfs_9LibCephFS_25conf_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6994 PyObject *__pyx_v_option = 0;
6995 PyObject *__pyx_v_val = 0;
6996 int __pyx_lineno = 0;
6997 const char *__pyx_filename = NULL((void*)0);
6998 int __pyx_clineno = 0;
6999 PyObject *__pyx_r = 0;
7000 __Pyx_RefNannyDeclarations
7001 __Pyx_RefNannySetupContext("conf_set (wrapper)", 0);
7002 {
7003 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_option,&__pyx_n_s_val,0};
7004 PyObject* values[2] = {0,0};
7005 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
7006 Py_ssize_t kw_args;
7007 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
7008 switch (pos_args) {
7009 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
7010 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
7011 case 0: break;
7012 default: goto __pyx_L5_argtuple_error;
7013 }
7014 kw_args = PyDict_Size(__pyx_kwds);
7015 switch (pos_args) {
7016 case 0:
7017 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_option)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_option
)) != 0), 1)
) kw_args--;
7018 else goto __pyx_L5_argtuple_error;
7019 case 1:
7020 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val
)) != 0), 1)
) kw_args--;
7021 else {
7022 __Pyx_RaiseArgtupleInvalid("conf_set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__7022; goto __pyx_L3_error;}
7023 }
7024 }
7025 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
7026 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conf_set") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "conf_set") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__7026; goto __pyx_L3_error;}
7027 }
7028 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
7029 goto __pyx_L5_argtuple_error;
7030 } else {
7031 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
7032 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
7033 }
7034 __pyx_v_option = values[0];
7035 __pyx_v_val = values[1];
7036 }
7037 goto __pyx_L4_argument_unpacking_done;
7038 __pyx_L5_argtuple_error:;
7039 __Pyx_RaiseArgtupleInvalid("conf_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__7039; goto __pyx_L3_error;}
7040 __pyx_L3_error:;
7041 __Pyx_AddTraceback("cephfs.LibCephFS.conf_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
7042 __Pyx_RefNannyFinishContext();
7043 return NULL((void*)0);
7044 __pyx_L4_argument_unpacking_done:;
7045 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_24conf_set(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_option, __pyx_v_val);
7046
7047 /* function exit code */
7048 __Pyx_RefNannyFinishContext();
7049 return __pyx_r;
7050}
7051
7052static PyObject *__pyx_pf_6cephfs_9LibCephFS_24conf_set(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_option, PyObject *__pyx_v_val) {
7053 char *__pyx_v__option;
7054 char *__pyx_v__val;
7055 int __pyx_v_ret;
7056 PyObject *__pyx_r = NULL((void*)0);
7057 __Pyx_RefNannyDeclarations
7058 PyObject *__pyx_t_1 = NULL((void*)0);
7059 PyObject *__pyx_t_2 = NULL((void*)0);
7060 PyObject *__pyx_t_3 = NULL((void*)0);
7061 Py_ssize_t __pyx_t_4;
7062 PyObject *__pyx_t_5 = NULL((void*)0);
7063 char *__pyx_t_6;
7064 int __pyx_t_7;
7065 int __pyx_lineno = 0;
7066 const char *__pyx_filename = NULL((void*)0);
7067 int __pyx_clineno = 0;
7068 __Pyx_RefNannySetupContext("conf_set", 0);
7069 __Pyx_INCREF(__pyx_v_option)( ((PyObject*)(__pyx_v_option))->ob_refcnt++);
7070 __Pyx_INCREF(__pyx_v_val)( ((PyObject*)(__pyx_v_val))->ob_refcnt++);
7071
7072 /* "cephfs.pyx":575
7073 * :param value: the value of the configuration option to set
7074 * """
7075 * self.require_state("configuring", "initialized", "mounted") # <<<<<<<<<<<<<<
7076 *
7077 * option = cstr(option, 'option')
7078 */
7079 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__7079; goto __pyx_L1_error;}
7080 __Pyx_GOTREF(__pyx_t_1);
7081 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__7081; goto __pyx_L1_error;}
7082 __Pyx_GOTREF(__pyx_t_2);
7083 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7084 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7085
7086 /* "cephfs.pyx":577
7087 * self.require_state("configuring", "initialized", "mounted")
7088 *
7089 * option = cstr(option, 'option') # <<<<<<<<<<<<<<
7090 * val = cstr(val, 'val')
7091 * cdef:
7092 */
7093 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__7093; goto __pyx_L1_error;}
7094 __Pyx_GOTREF(__pyx_t_1);
7095 __pyx_t_3 = NULL((void*)0);
7096 __pyx_t_4 = 0;
7097 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
7098 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
7099 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
7100 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
7101 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
7102 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
7103 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
7104 __pyx_t_4 = 1;
7105 }
7106 }
7107 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__7107; goto __pyx_L1_error;}
7108 __Pyx_GOTREF(__pyx_t_5);
7109 if (__pyx_t_3) {
7110 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
7111 }
7112 __Pyx_INCREF(__pyx_v_option)( ((PyObject*)(__pyx_v_option))->ob_refcnt++);
7113 __Pyx_GIVEREF(__pyx_v_option);
7114 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_option)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_option
)
;
7115 __Pyx_INCREF(__pyx_n_s_option)( ((PyObject*)(__pyx_n_s_option))->ob_refcnt++);
7116 __Pyx_GIVEREF(__pyx_n_s_option);
7117 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_option)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_option
)
;
7118 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__7118; goto __pyx_L1_error;}
7119 __Pyx_GOTREF(__pyx_t_2);
7120 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
7121 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7122 __Pyx_DECREF_SET(__pyx_v_option, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_option; __pyx_v_option
= __pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
7123 __pyx_t_2 = 0;
7124
7125 /* "cephfs.pyx":578
7126 *
7127 * option = cstr(option, 'option')
7128 * val = cstr(val, 'val') # <<<<<<<<<<<<<<
7129 * cdef:
7130 * char *_option = option
7131 */
7132 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__7132; goto __pyx_L1_error;}
7133 __Pyx_GOTREF(__pyx_t_1);
7134 __pyx_t_5 = NULL((void*)0);
7135 __pyx_t_4 = 0;
7136 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
7137 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
7138 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
7139 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
7140 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
7141 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
7142 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
7143 __pyx_t_4 = 1;
7144 }
7145 }
7146 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__7146; goto __pyx_L1_error;}
7147 __Pyx_GOTREF(__pyx_t_3);
7148 if (__pyx_t_5) {
7149 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
7150 }
7151 __Pyx_INCREF(__pyx_v_val)( ((PyObject*)(__pyx_v_val))->ob_refcnt++);
7152 __Pyx_GIVEREF(__pyx_v_val);
7153 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_val)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_val
)
;
7154 __Pyx_INCREF(__pyx_n_s_val)( ((PyObject*)(__pyx_n_s_val))->ob_refcnt++);
7155 __Pyx_GIVEREF(__pyx_n_s_val);
7156 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_val)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_val
)
;
7157 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__7157; goto __pyx_L1_error;}
7158 __Pyx_GOTREF(__pyx_t_2);
7159 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
7160 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7161 __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_val; __pyx_v_val = __pyx_t_2
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
7162 __pyx_t_2 = 0;
7163
7164 /* "cephfs.pyx":580
7165 * val = cstr(val, 'val')
7166 * cdef:
7167 * char *_option = option # <<<<<<<<<<<<<<
7168 * char *_val = val
7169 *
7170 */
7171 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_option); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__7171; goto __pyx_L1_error;}
7172 __pyx_v__option = __pyx_t_6;
7173
7174 /* "cephfs.pyx":581
7175 * cdef:
7176 * char *_option = option
7177 * char *_val = val # <<<<<<<<<<<<<<
7178 *
7179 * with nogil:
7180 */
7181 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_val); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__7181; goto __pyx_L1_error;}
7182 __pyx_v__val = __pyx_t_6;
7183
7184 /* "cephfs.pyx":583
7185 * char *_val = val
7186 *
7187 * with nogil: # <<<<<<<<<<<<<<
7188 * ret = ceph_conf_set(self.cluster, _option, _val)
7189 * if ret != 0:
7190 */
7191 {
7192 #ifdef WITH_THREAD1
7193 PyThreadState *_save;
7194 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
7195 #endif
7196 /*try:*/ {
7197
7198 /* "cephfs.pyx":584
7199 *
7200 * with nogil:
7201 * ret = ceph_conf_set(self.cluster, _option, _val) # <<<<<<<<<<<<<<
7202 * if ret != 0:
7203 * raise make_ex(ret, "error calling conf_set")
7204 */
7205 __pyx_v_ret = ceph_conf_set(__pyx_v_self->cluster, __pyx_v__option, __pyx_v__val);
7206 }
7207
7208 /* "cephfs.pyx":583
7209 * char *_val = val
7210 *
7211 * with nogil: # <<<<<<<<<<<<<<
7212 * ret = ceph_conf_set(self.cluster, _option, _val)
7213 * if ret != 0:
7214 */
7215 /*finally:*/ {
7216 /*normal exit:*/{
7217 #ifdef WITH_THREAD1
7218 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
7219 #endif
7220 goto __pyx_L5;
7221 }
7222 __pyx_L5:;
7223 }
7224 }
7225
7226 /* "cephfs.pyx":585
7227 * with nogil:
7228 * ret = ceph_conf_set(self.cluster, _option, _val)
7229 * if ret != 0: # <<<<<<<<<<<<<<
7230 * raise make_ex(ret, "error calling conf_set")
7231 *
7232 */
7233 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
7234 if (__pyx_t_7) {
7235
7236 /* "cephfs.pyx":586
7237 * ret = ceph_conf_set(self.cluster, _option, _val)
7238 * if ret != 0:
7239 * raise make_ex(ret, "error calling conf_set") # <<<<<<<<<<<<<<
7240 *
7241 * def init(self):
7242 */
7243 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__7243; goto __pyx_L1_error;}
7244 __Pyx_GOTREF(__pyx_t_2);
7245 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_calling_conf_set); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__7245; goto __pyx_L1_error;}
7246 __Pyx_GOTREF(__pyx_t_1);
7247 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7248 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7249 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7250 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__7250; goto __pyx_L1_error;}
7251
7252 /* "cephfs.pyx":585
7253 * with nogil:
7254 * ret = ceph_conf_set(self.cluster, _option, _val)
7255 * if ret != 0: # <<<<<<<<<<<<<<
7256 * raise make_ex(ret, "error calling conf_set")
7257 *
7258 */
7259 }
7260
7261 /* "cephfs.pyx":568
7262 * free(ret_buf)
7263 *
7264 * def conf_set(self, option, val): # <<<<<<<<<<<<<<
7265 * """
7266 * Sets a configuration value from a string.
7267 */
7268
7269 /* function exit code */
7270 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
7271 goto __pyx_L0;
7272 __pyx_L1_error:;
7273 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
7274 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
7275 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
7276 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
7277 __Pyx_AddTraceback("cephfs.LibCephFS.conf_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
7278 __pyx_r = NULL((void*)0);
7279 __pyx_L0:;
7280 __Pyx_XDECREF(__pyx_v_option)do { if ((__pyx_v_option) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_option))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_option)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_option)))); } while
(0); } while (0)
;
7281 __Pyx_XDECREF(__pyx_v_val)do { if ((__pyx_v_val) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_val))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_val)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_val)))); } while (0); } while (0)
;
7282 __Pyx_XGIVEREF(__pyx_r);
7283 __Pyx_RefNannyFinishContext();
7284 return __pyx_r;
7285}
7286
7287/* "cephfs.pyx":588
7288 * raise make_ex(ret, "error calling conf_set")
7289 *
7290 * def init(self): # <<<<<<<<<<<<<<
7291 * """
7292 * Initialize the filesystem client (but do not mount the filesystem yet)
7293 */
7294
7295/* Python wrapper */
7296static PyObject *__pyx_pw_6cephfs_9LibCephFS_27init(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
7297static char __pyx_doc_6cephfs_9LibCephFS_26init[] = "\n Initialize the filesystem client (but do not mount the filesystem yet)\n ";
7298static PyObject *__pyx_pw_6cephfs_9LibCephFS_27init(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
7299 PyObject *__pyx_r = 0;
7300 __Pyx_RefNannyDeclarations
7301 __Pyx_RefNannySetupContext("init (wrapper)", 0);
7302 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_26init(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
7303
7304 /* function exit code */
7305 __Pyx_RefNannyFinishContext();
7306 return __pyx_r;
7307}
7308
7309static PyObject *__pyx_pf_6cephfs_9LibCephFS_26init(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
7310 int __pyx_v_ret;
7311 PyObject *__pyx_r = NULL((void*)0);
7312 __Pyx_RefNannyDeclarations
7313 PyObject *__pyx_t_1 = NULL((void*)0);
7314 PyObject *__pyx_t_2 = NULL((void*)0);
7315 int __pyx_t_3;
7316 int __pyx_lineno = 0;
7317 const char *__pyx_filename = NULL((void*)0);
7318 int __pyx_clineno = 0;
7319 __Pyx_RefNannySetupContext("init", 0);
7320
7321 /* "cephfs.pyx":592
7322 * Initialize the filesystem client (but do not mount the filesystem yet)
7323 * """
7324 * self.require_state("configuring") # <<<<<<<<<<<<<<
7325 * with nogil:
7326 * ret = ceph_init(self.cluster)
7327 */
7328 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__7328; goto __pyx_L1_error;}
7329 __Pyx_GOTREF(__pyx_t_1);
7330 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__11, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__7330; goto __pyx_L1_error;}
7331 __Pyx_GOTREF(__pyx_t_2);
7332 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7333 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7334
7335 /* "cephfs.pyx":593
7336 * """
7337 * self.require_state("configuring")
7338 * with nogil: # <<<<<<<<<<<<<<
7339 * ret = ceph_init(self.cluster)
7340 * if ret != 0:
7341 */
7342 {
7343 #ifdef WITH_THREAD1
7344 PyThreadState *_save;
7345 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
7346 #endif
7347 /*try:*/ {
7348
7349 /* "cephfs.pyx":594
7350 * self.require_state("configuring")
7351 * with nogil:
7352 * ret = ceph_init(self.cluster) # <<<<<<<<<<<<<<
7353 * if ret != 0:
7354 * raise make_ex(ret, "error calling ceph_init")
7355 */
7356 __pyx_v_ret = ceph_init(__pyx_v_self->cluster);
7357 }
7358
7359 /* "cephfs.pyx":593
7360 * """
7361 * self.require_state("configuring")
7362 * with nogil: # <<<<<<<<<<<<<<
7363 * ret = ceph_init(self.cluster)
7364 * if ret != 0:
7365 */
7366 /*finally:*/ {
7367 /*normal exit:*/{
7368 #ifdef WITH_THREAD1
7369 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
7370 #endif
7371 goto __pyx_L5;
7372 }
7373 __pyx_L5:;
7374 }
7375 }
7376
7377 /* "cephfs.pyx":595
7378 * with nogil:
7379 * ret = ceph_init(self.cluster)
7380 * if ret != 0: # <<<<<<<<<<<<<<
7381 * raise make_ex(ret, "error calling ceph_init")
7382 * self.state = "initialized"
7383 */
7384 __pyx_t_3 = ((__pyx_v_ret != 0) != 0);
7385 if (__pyx_t_3) {
7386
7387 /* "cephfs.pyx":596
7388 * ret = ceph_init(self.cluster)
7389 * if ret != 0:
7390 * raise make_ex(ret, "error calling ceph_init") # <<<<<<<<<<<<<<
7391 * self.state = "initialized"
7392 *
7393 */
7394 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__7394; goto __pyx_L1_error;}
7395 __Pyx_GOTREF(__pyx_t_2);
7396 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_calling_ceph_init); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__7396; goto __pyx_L1_error;}
7397 __Pyx_GOTREF(__pyx_t_1);
7398 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7399 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7400 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7401 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__7401; goto __pyx_L1_error;}
7402
7403 /* "cephfs.pyx":595
7404 * with nogil:
7405 * ret = ceph_init(self.cluster)
7406 * if ret != 0: # <<<<<<<<<<<<<<
7407 * raise make_ex(ret, "error calling ceph_init")
7408 * self.state = "initialized"
7409 */
7410 }
7411
7412 /* "cephfs.pyx":597
7413 * if ret != 0:
7414 * raise make_ex(ret, "error calling ceph_init")
7415 * self.state = "initialized" # <<<<<<<<<<<<<<
7416 *
7417 * def mount(self, mount_root=None, filesystem_name=None):
7418 */
7419 __Pyx_INCREF(__pyx_n_s_initialized)( ((PyObject*)(__pyx_n_s_initialized))->ob_refcnt++);
7420 __Pyx_GIVEREF(__pyx_n_s_initialized);
7421 __Pyx_GOTREF(__pyx_v_self->state);
7422 __Pyx_DECREF(__pyx_v_self->state)do { if ( --((PyObject*)(__pyx_v_self->state))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
state)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->state)))); } while (0)
;
7423 __pyx_v_self->state = __pyx_n_s_initialized;
7424
7425 /* "cephfs.pyx":588
7426 * raise make_ex(ret, "error calling conf_set")
7427 *
7428 * def init(self): # <<<<<<<<<<<<<<
7429 * """
7430 * Initialize the filesystem client (but do not mount the filesystem yet)
7431 */
7432
7433 /* function exit code */
7434 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
7435 goto __pyx_L0;
7436 __pyx_L1_error:;
7437 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
7438 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
7439 __Pyx_AddTraceback("cephfs.LibCephFS.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
7440 __pyx_r = NULL((void*)0);
7441 __pyx_L0:;
7442 __Pyx_XGIVEREF(__pyx_r);
7443 __Pyx_RefNannyFinishContext();
7444 return __pyx_r;
7445}
7446
7447/* "cephfs.pyx":599
7448 * self.state = "initialized"
7449 *
7450 * def mount(self, mount_root=None, filesystem_name=None): # <<<<<<<<<<<<<<
7451 * """
7452 * Perform a mount using the path for the root of the mount.
7453 */
7454
7455/* Python wrapper */
7456static PyObject *__pyx_pw_6cephfs_9LibCephFS_29mount(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7457static char __pyx_doc_6cephfs_9LibCephFS_28mount[] = "\n Perform a mount using the path for the root of the mount.\n ";
7458static PyObject *__pyx_pw_6cephfs_9LibCephFS_29mount(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7459 PyObject *__pyx_v_mount_root = 0;
7460 PyObject *__pyx_v_filesystem_name = 0;
7461 int __pyx_lineno = 0;
7462 const char *__pyx_filename = NULL((void*)0);
7463 int __pyx_clineno = 0;
7464 PyObject *__pyx_r = 0;
7465 __Pyx_RefNannyDeclarations
7466 __Pyx_RefNannySetupContext("mount (wrapper)", 0);
7467 {
7468 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mount_root,&__pyx_n_s_filesystem_name,0};
7469 PyObject* values[2] = {0,0};
7470 values[0] = ((PyObject *)Py_None(&_Py_NoneStruct));
7471 values[1] = ((PyObject *)Py_None(&_Py_NoneStruct));
7472 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
7473 Py_ssize_t kw_args;
7474 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
7475 switch (pos_args) {
7476 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
7477 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
7478 case 0: break;
7479 default: goto __pyx_L5_argtuple_error;
7480 }
7481 kw_args = PyDict_Size(__pyx_kwds);
7482 switch (pos_args) {
7483 case 0:
7484 if (kw_args > 0) {
7485 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mount_root);
7486 if (value) { values[0] = value; kw_args--; }
7487 }
7488 case 1:
7489 if (kw_args > 0) {
7490 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filesystem_name);
7491 if (value) { values[1] = value; kw_args--; }
7492 }
7493 }
7494 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
7495 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mount") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mount") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__7495; goto __pyx_L3_error;}
7496 }
7497 } else {
7498 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
7499 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
7500 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
7501 case 0: break;
7502 default: goto __pyx_L5_argtuple_error;
7503 }
7504 }
7505 __pyx_v_mount_root = values[0];
7506 __pyx_v_filesystem_name = values[1];
7507 }
7508 goto __pyx_L4_argument_unpacking_done;
7509 __pyx_L5_argtuple_error:;
7510 __Pyx_RaiseArgtupleInvalid("mount", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__7510; goto __pyx_L3_error;}
7511 __pyx_L3_error:;
7512 __Pyx_AddTraceback("cephfs.LibCephFS.mount", __pyx_clineno, __pyx_lineno, __pyx_filename);
7513 __Pyx_RefNannyFinishContext();
7514 return NULL((void*)0);
7515 __pyx_L4_argument_unpacking_done:;
7516 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_28mount(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_mount_root, __pyx_v_filesystem_name);
7517
7518 /* function exit code */
7519 __Pyx_RefNannyFinishContext();
7520 return __pyx_r;
7521}
7522
7523static PyObject *__pyx_pf_6cephfs_9LibCephFS_28mount(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_mount_root, PyObject *__pyx_v_filesystem_name) {
7524 char *__pyx_v__filesystem_name;
7525 int __pyx_v_ret;
7526 PyObject *__pyx_v_root = NULL((void*)0);
7527 char *__pyx_v__mount_root;
7528 PyObject *__pyx_r = NULL((void*)0);
7529 __Pyx_RefNannyDeclarations
7530 int __pyx_t_1;
7531 PyObject *__pyx_t_2 = NULL((void*)0);
7532 PyObject *__pyx_t_3 = NULL((void*)0);
7533 PyObject *__pyx_t_4 = NULL((void*)0);
7534 int __pyx_t_5;
7535 char *__pyx_t_6;
7536 int __pyx_lineno = 0;
7537 const char *__pyx_filename = NULL((void*)0);
7538 int __pyx_clineno = 0;
7539 __Pyx_RefNannySetupContext("mount", 0);
7540 __Pyx_INCREF(__pyx_v_filesystem_name)( ((PyObject*)(__pyx_v_filesystem_name))->ob_refcnt++);
7541
7542 /* "cephfs.pyx":603
7543 * Perform a mount using the path for the root of the mount.
7544 * """
7545 * if self.state == "configuring": # <<<<<<<<<<<<<<
7546 * self.init()
7547 * self.require_state("initialized")
7548 */
7549 __pyx_t_1 = (__Pyx_PyString_Equals__Pyx_PyBytes_Equals(__pyx_v_self->state, __pyx_n_s_configuring, Py_EQ2)); if (unlikely(__pyx_t_1 < 0)__builtin_expect(!!(__pyx_t_1 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__7549; goto __pyx_L1_error;}
7550 if (__pyx_t_1) {
7551
7552 /* "cephfs.pyx":604
7553 * """
7554 * if self.state == "configuring":
7555 * self.init() # <<<<<<<<<<<<<<
7556 * self.require_state("initialized")
7557 *
7558 */
7559 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__7559; goto __pyx_L1_error;}
7560 __Pyx_GOTREF(__pyx_t_3);
7561 __pyx_t_4 = NULL((void*)0);
7562 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
7563 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
7564 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
7565 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
7566 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
7567 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
7568 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
7569 }
7570 }
7571 if (__pyx_t_4) {
7572 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__7572; goto __pyx_L1_error;}
7573 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
7574 } else {
7575 __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__7575; goto __pyx_L1_error;}
7576 }
7577 __Pyx_GOTREF(__pyx_t_2);
7578 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
7579 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7580
7581 /* "cephfs.pyx":603
7582 * Perform a mount using the path for the root of the mount.
7583 * """
7584 * if self.state == "configuring": # <<<<<<<<<<<<<<
7585 * self.init()
7586 * self.require_state("initialized")
7587 */
7588 }
7589
7590 /* "cephfs.pyx":605
7591 * if self.state == "configuring":
7592 * self.init()
7593 * self.require_state("initialized") # <<<<<<<<<<<<<<
7594 *
7595 * # Configure which filesystem to mount if one was specified
7596 */
7597 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__7597; goto __pyx_L1_error;}
7598 __Pyx_GOTREF(__pyx_t_2);
7599 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__12, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__7599; goto __pyx_L1_error;}
7600 __Pyx_GOTREF(__pyx_t_3);
7601 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7602 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
7603
7604 /* "cephfs.pyx":608
7605 *
7606 * # Configure which filesystem to mount if one was specified
7607 * if filesystem_name is None: # <<<<<<<<<<<<<<
7608 * filesystem_name = b""
7609 * cdef:
7610 */
7611 __pyx_t_1 = (__pyx_v_filesystem_name == Py_None(&_Py_NoneStruct));
7612 __pyx_t_5 = (__pyx_t_1 != 0);
7613 if (__pyx_t_5) {
7614
7615 /* "cephfs.pyx":609
7616 * # Configure which filesystem to mount if one was specified
7617 * if filesystem_name is None:
7618 * filesystem_name = b"" # <<<<<<<<<<<<<<
7619 * cdef:
7620 * char *_filesystem_name = filesystem_name
7621 */
7622 __Pyx_INCREF(__pyx_kp_b__7)( ((PyObject*)(__pyx_kp_b__7))->ob_refcnt++);
7623 __Pyx_DECREF_SET(__pyx_v_filesystem_name, __pyx_kp_b__7)do { PyObject *tmp = (PyObject *) __pyx_v_filesystem_name; __pyx_v_filesystem_name
= __pyx_kp_b__7; do { if ( --((PyObject*)(tmp))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
7624
7625 /* "cephfs.pyx":608
7626 *
7627 * # Configure which filesystem to mount if one was specified
7628 * if filesystem_name is None: # <<<<<<<<<<<<<<
7629 * filesystem_name = b""
7630 * cdef:
7631 */
7632 }
7633
7634 /* "cephfs.pyx":611
7635 * filesystem_name = b""
7636 * cdef:
7637 * char *_filesystem_name = filesystem_name # <<<<<<<<<<<<<<
7638 * if filesystem_name:
7639 * with nogil:
7640 */
7641 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_filesystem_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__7641; goto __pyx_L1_error;}
7642 __pyx_v__filesystem_name = __pyx_t_6;
7643
7644 /* "cephfs.pyx":612
7645 * cdef:
7646 * char *_filesystem_name = filesystem_name
7647 * if filesystem_name: # <<<<<<<<<<<<<<
7648 * with nogil:
7649 * ret = ceph_select_filesystem(self.cluster,
7650 */
7651 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_filesystem_name); if (unlikely(__pyx_t_5 < 0)__builtin_expect(!!(__pyx_t_5 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__7651; goto __pyx_L1_error;}
7652 if (__pyx_t_5) {
7653
7654 /* "cephfs.pyx":613
7655 * char *_filesystem_name = filesystem_name
7656 * if filesystem_name:
7657 * with nogil: # <<<<<<<<<<<<<<
7658 * ret = ceph_select_filesystem(self.cluster,
7659 * _filesystem_name)
7660 */
7661 {
7662 #ifdef WITH_THREAD1
7663 PyThreadState *_save;
7664 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
7665 #endif
7666 /*try:*/ {
7667
7668 /* "cephfs.pyx":614
7669 * if filesystem_name:
7670 * with nogil:
7671 * ret = ceph_select_filesystem(self.cluster, # <<<<<<<<<<<<<<
7672 * _filesystem_name)
7673 * if ret != 0:
7674 */
7675 __pyx_v_ret = ceph_select_filesystem(__pyx_v_self->cluster, __pyx_v__filesystem_name);
7676 }
7677
7678 /* "cephfs.pyx":613
7679 * char *_filesystem_name = filesystem_name
7680 * if filesystem_name:
7681 * with nogil: # <<<<<<<<<<<<<<
7682 * ret = ceph_select_filesystem(self.cluster,
7683 * _filesystem_name)
7684 */
7685 /*finally:*/ {
7686 /*normal exit:*/{
7687 #ifdef WITH_THREAD1
7688 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
7689 #endif
7690 goto __pyx_L8;
7691 }
7692 __pyx_L8:;
7693 }
7694 }
7695
7696 /* "cephfs.pyx":616
7697 * ret = ceph_select_filesystem(self.cluster,
7698 * _filesystem_name)
7699 * if ret != 0: # <<<<<<<<<<<<<<
7700 * raise make_ex(ret, "error calling ceph_select_filesystem")
7701 *
7702 */
7703 __pyx_t_5 = ((__pyx_v_ret != 0) != 0);
7704 if (__pyx_t_5) {
7705
7706 /* "cephfs.pyx":617
7707 * _filesystem_name)
7708 * if ret != 0:
7709 * raise make_ex(ret, "error calling ceph_select_filesystem") # <<<<<<<<<<<<<<
7710 *
7711 * # Prepare mount_root argument, default to "/"
7712 */
7713 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__7713; goto __pyx_L1_error;}
7714 __Pyx_GOTREF(__pyx_t_3);
7715 __pyx_t_2 = __pyx_f_6cephfs_make_ex(__pyx_t_3, __pyx_kp_s_error_calling_ceph_select_filesy); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__7715; goto __pyx_L1_error;}
7716 __Pyx_GOTREF(__pyx_t_2);
7717 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
7718 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
7719 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7720 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__7720; goto __pyx_L1_error;}
7721
7722 /* "cephfs.pyx":616
7723 * ret = ceph_select_filesystem(self.cluster,
7724 * _filesystem_name)
7725 * if ret != 0: # <<<<<<<<<<<<<<
7726 * raise make_ex(ret, "error calling ceph_select_filesystem")
7727 *
7728 */
7729 }
7730
7731 /* "cephfs.pyx":612
7732 * cdef:
7733 * char *_filesystem_name = filesystem_name
7734 * if filesystem_name: # <<<<<<<<<<<<<<
7735 * with nogil:
7736 * ret = ceph_select_filesystem(self.cluster,
7737 */
7738 }
7739
7740 /* "cephfs.pyx":620
7741 *
7742 * # Prepare mount_root argument, default to "/"
7743 * root = b"/" if mount_root is None else mount_root # <<<<<<<<<<<<<<
7744 * cdef:
7745 * char *_mount_root = root
7746 */
7747 __pyx_t_5 = (__pyx_v_mount_root == Py_None(&_Py_NoneStruct));
7748 if ((__pyx_t_5 != 0)) {
7749 __Pyx_INCREF(__pyx_kp_b__13)( ((PyObject*)(__pyx_kp_b__13))->ob_refcnt++);
7750 __pyx_t_2 = __pyx_kp_b__13;
7751 } else {
7752 __Pyx_INCREF(__pyx_v_mount_root)( ((PyObject*)(__pyx_v_mount_root))->ob_refcnt++);
7753 __pyx_t_2 = __pyx_v_mount_root;
7754 }
7755 __pyx_v_root = __pyx_t_2;
7756 __pyx_t_2 = 0;
7757
7758 /* "cephfs.pyx":622
7759 * root = b"/" if mount_root is None else mount_root
7760 * cdef:
7761 * char *_mount_root = root # <<<<<<<<<<<<<<
7762 *
7763 * with nogil:
7764 */
7765 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_root); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__7765; goto __pyx_L1_error;}
7766 __pyx_v__mount_root = __pyx_t_6;
7767
7768 /* "cephfs.pyx":624
7769 * char *_mount_root = root
7770 *
7771 * with nogil: # <<<<<<<<<<<<<<
7772 * ret = ceph_mount(self.cluster, _mount_root)
7773 * if ret != 0:
7774 */
7775 {
7776 #ifdef WITH_THREAD1
7777 PyThreadState *_save;
7778 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
7779 #endif
7780 /*try:*/ {
7781
7782 /* "cephfs.pyx":625
7783 *
7784 * with nogil:
7785 * ret = ceph_mount(self.cluster, _mount_root) # <<<<<<<<<<<<<<
7786 * if ret != 0:
7787 * raise make_ex(ret, "error calling ceph_mount")
7788 */
7789 __pyx_v_ret = ceph_mount(__pyx_v_self->cluster, __pyx_v__mount_root);
7790 }
7791
7792 /* "cephfs.pyx":624
7793 * char *_mount_root = root
7794 *
7795 * with nogil: # <<<<<<<<<<<<<<
7796 * ret = ceph_mount(self.cluster, _mount_root)
7797 * if ret != 0:
7798 */
7799 /*finally:*/ {
7800 /*normal exit:*/{
7801 #ifdef WITH_THREAD1
7802 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
7803 #endif
7804 goto __pyx_L12;
7805 }
7806 __pyx_L12:;
7807 }
7808 }
7809
7810 /* "cephfs.pyx":626
7811 * with nogil:
7812 * ret = ceph_mount(self.cluster, _mount_root)
7813 * if ret != 0: # <<<<<<<<<<<<<<
7814 * raise make_ex(ret, "error calling ceph_mount")
7815 * self.state = "mounted"
7816 */
7817 __pyx_t_5 = ((__pyx_v_ret != 0) != 0);
7818 if (__pyx_t_5) {
7819
7820 /* "cephfs.pyx":627
7821 * ret = ceph_mount(self.cluster, _mount_root)
7822 * if ret != 0:
7823 * raise make_ex(ret, "error calling ceph_mount") # <<<<<<<<<<<<<<
7824 * self.state = "mounted"
7825 *
7826 */
7827 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__7827; goto __pyx_L1_error;}
7828 __Pyx_GOTREF(__pyx_t_2);
7829 __pyx_t_3 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_calling_ceph_mount); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__7829; goto __pyx_L1_error;}
7830 __Pyx_GOTREF(__pyx_t_3);
7831 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7832 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
7833 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
7834 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__7834; goto __pyx_L1_error;}
7835
7836 /* "cephfs.pyx":626
7837 * with nogil:
7838 * ret = ceph_mount(self.cluster, _mount_root)
7839 * if ret != 0: # <<<<<<<<<<<<<<
7840 * raise make_ex(ret, "error calling ceph_mount")
7841 * self.state = "mounted"
7842 */
7843 }
7844
7845 /* "cephfs.pyx":628
7846 * if ret != 0:
7847 * raise make_ex(ret, "error calling ceph_mount")
7848 * self.state = "mounted" # <<<<<<<<<<<<<<
7849 *
7850 * def unmount(self):
7851 */
7852 __Pyx_INCREF(__pyx_n_s_mounted)( ((PyObject*)(__pyx_n_s_mounted))->ob_refcnt++);
7853 __Pyx_GIVEREF(__pyx_n_s_mounted);
7854 __Pyx_GOTREF(__pyx_v_self->state);
7855 __Pyx_DECREF(__pyx_v_self->state)do { if ( --((PyObject*)(__pyx_v_self->state))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
state)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->state)))); } while (0)
;
7856 __pyx_v_self->state = __pyx_n_s_mounted;
7857
7858 /* "cephfs.pyx":599
7859 * self.state = "initialized"
7860 *
7861 * def mount(self, mount_root=None, filesystem_name=None): # <<<<<<<<<<<<<<
7862 * """
7863 * Perform a mount using the path for the root of the mount.
7864 */
7865
7866 /* function exit code */
7867 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
7868 goto __pyx_L0;
7869 __pyx_L1_error:;
7870 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
7871 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
7872 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
7873 __Pyx_AddTraceback("cephfs.LibCephFS.mount", __pyx_clineno, __pyx_lineno, __pyx_filename);
7874 __pyx_r = NULL((void*)0);
7875 __pyx_L0:;
7876 __Pyx_XDECREF(__pyx_v_root)do { if ((__pyx_v_root) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_root))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_root)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_root)))); } while (0); } while
(0)
;
7877 __Pyx_XDECREF(__pyx_v_filesystem_name)do { if ((__pyx_v_filesystem_name) == ((void*)0)) ; else do {
if ( --((PyObject*)(__pyx_v_filesystem_name))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_filesystem_name
)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_filesystem_name
)))); } while (0); } while (0)
;
7878 __Pyx_XGIVEREF(__pyx_r);
7879 __Pyx_RefNannyFinishContext();
7880 return __pyx_r;
7881}
7882
7883/* "cephfs.pyx":630
7884 * self.state = "mounted"
7885 *
7886 * def unmount(self): # <<<<<<<<<<<<<<
7887 * """
7888 * Unmount a mount handle.
7889 */
7890
7891/* Python wrapper */
7892static PyObject *__pyx_pw_6cephfs_9LibCephFS_31unmount(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
7893static char __pyx_doc_6cephfs_9LibCephFS_30unmount[] = "\n Unmount a mount handle.\n ";
7894static PyObject *__pyx_pw_6cephfs_9LibCephFS_31unmount(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
7895 PyObject *__pyx_r = 0;
7896 __Pyx_RefNannyDeclarations
7897 __Pyx_RefNannySetupContext("unmount (wrapper)", 0);
7898 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_30unmount(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
7899
7900 /* function exit code */
7901 __Pyx_RefNannyFinishContext();
7902 return __pyx_r;
7903}
7904
7905static PyObject *__pyx_pf_6cephfs_9LibCephFS_30unmount(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
7906 int __pyx_v_ret;
7907 PyObject *__pyx_r = NULL((void*)0);
7908 __Pyx_RefNannyDeclarations
7909 PyObject *__pyx_t_1 = NULL((void*)0);
7910 PyObject *__pyx_t_2 = NULL((void*)0);
7911 int __pyx_t_3;
7912 int __pyx_lineno = 0;
7913 const char *__pyx_filename = NULL((void*)0);
7914 int __pyx_clineno = 0;
7915 __Pyx_RefNannySetupContext("unmount", 0);
7916
7917 /* "cephfs.pyx":634
7918 * Unmount a mount handle.
7919 * """
7920 * self.require_state("mounted") # <<<<<<<<<<<<<<
7921 * with nogil:
7922 * ret = ceph_unmount(self.cluster)
7923 */
7924 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__7924; goto __pyx_L1_error;}
7925 __Pyx_GOTREF(__pyx_t_1);
7926 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__14, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__7926; goto __pyx_L1_error;}
7927 __Pyx_GOTREF(__pyx_t_2);
7928 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7929 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7930
7931 /* "cephfs.pyx":635
7932 * """
7933 * self.require_state("mounted")
7934 * with nogil: # <<<<<<<<<<<<<<
7935 * ret = ceph_unmount(self.cluster)
7936 * if ret != 0:
7937 */
7938 {
7939 #ifdef WITH_THREAD1
7940 PyThreadState *_save;
7941 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
7942 #endif
7943 /*try:*/ {
7944
7945 /* "cephfs.pyx":636
7946 * self.require_state("mounted")
7947 * with nogil:
7948 * ret = ceph_unmount(self.cluster) # <<<<<<<<<<<<<<
7949 * if ret != 0:
7950 * raise make_ex(ret, "error calling ceph_unmount")
7951 */
7952 __pyx_v_ret = ceph_unmount(__pyx_v_self->cluster);
7953 }
7954
7955 /* "cephfs.pyx":635
7956 * """
7957 * self.require_state("mounted")
7958 * with nogil: # <<<<<<<<<<<<<<
7959 * ret = ceph_unmount(self.cluster)
7960 * if ret != 0:
7961 */
7962 /*finally:*/ {
7963 /*normal exit:*/{
7964 #ifdef WITH_THREAD1
7965 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
7966 #endif
7967 goto __pyx_L5;
7968 }
7969 __pyx_L5:;
7970 }
7971 }
7972
7973 /* "cephfs.pyx":637
7974 * with nogil:
7975 * ret = ceph_unmount(self.cluster)
7976 * if ret != 0: # <<<<<<<<<<<<<<
7977 * raise make_ex(ret, "error calling ceph_unmount")
7978 * self.state = "initialized"
7979 */
7980 __pyx_t_3 = ((__pyx_v_ret != 0) != 0);
7981 if (__pyx_t_3) {
7982
7983 /* "cephfs.pyx":638
7984 * ret = ceph_unmount(self.cluster)
7985 * if ret != 0:
7986 * raise make_ex(ret, "error calling ceph_unmount") # <<<<<<<<<<<<<<
7987 * self.state = "initialized"
7988 *
7989 */
7990 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__7990; goto __pyx_L1_error;}
7991 __Pyx_GOTREF(__pyx_t_2);
7992 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_calling_ceph_unmount); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__7992; goto __pyx_L1_error;}
7993 __Pyx_GOTREF(__pyx_t_1);
7994 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7995 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7996 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7997 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__7997; goto __pyx_L1_error;}
7998
7999 /* "cephfs.pyx":637
8000 * with nogil:
8001 * ret = ceph_unmount(self.cluster)
8002 * if ret != 0: # <<<<<<<<<<<<<<
8003 * raise make_ex(ret, "error calling ceph_unmount")
8004 * self.state = "initialized"
8005 */
8006 }
8007
8008 /* "cephfs.pyx":639
8009 * if ret != 0:
8010 * raise make_ex(ret, "error calling ceph_unmount")
8011 * self.state = "initialized" # <<<<<<<<<<<<<<
8012 *
8013 * def abort_conn(self):
8014 */
8015 __Pyx_INCREF(__pyx_n_s_initialized)( ((PyObject*)(__pyx_n_s_initialized))->ob_refcnt++);
8016 __Pyx_GIVEREF(__pyx_n_s_initialized);
8017 __Pyx_GOTREF(__pyx_v_self->state);
8018 __Pyx_DECREF(__pyx_v_self->state)do { if ( --((PyObject*)(__pyx_v_self->state))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
state)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->state)))); } while (0)
;
8019 __pyx_v_self->state = __pyx_n_s_initialized;
8020
8021 /* "cephfs.pyx":630
8022 * self.state = "mounted"
8023 *
8024 * def unmount(self): # <<<<<<<<<<<<<<
8025 * """
8026 * Unmount a mount handle.
8027 */
8028
8029 /* function exit code */
8030 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
8031 goto __pyx_L0;
8032 __pyx_L1_error:;
8033 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
8034 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
8035 __Pyx_AddTraceback("cephfs.LibCephFS.unmount", __pyx_clineno, __pyx_lineno, __pyx_filename);
8036 __pyx_r = NULL((void*)0);
8037 __pyx_L0:;
8038 __Pyx_XGIVEREF(__pyx_r);
8039 __Pyx_RefNannyFinishContext();
8040 return __pyx_r;
8041}
8042
8043/* "cephfs.pyx":641
8044 * self.state = "initialized"
8045 *
8046 * def abort_conn(self): # <<<<<<<<<<<<<<
8047 * """
8048 * Abort mds connections.
8049 */
8050
8051/* Python wrapper */
8052static PyObject *__pyx_pw_6cephfs_9LibCephFS_33abort_conn(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
8053static char __pyx_doc_6cephfs_9LibCephFS_32abort_conn[] = "\n Abort mds connections.\n ";
8054static PyObject *__pyx_pw_6cephfs_9LibCephFS_33abort_conn(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
8055 PyObject *__pyx_r = 0;
8056 __Pyx_RefNannyDeclarations
8057 __Pyx_RefNannySetupContext("abort_conn (wrapper)", 0);
8058 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_32abort_conn(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
8059
8060 /* function exit code */
8061 __Pyx_RefNannyFinishContext();
8062 return __pyx_r;
8063}
8064
8065static PyObject *__pyx_pf_6cephfs_9LibCephFS_32abort_conn(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
8066 int __pyx_v_ret;
8067 PyObject *__pyx_r = NULL((void*)0);
8068 __Pyx_RefNannyDeclarations
8069 PyObject *__pyx_t_1 = NULL((void*)0);
8070 PyObject *__pyx_t_2 = NULL((void*)0);
8071 int __pyx_t_3;
8072 int __pyx_lineno = 0;
8073 const char *__pyx_filename = NULL((void*)0);
8074 int __pyx_clineno = 0;
8075 __Pyx_RefNannySetupContext("abort_conn", 0);
8076
8077 /* "cephfs.pyx":645
8078 * Abort mds connections.
8079 * """
8080 * self.require_state("mounted") # <<<<<<<<<<<<<<
8081 * with nogil:
8082 * ret = ceph_abort_conn(self.cluster)
8083 */
8084 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__8084; goto __pyx_L1_error;}
8085 __Pyx_GOTREF(__pyx_t_1);
8086 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__15, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__8086; goto __pyx_L1_error;}
8087 __Pyx_GOTREF(__pyx_t_2);
8088 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8089 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
8090
8091 /* "cephfs.pyx":646
8092 * """
8093 * self.require_state("mounted")
8094 * with nogil: # <<<<<<<<<<<<<<
8095 * ret = ceph_abort_conn(self.cluster)
8096 * if ret != 0:
8097 */
8098 {
8099 #ifdef WITH_THREAD1
8100 PyThreadState *_save;
8101 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
8102 #endif
8103 /*try:*/ {
8104
8105 /* "cephfs.pyx":647
8106 * self.require_state("mounted")
8107 * with nogil:
8108 * ret = ceph_abort_conn(self.cluster) # <<<<<<<<<<<<<<
8109 * if ret != 0:
8110 * raise make_ex(ret, "error calling ceph_abort_conn")
8111 */
8112 __pyx_v_ret = ceph_abort_conn(__pyx_v_self->cluster);
8113 }
8114
8115 /* "cephfs.pyx":646
8116 * """
8117 * self.require_state("mounted")
8118 * with nogil: # <<<<<<<<<<<<<<
8119 * ret = ceph_abort_conn(self.cluster)
8120 * if ret != 0:
8121 */
8122 /*finally:*/ {
8123 /*normal exit:*/{
8124 #ifdef WITH_THREAD1
8125 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
8126 #endif
8127 goto __pyx_L5;
8128 }
8129 __pyx_L5:;
8130 }
8131 }
8132
8133 /* "cephfs.pyx":648
8134 * with nogil:
8135 * ret = ceph_abort_conn(self.cluster)
8136 * if ret != 0: # <<<<<<<<<<<<<<
8137 * raise make_ex(ret, "error calling ceph_abort_conn")
8138 * self.state = "initialized"
8139 */
8140 __pyx_t_3 = ((__pyx_v_ret != 0) != 0);
8141 if (__pyx_t_3) {
8142
8143 /* "cephfs.pyx":649
8144 * ret = ceph_abort_conn(self.cluster)
8145 * if ret != 0:
8146 * raise make_ex(ret, "error calling ceph_abort_conn") # <<<<<<<<<<<<<<
8147 * self.state = "initialized"
8148 *
8149 */
8150 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__8150; goto __pyx_L1_error;}
8151 __Pyx_GOTREF(__pyx_t_2);
8152 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_calling_ceph_abort_conn); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__8152; goto __pyx_L1_error;}
8153 __Pyx_GOTREF(__pyx_t_1);
8154 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
8155 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8156 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8157 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__8157; goto __pyx_L1_error;}
8158
8159 /* "cephfs.pyx":648
8160 * with nogil:
8161 * ret = ceph_abort_conn(self.cluster)
8162 * if ret != 0: # <<<<<<<<<<<<<<
8163 * raise make_ex(ret, "error calling ceph_abort_conn")
8164 * self.state = "initialized"
8165 */
8166 }
8167
8168 /* "cephfs.pyx":650
8169 * if ret != 0:
8170 * raise make_ex(ret, "error calling ceph_abort_conn")
8171 * self.state = "initialized" # <<<<<<<<<<<<<<
8172 *
8173 * def get_instance_id(self):
8174 */
8175 __Pyx_INCREF(__pyx_n_s_initialized)( ((PyObject*)(__pyx_n_s_initialized))->ob_refcnt++);
8176 __Pyx_GIVEREF(__pyx_n_s_initialized);
8177 __Pyx_GOTREF(__pyx_v_self->state);
8178 __Pyx_DECREF(__pyx_v_self->state)do { if ( --((PyObject*)(__pyx_v_self->state))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
state)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->state)))); } while (0)
;
8179 __pyx_v_self->state = __pyx_n_s_initialized;
8180
8181 /* "cephfs.pyx":641
8182 * self.state = "initialized"
8183 *
8184 * def abort_conn(self): # <<<<<<<<<<<<<<
8185 * """
8186 * Abort mds connections.
8187 */
8188
8189 /* function exit code */
8190 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
8191 goto __pyx_L0;
8192 __pyx_L1_error:;
8193 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
8194 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
8195 __Pyx_AddTraceback("cephfs.LibCephFS.abort_conn", __pyx_clineno, __pyx_lineno, __pyx_filename);
8196 __pyx_r = NULL((void*)0);
8197 __pyx_L0:;
8198 __Pyx_XGIVEREF(__pyx_r);
8199 __Pyx_RefNannyFinishContext();
8200 return __pyx_r;
8201}
8202
8203/* "cephfs.pyx":652
8204 * self.state = "initialized"
8205 *
8206 * def get_instance_id(self): # <<<<<<<<<<<<<<
8207 * """
8208 * Get a global id for current instance
8209 */
8210
8211/* Python wrapper */
8212static PyObject *__pyx_pw_6cephfs_9LibCephFS_35get_instance_id(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
8213static char __pyx_doc_6cephfs_9LibCephFS_34get_instance_id[] = "\n Get a global id for current instance\n ";
8214static PyObject *__pyx_pw_6cephfs_9LibCephFS_35get_instance_id(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
8215 PyObject *__pyx_r = 0;
8216 __Pyx_RefNannyDeclarations
8217 __Pyx_RefNannySetupContext("get_instance_id (wrapper)", 0);
8218 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_34get_instance_id(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
8219
8220 /* function exit code */
8221 __Pyx_RefNannyFinishContext();
8222 return __pyx_r;
8223}
8224
8225static PyObject *__pyx_pf_6cephfs_9LibCephFS_34get_instance_id(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
8226 uint64_t __pyx_v_ret;
8227 PyObject *__pyx_r = NULL((void*)0);
8228 __Pyx_RefNannyDeclarations
8229 PyObject *__pyx_t_1 = NULL((void*)0);
8230 PyObject *__pyx_t_2 = NULL((void*)0);
8231 int __pyx_lineno = 0;
8232 const char *__pyx_filename = NULL((void*)0);
8233 int __pyx_clineno = 0;
8234 __Pyx_RefNannySetupContext("get_instance_id", 0);
8235
8236 /* "cephfs.pyx":656
8237 * Get a global id for current instance
8238 * """
8239 * self.require_state("initialized", "mounted") # <<<<<<<<<<<<<<
8240 * with nogil:
8241 * ret = ceph_get_instance_id(self.cluster)
8242 */
8243 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__8243; goto __pyx_L1_error;}
8244 __Pyx_GOTREF(__pyx_t_1);
8245 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__16, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__8245; goto __pyx_L1_error;}
8246 __Pyx_GOTREF(__pyx_t_2);
8247 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8248 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
8249
8250 /* "cephfs.pyx":657
8251 * """
8252 * self.require_state("initialized", "mounted")
8253 * with nogil: # <<<<<<<<<<<<<<
8254 * ret = ceph_get_instance_id(self.cluster)
8255 * return ret;
8256 */
8257 {
8258 #ifdef WITH_THREAD1
8259 PyThreadState *_save;
8260 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
8261 #endif
8262 /*try:*/ {
8263
8264 /* "cephfs.pyx":658
8265 * self.require_state("initialized", "mounted")
8266 * with nogil:
8267 * ret = ceph_get_instance_id(self.cluster) # <<<<<<<<<<<<<<
8268 * return ret;
8269 *
8270 */
8271 __pyx_v_ret = ceph_get_instance_id(__pyx_v_self->cluster);
8272 }
8273
8274 /* "cephfs.pyx":657
8275 * """
8276 * self.require_state("initialized", "mounted")
8277 * with nogil: # <<<<<<<<<<<<<<
8278 * ret = ceph_get_instance_id(self.cluster)
8279 * return ret;
8280 */
8281 /*finally:*/ {
8282 /*normal exit:*/{
8283 #ifdef WITH_THREAD1
8284 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
8285 #endif
8286 goto __pyx_L5;
8287 }
8288 __pyx_L5:;
8289 }
8290 }
8291
8292 /* "cephfs.pyx":659
8293 * with nogil:
8294 * ret = ceph_get_instance_id(self.cluster)
8295 * return ret; # <<<<<<<<<<<<<<
8296 *
8297 * def statfs(self, path):
8298 */
8299 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
8300 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__8300; goto __pyx_L1_error;}
8301 __Pyx_GOTREF(__pyx_t_2);
8302 __pyx_r = __pyx_t_2;
8303 __pyx_t_2 = 0;
8304 goto __pyx_L0;
8305
8306 /* "cephfs.pyx":652
8307 * self.state = "initialized"
8308 *
8309 * def get_instance_id(self): # <<<<<<<<<<<<<<
8310 * """
8311 * Get a global id for current instance
8312 */
8313
8314 /* function exit code */
8315 __pyx_L1_error:;
8316 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
8317 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
8318 __Pyx_AddTraceback("cephfs.LibCephFS.get_instance_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
8319 __pyx_r = NULL((void*)0);
8320 __pyx_L0:;
8321 __Pyx_XGIVEREF(__pyx_r);
8322 __Pyx_RefNannyFinishContext();
8323 return __pyx_r;
8324}
8325
8326/* "cephfs.pyx":661
8327 * return ret;
8328 *
8329 * def statfs(self, path): # <<<<<<<<<<<<<<
8330 * """
8331 * Perform a statfs on the ceph file system. This call fills in file system wide statistics
8332 */
8333
8334/* Python wrapper */
8335static PyObject *__pyx_pw_6cephfs_9LibCephFS_37statfs(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
8336static char __pyx_doc_6cephfs_9LibCephFS_36statfs[] = "\n Perform a statfs on the ceph file system. This call fills in file system wide statistics\n into the passed in buffer.\n \n :param path: any path within the mounted filesystem\n ";
8337static PyObject *__pyx_pw_6cephfs_9LibCephFS_37statfs(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
8338 PyObject *__pyx_r = 0;
8339 __Pyx_RefNannyDeclarations
8340 __Pyx_RefNannySetupContext("statfs (wrapper)", 0);
8341 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_36statfs(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_path));
8342
8343 /* function exit code */
8344 __Pyx_RefNannyFinishContext();
8345 return __pyx_r;
8346}
8347
8348static PyObject *__pyx_pf_6cephfs_9LibCephFS_36statfs(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path) {
8349 char *__pyx_v__path;
8350 struct statvfs __pyx_v_statbuf;
8351 int __pyx_v_ret;
8352 PyObject *__pyx_r = NULL((void*)0);
8353 __Pyx_RefNannyDeclarations
8354 PyObject *__pyx_t_1 = NULL((void*)0);
8355 PyObject *__pyx_t_2 = NULL((void*)0);
8356 PyObject *__pyx_t_3 = NULL((void*)0);
8357 Py_ssize_t __pyx_t_4;
8358 PyObject *__pyx_t_5 = NULL((void*)0);
8359 char *__pyx_t_6;
8360 int __pyx_t_7;
8361 int __pyx_lineno = 0;
8362 const char *__pyx_filename = NULL((void*)0);
8363 int __pyx_clineno = 0;
8364 __Pyx_RefNannySetupContext("statfs", 0);
8365 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
8366
8367 /* "cephfs.pyx":668
8368 * :param path: any path within the mounted filesystem
8369 * """
8370 * self.require_state("mounted") # <<<<<<<<<<<<<<
8371 * path = cstr(path, 'path')
8372 * cdef:
8373 */
8374 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__8374; goto __pyx_L1_error;}
8375 __Pyx_GOTREF(__pyx_t_1);
8376 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__17, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__8376; goto __pyx_L1_error;}
8377 __Pyx_GOTREF(__pyx_t_2);
8378 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8379 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
8380
8381 /* "cephfs.pyx":669
8382 * """
8383 * self.require_state("mounted")
8384 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
8385 * cdef:
8386 * char* _path = path
8387 */
8388 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__8388; goto __pyx_L1_error;}
8389 __Pyx_GOTREF(__pyx_t_1);
8390 __pyx_t_3 = NULL((void*)0);
8391 __pyx_t_4 = 0;
8392 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
8393 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
8394 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
8395 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
8396 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
8397 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
8398 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
8399 __pyx_t_4 = 1;
8400 }
8401 }
8402 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__8402; goto __pyx_L1_error;}
8403 __Pyx_GOTREF(__pyx_t_5);
8404 if (__pyx_t_3) {
8405 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
8406 }
8407 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
8408 __Pyx_GIVEREF(__pyx_v_path);
8409 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
8410 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
8411 __Pyx_GIVEREF(__pyx_n_s_path);
8412 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
8413 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__8413; goto __pyx_L1_error;}
8414 __Pyx_GOTREF(__pyx_t_2);
8415 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
8416 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8417 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
8418 __pyx_t_2 = 0;
8419
8420 /* "cephfs.pyx":671
8421 * path = cstr(path, 'path')
8422 * cdef:
8423 * char* _path = path # <<<<<<<<<<<<<<
8424 * statvfs statbuf
8425 *
8426 */
8427 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__8427; goto __pyx_L1_error;}
8428 __pyx_v__path = __pyx_t_6;
8429
8430 /* "cephfs.pyx":674
8431 * statvfs statbuf
8432 *
8433 * with nogil: # <<<<<<<<<<<<<<
8434 * ret = ceph_statfs(self.cluster, _path, &statbuf)
8435 * if ret < 0:
8436 */
8437 {
8438 #ifdef WITH_THREAD1
8439 PyThreadState *_save;
8440 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
8441 #endif
8442 /*try:*/ {
8443
8444 /* "cephfs.pyx":675
8445 *
8446 * with nogil:
8447 * ret = ceph_statfs(self.cluster, _path, &statbuf) # <<<<<<<<<<<<<<
8448 * if ret < 0:
8449 * raise make_ex(ret, "statfs failed: %s" % path)
8450 */
8451 __pyx_v_ret = ceph_statfs(__pyx_v_self->cluster, __pyx_v__path, (&__pyx_v_statbuf));
8452 }
8453
8454 /* "cephfs.pyx":674
8455 * statvfs statbuf
8456 *
8457 * with nogil: # <<<<<<<<<<<<<<
8458 * ret = ceph_statfs(self.cluster, _path, &statbuf)
8459 * if ret < 0:
8460 */
8461 /*finally:*/ {
8462 /*normal exit:*/{
8463 #ifdef WITH_THREAD1
8464 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
8465 #endif
8466 goto __pyx_L5;
8467 }
8468 __pyx_L5:;
8469 }
8470 }
8471
8472 /* "cephfs.pyx":676
8473 * with nogil:
8474 * ret = ceph_statfs(self.cluster, _path, &statbuf)
8475 * if ret < 0: # <<<<<<<<<<<<<<
8476 * raise make_ex(ret, "statfs failed: %s" % path)
8477 * return {'f_bsize': statbuf.f_bsize,
8478 */
8479 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
8480 if (__pyx_t_7) {
8481
8482 /* "cephfs.pyx":677
8483 * ret = ceph_statfs(self.cluster, _path, &statbuf)
8484 * if ret < 0:
8485 * raise make_ex(ret, "statfs failed: %s" % path) # <<<<<<<<<<<<<<
8486 * return {'f_bsize': statbuf.f_bsize,
8487 * 'f_frsize': statbuf.f_frsize,
8488 */
8489 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__8489; goto __pyx_L1_error;}
8490 __Pyx_GOTREF(__pyx_t_2);
8491 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_statfs_failed_s, __pyx_v_path)PyString_Format(__pyx_kp_s_statfs_failed_s, __pyx_v_path); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__8491; goto __pyx_L1_error;}
8492 __Pyx_GOTREF(__pyx_t_1);
8493 __pyx_t_5 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__8493; goto __pyx_L1_error;}
8494 __Pyx_GOTREF(__pyx_t_5);
8495 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
8496 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8497 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
8498 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
8499 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__8499; goto __pyx_L1_error;}
8500
8501 /* "cephfs.pyx":676
8502 * with nogil:
8503 * ret = ceph_statfs(self.cluster, _path, &statbuf)
8504 * if ret < 0: # <<<<<<<<<<<<<<
8505 * raise make_ex(ret, "statfs failed: %s" % path)
8506 * return {'f_bsize': statbuf.f_bsize,
8507 */
8508 }
8509
8510 /* "cephfs.pyx":678
8511 * if ret < 0:
8512 * raise make_ex(ret, "statfs failed: %s" % path)
8513 * return {'f_bsize': statbuf.f_bsize, # <<<<<<<<<<<<<<
8514 * 'f_frsize': statbuf.f_frsize,
8515 * 'f_blocks': statbuf.f_blocks,
8516 */
8517 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
8518 __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8518; goto __pyx_L1_error;}
8519 __Pyx_GOTREF(__pyx_t_5);
8520 __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.f_bsize); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8520; goto __pyx_L1_error;}
8521 __Pyx_GOTREF(__pyx_t_1);
8522 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_f_bsize, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8522; goto __pyx_L1_error;}
8523 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8524
8525 /* "cephfs.pyx":679
8526 * raise make_ex(ret, "statfs failed: %s" % path)
8527 * return {'f_bsize': statbuf.f_bsize,
8528 * 'f_frsize': statbuf.f_frsize, # <<<<<<<<<<<<<<
8529 * 'f_blocks': statbuf.f_blocks,
8530 * 'f_bfree': statbuf.f_bfree,
8531 */
8532 __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.f_frsize); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__8532; goto __pyx_L1_error;}
8533 __Pyx_GOTREF(__pyx_t_1);
8534 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_f_frsize, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8534; goto __pyx_L1_error;}
8535 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8536
8537 /* "cephfs.pyx":680
8538 * return {'f_bsize': statbuf.f_bsize,
8539 * 'f_frsize': statbuf.f_frsize,
8540 * 'f_blocks': statbuf.f_blocks, # <<<<<<<<<<<<<<
8541 * 'f_bfree': statbuf.f_bfree,
8542 * 'f_bavail': statbuf.f_bavail,
8543 */
8544 __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.f_blocks); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__8544; goto __pyx_L1_error;}
8545 __Pyx_GOTREF(__pyx_t_1);
8546 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_f_blocks, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8546; goto __pyx_L1_error;}
8547 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8548
8549 /* "cephfs.pyx":681
8550 * 'f_frsize': statbuf.f_frsize,
8551 * 'f_blocks': statbuf.f_blocks,
8552 * 'f_bfree': statbuf.f_bfree, # <<<<<<<<<<<<<<
8553 * 'f_bavail': statbuf.f_bavail,
8554 * 'f_files': statbuf.f_files,
8555 */
8556 __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.f_bfree); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__8556; goto __pyx_L1_error;}
8557 __Pyx_GOTREF(__pyx_t_1);
8558 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_f_bfree, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8558; goto __pyx_L1_error;}
8559 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8560
8561 /* "cephfs.pyx":682
8562 * 'f_blocks': statbuf.f_blocks,
8563 * 'f_bfree': statbuf.f_bfree,
8564 * 'f_bavail': statbuf.f_bavail, # <<<<<<<<<<<<<<
8565 * 'f_files': statbuf.f_files,
8566 * 'f_ffree': statbuf.f_ffree,
8567 */
8568 __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.f_bavail); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__8568; goto __pyx_L1_error;}
8569 __Pyx_GOTREF(__pyx_t_1);
8570 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_f_bavail, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8570; goto __pyx_L1_error;}
8571 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8572
8573 /* "cephfs.pyx":683
8574 * 'f_bfree': statbuf.f_bfree,
8575 * 'f_bavail': statbuf.f_bavail,
8576 * 'f_files': statbuf.f_files, # <<<<<<<<<<<<<<
8577 * 'f_ffree': statbuf.f_ffree,
8578 * 'f_favail': statbuf.f_favail,
8579 */
8580 __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.f_files); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__8580; goto __pyx_L1_error;}
8581 __Pyx_GOTREF(__pyx_t_1);
8582 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_f_files, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8582; goto __pyx_L1_error;}
8583 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8584
8585 /* "cephfs.pyx":684
8586 * 'f_bavail': statbuf.f_bavail,
8587 * 'f_files': statbuf.f_files,
8588 * 'f_ffree': statbuf.f_ffree, # <<<<<<<<<<<<<<
8589 * 'f_favail': statbuf.f_favail,
8590 * 'f_fsid': statbuf.f_fsid,
8591 */
8592 __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.f_ffree); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__8592; goto __pyx_L1_error;}
8593 __Pyx_GOTREF(__pyx_t_1);
8594 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_f_ffree, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8594; goto __pyx_L1_error;}
8595 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8596
8597 /* "cephfs.pyx":685
8598 * 'f_files': statbuf.f_files,
8599 * 'f_ffree': statbuf.f_ffree,
8600 * 'f_favail': statbuf.f_favail, # <<<<<<<<<<<<<<
8601 * 'f_fsid': statbuf.f_fsid,
8602 * 'f_flag': statbuf.f_flag,
8603 */
8604 __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.f_favail); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__8604; goto __pyx_L1_error;}
8605 __Pyx_GOTREF(__pyx_t_1);
8606 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_f_favail, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8606; goto __pyx_L1_error;}
8607 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8608
8609 /* "cephfs.pyx":686
8610 * 'f_ffree': statbuf.f_ffree,
8611 * 'f_favail': statbuf.f_favail,
8612 * 'f_fsid': statbuf.f_fsid, # <<<<<<<<<<<<<<
8613 * 'f_flag': statbuf.f_flag,
8614 * 'f_namemax': statbuf.f_namemax}
8615 */
8616 __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.f_fsid); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__8616; goto __pyx_L1_error;}
8617 __Pyx_GOTREF(__pyx_t_1);
8618 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_f_fsid, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8618; goto __pyx_L1_error;}
8619 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8620
8621 /* "cephfs.pyx":687
8622 * 'f_favail': statbuf.f_favail,
8623 * 'f_fsid': statbuf.f_fsid,
8624 * 'f_flag': statbuf.f_flag, # <<<<<<<<<<<<<<
8625 * 'f_namemax': statbuf.f_namemax}
8626 *
8627 */
8628 __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.f_flag); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__8628; goto __pyx_L1_error;}
8629 __Pyx_GOTREF(__pyx_t_1);
8630 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_f_flag, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8630; goto __pyx_L1_error;}
8631 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8632
8633 /* "cephfs.pyx":688
8634 * 'f_fsid': statbuf.f_fsid,
8635 * 'f_flag': statbuf.f_flag,
8636 * 'f_namemax': statbuf.f_namemax} # <<<<<<<<<<<<<<
8637 *
8638 * def sync_fs(self):
8639 */
8640 __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.f_namemax); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__8640; goto __pyx_L1_error;}
8641 __Pyx_GOTREF(__pyx_t_1);
8642 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_f_namemax, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__8642; goto __pyx_L1_error;}
8643 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8644 __pyx_r = __pyx_t_5;
8645 __pyx_t_5 = 0;
8646 goto __pyx_L0;
8647
8648 /* "cephfs.pyx":661
8649 * return ret;
8650 *
8651 * def statfs(self, path): # <<<<<<<<<<<<<<
8652 * """
8653 * Perform a statfs on the ceph file system. This call fills in file system wide statistics
8654 */
8655
8656 /* function exit code */
8657 __pyx_L1_error:;
8658 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
8659 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
8660 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
8661 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
8662 __Pyx_AddTraceback("cephfs.LibCephFS.statfs", __pyx_clineno, __pyx_lineno, __pyx_filename);
8663 __pyx_r = NULL((void*)0);
8664 __pyx_L0:;
8665 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
8666 __Pyx_XGIVEREF(__pyx_r);
8667 __Pyx_RefNannyFinishContext();
8668 return __pyx_r;
8669}
8670
8671/* "cephfs.pyx":690
8672 * 'f_namemax': statbuf.f_namemax}
8673 *
8674 * def sync_fs(self): # <<<<<<<<<<<<<<
8675 * """
8676 * Synchronize all filesystem data to persistent media
8677 */
8678
8679/* Python wrapper */
8680static PyObject *__pyx_pw_6cephfs_9LibCephFS_39sync_fs(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
8681static char __pyx_doc_6cephfs_9LibCephFS_38sync_fs[] = "\n Synchronize all filesystem data to persistent media\n ";
8682static PyObject *__pyx_pw_6cephfs_9LibCephFS_39sync_fs(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
8683 PyObject *__pyx_r = 0;
8684 __Pyx_RefNannyDeclarations
8685 __Pyx_RefNannySetupContext("sync_fs (wrapper)", 0);
8686 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_38sync_fs(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
8687
8688 /* function exit code */
8689 __Pyx_RefNannyFinishContext();
8690 return __pyx_r;
8691}
8692
8693static PyObject *__pyx_pf_6cephfs_9LibCephFS_38sync_fs(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
8694 int __pyx_v_ret;
8695 PyObject *__pyx_r = NULL((void*)0);
8696 __Pyx_RefNannyDeclarations
8697 PyObject *__pyx_t_1 = NULL((void*)0);
8698 PyObject *__pyx_t_2 = NULL((void*)0);
8699 int __pyx_t_3;
8700 int __pyx_lineno = 0;
8701 const char *__pyx_filename = NULL((void*)0);
8702 int __pyx_clineno = 0;
8703 __Pyx_RefNannySetupContext("sync_fs", 0);
8704
8705 /* "cephfs.pyx":694
8706 * Synchronize all filesystem data to persistent media
8707 * """
8708 * self.require_state("mounted") # <<<<<<<<<<<<<<
8709 * with nogil:
8710 * ret = ceph_sync_fs(self.cluster)
8711 */
8712 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__8712; goto __pyx_L1_error;}
8713 __Pyx_GOTREF(__pyx_t_1);
8714 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__18, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__8714; goto __pyx_L1_error;}
8715 __Pyx_GOTREF(__pyx_t_2);
8716 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8717 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
8718
8719 /* "cephfs.pyx":695
8720 * """
8721 * self.require_state("mounted")
8722 * with nogil: # <<<<<<<<<<<<<<
8723 * ret = ceph_sync_fs(self.cluster)
8724 * if ret < 0:
8725 */
8726 {
8727 #ifdef WITH_THREAD1
8728 PyThreadState *_save;
8729 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
8730 #endif
8731 /*try:*/ {
8732
8733 /* "cephfs.pyx":696
8734 * self.require_state("mounted")
8735 * with nogil:
8736 * ret = ceph_sync_fs(self.cluster) # <<<<<<<<<<<<<<
8737 * if ret < 0:
8738 * raise make_ex(ret, "sync_fs failed")
8739 */
8740 __pyx_v_ret = ceph_sync_fs(__pyx_v_self->cluster);
8741 }
8742
8743 /* "cephfs.pyx":695
8744 * """
8745 * self.require_state("mounted")
8746 * with nogil: # <<<<<<<<<<<<<<
8747 * ret = ceph_sync_fs(self.cluster)
8748 * if ret < 0:
8749 */
8750 /*finally:*/ {
8751 /*normal exit:*/{
8752 #ifdef WITH_THREAD1
8753 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
8754 #endif
8755 goto __pyx_L5;
8756 }
8757 __pyx_L5:;
8758 }
8759 }
8760
8761 /* "cephfs.pyx":697
8762 * with nogil:
8763 * ret = ceph_sync_fs(self.cluster)
8764 * if ret < 0: # <<<<<<<<<<<<<<
8765 * raise make_ex(ret, "sync_fs failed")
8766 *
8767 */
8768 __pyx_t_3 = ((__pyx_v_ret < 0) != 0);
8769 if (__pyx_t_3) {
8770
8771 /* "cephfs.pyx":698
8772 * ret = ceph_sync_fs(self.cluster)
8773 * if ret < 0:
8774 * raise make_ex(ret, "sync_fs failed") # <<<<<<<<<<<<<<
8775 *
8776 * def fsync(self, int fd, int syncdataonly):
8777 */
8778 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__8778; goto __pyx_L1_error;}
8779 __Pyx_GOTREF(__pyx_t_2);
8780 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_sync_fs_failed); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__8780; goto __pyx_L1_error;}
8781 __Pyx_GOTREF(__pyx_t_1);
8782 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
8783 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8784 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8785 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__8785; goto __pyx_L1_error;}
8786
8787 /* "cephfs.pyx":697
8788 * with nogil:
8789 * ret = ceph_sync_fs(self.cluster)
8790 * if ret < 0: # <<<<<<<<<<<<<<
8791 * raise make_ex(ret, "sync_fs failed")
8792 *
8793 */
8794 }
8795
8796 /* "cephfs.pyx":690
8797 * 'f_namemax': statbuf.f_namemax}
8798 *
8799 * def sync_fs(self): # <<<<<<<<<<<<<<
8800 * """
8801 * Synchronize all filesystem data to persistent media
8802 */
8803
8804 /* function exit code */
8805 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
8806 goto __pyx_L0;
8807 __pyx_L1_error:;
8808 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
8809 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
8810 __Pyx_AddTraceback("cephfs.LibCephFS.sync_fs", __pyx_clineno, __pyx_lineno, __pyx_filename);
8811 __pyx_r = NULL((void*)0);
8812 __pyx_L0:;
8813 __Pyx_XGIVEREF(__pyx_r);
8814 __Pyx_RefNannyFinishContext();
8815 return __pyx_r;
8816}
8817
8818/* "cephfs.pyx":700
8819 * raise make_ex(ret, "sync_fs failed")
8820 *
8821 * def fsync(self, int fd, int syncdataonly): # <<<<<<<<<<<<<<
8822 * """
8823 * Synchronize an open file to persistent media.
8824 */
8825
8826/* Python wrapper */
8827static PyObject *__pyx_pw_6cephfs_9LibCephFS_41fsync(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8828static char __pyx_doc_6cephfs_9LibCephFS_40fsync[] = "\n Synchronize an open file to persistent media.\n \n :param fd: the file descriptor of the file to sync.\n :param syncdataonly: a boolean whether to synchronize metadata and data (0)\n or just data (1).\n ";
8829static PyObject *__pyx_pw_6cephfs_9LibCephFS_41fsync(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8830 int __pyx_v_fd;
8831 int __pyx_v_syncdataonly;
8832 int __pyx_lineno = 0;
8833 const char *__pyx_filename = NULL((void*)0);
8834 int __pyx_clineno = 0;
8835 PyObject *__pyx_r = 0;
8836 __Pyx_RefNannyDeclarations
8837 __Pyx_RefNannySetupContext("fsync (wrapper)", 0);
8838 {
8839 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_syncdataonly,0};
8840 PyObject* values[2] = {0,0};
8841 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
8842 Py_ssize_t kw_args;
8843 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
8844 switch (pos_args) {
8845 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
8846 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
8847 case 0: break;
8848 default: goto __pyx_L5_argtuple_error;
8849 }
8850 kw_args = PyDict_Size(__pyx_kwds);
8851 switch (pos_args) {
8852 case 0:
8853 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd
)) != 0), 1)
) kw_args--;
8854 else goto __pyx_L5_argtuple_error;
8855 case 1:
8856 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_syncdataonly)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_syncdataonly
)) != 0), 1)
) kw_args--;
8857 else {
8858 __Pyx_RaiseArgtupleInvalid("fsync", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__8858; goto __pyx_L3_error;}
8859 }
8860 }
8861 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
8862 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fsync") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "fsync") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__8862; goto __pyx_L3_error;}
8863 }
8864 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
8865 goto __pyx_L5_argtuple_error;
8866 } else {
8867 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
8868 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
8869 }
8870 __pyx_v_fd = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_fd == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_v_fd == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__8870; goto __pyx_L3_error;}
8871 __pyx_v_syncdataonly = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_syncdataonly == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_v_syncdataonly == (int)-1) &&
PyErr_Occurred()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__8871; goto __pyx_L3_error;}
8872 }
8873 goto __pyx_L4_argument_unpacking_done;
8874 __pyx_L5_argtuple_error:;
8875 __Pyx_RaiseArgtupleInvalid("fsync", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__8875; goto __pyx_L3_error;}
8876 __pyx_L3_error:;
8877 __Pyx_AddTraceback("cephfs.LibCephFS.fsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
8878 __Pyx_RefNannyFinishContext();
8879 return NULL((void*)0);
8880 __pyx_L4_argument_unpacking_done:;
8881 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_40fsync(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_fd, __pyx_v_syncdataonly);
8882
8883 /* function exit code */
8884 __Pyx_RefNannyFinishContext();
8885 return __pyx_r;
8886}
8887
8888static PyObject *__pyx_pf_6cephfs_9LibCephFS_40fsync(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, int __pyx_v_fd, int __pyx_v_syncdataonly) {
8889 int __pyx_v_ret;
8890 PyObject *__pyx_r = NULL((void*)0);
8891 __Pyx_RefNannyDeclarations
8892 PyObject *__pyx_t_1 = NULL((void*)0);
8893 PyObject *__pyx_t_2 = NULL((void*)0);
8894 int __pyx_t_3;
8895 int __pyx_lineno = 0;
8896 const char *__pyx_filename = NULL((void*)0);
8897 int __pyx_clineno = 0;
8898 __Pyx_RefNannySetupContext("fsync", 0);
8899
8900 /* "cephfs.pyx":708
8901 * or just data (1).
8902 * """
8903 * self.require_state("mounted") # <<<<<<<<<<<<<<
8904 * with nogil:
8905 * ret = ceph_fsync(self.cluster, fd, syncdataonly)
8906 */
8907 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__8907; goto __pyx_L1_error;}
8908 __Pyx_GOTREF(__pyx_t_1);
8909 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__19, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__8909; goto __pyx_L1_error;}
8910 __Pyx_GOTREF(__pyx_t_2);
8911 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8912 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
8913
8914 /* "cephfs.pyx":709
8915 * """
8916 * self.require_state("mounted")
8917 * with nogil: # <<<<<<<<<<<<<<
8918 * ret = ceph_fsync(self.cluster, fd, syncdataonly)
8919 * if ret < 0:
8920 */
8921 {
8922 #ifdef WITH_THREAD1
8923 PyThreadState *_save;
8924 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
8925 #endif
8926 /*try:*/ {
8927
8928 /* "cephfs.pyx":710
8929 * self.require_state("mounted")
8930 * with nogil:
8931 * ret = ceph_fsync(self.cluster, fd, syncdataonly) # <<<<<<<<<<<<<<
8932 * if ret < 0:
8933 * raise make_ex(ret, "fsync failed")
8934 */
8935 __pyx_v_ret = ceph_fsync(__pyx_v_self->cluster, __pyx_v_fd, __pyx_v_syncdataonly);
8936 }
8937
8938 /* "cephfs.pyx":709
8939 * """
8940 * self.require_state("mounted")
8941 * with nogil: # <<<<<<<<<<<<<<
8942 * ret = ceph_fsync(self.cluster, fd, syncdataonly)
8943 * if ret < 0:
8944 */
8945 /*finally:*/ {
8946 /*normal exit:*/{
8947 #ifdef WITH_THREAD1
8948 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
8949 #endif
8950 goto __pyx_L5;
8951 }
8952 __pyx_L5:;
8953 }
8954 }
8955
8956 /* "cephfs.pyx":711
8957 * with nogil:
8958 * ret = ceph_fsync(self.cluster, fd, syncdataonly)
8959 * if ret < 0: # <<<<<<<<<<<<<<
8960 * raise make_ex(ret, "fsync failed")
8961 *
8962 */
8963 __pyx_t_3 = ((__pyx_v_ret < 0) != 0);
8964 if (__pyx_t_3) {
8965
8966 /* "cephfs.pyx":712
8967 * ret = ceph_fsync(self.cluster, fd, syncdataonly)
8968 * if ret < 0:
8969 * raise make_ex(ret, "fsync failed") # <<<<<<<<<<<<<<
8970 *
8971 * def getcwd(self):
8972 */
8973 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__8973; goto __pyx_L1_error;}
8974 __Pyx_GOTREF(__pyx_t_2);
8975 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_fsync_failed); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__8975; goto __pyx_L1_error;}
8976 __Pyx_GOTREF(__pyx_t_1);
8977 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
8978 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8979 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
8980 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__8980; goto __pyx_L1_error;}
8981
8982 /* "cephfs.pyx":711
8983 * with nogil:
8984 * ret = ceph_fsync(self.cluster, fd, syncdataonly)
8985 * if ret < 0: # <<<<<<<<<<<<<<
8986 * raise make_ex(ret, "fsync failed")
8987 *
8988 */
8989 }
8990
8991 /* "cephfs.pyx":700
8992 * raise make_ex(ret, "sync_fs failed")
8993 *
8994 * def fsync(self, int fd, int syncdataonly): # <<<<<<<<<<<<<<
8995 * """
8996 * Synchronize an open file to persistent media.
8997 */
8998
8999 /* function exit code */
9000 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
9001 goto __pyx_L0;
9002 __pyx_L1_error:;
9003 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
9004 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
9005 __Pyx_AddTraceback("cephfs.LibCephFS.fsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
9006 __pyx_r = NULL((void*)0);
9007 __pyx_L0:;
9008 __Pyx_XGIVEREF(__pyx_r);
9009 __Pyx_RefNannyFinishContext();
9010 return __pyx_r;
9011}
9012
9013/* "cephfs.pyx":714
9014 * raise make_ex(ret, "fsync failed")
9015 *
9016 * def getcwd(self): # <<<<<<<<<<<<<<
9017 * """
9018 * Get the current working directory.
9019 */
9020
9021/* Python wrapper */
9022static PyObject *__pyx_pw_6cephfs_9LibCephFS_43getcwd(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
9023static char __pyx_doc_6cephfs_9LibCephFS_42getcwd[] = "\n Get the current working directory.\n \n :rtype the path to the current working directory\n ";
9024static PyObject *__pyx_pw_6cephfs_9LibCephFS_43getcwd(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
9025 PyObject *__pyx_r = 0;
9026 __Pyx_RefNannyDeclarations
9027 __Pyx_RefNannySetupContext("getcwd (wrapper)", 0);
9028 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_42getcwd(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
9029
9030 /* function exit code */
9031 __Pyx_RefNannyFinishContext();
9032 return __pyx_r;
9033}
9034
9035static PyObject *__pyx_pf_6cephfs_9LibCephFS_42getcwd(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
9036 char const *__pyx_v_ret;
9037 PyObject *__pyx_r = NULL((void*)0);
9038 __Pyx_RefNannyDeclarations
9039 PyObject *__pyx_t_1 = NULL((void*)0);
9040 PyObject *__pyx_t_2 = NULL((void*)0);
9041 int __pyx_lineno = 0;
9042 const char *__pyx_filename = NULL((void*)0);
9043 int __pyx_clineno = 0;
9044 __Pyx_RefNannySetupContext("getcwd", 0);
9045
9046 /* "cephfs.pyx":720
9047 * :rtype the path to the current working directory
9048 * """
9049 * self.require_state("mounted") # <<<<<<<<<<<<<<
9050 * with nogil:
9051 * ret = ceph_getcwd(self.cluster)
9052 */
9053 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__9053; goto __pyx_L1_error;}
9054 __Pyx_GOTREF(__pyx_t_1);
9055 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__20, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__9055; goto __pyx_L1_error;}
9056 __Pyx_GOTREF(__pyx_t_2);
9057 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9058 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
9059
9060 /* "cephfs.pyx":721
9061 * """
9062 * self.require_state("mounted")
9063 * with nogil: # <<<<<<<<<<<<<<
9064 * ret = ceph_getcwd(self.cluster)
9065 * return ret
9066 */
9067 {
9068 #ifdef WITH_THREAD1
9069 PyThreadState *_save;
9070 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
9071 #endif
9072 /*try:*/ {
9073
9074 /* "cephfs.pyx":722
9075 * self.require_state("mounted")
9076 * with nogil:
9077 * ret = ceph_getcwd(self.cluster) # <<<<<<<<<<<<<<
9078 * return ret
9079 *
9080 */
9081 __pyx_v_ret = ceph_getcwd(__pyx_v_self->cluster);
9082 }
9083
9084 /* "cephfs.pyx":721
9085 * """
9086 * self.require_state("mounted")
9087 * with nogil: # <<<<<<<<<<<<<<
9088 * ret = ceph_getcwd(self.cluster)
9089 * return ret
9090 */
9091 /*finally:*/ {
9092 /*normal exit:*/{
9093 #ifdef WITH_THREAD1
9094 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
9095 #endif
9096 goto __pyx_L5;
9097 }
9098 __pyx_L5:;
9099 }
9100 }
9101
9102 /* "cephfs.pyx":723
9103 * with nogil:
9104 * ret = ceph_getcwd(self.cluster)
9105 * return ret # <<<<<<<<<<<<<<
9106 *
9107 * def chdir(self, path):
9108 */
9109 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
9110 __pyx_t_2 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__9110; goto __pyx_L1_error;}
9111 __Pyx_GOTREF(__pyx_t_2);
9112 __pyx_r = __pyx_t_2;
9113 __pyx_t_2 = 0;
9114 goto __pyx_L0;
9115
9116 /* "cephfs.pyx":714
9117 * raise make_ex(ret, "fsync failed")
9118 *
9119 * def getcwd(self): # <<<<<<<<<<<<<<
9120 * """
9121 * Get the current working directory.
9122 */
9123
9124 /* function exit code */
9125 __pyx_L1_error:;
9126 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
9127 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
9128 __Pyx_AddTraceback("cephfs.LibCephFS.getcwd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9129 __pyx_r = NULL((void*)0);
9130 __pyx_L0:;
9131 __Pyx_XGIVEREF(__pyx_r);
9132 __Pyx_RefNannyFinishContext();
9133 return __pyx_r;
9134}
9135
9136/* "cephfs.pyx":725
9137 * return ret
9138 *
9139 * def chdir(self, path): # <<<<<<<<<<<<<<
9140 * """
9141 * Change the current working directory.
9142 */
9143
9144/* Python wrapper */
9145static PyObject *__pyx_pw_6cephfs_9LibCephFS_45chdir(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
9146static char __pyx_doc_6cephfs_9LibCephFS_44chdir[] = "\n Change the current working directory.\n \n :param path the path to the working directory to change into.\n ";
9147static PyObject *__pyx_pw_6cephfs_9LibCephFS_45chdir(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
9148 PyObject *__pyx_r = 0;
9149 __Pyx_RefNannyDeclarations
9150 __Pyx_RefNannySetupContext("chdir (wrapper)", 0);
9151 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_44chdir(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_path));
9152
9153 /* function exit code */
9154 __Pyx_RefNannyFinishContext();
9155 return __pyx_r;
9156}
9157
9158static PyObject *__pyx_pf_6cephfs_9LibCephFS_44chdir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path) {
9159 char *__pyx_v__path;
9160 int __pyx_v_ret;
9161 PyObject *__pyx_r = NULL((void*)0);
9162 __Pyx_RefNannyDeclarations
9163 PyObject *__pyx_t_1 = NULL((void*)0);
9164 PyObject *__pyx_t_2 = NULL((void*)0);
9165 PyObject *__pyx_t_3 = NULL((void*)0);
9166 Py_ssize_t __pyx_t_4;
9167 PyObject *__pyx_t_5 = NULL((void*)0);
9168 char *__pyx_t_6;
9169 int __pyx_t_7;
9170 int __pyx_lineno = 0;
9171 const char *__pyx_filename = NULL((void*)0);
9172 int __pyx_clineno = 0;
9173 __Pyx_RefNannySetupContext("chdir", 0);
9174 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
9175
9176 /* "cephfs.pyx":731
9177 * :param path the path to the working directory to change into.
9178 * """
9179 * self.require_state("mounted") # <<<<<<<<<<<<<<
9180 *
9181 * path = cstr(path, 'path')
9182 */
9183 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__9183; goto __pyx_L1_error;}
9184 __Pyx_GOTREF(__pyx_t_1);
9185 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__9185; goto __pyx_L1_error;}
9186 __Pyx_GOTREF(__pyx_t_2);
9187 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9188 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
9189
9190 /* "cephfs.pyx":733
9191 * self.require_state("mounted")
9192 *
9193 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
9194 * cdef char* _path = path
9195 * with nogil:
9196 */
9197 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__9197; goto __pyx_L1_error;}
9198 __Pyx_GOTREF(__pyx_t_1);
9199 __pyx_t_3 = NULL((void*)0);
9200 __pyx_t_4 = 0;
9201 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
9202 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
9203 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
9204 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
9205 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
9206 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
9207 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
9208 __pyx_t_4 = 1;
9209 }
9210 }
9211 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__9211; goto __pyx_L1_error;}
9212 __Pyx_GOTREF(__pyx_t_5);
9213 if (__pyx_t_3) {
9214 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
9215 }
9216 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
9217 __Pyx_GIVEREF(__pyx_v_path);
9218 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
9219 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
9220 __Pyx_GIVEREF(__pyx_n_s_path);
9221 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
9222 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__9222; goto __pyx_L1_error;}
9223 __Pyx_GOTREF(__pyx_t_2);
9224 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
9225 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9226 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
9227 __pyx_t_2 = 0;
9228
9229 /* "cephfs.pyx":734
9230 *
9231 * path = cstr(path, 'path')
9232 * cdef char* _path = path # <<<<<<<<<<<<<<
9233 * with nogil:
9234 * ret = ceph_chdir(self.cluster, _path)
9235 */
9236 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__9236; goto __pyx_L1_error;}
9237 __pyx_v__path = __pyx_t_6;
9238
9239 /* "cephfs.pyx":735
9240 * path = cstr(path, 'path')
9241 * cdef char* _path = path
9242 * with nogil: # <<<<<<<<<<<<<<
9243 * ret = ceph_chdir(self.cluster, _path)
9244 * if ret < 0:
9245 */
9246 {
9247 #ifdef WITH_THREAD1
9248 PyThreadState *_save;
9249 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
9250 #endif
9251 /*try:*/ {
9252
9253 /* "cephfs.pyx":736
9254 * cdef char* _path = path
9255 * with nogil:
9256 * ret = ceph_chdir(self.cluster, _path) # <<<<<<<<<<<<<<
9257 * if ret < 0:
9258 * raise make_ex(ret, "chdir failed")
9259 */
9260 __pyx_v_ret = ceph_chdir(__pyx_v_self->cluster, __pyx_v__path);
9261 }
9262
9263 /* "cephfs.pyx":735
9264 * path = cstr(path, 'path')
9265 * cdef char* _path = path
9266 * with nogil: # <<<<<<<<<<<<<<
9267 * ret = ceph_chdir(self.cluster, _path)
9268 * if ret < 0:
9269 */
9270 /*finally:*/ {
9271 /*normal exit:*/{
9272 #ifdef WITH_THREAD1
9273 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
9274 #endif
9275 goto __pyx_L5;
9276 }
9277 __pyx_L5:;
9278 }
9279 }
9280
9281 /* "cephfs.pyx":737
9282 * with nogil:
9283 * ret = ceph_chdir(self.cluster, _path)
9284 * if ret < 0: # <<<<<<<<<<<<<<
9285 * raise make_ex(ret, "chdir failed")
9286 *
9287 */
9288 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
9289 if (__pyx_t_7) {
9290
9291 /* "cephfs.pyx":738
9292 * ret = ceph_chdir(self.cluster, _path)
9293 * if ret < 0:
9294 * raise make_ex(ret, "chdir failed") # <<<<<<<<<<<<<<
9295 *
9296 * def opendir(self, path):
9297 */
9298 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__9298; goto __pyx_L1_error;}
9299 __Pyx_GOTREF(__pyx_t_2);
9300 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_chdir_failed); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__9300; goto __pyx_L1_error;}
9301 __Pyx_GOTREF(__pyx_t_1);
9302 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
9303 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
9304 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9305 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__9305; goto __pyx_L1_error;}
9306
9307 /* "cephfs.pyx":737
9308 * with nogil:
9309 * ret = ceph_chdir(self.cluster, _path)
9310 * if ret < 0: # <<<<<<<<<<<<<<
9311 * raise make_ex(ret, "chdir failed")
9312 *
9313 */
9314 }
9315
9316 /* "cephfs.pyx":725
9317 * return ret
9318 *
9319 * def chdir(self, path): # <<<<<<<<<<<<<<
9320 * """
9321 * Change the current working directory.
9322 */
9323
9324 /* function exit code */
9325 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
9326 goto __pyx_L0;
9327 __pyx_L1_error:;
9328 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
9329 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
9330 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
9331 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
9332 __Pyx_AddTraceback("cephfs.LibCephFS.chdir", __pyx_clineno, __pyx_lineno, __pyx_filename);
9333 __pyx_r = NULL((void*)0);
9334 __pyx_L0:;
9335 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
9336 __Pyx_XGIVEREF(__pyx_r);
9337 __Pyx_RefNannyFinishContext();
9338 return __pyx_r;
9339}
9340
9341/* "cephfs.pyx":740
9342 * raise make_ex(ret, "chdir failed")
9343 *
9344 * def opendir(self, path): # <<<<<<<<<<<<<<
9345 * """
9346 * Open the given directory.
9347 */
9348
9349/* Python wrapper */
9350static PyObject *__pyx_pw_6cephfs_9LibCephFS_47opendir(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
9351static char __pyx_doc_6cephfs_9LibCephFS_46opendir[] = "\n Open the given directory.\n \n :param path: the path name of the directory to open. Must be either an absolute path\n or a path relative to the current working directory.\n :rtype handle: the open directory stream handle\n ";
9352static PyObject *__pyx_pw_6cephfs_9LibCephFS_47opendir(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
9353 PyObject *__pyx_r = 0;
9354 __Pyx_RefNannyDeclarations
9355 __Pyx_RefNannySetupContext("opendir (wrapper)", 0);
9356 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_46opendir(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_path));
9357
9358 /* function exit code */
9359 __Pyx_RefNannyFinishContext();
9360 return __pyx_r;
9361}
9362
9363static PyObject *__pyx_pf_6cephfs_9LibCephFS_46opendir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path) {
9364 char *__pyx_v__path;
9365 struct ceph_dir_result *__pyx_v_handle;
9366 int __pyx_v_ret;
9367 struct __pyx_obj_6cephfs_DirResult *__pyx_v_d = NULL((void*)0);
9368 PyObject *__pyx_r = NULL((void*)0);
9369 __Pyx_RefNannyDeclarations
9370 PyObject *__pyx_t_1 = NULL((void*)0);
9371 PyObject *__pyx_t_2 = NULL((void*)0);
9372 PyObject *__pyx_t_3 = NULL((void*)0);
9373 Py_ssize_t __pyx_t_4;
9374 PyObject *__pyx_t_5 = NULL((void*)0);
9375 char *__pyx_t_6;
9376 int __pyx_t_7;
9377 int __pyx_lineno = 0;
9378 const char *__pyx_filename = NULL((void*)0);
9379 int __pyx_clineno = 0;
9380 __Pyx_RefNannySetupContext("opendir", 0);
9381 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
9382
9383 /* "cephfs.pyx":748
9384 * :rtype handle: the open directory stream handle
9385 * """
9386 * self.require_state("mounted") # <<<<<<<<<<<<<<
9387 *
9388 * path = cstr(path, 'path')
9389 */
9390 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__9390; goto __pyx_L1_error;}
9391 __Pyx_GOTREF(__pyx_t_1);
9392 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__22, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__9392; goto __pyx_L1_error;}
9393 __Pyx_GOTREF(__pyx_t_2);
9394 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9395 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
9396
9397 /* "cephfs.pyx":750
9398 * self.require_state("mounted")
9399 *
9400 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
9401 * cdef:
9402 * char* _path = path
9403 */
9404 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__9404; goto __pyx_L1_error;}
9405 __Pyx_GOTREF(__pyx_t_1);
9406 __pyx_t_3 = NULL((void*)0);
9407 __pyx_t_4 = 0;
9408 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
9409 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
9410 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
9411 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
9412 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
9413 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
9414 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
9415 __pyx_t_4 = 1;
9416 }
9417 }
9418 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__9418; goto __pyx_L1_error;}
9419 __Pyx_GOTREF(__pyx_t_5);
9420 if (__pyx_t_3) {
9421 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
9422 }
9423 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
9424 __Pyx_GIVEREF(__pyx_v_path);
9425 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
9426 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
9427 __Pyx_GIVEREF(__pyx_n_s_path);
9428 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
9429 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__9429; goto __pyx_L1_error;}
9430 __Pyx_GOTREF(__pyx_t_2);
9431 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
9432 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9433 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
9434 __pyx_t_2 = 0;
9435
9436 /* "cephfs.pyx":752
9437 * path = cstr(path, 'path')
9438 * cdef:
9439 * char* _path = path # <<<<<<<<<<<<<<
9440 * ceph_dir_result* handle
9441 * with nogil:
9442 */
9443 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__9443; goto __pyx_L1_error;}
9444 __pyx_v__path = __pyx_t_6;
9445
9446 /* "cephfs.pyx":754
9447 * char* _path = path
9448 * ceph_dir_result* handle
9449 * with nogil: # <<<<<<<<<<<<<<
9450 * ret = ceph_opendir(self.cluster, _path, &handle);
9451 * if ret < 0:
9452 */
9453 {
9454 #ifdef WITH_THREAD1
9455 PyThreadState *_save;
9456 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
9457 #endif
9458 /*try:*/ {
9459
9460 /* "cephfs.pyx":755
9461 * ceph_dir_result* handle
9462 * with nogil:
9463 * ret = ceph_opendir(self.cluster, _path, &handle); # <<<<<<<<<<<<<<
9464 * if ret < 0:
9465 * raise make_ex(ret, "opendir failed")
9466 */
9467 __pyx_v_ret = ceph_opendir(__pyx_v_self->cluster, __pyx_v__path, (&__pyx_v_handle));
9468 }
9469
9470 /* "cephfs.pyx":754
9471 * char* _path = path
9472 * ceph_dir_result* handle
9473 * with nogil: # <<<<<<<<<<<<<<
9474 * ret = ceph_opendir(self.cluster, _path, &handle);
9475 * if ret < 0:
9476 */
9477 /*finally:*/ {
9478 /*normal exit:*/{
9479 #ifdef WITH_THREAD1
9480 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
9481 #endif
9482 goto __pyx_L5;
9483 }
9484 __pyx_L5:;
9485 }
9486 }
9487
9488 /* "cephfs.pyx":756
9489 * with nogil:
9490 * ret = ceph_opendir(self.cluster, _path, &handle);
9491 * if ret < 0: # <<<<<<<<<<<<<<
9492 * raise make_ex(ret, "opendir failed")
9493 * d = DirResult()
9494 */
9495 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
9496 if (__pyx_t_7) {
9497
9498 /* "cephfs.pyx":757
9499 * ret = ceph_opendir(self.cluster, _path, &handle);
9500 * if ret < 0:
9501 * raise make_ex(ret, "opendir failed") # <<<<<<<<<<<<<<
9502 * d = DirResult()
9503 * d.lib = self
9504 */
9505 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__9505; goto __pyx_L1_error;}
9506 __Pyx_GOTREF(__pyx_t_2);
9507 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_opendir_failed); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__9507; goto __pyx_L1_error;}
9508 __Pyx_GOTREF(__pyx_t_1);
9509 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
9510 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
9511 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9512 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__9512; goto __pyx_L1_error;}
9513
9514 /* "cephfs.pyx":756
9515 * with nogil:
9516 * ret = ceph_opendir(self.cluster, _path, &handle);
9517 * if ret < 0: # <<<<<<<<<<<<<<
9518 * raise make_ex(ret, "opendir failed")
9519 * d = DirResult()
9520 */
9521 }
9522
9523 /* "cephfs.pyx":758
9524 * if ret < 0:
9525 * raise make_ex(ret, "opendir failed")
9526 * d = DirResult() # <<<<<<<<<<<<<<
9527 * d.lib = self
9528 * d.handle = handle
9529 */
9530 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6cephfs_DirResult), __pyx_empty_tuple, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__9530; goto __pyx_L1_error;}
9531 __Pyx_GOTREF(__pyx_t_1);
9532 __pyx_v_d = ((struct __pyx_obj_6cephfs_DirResult *)__pyx_t_1);
9533 __pyx_t_1 = 0;
9534
9535 /* "cephfs.pyx":759
9536 * raise make_ex(ret, "opendir failed")
9537 * d = DirResult()
9538 * d.lib = self # <<<<<<<<<<<<<<
9539 * d.handle = handle
9540 * return d
9541 */
9542 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
9543 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
9544 __Pyx_GOTREF(__pyx_v_d->lib);
9545 __Pyx_DECREF(((PyObject *)__pyx_v_d->lib))do { if ( --((PyObject*)(((PyObject *)__pyx_v_d->lib)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_v_d->lib))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_v_d->lib))))); } while
(0)
;
9546 __pyx_v_d->lib = __pyx_v_self;
9547
9548 /* "cephfs.pyx":760
9549 * d = DirResult()
9550 * d.lib = self
9551 * d.handle = handle # <<<<<<<<<<<<<<
9552 * return d
9553 *
9554 */
9555 __pyx_v_d->handle = __pyx_v_handle;
9556
9557 /* "cephfs.pyx":761
9558 * d.lib = self
9559 * d.handle = handle
9560 * return d # <<<<<<<<<<<<<<
9561 *
9562 * def readdir(self, DirResult handle):
9563 */
9564 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
9565 __Pyx_INCREF(((PyObject *)__pyx_v_d))( ((PyObject*)(((PyObject *)__pyx_v_d)))->ob_refcnt++);
9566 __pyx_r = ((PyObject *)__pyx_v_d);
9567 goto __pyx_L0;
9568
9569 /* "cephfs.pyx":740
9570 * raise make_ex(ret, "chdir failed")
9571 *
9572 * def opendir(self, path): # <<<<<<<<<<<<<<
9573 * """
9574 * Open the given directory.
9575 */
9576
9577 /* function exit code */
9578 __pyx_L1_error:;
9579 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
9580 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
9581 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
9582 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
9583 __Pyx_AddTraceback("cephfs.LibCephFS.opendir", __pyx_clineno, __pyx_lineno, __pyx_filename);
9584 __pyx_r = NULL((void*)0);
9585 __pyx_L0:;
9586 __Pyx_XDECREF((PyObject *)__pyx_v_d)do { if (((PyObject *)__pyx_v_d) == ((void*)0)) ; else do { if
( --((PyObject*)((PyObject *)__pyx_v_d))->ob_refcnt != 0)
; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_d)
))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject
*)__pyx_v_d)))); } while (0); } while (0)
;
9587 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
9588 __Pyx_XGIVEREF(__pyx_r);
9589 __Pyx_RefNannyFinishContext();
9590 return __pyx_r;
9591}
9592
9593/* "cephfs.pyx":763
9594 * return d
9595 *
9596 * def readdir(self, DirResult handle): # <<<<<<<<<<<<<<
9597 * """
9598 * Get the next entry in an open directory.
9599 */
9600
9601/* Python wrapper */
9602static PyObject *__pyx_pw_6cephfs_9LibCephFS_49readdir(PyObject *__pyx_v_self, PyObject *__pyx_v_handle); /*proto*/
9603static char __pyx_doc_6cephfs_9LibCephFS_48readdir[] = "\n Get the next entry in an open directory.\n \n :param handle: the open directory stream handle\n :rtype dentry: the next directory entry or None if at the end of the\n directory (or the directory is empty. This pointer\n should not be freed by the caller, and is only safe to\n access between return and the next call to readdir or\n closedir.\n ";
9604static PyObject *__pyx_pw_6cephfs_9LibCephFS_49readdir(PyObject *__pyx_v_self, PyObject *__pyx_v_handle) {
9605 CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_lineno = 0;
9606 CYTHON_UNUSED__attribute__ ((__unused__)) const char *__pyx_filename = NULL((void*)0);
9607 CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_clineno = 0;
9608 PyObject *__pyx_r = 0;
9609 __Pyx_RefNannyDeclarations
9610 __Pyx_RefNannySetupContext("readdir (wrapper)", 0);
9611 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handle), __pyx_ptype_6cephfs_DirResult, 1, "handle", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handle
), __pyx_ptype_6cephfs_DirResult, 1, "handle", 0)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__9611; goto __pyx_L1_error;}
9612 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_48readdir(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((struct __pyx_obj_6cephfs_DirResult *)__pyx_v_handle));
9613
9614 /* function exit code */
9615 goto __pyx_L0;
9616 __pyx_L1_error:;
9617 __pyx_r = NULL((void*)0);
9618 __pyx_L0:;
9619 __Pyx_RefNannyFinishContext();
9620 return __pyx_r;
9621}
9622
9623static PyObject *__pyx_pf_6cephfs_9LibCephFS_48readdir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, struct __pyx_obj_6cephfs_DirResult *__pyx_v_handle) {
9624 PyObject *__pyx_r = NULL((void*)0);
9625 __Pyx_RefNannyDeclarations
9626 PyObject *__pyx_t_1 = NULL((void*)0);
9627 PyObject *__pyx_t_2 = NULL((void*)0);
9628 PyObject *__pyx_t_3 = NULL((void*)0);
9629 int __pyx_lineno = 0;
9630 const char *__pyx_filename = NULL((void*)0);
9631 int __pyx_clineno = 0;
9632 __Pyx_RefNannySetupContext("readdir", 0);
9633
9634 /* "cephfs.pyx":774
9635 * closedir.
9636 * """
9637 * self.require_state("mounted") # <<<<<<<<<<<<<<
9638 *
9639 * return handle.readdir()
9640 */
9641 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__9641; goto __pyx_L1_error;}
9642 __Pyx_GOTREF(__pyx_t_1);
9643 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__23, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__9643; goto __pyx_L1_error;}
9644 __Pyx_GOTREF(__pyx_t_2);
9645 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9646 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
9647
9648 /* "cephfs.pyx":776
9649 * self.require_state("mounted")
9650 *
9651 * return handle.readdir() # <<<<<<<<<<<<<<
9652 *
9653 * def closedir(self, DirResult handle):
9654 */
9655 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
9656 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_handle), __pyx_n_s_readdir); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__9656; goto __pyx_L1_error;}
9657 __Pyx_GOTREF(__pyx_t_1);
9658 __pyx_t_3 = NULL((void*)0);
9659 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 1)
) {
9660 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
9661 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
9662 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
9663 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
9664 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
9665 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
9666 }
9667 }
9668 if (__pyx_t_3) {
9669 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__9669; goto __pyx_L1_error;}
9670 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
9671 } else {
9672 __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__9672; goto __pyx_L1_error;}
9673 }
9674 __Pyx_GOTREF(__pyx_t_2);
9675 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9676 __pyx_r = __pyx_t_2;
9677 __pyx_t_2 = 0;
9678 goto __pyx_L0;
9679
9680 /* "cephfs.pyx":763
9681 * return d
9682 *
9683 * def readdir(self, DirResult handle): # <<<<<<<<<<<<<<
9684 * """
9685 * Get the next entry in an open directory.
9686 */
9687
9688 /* function exit code */
9689 __pyx_L1_error:;
9690 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
9691 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
9692 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
9693 __Pyx_AddTraceback("cephfs.LibCephFS.readdir", __pyx_clineno, __pyx_lineno, __pyx_filename);
9694 __pyx_r = NULL((void*)0);
9695 __pyx_L0:;
9696 __Pyx_XGIVEREF(__pyx_r);
9697 __Pyx_RefNannyFinishContext();
9698 return __pyx_r;
9699}
9700
9701/* "cephfs.pyx":778
9702 * return handle.readdir()
9703 *
9704 * def closedir(self, DirResult handle): # <<<<<<<<<<<<<<
9705 * """
9706 * Close the open directory.
9707 */
9708
9709/* Python wrapper */
9710static PyObject *__pyx_pw_6cephfs_9LibCephFS_51closedir(PyObject *__pyx_v_self, PyObject *__pyx_v_handle); /*proto*/
9711static char __pyx_doc_6cephfs_9LibCephFS_50closedir[] = "\n Close the open directory.\n \n :param handle: the open directory stream handle\n ";
9712static PyObject *__pyx_pw_6cephfs_9LibCephFS_51closedir(PyObject *__pyx_v_self, PyObject *__pyx_v_handle) {
9713 CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_lineno = 0;
9714 CYTHON_UNUSED__attribute__ ((__unused__)) const char *__pyx_filename = NULL((void*)0);
9715 CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_clineno = 0;
9716 PyObject *__pyx_r = 0;
9717 __Pyx_RefNannyDeclarations
9718 __Pyx_RefNannySetupContext("closedir (wrapper)", 0);
9719 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handle), __pyx_ptype_6cephfs_DirResult, 1, "handle", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handle
), __pyx_ptype_6cephfs_DirResult, 1, "handle", 0)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__9719; goto __pyx_L1_error;}
9720 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_50closedir(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((struct __pyx_obj_6cephfs_DirResult *)__pyx_v_handle));
9721
9722 /* function exit code */
9723 goto __pyx_L0;
9724 __pyx_L1_error:;
9725 __pyx_r = NULL((void*)0);
9726 __pyx_L0:;
9727 __Pyx_RefNannyFinishContext();
9728 return __pyx_r;
9729}
9730
9731static PyObject *__pyx_pf_6cephfs_9LibCephFS_50closedir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, struct __pyx_obj_6cephfs_DirResult *__pyx_v_handle) {
9732 PyObject *__pyx_r = NULL((void*)0);
9733 __Pyx_RefNannyDeclarations
9734 PyObject *__pyx_t_1 = NULL((void*)0);
9735 PyObject *__pyx_t_2 = NULL((void*)0);
9736 PyObject *__pyx_t_3 = NULL((void*)0);
9737 int __pyx_lineno = 0;
9738 const char *__pyx_filename = NULL((void*)0);
9739 int __pyx_clineno = 0;
9740 __Pyx_RefNannySetupContext("closedir", 0);
9741
9742 /* "cephfs.pyx":784
9743 * :param handle: the open directory stream handle
9744 * """
9745 * self.require_state("mounted") # <<<<<<<<<<<<<<
9746 *
9747 * return handle.close()
9748 */
9749 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__9749; goto __pyx_L1_error;}
9750 __Pyx_GOTREF(__pyx_t_1);
9751 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__24, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__9751; goto __pyx_L1_error;}
9752 __Pyx_GOTREF(__pyx_t_2);
9753 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9754 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
9755
9756 /* "cephfs.pyx":786
9757 * self.require_state("mounted")
9758 *
9759 * return handle.close() # <<<<<<<<<<<<<<
9760 *
9761 * def mkdir(self, path, mode):
9762 */
9763 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
9764 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_handle), __pyx_n_s_close); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__9764; goto __pyx_L1_error;}
9765 __Pyx_GOTREF(__pyx_t_1);
9766 __pyx_t_3 = NULL((void*)0);
9767 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 1)
) {
9768 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
9769 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
9770 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
9771 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
9772 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
9773 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
9774 }
9775 }
9776 if (__pyx_t_3) {
9777 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__9777; goto __pyx_L1_error;}
9778 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
9779 } else {
9780 __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__9780; goto __pyx_L1_error;}
9781 }
9782 __Pyx_GOTREF(__pyx_t_2);
9783 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9784 __pyx_r = __pyx_t_2;
9785 __pyx_t_2 = 0;
9786 goto __pyx_L0;
9787
9788 /* "cephfs.pyx":778
9789 * return handle.readdir()
9790 *
9791 * def closedir(self, DirResult handle): # <<<<<<<<<<<<<<
9792 * """
9793 * Close the open directory.
9794 */
9795
9796 /* function exit code */
9797 __pyx_L1_error:;
9798 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
9799 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
9800 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
9801 __Pyx_AddTraceback("cephfs.LibCephFS.closedir", __pyx_clineno, __pyx_lineno, __pyx_filename);
9802 __pyx_r = NULL((void*)0);
9803 __pyx_L0:;
9804 __Pyx_XGIVEREF(__pyx_r);
9805 __Pyx_RefNannyFinishContext();
9806 return __pyx_r;
9807}
9808
9809/* "cephfs.pyx":788
9810 * return handle.close()
9811 *
9812 * def mkdir(self, path, mode): # <<<<<<<<<<<<<<
9813 * """
9814 * Create a directory.
9815 */
9816
9817/* Python wrapper */
9818static PyObject *__pyx_pw_6cephfs_9LibCephFS_53mkdir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9819static char __pyx_doc_6cephfs_9LibCephFS_52mkdir[] = "\n Create a directory.\n \n :param path: the path of the directory to create. This must be either an\n absolute path or a relative path off of the current working directory.\n :param mode the permissions the directory should have once created.\n ";
9820static PyObject *__pyx_pw_6cephfs_9LibCephFS_53mkdir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9821 PyObject *__pyx_v_path = 0;
9822 PyObject *__pyx_v_mode = 0;
9823 int __pyx_lineno = 0;
9824 const char *__pyx_filename = NULL((void*)0);
9825 int __pyx_clineno = 0;
9826 PyObject *__pyx_r = 0;
9827 __Pyx_RefNannyDeclarations
9828 __Pyx_RefNannySetupContext("mkdir (wrapper)", 0);
9829 {
9830 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_mode,0};
9831 PyObject* values[2] = {0,0};
9832 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
9833 Py_ssize_t kw_args;
9834 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
9835 switch (pos_args) {
9836 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
9837 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
9838 case 0: break;
9839 default: goto __pyx_L5_argtuple_error;
9840 }
9841 kw_args = PyDict_Size(__pyx_kwds);
9842 switch (pos_args) {
9843 case 0:
9844 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path
)) != 0), 1)
) kw_args--;
9845 else goto __pyx_L5_argtuple_error;
9846 case 1:
9847 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode
)) != 0), 1)
) kw_args--;
9848 else {
9849 __Pyx_RaiseArgtupleInvalid("mkdir", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__9849; goto __pyx_L3_error;}
9850 }
9851 }
9852 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
9853 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mkdir") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mkdir") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__9853; goto __pyx_L3_error;}
9854 }
9855 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
9856 goto __pyx_L5_argtuple_error;
9857 } else {
9858 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
9859 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
9860 }
9861 __pyx_v_path = values[0];
9862 __pyx_v_mode = values[1];
9863 }
9864 goto __pyx_L4_argument_unpacking_done;
9865 __pyx_L5_argtuple_error:;
9866 __Pyx_RaiseArgtupleInvalid("mkdir", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__9866; goto __pyx_L3_error;}
9867 __pyx_L3_error:;
9868 __Pyx_AddTraceback("cephfs.LibCephFS.mkdir", __pyx_clineno, __pyx_lineno, __pyx_filename);
9869 __Pyx_RefNannyFinishContext();
9870 return NULL((void*)0);
9871 __pyx_L4_argument_unpacking_done:;
9872 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_52mkdir(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_path, __pyx_v_mode);
9873
9874 /* function exit code */
9875 __Pyx_RefNannyFinishContext();
9876 return __pyx_r;
9877}
9878
9879static PyObject *__pyx_pf_6cephfs_9LibCephFS_52mkdir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode) {
9880 char *__pyx_v__path;
9881 int __pyx_v__mode;
9882 int __pyx_v_ret;
9883 PyObject *__pyx_r = NULL((void*)0);
9884 __Pyx_RefNannyDeclarations
9885 PyObject *__pyx_t_1 = NULL((void*)0);
9886 PyObject *__pyx_t_2 = NULL((void*)0);
9887 PyObject *__pyx_t_3 = NULL((void*)0);
9888 Py_ssize_t __pyx_t_4;
9889 PyObject *__pyx_t_5 = NULL((void*)0);
9890 int __pyx_t_6;
9891 int __pyx_t_7;
9892 char *__pyx_t_8;
9893 int __pyx_t_9;
9894 PyObject *__pyx_t_10 = NULL((void*)0);
9895 PyObject *__pyx_t_11 = NULL((void*)0);
9896 int __pyx_lineno = 0;
9897 const char *__pyx_filename = NULL((void*)0);
9898 int __pyx_clineno = 0;
9899 __Pyx_RefNannySetupContext("mkdir", 0);
9900 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
9901
9902 /* "cephfs.pyx":797
9903 * """
9904 *
9905 * self.require_state("mounted") # <<<<<<<<<<<<<<
9906 * path = cstr(path, 'path')
9907 * if not isinstance(mode, int):
9908 */
9909 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__9909; goto __pyx_L1_error;}
9910 __Pyx_GOTREF(__pyx_t_1);
9911 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__25, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__9911; goto __pyx_L1_error;}
9912 __Pyx_GOTREF(__pyx_t_2);
9913 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9914 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
9915
9916 /* "cephfs.pyx":798
9917 *
9918 * self.require_state("mounted")
9919 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
9920 * if not isinstance(mode, int):
9921 * raise TypeError('mode must be an int')
9922 */
9923 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__9923; goto __pyx_L1_error;}
9924 __Pyx_GOTREF(__pyx_t_1);
9925 __pyx_t_3 = NULL((void*)0);
9926 __pyx_t_4 = 0;
9927 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
9928 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
9929 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
9930 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
9931 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
9932 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
9933 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
9934 __pyx_t_4 = 1;
9935 }
9936 }
9937 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__9937; goto __pyx_L1_error;}
9938 __Pyx_GOTREF(__pyx_t_5);
9939 if (__pyx_t_3) {
9940 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
9941 }
9942 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
9943 __Pyx_GIVEREF(__pyx_v_path);
9944 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
9945 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
9946 __Pyx_GIVEREF(__pyx_n_s_path);
9947 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
9948 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__9948; goto __pyx_L1_error;}
9949 __Pyx_GOTREF(__pyx_t_2);
9950 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
9951 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9952 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
9953 __pyx_t_2 = 0;
9954
9955 /* "cephfs.pyx":799
9956 * self.require_state("mounted")
9957 * path = cstr(path, 'path')
9958 * if not isinstance(mode, int): # <<<<<<<<<<<<<<
9959 * raise TypeError('mode must be an int')
9960 * cdef:
9961 */
9962 __pyx_t_6 = PyInt_Check(__pyx_v_mode)((((__pyx_v_mode)->ob_type)->tp_flags & ((1L<<
23))) != 0)
;
9963 __pyx_t_7 = ((!(__pyx_t_6 != 0)) != 0);
9964 if (__pyx_t_7) {
9965
9966 /* "cephfs.pyx":800
9967 * path = cstr(path, 'path')
9968 * if not isinstance(mode, int):
9969 * raise TypeError('mode must be an int') # <<<<<<<<<<<<<<
9970 * cdef:
9971 * char* _path = path
9972 */
9973 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__9973; goto __pyx_L1_error;}
9974 __Pyx_GOTREF(__pyx_t_2);
9975 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
9976 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
9977 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__9977; goto __pyx_L1_error;}
9978
9979 /* "cephfs.pyx":799
9980 * self.require_state("mounted")
9981 * path = cstr(path, 'path')
9982 * if not isinstance(mode, int): # <<<<<<<<<<<<<<
9983 * raise TypeError('mode must be an int')
9984 * cdef:
9985 */
9986 }
9987
9988 /* "cephfs.pyx":802
9989 * raise TypeError('mode must be an int')
9990 * cdef:
9991 * char* _path = path # <<<<<<<<<<<<<<
9992 * int _mode = mode
9993 * with nogil:
9994 */
9995 __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_8) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_8) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__9995; goto __pyx_L1_error;}
9996 __pyx_v__path = __pyx_t_8;
9997
9998 /* "cephfs.pyx":803
9999 * cdef:
10000 * char* _path = path
10001 * int _mode = mode # <<<<<<<<<<<<<<
10002 * with nogil:
10003 * ret = ceph_mkdir(self.cluster, _path, _mode)
10004 */
10005 __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_mode); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_9 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__10005; goto __pyx_L1_error;}
10006 __pyx_v__mode = __pyx_t_9;
10007
10008 /* "cephfs.pyx":804
10009 * char* _path = path
10010 * int _mode = mode
10011 * with nogil: # <<<<<<<<<<<<<<
10012 * ret = ceph_mkdir(self.cluster, _path, _mode)
10013 * if ret < 0:
10014 */
10015 {
10016 #ifdef WITH_THREAD1
10017 PyThreadState *_save;
10018 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
10019 #endif
10020 /*try:*/ {
10021
10022 /* "cephfs.pyx":805
10023 * int _mode = mode
10024 * with nogil:
10025 * ret = ceph_mkdir(self.cluster, _path, _mode) # <<<<<<<<<<<<<<
10026 * if ret < 0:
10027 * raise make_ex(ret, "error in mkdir {}".format(path.decode('utf-8')))
10028 */
10029 __pyx_v_ret = ceph_mkdir(__pyx_v_self->cluster, __pyx_v__path, __pyx_v__mode);
10030 }
10031
10032 /* "cephfs.pyx":804
10033 * char* _path = path
10034 * int _mode = mode
10035 * with nogil: # <<<<<<<<<<<<<<
10036 * ret = ceph_mkdir(self.cluster, _path, _mode)
10037 * if ret < 0:
10038 */
10039 /*finally:*/ {
10040 /*normal exit:*/{
10041 #ifdef WITH_THREAD1
10042 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
10043 #endif
10044 goto __pyx_L6;
10045 }
10046 __pyx_L6:;
10047 }
10048 }
10049
10050 /* "cephfs.pyx":806
10051 * with nogil:
10052 * ret = ceph_mkdir(self.cluster, _path, _mode)
10053 * if ret < 0: # <<<<<<<<<<<<<<
10054 * raise make_ex(ret, "error in mkdir {}".format(path.decode('utf-8')))
10055 *
10056 */
10057 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
10058 if (__pyx_t_7) {
10059
10060 /* "cephfs.pyx":807
10061 * ret = ceph_mkdir(self.cluster, _path, _mode)
10062 * if ret < 0:
10063 * raise make_ex(ret, "error in mkdir {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
10064 *
10065 * def chmod(self, path, mode) :
10066 */
10067 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__10067; goto __pyx_L1_error;}
10068 __Pyx_GOTREF(__pyx_t_2);
10069 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_error_in_mkdir, __pyx_n_s_format); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__10069; goto __pyx_L1_error;}
10070 __Pyx_GOTREF(__pyx_t_5);
10071 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__10071; goto __pyx_L1_error;}
10072 __Pyx_GOTREF(__pyx_t_3);
10073 __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__27, NULL((void*)0)); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__10073; goto __pyx_L1_error;}
10074 __Pyx_GOTREF(__pyx_t_10);
10075 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
10076 __pyx_t_3 = NULL((void*)0);
10077 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
10078 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
10079 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
10080 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
10081 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
10082 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
10083 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
10084 }
10085 }
10086 if (!__pyx_t_3) {
10087 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__10087; goto __pyx_L1_error;}
10088 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
10089 __Pyx_GOTREF(__pyx_t_1);
10090 } else {
10091 __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__10091; goto __pyx_L1_error;}
10092 __Pyx_GOTREF(__pyx_t_11);
10093 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
10094 __Pyx_GIVEREF(__pyx_t_10);
10095 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_10)(((PyTupleObject *)(__pyx_t_11))->ob_item[0+1] = __pyx_t_10
)
;
10096 __pyx_t_10 = 0;
10097 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__10097; goto __pyx_L1_error;}
10098 __Pyx_GOTREF(__pyx_t_1);
10099 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
10100 }
10101 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10102 __pyx_t_5 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__10102; goto __pyx_L1_error;}
10103 __Pyx_GOTREF(__pyx_t_5);
10104 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10105 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
10106 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
10107 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10108 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__10108; goto __pyx_L1_error;}
10109
10110 /* "cephfs.pyx":806
10111 * with nogil:
10112 * ret = ceph_mkdir(self.cluster, _path, _mode)
10113 * if ret < 0: # <<<<<<<<<<<<<<
10114 * raise make_ex(ret, "error in mkdir {}".format(path.decode('utf-8')))
10115 *
10116 */
10117 }
10118
10119 /* "cephfs.pyx":788
10120 * return handle.close()
10121 *
10122 * def mkdir(self, path, mode): # <<<<<<<<<<<<<<
10123 * """
10124 * Create a directory.
10125 */
10126
10127 /* function exit code */
10128 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
10129 goto __pyx_L0;
10130 __pyx_L1_error:;
10131 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
10132 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
10133 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
10134 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
10135 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
10136 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
10137 __Pyx_AddTraceback("cephfs.LibCephFS.mkdir", __pyx_clineno, __pyx_lineno, __pyx_filename);
10138 __pyx_r = NULL((void*)0);
10139 __pyx_L0:;
10140 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
10141 __Pyx_XGIVEREF(__pyx_r);
10142 __Pyx_RefNannyFinishContext();
10143 return __pyx_r;
10144}
10145
10146/* "cephfs.pyx":809
10147 * raise make_ex(ret, "error in mkdir {}".format(path.decode('utf-8')))
10148 *
10149 * def chmod(self, path, mode) : # <<<<<<<<<<<<<<
10150 * """
10151 * Change directory mode.
10152 */
10153
10154/* Python wrapper */
10155static PyObject *__pyx_pw_6cephfs_9LibCephFS_55chmod(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10156static char __pyx_doc_6cephfs_9LibCephFS_54chmod[] = "\n Change directory mode.\n :param path: the path of the directory to create. This must be either an\n absolute path or a relative path off of the current working directory.\n :param mode the permissions the directory should have once created.\n ";
10157static PyObject *__pyx_pw_6cephfs_9LibCephFS_55chmod(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10158 PyObject *__pyx_v_path = 0;
10159 PyObject *__pyx_v_mode = 0;
10160 int __pyx_lineno = 0;
10161 const char *__pyx_filename = NULL((void*)0);
10162 int __pyx_clineno = 0;
10163 PyObject *__pyx_r = 0;
10164 __Pyx_RefNannyDeclarations
10165 __Pyx_RefNannySetupContext("chmod (wrapper)", 0);
10166 {
10167 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_mode,0};
10168 PyObject* values[2] = {0,0};
10169 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
10170 Py_ssize_t kw_args;
10171 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
10172 switch (pos_args) {
10173 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
10174 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
10175 case 0: break;
10176 default: goto __pyx_L5_argtuple_error;
10177 }
10178 kw_args = PyDict_Size(__pyx_kwds);
10179 switch (pos_args) {
10180 case 0:
10181 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path
)) != 0), 1)
) kw_args--;
10182 else goto __pyx_L5_argtuple_error;
10183 case 1:
10184 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode
)) != 0), 1)
) kw_args--;
10185 else {
10186 __Pyx_RaiseArgtupleInvalid("chmod", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__10186; goto __pyx_L3_error;}
10187 }
10188 }
10189 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
10190 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chmod") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "chmod") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__10190; goto __pyx_L3_error;}
10191 }
10192 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
10193 goto __pyx_L5_argtuple_error;
10194 } else {
10195 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
10196 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
10197 }
10198 __pyx_v_path = values[0];
10199 __pyx_v_mode = values[1];
10200 }
10201 goto __pyx_L4_argument_unpacking_done;
10202 __pyx_L5_argtuple_error:;
10203 __Pyx_RaiseArgtupleInvalid("chmod", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__10203; goto __pyx_L3_error;}
10204 __pyx_L3_error:;
10205 __Pyx_AddTraceback("cephfs.LibCephFS.chmod", __pyx_clineno, __pyx_lineno, __pyx_filename);
10206 __Pyx_RefNannyFinishContext();
10207 return NULL((void*)0);
10208 __pyx_L4_argument_unpacking_done:;
10209 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_54chmod(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_path, __pyx_v_mode);
10210
10211 /* function exit code */
10212 __Pyx_RefNannyFinishContext();
10213 return __pyx_r;
10214}
10215
10216static PyObject *__pyx_pf_6cephfs_9LibCephFS_54chmod(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode) {
10217 char *__pyx_v__path;
10218 int __pyx_v__mode;
10219 int __pyx_v_ret;
10220 PyObject *__pyx_r = NULL((void*)0);
10221 __Pyx_RefNannyDeclarations
10222 PyObject *__pyx_t_1 = NULL((void*)0);
10223 PyObject *__pyx_t_2 = NULL((void*)0);
10224 PyObject *__pyx_t_3 = NULL((void*)0);
10225 Py_ssize_t __pyx_t_4;
10226 PyObject *__pyx_t_5 = NULL((void*)0);
10227 int __pyx_t_6;
10228 int __pyx_t_7;
10229 char *__pyx_t_8;
10230 int __pyx_t_9;
10231 PyObject *__pyx_t_10 = NULL((void*)0);
10232 PyObject *__pyx_t_11 = NULL((void*)0);
10233 int __pyx_lineno = 0;
10234 const char *__pyx_filename = NULL((void*)0);
10235 int __pyx_clineno = 0;
10236 __Pyx_RefNannySetupContext("chmod", 0);
10237 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
10238
10239 /* "cephfs.pyx":816
10240 * :param mode the permissions the directory should have once created.
10241 * """
10242 * self.require_state("mounted") # <<<<<<<<<<<<<<
10243 * path = cstr(path, 'path')
10244 * if not isinstance(mode, int):
10245 */
10246 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__10246; goto __pyx_L1_error;}
10247 __Pyx_GOTREF(__pyx_t_1);
10248 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__28, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__10248; goto __pyx_L1_error;}
10249 __Pyx_GOTREF(__pyx_t_2);
10250 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
10251 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10252
10253 /* "cephfs.pyx":817
10254 * """
10255 * self.require_state("mounted")
10256 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
10257 * if not isinstance(mode, int):
10258 * raise TypeError('mode must be an int')
10259 */
10260 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__10260; goto __pyx_L1_error;}
10261 __Pyx_GOTREF(__pyx_t_1);
10262 __pyx_t_3 = NULL((void*)0);
10263 __pyx_t_4 = 0;
10264 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
10265 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
10266 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
10267 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
10268 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
10269 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
10270 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
10271 __pyx_t_4 = 1;
10272 }
10273 }
10274 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__10274; goto __pyx_L1_error;}
10275 __Pyx_GOTREF(__pyx_t_5);
10276 if (__pyx_t_3) {
10277 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
10278 }
10279 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
10280 __Pyx_GIVEREF(__pyx_v_path);
10281 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
10282 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
10283 __Pyx_GIVEREF(__pyx_n_s_path);
10284 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
10285 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__10285; goto __pyx_L1_error;}
10286 __Pyx_GOTREF(__pyx_t_2);
10287 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10288 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
10289 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
10290 __pyx_t_2 = 0;
10291
10292 /* "cephfs.pyx":818
10293 * self.require_state("mounted")
10294 * path = cstr(path, 'path')
10295 * if not isinstance(mode, int): # <<<<<<<<<<<<<<
10296 * raise TypeError('mode must be an int')
10297 * cdef:
10298 */
10299 __pyx_t_6 = PyInt_Check(__pyx_v_mode)((((__pyx_v_mode)->ob_type)->tp_flags & ((1L<<
23))) != 0)
;
10300 __pyx_t_7 = ((!(__pyx_t_6 != 0)) != 0);
10301 if (__pyx_t_7) {
10302
10303 /* "cephfs.pyx":819
10304 * path = cstr(path, 'path')
10305 * if not isinstance(mode, int):
10306 * raise TypeError('mode must be an int') # <<<<<<<<<<<<<<
10307 * cdef:
10308 * char* _path = path
10309 */
10310 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__10310; goto __pyx_L1_error;}
10311 __Pyx_GOTREF(__pyx_t_2);
10312 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
10313 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10314 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__10314; goto __pyx_L1_error;}
10315
10316 /* "cephfs.pyx":818
10317 * self.require_state("mounted")
10318 * path = cstr(path, 'path')
10319 * if not isinstance(mode, int): # <<<<<<<<<<<<<<
10320 * raise TypeError('mode must be an int')
10321 * cdef:
10322 */
10323 }
10324
10325 /* "cephfs.pyx":821
10326 * raise TypeError('mode must be an int')
10327 * cdef:
10328 * char* _path = path # <<<<<<<<<<<<<<
10329 * int _mode = mode
10330 * with nogil:
10331 */
10332 __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_8) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_8) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__10332; goto __pyx_L1_error;}
10333 __pyx_v__path = __pyx_t_8;
10334
10335 /* "cephfs.pyx":822
10336 * cdef:
10337 * char* _path = path
10338 * int _mode = mode # <<<<<<<<<<<<<<
10339 * with nogil:
10340 * ret = ceph_chmod(self.cluster, _path, _mode)
10341 */
10342 __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_mode); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_9 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__10342; goto __pyx_L1_error;}
10343 __pyx_v__mode = __pyx_t_9;
10344
10345 /* "cephfs.pyx":823
10346 * char* _path = path
10347 * int _mode = mode
10348 * with nogil: # <<<<<<<<<<<<<<
10349 * ret = ceph_chmod(self.cluster, _path, _mode)
10350 * if ret < 0:
10351 */
10352 {
10353 #ifdef WITH_THREAD1
10354 PyThreadState *_save;
10355 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
10356 #endif
10357 /*try:*/ {
10358
10359 /* "cephfs.pyx":824
10360 * int _mode = mode
10361 * with nogil:
10362 * ret = ceph_chmod(self.cluster, _path, _mode) # <<<<<<<<<<<<<<
10363 * if ret < 0:
10364 * raise make_ex(ret, "error in chmod {}".format(path.decode('utf-8')))
10365 */
10366 __pyx_v_ret = ceph_chmod(__pyx_v_self->cluster, __pyx_v__path, __pyx_v__mode);
10367 }
10368
10369 /* "cephfs.pyx":823
10370 * char* _path = path
10371 * int _mode = mode
10372 * with nogil: # <<<<<<<<<<<<<<
10373 * ret = ceph_chmod(self.cluster, _path, _mode)
10374 * if ret < 0:
10375 */
10376 /*finally:*/ {
10377 /*normal exit:*/{
10378 #ifdef WITH_THREAD1
10379 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
10380 #endif
10381 goto __pyx_L6;
10382 }
10383 __pyx_L6:;
10384 }
10385 }
10386
10387 /* "cephfs.pyx":825
10388 * with nogil:
10389 * ret = ceph_chmod(self.cluster, _path, _mode)
10390 * if ret < 0: # <<<<<<<<<<<<<<
10391 * raise make_ex(ret, "error in chmod {}".format(path.decode('utf-8')))
10392 *
10393 */
10394 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
10395 if (__pyx_t_7) {
10396
10397 /* "cephfs.pyx":826
10398 * ret = ceph_chmod(self.cluster, _path, _mode)
10399 * if ret < 0:
10400 * raise make_ex(ret, "error in chmod {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
10401 *
10402 * def mkdirs(self, path, mode):
10403 */
10404 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__10404; goto __pyx_L1_error;}
10405 __Pyx_GOTREF(__pyx_t_2);
10406 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_error_in_chmod, __pyx_n_s_format); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__10406; goto __pyx_L1_error;}
10407 __Pyx_GOTREF(__pyx_t_5);
10408 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__10408; goto __pyx_L1_error;}
10409 __Pyx_GOTREF(__pyx_t_3);
10410 __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__30, NULL((void*)0)); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__10410; goto __pyx_L1_error;}
10411 __Pyx_GOTREF(__pyx_t_10);
10412 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
10413 __pyx_t_3 = NULL((void*)0);
10414 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
10415 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
10416 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
10417 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
10418 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
10419 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
10420 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
10421 }
10422 }
10423 if (!__pyx_t_3) {
10424 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__10424; goto __pyx_L1_error;}
10425 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
10426 __Pyx_GOTREF(__pyx_t_1);
10427 } else {
10428 __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__10428; goto __pyx_L1_error;}
10429 __Pyx_GOTREF(__pyx_t_11);
10430 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
10431 __Pyx_GIVEREF(__pyx_t_10);
10432 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_10)(((PyTupleObject *)(__pyx_t_11))->ob_item[0+1] = __pyx_t_10
)
;
10433 __pyx_t_10 = 0;
10434 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__10434; goto __pyx_L1_error;}
10435 __Pyx_GOTREF(__pyx_t_1);
10436 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
10437 }
10438 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10439 __pyx_t_5 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__10439; goto __pyx_L1_error;}
10440 __Pyx_GOTREF(__pyx_t_5);
10441 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10442 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
10443 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
10444 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10445 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__10445; goto __pyx_L1_error;}
10446
10447 /* "cephfs.pyx":825
10448 * with nogil:
10449 * ret = ceph_chmod(self.cluster, _path, _mode)
10450 * if ret < 0: # <<<<<<<<<<<<<<
10451 * raise make_ex(ret, "error in chmod {}".format(path.decode('utf-8')))
10452 *
10453 */
10454 }
10455
10456 /* "cephfs.pyx":809
10457 * raise make_ex(ret, "error in mkdir {}".format(path.decode('utf-8')))
10458 *
10459 * def chmod(self, path, mode) : # <<<<<<<<<<<<<<
10460 * """
10461 * Change directory mode.
10462 */
10463
10464 /* function exit code */
10465 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
10466 goto __pyx_L0;
10467 __pyx_L1_error:;
10468 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
10469 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
10470 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
10471 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
10472 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
10473 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
10474 __Pyx_AddTraceback("cephfs.LibCephFS.chmod", __pyx_clineno, __pyx_lineno, __pyx_filename);
10475 __pyx_r = NULL((void*)0);
10476 __pyx_L0:;
10477 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
10478 __Pyx_XGIVEREF(__pyx_r);
10479 __Pyx_RefNannyFinishContext();
10480 return __pyx_r;
10481}
10482
10483/* "cephfs.pyx":828
10484 * raise make_ex(ret, "error in chmod {}".format(path.decode('utf-8')))
10485 *
10486 * def mkdirs(self, path, mode): # <<<<<<<<<<<<<<
10487 * """
10488 * Create multiple directories at once.
10489 */
10490
10491/* Python wrapper */
10492static PyObject *__pyx_pw_6cephfs_9LibCephFS_57mkdirs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10493static char __pyx_doc_6cephfs_9LibCephFS_56mkdirs[] = "\n Create multiple directories at once.\n\n :param path: the full path of directories and sub-directories that should\n be created.\n :param mode the permissions the directory should have once created\n ";
10494static PyObject *__pyx_pw_6cephfs_9LibCephFS_57mkdirs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10495 PyObject *__pyx_v_path = 0;
10496 PyObject *__pyx_v_mode = 0;
10497 int __pyx_lineno = 0;
10498 const char *__pyx_filename = NULL((void*)0);
10499 int __pyx_clineno = 0;
10500 PyObject *__pyx_r = 0;
10501 __Pyx_RefNannyDeclarations
10502 __Pyx_RefNannySetupContext("mkdirs (wrapper)", 0);
10503 {
10504 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_mode,0};
10505 PyObject* values[2] = {0,0};
10506 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
10507 Py_ssize_t kw_args;
10508 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
10509 switch (pos_args) {
10510 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
10511 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
10512 case 0: break;
10513 default: goto __pyx_L5_argtuple_error;
10514 }
10515 kw_args = PyDict_Size(__pyx_kwds);
10516 switch (pos_args) {
10517 case 0:
10518 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path
)) != 0), 1)
) kw_args--;
10519 else goto __pyx_L5_argtuple_error;
10520 case 1:
10521 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode
)) != 0), 1)
) kw_args--;
10522 else {
10523 __Pyx_RaiseArgtupleInvalid("mkdirs", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__10523; goto __pyx_L3_error;}
10524 }
10525 }
10526 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
10527 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mkdirs") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mkdirs") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__10527; goto __pyx_L3_error;}
10528 }
10529 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
10530 goto __pyx_L5_argtuple_error;
10531 } else {
10532 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
10533 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
10534 }
10535 __pyx_v_path = values[0];
10536 __pyx_v_mode = values[1];
10537 }
10538 goto __pyx_L4_argument_unpacking_done;
10539 __pyx_L5_argtuple_error:;
10540 __Pyx_RaiseArgtupleInvalid("mkdirs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__10540; goto __pyx_L3_error;}
10541 __pyx_L3_error:;
10542 __Pyx_AddTraceback("cephfs.LibCephFS.mkdirs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10543 __Pyx_RefNannyFinishContext();
10544 return NULL((void*)0);
10545 __pyx_L4_argument_unpacking_done:;
10546 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_56mkdirs(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_path, __pyx_v_mode);
10547
10548 /* function exit code */
10549 __Pyx_RefNannyFinishContext();
10550 return __pyx_r;
10551}
10552
10553static PyObject *__pyx_pf_6cephfs_9LibCephFS_56mkdirs(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode) {
10554 char *__pyx_v__path;
10555 int __pyx_v__mode;
10556 int __pyx_v_ret;
10557 PyObject *__pyx_r = NULL((void*)0);
10558 __Pyx_RefNannyDeclarations
10559 PyObject *__pyx_t_1 = NULL((void*)0);
10560 PyObject *__pyx_t_2 = NULL((void*)0);
10561 PyObject *__pyx_t_3 = NULL((void*)0);
10562 Py_ssize_t __pyx_t_4;
10563 PyObject *__pyx_t_5 = NULL((void*)0);
10564 int __pyx_t_6;
10565 int __pyx_t_7;
10566 char *__pyx_t_8;
10567 int __pyx_t_9;
10568 PyObject *__pyx_t_10 = NULL((void*)0);
10569 PyObject *__pyx_t_11 = NULL((void*)0);
10570 int __pyx_lineno = 0;
10571 const char *__pyx_filename = NULL((void*)0);
10572 int __pyx_clineno = 0;
10573 __Pyx_RefNannySetupContext("mkdirs", 0);
10574 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
10575
10576 /* "cephfs.pyx":836
10577 * :param mode the permissions the directory should have once created
10578 * """
10579 * self.require_state("mounted") # <<<<<<<<<<<<<<
10580 * path = cstr(path, 'path')
10581 * if not isinstance(mode, int):
10582 */
10583 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__10583; goto __pyx_L1_error;}
10584 __Pyx_GOTREF(__pyx_t_1);
10585 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__31, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__10585; goto __pyx_L1_error;}
10586 __Pyx_GOTREF(__pyx_t_2);
10587 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
10588 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10589
10590 /* "cephfs.pyx":837
10591 * """
10592 * self.require_state("mounted")
10593 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
10594 * if not isinstance(mode, int):
10595 * raise TypeError('mode must be an int')
10596 */
10597 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__10597; goto __pyx_L1_error;}
10598 __Pyx_GOTREF(__pyx_t_1);
10599 __pyx_t_3 = NULL((void*)0);
10600 __pyx_t_4 = 0;
10601 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
10602 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
10603 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
10604 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
10605 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
10606 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
10607 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
10608 __pyx_t_4 = 1;
10609 }
10610 }
10611 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__10611; goto __pyx_L1_error;}
10612 __Pyx_GOTREF(__pyx_t_5);
10613 if (__pyx_t_3) {
10614 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
10615 }
10616 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
10617 __Pyx_GIVEREF(__pyx_v_path);
10618 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
10619 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
10620 __Pyx_GIVEREF(__pyx_n_s_path);
10621 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
10622 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__10622; goto __pyx_L1_error;}
10623 __Pyx_GOTREF(__pyx_t_2);
10624 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10625 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
10626 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
10627 __pyx_t_2 = 0;
10628
10629 /* "cephfs.pyx":838
10630 * self.require_state("mounted")
10631 * path = cstr(path, 'path')
10632 * if not isinstance(mode, int): # <<<<<<<<<<<<<<
10633 * raise TypeError('mode must be an int')
10634 * cdef:
10635 */
10636 __pyx_t_6 = PyInt_Check(__pyx_v_mode)((((__pyx_v_mode)->ob_type)->tp_flags & ((1L<<
23))) != 0)
;
10637 __pyx_t_7 = ((!(__pyx_t_6 != 0)) != 0);
10638 if (__pyx_t_7) {
10639
10640 /* "cephfs.pyx":839
10641 * path = cstr(path, 'path')
10642 * if not isinstance(mode, int):
10643 * raise TypeError('mode must be an int') # <<<<<<<<<<<<<<
10644 * cdef:
10645 * char* _path = path
10646 */
10647 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__10647; goto __pyx_L1_error;}
10648 __Pyx_GOTREF(__pyx_t_2);
10649 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
10650 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10651 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__10651; goto __pyx_L1_error;}
10652
10653 /* "cephfs.pyx":838
10654 * self.require_state("mounted")
10655 * path = cstr(path, 'path')
10656 * if not isinstance(mode, int): # <<<<<<<<<<<<<<
10657 * raise TypeError('mode must be an int')
10658 * cdef:
10659 */
10660 }
10661
10662 /* "cephfs.pyx":841
10663 * raise TypeError('mode must be an int')
10664 * cdef:
10665 * char* _path = path # <<<<<<<<<<<<<<
10666 * int _mode = mode
10667 *
10668 */
10669 __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_8) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_8) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__10669; goto __pyx_L1_error;}
10670 __pyx_v__path = __pyx_t_8;
10671
10672 /* "cephfs.pyx":842
10673 * cdef:
10674 * char* _path = path
10675 * int _mode = mode # <<<<<<<<<<<<<<
10676 *
10677 * with nogil:
10678 */
10679 __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_mode); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_9 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__10679; goto __pyx_L1_error;}
10680 __pyx_v__mode = __pyx_t_9;
10681
10682 /* "cephfs.pyx":844
10683 * int _mode = mode
10684 *
10685 * with nogil: # <<<<<<<<<<<<<<
10686 * ret = ceph_mkdirs(self.cluster, _path, _mode)
10687 * if ret < 0:
10688 */
10689 {
10690 #ifdef WITH_THREAD1
10691 PyThreadState *_save;
10692 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
10693 #endif
10694 /*try:*/ {
10695
10696 /* "cephfs.pyx":845
10697 *
10698 * with nogil:
10699 * ret = ceph_mkdirs(self.cluster, _path, _mode) # <<<<<<<<<<<<<<
10700 * if ret < 0:
10701 * raise make_ex(ret, "error in mkdirs {}".format(path.decode('utf-8')))
10702 */
10703 __pyx_v_ret = ceph_mkdirs(__pyx_v_self->cluster, __pyx_v__path, __pyx_v__mode);
10704 }
10705
10706 /* "cephfs.pyx":844
10707 * int _mode = mode
10708 *
10709 * with nogil: # <<<<<<<<<<<<<<
10710 * ret = ceph_mkdirs(self.cluster, _path, _mode)
10711 * if ret < 0:
10712 */
10713 /*finally:*/ {
10714 /*normal exit:*/{
10715 #ifdef WITH_THREAD1
10716 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
10717 #endif
10718 goto __pyx_L6;
10719 }
10720 __pyx_L6:;
10721 }
10722 }
10723
10724 /* "cephfs.pyx":846
10725 * with nogil:
10726 * ret = ceph_mkdirs(self.cluster, _path, _mode)
10727 * if ret < 0: # <<<<<<<<<<<<<<
10728 * raise make_ex(ret, "error in mkdirs {}".format(path.decode('utf-8')))
10729 *
10730 */
10731 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
10732 if (__pyx_t_7) {
10733
10734 /* "cephfs.pyx":847
10735 * ret = ceph_mkdirs(self.cluster, _path, _mode)
10736 * if ret < 0:
10737 * raise make_ex(ret, "error in mkdirs {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
10738 *
10739 * def rmdir(self, path):
10740 */
10741 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__10741; goto __pyx_L1_error;}
10742 __Pyx_GOTREF(__pyx_t_2);
10743 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_error_in_mkdirs, __pyx_n_s_format); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__10743; goto __pyx_L1_error;}
10744 __Pyx_GOTREF(__pyx_t_5);
10745 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__10745; goto __pyx_L1_error;}
10746 __Pyx_GOTREF(__pyx_t_3);
10747 __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__33, NULL((void*)0)); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__10747; goto __pyx_L1_error;}
10748 __Pyx_GOTREF(__pyx_t_10);
10749 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
10750 __pyx_t_3 = NULL((void*)0);
10751 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
10752 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
10753 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
10754 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
10755 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
10756 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
10757 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
10758 }
10759 }
10760 if (!__pyx_t_3) {
10761 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__10761; goto __pyx_L1_error;}
10762 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
10763 __Pyx_GOTREF(__pyx_t_1);
10764 } else {
10765 __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__10765; goto __pyx_L1_error;}
10766 __Pyx_GOTREF(__pyx_t_11);
10767 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
10768 __Pyx_GIVEREF(__pyx_t_10);
10769 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_10)(((PyTupleObject *)(__pyx_t_11))->ob_item[0+1] = __pyx_t_10
)
;
10770 __pyx_t_10 = 0;
10771 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__10771; goto __pyx_L1_error;}
10772 __Pyx_GOTREF(__pyx_t_1);
10773 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
10774 }
10775 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10776 __pyx_t_5 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__10776; goto __pyx_L1_error;}
10777 __Pyx_GOTREF(__pyx_t_5);
10778 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10779 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
10780 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
10781 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10782 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__10782; goto __pyx_L1_error;}
10783
10784 /* "cephfs.pyx":846
10785 * with nogil:
10786 * ret = ceph_mkdirs(self.cluster, _path, _mode)
10787 * if ret < 0: # <<<<<<<<<<<<<<
10788 * raise make_ex(ret, "error in mkdirs {}".format(path.decode('utf-8')))
10789 *
10790 */
10791 }
10792
10793 /* "cephfs.pyx":828
10794 * raise make_ex(ret, "error in chmod {}".format(path.decode('utf-8')))
10795 *
10796 * def mkdirs(self, path, mode): # <<<<<<<<<<<<<<
10797 * """
10798 * Create multiple directories at once.
10799 */
10800
10801 /* function exit code */
10802 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
10803 goto __pyx_L0;
10804 __pyx_L1_error:;
10805 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
10806 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
10807 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
10808 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
10809 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
10810 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
10811 __Pyx_AddTraceback("cephfs.LibCephFS.mkdirs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10812 __pyx_r = NULL((void*)0);
10813 __pyx_L0:;
10814 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
10815 __Pyx_XGIVEREF(__pyx_r);
10816 __Pyx_RefNannyFinishContext();
10817 return __pyx_r;
10818}
10819
10820/* "cephfs.pyx":849
10821 * raise make_ex(ret, "error in mkdirs {}".format(path.decode('utf-8')))
10822 *
10823 * def rmdir(self, path): # <<<<<<<<<<<<<<
10824 * """
10825 * Remove a directory.
10826 */
10827
10828/* Python wrapper */
10829static PyObject *__pyx_pw_6cephfs_9LibCephFS_59rmdir(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
10830static char __pyx_doc_6cephfs_9LibCephFS_58rmdir[] = "\n Remove a directory.\n \n :param path: the path of the directory to remove.\n ";
10831static PyObject *__pyx_pw_6cephfs_9LibCephFS_59rmdir(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
10832 PyObject *__pyx_r = 0;
10833 __Pyx_RefNannyDeclarations
10834 __Pyx_RefNannySetupContext("rmdir (wrapper)", 0);
10835 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_58rmdir(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_path));
10836
10837 /* function exit code */
10838 __Pyx_RefNannyFinishContext();
10839 return __pyx_r;
10840}
10841
10842static PyObject *__pyx_pf_6cephfs_9LibCephFS_58rmdir(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path) {
10843 char *__pyx_v__path;
10844 int __pyx_v_ret;
10845 PyObject *__pyx_r = NULL((void*)0);
10846 __Pyx_RefNannyDeclarations
10847 PyObject *__pyx_t_1 = NULL((void*)0);
10848 PyObject *__pyx_t_2 = NULL((void*)0);
10849 PyObject *__pyx_t_3 = NULL((void*)0);
10850 Py_ssize_t __pyx_t_4;
10851 PyObject *__pyx_t_5 = NULL((void*)0);
10852 char *__pyx_t_6;
10853 int __pyx_t_7;
10854 PyObject *__pyx_t_8 = NULL((void*)0);
10855 PyObject *__pyx_t_9 = NULL((void*)0);
10856 int __pyx_lineno = 0;
10857 const char *__pyx_filename = NULL((void*)0);
10858 int __pyx_clineno = 0;
10859 __Pyx_RefNannySetupContext("rmdir", 0);
10860 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
10861
10862 /* "cephfs.pyx":855
10863 * :param path: the path of the directory to remove.
10864 * """
10865 * self.require_state("mounted") # <<<<<<<<<<<<<<
10866 * path = cstr(path, 'path')
10867 * cdef char* _path = path
10868 */
10869 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__10869; goto __pyx_L1_error;}
10870 __Pyx_GOTREF(__pyx_t_1);
10871 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__34, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__10871; goto __pyx_L1_error;}
10872 __Pyx_GOTREF(__pyx_t_2);
10873 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
10874 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10875
10876 /* "cephfs.pyx":856
10877 * """
10878 * self.require_state("mounted")
10879 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
10880 * cdef char* _path = path
10881 * ret = ceph_rmdir(self.cluster, _path)
10882 */
10883 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__10883; goto __pyx_L1_error;}
10884 __Pyx_GOTREF(__pyx_t_1);
10885 __pyx_t_3 = NULL((void*)0);
10886 __pyx_t_4 = 0;
10887 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
10888 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
10889 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
10890 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
10891 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
10892 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
10893 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
10894 __pyx_t_4 = 1;
10895 }
10896 }
10897 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__10897; goto __pyx_L1_error;}
10898 __Pyx_GOTREF(__pyx_t_5);
10899 if (__pyx_t_3) {
10900 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
10901 }
10902 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
10903 __Pyx_GIVEREF(__pyx_v_path);
10904 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
10905 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
10906 __Pyx_GIVEREF(__pyx_n_s_path);
10907 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
10908 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__10908; goto __pyx_L1_error;}
10909 __Pyx_GOTREF(__pyx_t_2);
10910 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10911 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
10912 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
10913 __pyx_t_2 = 0;
10914
10915 /* "cephfs.pyx":857
10916 * self.require_state("mounted")
10917 * path = cstr(path, 'path')
10918 * cdef char* _path = path # <<<<<<<<<<<<<<
10919 * ret = ceph_rmdir(self.cluster, _path)
10920 * if ret < 0:
10921 */
10922 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__10922; goto __pyx_L1_error;}
10923 __pyx_v__path = __pyx_t_6;
10924
10925 /* "cephfs.pyx":858
10926 * path = cstr(path, 'path')
10927 * cdef char* _path = path
10928 * ret = ceph_rmdir(self.cluster, _path) # <<<<<<<<<<<<<<
10929 * if ret < 0:
10930 * raise make_ex(ret, "error in rmdir {}".format(path.decode('utf-8')))
10931 */
10932 __pyx_v_ret = ceph_rmdir(__pyx_v_self->cluster, __pyx_v__path);
10933
10934 /* "cephfs.pyx":859
10935 * cdef char* _path = path
10936 * ret = ceph_rmdir(self.cluster, _path)
10937 * if ret < 0: # <<<<<<<<<<<<<<
10938 * raise make_ex(ret, "error in rmdir {}".format(path.decode('utf-8')))
10939 *
10940 */
10941 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
10942 if (__pyx_t_7) {
10943
10944 /* "cephfs.pyx":860
10945 * ret = ceph_rmdir(self.cluster, _path)
10946 * if ret < 0:
10947 * raise make_ex(ret, "error in rmdir {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
10948 *
10949 * def open(self, path, flags, mode=0):
10950 */
10951 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__10951; goto __pyx_L1_error;}
10952 __Pyx_GOTREF(__pyx_t_2);
10953 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_error_in_rmdir, __pyx_n_s_format); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__10953; goto __pyx_L1_error;}
10954 __Pyx_GOTREF(__pyx_t_5);
10955 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__10955; goto __pyx_L1_error;}
10956 __Pyx_GOTREF(__pyx_t_3);
10957 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__35, NULL((void*)0)); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__10957; goto __pyx_L1_error;}
10958 __Pyx_GOTREF(__pyx_t_8);
10959 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
10960 __pyx_t_3 = NULL((void*)0);
10961 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
10962 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
10963 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
10964 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
10965 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
10966 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
10967 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
10968 }
10969 }
10970 if (!__pyx_t_3) {
10971 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__10971; goto __pyx_L1_error;}
10972 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
10973 __Pyx_GOTREF(__pyx_t_1);
10974 } else {
10975 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__10975; goto __pyx_L1_error;}
10976 __Pyx_GOTREF(__pyx_t_9);
10977 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
10978 __Pyx_GIVEREF(__pyx_t_8);
10979 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_8);
10980 __pyx_t_8 = 0;
10981 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__10981; goto __pyx_L1_error;}
10982 __Pyx_GOTREF(__pyx_t_1);
10983 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
10984 }
10985 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10986 __pyx_t_5 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__10986; goto __pyx_L1_error;}
10987 __Pyx_GOTREF(__pyx_t_5);
10988 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10989 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
10990 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
10991 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10992 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__10992; goto __pyx_L1_error;}
10993
10994 /* "cephfs.pyx":859
10995 * cdef char* _path = path
10996 * ret = ceph_rmdir(self.cluster, _path)
10997 * if ret < 0: # <<<<<<<<<<<<<<
10998 * raise make_ex(ret, "error in rmdir {}".format(path.decode('utf-8')))
10999 *
11000 */
11001 }
11002
11003 /* "cephfs.pyx":849
11004 * raise make_ex(ret, "error in mkdirs {}".format(path.decode('utf-8')))
11005 *
11006 * def rmdir(self, path): # <<<<<<<<<<<<<<
11007 * """
11008 * Remove a directory.
11009 */
11010
11011 /* function exit code */
11012 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
11013 goto __pyx_L0;
11014 __pyx_L1_error:;
11015 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
11016 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
11017 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
11018 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
11019 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
11020 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
11021 __Pyx_AddTraceback("cephfs.LibCephFS.rmdir", __pyx_clineno, __pyx_lineno, __pyx_filename);
11022 __pyx_r = NULL((void*)0);
11023 __pyx_L0:;
11024 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
11025 __Pyx_XGIVEREF(__pyx_r);
11026 __Pyx_RefNannyFinishContext();
11027 return __pyx_r;
11028}
11029
11030/* "cephfs.pyx":862
11031 * raise make_ex(ret, "error in rmdir {}".format(path.decode('utf-8')))
11032 *
11033 * def open(self, path, flags, mode=0): # <<<<<<<<<<<<<<
11034 * """
11035 * Create and/or open a file.
11036 */
11037
11038/* Python wrapper */
11039static PyObject *__pyx_pw_6cephfs_9LibCephFS_61open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11040static char __pyx_doc_6cephfs_9LibCephFS_60open[] = "\n Create and/or open a file.\n \n :param path: the path of the file to open. If the flags parameter includes O_CREAT,\n the file will first be created before opening.\n :param flags: set of option masks that control how the file is created/opened.\n :param mode: the permissions to place on the file if the file does not exist and O_CREAT\n is specified in the flags.\n ";
11041static PyObject *__pyx_pw_6cephfs_9LibCephFS_61open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11042 PyObject *__pyx_v_path = 0;
11043 PyObject *__pyx_v_flags = 0;
11044 PyObject *__pyx_v_mode = 0;
11045 int __pyx_lineno = 0;
11046 const char *__pyx_filename = NULL((void*)0);
11047 int __pyx_clineno = 0;
11048 PyObject *__pyx_r = 0;
11049 __Pyx_RefNannyDeclarations
11050 __Pyx_RefNannySetupContext("open (wrapper)", 0);
11051 {
11052 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_flags,&__pyx_n_s_mode,0};
11053 PyObject* values[3] = {0,0,0};
11054 values[2] = ((PyObject *)__pyx_int_0);
11055 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
11056 Py_ssize_t kw_args;
11057 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
11058 switch (pos_args) {
11059 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
11060 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
11061 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
11062 case 0: break;
11063 default: goto __pyx_L5_argtuple_error;
11064 }
11065 kw_args = PyDict_Size(__pyx_kwds);
11066 switch (pos_args) {
11067 case 0:
11068 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path
)) != 0), 1)
) kw_args--;
11069 else goto __pyx_L5_argtuple_error;
11070 case 1:
11071 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags
)) != 0), 1)
) kw_args--;
11072 else {
11073 __Pyx_RaiseArgtupleInvalid("open", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__11073; goto __pyx_L3_error;}
11074 }
11075 case 2:
11076 if (kw_args > 0) {
11077 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode);
11078 if (value) { values[2] = value; kw_args--; }
11079 }
11080 }
11081 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
11082 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "open") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__11082; goto __pyx_L3_error;}
11083 }
11084 } else {
11085 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
11086 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
11087 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
11088 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
11089 break;
11090 default: goto __pyx_L5_argtuple_error;
11091 }
11092 }
11093 __pyx_v_path = values[0];
11094 __pyx_v_flags = values[1];
11095 __pyx_v_mode = values[2];
11096 }
11097 goto __pyx_L4_argument_unpacking_done;
11098 __pyx_L5_argtuple_error:;
11099 __Pyx_RaiseArgtupleInvalid("open", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__11099; goto __pyx_L3_error;}
11100 __pyx_L3_error:;
11101 __Pyx_AddTraceback("cephfs.LibCephFS.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
11102 __Pyx_RefNannyFinishContext();
11103 return NULL((void*)0);
11104 __pyx_L4_argument_unpacking_done:;
11105 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_60open(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_path, __pyx_v_flags, __pyx_v_mode);
11106
11107 /* function exit code */
11108 __Pyx_RefNannyFinishContext();
11109 return __pyx_r;
11110}
11111
11112static PyObject *__pyx_pf_6cephfs_9LibCephFS_60open(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_flags, PyObject *__pyx_v_mode) {
11113 PyObject *__pyx_v_cephfs_flags = NULL((void*)0);
11114 long __pyx_v_access_flags;
11115 PyObject *__pyx_v_c = NULL((void*)0);
11116 char *__pyx_v__path;
11117 int __pyx_v__flags;
11118 int __pyx_v__mode;
11119 int __pyx_v_ret;
11120 PyObject *__pyx_r = NULL((void*)0);
11121 __Pyx_RefNannyDeclarations
11122 PyObject *__pyx_t_1 = NULL((void*)0);
11123 PyObject *__pyx_t_2 = NULL((void*)0);
11124 PyObject *__pyx_t_3 = NULL((void*)0);
11125 Py_ssize_t __pyx_t_4;
11126 PyObject *__pyx_t_5 = NULL((void*)0);
11127 int __pyx_t_6;
11128 int __pyx_t_7;
11129 PyObject *(*__pyx_t_8)(PyObject *);
11130 char *__pyx_t_9;
11131 int __pyx_t_10;
11132 PyObject *__pyx_t_11 = NULL((void*)0);
11133 PyObject *__pyx_t_12 = NULL((void*)0);
11134 int __pyx_lineno = 0;
11135 const char *__pyx_filename = NULL((void*)0);
11136 int __pyx_clineno = 0;
11137 __Pyx_RefNannySetupContext("open", 0);
11138 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
11139
11140 /* "cephfs.pyx":872
11141 * is specified in the flags.
11142 * """
11143 * self.require_state("mounted") # <<<<<<<<<<<<<<
11144 * path = cstr(path, 'path')
11145 *
11146 */
11147 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__11147; goto __pyx_L1_error;}
11148 __Pyx_GOTREF(__pyx_t_1);
11149 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__36, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__11149; goto __pyx_L1_error;}
11150 __Pyx_GOTREF(__pyx_t_2);
11151 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
11152 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
11153
11154 /* "cephfs.pyx":873
11155 * """
11156 * self.require_state("mounted")
11157 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
11158 *
11159 * if not isinstance(mode, int):
11160 */
11161 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__11161; goto __pyx_L1_error;}
11162 __Pyx_GOTREF(__pyx_t_1);
11163 __pyx_t_3 = NULL((void*)0);
11164 __pyx_t_4 = 0;
11165 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
11166 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
11167 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
11168 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
11169 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
11170 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
11171 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
11172 __pyx_t_4 = 1;
11173 }
11174 }
11175 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__11175; goto __pyx_L1_error;}
11176 __Pyx_GOTREF(__pyx_t_5);
11177 if (__pyx_t_3) {
11178 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
11179 }
11180 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
11181 __Pyx_GIVEREF(__pyx_v_path);
11182 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
11183 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
11184 __Pyx_GIVEREF(__pyx_n_s_path);
11185 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
11186 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__11186; goto __pyx_L1_error;}
11187 __Pyx_GOTREF(__pyx_t_2);
11188 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
11189 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
11190 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
11191 __pyx_t_2 = 0;
11192
11193 /* "cephfs.pyx":875
11194 * path = cstr(path, 'path')
11195 *
11196 * if not isinstance(mode, int): # <<<<<<<<<<<<<<
11197 * raise TypeError('mode must be an int')
11198 * if isinstance(flags, str):
11199 */
11200 __pyx_t_6 = PyInt_Check(__pyx_v_mode)((((__pyx_v_mode)->ob_type)->tp_flags & ((1L<<
23))) != 0)
;
11201 __pyx_t_7 = ((!(__pyx_t_6 != 0)) != 0);
11202 if (__pyx_t_7) {
11203
11204 /* "cephfs.pyx":876
11205 *
11206 * if not isinstance(mode, int):
11207 * raise TypeError('mode must be an int') # <<<<<<<<<<<<<<
11208 * if isinstance(flags, str):
11209 * cephfs_flags = 0
11210 */
11211 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__37, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__11211; goto __pyx_L1_error;}
11212 __Pyx_GOTREF(__pyx_t_2);
11213 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
11214 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
11215 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__11215; goto __pyx_L1_error;}
11216
11217 /* "cephfs.pyx":875
11218 * path = cstr(path, 'path')
11219 *
11220 * if not isinstance(mode, int): # <<<<<<<<<<<<<<
11221 * raise TypeError('mode must be an int')
11222 * if isinstance(flags, str):
11223 */
11224 }
11225
11226 /* "cephfs.pyx":877
11227 * if not isinstance(mode, int):
11228 * raise TypeError('mode must be an int')
11229 * if isinstance(flags, str): # <<<<<<<<<<<<<<
11230 * cephfs_flags = 0
11231 * if flags == '':
11232 */
11233 __pyx_t_7 = PyString_Check(__pyx_v_flags)((((((PyObject*)(__pyx_v_flags))->ob_type))->tp_flags &
((1L<<27))) != 0)
;
11234 __pyx_t_6 = (__pyx_t_7 != 0);
11235 if (__pyx_t_6) {
11236
11237 /* "cephfs.pyx":878
11238 * raise TypeError('mode must be an int')
11239 * if isinstance(flags, str):
11240 * cephfs_flags = 0 # <<<<<<<<<<<<<<
11241 * if flags == '':
11242 * cephfs_flags = os.O_RDONLY
11243 */
11244 __Pyx_INCREF(__pyx_int_0)( ((PyObject*)(__pyx_int_0))->ob_refcnt++);
11245 __pyx_v_cephfs_flags = __pyx_int_0;
11246
11247 /* "cephfs.pyx":879
11248 * if isinstance(flags, str):
11249 * cephfs_flags = 0
11250 * if flags == '': # <<<<<<<<<<<<<<
11251 * cephfs_flags = os.O_RDONLY
11252 * else:
11253 */
11254 __pyx_t_6 = (__Pyx_PyString_Equals__Pyx_PyBytes_Equals(__pyx_v_flags, __pyx_kp_s__7, Py_EQ2)); if (unlikely(__pyx_t_6 < 0)__builtin_expect(!!(__pyx_t_6 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__11254; goto __pyx_L1_error;}
11255 if (__pyx_t_6) {
11256
11257 /* "cephfs.pyx":880
11258 * cephfs_flags = 0
11259 * if flags == '':
11260 * cephfs_flags = os.O_RDONLY # <<<<<<<<<<<<<<
11261 * else:
11262 * access_flags = 0;
11263 */
11264 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__11264; goto __pyx_L1_error;}
11265 __Pyx_GOTREF(__pyx_t_2);
11266 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_O_RDONLY); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__11266; goto __pyx_L1_error;}
11267 __Pyx_GOTREF(__pyx_t_1);
11268 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
11269 __Pyx_DECREF_SET(__pyx_v_cephfs_flags, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_cephfs_flags; __pyx_v_cephfs_flags
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
11270 __pyx_t_1 = 0;
11271
11272 /* "cephfs.pyx":879
11273 * if isinstance(flags, str):
11274 * cephfs_flags = 0
11275 * if flags == '': # <<<<<<<<<<<<<<
11276 * cephfs_flags = os.O_RDONLY
11277 * else:
11278 */
11279 goto __pyx_L5;
11280 }
11281
11282 /* "cephfs.pyx":882
11283 * cephfs_flags = os.O_RDONLY
11284 * else:
11285 * access_flags = 0; # <<<<<<<<<<<<<<
11286 * for c in flags:
11287 * if c == 'r':
11288 */
11289 /*else*/ {
11290 __pyx_v_access_flags = 0;
11291
11292 /* "cephfs.pyx":883
11293 * else:
11294 * access_flags = 0;
11295 * for c in flags: # <<<<<<<<<<<<<<
11296 * if c == 'r':
11297 * access_flags = 1;
11298 */
11299 if (likely(PyList_CheckExact(__pyx_v_flags))__builtin_expect(!!(((((PyObject*)(__pyx_v_flags))->ob_type
) == &PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_v_flags)((((PyObject*)(__pyx_v_flags))->ob_type) == &PyTuple_Type
)
) {
11300 __pyx_t_1 = __pyx_v_flags; __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++); __pyx_t_4 = 0;
11301 __pyx_t_8 = NULL((void*)0);
11302 } else {
11303 __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_flags); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__11303; goto __pyx_L1_error;}
11304 __Pyx_GOTREF(__pyx_t_1);
11305 __pyx_t_8 = Py_TYPE(__pyx_t_1)(((PyObject*)(__pyx_t_1))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__11305; goto __pyx_L1_error;}
11306 }
11307 for (;;) {
11308 if (likely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 1)) {
11309 if (likely(PyList_CheckExact(__pyx_t_1))__builtin_expect(!!(((((PyObject*)(__pyx_t_1))->ob_type) ==
&PyList_Type)), 1)
) {
11310 if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)(((PyVarObject*)(__pyx_t_1))->ob_size)) break;
11311 #if CYTHON_COMPILING_IN_CPYTHON1
11312 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4)(((PyListObject *)(__pyx_t_1))->ob_item[__pyx_t_4]); __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++); __pyx_t_4++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__11312; goto __pyx_L1_error;}
11313 #else
11314 __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4)( (((PyObject*)(__pyx_t_1))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_1, __pyx_t_4) )
; __pyx_t_4++; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__11314; goto __pyx_L1_error;}
11315 __Pyx_GOTREF(__pyx_t_2);
11316 #endif
11317 } else {
11318 if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)(((PyVarObject*)(__pyx_t_1))->ob_size)) break;
11319 #if CYTHON_COMPILING_IN_CPYTHON1
11320 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_1))->ob_item[__pyx_t_4]); __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++); __pyx_t_4++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__11320; goto __pyx_L1_error;}
11321 #else
11322 __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4)( (((PyObject*)(__pyx_t_1))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_1, __pyx_t_4) )
; __pyx_t_4++; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__11322; goto __pyx_L1_error;}
11323 __Pyx_GOTREF(__pyx_t_2);
11324 #endif
11325 }
11326 } else {
11327 __pyx_t_2 = __pyx_t_8(__pyx_t_1);
11328 if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {
11329 PyObject* exc_type = PyErr_Occurred();
11330 if (exc_type) {
11331 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
11332 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__11332; goto __pyx_L1_error;}
11333 }
11334 break;
11335 }
11336 __Pyx_GOTREF(__pyx_t_2);
11337 }
11338 __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_c; __pyx_v_c = __pyx_t_2
; do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0); } while (0)
;
11339 __pyx_t_2 = 0;
11340
11341 /* "cephfs.pyx":884
11342 * access_flags = 0;
11343 * for c in flags:
11344 * if c == 'r': # <<<<<<<<<<<<<<
11345 * access_flags = 1;
11346 * elif c == 'w':
11347 */
11348 __pyx_t_6 = (__Pyx_PyString_Equals__Pyx_PyBytes_Equals(__pyx_v_c, __pyx_n_s_r, Py_EQ2)); if (unlikely(__pyx_t_6 < 0)__builtin_expect(!!(__pyx_t_6 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__11348; goto __pyx_L1_error;}
11349 if (__pyx_t_6) {
11350
11351 /* "cephfs.pyx":885
11352 * for c in flags:
11353 * if c == 'r':
11354 * access_flags = 1; # <<<<<<<<<<<<<<
11355 * elif c == 'w':
11356 * access_flags = 2;
11357 */
11358 __pyx_v_access_flags = 1;
11359
11360 /* "cephfs.pyx":884
11361 * access_flags = 0;
11362 * for c in flags:
11363 * if c == 'r': # <<<<<<<<<<<<<<
11364 * access_flags = 1;
11365 * elif c == 'w':
11366 */
11367 goto __pyx_L8;
11368 }
11369
11370 /* "cephfs.pyx":886
11371 * if c == 'r':
11372 * access_flags = 1;
11373 * elif c == 'w': # <<<<<<<<<<<<<<
11374 * access_flags = 2;
11375 * cephfs_flags |= os.O_TRUNC | os.O_CREAT
11376 */
11377 __pyx_t_6 = (__Pyx_PyString_Equals__Pyx_PyBytes_Equals(__pyx_v_c, __pyx_n_s_w, Py_EQ2)); if (unlikely(__pyx_t_6 < 0)__builtin_expect(!!(__pyx_t_6 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__11377; goto __pyx_L1_error;}
11378 if (__pyx_t_6) {
11379
11380 /* "cephfs.pyx":887
11381 * access_flags = 1;
11382 * elif c == 'w':
11383 * access_flags = 2; # <<<<<<<<<<<<<<
11384 * cephfs_flags |= os.O_TRUNC | os.O_CREAT
11385 * elif access_flags > 0 and c == '+':
11386 */
11387 __pyx_v_access_flags = 2;
11388
11389 /* "cephfs.pyx":888
11390 * elif c == 'w':
11391 * access_flags = 2;
11392 * cephfs_flags |= os.O_TRUNC | os.O_CREAT # <<<<<<<<<<<<<<
11393 * elif access_flags > 0 and c == '+':
11394 * access_flags = 3;
11395 */
11396 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__11396; goto __pyx_L1_error;}
11397 __Pyx_GOTREF(__pyx_t_2);
11398 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_O_TRUNC); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__11398; goto __pyx_L1_error;}
11399 __Pyx_GOTREF(__pyx_t_5);
11400 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
11401 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__11401; goto __pyx_L1_error;}
11402 __Pyx_GOTREF(__pyx_t_2);
11403 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_O_CREAT); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__11403; goto __pyx_L1_error;}
11404 __Pyx_GOTREF(__pyx_t_3);
11405 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
11406 __pyx_t_2 = PyNumber_Or(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__11406; goto __pyx_L1_error;}
11407 __Pyx_GOTREF(__pyx_t_2);
11408 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
11409 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
11410 __pyx_t_3 = PyNumber_InPlaceOr(__pyx_v_cephfs_flags, __pyx_t_2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__11410; goto __pyx_L1_error;}
11411 __Pyx_GOTREF(__pyx_t_3);
11412 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
11413 __Pyx_DECREF_SET(__pyx_v_cephfs_flags, __pyx_t_3)do { PyObject *tmp = (PyObject *) __pyx_v_cephfs_flags; __pyx_v_cephfs_flags
= __pyx_t_3; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
11414 __pyx_t_3 = 0;
11415
11416 /* "cephfs.pyx":886
11417 * if c == 'r':
11418 * access_flags = 1;
11419 * elif c == 'w': # <<<<<<<<<<<<<<
11420 * access_flags = 2;
11421 * cephfs_flags |= os.O_TRUNC | os.O_CREAT
11422 */
11423 goto __pyx_L8;
11424 }
11425
11426 /* "cephfs.pyx":889
11427 * access_flags = 2;
11428 * cephfs_flags |= os.O_TRUNC | os.O_CREAT
11429 * elif access_flags > 0 and c == '+': # <<<<<<<<<<<<<<
11430 * access_flags = 3;
11431 * else:
11432 */
11433 __pyx_t_7 = ((__pyx_v_access_flags > 0) != 0);
11434 if (__pyx_t_7) {
11435 } else {
11436 __pyx_t_6 = __pyx_t_7;
11437 goto __pyx_L9_bool_binop_done;
11438 }
11439 __pyx_t_7 = (__Pyx_PyString_Equals__Pyx_PyBytes_Equals(__pyx_v_c, __pyx_kp_s__38, Py_EQ2)); if (unlikely(__pyx_t_7 < 0)__builtin_expect(!!(__pyx_t_7 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__11439; goto __pyx_L1_error;}
11440 __pyx_t_6 = __pyx_t_7;
11441 __pyx_L9_bool_binop_done:;
11442 if (__pyx_t_6) {
11443
11444 /* "cephfs.pyx":890
11445 * cephfs_flags |= os.O_TRUNC | os.O_CREAT
11446 * elif access_flags > 0 and c == '+':
11447 * access_flags = 3; # <<<<<<<<<<<<<<
11448 * else:
11449 * raise make_ex(errno.EOPNOTSUPP,
11450 */
11451 __pyx_v_access_flags = 3;
11452
11453 /* "cephfs.pyx":889
11454 * access_flags = 2;
11455 * cephfs_flags |= os.O_TRUNC | os.O_CREAT
11456 * elif access_flags > 0 and c == '+': # <<<<<<<<<<<<<<
11457 * access_flags = 3;
11458 * else:
11459 */
11460 goto __pyx_L8;
11461 }
11462
11463 /* "cephfs.pyx":892
11464 * access_flags = 3;
11465 * else:
11466 * raise make_ex(errno.EOPNOTSUPP, # <<<<<<<<<<<<<<
11467 * "open flags doesn't support %s" % c)
11468 *
11469 */
11470 /*else*/ {
11471 __pyx_t_3 = __Pyx_PyInt_From_int(EOPNOTSUPP95); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__11471; goto __pyx_L1_error;}
11472 __Pyx_GOTREF(__pyx_t_3);
11473
11474 /* "cephfs.pyx":893
11475 * else:
11476 * raise make_ex(errno.EOPNOTSUPP,
11477 * "open flags doesn't support %s" % c) # <<<<<<<<<<<<<<
11478 *
11479 * if access_flags == 1:
11480 */
11481 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_open_flags_doesn_t_support_s, __pyx_v_c)PyString_Format(__pyx_kp_s_open_flags_doesn_t_support_s, __pyx_v_c
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__11481; goto __pyx_L1_error;}
11482 __Pyx_GOTREF(__pyx_t_2);
11483
11484 /* "cephfs.pyx":892
11485 * access_flags = 3;
11486 * else:
11487 * raise make_ex(errno.EOPNOTSUPP, # <<<<<<<<<<<<<<
11488 * "open flags doesn't support %s" % c)
11489 *
11490 */
11491 __pyx_t_5 = __pyx_f_6cephfs_make_ex(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__11491; goto __pyx_L1_error;}
11492 __Pyx_GOTREF(__pyx_t_5);
11493 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
11494 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
11495 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
11496 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
11497 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__11497; goto __pyx_L1_error;}
11498 }
11499 __pyx_L8:;
11500
11501 /* "cephfs.pyx":883
11502 * else:
11503 * access_flags = 0;
11504 * for c in flags: # <<<<<<<<<<<<<<
11505 * if c == 'r':
11506 * access_flags = 1;
11507 */
11508 }
11509 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
11510
11511 /* "cephfs.pyx":895
11512 * "open flags doesn't support %s" % c)
11513 *
11514 * if access_flags == 1: # <<<<<<<<<<<<<<
11515 * cephfs_flags |= os.O_RDONLY;
11516 * elif access_flags == 2:
11517 */
11518 switch (__pyx_v_access_flags) {
11519 case 1:
11520
11521 /* "cephfs.pyx":896
11522 *
11523 * if access_flags == 1:
11524 * cephfs_flags |= os.O_RDONLY; # <<<<<<<<<<<<<<
11525 * elif access_flags == 2:
11526 * cephfs_flags |= os.O_WRONLY;
11527 */
11528 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__11528; goto __pyx_L1_error;}
11529 __Pyx_GOTREF(__pyx_t_1);
11530 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_O_RDONLY); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__11530; goto __pyx_L1_error;}
11531 __Pyx_GOTREF(__pyx_t_5);
11532 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
11533 __pyx_t_1 = PyNumber_InPlaceOr(__pyx_v_cephfs_flags, __pyx_t_5); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__11533; goto __pyx_L1_error;}
11534 __Pyx_GOTREF(__pyx_t_1);
11535 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
11536 __Pyx_DECREF_SET(__pyx_v_cephfs_flags, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_cephfs_flags; __pyx_v_cephfs_flags
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
11537 __pyx_t_1 = 0;
11538
11539 /* "cephfs.pyx":895
11540 * "open flags doesn't support %s" % c)
11541 *
11542 * if access_flags == 1: # <<<<<<<<<<<<<<
11543 * cephfs_flags |= os.O_RDONLY;
11544 * elif access_flags == 2:
11545 */
11546 break;
11547
11548 /* "cephfs.pyx":897
11549 * if access_flags == 1:
11550 * cephfs_flags |= os.O_RDONLY;
11551 * elif access_flags == 2: # <<<<<<<<<<<<<<
11552 * cephfs_flags |= os.O_WRONLY;
11553 * else:
11554 */
11555 case 2:
11556
11557 /* "cephfs.pyx":898
11558 * cephfs_flags |= os.O_RDONLY;
11559 * elif access_flags == 2:
11560 * cephfs_flags |= os.O_WRONLY; # <<<<<<<<<<<<<<
11561 * else:
11562 * cephfs_flags |= os.O_RDWR;
11563 */
11564 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__11564; goto __pyx_L1_error;}
11565 __Pyx_GOTREF(__pyx_t_1);
11566 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_O_WRONLY); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__11566; goto __pyx_L1_error;}
11567 __Pyx_GOTREF(__pyx_t_5);
11568 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
11569 __pyx_t_1 = PyNumber_InPlaceOr(__pyx_v_cephfs_flags, __pyx_t_5); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__11569; goto __pyx_L1_error;}
11570 __Pyx_GOTREF(__pyx_t_1);
11571 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
11572 __Pyx_DECREF_SET(__pyx_v_cephfs_flags, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_cephfs_flags; __pyx_v_cephfs_flags
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
11573 __pyx_t_1 = 0;
11574
11575 /* "cephfs.pyx":897
11576 * if access_flags == 1:
11577 * cephfs_flags |= os.O_RDONLY;
11578 * elif access_flags == 2: # <<<<<<<<<<<<<<
11579 * cephfs_flags |= os.O_WRONLY;
11580 * else:
11581 */
11582 break;
11583 default:
11584
11585 /* "cephfs.pyx":900
11586 * cephfs_flags |= os.O_WRONLY;
11587 * else:
11588 * cephfs_flags |= os.O_RDWR; # <<<<<<<<<<<<<<
11589 *
11590 * elif isinstance(flags, int):
11591 */
11592 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__11592; goto __pyx_L1_error;}
11593 __Pyx_GOTREF(__pyx_t_1);
11594 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_O_RDWR); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__11594; goto __pyx_L1_error;}
11595 __Pyx_GOTREF(__pyx_t_5);
11596 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
11597 __pyx_t_1 = PyNumber_InPlaceOr(__pyx_v_cephfs_flags, __pyx_t_5); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__11597; goto __pyx_L1_error;}
11598 __Pyx_GOTREF(__pyx_t_1);
11599 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
11600 __Pyx_DECREF_SET(__pyx_v_cephfs_flags, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_cephfs_flags; __pyx_v_cephfs_flags
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
11601 __pyx_t_1 = 0;
11602 break;
11603 }
11604 }
11605 __pyx_L5:;
11606
11607 /* "cephfs.pyx":877
11608 * if not isinstance(mode, int):
11609 * raise TypeError('mode must be an int')
11610 * if isinstance(flags, str): # <<<<<<<<<<<<<<
11611 * cephfs_flags = 0
11612 * if flags == '':
11613 */
11614 goto __pyx_L4;
11615 }
11616
11617 /* "cephfs.pyx":902
11618 * cephfs_flags |= os.O_RDWR;
11619 *
11620 * elif isinstance(flags, int): # <<<<<<<<<<<<<<
11621 * cephfs_flags = flags
11622 * else:
11623 */
11624 __pyx_t_6 = PyInt_Check(__pyx_v_flags)((((__pyx_v_flags)->ob_type)->tp_flags & ((1L<<
23))) != 0)
;
11625 __pyx_t_7 = (__pyx_t_6 != 0);
11626 if (__pyx_t_7) {
11627
11628 /* "cephfs.pyx":903
11629 *
11630 * elif isinstance(flags, int):
11631 * cephfs_flags = flags # <<<<<<<<<<<<<<
11632 * else:
11633 * raise TypeError("flags must be a string or an integer")
11634 */
11635 __Pyx_INCREF(__pyx_v_flags)( ((PyObject*)(__pyx_v_flags))->ob_refcnt++);
11636 __pyx_v_cephfs_flags = __pyx_v_flags;
11637
11638 /* "cephfs.pyx":902
11639 * cephfs_flags |= os.O_RDWR;
11640 *
11641 * elif isinstance(flags, int): # <<<<<<<<<<<<<<
11642 * cephfs_flags = flags
11643 * else:
11644 */
11645 goto __pyx_L4;
11646 }
11647
11648 /* "cephfs.pyx":905
11649 * cephfs_flags = flags
11650 * else:
11651 * raise TypeError("flags must be a string or an integer") # <<<<<<<<<<<<<<
11652 *
11653 * cdef:
11654 */
11655 /*else*/ {
11656 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__39, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__11656; goto __pyx_L1_error;}
11657 __Pyx_GOTREF(__pyx_t_1);
11658 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11659 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
11660 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__11660; goto __pyx_L1_error;}
11661 }
11662 __pyx_L4:;
11663
11664 /* "cephfs.pyx":908
11665 *
11666 * cdef:
11667 * char* _path = path # <<<<<<<<<<<<<<
11668 * int _flags = cephfs_flags
11669 * int _mode = mode
11670 */
11671 __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_9) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_9) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__11671; goto __pyx_L1_error;}
11672 __pyx_v__path = __pyx_t_9;
11673
11674 /* "cephfs.pyx":909
11675 * cdef:
11676 * char* _path = path
11677 * int _flags = cephfs_flags # <<<<<<<<<<<<<<
11678 * int _mode = mode
11679 *
11680 */
11681 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_cephfs_flags); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__11681; goto __pyx_L1_error;}
11682 __pyx_v__flags = __pyx_t_10;
11683
11684 /* "cephfs.pyx":910
11685 * char* _path = path
11686 * int _flags = cephfs_flags
11687 * int _mode = mode # <<<<<<<<<<<<<<
11688 *
11689 * with nogil:
11690 */
11691 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_mode); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__11691; goto __pyx_L1_error;}
11692 __pyx_v__mode = __pyx_t_10;
11693
11694 /* "cephfs.pyx":912
11695 * int _mode = mode
11696 *
11697 * with nogil: # <<<<<<<<<<<<<<
11698 * ret = ceph_open(self.cluster, _path, _flags, _mode)
11699 * if ret < 0:
11700 */
11701 {
11702 #ifdef WITH_THREAD1
11703 PyThreadState *_save;
11704 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
11705 #endif
11706 /*try:*/ {
11707
11708 /* "cephfs.pyx":913
11709 *
11710 * with nogil:
11711 * ret = ceph_open(self.cluster, _path, _flags, _mode) # <<<<<<<<<<<<<<
11712 * if ret < 0:
11713 * raise make_ex(ret, "error in open {}".format(path.decode('utf-8')))
11714 */
11715 __pyx_v_ret = ceph_open(__pyx_v_self->cluster, __pyx_v__path, __pyx_v__flags, __pyx_v__mode);
11716 }
11717
11718 /* "cephfs.pyx":912
11719 * int _mode = mode
11720 *
11721 * with nogil: # <<<<<<<<<<<<<<
11722 * ret = ceph_open(self.cluster, _path, _flags, _mode)
11723 * if ret < 0:
11724 */
11725 /*finally:*/ {
11726 /*normal exit:*/{
11727 #ifdef WITH_THREAD1
11728 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
11729 #endif
11730 goto __pyx_L13;
11731 }
11732 __pyx_L13:;
11733 }
11734 }
11735
11736 /* "cephfs.pyx":914
11737 * with nogil:
11738 * ret = ceph_open(self.cluster, _path, _flags, _mode)
11739 * if ret < 0: # <<<<<<<<<<<<<<
11740 * raise make_ex(ret, "error in open {}".format(path.decode('utf-8')))
11741 * return ret
11742 */
11743 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
11744 if (__pyx_t_7) {
11745
11746 /* "cephfs.pyx":915
11747 * ret = ceph_open(self.cluster, _path, _flags, _mode)
11748 * if ret < 0:
11749 * raise make_ex(ret, "error in open {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
11750 * return ret
11751 *
11752 */
11753 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__11753; goto __pyx_L1_error;}
11754 __Pyx_GOTREF(__pyx_t_1);
11755 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_error_in_open, __pyx_n_s_format); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__11755; goto __pyx_L1_error;}
11756 __Pyx_GOTREF(__pyx_t_2);
11757 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__11757; goto __pyx_L1_error;}
11758 __Pyx_GOTREF(__pyx_t_3);
11759 __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__40, NULL((void*)0)); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__11759; goto __pyx_L1_error;}
11760 __Pyx_GOTREF(__pyx_t_11);
11761 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
11762 __pyx_t_3 = NULL((void*)0);
11763 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
11764 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
11765 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
11766 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
11767 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
11768 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
11769 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
11770 }
11771 }
11772 if (!__pyx_t_3) {
11773 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__11773; goto __pyx_L1_error;}
11774 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
11775 __Pyx_GOTREF(__pyx_t_5);
11776 } else {
11777 __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)__builtin_expect(!!(!__pyx_t_12), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__11777; goto __pyx_L1_error;}
11778 __Pyx_GOTREF(__pyx_t_12);
11779 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_12))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
11780 __Pyx_GIVEREF(__pyx_t_11);
11781 PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_11)(((PyTupleObject *)(__pyx_t_12))->ob_item[0+1] = __pyx_t_11
)
;
11782 __pyx_t_11 = 0;
11783 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__11783; goto __pyx_L1_error;}
11784 __Pyx_GOTREF(__pyx_t_5);
11785 __Pyx_DECREF(__pyx_t_12)do { if ( --((PyObject*)(__pyx_t_12))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_12)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_12)))); } while
(0)
; __pyx_t_12 = 0;
11786 }
11787 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
11788 __pyx_t_2 = __pyx_f_6cephfs_make_ex(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__11788; goto __pyx_L1_error;}
11789 __Pyx_GOTREF(__pyx_t_2);
11790 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
11791 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
11792 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
11793 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
11794 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__11794; goto __pyx_L1_error;}
11795
11796 /* "cephfs.pyx":914
11797 * with nogil:
11798 * ret = ceph_open(self.cluster, _path, _flags, _mode)
11799 * if ret < 0: # <<<<<<<<<<<<<<
11800 * raise make_ex(ret, "error in open {}".format(path.decode('utf-8')))
11801 * return ret
11802 */
11803 }
11804
11805 /* "cephfs.pyx":916
11806 * if ret < 0:
11807 * raise make_ex(ret, "error in open {}".format(path.decode('utf-8')))
11808 * return ret # <<<<<<<<<<<<<<
11809 *
11810 * def close(self, fd):
11811 */
11812 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
11813 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__11813; goto __pyx_L1_error;}
11814 __Pyx_GOTREF(__pyx_t_2);
11815 __pyx_r = __pyx_t_2;
11816 __pyx_t_2 = 0;
11817 goto __pyx_L0;
11818
11819 /* "cephfs.pyx":862
11820 * raise make_ex(ret, "error in rmdir {}".format(path.decode('utf-8')))
11821 *
11822 * def open(self, path, flags, mode=0): # <<<<<<<<<<<<<<
11823 * """
11824 * Create and/or open a file.
11825 */
11826
11827 /* function exit code */
11828 __pyx_L1_error:;
11829 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
11830 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
11831 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
11832 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
11833 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
11834 __Pyx_XDECREF(__pyx_t_12)do { if ((__pyx_t_12) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_12))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_12)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_12)))); } while (0); } while (0)
;
11835 __Pyx_AddTraceback("cephfs.LibCephFS.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
11836 __pyx_r = NULL((void*)0);
11837 __pyx_L0:;
11838 __Pyx_XDECREF(__pyx_v_cephfs_flags)do { if ((__pyx_v_cephfs_flags) == ((void*)0)) ; else do { if
( --((PyObject*)(__pyx_v_cephfs_flags))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(__pyx_v_cephfs_flags)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_cephfs_flags
)))); } while (0); } while (0)
;
11839 __Pyx_XDECREF(__pyx_v_c)do { if ((__pyx_v_c) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_c))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_v_c)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_c)))); } while (0); } while (0)
;
11840 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
11841 __Pyx_XGIVEREF(__pyx_r);
11842 __Pyx_RefNannyFinishContext();
11843 return __pyx_r;
11844}
11845
11846/* "cephfs.pyx":918
11847 * return ret
11848 *
11849 * def close(self, fd): # <<<<<<<<<<<<<<
11850 * """
11851 * Close the open file.
11852 */
11853
11854/* Python wrapper */
11855static PyObject *__pyx_pw_6cephfs_9LibCephFS_63close(PyObject *__pyx_v_self, PyObject *__pyx_v_fd); /*proto*/
11856static char __pyx_doc_6cephfs_9LibCephFS_62close[] = "\n Close the open file.\n \n :param fd: the file descriptor referring to the open file.\n ";
11857static PyObject *__pyx_pw_6cephfs_9LibCephFS_63close(PyObject *__pyx_v_self, PyObject *__pyx_v_fd) {
11858 PyObject *__pyx_r = 0;
11859 __Pyx_RefNannyDeclarations
11860 __Pyx_RefNannySetupContext("close (wrapper)", 0);
11861 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_62close(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_fd));
11862
11863 /* function exit code */
11864 __Pyx_RefNannyFinishContext();
11865 return __pyx_r;
11866}
11867
11868static PyObject *__pyx_pf_6cephfs_9LibCephFS_62close(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd) {
11869 int __pyx_v__fd;
11870 int __pyx_v_ret;
11871 PyObject *__pyx_r = NULL((void*)0);
11872 __Pyx_RefNannyDeclarations
11873 PyObject *__pyx_t_1 = NULL((void*)0);
11874 PyObject *__pyx_t_2 = NULL((void*)0);
11875 int __pyx_t_3;
11876 int __pyx_t_4;
11877 int __pyx_t_5;
11878 int __pyx_lineno = 0;
11879 const char *__pyx_filename = NULL((void*)0);
11880 int __pyx_clineno = 0;
11881 __Pyx_RefNannySetupContext("close", 0);
11882
11883 /* "cephfs.pyx":925
11884 * """
11885 *
11886 * self.require_state("mounted") # <<<<<<<<<<<<<<
11887 * if not isinstance(fd, int):
11888 * raise TypeError('fd must be an int')
11889 */
11890 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__11890; goto __pyx_L1_error;}
11891 __Pyx_GOTREF(__pyx_t_1);
11892 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__41, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__11892; goto __pyx_L1_error;}
11893 __Pyx_GOTREF(__pyx_t_2);
11894 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
11895 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
11896
11897 /* "cephfs.pyx":926
11898 *
11899 * self.require_state("mounted")
11900 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
11901 * raise TypeError('fd must be an int')
11902 * cdef int _fd = fd
11903 */
11904 __pyx_t_3 = PyInt_Check(__pyx_v_fd)((((__pyx_v_fd)->ob_type)->tp_flags & ((1L<<23
))) != 0)
;
11905 __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
11906 if (__pyx_t_4) {
11907
11908 /* "cephfs.pyx":927
11909 * self.require_state("mounted")
11910 * if not isinstance(fd, int):
11911 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
11912 * cdef int _fd = fd
11913 * with nogil:
11914 */
11915 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__42, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__11915; goto __pyx_L1_error;}
11916 __Pyx_GOTREF(__pyx_t_2);
11917 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
11918 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
11919 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__11919; goto __pyx_L1_error;}
11920
11921 /* "cephfs.pyx":926
11922 *
11923 * self.require_state("mounted")
11924 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
11925 * raise TypeError('fd must be an int')
11926 * cdef int _fd = fd
11927 */
11928 }
11929
11930 /* "cephfs.pyx":928
11931 * if not isinstance(fd, int):
11932 * raise TypeError('fd must be an int')
11933 * cdef int _fd = fd # <<<<<<<<<<<<<<
11934 * with nogil:
11935 * ret = ceph_close(self.cluster, _fd)
11936 */
11937 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_5 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__11937; goto __pyx_L1_error;}
11938 __pyx_v__fd = __pyx_t_5;
11939
11940 /* "cephfs.pyx":929
11941 * raise TypeError('fd must be an int')
11942 * cdef int _fd = fd
11943 * with nogil: # <<<<<<<<<<<<<<
11944 * ret = ceph_close(self.cluster, _fd)
11945 * if ret < 0:
11946 */
11947 {
11948 #ifdef WITH_THREAD1
11949 PyThreadState *_save;
11950 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
11951 #endif
11952 /*try:*/ {
11953
11954 /* "cephfs.pyx":930
11955 * cdef int _fd = fd
11956 * with nogil:
11957 * ret = ceph_close(self.cluster, _fd) # <<<<<<<<<<<<<<
11958 * if ret < 0:
11959 * raise make_ex(ret, "error in close")
11960 */
11961 __pyx_v_ret = ceph_close(__pyx_v_self->cluster, __pyx_v__fd);
11962 }
11963
11964 /* "cephfs.pyx":929
11965 * raise TypeError('fd must be an int')
11966 * cdef int _fd = fd
11967 * with nogil: # <<<<<<<<<<<<<<
11968 * ret = ceph_close(self.cluster, _fd)
11969 * if ret < 0:
11970 */
11971 /*finally:*/ {
11972 /*normal exit:*/{
11973 #ifdef WITH_THREAD1
11974 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
11975 #endif
11976 goto __pyx_L6;
11977 }
11978 __pyx_L6:;
11979 }
11980 }
11981
11982 /* "cephfs.pyx":931
11983 * with nogil:
11984 * ret = ceph_close(self.cluster, _fd)
11985 * if ret < 0: # <<<<<<<<<<<<<<
11986 * raise make_ex(ret, "error in close")
11987 *
11988 */
11989 __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
11990 if (__pyx_t_4) {
11991
11992 /* "cephfs.pyx":932
11993 * ret = ceph_close(self.cluster, _fd)
11994 * if ret < 0:
11995 * raise make_ex(ret, "error in close") # <<<<<<<<<<<<<<
11996 *
11997 * def read(self, fd, offset, l):
11998 */
11999 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__11999; goto __pyx_L1_error;}
12000 __Pyx_GOTREF(__pyx_t_2);
12001 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_close); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__12001; goto __pyx_L1_error;}
12002 __Pyx_GOTREF(__pyx_t_1);
12003 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12004 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
12005 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
12006 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__12006; goto __pyx_L1_error;}
12007
12008 /* "cephfs.pyx":931
12009 * with nogil:
12010 * ret = ceph_close(self.cluster, _fd)
12011 * if ret < 0: # <<<<<<<<<<<<<<
12012 * raise make_ex(ret, "error in close")
12013 *
12014 */
12015 }
12016
12017 /* "cephfs.pyx":918
12018 * return ret
12019 *
12020 * def close(self, fd): # <<<<<<<<<<<<<<
12021 * """
12022 * Close the open file.
12023 */
12024
12025 /* function exit code */
12026 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
12027 goto __pyx_L0;
12028 __pyx_L1_error:;
12029 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
12030 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
12031 __Pyx_AddTraceback("cephfs.LibCephFS.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
12032 __pyx_r = NULL((void*)0);
12033 __pyx_L0:;
12034 __Pyx_XGIVEREF(__pyx_r);
12035 __Pyx_RefNannyFinishContext();
12036 return __pyx_r;
12037}
12038
12039/* "cephfs.pyx":934
12040 * raise make_ex(ret, "error in close")
12041 *
12042 * def read(self, fd, offset, l): # <<<<<<<<<<<<<<
12043 * """
12044 * Read data from the file.
12045 */
12046
12047/* Python wrapper */
12048static PyObject *__pyx_pw_6cephfs_9LibCephFS_65read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12049static char __pyx_doc_6cephfs_9LibCephFS_64read[] = "\n Read data from the file.\n \n :param fd : the file descriptor of the open file to read from.\n :param offset : the offset in the file to read from. If this value is negative, the\n function reads from the current offset of the file descriptor.\n :param l : the flag to indicate what type of seeking to perform\n ";
12050static PyObject *__pyx_pw_6cephfs_9LibCephFS_65read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12051 PyObject *__pyx_v_fd = 0;
12052 PyObject *__pyx_v_offset = 0;
12053 PyObject *__pyx_v_l = 0;
12054 int __pyx_lineno = 0;
12055 const char *__pyx_filename = NULL((void*)0);
12056 int __pyx_clineno = 0;
12057 PyObject *__pyx_r = 0;
12058 __Pyx_RefNannyDeclarations
12059 __Pyx_RefNannySetupContext("read (wrapper)", 0);
12060 {
12061 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_offset,&__pyx_n_s_l,0};
12062 PyObject* values[3] = {0,0,0};
12063 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
12064 Py_ssize_t kw_args;
12065 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
12066 switch (pos_args) {
12067 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12068 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12069 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12070 case 0: break;
12071 default: goto __pyx_L5_argtuple_error;
12072 }
12073 kw_args = PyDict_Size(__pyx_kwds);
12074 switch (pos_args) {
12075 case 0:
12076 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd
)) != 0), 1)
) kw_args--;
12077 else goto __pyx_L5_argtuple_error;
12078 case 1:
12079 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset
)) != 0), 1)
) kw_args--;
12080 else {
12081 __Pyx_RaiseArgtupleInvalid("read", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__12081; goto __pyx_L3_error;}
12082 }
12083 case 2:
12084 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l
)) != 0), 1)
) kw_args--;
12085 else {
12086 __Pyx_RaiseArgtupleInvalid("read", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__12086; goto __pyx_L3_error;}
12087 }
12088 }
12089 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
12090 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "read") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__12090; goto __pyx_L3_error;}
12091 }
12092 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
12093 goto __pyx_L5_argtuple_error;
12094 } else {
12095 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12096 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12097 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12098 }
12099 __pyx_v_fd = values[0];
12100 __pyx_v_offset = values[1];
12101 __pyx_v_l = values[2];
12102 }
12103 goto __pyx_L4_argument_unpacking_done;
12104 __pyx_L5_argtuple_error:;
12105 __Pyx_RaiseArgtupleInvalid("read", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__12105; goto __pyx_L3_error;}
12106 __pyx_L3_error:;
12107 __Pyx_AddTraceback("cephfs.LibCephFS.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
12108 __Pyx_RefNannyFinishContext();
12109 return NULL((void*)0);
12110 __pyx_L4_argument_unpacking_done:;
12111 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_64read(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_fd, __pyx_v_offset, __pyx_v_l);
12112
12113 /* function exit code */
12114 __Pyx_RefNannyFinishContext();
12115 return __pyx_r;
12116}
12117
12118static PyObject *__pyx_pf_6cephfs_9LibCephFS_64read(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_offset, PyObject *__pyx_v_l) {
12119 int __pyx_v__fd;
12120 int64_t __pyx_v__offset;
12121 int64_t __pyx_v__length;
12122 char *__pyx_v_ret_buf;
12123 PyObject *__pyx_v_ret_s;
12124 int __pyx_v_ret;
12125 PyObject *__pyx_r = NULL((void*)0);
12126 __Pyx_RefNannyDeclarations
12127 PyObject *__pyx_t_1 = NULL((void*)0);
12128 PyObject *__pyx_t_2 = NULL((void*)0);
12129 int __pyx_t_3;
12130 int __pyx_t_4;
12131 int __pyx_t_5;
12132 int64_t __pyx_t_6;
12133 PyObject *__pyx_t_7;
12134 char *__pyx_t_8;
12135 int __pyx_t_9;
12136 char const *__pyx_t_10;
12137 PyObject *__pyx_t_11 = NULL((void*)0);
12138 PyObject *__pyx_t_12 = NULL((void*)0);
12139 PyObject *__pyx_t_13 = NULL((void*)0);
12140 PyObject *__pyx_t_14 = NULL((void*)0);
12141 PyObject *__pyx_t_15 = NULL((void*)0);
12142 PyObject *__pyx_t_16 = NULL((void*)0);
12143 int __pyx_lineno = 0;
12144 const char *__pyx_filename = NULL((void*)0);
12145 int __pyx_clineno = 0;
12146 __Pyx_RefNannySetupContext("read", 0);
12147
12148 /* "cephfs.pyx":943
12149 * :param l : the flag to indicate what type of seeking to perform
12150 * """
12151 * self.require_state("mounted") # <<<<<<<<<<<<<<
12152 * if not isinstance(offset, int):
12153 * raise TypeError('offset must be an int')
12154 */
12155 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__12155; goto __pyx_L1_error;}
12156 __Pyx_GOTREF(__pyx_t_1);
12157 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__43, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__12157; goto __pyx_L1_error;}
12158 __Pyx_GOTREF(__pyx_t_2);
12159 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
12160 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12161
12162 /* "cephfs.pyx":944
12163 * """
12164 * self.require_state("mounted")
12165 * if not isinstance(offset, int): # <<<<<<<<<<<<<<
12166 * raise TypeError('offset must be an int')
12167 * if not isinstance(l, int):
12168 */
12169 __pyx_t_3 = PyInt_Check(__pyx_v_offset)((((__pyx_v_offset)->ob_type)->tp_flags & ((1L<<
23))) != 0)
;
12170 __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
12171 if (__pyx_t_4) {
12172
12173 /* "cephfs.pyx":945
12174 * self.require_state("mounted")
12175 * if not isinstance(offset, int):
12176 * raise TypeError('offset must be an int') # <<<<<<<<<<<<<<
12177 * if not isinstance(l, int):
12178 * raise TypeError('l must be an int')
12179 */
12180 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__44, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__12180; goto __pyx_L1_error;}
12181 __Pyx_GOTREF(__pyx_t_2);
12182 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12183 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12184 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__12184; goto __pyx_L1_error;}
12185
12186 /* "cephfs.pyx":944
12187 * """
12188 * self.require_state("mounted")
12189 * if not isinstance(offset, int): # <<<<<<<<<<<<<<
12190 * raise TypeError('offset must be an int')
12191 * if not isinstance(l, int):
12192 */
12193 }
12194
12195 /* "cephfs.pyx":946
12196 * if not isinstance(offset, int):
12197 * raise TypeError('offset must be an int')
12198 * if not isinstance(l, int): # <<<<<<<<<<<<<<
12199 * raise TypeError('l must be an int')
12200 * if not isinstance(fd, int):
12201 */
12202 __pyx_t_4 = PyInt_Check(__pyx_v_l)((((__pyx_v_l)->ob_type)->tp_flags & ((1L<<23
))) != 0)
;
12203 __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0);
12204 if (__pyx_t_3) {
12205
12206 /* "cephfs.pyx":947
12207 * raise TypeError('offset must be an int')
12208 * if not isinstance(l, int):
12209 * raise TypeError('l must be an int') # <<<<<<<<<<<<<<
12210 * if not isinstance(fd, int):
12211 * raise TypeError('fd must be an int')
12212 */
12213 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__45, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__12213; goto __pyx_L1_error;}
12214 __Pyx_GOTREF(__pyx_t_2);
12215 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12216 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12217 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__12217; goto __pyx_L1_error;}
12218
12219 /* "cephfs.pyx":946
12220 * if not isinstance(offset, int):
12221 * raise TypeError('offset must be an int')
12222 * if not isinstance(l, int): # <<<<<<<<<<<<<<
12223 * raise TypeError('l must be an int')
12224 * if not isinstance(fd, int):
12225 */
12226 }
12227
12228 /* "cephfs.pyx":948
12229 * if not isinstance(l, int):
12230 * raise TypeError('l must be an int')
12231 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
12232 * raise TypeError('fd must be an int')
12233 * cdef:
12234 */
12235 __pyx_t_3 = PyInt_Check(__pyx_v_fd)((((__pyx_v_fd)->ob_type)->tp_flags & ((1L<<23
))) != 0)
;
12236 __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
12237 if (__pyx_t_4) {
12238
12239 /* "cephfs.pyx":949
12240 * raise TypeError('l must be an int')
12241 * if not isinstance(fd, int):
12242 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
12243 * cdef:
12244 * int _fd = fd
12245 */
12246 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__46, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__12246; goto __pyx_L1_error;}
12247 __Pyx_GOTREF(__pyx_t_2);
12248 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12249 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12250 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__12250; goto __pyx_L1_error;}
12251
12252 /* "cephfs.pyx":948
12253 * if not isinstance(l, int):
12254 * raise TypeError('l must be an int')
12255 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
12256 * raise TypeError('fd must be an int')
12257 * cdef:
12258 */
12259 }
12260
12261 /* "cephfs.pyx":951
12262 * raise TypeError('fd must be an int')
12263 * cdef:
12264 * int _fd = fd # <<<<<<<<<<<<<<
12265 * int64_t _offset = offset
12266 * int64_t _length = l
12267 */
12268 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_5 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__12268; goto __pyx_L1_error;}
12269 __pyx_v__fd = __pyx_t_5;
12270
12271 /* "cephfs.pyx":952
12272 * cdef:
12273 * int _fd = fd
12274 * int64_t _offset = offset # <<<<<<<<<<<<<<
12275 * int64_t _length = l
12276 *
12277 */
12278 __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_6 == (int64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_6 == (int64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__12278; goto __pyx_L1_error;}
12279 __pyx_v__offset = __pyx_t_6;
12280
12281 /* "cephfs.pyx":953
12282 * int _fd = fd
12283 * int64_t _offset = offset
12284 * int64_t _length = l # <<<<<<<<<<<<<<
12285 *
12286 * char *ret_buf
12287 */
12288 __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_v_l); if (unlikely((__pyx_t_6 == (int64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_6 == (int64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__12288; goto __pyx_L1_error;}
12289 __pyx_v__length = __pyx_t_6;
12290
12291 /* "cephfs.pyx":956
12292 *
12293 * char *ret_buf
12294 * PyObject* ret_s = NULL # <<<<<<<<<<<<<<
12295 *
12296 * ret_s = PyBytes_FromStringAndSize(NULL, _length)
12297 */
12298 __pyx_v_ret_s = NULL((void*)0);
12299
12300 /* "cephfs.pyx":958
12301 * PyObject* ret_s = NULL
12302 *
12303 * ret_s = PyBytes_FromStringAndSize(NULL, _length) # <<<<<<<<<<<<<<
12304 * try:
12305 * ret_buf = PyBytes_AsString(ret_s)
12306 */
12307 __pyx_t_7 = PyBytes_FromStringAndSizePyString_FromStringAndSize(NULL((void*)0), __pyx_v__length); if (unlikely(__pyx_t_7 == NULL)__builtin_expect(!!(__pyx_t_7 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__12307; goto __pyx_L1_error;}
12308 __pyx_v_ret_s = __pyx_t_7;
12309
12310 /* "cephfs.pyx":959
12311 *
12312 * ret_s = PyBytes_FromStringAndSize(NULL, _length)
12313 * try: # <<<<<<<<<<<<<<
12314 * ret_buf = PyBytes_AsString(ret_s)
12315 * with nogil:
12316 */
12317 /*try:*/ {
12318
12319 /* "cephfs.pyx":960
12320 * ret_s = PyBytes_FromStringAndSize(NULL, _length)
12321 * try:
12322 * ret_buf = PyBytes_AsString(ret_s) # <<<<<<<<<<<<<<
12323 * with nogil:
12324 * ret = ceph_read(self.cluster, _fd, ret_buf, _length, _offset)
12325 */
12326 __pyx_t_8 = PyBytes_AsStringPyString_AsString(__pyx_v_ret_s); if (unlikely(__pyx_t_8 == NULL)__builtin_expect(!!(__pyx_t_8 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__12326; goto __pyx_L7_error;}
12327 __pyx_v_ret_buf = __pyx_t_8;
12328
12329 /* "cephfs.pyx":961
12330 * try:
12331 * ret_buf = PyBytes_AsString(ret_s)
12332 * with nogil: # <<<<<<<<<<<<<<
12333 * ret = ceph_read(self.cluster, _fd, ret_buf, _length, _offset)
12334 * if ret < 0:
12335 */
12336 {
12337 #ifdef WITH_THREAD1
12338 PyThreadState *_save;
12339 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
12340 #endif
12341 /*try:*/ {
12342
12343 /* "cephfs.pyx":962
12344 * ret_buf = PyBytes_AsString(ret_s)
12345 * with nogil:
12346 * ret = ceph_read(self.cluster, _fd, ret_buf, _length, _offset) # <<<<<<<<<<<<<<
12347 * if ret < 0:
12348 * raise make_ex(ret, "error in read")
12349 */
12350 __pyx_v_ret = ceph_read(__pyx_v_self->cluster, __pyx_v__fd, __pyx_v_ret_buf, __pyx_v__length, __pyx_v__offset);
12351 }
12352
12353 /* "cephfs.pyx":961
12354 * try:
12355 * ret_buf = PyBytes_AsString(ret_s)
12356 * with nogil: # <<<<<<<<<<<<<<
12357 * ret = ceph_read(self.cluster, _fd, ret_buf, _length, _offset)
12358 * if ret < 0:
12359 */
12360 /*finally:*/ {
12361 /*normal exit:*/{
12362 #ifdef WITH_THREAD1
12363 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
12364 #endif
12365 goto __pyx_L11;
12366 }
12367 __pyx_L11:;
12368 }
12369 }
12370
12371 /* "cephfs.pyx":963
12372 * with nogil:
12373 * ret = ceph_read(self.cluster, _fd, ret_buf, _length, _offset)
12374 * if ret < 0: # <<<<<<<<<<<<<<
12375 * raise make_ex(ret, "error in read")
12376 *
12377 */
12378 __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
12379 if (__pyx_t_4) {
12380
12381 /* "cephfs.pyx":964
12382 * ret = ceph_read(self.cluster, _fd, ret_buf, _length, _offset)
12383 * if ret < 0:
12384 * raise make_ex(ret, "error in read") # <<<<<<<<<<<<<<
12385 *
12386 * if ret != _length:
12387 */
12388 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__12388; goto __pyx_L7_error;}
12389 __Pyx_GOTREF(__pyx_t_2);
12390 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_read); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__12390; goto __pyx_L7_error;}
12391 __Pyx_GOTREF(__pyx_t_1);
12392 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12393 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
12394 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
12395 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__12395; goto __pyx_L7_error;}
12396
12397 /* "cephfs.pyx":963
12398 * with nogil:
12399 * ret = ceph_read(self.cluster, _fd, ret_buf, _length, _offset)
12400 * if ret < 0: # <<<<<<<<<<<<<<
12401 * raise make_ex(ret, "error in read")
12402 *
12403 */
12404 }
12405
12406 /* "cephfs.pyx":966
12407 * raise make_ex(ret, "error in read")
12408 *
12409 * if ret != _length: # <<<<<<<<<<<<<<
12410 * _PyBytes_Resize(&ret_s, ret)
12411 *
12412 */
12413 __pyx_t_4 = ((__pyx_v_ret != __pyx_v__length) != 0);
12414 if (__pyx_t_4) {
12415
12416 /* "cephfs.pyx":967
12417 *
12418 * if ret != _length:
12419 * _PyBytes_Resize(&ret_s, ret) # <<<<<<<<<<<<<<
12420 *
12421 * return <object>ret_s
12422 */
12423 __pyx_t_5 = _PyBytes_Resize_PyString_Resize((&__pyx_v_ret_s), __pyx_v_ret); if (unlikely(__pyx_t_5 == -1)__builtin_expect(!!(__pyx_t_5 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__12423; goto __pyx_L7_error;}
12424
12425 /* "cephfs.pyx":966
12426 * raise make_ex(ret, "error in read")
12427 *
12428 * if ret != _length: # <<<<<<<<<<<<<<
12429 * _PyBytes_Resize(&ret_s, ret)
12430 *
12431 */
12432 }
12433
12434 /* "cephfs.pyx":969
12435 * _PyBytes_Resize(&ret_s, ret)
12436 *
12437 * return <object>ret_s # <<<<<<<<<<<<<<
12438 * finally:
12439 * # We DECREF unconditionally: the cast to object above will have
12440 */
12441 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
12442 __Pyx_INCREF(((PyObject *)__pyx_v_ret_s))( ((PyObject*)(((PyObject *)__pyx_v_ret_s)))->ob_refcnt++);
12443 __pyx_r = ((PyObject *)__pyx_v_ret_s);
12444 goto __pyx_L6_return;
12445 }
12446
12447 /* "cephfs.pyx":975
12448 * # including if _PyString_Resize fails (that will free the string
12449 * # itself and set ret_s to NULL, hence XDECREF).
12450 * ref.Py_XDECREF(ret_s) # <<<<<<<<<<<<<<
12451 *
12452 * def write(self, fd, buf, offset):
12453 */
12454 /*finally:*/ {
12455 /*exception exit:*/{
12456 __pyx_L7_error:;
12457 __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
12458 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
12459 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
12460 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
12461 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_11, &
__pyx_t_12, &__pyx_t_13) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
12462 __Pyx_XGOTREF(__pyx_t_11);
12463 __Pyx_XGOTREF(__pyx_t_12);
12464 __Pyx_XGOTREF(__pyx_t_13);
12465 __Pyx_XGOTREF(__pyx_t_14);
12466 __Pyx_XGOTREF(__pyx_t_15);
12467 __Pyx_XGOTREF(__pyx_t_16);
12468 __pyx_t_5 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
12469 {
12470 Py_XDECREF(__pyx_v_ret_s)do { if ((__pyx_v_ret_s) == ((void*)0)) ; else do { if ( --((
PyObject*)(__pyx_v_ret_s))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(__pyx_v_ret_s)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(__pyx_v_ret_s)))); } while (0); }
while (0)
;
12471 }
12472 if (PY_MAJOR_VERSION2 >= 3) {
12473 __Pyx_XGIVEREF(__pyx_t_14);
12474 __Pyx_XGIVEREF(__pyx_t_15);
12475 __Pyx_XGIVEREF(__pyx_t_16);
12476 __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
12477 }
12478 __Pyx_XGIVEREF(__pyx_t_11);
12479 __Pyx_XGIVEREF(__pyx_t_12);
12480 __Pyx_XGIVEREF(__pyx_t_13);
12481 __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
12482 __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
12483 __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
12484 goto __pyx_L1_error;
12485 }
12486 __pyx_L6_return: {
12487 __pyx_t_16 = __pyx_r;
12488 __pyx_r = 0;
12489 Py_XDECREF(__pyx_v_ret_s)do { if ((__pyx_v_ret_s) == ((void*)0)) ; else do { if ( --((
PyObject*)(__pyx_v_ret_s))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(__pyx_v_ret_s)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(__pyx_v_ret_s)))); } while (0); }
while (0)
;
12490 __pyx_r = __pyx_t_16;
12491 __pyx_t_16 = 0;
12492 goto __pyx_L0;
12493 }
12494 }
12495
12496 /* "cephfs.pyx":934
12497 * raise make_ex(ret, "error in close")
12498 *
12499 * def read(self, fd, offset, l): # <<<<<<<<<<<<<<
12500 * """
12501 * Read data from the file.
12502 */
12503
12504 /* function exit code */
12505 __pyx_L1_error:;
12506 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
12507 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
12508 __Pyx_AddTraceback("cephfs.LibCephFS.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
12509 __pyx_r = NULL((void*)0);
12510 __pyx_L0:;
12511 __Pyx_XGIVEREF(__pyx_r);
12512 __Pyx_RefNannyFinishContext();
12513 return __pyx_r;
12514}
12515
12516/* "cephfs.pyx":977
12517 * ref.Py_XDECREF(ret_s)
12518 *
12519 * def write(self, fd, buf, offset): # <<<<<<<<<<<<<<
12520 * """
12521 * Write data to a file.
12522 */
12523
12524/* Python wrapper */
12525static PyObject *__pyx_pw_6cephfs_9LibCephFS_67write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12526static char __pyx_doc_6cephfs_9LibCephFS_66write[] = "\n Write data to a file.\n \n :param fd : the file descriptor of the open file to write to\n :param buf : the bytes to write to the file\n :param offset : the offset of the file write into. If this value is negative, the\n function writes to the current offset of the file descriptor.\n ";
12527static PyObject *__pyx_pw_6cephfs_9LibCephFS_67write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12528 PyObject *__pyx_v_fd = 0;
12529 PyObject *__pyx_v_buf = 0;
12530 PyObject *__pyx_v_offset = 0;
12531 int __pyx_lineno = 0;
12532 const char *__pyx_filename = NULL((void*)0);
12533 int __pyx_clineno = 0;
12534 PyObject *__pyx_r = 0;
12535 __Pyx_RefNannyDeclarations
12536 __Pyx_RefNannySetupContext("write (wrapper)", 0);
12537 {
12538 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_buf,&__pyx_n_s_offset,0};
12539 PyObject* values[3] = {0,0,0};
12540 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
12541 Py_ssize_t kw_args;
12542 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
12543 switch (pos_args) {
12544 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12545 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12546 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12547 case 0: break;
12548 default: goto __pyx_L5_argtuple_error;
12549 }
12550 kw_args = PyDict_Size(__pyx_kwds);
12551 switch (pos_args) {
12552 case 0:
12553 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd
)) != 0), 1)
) kw_args--;
12554 else goto __pyx_L5_argtuple_error;
12555 case 1:
12556 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf
)) != 0), 1)
) kw_args--;
12557 else {
12558 __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__12558; goto __pyx_L3_error;}
12559 }
12560 case 2:
12561 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset
)) != 0), 1)
) kw_args--;
12562 else {
12563 __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__12563; goto __pyx_L3_error;}
12564 }
12565 }
12566 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
12567 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "write") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__12567; goto __pyx_L3_error;}
12568 }
12569 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
12570 goto __pyx_L5_argtuple_error;
12571 } else {
12572 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12573 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12574 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12575 }
12576 __pyx_v_fd = values[0];
12577 __pyx_v_buf = values[1];
12578 __pyx_v_offset = values[2];
12579 }
12580 goto __pyx_L4_argument_unpacking_done;
12581 __pyx_L5_argtuple_error:;
12582 __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__12582; goto __pyx_L3_error;}
12583 __pyx_L3_error:;
12584 __Pyx_AddTraceback("cephfs.LibCephFS.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
12585 __Pyx_RefNannyFinishContext();
12586 return NULL((void*)0);
12587 __pyx_L4_argument_unpacking_done:;
12588 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_66write(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_fd, __pyx_v_buf, __pyx_v_offset);
12589
12590 /* function exit code */
12591 __Pyx_RefNannyFinishContext();
12592 return __pyx_r;
12593}
12594
12595static PyObject *__pyx_pf_6cephfs_9LibCephFS_66write(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_buf, PyObject *__pyx_v_offset) {
12596 int __pyx_v__fd;
12597 char *__pyx_v__data;
12598 int64_t __pyx_v__offset;
12599 size_t __pyx_v_length;
12600 int __pyx_v_ret;
12601 PyObject *__pyx_r = NULL((void*)0);
12602 __Pyx_RefNannyDeclarations
12603 PyObject *__pyx_t_1 = NULL((void*)0);
12604 PyObject *__pyx_t_2 = NULL((void*)0);
12605 int __pyx_t_3;
12606 int __pyx_t_4;
12607 int __pyx_t_5;
12608 char *__pyx_t_6;
12609 int64_t __pyx_t_7;
12610 Py_ssize_t __pyx_t_8;
12611 int __pyx_lineno = 0;
12612 const char *__pyx_filename = NULL((void*)0);
12613 int __pyx_clineno = 0;
12614 __Pyx_RefNannySetupContext("write", 0);
12615
12616 /* "cephfs.pyx":986
12617 * function writes to the current offset of the file descriptor.
12618 * """
12619 * self.require_state("mounted") # <<<<<<<<<<<<<<
12620 * if not isinstance(fd, int):
12621 * raise TypeError('fd must be an int')
12622 */
12623 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__12623; goto __pyx_L1_error;}
12624 __Pyx_GOTREF(__pyx_t_1);
12625 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__47, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__12625; goto __pyx_L1_error;}
12626 __Pyx_GOTREF(__pyx_t_2);
12627 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
12628 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12629
12630 /* "cephfs.pyx":987
12631 * """
12632 * self.require_state("mounted")
12633 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
12634 * raise TypeError('fd must be an int')
12635 * if not isinstance(buf, bytes):
12636 */
12637 __pyx_t_3 = PyInt_Check(__pyx_v_fd)((((__pyx_v_fd)->ob_type)->tp_flags & ((1L<<23
))) != 0)
;
12638 __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
12639 if (__pyx_t_4) {
12640
12641 /* "cephfs.pyx":988
12642 * self.require_state("mounted")
12643 * if not isinstance(fd, int):
12644 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
12645 * if not isinstance(buf, bytes):
12646 * raise TypeError('buf must be a bytes')
12647 */
12648 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__48, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__12648; goto __pyx_L1_error;}
12649 __Pyx_GOTREF(__pyx_t_2);
12650 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12651 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12652 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__12652; goto __pyx_L1_error;}
12653
12654 /* "cephfs.pyx":987
12655 * """
12656 * self.require_state("mounted")
12657 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
12658 * raise TypeError('fd must be an int')
12659 * if not isinstance(buf, bytes):
12660 */
12661 }
12662
12663 /* "cephfs.pyx":989
12664 * if not isinstance(fd, int):
12665 * raise TypeError('fd must be an int')
12666 * if not isinstance(buf, bytes): # <<<<<<<<<<<<<<
12667 * raise TypeError('buf must be a bytes')
12668 * if not isinstance(offset, int):
12669 */
12670 __pyx_t_4 = PyBytes_Check(__pyx_v_buf)((((((PyObject*)(__pyx_v_buf))->ob_type))->tp_flags &
((1L<<27))) != 0)
;
12671 __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0);
12672 if (__pyx_t_3) {
12673
12674 /* "cephfs.pyx":990
12675 * raise TypeError('fd must be an int')
12676 * if not isinstance(buf, bytes):
12677 * raise TypeError('buf must be a bytes') # <<<<<<<<<<<<<<
12678 * if not isinstance(offset, int):
12679 * raise TypeError('offset must be an int')
12680 */
12681 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__49, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__12681; goto __pyx_L1_error;}
12682 __Pyx_GOTREF(__pyx_t_2);
12683 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12684 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12685 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__12685; goto __pyx_L1_error;}
12686
12687 /* "cephfs.pyx":989
12688 * if not isinstance(fd, int):
12689 * raise TypeError('fd must be an int')
12690 * if not isinstance(buf, bytes): # <<<<<<<<<<<<<<
12691 * raise TypeError('buf must be a bytes')
12692 * if not isinstance(offset, int):
12693 */
12694 }
12695
12696 /* "cephfs.pyx":991
12697 * if not isinstance(buf, bytes):
12698 * raise TypeError('buf must be a bytes')
12699 * if not isinstance(offset, int): # <<<<<<<<<<<<<<
12700 * raise TypeError('offset must be an int')
12701 *
12702 */
12703 __pyx_t_3 = PyInt_Check(__pyx_v_offset)((((__pyx_v_offset)->ob_type)->tp_flags & ((1L<<
23))) != 0)
;
12704 __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
12705 if (__pyx_t_4) {
12706
12707 /* "cephfs.pyx":992
12708 * raise TypeError('buf must be a bytes')
12709 * if not isinstance(offset, int):
12710 * raise TypeError('offset must be an int') # <<<<<<<<<<<<<<
12711 *
12712 * cdef:
12713 */
12714 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__50, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__12714; goto __pyx_L1_error;}
12715 __Pyx_GOTREF(__pyx_t_2);
12716 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12717 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12718 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__12718; goto __pyx_L1_error;}
12719
12720 /* "cephfs.pyx":991
12721 * if not isinstance(buf, bytes):
12722 * raise TypeError('buf must be a bytes')
12723 * if not isinstance(offset, int): # <<<<<<<<<<<<<<
12724 * raise TypeError('offset must be an int')
12725 *
12726 */
12727 }
12728
12729 /* "cephfs.pyx":995
12730 *
12731 * cdef:
12732 * int _fd = fd # <<<<<<<<<<<<<<
12733 * char *_data = buf
12734 * int64_t _offset = offset
12735 */
12736 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_5 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__12736; goto __pyx_L1_error;}
12737 __pyx_v__fd = __pyx_t_5;
12738
12739 /* "cephfs.pyx":996
12740 * cdef:
12741 * int _fd = fd
12742 * char *_data = buf # <<<<<<<<<<<<<<
12743 * int64_t _offset = offset
12744 *
12745 */
12746 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_buf); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__12746; goto __pyx_L1_error;}
12747 __pyx_v__data = __pyx_t_6;
12748
12749 /* "cephfs.pyx":997
12750 * int _fd = fd
12751 * char *_data = buf
12752 * int64_t _offset = offset # <<<<<<<<<<<<<<
12753 *
12754 * size_t length = len(buf)
12755 */
12756 __pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_7 == (int64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_7 == (int64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__12756; goto __pyx_L1_error;}
12757 __pyx_v__offset = __pyx_t_7;
12758
12759 /* "cephfs.pyx":999
12760 * int64_t _offset = offset
12761 *
12762 * size_t length = len(buf) # <<<<<<<<<<<<<<
12763 *
12764 * with nogil:
12765 */
12766 __pyx_t_8 = PyObject_LengthPyObject_Size(__pyx_v_buf); if (unlikely(__pyx_t_8 == -1)__builtin_expect(!!(__pyx_t_8 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__12766; goto __pyx_L1_error;}
12767 __pyx_v_length = __pyx_t_8;
12768
12769 /* "cephfs.pyx":1001
12770 * size_t length = len(buf)
12771 *
12772 * with nogil: # <<<<<<<<<<<<<<
12773 * ret = ceph_write(self.cluster, _fd, _data, length, _offset)
12774 * if ret < 0:
12775 */
12776 {
12777 #ifdef WITH_THREAD1
12778 PyThreadState *_save;
12779 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
12780 #endif
12781 /*try:*/ {
12782
12783 /* "cephfs.pyx":1002
12784 *
12785 * with nogil:
12786 * ret = ceph_write(self.cluster, _fd, _data, length, _offset) # <<<<<<<<<<<<<<
12787 * if ret < 0:
12788 * raise make_ex(ret, "error in write")
12789 */
12790 __pyx_v_ret = ceph_write(__pyx_v_self->cluster, __pyx_v__fd, __pyx_v__data, __pyx_v_length, __pyx_v__offset);
12791 }
12792
12793 /* "cephfs.pyx":1001
12794 * size_t length = len(buf)
12795 *
12796 * with nogil: # <<<<<<<<<<<<<<
12797 * ret = ceph_write(self.cluster, _fd, _data, length, _offset)
12798 * if ret < 0:
12799 */
12800 /*finally:*/ {
12801 /*normal exit:*/{
12802 #ifdef WITH_THREAD1
12803 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
12804 #endif
12805 goto __pyx_L8;
12806 }
12807 __pyx_L8:;
12808 }
12809 }
12810
12811 /* "cephfs.pyx":1003
12812 * with nogil:
12813 * ret = ceph_write(self.cluster, _fd, _data, length, _offset)
12814 * if ret < 0: # <<<<<<<<<<<<<<
12815 * raise make_ex(ret, "error in write")
12816 * return ret
12817 */
12818 __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
12819 if (__pyx_t_4) {
12820
12821 /* "cephfs.pyx":1004
12822 * ret = ceph_write(self.cluster, _fd, _data, length, _offset)
12823 * if ret < 0:
12824 * raise make_ex(ret, "error in write") # <<<<<<<<<<<<<<
12825 * return ret
12826 *
12827 */
12828 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__12828; goto __pyx_L1_error;}
12829 __Pyx_GOTREF(__pyx_t_2);
12830 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_write); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__12830; goto __pyx_L1_error;}
12831 __Pyx_GOTREF(__pyx_t_1);
12832 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12833 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
12834 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
12835 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__12835; goto __pyx_L1_error;}
12836
12837 /* "cephfs.pyx":1003
12838 * with nogil:
12839 * ret = ceph_write(self.cluster, _fd, _data, length, _offset)
12840 * if ret < 0: # <<<<<<<<<<<<<<
12841 * raise make_ex(ret, "error in write")
12842 * return ret
12843 */
12844 }
12845
12846 /* "cephfs.pyx":1005
12847 * if ret < 0:
12848 * raise make_ex(ret, "error in write")
12849 * return ret # <<<<<<<<<<<<<<
12850 *
12851 * def flock(self, fd, operation, owner):
12852 */
12853 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
12854 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__12854; goto __pyx_L1_error;}
12855 __Pyx_GOTREF(__pyx_t_1);
12856 __pyx_r = __pyx_t_1;
12857 __pyx_t_1 = 0;
12858 goto __pyx_L0;
12859
12860 /* "cephfs.pyx":977
12861 * ref.Py_XDECREF(ret_s)
12862 *
12863 * def write(self, fd, buf, offset): # <<<<<<<<<<<<<<
12864 * """
12865 * Write data to a file.
12866 */
12867
12868 /* function exit code */
12869 __pyx_L1_error:;
12870 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
12871 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
12872 __Pyx_AddTraceback("cephfs.LibCephFS.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
12873 __pyx_r = NULL((void*)0);
12874 __pyx_L0:;
12875 __Pyx_XGIVEREF(__pyx_r);
12876 __Pyx_RefNannyFinishContext();
12877 return __pyx_r;
12878}
12879
12880/* "cephfs.pyx":1007
12881 * return ret
12882 *
12883 * def flock(self, fd, operation, owner): # <<<<<<<<<<<<<<
12884 * """
12885 * Apply or remove an advisory lock.
12886 */
12887
12888/* Python wrapper */
12889static PyObject *__pyx_pw_6cephfs_9LibCephFS_69flock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12890static char __pyx_doc_6cephfs_9LibCephFS_68flock[] = "\n Apply or remove an advisory lock.\n \n :param fd: the open file descriptor to change advisory lock.\n :param operation: the advisory lock operation to be performed on the file\n :param owner: the user-supplied owner identifier (an arbitrary integer)\n ";
12891static PyObject *__pyx_pw_6cephfs_9LibCephFS_69flock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12892 PyObject *__pyx_v_fd = 0;
12893 PyObject *__pyx_v_operation = 0;
12894 PyObject *__pyx_v_owner = 0;
12895 int __pyx_lineno = 0;
12896 const char *__pyx_filename = NULL((void*)0);
12897 int __pyx_clineno = 0;
12898 PyObject *__pyx_r = 0;
12899 __Pyx_RefNannyDeclarations
12900 __Pyx_RefNannySetupContext("flock (wrapper)", 0);
12901 {
12902 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_operation,&__pyx_n_s_owner,0};
12903 PyObject* values[3] = {0,0,0};
12904 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
12905 Py_ssize_t kw_args;
12906 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
12907 switch (pos_args) {
12908 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12909 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12910 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12911 case 0: break;
12912 default: goto __pyx_L5_argtuple_error;
12913 }
12914 kw_args = PyDict_Size(__pyx_kwds);
12915 switch (pos_args) {
12916 case 0:
12917 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd
)) != 0), 1)
) kw_args--;
12918 else goto __pyx_L5_argtuple_error;
12919 case 1:
12920 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_operation)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_operation
)) != 0), 1)
) kw_args--;
12921 else {
12922 __Pyx_RaiseArgtupleInvalid("flock", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__12922; goto __pyx_L3_error;}
12923 }
12924 case 2:
12925 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_owner)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_owner
)) != 0), 1)
) kw_args--;
12926 else {
12927 __Pyx_RaiseArgtupleInvalid("flock", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__12927; goto __pyx_L3_error;}
12928 }
12929 }
12930 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
12931 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "flock") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "flock") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__12931; goto __pyx_L3_error;}
12932 }
12933 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
12934 goto __pyx_L5_argtuple_error;
12935 } else {
12936 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12937 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12938 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12939 }
12940 __pyx_v_fd = values[0];
12941 __pyx_v_operation = values[1];
12942 __pyx_v_owner = values[2];
12943 }
12944 goto __pyx_L4_argument_unpacking_done;
12945 __pyx_L5_argtuple_error:;
12946 __Pyx_RaiseArgtupleInvalid("flock", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__12946; goto __pyx_L3_error;}
12947 __pyx_L3_error:;
12948 __Pyx_AddTraceback("cephfs.LibCephFS.flock", __pyx_clineno, __pyx_lineno, __pyx_filename);
12949 __Pyx_RefNannyFinishContext();
12950 return NULL((void*)0);
12951 __pyx_L4_argument_unpacking_done:;
12952 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_68flock(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_fd, __pyx_v_operation, __pyx_v_owner);
12953
12954 /* function exit code */
12955 __Pyx_RefNannyFinishContext();
12956 return __pyx_r;
12957}
12958
12959static PyObject *__pyx_pf_6cephfs_9LibCephFS_68flock(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_operation, PyObject *__pyx_v_owner) {
12960 int __pyx_v__fd;
12961 int __pyx_v__op;
12962 uint64_t __pyx_v__owner;
12963 int __pyx_v_ret;
12964 PyObject *__pyx_r = NULL((void*)0);
12965 __Pyx_RefNannyDeclarations
12966 PyObject *__pyx_t_1 = NULL((void*)0);
12967 PyObject *__pyx_t_2 = NULL((void*)0);
12968 int __pyx_t_3;
12969 int __pyx_t_4;
12970 int __pyx_t_5;
12971 uint64_t __pyx_t_6;
12972 int __pyx_lineno = 0;
12973 const char *__pyx_filename = NULL((void*)0);
12974 int __pyx_clineno = 0;
12975 __Pyx_RefNannySetupContext("flock", 0);
12976
12977 /* "cephfs.pyx":1015
12978 * :param owner: the user-supplied owner identifier (an arbitrary integer)
12979 * """
12980 * self.require_state("mounted") # <<<<<<<<<<<<<<
12981 * if not isinstance(fd, int):
12982 * raise TypeError('fd must be an int')
12983 */
12984 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__12984; goto __pyx_L1_error;}
12985 __Pyx_GOTREF(__pyx_t_1);
12986 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__51, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__12986; goto __pyx_L1_error;}
12987 __Pyx_GOTREF(__pyx_t_2);
12988 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
12989 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12990
12991 /* "cephfs.pyx":1016
12992 * """
12993 * self.require_state("mounted")
12994 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
12995 * raise TypeError('fd must be an int')
12996 * if not isinstance(operation, int):
12997 */
12998 __pyx_t_3 = PyInt_Check(__pyx_v_fd)((((__pyx_v_fd)->ob_type)->tp_flags & ((1L<<23
))) != 0)
;
12999 __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
13000 if (__pyx_t_4) {
13001
13002 /* "cephfs.pyx":1017
13003 * self.require_state("mounted")
13004 * if not isinstance(fd, int):
13005 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
13006 * if not isinstance(operation, int):
13007 * raise TypeError('operation must be an int')
13008 */
13009 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__52, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__13009; goto __pyx_L1_error;}
13010 __Pyx_GOTREF(__pyx_t_2);
13011 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
13012 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13013 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__13013; goto __pyx_L1_error;}
13014
13015 /* "cephfs.pyx":1016
13016 * """
13017 * self.require_state("mounted")
13018 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
13019 * raise TypeError('fd must be an int')
13020 * if not isinstance(operation, int):
13021 */
13022 }
13023
13024 /* "cephfs.pyx":1018
13025 * if not isinstance(fd, int):
13026 * raise TypeError('fd must be an int')
13027 * if not isinstance(operation, int): # <<<<<<<<<<<<<<
13028 * raise TypeError('operation must be an int')
13029 *
13030 */
13031 __pyx_t_4 = PyInt_Check(__pyx_v_operation)((((__pyx_v_operation)->ob_type)->tp_flags & ((1L<<
23))) != 0)
;
13032 __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0);
13033 if (__pyx_t_3) {
13034
13035 /* "cephfs.pyx":1019
13036 * raise TypeError('fd must be an int')
13037 * if not isinstance(operation, int):
13038 * raise TypeError('operation must be an int') # <<<<<<<<<<<<<<
13039 *
13040 * cdef:
13041 */
13042 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__53, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__13042; goto __pyx_L1_error;}
13043 __Pyx_GOTREF(__pyx_t_2);
13044 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
13045 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13046 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__13046; goto __pyx_L1_error;}
13047
13048 /* "cephfs.pyx":1018
13049 * if not isinstance(fd, int):
13050 * raise TypeError('fd must be an int')
13051 * if not isinstance(operation, int): # <<<<<<<<<<<<<<
13052 * raise TypeError('operation must be an int')
13053 *
13054 */
13055 }
13056
13057 /* "cephfs.pyx":1022
13058 *
13059 * cdef:
13060 * int _fd = fd # <<<<<<<<<<<<<<
13061 * int _op = operation
13062 * uint64_t _owner = owner
13063 */
13064 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_5 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__13064; goto __pyx_L1_error;}
13065 __pyx_v__fd = __pyx_t_5;
13066
13067 /* "cephfs.pyx":1023
13068 * cdef:
13069 * int _fd = fd
13070 * int _op = operation # <<<<<<<<<<<<<<
13071 * uint64_t _owner = owner
13072 *
13073 */
13074 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_operation); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_5 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__13074; goto __pyx_L1_error;}
13075 __pyx_v__op = __pyx_t_5;
13076
13077 /* "cephfs.pyx":1024
13078 * int _fd = fd
13079 * int _op = operation
13080 * uint64_t _owner = owner # <<<<<<<<<<<<<<
13081 *
13082 * with nogil:
13083 */
13084 __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_v_owner); if (unlikely((__pyx_t_6 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_6 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__13084; goto __pyx_L1_error;}
13085 __pyx_v__owner = __pyx_t_6;
13086
13087 /* "cephfs.pyx":1026
13088 * uint64_t _owner = owner
13089 *
13090 * with nogil: # <<<<<<<<<<<<<<
13091 * ret = ceph_flock(self.cluster, _fd, _op, _owner)
13092 * if ret < 0:
13093 */
13094 {
13095 #ifdef WITH_THREAD1
13096 PyThreadState *_save;
13097 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
13098 #endif
13099 /*try:*/ {
13100
13101 /* "cephfs.pyx":1027
13102 *
13103 * with nogil:
13104 * ret = ceph_flock(self.cluster, _fd, _op, _owner) # <<<<<<<<<<<<<<
13105 * if ret < 0:
13106 * raise make_ex(ret, "error in write")
13107 */
13108 __pyx_v_ret = ceph_flock(__pyx_v_self->cluster, __pyx_v__fd, __pyx_v__op, __pyx_v__owner);
13109 }
13110
13111 /* "cephfs.pyx":1026
13112 * uint64_t _owner = owner
13113 *
13114 * with nogil: # <<<<<<<<<<<<<<
13115 * ret = ceph_flock(self.cluster, _fd, _op, _owner)
13116 * if ret < 0:
13117 */
13118 /*finally:*/ {
13119 /*normal exit:*/{
13120 #ifdef WITH_THREAD1
13121 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
13122 #endif
13123 goto __pyx_L7;
13124 }
13125 __pyx_L7:;
13126 }
13127 }
13128
13129 /* "cephfs.pyx":1028
13130 * with nogil:
13131 * ret = ceph_flock(self.cluster, _fd, _op, _owner)
13132 * if ret < 0: # <<<<<<<<<<<<<<
13133 * raise make_ex(ret, "error in write")
13134 * return ret
13135 */
13136 __pyx_t_3 = ((__pyx_v_ret < 0) != 0);
13137 if (__pyx_t_3) {
13138
13139 /* "cephfs.pyx":1029
13140 * ret = ceph_flock(self.cluster, _fd, _op, _owner)
13141 * if ret < 0:
13142 * raise make_ex(ret, "error in write") # <<<<<<<<<<<<<<
13143 * return ret
13144 *
13145 */
13146 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__13146; goto __pyx_L1_error;}
13147 __Pyx_GOTREF(__pyx_t_2);
13148 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_write); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__13148; goto __pyx_L1_error;}
13149 __Pyx_GOTREF(__pyx_t_1);
13150 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13151 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
13152 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13153 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__13153; goto __pyx_L1_error;}
13154
13155 /* "cephfs.pyx":1028
13156 * with nogil:
13157 * ret = ceph_flock(self.cluster, _fd, _op, _owner)
13158 * if ret < 0: # <<<<<<<<<<<<<<
13159 * raise make_ex(ret, "error in write")
13160 * return ret
13161 */
13162 }
13163
13164 /* "cephfs.pyx":1030
13165 * if ret < 0:
13166 * raise make_ex(ret, "error in write")
13167 * return ret # <<<<<<<<<<<<<<
13168 *
13169 * def getxattr(self, path, name, size=255):
13170 */
13171 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
13172 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__13172; goto __pyx_L1_error;}
13173 __Pyx_GOTREF(__pyx_t_1);
13174 __pyx_r = __pyx_t_1;
13175 __pyx_t_1 = 0;
13176 goto __pyx_L0;
13177
13178 /* "cephfs.pyx":1007
13179 * return ret
13180 *
13181 * def flock(self, fd, operation, owner): # <<<<<<<<<<<<<<
13182 * """
13183 * Apply or remove an advisory lock.
13184 */
13185
13186 /* function exit code */
13187 __pyx_L1_error:;
13188 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
13189 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
13190 __Pyx_AddTraceback("cephfs.LibCephFS.flock", __pyx_clineno, __pyx_lineno, __pyx_filename);
13191 __pyx_r = NULL((void*)0);
13192 __pyx_L0:;
13193 __Pyx_XGIVEREF(__pyx_r);
13194 __Pyx_RefNannyFinishContext();
13195 return __pyx_r;
13196}
13197
13198/* "cephfs.pyx":1032
13199 * return ret
13200 *
13201 * def getxattr(self, path, name, size=255): # <<<<<<<<<<<<<<
13202 * """
13203 * Get an extended attribute.
13204 */
13205
13206/* Python wrapper */
13207static PyObject *__pyx_pw_6cephfs_9LibCephFS_71getxattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13208static char __pyx_doc_6cephfs_9LibCephFS_70getxattr[] = "\n Get an extended attribute.\n \n :param path: the path to the file\n :param name: the name of the extended attribute to get\n :param size: the size of the pre-allocated buffer\n ";
13209static PyObject *__pyx_pw_6cephfs_9LibCephFS_71getxattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13210 PyObject *__pyx_v_path = 0;
13211 PyObject *__pyx_v_name = 0;
13212 PyObject *__pyx_v_size = 0;
13213 int __pyx_lineno = 0;
13214 const char *__pyx_filename = NULL((void*)0);
13215 int __pyx_clineno = 0;
13216 PyObject *__pyx_r = 0;
13217 __Pyx_RefNannyDeclarations
13218 __Pyx_RefNannySetupContext("getxattr (wrapper)", 0);
13219 {
13220 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_name,&__pyx_n_s_size,0};
13221 PyObject* values[3] = {0,0,0};
13222 values[2] = ((PyObject *)__pyx_int_255);
13223 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
13224 Py_ssize_t kw_args;
13225 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
13226 switch (pos_args) {
13227 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
13228 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
13229 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
13230 case 0: break;
13231 default: goto __pyx_L5_argtuple_error;
13232 }
13233 kw_args = PyDict_Size(__pyx_kwds);
13234 switch (pos_args) {
13235 case 0:
13236 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path
)) != 0), 1)
) kw_args--;
13237 else goto __pyx_L5_argtuple_error;
13238 case 1:
13239 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
13240 else {
13241 __Pyx_RaiseArgtupleInvalid("getxattr", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__13241; goto __pyx_L3_error;}
13242 }
13243 case 2:
13244 if (kw_args > 0) {
13245 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
13246 if (value) { values[2] = value; kw_args--; }
13247 }
13248 }
13249 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
13250 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getxattr") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "getxattr") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__13250; goto __pyx_L3_error;}
13251 }
13252 } else {
13253 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
13254 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
13255 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
13256 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
13257 break;
13258 default: goto __pyx_L5_argtuple_error;
13259 }
13260 }
13261 __pyx_v_path = values[0];
13262 __pyx_v_name = values[1];
13263 __pyx_v_size = values[2];
13264 }
13265 goto __pyx_L4_argument_unpacking_done;
13266 __pyx_L5_argtuple_error:;
13267 __Pyx_RaiseArgtupleInvalid("getxattr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__13267; goto __pyx_L3_error;}
13268 __pyx_L3_error:;
13269 __Pyx_AddTraceback("cephfs.LibCephFS.getxattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
13270 __Pyx_RefNannyFinishContext();
13271 return NULL((void*)0);
13272 __pyx_L4_argument_unpacking_done:;
13273 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_70getxattr(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_path, __pyx_v_name, __pyx_v_size);
13274
13275 /* function exit code */
13276 __Pyx_RefNannyFinishContext();
13277 return __pyx_r;
13278}
13279
13280static PyObject *__pyx_pf_6cephfs_9LibCephFS_70getxattr(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_name, PyObject *__pyx_v_size) {
13281 char *__pyx_v__path;
13282 char *__pyx_v__name;
13283 size_t __pyx_v_ret_length;
13284 char *__pyx_v_ret_buf;
13285 int __pyx_v_ret;
13286 PyObject *__pyx_r = NULL((void*)0);
13287 __Pyx_RefNannyDeclarations
13288 PyObject *__pyx_t_1 = NULL((void*)0);
13289 PyObject *__pyx_t_2 = NULL((void*)0);
13290 PyObject *__pyx_t_3 = NULL((void*)0);
13291 Py_ssize_t __pyx_t_4;
13292 PyObject *__pyx_t_5 = NULL((void*)0);
13293 char *__pyx_t_6;
13294 size_t __pyx_t_7;
13295 void *__pyx_t_8;
13296 int __pyx_t_9;
13297 int __pyx_t_10;
13298 int __pyx_t_11;
13299 char const *__pyx_t_12;
13300 PyObject *__pyx_t_13 = NULL((void*)0);
13301 PyObject *__pyx_t_14 = NULL((void*)0);
13302 PyObject *__pyx_t_15 = NULL((void*)0);
13303 PyObject *__pyx_t_16 = NULL((void*)0);
13304 PyObject *__pyx_t_17 = NULL((void*)0);
13305 PyObject *__pyx_t_18 = NULL((void*)0);
13306 int __pyx_lineno = 0;
13307 const char *__pyx_filename = NULL((void*)0);
13308 int __pyx_clineno = 0;
13309 __Pyx_RefNannySetupContext("getxattr", 0);
13310 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
13311 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
13312
13313 /* "cephfs.pyx":1040
13314 * :param size: the size of the pre-allocated buffer
13315 * """
13316 * self.require_state("mounted") # <<<<<<<<<<<<<<
13317 *
13318 * path = cstr(path, 'path')
13319 */
13320 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__13320; goto __pyx_L1_error;}
13321 __Pyx_GOTREF(__pyx_t_1);
13322 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__54, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__13322; goto __pyx_L1_error;}
13323 __Pyx_GOTREF(__pyx_t_2);
13324 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13325 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13326
13327 /* "cephfs.pyx":1042
13328 * self.require_state("mounted")
13329 *
13330 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
13331 * name = cstr(name, 'name')
13332 *
13333 */
13334 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__13334; goto __pyx_L1_error;}
13335 __Pyx_GOTREF(__pyx_t_1);
13336 __pyx_t_3 = NULL((void*)0);
13337 __pyx_t_4 = 0;
13338 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
13339 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
13340 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
13341 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
13342 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
13343 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
13344 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
13345 __pyx_t_4 = 1;
13346 }
13347 }
13348 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__13348; goto __pyx_L1_error;}
13349 __Pyx_GOTREF(__pyx_t_5);
13350 if (__pyx_t_3) {
13351 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
13352 }
13353 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
13354 __Pyx_GIVEREF(__pyx_v_path);
13355 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
13356 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
13357 __Pyx_GIVEREF(__pyx_n_s_path);
13358 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
13359 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__13359; goto __pyx_L1_error;}
13360 __Pyx_GOTREF(__pyx_t_2);
13361 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
13362 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13363 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
13364 __pyx_t_2 = 0;
13365
13366 /* "cephfs.pyx":1043
13367 *
13368 * path = cstr(path, 'path')
13369 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
13370 *
13371 * cdef:
13372 */
13373 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__13373; goto __pyx_L1_error;}
13374 __Pyx_GOTREF(__pyx_t_1);
13375 __pyx_t_5 = NULL((void*)0);
13376 __pyx_t_4 = 0;
13377 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
13378 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
13379 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
13380 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
13381 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
13382 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
13383 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
13384 __pyx_t_4 = 1;
13385 }
13386 }
13387 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__13387; goto __pyx_L1_error;}
13388 __Pyx_GOTREF(__pyx_t_3);
13389 if (__pyx_t_5) {
13390 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
13391 }
13392 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
13393 __Pyx_GIVEREF(__pyx_v_name);
13394 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
13395 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
13396 __Pyx_GIVEREF(__pyx_n_s_name);
13397 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
13398 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__13398; goto __pyx_L1_error;}
13399 __Pyx_GOTREF(__pyx_t_2);
13400 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
13401 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13402 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
13403 __pyx_t_2 = 0;
13404
13405 /* "cephfs.pyx":1046
13406 *
13407 * cdef:
13408 * char* _path = path # <<<<<<<<<<<<<<
13409 * char* _name = name
13410 *
13411 */
13412 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__13412; goto __pyx_L1_error;}
13413 __pyx_v__path = __pyx_t_6;
13414
13415 /* "cephfs.pyx":1047
13416 * cdef:
13417 * char* _path = path
13418 * char* _name = name # <<<<<<<<<<<<<<
13419 *
13420 * size_t ret_length = size
13421 */
13422 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__13422; goto __pyx_L1_error;}
13423 __pyx_v__name = __pyx_t_6;
13424
13425 /* "cephfs.pyx":1049
13426 * char* _name = name
13427 *
13428 * size_t ret_length = size # <<<<<<<<<<<<<<
13429 * char *ret_buf = NULL
13430 *
13431 */
13432 __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_7 == (size_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__13432; goto __pyx_L1_error;}
13433 __pyx_v_ret_length = __pyx_t_7;
13434
13435 /* "cephfs.pyx":1050
13436 *
13437 * size_t ret_length = size
13438 * char *ret_buf = NULL # <<<<<<<<<<<<<<
13439 *
13440 * try:
13441 */
13442 __pyx_v_ret_buf = NULL((void*)0);
13443
13444 /* "cephfs.pyx":1052
13445 * char *ret_buf = NULL
13446 *
13447 * try: # <<<<<<<<<<<<<<
13448 * ret_buf = <char *>realloc_chk(ret_buf, ret_length)
13449 * with nogil:
13450 */
13451 /*try:*/ {
13452
13453 /* "cephfs.pyx":1053
13454 *
13455 * try:
13456 * ret_buf = <char *>realloc_chk(ret_buf, ret_length) # <<<<<<<<<<<<<<
13457 * with nogil:
13458 * ret = ceph_getxattr(self.cluster, _path, _name, ret_buf,
13459 */
13460 __pyx_t_8 = __pyx_f_6cephfs_realloc_chk(__pyx_v_ret_buf, __pyx_v_ret_length); if (unlikely(__pyx_t_8 == NULL)__builtin_expect(!!(__pyx_t_8 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__13460; goto __pyx_L4_error;}
13461 __pyx_v_ret_buf = ((char *)__pyx_t_8);
13462
13463 /* "cephfs.pyx":1054
13464 * try:
13465 * ret_buf = <char *>realloc_chk(ret_buf, ret_length)
13466 * with nogil: # <<<<<<<<<<<<<<
13467 * ret = ceph_getxattr(self.cluster, _path, _name, ret_buf,
13468 * ret_length)
13469 */
13470 {
13471 #ifdef WITH_THREAD1
13472 PyThreadState *_save;
13473 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
13474 #endif
13475 /*try:*/ {
13476
13477 /* "cephfs.pyx":1055
13478 * ret_buf = <char *>realloc_chk(ret_buf, ret_length)
13479 * with nogil:
13480 * ret = ceph_getxattr(self.cluster, _path, _name, ret_buf, # <<<<<<<<<<<<<<
13481 * ret_length)
13482 *
13483 */
13484 __pyx_v_ret = ceph_getxattr(__pyx_v_self->cluster, __pyx_v__path, __pyx_v__name, __pyx_v_ret_buf, __pyx_v_ret_length);
13485 }
13486
13487 /* "cephfs.pyx":1054
13488 * try:
13489 * ret_buf = <char *>realloc_chk(ret_buf, ret_length)
13490 * with nogil: # <<<<<<<<<<<<<<
13491 * ret = ceph_getxattr(self.cluster, _path, _name, ret_buf,
13492 * ret_length)
13493 */
13494 /*finally:*/ {
13495 /*normal exit:*/{
13496 #ifdef WITH_THREAD1
13497 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
13498 #endif
13499 goto __pyx_L8;
13500 }
13501 __pyx_L8:;
13502 }
13503 }
13504
13505 /* "cephfs.pyx":1058
13506 * ret_length)
13507 *
13508 * if ret < 0: # <<<<<<<<<<<<<<
13509 * raise make_ex(ret, "error in getxattr")
13510 *
13511 */
13512 __pyx_t_9 = ((__pyx_v_ret < 0) != 0);
13513 if (__pyx_t_9) {
13514
13515 /* "cephfs.pyx":1059
13516 *
13517 * if ret < 0:
13518 * raise make_ex(ret, "error in getxattr") # <<<<<<<<<<<<<<
13519 *
13520 * return ret_buf[:ret]
13521 */
13522 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__13522; goto __pyx_L4_error;}
13523 __Pyx_GOTREF(__pyx_t_2);
13524 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_getxattr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__13524; goto __pyx_L4_error;}
13525 __Pyx_GOTREF(__pyx_t_1);
13526 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13527 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
13528 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13529 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__13529; goto __pyx_L4_error;}
13530
13531 /* "cephfs.pyx":1058
13532 * ret_length)
13533 *
13534 * if ret < 0: # <<<<<<<<<<<<<<
13535 * raise make_ex(ret, "error in getxattr")
13536 *
13537 */
13538 }
13539
13540 /* "cephfs.pyx":1061
13541 * raise make_ex(ret, "error in getxattr")
13542 *
13543 * return ret_buf[:ret] # <<<<<<<<<<<<<<
13544 * finally:
13545 * free(ret_buf)
13546 */
13547 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
13548 __pyx_t_1 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v_ret_buf + 0, __pyx_v_ret - 0); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__13548; goto __pyx_L4_error;}
13549 __Pyx_GOTREF(__pyx_t_1);
13550 __pyx_r = __pyx_t_1;
13551 __pyx_t_1 = 0;
13552 goto __pyx_L3_return;
13553 }
13554
13555 /* "cephfs.pyx":1063
13556 * return ret_buf[:ret]
13557 * finally:
13558 * free(ret_buf) # <<<<<<<<<<<<<<
13559 *
13560 * def setxattr(self, path, name, value, flags):
13561 */
13562 /*finally:*/ {
13563 /*exception exit:*/{
13564 __pyx_L4_error:;
13565 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
13566 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
13567 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
13568 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
13569 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
13570 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
13571 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_13, &
__pyx_t_14, &__pyx_t_15) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
13572 __Pyx_XGOTREF(__pyx_t_13);
13573 __Pyx_XGOTREF(__pyx_t_14);
13574 __Pyx_XGOTREF(__pyx_t_15);
13575 __Pyx_XGOTREF(__pyx_t_16);
13576 __Pyx_XGOTREF(__pyx_t_17);
13577 __Pyx_XGOTREF(__pyx_t_18);
13578 __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
13579 {
13580 free(__pyx_v_ret_buf);
13581 }
13582 if (PY_MAJOR_VERSION2 >= 3) {
13583 __Pyx_XGIVEREF(__pyx_t_16);
13584 __Pyx_XGIVEREF(__pyx_t_17);
13585 __Pyx_XGIVEREF(__pyx_t_18);
13586 __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
13587 }
13588 __Pyx_XGIVEREF(__pyx_t_13);
13589 __Pyx_XGIVEREF(__pyx_t_14);
13590 __Pyx_XGIVEREF(__pyx_t_15);
13591 __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
13592 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
13593 __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
13594 goto __pyx_L1_error;
13595 }
13596 __pyx_L3_return: {
13597 __pyx_t_18 = __pyx_r;
13598 __pyx_r = 0;
13599 free(__pyx_v_ret_buf);
13600 __pyx_r = __pyx_t_18;
13601 __pyx_t_18 = 0;
13602 goto __pyx_L0;
13603 }
13604 }
13605
13606 /* "cephfs.pyx":1032
13607 * return ret
13608 *
13609 * def getxattr(self, path, name, size=255): # <<<<<<<<<<<<<<
13610 * """
13611 * Get an extended attribute.
13612 */
13613
13614 /* function exit code */
13615 __pyx_L1_error:;
13616 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
13617 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
13618 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
13619 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
13620 __Pyx_AddTraceback("cephfs.LibCephFS.getxattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
13621 __pyx_r = NULL((void*)0);
13622 __pyx_L0:;
13623 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
13624 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
13625 __Pyx_XGIVEREF(__pyx_r);
13626 __Pyx_RefNannyFinishContext();
13627 return __pyx_r;
13628}
13629
13630/* "cephfs.pyx":1065
13631 * free(ret_buf)
13632 *
13633 * def setxattr(self, path, name, value, flags): # <<<<<<<<<<<<<<
13634 * """
13635 * Set an extended attribute on a file.
13636 */
13637
13638/* Python wrapper */
13639static PyObject *__pyx_pw_6cephfs_9LibCephFS_73setxattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13640static char __pyx_doc_6cephfs_9LibCephFS_72setxattr[] = "\n Set an extended attribute on a file.\n \n :param path: the path to the file.\n :param name: the name of the extended attribute to set.\n :param value: the bytes of the extended attribute value\n ";
13641static PyObject *__pyx_pw_6cephfs_9LibCephFS_73setxattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13642 PyObject *__pyx_v_path = 0;
13643 PyObject *__pyx_v_name = 0;
13644 PyObject *__pyx_v_value = 0;
13645 PyObject *__pyx_v_flags = 0;
13646 int __pyx_lineno = 0;
13647 const char *__pyx_filename = NULL((void*)0);
13648 int __pyx_clineno = 0;
13649 PyObject *__pyx_r = 0;
13650 __Pyx_RefNannyDeclarations
13651 __Pyx_RefNannySetupContext("setxattr (wrapper)", 0);
13652 {
13653 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_name,&__pyx_n_s_value,&__pyx_n_s_flags,0};
13654 PyObject* values[4] = {0,0,0,0};
13655 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
13656 Py_ssize_t kw_args;
13657 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
13658 switch (pos_args) {
13659 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
13660 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
13661 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
13662 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
13663 case 0: break;
13664 default: goto __pyx_L5_argtuple_error;
13665 }
13666 kw_args = PyDict_Size(__pyx_kwds);
13667 switch (pos_args) {
13668 case 0:
13669 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path
)) != 0), 1)
) kw_args--;
13670 else goto __pyx_L5_argtuple_error;
13671 case 1:
13672 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
13673 else {
13674 __Pyx_RaiseArgtupleInvalid("setxattr", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__13674; goto __pyx_L3_error;}
13675 }
13676 case 2:
13677 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value
)) != 0), 1)
) kw_args--;
13678 else {
13679 __Pyx_RaiseArgtupleInvalid("setxattr", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__13679; goto __pyx_L3_error;}
13680 }
13681 case 3:
13682 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags
)) != 0), 1)
) kw_args--;
13683 else {
13684 __Pyx_RaiseArgtupleInvalid("setxattr", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__13684; goto __pyx_L3_error;}
13685 }
13686 }
13687 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
13688 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setxattr") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "setxattr") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__13688; goto __pyx_L3_error;}
13689 }
13690 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 4) {
13691 goto __pyx_L5_argtuple_error;
13692 } else {
13693 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
13694 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
13695 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
13696 values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
13697 }
13698 __pyx_v_path = values[0];
13699 __pyx_v_name = values[1];
13700 __pyx_v_value = values[2];
13701 __pyx_v_flags = values[3];
13702 }
13703 goto __pyx_L4_argument_unpacking_done;
13704 __pyx_L5_argtuple_error:;
13705 __Pyx_RaiseArgtupleInvalid("setxattr", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__13705; goto __pyx_L3_error;}
13706 __pyx_L3_error:;
13707 __Pyx_AddTraceback("cephfs.LibCephFS.setxattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
13708 __Pyx_RefNannyFinishContext();
13709 return NULL((void*)0);
13710 __pyx_L4_argument_unpacking_done:;
13711 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_72setxattr(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_path, __pyx_v_name, __pyx_v_value, __pyx_v_flags);
13712
13713 /* function exit code */
13714 __Pyx_RefNannyFinishContext();
13715 return __pyx_r;
13716}
13717
13718static PyObject *__pyx_pf_6cephfs_9LibCephFS_72setxattr(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_name, PyObject *__pyx_v_value, PyObject *__pyx_v_flags) {
13719 char *__pyx_v__path;
13720 char *__pyx_v__name;
13721 char *__pyx_v__value;
13722 size_t __pyx_v__value_len;
13723 int __pyx_v__flags;
13724 int __pyx_v_ret;
13725 PyObject *__pyx_r = NULL((void*)0);
13726 __Pyx_RefNannyDeclarations
13727 PyObject *__pyx_t_1 = NULL((void*)0);
13728 PyObject *__pyx_t_2 = NULL((void*)0);
13729 PyObject *__pyx_t_3 = NULL((void*)0);
13730 Py_ssize_t __pyx_t_4;
13731 PyObject *__pyx_t_5 = NULL((void*)0);
13732 int __pyx_t_6;
13733 int __pyx_t_7;
13734 char *__pyx_t_8;
13735 int __pyx_t_9;
13736 int __pyx_lineno = 0;
13737 const char *__pyx_filename = NULL((void*)0);
13738 int __pyx_clineno = 0;
13739 __Pyx_RefNannySetupContext("setxattr", 0);
13740 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
13741 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
13742
13743 /* "cephfs.pyx":1073
13744 * :param value: the bytes of the extended attribute value
13745 * """
13746 * self.require_state("mounted") # <<<<<<<<<<<<<<
13747 *
13748 * name = cstr(name, 'name')
13749 */
13750 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__13750; goto __pyx_L1_error;}
13751 __Pyx_GOTREF(__pyx_t_1);
13752 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__55, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__13752; goto __pyx_L1_error;}
13753 __Pyx_GOTREF(__pyx_t_2);
13754 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13755 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13756
13757 /* "cephfs.pyx":1075
13758 * self.require_state("mounted")
13759 *
13760 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
13761 * path = cstr(path, 'path')
13762 * if not isinstance(flags, int):
13763 */
13764 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__13764; goto __pyx_L1_error;}
13765 __Pyx_GOTREF(__pyx_t_1);
13766 __pyx_t_3 = NULL((void*)0);
13767 __pyx_t_4 = 0;
13768 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
13769 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
13770 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
13771 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
13772 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
13773 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
13774 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
13775 __pyx_t_4 = 1;
13776 }
13777 }
13778 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__13778; goto __pyx_L1_error;}
13779 __Pyx_GOTREF(__pyx_t_5);
13780 if (__pyx_t_3) {
13781 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
13782 }
13783 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
13784 __Pyx_GIVEREF(__pyx_v_name);
13785 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
13786 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
13787 __Pyx_GIVEREF(__pyx_n_s_name);
13788 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
13789 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__13789; goto __pyx_L1_error;}
13790 __Pyx_GOTREF(__pyx_t_2);
13791 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
13792 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13793 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
13794 __pyx_t_2 = 0;
13795
13796 /* "cephfs.pyx":1076
13797 *
13798 * name = cstr(name, 'name')
13799 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
13800 * if not isinstance(flags, int):
13801 * raise TypeError('flags must be a int')
13802 */
13803 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__13803; goto __pyx_L1_error;}
13804 __Pyx_GOTREF(__pyx_t_1);
13805 __pyx_t_5 = NULL((void*)0);
13806 __pyx_t_4 = 0;
13807 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
13808 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
13809 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
13810 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
13811 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
13812 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
13813 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
13814 __pyx_t_4 = 1;
13815 }
13816 }
13817 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__13817; goto __pyx_L1_error;}
13818 __Pyx_GOTREF(__pyx_t_3);
13819 if (__pyx_t_5) {
13820 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
13821 }
13822 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
13823 __Pyx_GIVEREF(__pyx_v_path);
13824 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
13825 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
13826 __Pyx_GIVEREF(__pyx_n_s_path);
13827 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
13828 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__13828; goto __pyx_L1_error;}
13829 __Pyx_GOTREF(__pyx_t_2);
13830 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
13831 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13832 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
13833 __pyx_t_2 = 0;
13834
13835 /* "cephfs.pyx":1077
13836 * name = cstr(name, 'name')
13837 * path = cstr(path, 'path')
13838 * if not isinstance(flags, int): # <<<<<<<<<<<<<<
13839 * raise TypeError('flags must be a int')
13840 * if not isinstance(value, bytes):
13841 */
13842 __pyx_t_6 = PyInt_Check(__pyx_v_flags)((((__pyx_v_flags)->ob_type)->tp_flags & ((1L<<
23))) != 0)
;
13843 __pyx_t_7 = ((!(__pyx_t_6 != 0)) != 0);
13844 if (__pyx_t_7) {
13845
13846 /* "cephfs.pyx":1078
13847 * path = cstr(path, 'path')
13848 * if not isinstance(flags, int):
13849 * raise TypeError('flags must be a int') # <<<<<<<<<<<<<<
13850 * if not isinstance(value, bytes):
13851 * raise TypeError('value must be a bytes')
13852 */
13853 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__56, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__13853; goto __pyx_L1_error;}
13854 __Pyx_GOTREF(__pyx_t_2);
13855 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
13856 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13857 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__13857; goto __pyx_L1_error;}
13858
13859 /* "cephfs.pyx":1077
13860 * name = cstr(name, 'name')
13861 * path = cstr(path, 'path')
13862 * if not isinstance(flags, int): # <<<<<<<<<<<<<<
13863 * raise TypeError('flags must be a int')
13864 * if not isinstance(value, bytes):
13865 */
13866 }
13867
13868 /* "cephfs.pyx":1079
13869 * if not isinstance(flags, int):
13870 * raise TypeError('flags must be a int')
13871 * if not isinstance(value, bytes): # <<<<<<<<<<<<<<
13872 * raise TypeError('value must be a bytes')
13873 *
13874 */
13875 __pyx_t_7 = PyBytes_Check(__pyx_v_value)((((((PyObject*)(__pyx_v_value))->ob_type))->tp_flags &
((1L<<27))) != 0)
;
13876 __pyx_t_6 = ((!(__pyx_t_7 != 0)) != 0);
13877 if (__pyx_t_6) {
13878
13879 /* "cephfs.pyx":1080
13880 * raise TypeError('flags must be a int')
13881 * if not isinstance(value, bytes):
13882 * raise TypeError('value must be a bytes') # <<<<<<<<<<<<<<
13883 *
13884 * cdef:
13885 */
13886 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__57, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__13886; goto __pyx_L1_error;}
13887 __Pyx_GOTREF(__pyx_t_2);
13888 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
13889 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13890 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__13890; goto __pyx_L1_error;}
13891
13892 /* "cephfs.pyx":1079
13893 * if not isinstance(flags, int):
13894 * raise TypeError('flags must be a int')
13895 * if not isinstance(value, bytes): # <<<<<<<<<<<<<<
13896 * raise TypeError('value must be a bytes')
13897 *
13898 */
13899 }
13900
13901 /* "cephfs.pyx":1083
13902 *
13903 * cdef:
13904 * char *_path = path # <<<<<<<<<<<<<<
13905 * char *_name = name
13906 * char *_value = value
13907 */
13908 __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_8) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_8) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__13908; goto __pyx_L1_error;}
13909 __pyx_v__path = __pyx_t_8;
13910
13911 /* "cephfs.pyx":1084
13912 * cdef:
13913 * char *_path = path
13914 * char *_name = name # <<<<<<<<<<<<<<
13915 * char *_value = value
13916 * size_t _value_len = len(value)
13917 */
13918 __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_8) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_8) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__13918; goto __pyx_L1_error;}
13919 __pyx_v__name = __pyx_t_8;
13920
13921 /* "cephfs.pyx":1085
13922 * char *_path = path
13923 * char *_name = name
13924 * char *_value = value # <<<<<<<<<<<<<<
13925 * size_t _value_len = len(value)
13926 * int _flags = flags
13927 */
13928 __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_8) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_8) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__13928; goto __pyx_L1_error;}
13929 __pyx_v__value = __pyx_t_8;
13930
13931 /* "cephfs.pyx":1086
13932 * char *_name = name
13933 * char *_value = value
13934 * size_t _value_len = len(value) # <<<<<<<<<<<<<<
13935 * int _flags = flags
13936 *
13937 */
13938 __pyx_t_4 = PyObject_LengthPyObject_Size(__pyx_v_value); if (unlikely(__pyx_t_4 == -1)__builtin_expect(!!(__pyx_t_4 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__13938; goto __pyx_L1_error;}
13939 __pyx_v__value_len = __pyx_t_4;
13940
13941 /* "cephfs.pyx":1087
13942 * char *_value = value
13943 * size_t _value_len = len(value)
13944 * int _flags = flags # <<<<<<<<<<<<<<
13945 *
13946 * with nogil:
13947 */
13948 __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_9 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__13948; goto __pyx_L1_error;}
13949 __pyx_v__flags = __pyx_t_9;
13950
13951 /* "cephfs.pyx":1089
13952 * int _flags = flags
13953 *
13954 * with nogil: # <<<<<<<<<<<<<<
13955 * ret = ceph_setxattr(self.cluster, _path, _name,
13956 * _value, _value_len, _flags)
13957 */
13958 {
13959 #ifdef WITH_THREAD1
13960 PyThreadState *_save;
13961 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
13962 #endif
13963 /*try:*/ {
13964
13965 /* "cephfs.pyx":1090
13966 *
13967 * with nogil:
13968 * ret = ceph_setxattr(self.cluster, _path, _name, # <<<<<<<<<<<<<<
13969 * _value, _value_len, _flags)
13970 * if ret < 0:
13971 */
13972 __pyx_v_ret = ceph_setxattr(__pyx_v_self->cluster, __pyx_v__path, __pyx_v__name, __pyx_v__value, __pyx_v__value_len, __pyx_v__flags);
13973 }
13974
13975 /* "cephfs.pyx":1089
13976 * int _flags = flags
13977 *
13978 * with nogil: # <<<<<<<<<<<<<<
13979 * ret = ceph_setxattr(self.cluster, _path, _name,
13980 * _value, _value_len, _flags)
13981 */
13982 /*finally:*/ {
13983 /*normal exit:*/{
13984 #ifdef WITH_THREAD1
13985 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
13986 #endif
13987 goto __pyx_L7;
13988 }
13989 __pyx_L7:;
13990 }
13991 }
13992
13993 /* "cephfs.pyx":1092
13994 * ret = ceph_setxattr(self.cluster, _path, _name,
13995 * _value, _value_len, _flags)
13996 * if ret < 0: # <<<<<<<<<<<<<<
13997 * raise make_ex(ret, "error in setxattr")
13998 *
13999 */
14000 __pyx_t_6 = ((__pyx_v_ret < 0) != 0);
14001 if (__pyx_t_6) {
14002
14003 /* "cephfs.pyx":1093
14004 * _value, _value_len, _flags)
14005 * if ret < 0:
14006 * raise make_ex(ret, "error in setxattr") # <<<<<<<<<<<<<<
14007 *
14008 *
14009 */
14010 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__14010; goto __pyx_L1_error;}
14011 __Pyx_GOTREF(__pyx_t_2);
14012 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_setxattr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__14012; goto __pyx_L1_error;}
14013 __Pyx_GOTREF(__pyx_t_1);
14014 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14015 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
14016 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14017 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__14017; goto __pyx_L1_error;}
14018
14019 /* "cephfs.pyx":1092
14020 * ret = ceph_setxattr(self.cluster, _path, _name,
14021 * _value, _value_len, _flags)
14022 * if ret < 0: # <<<<<<<<<<<<<<
14023 * raise make_ex(ret, "error in setxattr")
14024 *
14025 */
14026 }
14027
14028 /* "cephfs.pyx":1065
14029 * free(ret_buf)
14030 *
14031 * def setxattr(self, path, name, value, flags): # <<<<<<<<<<<<<<
14032 * """
14033 * Set an extended attribute on a file.
14034 */
14035
14036 /* function exit code */
14037 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
14038 goto __pyx_L0;
14039 __pyx_L1_error:;
14040 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
14041 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
14042 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
14043 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
14044 __Pyx_AddTraceback("cephfs.LibCephFS.setxattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
14045 __pyx_r = NULL((void*)0);
14046 __pyx_L0:;
14047 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
14048 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
14049 __Pyx_XGIVEREF(__pyx_r);
14050 __Pyx_RefNannyFinishContext();
14051 return __pyx_r;
14052}
14053
14054/* "cephfs.pyx":1096
14055 *
14056 *
14057 * def stat(self, path): # <<<<<<<<<<<<<<
14058 * """
14059 * Get a file's extended statistics and attributes.
14060 */
14061
14062/* Python wrapper */
14063static PyObject *__pyx_pw_6cephfs_9LibCephFS_75stat(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
14064static char __pyx_doc_6cephfs_9LibCephFS_74stat[] = "\n Get a file's extended statistics and attributes.\n \n :param path: the file or directory to get the statistics of.\n ";
14065static PyObject *__pyx_pw_6cephfs_9LibCephFS_75stat(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
14066 PyObject *__pyx_r = 0;
14067 __Pyx_RefNannyDeclarations
14068 __Pyx_RefNannySetupContext("stat (wrapper)", 0);
14069 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_74stat(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_path));
14070
14071 /* function exit code */
14072 __Pyx_RefNannyFinishContext();
14073 return __pyx_r;
14074}
14075
14076static PyObject *__pyx_pf_6cephfs_9LibCephFS_74stat(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path) {
14077 char *__pyx_v__path;
14078 struct ceph_statx __pyx_v_stx;
14079 int __pyx_v_ret;
14080 PyObject *__pyx_r = NULL((void*)0);
14081 __Pyx_RefNannyDeclarations
14082 PyObject *__pyx_t_1 = NULL((void*)0);
14083 PyObject *__pyx_t_2 = NULL((void*)0);
14084 PyObject *__pyx_t_3 = NULL((void*)0);
14085 Py_ssize_t __pyx_t_4;
14086 PyObject *__pyx_t_5 = NULL((void*)0);
14087 char *__pyx_t_6;
14088 int __pyx_t_7;
14089 PyObject *__pyx_t_8 = NULL((void*)0);
14090 PyObject *__pyx_t_9 = NULL((void*)0);
14091 PyObject *__pyx_t_10 = NULL((void*)0);
14092 int __pyx_lineno = 0;
14093 const char *__pyx_filename = NULL((void*)0);
14094 int __pyx_clineno = 0;
14095 __Pyx_RefNannySetupContext("stat", 0);
14096 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
14097
14098 /* "cephfs.pyx":1102
14099 * :param path: the file or directory to get the statistics of.
14100 * """
14101 * self.require_state("mounted") # <<<<<<<<<<<<<<
14102 * path = cstr(path, 'path')
14103 *
14104 */
14105 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__14105; goto __pyx_L1_error;}
14106 __Pyx_GOTREF(__pyx_t_1);
14107 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__58, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__14107; goto __pyx_L1_error;}
14108 __Pyx_GOTREF(__pyx_t_2);
14109 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14110 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14111
14112 /* "cephfs.pyx":1103
14113 * """
14114 * self.require_state("mounted")
14115 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
14116 *
14117 * cdef:
14118 */
14119 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__14119; goto __pyx_L1_error;}
14120 __Pyx_GOTREF(__pyx_t_1);
14121 __pyx_t_3 = NULL((void*)0);
14122 __pyx_t_4 = 0;
14123 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
14124 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
14125 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
14126 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
14127 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
14128 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14129 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14130 __pyx_t_4 = 1;
14131 }
14132 }
14133 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__14133; goto __pyx_L1_error;}
14134 __Pyx_GOTREF(__pyx_t_5);
14135 if (__pyx_t_3) {
14136 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
14137 }
14138 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
14139 __Pyx_GIVEREF(__pyx_v_path);
14140 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
14141 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
14142 __Pyx_GIVEREF(__pyx_n_s_path);
14143 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
14144 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__14144; goto __pyx_L1_error;}
14145 __Pyx_GOTREF(__pyx_t_2);
14146 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
14147 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14148 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
14149 __pyx_t_2 = 0;
14150
14151 /* "cephfs.pyx":1106
14152 *
14153 * cdef:
14154 * char* _path = path # <<<<<<<<<<<<<<
14155 * statx stx
14156 *
14157 */
14158 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__14158; goto __pyx_L1_error;}
14159 __pyx_v__path = __pyx_t_6;
14160
14161 /* "cephfs.pyx":1109
14162 * statx stx
14163 *
14164 * with nogil: # <<<<<<<<<<<<<<
14165 * # FIXME: replace magic number with CEPH_STATX_BASIC_STATS
14166 * ret = ceph_statx(self.cluster, _path, &stx, 0x7ffu, 0)
14167 */
14168 {
14169 #ifdef WITH_THREAD1
14170 PyThreadState *_save;
14171 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
14172 #endif
14173 /*try:*/ {
14174
14175 /* "cephfs.pyx":1111
14176 * with nogil:
14177 * # FIXME: replace magic number with CEPH_STATX_BASIC_STATS
14178 * ret = ceph_statx(self.cluster, _path, &stx, 0x7ffu, 0) # <<<<<<<<<<<<<<
14179 * if ret < 0:
14180 * raise make_ex(ret, "error in stat: {}".format(path.decode('utf-8')))
14181 */
14182 __pyx_v_ret = ceph_statx(__pyx_v_self->cluster, __pyx_v__path, (&__pyx_v_stx), 0x7ffU, 0);
14183 }
14184
14185 /* "cephfs.pyx":1109
14186 * statx stx
14187 *
14188 * with nogil: # <<<<<<<<<<<<<<
14189 * # FIXME: replace magic number with CEPH_STATX_BASIC_STATS
14190 * ret = ceph_statx(self.cluster, _path, &stx, 0x7ffu, 0)
14191 */
14192 /*finally:*/ {
14193 /*normal exit:*/{
14194 #ifdef WITH_THREAD1
14195 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
14196 #endif
14197 goto __pyx_L5;
14198 }
14199 __pyx_L5:;
14200 }
14201 }
14202
14203 /* "cephfs.pyx":1112
14204 * # FIXME: replace magic number with CEPH_STATX_BASIC_STATS
14205 * ret = ceph_statx(self.cluster, _path, &stx, 0x7ffu, 0)
14206 * if ret < 0: # <<<<<<<<<<<<<<
14207 * raise make_ex(ret, "error in stat: {}".format(path.decode('utf-8')))
14208 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino,
14209 */
14210 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
14211 if (__pyx_t_7) {
14212
14213 /* "cephfs.pyx":1113
14214 * ret = ceph_statx(self.cluster, _path, &stx, 0x7ffu, 0)
14215 * if ret < 0:
14216 * raise make_ex(ret, "error in stat: {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
14217 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino,
14218 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink,
14219 */
14220 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__14220; goto __pyx_L1_error;}
14221 __Pyx_GOTREF(__pyx_t_2);
14222 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_error_in_stat, __pyx_n_s_format); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__14222; goto __pyx_L1_error;}
14223 __Pyx_GOTREF(__pyx_t_5);
14224 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__14224; goto __pyx_L1_error;}
14225 __Pyx_GOTREF(__pyx_t_3);
14226 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__59, NULL((void*)0)); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__14226; goto __pyx_L1_error;}
14227 __Pyx_GOTREF(__pyx_t_8);
14228 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
14229 __pyx_t_3 = NULL((void*)0);
14230 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
14231 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
14232 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
14233 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
14234 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
14235 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14236 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14237 }
14238 }
14239 if (!__pyx_t_3) {
14240 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__14240; goto __pyx_L1_error;}
14241 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
14242 __Pyx_GOTREF(__pyx_t_1);
14243 } else {
14244 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__14244; goto __pyx_L1_error;}
14245 __Pyx_GOTREF(__pyx_t_9);
14246 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
14247 __Pyx_GIVEREF(__pyx_t_8);
14248 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_8);
14249 __pyx_t_8 = 0;
14250 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__14250; goto __pyx_L1_error;}
14251 __Pyx_GOTREF(__pyx_t_1);
14252 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
14253 }
14254 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
14255 __pyx_t_5 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__14255; goto __pyx_L1_error;}
14256 __Pyx_GOTREF(__pyx_t_5);
14257 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14258 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14259 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
14260 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
14261 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__14261; goto __pyx_L1_error;}
14262
14263 /* "cephfs.pyx":1112
14264 * # FIXME: replace magic number with CEPH_STATX_BASIC_STATS
14265 * ret = ceph_statx(self.cluster, _path, &stx, 0x7ffu, 0)
14266 * if ret < 0: # <<<<<<<<<<<<<<
14267 * raise make_ex(ret, "error in stat: {}".format(path.decode('utf-8')))
14268 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino,
14269 */
14270 }
14271
14272 /* "cephfs.pyx":1114
14273 * if ret < 0:
14274 * raise make_ex(ret, "error in stat: {}".format(path.decode('utf-8')))
14275 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino, # <<<<<<<<<<<<<<
14276 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink,
14277 * st_uid=stx.stx_uid, st_gid=stx.stx_gid,
14278 */
14279 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
14280 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_StatResult); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14280; goto __pyx_L1_error;}
14281 __Pyx_GOTREF(__pyx_t_5);
14282 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14282; goto __pyx_L1_error;}
14283 __Pyx_GOTREF(__pyx_t_1);
14284 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_stx.stx_dev); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14284; goto __pyx_L1_error;}
14285 __Pyx_GOTREF(__pyx_t_2);
14286 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_dev, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14286; goto __pyx_L1_error;}
14287 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14288 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_stx.stx_ino); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14288; goto __pyx_L1_error;}
14289 __Pyx_GOTREF(__pyx_t_2);
14290 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_ino, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14290; goto __pyx_L1_error;}
14291 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14292
14293 /* "cephfs.pyx":1115
14294 * raise make_ex(ret, "error in stat: {}".format(path.decode('utf-8')))
14295 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino,
14296 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink, # <<<<<<<<<<<<<<
14297 * st_uid=stx.stx_uid, st_gid=stx.stx_gid,
14298 * st_rdev=stx.stx_rdev, st_size=stx.stx_size,
14299 */
14300 __pyx_t_2 = __Pyx_PyInt_From_uint16_t(__pyx_v_stx.stx_mode); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__14300; goto __pyx_L1_error;}
14301 __Pyx_GOTREF(__pyx_t_2);
14302 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_mode, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14302; goto __pyx_L1_error;}
14303 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14304 __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_stx.stx_nlink); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__14304; goto __pyx_L1_error;}
14305 __Pyx_GOTREF(__pyx_t_2);
14306 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_nlink, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14306; goto __pyx_L1_error;}
14307 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14308
14309 /* "cephfs.pyx":1116
14310 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino,
14311 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink,
14312 * st_uid=stx.stx_uid, st_gid=stx.stx_gid, # <<<<<<<<<<<<<<
14313 * st_rdev=stx.stx_rdev, st_size=stx.stx_size,
14314 * st_blksize=stx.stx_blksize,
14315 */
14316 __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_stx.stx_uid); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__14316; goto __pyx_L1_error;}
14317 __Pyx_GOTREF(__pyx_t_2);
14318 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_uid, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14318; goto __pyx_L1_error;}
14319 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14320 __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_stx.stx_gid); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__14320; goto __pyx_L1_error;}
14321 __Pyx_GOTREF(__pyx_t_2);
14322 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_gid, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14322; goto __pyx_L1_error;}
14323 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14324
14325 /* "cephfs.pyx":1117
14326 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink,
14327 * st_uid=stx.stx_uid, st_gid=stx.stx_gid,
14328 * st_rdev=stx.stx_rdev, st_size=stx.stx_size, # <<<<<<<<<<<<<<
14329 * st_blksize=stx.stx_blksize,
14330 * st_blocks=stx.stx_blocks,
14331 */
14332 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_stx.stx_rdev); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__14332; goto __pyx_L1_error;}
14333 __Pyx_GOTREF(__pyx_t_2);
14334 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_rdev, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14334; goto __pyx_L1_error;}
14335 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14336 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_stx.stx_size); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__14336; goto __pyx_L1_error;}
14337 __Pyx_GOTREF(__pyx_t_2);
14338 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_size, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14338; goto __pyx_L1_error;}
14339 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14340
14341 /* "cephfs.pyx":1118
14342 * st_uid=stx.stx_uid, st_gid=stx.stx_gid,
14343 * st_rdev=stx.stx_rdev, st_size=stx.stx_size,
14344 * st_blksize=stx.stx_blksize, # <<<<<<<<<<<<<<
14345 * st_blocks=stx.stx_blocks,
14346 * st_atime=datetime.fromtimestamp(stx.stx_atime.tv_sec),
14347 */
14348 __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_stx.stx_blksize); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__14348; goto __pyx_L1_error;}
14349 __Pyx_GOTREF(__pyx_t_2);
14350 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_blksize, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14350; goto __pyx_L1_error;}
14351 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14352
14353 /* "cephfs.pyx":1119
14354 * st_rdev=stx.stx_rdev, st_size=stx.stx_size,
14355 * st_blksize=stx.stx_blksize,
14356 * st_blocks=stx.stx_blocks, # <<<<<<<<<<<<<<
14357 * st_atime=datetime.fromtimestamp(stx.stx_atime.tv_sec),
14358 * st_mtime=datetime.fromtimestamp(stx.stx_mtime.tv_sec),
14359 */
14360 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_stx.stx_blocks); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; __pyx_clineno = __LINE__14360; goto __pyx_L1_error;}
14361 __Pyx_GOTREF(__pyx_t_2);
14362 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_blocks, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14362; goto __pyx_L1_error;}
14363 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14364
14365 /* "cephfs.pyx":1120
14366 * st_blksize=stx.stx_blksize,
14367 * st_blocks=stx.stx_blocks,
14368 * st_atime=datetime.fromtimestamp(stx.stx_atime.tv_sec), # <<<<<<<<<<<<<<
14369 * st_mtime=datetime.fromtimestamp(stx.stx_mtime.tv_sec),
14370 * st_ctime=datetime.fromtimestamp(stx.stx_ctime.tv_sec))
14371 */
14372 __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__14372; goto __pyx_L1_error;}
14373 __Pyx_GOTREF(__pyx_t_9);
14374 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__14374; goto __pyx_L1_error;}
14375 __Pyx_GOTREF(__pyx_t_8);
14376 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
14377 __pyx_t_9 = __Pyx_PyInt_From_time_t(__pyx_v_stx.stx_atime.tv_sec); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__14377; goto __pyx_L1_error;}
14378 __Pyx_GOTREF(__pyx_t_9);
14379 __pyx_t_3 = NULL((void*)0);
14380 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 0)
) {
14381 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
14382 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
14383 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
14384 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
14385 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14386 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14387 }
14388 }
14389 if (!__pyx_t_3) {
14390 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__14390; goto __pyx_L1_error;}
14391 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
14392 __Pyx_GOTREF(__pyx_t_2);
14393 } else {
14394 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__14394; goto __pyx_L1_error;}
14395 __Pyx_GOTREF(__pyx_t_10);
14396 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
14397 __Pyx_GIVEREF(__pyx_t_9);
14398 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_t_9
)
;
14399 __pyx_t_9 = 0;
14400 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__14400; goto __pyx_L1_error;}
14401 __Pyx_GOTREF(__pyx_t_2);
14402 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
14403 }
14404 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
14405 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_atime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14405; goto __pyx_L1_error;}
14406 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14407
14408 /* "cephfs.pyx":1121
14409 * st_blocks=stx.stx_blocks,
14410 * st_atime=datetime.fromtimestamp(stx.stx_atime.tv_sec),
14411 * st_mtime=datetime.fromtimestamp(stx.stx_mtime.tv_sec), # <<<<<<<<<<<<<<
14412 * st_ctime=datetime.fromtimestamp(stx.stx_ctime.tv_sec))
14413 *
14414 */
14415 __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__14415; goto __pyx_L1_error;}
14416 __Pyx_GOTREF(__pyx_t_8);
14417 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__14417; goto __pyx_L1_error;}
14418 __Pyx_GOTREF(__pyx_t_10);
14419 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
14420 __pyx_t_8 = __Pyx_PyInt_From_time_t(__pyx_v_stx.stx_mtime.tv_sec); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__14420; goto __pyx_L1_error;}
14421 __Pyx_GOTREF(__pyx_t_8);
14422 __pyx_t_9 = NULL((void*)0);
14423 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_10))__builtin_expect(!!(((__pyx_t_10)->ob_type == &PyMethod_Type
)), 0)
) {
14424 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10)(((PyMethodObject *)__pyx_t_10) -> im_self);
14425 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
14426 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10)(((PyMethodObject *)__pyx_t_10) -> im_func);
14427 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
14428 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14429 __Pyx_DECREF_SET(__pyx_t_10, function)do { PyObject *tmp = (PyObject *) __pyx_t_10; __pyx_t_10 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14430 }
14431 }
14432 if (!__pyx_t_9) {
14433 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__14433; goto __pyx_L1_error;}
14434 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
14435 __Pyx_GOTREF(__pyx_t_2);
14436 } else {
14437 __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__14437; goto __pyx_L1_error;}
14438 __Pyx_GOTREF(__pyx_t_3);
14439 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
14440 __Pyx_GIVEREF(__pyx_t_8);
14441 PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+1] = __pyx_t_8);
14442 __pyx_t_8 = 0;
14443 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__14443; goto __pyx_L1_error;}
14444 __Pyx_GOTREF(__pyx_t_2);
14445 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
14446 }
14447 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
14448 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_mtime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14448; goto __pyx_L1_error;}
14449 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14450
14451 /* "cephfs.pyx":1122
14452 * st_atime=datetime.fromtimestamp(stx.stx_atime.tv_sec),
14453 * st_mtime=datetime.fromtimestamp(stx.stx_mtime.tv_sec),
14454 * st_ctime=datetime.fromtimestamp(stx.stx_ctime.tv_sec)) # <<<<<<<<<<<<<<
14455 *
14456 * def fstat(self, fd):
14457 */
14458 __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__14458; goto __pyx_L1_error;}
14459 __Pyx_GOTREF(__pyx_t_10);
14460 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__14460; goto __pyx_L1_error;}
14461 __Pyx_GOTREF(__pyx_t_3);
14462 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
14463 __pyx_t_10 = __Pyx_PyInt_From_time_t(__pyx_v_stx.stx_ctime.tv_sec); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__14463; goto __pyx_L1_error;}
14464 __Pyx_GOTREF(__pyx_t_10);
14465 __pyx_t_8 = NULL((void*)0);
14466 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
14467 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
14468 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
14469 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
14470 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
14471 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14472 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14473 }
14474 }
14475 if (!__pyx_t_8) {
14476 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__14476; goto __pyx_L1_error;}
14477 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
14478 __Pyx_GOTREF(__pyx_t_2);
14479 } else {
14480 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__14480; goto __pyx_L1_error;}
14481 __Pyx_GOTREF(__pyx_t_9);
14482 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
14483 __Pyx_GIVEREF(__pyx_t_10);
14484 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_10)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_10
)
;
14485 __pyx_t_10 = 0;
14486 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__14486; goto __pyx_L1_error;}
14487 __Pyx_GOTREF(__pyx_t_2);
14488 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
14489 }
14490 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
14491 if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_st_ctime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14491; goto __pyx_L1_error;}
14492 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14493
14494 /* "cephfs.pyx":1114
14495 * if ret < 0:
14496 * raise make_ex(ret, "error in stat: {}".format(path.decode('utf-8')))
14497 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino, # <<<<<<<<<<<<<<
14498 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink,
14499 * st_uid=stx.stx_uid, st_gid=stx.stx_gid,
14500 */
14501 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__14501; goto __pyx_L1_error;}
14502 __Pyx_GOTREF(__pyx_t_2);
14503 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
14504 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14505 __pyx_r = __pyx_t_2;
14506 __pyx_t_2 = 0;
14507 goto __pyx_L0;
14508
14509 /* "cephfs.pyx":1096
14510 *
14511 *
14512 * def stat(self, path): # <<<<<<<<<<<<<<
14513 * """
14514 * Get a file's extended statistics and attributes.
14515 */
14516
14517 /* function exit code */
14518 __pyx_L1_error:;
14519 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
14520 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
14521 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
14522 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
14523 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
14524 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
14525 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
14526 __Pyx_AddTraceback("cephfs.LibCephFS.stat", __pyx_clineno, __pyx_lineno, __pyx_filename);
14527 __pyx_r = NULL((void*)0);
14528 __pyx_L0:;
14529 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
14530 __Pyx_XGIVEREF(__pyx_r);
14531 __Pyx_RefNannyFinishContext();
14532 return __pyx_r;
14533}
14534
14535/* "cephfs.pyx":1124
14536 * st_ctime=datetime.fromtimestamp(stx.stx_ctime.tv_sec))
14537 *
14538 * def fstat(self, fd): # <<<<<<<<<<<<<<
14539 * """
14540 * Get an open file's extended statistics and attributes.
14541 */
14542
14543/* Python wrapper */
14544static PyObject *__pyx_pw_6cephfs_9LibCephFS_77fstat(PyObject *__pyx_v_self, PyObject *__pyx_v_fd); /*proto*/
14545static char __pyx_doc_6cephfs_9LibCephFS_76fstat[] = "\n Get an open file's extended statistics and attributes.\n\n :param fd: the file descriptor of the file to get statistics of.\n ";
14546static PyObject *__pyx_pw_6cephfs_9LibCephFS_77fstat(PyObject *__pyx_v_self, PyObject *__pyx_v_fd) {
14547 PyObject *__pyx_r = 0;
14548 __Pyx_RefNannyDeclarations
14549 __Pyx_RefNannySetupContext("fstat (wrapper)", 0);
14550 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_76fstat(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_fd));
14551
14552 /* function exit code */
14553 __Pyx_RefNannyFinishContext();
14554 return __pyx_r;
14555}
14556
14557static PyObject *__pyx_pf_6cephfs_9LibCephFS_76fstat(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd) {
14558 int __pyx_v__fd;
14559 struct ceph_statx __pyx_v_stx;
14560 int __pyx_v_ret;
14561 PyObject *__pyx_r = NULL((void*)0);
14562 __Pyx_RefNannyDeclarations
14563 PyObject *__pyx_t_1 = NULL((void*)0);
14564 PyObject *__pyx_t_2 = NULL((void*)0);
14565 int __pyx_t_3;
14566 int __pyx_t_4;
14567 int __pyx_t_5;
14568 PyObject *__pyx_t_6 = NULL((void*)0);
14569 PyObject *__pyx_t_7 = NULL((void*)0);
14570 PyObject *__pyx_t_8 = NULL((void*)0);
14571 PyObject *__pyx_t_9 = NULL((void*)0);
14572 PyObject *__pyx_t_10 = NULL((void*)0);
14573 int __pyx_lineno = 0;
14574 const char *__pyx_filename = NULL((void*)0);
14575 int __pyx_clineno = 0;
14576 __Pyx_RefNannySetupContext("fstat", 0);
14577
14578 /* "cephfs.pyx":1130
14579 * :param fd: the file descriptor of the file to get statistics of.
14580 * """
14581 * self.require_state("mounted") # <<<<<<<<<<<<<<
14582 * if not isinstance(fd, int):
14583 * raise TypeError('fd must be an int')
14584 */
14585 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__14585; goto __pyx_L1_error;}
14586 __Pyx_GOTREF(__pyx_t_1);
14587 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__60, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__14587; goto __pyx_L1_error;}
14588 __Pyx_GOTREF(__pyx_t_2);
14589 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14590 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14591
14592 /* "cephfs.pyx":1131
14593 * """
14594 * self.require_state("mounted")
14595 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
14596 * raise TypeError('fd must be an int')
14597 *
14598 */
14599 __pyx_t_3 = PyInt_Check(__pyx_v_fd)((((__pyx_v_fd)->ob_type)->tp_flags & ((1L<<23
))) != 0)
;
14600 __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
14601 if (__pyx_t_4) {
14602
14603 /* "cephfs.pyx":1132
14604 * self.require_state("mounted")
14605 * if not isinstance(fd, int):
14606 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
14607 *
14608 * cdef:
14609 */
14610 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__61, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__14610; goto __pyx_L1_error;}
14611 __Pyx_GOTREF(__pyx_t_2);
14612 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
14613 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14614 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__14614; goto __pyx_L1_error;}
14615
14616 /* "cephfs.pyx":1131
14617 * """
14618 * self.require_state("mounted")
14619 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
14620 * raise TypeError('fd must be an int')
14621 *
14622 */
14623 }
14624
14625 /* "cephfs.pyx":1135
14626 *
14627 * cdef:
14628 * int _fd = fd # <<<<<<<<<<<<<<
14629 * statx stx
14630 *
14631 */
14632 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_5 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__14632; goto __pyx_L1_error;}
14633 __pyx_v__fd = __pyx_t_5;
14634
14635 /* "cephfs.pyx":1138
14636 * statx stx
14637 *
14638 * with nogil: # <<<<<<<<<<<<<<
14639 * # FIXME: replace magic number with CEPH_STATX_BASIC_STATS
14640 * ret = ceph_fstatx(self.cluster, _fd, &stx, 0x7ffu, 0)
14641 */
14642 {
14643 #ifdef WITH_THREAD1
14644 PyThreadState *_save;
14645 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
14646 #endif
14647 /*try:*/ {
14648
14649 /* "cephfs.pyx":1140
14650 * with nogil:
14651 * # FIXME: replace magic number with CEPH_STATX_BASIC_STATS
14652 * ret = ceph_fstatx(self.cluster, _fd, &stx, 0x7ffu, 0) # <<<<<<<<<<<<<<
14653 * if ret < 0:
14654 * raise make_ex(ret, "error in fsat")
14655 */
14656 __pyx_v_ret = ceph_fstatx(__pyx_v_self->cluster, __pyx_v__fd, (&__pyx_v_stx), 0x7ffU, 0);
14657 }
14658
14659 /* "cephfs.pyx":1138
14660 * statx stx
14661 *
14662 * with nogil: # <<<<<<<<<<<<<<
14663 * # FIXME: replace magic number with CEPH_STATX_BASIC_STATS
14664 * ret = ceph_fstatx(self.cluster, _fd, &stx, 0x7ffu, 0)
14665 */
14666 /*finally:*/ {
14667 /*normal exit:*/{
14668 #ifdef WITH_THREAD1
14669 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
14670 #endif
14671 goto __pyx_L6;
14672 }
14673 __pyx_L6:;
14674 }
14675 }
14676
14677 /* "cephfs.pyx":1141
14678 * # FIXME: replace magic number with CEPH_STATX_BASIC_STATS
14679 * ret = ceph_fstatx(self.cluster, _fd, &stx, 0x7ffu, 0)
14680 * if ret < 0: # <<<<<<<<<<<<<<
14681 * raise make_ex(ret, "error in fsat")
14682 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino,
14683 */
14684 __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
14685 if (__pyx_t_4) {
14686
14687 /* "cephfs.pyx":1142
14688 * ret = ceph_fstatx(self.cluster, _fd, &stx, 0x7ffu, 0)
14689 * if ret < 0:
14690 * raise make_ex(ret, "error in fsat") # <<<<<<<<<<<<<<
14691 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino,
14692 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink,
14693 */
14694 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__14694; goto __pyx_L1_error;}
14695 __Pyx_GOTREF(__pyx_t_2);
14696 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_fsat); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__14696; goto __pyx_L1_error;}
14697 __Pyx_GOTREF(__pyx_t_1);
14698 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14699 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
14700 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14701 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__14701; goto __pyx_L1_error;}
14702
14703 /* "cephfs.pyx":1141
14704 * # FIXME: replace magic number with CEPH_STATX_BASIC_STATS
14705 * ret = ceph_fstatx(self.cluster, _fd, &stx, 0x7ffu, 0)
14706 * if ret < 0: # <<<<<<<<<<<<<<
14707 * raise make_ex(ret, "error in fsat")
14708 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino,
14709 */
14710 }
14711
14712 /* "cephfs.pyx":1143
14713 * if ret < 0:
14714 * raise make_ex(ret, "error in fsat")
14715 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino, # <<<<<<<<<<<<<<
14716 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink,
14717 * st_uid=stx.stx_uid, st_gid=stx.stx_gid,
14718 */
14719 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
14720 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_StatResult); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14720; goto __pyx_L1_error;}
14721 __Pyx_GOTREF(__pyx_t_1);
14722 __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14722; goto __pyx_L1_error;}
14723 __Pyx_GOTREF(__pyx_t_2);
14724 __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_stx.stx_dev); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14724; goto __pyx_L1_error;}
14725 __Pyx_GOTREF(__pyx_t_6);
14726 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_dev, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14726; goto __pyx_L1_error;}
14727 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14728 __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_stx.stx_ino); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14728; goto __pyx_L1_error;}
14729 __Pyx_GOTREF(__pyx_t_6);
14730 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_ino, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14730; goto __pyx_L1_error;}
14731 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14732
14733 /* "cephfs.pyx":1144
14734 * raise make_ex(ret, "error in fsat")
14735 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino,
14736 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink, # <<<<<<<<<<<<<<
14737 * st_uid=stx.stx_uid, st_gid=stx.stx_gid,
14738 * st_rdev=stx.stx_rdev, st_size=stx.stx_size,
14739 */
14740 __pyx_t_6 = __Pyx_PyInt_From_uint16_t(__pyx_v_stx.stx_mode); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__14740; goto __pyx_L1_error;}
14741 __Pyx_GOTREF(__pyx_t_6);
14742 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_mode, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14742; goto __pyx_L1_error;}
14743 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14744 __pyx_t_6 = __Pyx_PyInt_From_uint32_t(__pyx_v_stx.stx_nlink); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__14744; goto __pyx_L1_error;}
14745 __Pyx_GOTREF(__pyx_t_6);
14746 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_nlink, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14746; goto __pyx_L1_error;}
14747 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14748
14749 /* "cephfs.pyx":1145
14750 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino,
14751 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink,
14752 * st_uid=stx.stx_uid, st_gid=stx.stx_gid, # <<<<<<<<<<<<<<
14753 * st_rdev=stx.stx_rdev, st_size=stx.stx_size,
14754 * st_blksize=stx.stx_blksize,
14755 */
14756 __pyx_t_6 = __Pyx_PyInt_From_uint32_t(__pyx_v_stx.stx_uid); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__14756; goto __pyx_L1_error;}
14757 __Pyx_GOTREF(__pyx_t_6);
14758 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_uid, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14758; goto __pyx_L1_error;}
14759 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14760 __pyx_t_6 = __Pyx_PyInt_From_uint32_t(__pyx_v_stx.stx_gid); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__14760; goto __pyx_L1_error;}
14761 __Pyx_GOTREF(__pyx_t_6);
14762 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_gid, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14762; goto __pyx_L1_error;}
14763 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14764
14765 /* "cephfs.pyx":1146
14766 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink,
14767 * st_uid=stx.stx_uid, st_gid=stx.stx_gid,
14768 * st_rdev=stx.stx_rdev, st_size=stx.stx_size, # <<<<<<<<<<<<<<
14769 * st_blksize=stx.stx_blksize,
14770 * st_blocks=stx.stx_blocks,
14771 */
14772 __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_stx.stx_rdev); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__14772; goto __pyx_L1_error;}
14773 __Pyx_GOTREF(__pyx_t_6);
14774 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_rdev, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14774; goto __pyx_L1_error;}
14775 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14776 __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_stx.stx_size); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__14776; goto __pyx_L1_error;}
14777 __Pyx_GOTREF(__pyx_t_6);
14778 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_size, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14778; goto __pyx_L1_error;}
14779 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14780
14781 /* "cephfs.pyx":1147
14782 * st_uid=stx.stx_uid, st_gid=stx.stx_gid,
14783 * st_rdev=stx.stx_rdev, st_size=stx.stx_size,
14784 * st_blksize=stx.stx_blksize, # <<<<<<<<<<<<<<
14785 * st_blocks=stx.stx_blocks,
14786 * st_atime=datetime.fromtimestamp(stx.stx_atime.tv_sec),
14787 */
14788 __pyx_t_6 = __Pyx_PyInt_From_uint32_t(__pyx_v_stx.stx_blksize); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__14788; goto __pyx_L1_error;}
14789 __Pyx_GOTREF(__pyx_t_6);
14790 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_blksize, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14790; goto __pyx_L1_error;}
14791 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14792
14793 /* "cephfs.pyx":1148
14794 * st_rdev=stx.stx_rdev, st_size=stx.stx_size,
14795 * st_blksize=stx.stx_blksize,
14796 * st_blocks=stx.stx_blocks, # <<<<<<<<<<<<<<
14797 * st_atime=datetime.fromtimestamp(stx.stx_atime.tv_sec),
14798 * st_mtime=datetime.fromtimestamp(stx.stx_mtime.tv_sec),
14799 */
14800 __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_stx.stx_blocks); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__14800; goto __pyx_L1_error;}
14801 __Pyx_GOTREF(__pyx_t_6);
14802 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_blocks, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14802; goto __pyx_L1_error;}
14803 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14804
14805 /* "cephfs.pyx":1149
14806 * st_blksize=stx.stx_blksize,
14807 * st_blocks=stx.stx_blocks,
14808 * st_atime=datetime.fromtimestamp(stx.stx_atime.tv_sec), # <<<<<<<<<<<<<<
14809 * st_mtime=datetime.fromtimestamp(stx.stx_mtime.tv_sec),
14810 * st_ctime=datetime.fromtimestamp(stx.stx_ctime.tv_sec))
14811 */
14812 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__14812; goto __pyx_L1_error;}
14813 __Pyx_GOTREF(__pyx_t_7);
14814 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__14814; goto __pyx_L1_error;}
14815 __Pyx_GOTREF(__pyx_t_8);
14816 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
14817 __pyx_t_7 = __Pyx_PyInt_From_time_t(__pyx_v_stx.stx_atime.tv_sec); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__14817; goto __pyx_L1_error;}
14818 __Pyx_GOTREF(__pyx_t_7);
14819 __pyx_t_9 = NULL((void*)0);
14820 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 0)
) {
14821 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
14822 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
14823 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
14824 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
14825 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14826 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14827 }
14828 }
14829 if (!__pyx_t_9) {
14830 __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__14830; goto __pyx_L1_error;}
14831 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
14832 __Pyx_GOTREF(__pyx_t_6);
14833 } else {
14834 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__14834; goto __pyx_L1_error;}
14835 __Pyx_GOTREF(__pyx_t_10);
14836 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
14837 __Pyx_GIVEREF(__pyx_t_7);
14838 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_t_7
)
;
14839 __pyx_t_7 = 0;
14840 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__14840; goto __pyx_L1_error;}
14841 __Pyx_GOTREF(__pyx_t_6);
14842 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
14843 }
14844 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
14845 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_atime, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14845; goto __pyx_L1_error;}
14846 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14847
14848 /* "cephfs.pyx":1150
14849 * st_blocks=stx.stx_blocks,
14850 * st_atime=datetime.fromtimestamp(stx.stx_atime.tv_sec),
14851 * st_mtime=datetime.fromtimestamp(stx.stx_mtime.tv_sec), # <<<<<<<<<<<<<<
14852 * st_ctime=datetime.fromtimestamp(stx.stx_ctime.tv_sec))
14853 *
14854 */
14855 __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__14855; goto __pyx_L1_error;}
14856 __Pyx_GOTREF(__pyx_t_8);
14857 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__14857; goto __pyx_L1_error;}
14858 __Pyx_GOTREF(__pyx_t_10);
14859 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
14860 __pyx_t_8 = __Pyx_PyInt_From_time_t(__pyx_v_stx.stx_mtime.tv_sec); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__14860; goto __pyx_L1_error;}
14861 __Pyx_GOTREF(__pyx_t_8);
14862 __pyx_t_7 = NULL((void*)0);
14863 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_10))__builtin_expect(!!(((__pyx_t_10)->ob_type == &PyMethod_Type
)), 0)
) {
14864 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10)(((PyMethodObject *)__pyx_t_10) -> im_self);
14865 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
14866 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10)(((PyMethodObject *)__pyx_t_10) -> im_func);
14867 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
14868 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14869 __Pyx_DECREF_SET(__pyx_t_10, function)do { PyObject *tmp = (PyObject *) __pyx_t_10; __pyx_t_10 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14870 }
14871 }
14872 if (!__pyx_t_7) {
14873 __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__14873; goto __pyx_L1_error;}
14874 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
14875 __Pyx_GOTREF(__pyx_t_6);
14876 } else {
14877 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__14877; goto __pyx_L1_error;}
14878 __Pyx_GOTREF(__pyx_t_9);
14879 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
14880 __Pyx_GIVEREF(__pyx_t_8);
14881 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_8);
14882 __pyx_t_8 = 0;
14883 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__14883; goto __pyx_L1_error;}
14884 __Pyx_GOTREF(__pyx_t_6);
14885 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
14886 }
14887 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
14888 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_mtime, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14888; goto __pyx_L1_error;}
14889 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14890
14891 /* "cephfs.pyx":1151
14892 * st_atime=datetime.fromtimestamp(stx.stx_atime.tv_sec),
14893 * st_mtime=datetime.fromtimestamp(stx.stx_mtime.tv_sec),
14894 * st_ctime=datetime.fromtimestamp(stx.stx_ctime.tv_sec)) # <<<<<<<<<<<<<<
14895 *
14896 * def symlink(self, existing, newname):
14897 */
14898 __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__14898; goto __pyx_L1_error;}
14899 __Pyx_GOTREF(__pyx_t_10);
14900 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__14900; goto __pyx_L1_error;}
14901 __Pyx_GOTREF(__pyx_t_9);
14902 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
14903 __pyx_t_10 = __Pyx_PyInt_From_time_t(__pyx_v_stx.stx_ctime.tv_sec); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__14903; goto __pyx_L1_error;}
14904 __Pyx_GOTREF(__pyx_t_10);
14905 __pyx_t_8 = NULL((void*)0);
14906 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_9))__builtin_expect(!!(((__pyx_t_9)->ob_type == &PyMethod_Type
)), 0)
) {
14907 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9)(((PyMethodObject *)__pyx_t_9) -> im_self);
14908 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
14909 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9)(((PyMethodObject *)__pyx_t_9) -> im_func);
14910 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
14911 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14912 __Pyx_DECREF_SET(__pyx_t_9, function)do { PyObject *tmp = (PyObject *) __pyx_t_9; __pyx_t_9 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14913 }
14914 }
14915 if (!__pyx_t_8) {
14916 __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__14916; goto __pyx_L1_error;}
14917 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
14918 __Pyx_GOTREF(__pyx_t_6);
14919 } else {
14920 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__14920; goto __pyx_L1_error;}
14921 __Pyx_GOTREF(__pyx_t_7);
14922 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
14923 __Pyx_GIVEREF(__pyx_t_10);
14924 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_10)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_10
)
;
14925 __pyx_t_10 = 0;
14926 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__14926; goto __pyx_L1_error;}
14927 __Pyx_GOTREF(__pyx_t_6);
14928 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
14929 }
14930 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
14931 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_ctime, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14931; goto __pyx_L1_error;}
14932 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
14933
14934 /* "cephfs.pyx":1143
14935 * if ret < 0:
14936 * raise make_ex(ret, "error in fsat")
14937 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino, # <<<<<<<<<<<<<<
14938 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink,
14939 * st_uid=stx.stx_uid, st_gid=stx.stx_gid,
14940 */
14941 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__14941; goto __pyx_L1_error;}
14942 __Pyx_GOTREF(__pyx_t_6);
14943 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14944 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14945 __pyx_r = __pyx_t_6;
14946 __pyx_t_6 = 0;
14947 goto __pyx_L0;
14948
14949 /* "cephfs.pyx":1124
14950 * st_ctime=datetime.fromtimestamp(stx.stx_ctime.tv_sec))
14951 *
14952 * def fstat(self, fd): # <<<<<<<<<<<<<<
14953 * """
14954 * Get an open file's extended statistics and attributes.
14955 */
14956
14957 /* function exit code */
14958 __pyx_L1_error:;
14959 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
14960 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
14961 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
14962 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
14963 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
14964 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
14965 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
14966 __Pyx_AddTraceback("cephfs.LibCephFS.fstat", __pyx_clineno, __pyx_lineno, __pyx_filename);
14967 __pyx_r = NULL((void*)0);
14968 __pyx_L0:;
14969 __Pyx_XGIVEREF(__pyx_r);
14970 __Pyx_RefNannyFinishContext();
14971 return __pyx_r;
14972}
14973
14974/* "cephfs.pyx":1153
14975 * st_ctime=datetime.fromtimestamp(stx.stx_ctime.tv_sec))
14976 *
14977 * def symlink(self, existing, newname): # <<<<<<<<<<<<<<
14978 * """
14979 * Creates a symbolic link.
14980 */
14981
14982/* Python wrapper */
14983static PyObject *__pyx_pw_6cephfs_9LibCephFS_79symlink(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14984static char __pyx_doc_6cephfs_9LibCephFS_78symlink[] = "\n Creates a symbolic link.\n \n :param existing: the path to the existing file/directory to link to.\n :param newname: the path to the new file/directory to link from.\n ";
14985static PyObject *__pyx_pw_6cephfs_9LibCephFS_79symlink(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14986 PyObject *__pyx_v_existing = 0;
14987 PyObject *__pyx_v_newname = 0;
14988 int __pyx_lineno = 0;
14989 const char *__pyx_filename = NULL((void*)0);
14990 int __pyx_clineno = 0;
14991 PyObject *__pyx_r = 0;
14992 __Pyx_RefNannyDeclarations
14993 __Pyx_RefNannySetupContext("symlink (wrapper)", 0);
14994 {
14995 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_existing,&__pyx_n_s_newname,0};
14996 PyObject* values[2] = {0,0};
14997 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
14998 Py_ssize_t kw_args;
14999 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
15000 switch (pos_args) {
15001 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
15002 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
15003 case 0: break;
15004 default: goto __pyx_L5_argtuple_error;
15005 }
15006 kw_args = PyDict_Size(__pyx_kwds);
15007 switch (pos_args) {
15008 case 0:
15009 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_existing)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_existing
)) != 0), 1)
) kw_args--;
15010 else goto __pyx_L5_argtuple_error;
15011 case 1:
15012 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname
)) != 0), 1)
) kw_args--;
15013 else {
15014 __Pyx_RaiseArgtupleInvalid("symlink", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__15014; goto __pyx_L3_error;}
15015 }
15016 }
15017 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
15018 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "symlink") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "symlink") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__15018; goto __pyx_L3_error;}
15019 }
15020 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
15021 goto __pyx_L5_argtuple_error;
15022 } else {
15023 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
15024 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
15025 }
15026 __pyx_v_existing = values[0];
15027 __pyx_v_newname = values[1];
15028 }
15029 goto __pyx_L4_argument_unpacking_done;
15030 __pyx_L5_argtuple_error:;
15031 __Pyx_RaiseArgtupleInvalid("symlink", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__15031; goto __pyx_L3_error;}
15032 __pyx_L3_error:;
15033 __Pyx_AddTraceback("cephfs.LibCephFS.symlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
15034 __Pyx_RefNannyFinishContext();
15035 return NULL((void*)0);
15036 __pyx_L4_argument_unpacking_done:;
15037 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_78symlink(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_existing, __pyx_v_newname);
15038
15039 /* function exit code */
15040 __Pyx_RefNannyFinishContext();
15041 return __pyx_r;
15042}
15043
15044static PyObject *__pyx_pf_6cephfs_9LibCephFS_78symlink(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_existing, PyObject *__pyx_v_newname) {
15045 char *__pyx_v__existing;
15046 char *__pyx_v__newname;
15047 int __pyx_v_ret;
15048 PyObject *__pyx_r = NULL((void*)0);
15049 __Pyx_RefNannyDeclarations
15050 PyObject *__pyx_t_1 = NULL((void*)0);
15051 PyObject *__pyx_t_2 = NULL((void*)0);
15052 PyObject *__pyx_t_3 = NULL((void*)0);
15053 Py_ssize_t __pyx_t_4;
15054 PyObject *__pyx_t_5 = NULL((void*)0);
15055 char *__pyx_t_6;
15056 int __pyx_t_7;
15057 int __pyx_lineno = 0;
15058 const char *__pyx_filename = NULL((void*)0);
15059 int __pyx_clineno = 0;
15060 __Pyx_RefNannySetupContext("symlink", 0);
15061 __Pyx_INCREF(__pyx_v_existing)( ((PyObject*)(__pyx_v_existing))->ob_refcnt++);
15062 __Pyx_INCREF(__pyx_v_newname)( ((PyObject*)(__pyx_v_newname))->ob_refcnt++);
15063
15064 /* "cephfs.pyx":1160
15065 * :param newname: the path to the new file/directory to link from.
15066 * """
15067 * self.require_state("mounted") # <<<<<<<<<<<<<<
15068 * existing = cstr(existing, 'existing')
15069 * newname = cstr(newname, 'newname')
15070 */
15071 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__15071; goto __pyx_L1_error;}
15072 __Pyx_GOTREF(__pyx_t_1);
15073 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__62, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__15073; goto __pyx_L1_error;}
15074 __Pyx_GOTREF(__pyx_t_2);
15075 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15076 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
15077
15078 /* "cephfs.pyx":1161
15079 * """
15080 * self.require_state("mounted")
15081 * existing = cstr(existing, 'existing') # <<<<<<<<<<<<<<
15082 * newname = cstr(newname, 'newname')
15083 * cdef:
15084 */
15085 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__15085; goto __pyx_L1_error;}
15086 __Pyx_GOTREF(__pyx_t_1);
15087 __pyx_t_3 = NULL((void*)0);
15088 __pyx_t_4 = 0;
15089 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
15090 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
15091 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
15092 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
15093 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
15094 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
15095 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
15096 __pyx_t_4 = 1;
15097 }
15098 }
15099 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__15099; goto __pyx_L1_error;}
15100 __Pyx_GOTREF(__pyx_t_5);
15101 if (__pyx_t_3) {
15102 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
15103 }
15104 __Pyx_INCREF(__pyx_v_existing)( ((PyObject*)(__pyx_v_existing))->ob_refcnt++);
15105 __Pyx_GIVEREF(__pyx_v_existing);
15106 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_existing)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_existing
)
;
15107 __Pyx_INCREF(__pyx_n_s_existing)( ((PyObject*)(__pyx_n_s_existing))->ob_refcnt++);
15108 __Pyx_GIVEREF(__pyx_n_s_existing);
15109 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_existing)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_existing
)
;
15110 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__15110; goto __pyx_L1_error;}
15111 __Pyx_GOTREF(__pyx_t_2);
15112 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
15113 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15114 __Pyx_DECREF_SET(__pyx_v_existing, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_existing; __pyx_v_existing
= __pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
15115 __pyx_t_2 = 0;
15116
15117 /* "cephfs.pyx":1162
15118 * self.require_state("mounted")
15119 * existing = cstr(existing, 'existing')
15120 * newname = cstr(newname, 'newname') # <<<<<<<<<<<<<<
15121 * cdef:
15122 * char* _existing = existing
15123 */
15124 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__15124; goto __pyx_L1_error;}
15125 __Pyx_GOTREF(__pyx_t_1);
15126 __pyx_t_5 = NULL((void*)0);
15127 __pyx_t_4 = 0;
15128 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
15129 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
15130 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
15131 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
15132 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
15133 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
15134 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
15135 __pyx_t_4 = 1;
15136 }
15137 }
15138 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__15138; goto __pyx_L1_error;}
15139 __Pyx_GOTREF(__pyx_t_3);
15140 if (__pyx_t_5) {
15141 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
15142 }
15143 __Pyx_INCREF(__pyx_v_newname)( ((PyObject*)(__pyx_v_newname))->ob_refcnt++);
15144 __Pyx_GIVEREF(__pyx_v_newname);
15145 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_newname)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_newname
)
;
15146 __Pyx_INCREF(__pyx_n_s_newname)( ((PyObject*)(__pyx_n_s_newname))->ob_refcnt++);
15147 __Pyx_GIVEREF(__pyx_n_s_newname);
15148 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_newname)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_newname
)
;
15149 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__15149; goto __pyx_L1_error;}
15150 __Pyx_GOTREF(__pyx_t_2);
15151 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
15152 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15153 __Pyx_DECREF_SET(__pyx_v_newname, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_newname; __pyx_v_newname
= __pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
15154 __pyx_t_2 = 0;
15155
15156 /* "cephfs.pyx":1164
15157 * newname = cstr(newname, 'newname')
15158 * cdef:
15159 * char* _existing = existing # <<<<<<<<<<<<<<
15160 * char* _newname = newname
15161 *
15162 */
15163 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_existing); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__15163; goto __pyx_L1_error;}
15164 __pyx_v__existing = __pyx_t_6;
15165
15166 /* "cephfs.pyx":1165
15167 * cdef:
15168 * char* _existing = existing
15169 * char* _newname = newname # <<<<<<<<<<<<<<
15170 *
15171 * with nogil:
15172 */
15173 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_newname); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__15173; goto __pyx_L1_error;}
15174 __pyx_v__newname = __pyx_t_6;
15175
15176 /* "cephfs.pyx":1167
15177 * char* _newname = newname
15178 *
15179 * with nogil: # <<<<<<<<<<<<<<
15180 * ret = ceph_symlink(self.cluster, _existing, _newname)
15181 * if ret < 0:
15182 */
15183 {
15184 #ifdef WITH_THREAD1
15185 PyThreadState *_save;
15186 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
15187 #endif
15188 /*try:*/ {
15189
15190 /* "cephfs.pyx":1168
15191 *
15192 * with nogil:
15193 * ret = ceph_symlink(self.cluster, _existing, _newname) # <<<<<<<<<<<<<<
15194 * if ret < 0:
15195 * raise make_ex(ret, "error in symlink")
15196 */
15197 __pyx_v_ret = ceph_symlink(__pyx_v_self->cluster, __pyx_v__existing, __pyx_v__newname);
15198 }
15199
15200 /* "cephfs.pyx":1167
15201 * char* _newname = newname
15202 *
15203 * with nogil: # <<<<<<<<<<<<<<
15204 * ret = ceph_symlink(self.cluster, _existing, _newname)
15205 * if ret < 0:
15206 */
15207 /*finally:*/ {
15208 /*normal exit:*/{
15209 #ifdef WITH_THREAD1
15210 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
15211 #endif
15212 goto __pyx_L5;
15213 }
15214 __pyx_L5:;
15215 }
15216 }
15217
15218 /* "cephfs.pyx":1169
15219 * with nogil:
15220 * ret = ceph_symlink(self.cluster, _existing, _newname)
15221 * if ret < 0: # <<<<<<<<<<<<<<
15222 * raise make_ex(ret, "error in symlink")
15223 *
15224 */
15225 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
15226 if (__pyx_t_7) {
15227
15228 /* "cephfs.pyx":1170
15229 * ret = ceph_symlink(self.cluster, _existing, _newname)
15230 * if ret < 0:
15231 * raise make_ex(ret, "error in symlink") # <<<<<<<<<<<<<<
15232 *
15233 * def link(self, existing, newname):
15234 */
15235 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__15235; goto __pyx_L1_error;}
15236 __Pyx_GOTREF(__pyx_t_2);
15237 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_symlink); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__15237; goto __pyx_L1_error;}
15238 __Pyx_GOTREF(__pyx_t_1);
15239 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
15240 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
15241 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15242 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__15242; goto __pyx_L1_error;}
15243
15244 /* "cephfs.pyx":1169
15245 * with nogil:
15246 * ret = ceph_symlink(self.cluster, _existing, _newname)
15247 * if ret < 0: # <<<<<<<<<<<<<<
15248 * raise make_ex(ret, "error in symlink")
15249 *
15250 */
15251 }
15252
15253 /* "cephfs.pyx":1153
15254 * st_ctime=datetime.fromtimestamp(stx.stx_ctime.tv_sec))
15255 *
15256 * def symlink(self, existing, newname): # <<<<<<<<<<<<<<
15257 * """
15258 * Creates a symbolic link.
15259 */
15260
15261 /* function exit code */
15262 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
15263 goto __pyx_L0;
15264 __pyx_L1_error:;
15265 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
15266 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
15267 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
15268 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
15269 __Pyx_AddTraceback("cephfs.LibCephFS.symlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
15270 __pyx_r = NULL((void*)0);
15271 __pyx_L0:;
15272 __Pyx_XDECREF(__pyx_v_existing)do { if ((__pyx_v_existing) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_existing))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_existing)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_existing)))); }
while (0); } while (0)
;
15273 __Pyx_XDECREF(__pyx_v_newname)do { if ((__pyx_v_newname) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_newname))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_newname)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_newname)))); } while
(0); } while (0)
;
15274 __Pyx_XGIVEREF(__pyx_r);
15275 __Pyx_RefNannyFinishContext();
15276 return __pyx_r;
15277}
15278
15279/* "cephfs.pyx":1172
15280 * raise make_ex(ret, "error in symlink")
15281 *
15282 * def link(self, existing, newname): # <<<<<<<<<<<<<<
15283 * """
15284 * Create a link.
15285 */
15286
15287/* Python wrapper */
15288static PyObject *__pyx_pw_6cephfs_9LibCephFS_81link(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15289static char __pyx_doc_6cephfs_9LibCephFS_80link[] = "\n Create a link.\n \n :param existing: the path to the existing file/directory to link to.\n :param newname: the path to the new file/directory to link from.\n ";
15290static PyObject *__pyx_pw_6cephfs_9LibCephFS_81link(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15291 PyObject *__pyx_v_existing = 0;
15292 PyObject *__pyx_v_newname = 0;
15293 int __pyx_lineno = 0;
15294 const char *__pyx_filename = NULL((void*)0);
15295 int __pyx_clineno = 0;
15296 PyObject *__pyx_r = 0;
15297 __Pyx_RefNannyDeclarations
15298 __Pyx_RefNannySetupContext("link (wrapper)", 0);
15299 {
15300 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_existing,&__pyx_n_s_newname,0};
15301 PyObject* values[2] = {0,0};
15302 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
15303 Py_ssize_t kw_args;
15304 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
15305 switch (pos_args) {
15306 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
15307 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
15308 case 0: break;
15309 default: goto __pyx_L5_argtuple_error;
15310 }
15311 kw_args = PyDict_Size(__pyx_kwds);
15312 switch (pos_args) {
15313 case 0:
15314 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_existing)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_existing
)) != 0), 1)
) kw_args--;
15315 else goto __pyx_L5_argtuple_error;
15316 case 1:
15317 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname
)) != 0), 1)
) kw_args--;
15318 else {
15319 __Pyx_RaiseArgtupleInvalid("link", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__15319; goto __pyx_L3_error;}
15320 }
15321 }
15322 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
15323 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "link") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "link") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__15323; goto __pyx_L3_error;}
15324 }
15325 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
15326 goto __pyx_L5_argtuple_error;
15327 } else {
15328 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
15329 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
15330 }
15331 __pyx_v_existing = values[0];
15332 __pyx_v_newname = values[1];
15333 }
15334 goto __pyx_L4_argument_unpacking_done;
15335 __pyx_L5_argtuple_error:;
15336 __Pyx_RaiseArgtupleInvalid("link", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__15336; goto __pyx_L3_error;}
15337 __pyx_L3_error:;
15338 __Pyx_AddTraceback("cephfs.LibCephFS.link", __pyx_clineno, __pyx_lineno, __pyx_filename);
15339 __Pyx_RefNannyFinishContext();
15340 return NULL((void*)0);
15341 __pyx_L4_argument_unpacking_done:;
15342 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_80link(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_existing, __pyx_v_newname);
15343
15344 /* function exit code */
15345 __Pyx_RefNannyFinishContext();
15346 return __pyx_r;
15347}
15348
15349static PyObject *__pyx_pf_6cephfs_9LibCephFS_80link(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_existing, PyObject *__pyx_v_newname) {
15350 char *__pyx_v__existing;
15351 char *__pyx_v__newname;
15352 int __pyx_v_ret;
15353 PyObject *__pyx_r = NULL((void*)0);
15354 __Pyx_RefNannyDeclarations
15355 PyObject *__pyx_t_1 = NULL((void*)0);
15356 PyObject *__pyx_t_2 = NULL((void*)0);
15357 PyObject *__pyx_t_3 = NULL((void*)0);
15358 Py_ssize_t __pyx_t_4;
15359 PyObject *__pyx_t_5 = NULL((void*)0);
15360 char *__pyx_t_6;
15361 int __pyx_t_7;
15362 int __pyx_lineno = 0;
15363 const char *__pyx_filename = NULL((void*)0);
15364 int __pyx_clineno = 0;
15365 __Pyx_RefNannySetupContext("link", 0);
15366 __Pyx_INCREF(__pyx_v_existing)( ((PyObject*)(__pyx_v_existing))->ob_refcnt++);
15367 __Pyx_INCREF(__pyx_v_newname)( ((PyObject*)(__pyx_v_newname))->ob_refcnt++);
15368
15369 /* "cephfs.pyx":1180
15370 * """
15371 *
15372 * self.require_state("mounted") # <<<<<<<<<<<<<<
15373 * existing = cstr(existing, 'existing')
15374 * newname = cstr(newname, 'newname')
15375 */
15376 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__15376; goto __pyx_L1_error;}
15377 __Pyx_GOTREF(__pyx_t_1);
15378 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__63, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__15378; goto __pyx_L1_error;}
15379 __Pyx_GOTREF(__pyx_t_2);
15380 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15381 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
15382
15383 /* "cephfs.pyx":1181
15384 *
15385 * self.require_state("mounted")
15386 * existing = cstr(existing, 'existing') # <<<<<<<<<<<<<<
15387 * newname = cstr(newname, 'newname')
15388 * cdef:
15389 */
15390 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__15390; goto __pyx_L1_error;}
15391 __Pyx_GOTREF(__pyx_t_1);
15392 __pyx_t_3 = NULL((void*)0);
15393 __pyx_t_4 = 0;
15394 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
15395 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
15396 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
15397 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
15398 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
15399 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
15400 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
15401 __pyx_t_4 = 1;
15402 }
15403 }
15404 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__15404; goto __pyx_L1_error;}
15405 __Pyx_GOTREF(__pyx_t_5);
15406 if (__pyx_t_3) {
15407 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
15408 }
15409 __Pyx_INCREF(__pyx_v_existing)( ((PyObject*)(__pyx_v_existing))->ob_refcnt++);
15410 __Pyx_GIVEREF(__pyx_v_existing);
15411 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_existing)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_existing
)
;
15412 __Pyx_INCREF(__pyx_n_s_existing)( ((PyObject*)(__pyx_n_s_existing))->ob_refcnt++);
15413 __Pyx_GIVEREF(__pyx_n_s_existing);
15414 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_existing)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_existing
)
;
15415 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__15415; goto __pyx_L1_error;}
15416 __Pyx_GOTREF(__pyx_t_2);
15417 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
15418 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15419 __Pyx_DECREF_SET(__pyx_v_existing, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_existing; __pyx_v_existing
= __pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
15420 __pyx_t_2 = 0;
15421
15422 /* "cephfs.pyx":1182
15423 * self.require_state("mounted")
15424 * existing = cstr(existing, 'existing')
15425 * newname = cstr(newname, 'newname') # <<<<<<<<<<<<<<
15426 * cdef:
15427 * char* _existing = existing
15428 */
15429 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__15429; goto __pyx_L1_error;}
15430 __Pyx_GOTREF(__pyx_t_1);
15431 __pyx_t_5 = NULL((void*)0);
15432 __pyx_t_4 = 0;
15433 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
15434 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
15435 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
15436 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
15437 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
15438 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
15439 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
15440 __pyx_t_4 = 1;
15441 }
15442 }
15443 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__15443; goto __pyx_L1_error;}
15444 __Pyx_GOTREF(__pyx_t_3);
15445 if (__pyx_t_5) {
15446 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
15447 }
15448 __Pyx_INCREF(__pyx_v_newname)( ((PyObject*)(__pyx_v_newname))->ob_refcnt++);
15449 __Pyx_GIVEREF(__pyx_v_newname);
15450 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_newname)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_newname
)
;
15451 __Pyx_INCREF(__pyx_n_s_newname)( ((PyObject*)(__pyx_n_s_newname))->ob_refcnt++);
15452 __Pyx_GIVEREF(__pyx_n_s_newname);
15453 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_newname)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_newname
)
;
15454 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__15454; goto __pyx_L1_error;}
15455 __Pyx_GOTREF(__pyx_t_2);
15456 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
15457 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15458 __Pyx_DECREF_SET(__pyx_v_newname, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_newname; __pyx_v_newname
= __pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
15459 __pyx_t_2 = 0;
15460
15461 /* "cephfs.pyx":1184
15462 * newname = cstr(newname, 'newname')
15463 * cdef:
15464 * char* _existing = existing # <<<<<<<<<<<<<<
15465 * char* _newname = newname
15466 *
15467 */
15468 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_existing); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__15468; goto __pyx_L1_error;}
15469 __pyx_v__existing = __pyx_t_6;
15470
15471 /* "cephfs.pyx":1185
15472 * cdef:
15473 * char* _existing = existing
15474 * char* _newname = newname # <<<<<<<<<<<<<<
15475 *
15476 * with nogil:
15477 */
15478 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_newname); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__15478; goto __pyx_L1_error;}
15479 __pyx_v__newname = __pyx_t_6;
15480
15481 /* "cephfs.pyx":1187
15482 * char* _newname = newname
15483 *
15484 * with nogil: # <<<<<<<<<<<<<<
15485 * ret = ceph_link(self.cluster, _existing, _newname)
15486 * if ret < 0:
15487 */
15488 {
15489 #ifdef WITH_THREAD1
15490 PyThreadState *_save;
15491 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
15492 #endif
15493 /*try:*/ {
15494
15495 /* "cephfs.pyx":1188
15496 *
15497 * with nogil:
15498 * ret = ceph_link(self.cluster, _existing, _newname) # <<<<<<<<<<<<<<
15499 * if ret < 0:
15500 * raise make_ex(ret, "error in link")
15501 */
15502 __pyx_v_ret = ceph_link(__pyx_v_self->cluster, __pyx_v__existing, __pyx_v__newname);
15503 }
15504
15505 /* "cephfs.pyx":1187
15506 * char* _newname = newname
15507 *
15508 * with nogil: # <<<<<<<<<<<<<<
15509 * ret = ceph_link(self.cluster, _existing, _newname)
15510 * if ret < 0:
15511 */
15512 /*finally:*/ {
15513 /*normal exit:*/{
15514 #ifdef WITH_THREAD1
15515 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
15516 #endif
15517 goto __pyx_L5;
15518 }
15519 __pyx_L5:;
15520 }
15521 }
15522
15523 /* "cephfs.pyx":1189
15524 * with nogil:
15525 * ret = ceph_link(self.cluster, _existing, _newname)
15526 * if ret < 0: # <<<<<<<<<<<<<<
15527 * raise make_ex(ret, "error in link")
15528 *
15529 */
15530 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
15531 if (__pyx_t_7) {
15532
15533 /* "cephfs.pyx":1190
15534 * ret = ceph_link(self.cluster, _existing, _newname)
15535 * if ret < 0:
15536 * raise make_ex(ret, "error in link") # <<<<<<<<<<<<<<
15537 *
15538 * def readlink(self, path, size):
15539 */
15540 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__15540; goto __pyx_L1_error;}
15541 __Pyx_GOTREF(__pyx_t_2);
15542 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_link); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__15542; goto __pyx_L1_error;}
15543 __Pyx_GOTREF(__pyx_t_1);
15544 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
15545 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
15546 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15547 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__15547; goto __pyx_L1_error;}
15548
15549 /* "cephfs.pyx":1189
15550 * with nogil:
15551 * ret = ceph_link(self.cluster, _existing, _newname)
15552 * if ret < 0: # <<<<<<<<<<<<<<
15553 * raise make_ex(ret, "error in link")
15554 *
15555 */
15556 }
15557
15558 /* "cephfs.pyx":1172
15559 * raise make_ex(ret, "error in symlink")
15560 *
15561 * def link(self, existing, newname): # <<<<<<<<<<<<<<
15562 * """
15563 * Create a link.
15564 */
15565
15566 /* function exit code */
15567 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
15568 goto __pyx_L0;
15569 __pyx_L1_error:;
15570 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
15571 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
15572 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
15573 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
15574 __Pyx_AddTraceback("cephfs.LibCephFS.link", __pyx_clineno, __pyx_lineno, __pyx_filename);
15575 __pyx_r = NULL((void*)0);
15576 __pyx_L0:;
15577 __Pyx_XDECREF(__pyx_v_existing)do { if ((__pyx_v_existing) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_existing))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_existing)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_existing)))); }
while (0); } while (0)
;
15578 __Pyx_XDECREF(__pyx_v_newname)do { if ((__pyx_v_newname) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_newname))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_newname)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_newname)))); } while
(0); } while (0)
;
15579 __Pyx_XGIVEREF(__pyx_r);
15580 __Pyx_RefNannyFinishContext();
15581 return __pyx_r;
15582}
15583
15584/* "cephfs.pyx":1192
15585 * raise make_ex(ret, "error in link")
15586 *
15587 * def readlink(self, path, size): # <<<<<<<<<<<<<<
15588 * """
15589 * Read a symbolic link.
15590 */
15591
15592/* Python wrapper */
15593static PyObject *__pyx_pw_6cephfs_9LibCephFS_83readlink(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15594static char __pyx_doc_6cephfs_9LibCephFS_82readlink[] = "\n Read a symbolic link.\n \n :param path: the path to the symlink to read\n :param size: the length of the buffer\n :rtype buf: buffer to hold the path of the file that the symlink points to.\n ";
15595static PyObject *__pyx_pw_6cephfs_9LibCephFS_83readlink(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15596 PyObject *__pyx_v_path = 0;
15597 PyObject *__pyx_v_size = 0;
15598 int __pyx_lineno = 0;
15599 const char *__pyx_filename = NULL((void*)0);
15600 int __pyx_clineno = 0;
15601 PyObject *__pyx_r = 0;
15602 __Pyx_RefNannyDeclarations
15603 __Pyx_RefNannySetupContext("readlink (wrapper)", 0);
15604 {
15605 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_size,0};
15606 PyObject* values[2] = {0,0};
15607 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
15608 Py_ssize_t kw_args;
15609 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
15610 switch (pos_args) {
15611 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
15612 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
15613 case 0: break;
15614 default: goto __pyx_L5_argtuple_error;
15615 }
15616 kw_args = PyDict_Size(__pyx_kwds);
15617 switch (pos_args) {
15618 case 0:
15619 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path
)) != 0), 1)
) kw_args--;
15620 else goto __pyx_L5_argtuple_error;
15621 case 1:
15622 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size
)) != 0), 1)
) kw_args--;
15623 else {
15624 __Pyx_RaiseArgtupleInvalid("readlink", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__15624; goto __pyx_L3_error;}
15625 }
15626 }
15627 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
15628 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "readlink") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "readlink") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__15628; goto __pyx_L3_error;}
15629 }
15630 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
15631 goto __pyx_L5_argtuple_error;
15632 } else {
15633 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
15634 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
15635 }
15636 __pyx_v_path = values[0];
15637 __pyx_v_size = values[1];
15638 }
15639 goto __pyx_L4_argument_unpacking_done;
15640 __pyx_L5_argtuple_error:;
15641 __Pyx_RaiseArgtupleInvalid("readlink", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__15641; goto __pyx_L3_error;}
15642 __pyx_L3_error:;
15643 __Pyx_AddTraceback("cephfs.LibCephFS.readlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
15644 __Pyx_RefNannyFinishContext();
15645 return NULL((void*)0);
15646 __pyx_L4_argument_unpacking_done:;
15647 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_82readlink(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_path, __pyx_v_size);
15648
15649 /* function exit code */
15650 __Pyx_RefNannyFinishContext();
15651 return __pyx_r;
15652}
15653
15654static PyObject *__pyx_pf_6cephfs_9LibCephFS_82readlink(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_size) {
15655 char *__pyx_v__path;
15656 int64_t __pyx_v__size;
15657 char *__pyx_v_buf;
15658 int __pyx_v_ret;
15659 PyObject *__pyx_r = NULL((void*)0);
15660 __Pyx_RefNannyDeclarations
15661 PyObject *__pyx_t_1 = NULL((void*)0);
15662 PyObject *__pyx_t_2 = NULL((void*)0);
15663 PyObject *__pyx_t_3 = NULL((void*)0);
15664 Py_ssize_t __pyx_t_4;
15665 PyObject *__pyx_t_5 = NULL((void*)0);
15666 char *__pyx_t_6;
15667 int64_t __pyx_t_7;
15668 void *__pyx_t_8;
15669 int __pyx_t_9;
15670 int __pyx_t_10;
15671 int __pyx_t_11;
15672 char const *__pyx_t_12;
15673 PyObject *__pyx_t_13 = NULL((void*)0);
15674 PyObject *__pyx_t_14 = NULL((void*)0);
15675 PyObject *__pyx_t_15 = NULL((void*)0);
15676 PyObject *__pyx_t_16 = NULL((void*)0);
15677 PyObject *__pyx_t_17 = NULL((void*)0);
15678 PyObject *__pyx_t_18 = NULL((void*)0);
15679 int __pyx_lineno = 0;
15680 const char *__pyx_filename = NULL((void*)0);
15681 int __pyx_clineno = 0;
15682 __Pyx_RefNannySetupContext("readlink", 0);
15683 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
15684
15685 /* "cephfs.pyx":1200
15686 * :rtype buf: buffer to hold the path of the file that the symlink points to.
15687 * """
15688 * self.require_state("mounted") # <<<<<<<<<<<<<<
15689 * path = cstr(path, 'path')
15690 *
15691 */
15692 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__15692; goto __pyx_L1_error;}
15693 __Pyx_GOTREF(__pyx_t_1);
15694 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__64, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__15694; goto __pyx_L1_error;}
15695 __Pyx_GOTREF(__pyx_t_2);
15696 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15697 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
15698
15699 /* "cephfs.pyx":1201
15700 * """
15701 * self.require_state("mounted")
15702 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
15703 *
15704 * cdef:
15705 */
15706 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__15706; goto __pyx_L1_error;}
15707 __Pyx_GOTREF(__pyx_t_1);
15708 __pyx_t_3 = NULL((void*)0);
15709 __pyx_t_4 = 0;
15710 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
15711 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
15712 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
15713 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
15714 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
15715 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
15716 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
15717 __pyx_t_4 = 1;
15718 }
15719 }
15720 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__15720; goto __pyx_L1_error;}
15721 __Pyx_GOTREF(__pyx_t_5);
15722 if (__pyx_t_3) {
15723 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
15724 }
15725 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
15726 __Pyx_GIVEREF(__pyx_v_path);
15727 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
15728 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
15729 __Pyx_GIVEREF(__pyx_n_s_path);
15730 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
15731 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__15731; goto __pyx_L1_error;}
15732 __Pyx_GOTREF(__pyx_t_2);
15733 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
15734 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15735 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
15736 __pyx_t_2 = 0;
15737
15738 /* "cephfs.pyx":1204
15739 *
15740 * cdef:
15741 * char* _path = path # <<<<<<<<<<<<<<
15742 * int64_t _size = size
15743 * char *buf = NULL
15744 */
15745 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__15745; goto __pyx_L1_error;}
15746 __pyx_v__path = __pyx_t_6;
15747
15748 /* "cephfs.pyx":1205
15749 * cdef:
15750 * char* _path = path
15751 * int64_t _size = size # <<<<<<<<<<<<<<
15752 * char *buf = NULL
15753 *
15754 */
15755 __pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_7 == (int64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_7 == (int64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__15755; goto __pyx_L1_error;}
15756 __pyx_v__size = __pyx_t_7;
15757
15758 /* "cephfs.pyx":1206
15759 * char* _path = path
15760 * int64_t _size = size
15761 * char *buf = NULL # <<<<<<<<<<<<<<
15762 *
15763 * try:
15764 */
15765 __pyx_v_buf = NULL((void*)0);
15766
15767 /* "cephfs.pyx":1208
15768 * char *buf = NULL
15769 *
15770 * try: # <<<<<<<<<<<<<<
15771 * buf = <char *>realloc_chk(buf, _size)
15772 * with nogil:
15773 */
15774 /*try:*/ {
15775
15776 /* "cephfs.pyx":1209
15777 *
15778 * try:
15779 * buf = <char *>realloc_chk(buf, _size) # <<<<<<<<<<<<<<
15780 * with nogil:
15781 * ret = ceph_readlink(self.cluster, _path, buf, _size)
15782 */
15783 __pyx_t_8 = __pyx_f_6cephfs_realloc_chk(__pyx_v_buf, __pyx_v__size); if (unlikely(__pyx_t_8 == NULL)__builtin_expect(!!(__pyx_t_8 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__15783; goto __pyx_L4_error;}
15784 __pyx_v_buf = ((char *)__pyx_t_8);
15785
15786 /* "cephfs.pyx":1210
15787 * try:
15788 * buf = <char *>realloc_chk(buf, _size)
15789 * with nogil: # <<<<<<<<<<<<<<
15790 * ret = ceph_readlink(self.cluster, _path, buf, _size)
15791 * if ret < 0:
15792 */
15793 {
15794 #ifdef WITH_THREAD1
15795 PyThreadState *_save;
15796 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
15797 #endif
15798 /*try:*/ {
15799
15800 /* "cephfs.pyx":1211
15801 * buf = <char *>realloc_chk(buf, _size)
15802 * with nogil:
15803 * ret = ceph_readlink(self.cluster, _path, buf, _size) # <<<<<<<<<<<<<<
15804 * if ret < 0:
15805 * raise make_ex(ret, "error in readlink")
15806 */
15807 __pyx_v_ret = ceph_readlink(__pyx_v_self->cluster, __pyx_v__path, __pyx_v_buf, __pyx_v__size);
15808 }
15809
15810 /* "cephfs.pyx":1210
15811 * try:
15812 * buf = <char *>realloc_chk(buf, _size)
15813 * with nogil: # <<<<<<<<<<<<<<
15814 * ret = ceph_readlink(self.cluster, _path, buf, _size)
15815 * if ret < 0:
15816 */
15817 /*finally:*/ {
15818 /*normal exit:*/{
15819 #ifdef WITH_THREAD1
15820 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
15821 #endif
15822 goto __pyx_L8;
15823 }
15824 __pyx_L8:;
15825 }
15826 }
15827
15828 /* "cephfs.pyx":1212
15829 * with nogil:
15830 * ret = ceph_readlink(self.cluster, _path, buf, _size)
15831 * if ret < 0: # <<<<<<<<<<<<<<
15832 * raise make_ex(ret, "error in readlink")
15833 * return buf
15834 */
15835 __pyx_t_9 = ((__pyx_v_ret < 0) != 0);
15836 if (__pyx_t_9) {
15837
15838 /* "cephfs.pyx":1213
15839 * ret = ceph_readlink(self.cluster, _path, buf, _size)
15840 * if ret < 0:
15841 * raise make_ex(ret, "error in readlink") # <<<<<<<<<<<<<<
15842 * return buf
15843 * finally:
15844 */
15845 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__15845; goto __pyx_L4_error;}
15846 __Pyx_GOTREF(__pyx_t_2);
15847 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_readlink); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__15847; goto __pyx_L4_error;}
15848 __Pyx_GOTREF(__pyx_t_1);
15849 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
15850 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
15851 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15852 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__15852; goto __pyx_L4_error;}
15853
15854 /* "cephfs.pyx":1212
15855 * with nogil:
15856 * ret = ceph_readlink(self.cluster, _path, buf, _size)
15857 * if ret < 0: # <<<<<<<<<<<<<<
15858 * raise make_ex(ret, "error in readlink")
15859 * return buf
15860 */
15861 }
15862
15863 /* "cephfs.pyx":1214
15864 * if ret < 0:
15865 * raise make_ex(ret, "error in readlink")
15866 * return buf # <<<<<<<<<<<<<<
15867 * finally:
15868 * free(buf)
15869 */
15870 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
15871 __pyx_t_1 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_buf); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__15871; goto __pyx_L4_error;}
15872 __Pyx_GOTREF(__pyx_t_1);
15873 __pyx_r = __pyx_t_1;
15874 __pyx_t_1 = 0;
15875 goto __pyx_L3_return;
15876 }
15877
15878 /* "cephfs.pyx":1216
15879 * return buf
15880 * finally:
15881 * free(buf) # <<<<<<<<<<<<<<
15882 *
15883 * def unlink(self, path):
15884 */
15885 /*finally:*/ {
15886 /*exception exit:*/{
15887 __pyx_L4_error:;
15888 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
15889 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
15890 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
15891 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
15892 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
15893 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
15894 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_13, &
__pyx_t_14, &__pyx_t_15) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
15895 __Pyx_XGOTREF(__pyx_t_13);
15896 __Pyx_XGOTREF(__pyx_t_14);
15897 __Pyx_XGOTREF(__pyx_t_15);
15898 __Pyx_XGOTREF(__pyx_t_16);
15899 __Pyx_XGOTREF(__pyx_t_17);
15900 __Pyx_XGOTREF(__pyx_t_18);
15901 __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
15902 {
15903 free(__pyx_v_buf);
15904 }
15905 if (PY_MAJOR_VERSION2 >= 3) {
15906 __Pyx_XGIVEREF(__pyx_t_16);
15907 __Pyx_XGIVEREF(__pyx_t_17);
15908 __Pyx_XGIVEREF(__pyx_t_18);
15909 __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
15910 }
15911 __Pyx_XGIVEREF(__pyx_t_13);
15912 __Pyx_XGIVEREF(__pyx_t_14);
15913 __Pyx_XGIVEREF(__pyx_t_15);
15914 __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
15915 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
15916 __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
15917 goto __pyx_L1_error;
15918 }
15919 __pyx_L3_return: {
15920 __pyx_t_18 = __pyx_r;
15921 __pyx_r = 0;
15922 free(__pyx_v_buf);
15923 __pyx_r = __pyx_t_18;
15924 __pyx_t_18 = 0;
15925 goto __pyx_L0;
15926 }
15927 }
15928
15929 /* "cephfs.pyx":1192
15930 * raise make_ex(ret, "error in link")
15931 *
15932 * def readlink(self, path, size): # <<<<<<<<<<<<<<
15933 * """
15934 * Read a symbolic link.
15935 */
15936
15937 /* function exit code */
15938 __pyx_L1_error:;
15939 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
15940 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
15941 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
15942 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
15943 __Pyx_AddTraceback("cephfs.LibCephFS.readlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
15944 __pyx_r = NULL((void*)0);
15945 __pyx_L0:;
15946 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
15947 __Pyx_XGIVEREF(__pyx_r);
15948 __Pyx_RefNannyFinishContext();
15949 return __pyx_r;
15950}
15951
15952/* "cephfs.pyx":1218
15953 * free(buf)
15954 *
15955 * def unlink(self, path): # <<<<<<<<<<<<<<
15956 * """
15957 * Removes a file, link, or symbolic link. If the file/link has multiple links to it, the
15958 */
15959
15960/* Python wrapper */
15961static PyObject *__pyx_pw_6cephfs_9LibCephFS_85unlink(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
15962static char __pyx_doc_6cephfs_9LibCephFS_84unlink[] = "\n Removes a file, link, or symbolic link. If the file/link has multiple links to it, the\n file will not disappear from the namespace until all references to it are removed.\n \n :param path: the path of the file or link to unlink.\n ";
15963static PyObject *__pyx_pw_6cephfs_9LibCephFS_85unlink(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
15964 PyObject *__pyx_r = 0;
15965 __Pyx_RefNannyDeclarations
15966 __Pyx_RefNannySetupContext("unlink (wrapper)", 0);
15967 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_84unlink(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_path));
15968
15969 /* function exit code */
15970 __Pyx_RefNannyFinishContext();
15971 return __pyx_r;
15972}
15973
15974static PyObject *__pyx_pf_6cephfs_9LibCephFS_84unlink(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_path) {
15975 char *__pyx_v__path;
15976 int __pyx_v_ret;
15977 PyObject *__pyx_r = NULL((void*)0);
15978 __Pyx_RefNannyDeclarations
15979 PyObject *__pyx_t_1 = NULL((void*)0);
15980 PyObject *__pyx_t_2 = NULL((void*)0);
15981 PyObject *__pyx_t_3 = NULL((void*)0);
15982 Py_ssize_t __pyx_t_4;
15983 PyObject *__pyx_t_5 = NULL((void*)0);
15984 char *__pyx_t_6;
15985 int __pyx_t_7;
15986 PyObject *__pyx_t_8 = NULL((void*)0);
15987 PyObject *__pyx_t_9 = NULL((void*)0);
15988 int __pyx_lineno = 0;
15989 const char *__pyx_filename = NULL((void*)0);
15990 int __pyx_clineno = 0;
15991 __Pyx_RefNannySetupContext("unlink", 0);
15992 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
15993
15994 /* "cephfs.pyx":1225
15995 * :param path: the path of the file or link to unlink.
15996 * """
15997 * self.require_state("mounted") # <<<<<<<<<<<<<<
15998 * path = cstr(path, 'path')
15999 * cdef char* _path = path
16000 */
16001 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__16001; goto __pyx_L1_error;}
16002 __Pyx_GOTREF(__pyx_t_1);
16003 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__65, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__16003; goto __pyx_L1_error;}
16004 __Pyx_GOTREF(__pyx_t_2);
16005 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16006 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16007
16008 /* "cephfs.pyx":1226
16009 * """
16010 * self.require_state("mounted")
16011 * path = cstr(path, 'path') # <<<<<<<<<<<<<<
16012 * cdef char* _path = path
16013 * with nogil:
16014 */
16015 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__16015; goto __pyx_L1_error;}
16016 __Pyx_GOTREF(__pyx_t_1);
16017 __pyx_t_3 = NULL((void*)0);
16018 __pyx_t_4 = 0;
16019 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
16020 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
16021 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
16022 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
16023 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
16024 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16025 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16026 __pyx_t_4 = 1;
16027 }
16028 }
16029 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__16029; goto __pyx_L1_error;}
16030 __Pyx_GOTREF(__pyx_t_5);
16031 if (__pyx_t_3) {
16032 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
16033 }
16034 __Pyx_INCREF(__pyx_v_path)( ((PyObject*)(__pyx_v_path))->ob_refcnt++);
16035 __Pyx_GIVEREF(__pyx_v_path);
16036 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_path
)
;
16037 __Pyx_INCREF(__pyx_n_s_path)( ((PyObject*)(__pyx_n_s_path))->ob_refcnt++);
16038 __Pyx_GIVEREF(__pyx_n_s_path);
16039 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_path)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_path
)
;
16040 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__16040; goto __pyx_L1_error;}
16041 __Pyx_GOTREF(__pyx_t_2);
16042 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16043 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16044 __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_path; __pyx_v_path =
__pyx_t_2; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
16045 __pyx_t_2 = 0;
16046
16047 /* "cephfs.pyx":1227
16048 * self.require_state("mounted")
16049 * path = cstr(path, 'path')
16050 * cdef char* _path = path # <<<<<<<<<<<<<<
16051 * with nogil:
16052 * ret = ceph_unlink(self.cluster, _path)
16053 */
16054 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__16054; goto __pyx_L1_error;}
16055 __pyx_v__path = __pyx_t_6;
16056
16057 /* "cephfs.pyx":1228
16058 * path = cstr(path, 'path')
16059 * cdef char* _path = path
16060 * with nogil: # <<<<<<<<<<<<<<
16061 * ret = ceph_unlink(self.cluster, _path)
16062 * if ret < 0:
16063 */
16064 {
16065 #ifdef WITH_THREAD1
16066 PyThreadState *_save;
16067 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
16068 #endif
16069 /*try:*/ {
16070
16071 /* "cephfs.pyx":1229
16072 * cdef char* _path = path
16073 * with nogil:
16074 * ret = ceph_unlink(self.cluster, _path) # <<<<<<<<<<<<<<
16075 * if ret < 0:
16076 * raise make_ex(ret, "error in unlink: {}".format(path.decode('utf-8')))
16077 */
16078 __pyx_v_ret = ceph_unlink(__pyx_v_self->cluster, __pyx_v__path);
16079 }
16080
16081 /* "cephfs.pyx":1228
16082 * path = cstr(path, 'path')
16083 * cdef char* _path = path
16084 * with nogil: # <<<<<<<<<<<<<<
16085 * ret = ceph_unlink(self.cluster, _path)
16086 * if ret < 0:
16087 */
16088 /*finally:*/ {
16089 /*normal exit:*/{
16090 #ifdef WITH_THREAD1
16091 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
16092 #endif
16093 goto __pyx_L5;
16094 }
16095 __pyx_L5:;
16096 }
16097 }
16098
16099 /* "cephfs.pyx":1230
16100 * with nogil:
16101 * ret = ceph_unlink(self.cluster, _path)
16102 * if ret < 0: # <<<<<<<<<<<<<<
16103 * raise make_ex(ret, "error in unlink: {}".format(path.decode('utf-8')))
16104 *
16105 */
16106 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
16107 if (__pyx_t_7) {
16108
16109 /* "cephfs.pyx":1231
16110 * ret = ceph_unlink(self.cluster, _path)
16111 * if ret < 0:
16112 * raise make_ex(ret, "error in unlink: {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
16113 *
16114 * def rename(self, src, dst):
16115 */
16116 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__16116; goto __pyx_L1_error;}
16117 __Pyx_GOTREF(__pyx_t_2);
16118 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_error_in_unlink, __pyx_n_s_format); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__16118; goto __pyx_L1_error;}
16119 __Pyx_GOTREF(__pyx_t_5);
16120 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__16120; goto __pyx_L1_error;}
16121 __Pyx_GOTREF(__pyx_t_3);
16122 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__66, NULL((void*)0)); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__16122; goto __pyx_L1_error;}
16123 __Pyx_GOTREF(__pyx_t_8);
16124 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
16125 __pyx_t_3 = NULL((void*)0);
16126 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
16127 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
16128 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
16129 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
16130 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
16131 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16132 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16133 }
16134 }
16135 if (!__pyx_t_3) {
16136 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__16136; goto __pyx_L1_error;}
16137 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
16138 __Pyx_GOTREF(__pyx_t_1);
16139 } else {
16140 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__16140; goto __pyx_L1_error;}
16141 __Pyx_GOTREF(__pyx_t_9);
16142 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
16143 __Pyx_GIVEREF(__pyx_t_8);
16144 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_8);
16145 __pyx_t_8 = 0;
16146 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__16146; goto __pyx_L1_error;}
16147 __Pyx_GOTREF(__pyx_t_1);
16148 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
16149 }
16150 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16151 __pyx_t_5 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__16151; goto __pyx_L1_error;}
16152 __Pyx_GOTREF(__pyx_t_5);
16153 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16154 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16155 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
16156 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16157 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__16157; goto __pyx_L1_error;}
16158
16159 /* "cephfs.pyx":1230
16160 * with nogil:
16161 * ret = ceph_unlink(self.cluster, _path)
16162 * if ret < 0: # <<<<<<<<<<<<<<
16163 * raise make_ex(ret, "error in unlink: {}".format(path.decode('utf-8')))
16164 *
16165 */
16166 }
16167
16168 /* "cephfs.pyx":1218
16169 * free(buf)
16170 *
16171 * def unlink(self, path): # <<<<<<<<<<<<<<
16172 * """
16173 * Removes a file, link, or symbolic link. If the file/link has multiple links to it, the
16174 */
16175
16176 /* function exit code */
16177 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
16178 goto __pyx_L0;
16179 __pyx_L1_error:;
16180 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
16181 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
16182 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
16183 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
16184 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
16185 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
16186 __Pyx_AddTraceback("cephfs.LibCephFS.unlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
16187 __pyx_r = NULL((void*)0);
16188 __pyx_L0:;
16189 __Pyx_XDECREF(__pyx_v_path)do { if ((__pyx_v_path) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_path))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_path)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_path)))); } while (0); } while
(0)
;
16190 __Pyx_XGIVEREF(__pyx_r);
16191 __Pyx_RefNannyFinishContext();
16192 return __pyx_r;
16193}
16194
16195/* "cephfs.pyx":1233
16196 * raise make_ex(ret, "error in unlink: {}".format(path.decode('utf-8')))
16197 *
16198 * def rename(self, src, dst): # <<<<<<<<<<<<<<
16199 * """
16200 * Rename a file or directory.
16201 */
16202
16203/* Python wrapper */
16204static PyObject *__pyx_pw_6cephfs_9LibCephFS_87rename(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16205static char __pyx_doc_6cephfs_9LibCephFS_86rename[] = "\n Rename a file or directory.\n \n :param src: the path to the existing file or directory.\n :param dst: the new name of the file or directory.\n ";
16206static PyObject *__pyx_pw_6cephfs_9LibCephFS_87rename(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16207 PyObject *__pyx_v_src = 0;
16208 PyObject *__pyx_v_dst = 0;
16209 int __pyx_lineno = 0;
16210 const char *__pyx_filename = NULL((void*)0);
16211 int __pyx_clineno = 0;
16212 PyObject *__pyx_r = 0;
16213 __Pyx_RefNannyDeclarations
16214 __Pyx_RefNannySetupContext("rename (wrapper)", 0);
16215 {
16216 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_src,&__pyx_n_s_dst,0};
16217 PyObject* values[2] = {0,0};
16218 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
16219 Py_ssize_t kw_args;
16220 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
16221 switch (pos_args) {
16222 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
16223 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
16224 case 0: break;
16225 default: goto __pyx_L5_argtuple_error;
16226 }
16227 kw_args = PyDict_Size(__pyx_kwds);
16228 switch (pos_args) {
16229 case 0:
16230 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_src)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_src
)) != 0), 1)
) kw_args--;
16231 else goto __pyx_L5_argtuple_error;
16232 case 1:
16233 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dst)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dst
)) != 0), 1)
) kw_args--;
16234 else {
16235 __Pyx_RaiseArgtupleInvalid("rename", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__16235; goto __pyx_L3_error;}
16236 }
16237 }
16238 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
16239 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rename") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "rename") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__16239; goto __pyx_L3_error;}
16240 }
16241 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
16242 goto __pyx_L5_argtuple_error;
16243 } else {
16244 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
16245 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
16246 }
16247 __pyx_v_src = values[0];
16248 __pyx_v_dst = values[1];
16249 }
16250 goto __pyx_L4_argument_unpacking_done;
16251 __pyx_L5_argtuple_error:;
16252 __Pyx_RaiseArgtupleInvalid("rename", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__16252; goto __pyx_L3_error;}
16253 __pyx_L3_error:;
16254 __Pyx_AddTraceback("cephfs.LibCephFS.rename", __pyx_clineno, __pyx_lineno, __pyx_filename);
16255 __Pyx_RefNannyFinishContext();
16256 return NULL((void*)0);
16257 __pyx_L4_argument_unpacking_done:;
16258 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_86rename(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_src, __pyx_v_dst);
16259
16260 /* function exit code */
16261 __Pyx_RefNannyFinishContext();
16262 return __pyx_r;
16263}
16264
16265static PyObject *__pyx_pf_6cephfs_9LibCephFS_86rename(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_src, PyObject *__pyx_v_dst) {
16266 char *__pyx_v__src;
16267 char *__pyx_v__dst;
16268 int __pyx_v_ret;
16269 PyObject *__pyx_r = NULL((void*)0);
16270 __Pyx_RefNannyDeclarations
16271 PyObject *__pyx_t_1 = NULL((void*)0);
16272 PyObject *__pyx_t_2 = NULL((void*)0);
16273 PyObject *__pyx_t_3 = NULL((void*)0);
16274 Py_ssize_t __pyx_t_4;
16275 PyObject *__pyx_t_5 = NULL((void*)0);
16276 char *__pyx_t_6;
16277 int __pyx_t_7;
16278 PyObject *__pyx_t_8 = NULL((void*)0);
16279 PyObject *__pyx_t_9 = NULL((void*)0);
16280 PyObject *__pyx_t_10 = NULL((void*)0);
16281 int __pyx_lineno = 0;
16282 const char *__pyx_filename = NULL((void*)0);
16283 int __pyx_clineno = 0;
16284 __Pyx_RefNannySetupContext("rename", 0);
16285 __Pyx_INCREF(__pyx_v_src)( ((PyObject*)(__pyx_v_src))->ob_refcnt++);
16286 __Pyx_INCREF(__pyx_v_dst)( ((PyObject*)(__pyx_v_dst))->ob_refcnt++);
16287
16288 /* "cephfs.pyx":1241
16289 * """
16290 *
16291 * self.require_state("mounted") # <<<<<<<<<<<<<<
16292 *
16293 * src = cstr(src, 'source')
16294 */
16295 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__16295; goto __pyx_L1_error;}
16296 __Pyx_GOTREF(__pyx_t_1);
16297 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__67, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__16297; goto __pyx_L1_error;}
16298 __Pyx_GOTREF(__pyx_t_2);
16299 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16300 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16301
16302 /* "cephfs.pyx":1243
16303 * self.require_state("mounted")
16304 *
16305 * src = cstr(src, 'source') # <<<<<<<<<<<<<<
16306 * dst = cstr(dst, 'destination')
16307 *
16308 */
16309 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__16309; goto __pyx_L1_error;}
16310 __Pyx_GOTREF(__pyx_t_1);
16311 __pyx_t_3 = NULL((void*)0);
16312 __pyx_t_4 = 0;
16313 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
16314 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
16315 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
16316 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
16317 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
16318 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16319 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16320 __pyx_t_4 = 1;
16321 }
16322 }
16323 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__16323; goto __pyx_L1_error;}
16324 __Pyx_GOTREF(__pyx_t_5);
16325 if (__pyx_t_3) {
16326 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
16327 }
16328 __Pyx_INCREF(__pyx_v_src)( ((PyObject*)(__pyx_v_src))->ob_refcnt++);
16329 __Pyx_GIVEREF(__pyx_v_src);
16330 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_src)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_src
)
;
16331 __Pyx_INCREF(__pyx_n_s_source)( ((PyObject*)(__pyx_n_s_source))->ob_refcnt++);
16332 __Pyx_GIVEREF(__pyx_n_s_source);
16333 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_source)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_source
)
;
16334 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__16334; goto __pyx_L1_error;}
16335 __Pyx_GOTREF(__pyx_t_2);
16336 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16337 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16338 __Pyx_DECREF_SET(__pyx_v_src, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_src; __pyx_v_src = __pyx_t_2
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16339 __pyx_t_2 = 0;
16340
16341 /* "cephfs.pyx":1244
16342 *
16343 * src = cstr(src, 'source')
16344 * dst = cstr(dst, 'destination') # <<<<<<<<<<<<<<
16345 *
16346 * cdef:
16347 */
16348 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__16348; goto __pyx_L1_error;}
16349 __Pyx_GOTREF(__pyx_t_1);
16350 __pyx_t_5 = NULL((void*)0);
16351 __pyx_t_4 = 0;
16352 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
16353 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
16354 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
16355 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
16356 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
16357 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16358 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16359 __pyx_t_4 = 1;
16360 }
16361 }
16362 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__16362; goto __pyx_L1_error;}
16363 __Pyx_GOTREF(__pyx_t_3);
16364 if (__pyx_t_5) {
16365 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
16366 }
16367 __Pyx_INCREF(__pyx_v_dst)( ((PyObject*)(__pyx_v_dst))->ob_refcnt++);
16368 __Pyx_GIVEREF(__pyx_v_dst);
16369 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_dst)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_dst
)
;
16370 __Pyx_INCREF(__pyx_n_s_destination)( ((PyObject*)(__pyx_n_s_destination))->ob_refcnt++);
16371 __Pyx_GIVEREF(__pyx_n_s_destination);
16372 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_destination)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_destination
)
;
16373 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__16373; goto __pyx_L1_error;}
16374 __Pyx_GOTREF(__pyx_t_2);
16375 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
16376 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16377 __Pyx_DECREF_SET(__pyx_v_dst, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_dst; __pyx_v_dst = __pyx_t_2
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16378 __pyx_t_2 = 0;
16379
16380 /* "cephfs.pyx":1247
16381 *
16382 * cdef:
16383 * char* _src = src # <<<<<<<<<<<<<<
16384 * char* _dst = dst
16385 *
16386 */
16387 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_src); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__16387; goto __pyx_L1_error;}
16388 __pyx_v__src = __pyx_t_6;
16389
16390 /* "cephfs.pyx":1248
16391 * cdef:
16392 * char* _src = src
16393 * char* _dst = dst # <<<<<<<<<<<<<<
16394 *
16395 * with nogil:
16396 */
16397 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_dst); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__16397; goto __pyx_L1_error;}
16398 __pyx_v__dst = __pyx_t_6;
16399
16400 /* "cephfs.pyx":1250
16401 * char* _dst = dst
16402 *
16403 * with nogil: # <<<<<<<<<<<<<<
16404 * ret = ceph_rename(self.cluster, _src, _dst)
16405 * if ret < 0:
16406 */
16407 {
16408 #ifdef WITH_THREAD1
16409 PyThreadState *_save;
16410 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
16411 #endif
16412 /*try:*/ {
16413
16414 /* "cephfs.pyx":1251
16415 *
16416 * with nogil:
16417 * ret = ceph_rename(self.cluster, _src, _dst) # <<<<<<<<<<<<<<
16418 * if ret < 0:
16419 * raise make_ex(ret, "error in rename {} to {}".format(src.decode(
16420 */
16421 __pyx_v_ret = ceph_rename(__pyx_v_self->cluster, __pyx_v__src, __pyx_v__dst);
16422 }
16423
16424 /* "cephfs.pyx":1250
16425 * char* _dst = dst
16426 *
16427 * with nogil: # <<<<<<<<<<<<<<
16428 * ret = ceph_rename(self.cluster, _src, _dst)
16429 * if ret < 0:
16430 */
16431 /*finally:*/ {
16432 /*normal exit:*/{
16433 #ifdef WITH_THREAD1
16434 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
16435 #endif
16436 goto __pyx_L5;
16437 }
16438 __pyx_L5:;
16439 }
16440 }
16441
16442 /* "cephfs.pyx":1252
16443 * with nogil:
16444 * ret = ceph_rename(self.cluster, _src, _dst)
16445 * if ret < 0: # <<<<<<<<<<<<<<
16446 * raise make_ex(ret, "error in rename {} to {}".format(src.decode(
16447 * 'utf-8'), dst.decode('utf-8')))
16448 */
16449 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
16450 if (__pyx_t_7) {
16451
16452 /* "cephfs.pyx":1253
16453 * ret = ceph_rename(self.cluster, _src, _dst)
16454 * if ret < 0:
16455 * raise make_ex(ret, "error in rename {} to {}".format(src.decode( # <<<<<<<<<<<<<<
16456 * 'utf-8'), dst.decode('utf-8')))
16457 *
16458 */
16459 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__16459; goto __pyx_L1_error;}
16460 __Pyx_GOTREF(__pyx_t_2);
16461 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_error_in_rename_to, __pyx_n_s_format); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__16461; goto __pyx_L1_error;}
16462 __Pyx_GOTREF(__pyx_t_3);
16463 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__16463; goto __pyx_L1_error;}
16464 __Pyx_GOTREF(__pyx_t_5);
16465 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__68, NULL((void*)0)); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__16465; goto __pyx_L1_error;}
16466 __Pyx_GOTREF(__pyx_t_8);
16467 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16468
16469 /* "cephfs.pyx":1254
16470 * if ret < 0:
16471 * raise make_ex(ret, "error in rename {} to {}".format(src.decode(
16472 * 'utf-8'), dst.decode('utf-8'))) # <<<<<<<<<<<<<<
16473 *
16474 * def mds_command(self, mds_spec, args, input_data):
16475 */
16476 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__16476; goto __pyx_L1_error;}
16477 __Pyx_GOTREF(__pyx_t_5);
16478 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__69, NULL((void*)0)); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__16478; goto __pyx_L1_error;}
16479 __Pyx_GOTREF(__pyx_t_9);
16480 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16481 __pyx_t_5 = NULL((void*)0);
16482 __pyx_t_4 = 0;
16483 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
16484 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
16485 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
16486 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
16487 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
16488 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16489 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16490 __pyx_t_4 = 1;
16491 }
16492 }
16493 __pyx_t_10 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__16493; goto __pyx_L1_error;}
16494 __Pyx_GOTREF(__pyx_t_10);
16495 if (__pyx_t_5) {
16496 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
16497 }
16498 __Pyx_GIVEREF(__pyx_t_8);
16499 PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_4, __pyx_t_8)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+__pyx_t_4] = __pyx_t_8
)
;
16500 __Pyx_GIVEREF(__pyx_t_9);
16501 PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_4, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[1+__pyx_t_4] = __pyx_t_9
)
;
16502 __pyx_t_8 = 0;
16503 __pyx_t_9 = 0;
16504 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__16504; goto __pyx_L1_error;}
16505 __Pyx_GOTREF(__pyx_t_1);
16506 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
16507 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
16508
16509 /* "cephfs.pyx":1253
16510 * ret = ceph_rename(self.cluster, _src, _dst)
16511 * if ret < 0:
16512 * raise make_ex(ret, "error in rename {} to {}".format(src.decode( # <<<<<<<<<<<<<<
16513 * 'utf-8'), dst.decode('utf-8')))
16514 *
16515 */
16516 __pyx_t_3 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__16516; goto __pyx_L1_error;}
16517 __Pyx_GOTREF(__pyx_t_3);
16518 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16519 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16520 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
16521 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
16522 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__16522; goto __pyx_L1_error;}
16523
16524 /* "cephfs.pyx":1252
16525 * with nogil:
16526 * ret = ceph_rename(self.cluster, _src, _dst)
16527 * if ret < 0: # <<<<<<<<<<<<<<
16528 * raise make_ex(ret, "error in rename {} to {}".format(src.decode(
16529 * 'utf-8'), dst.decode('utf-8')))
16530 */
16531 }
16532
16533 /* "cephfs.pyx":1233
16534 * raise make_ex(ret, "error in unlink: {}".format(path.decode('utf-8')))
16535 *
16536 * def rename(self, src, dst): # <<<<<<<<<<<<<<
16537 * """
16538 * Rename a file or directory.
16539 */
16540
16541 /* function exit code */
16542 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
16543 goto __pyx_L0;
16544 __pyx_L1_error:;
16545 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
16546 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
16547 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
16548 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
16549 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
16550 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
16551 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
16552 __Pyx_AddTraceback("cephfs.LibCephFS.rename", __pyx_clineno, __pyx_lineno, __pyx_filename);
16553 __pyx_r = NULL((void*)0);
16554 __pyx_L0:;
16555 __Pyx_XDECREF(__pyx_v_src)do { if ((__pyx_v_src) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_src))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_src)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_src)))); } while (0); } while (0)
;
16556 __Pyx_XDECREF(__pyx_v_dst)do { if ((__pyx_v_dst) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_dst))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_dst)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_dst)))); } while (0); } while (0)
;
16557 __Pyx_XGIVEREF(__pyx_r);
16558 __Pyx_RefNannyFinishContext();
16559 return __pyx_r;
16560}
16561
16562/* "cephfs.pyx":1256
16563 * 'utf-8'), dst.decode('utf-8')))
16564 *
16565 * def mds_command(self, mds_spec, args, input_data): # <<<<<<<<<<<<<<
16566 * """
16567 * :return 3-tuple of output status int, output status string, output data
16568 */
16569
16570/* Python wrapper */
16571static PyObject *__pyx_pw_6cephfs_9LibCephFS_89mds_command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16572static char __pyx_doc_6cephfs_9LibCephFS_88mds_command[] = "\n :return 3-tuple of output status int, output status string, output data\n ";
16573static PyObject *__pyx_pw_6cephfs_9LibCephFS_89mds_command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16574 PyObject *__pyx_v_mds_spec = 0;
16575 PyObject *__pyx_v_args = 0;
16576 PyObject *__pyx_v_input_data = 0;
16577 int __pyx_lineno = 0;
16578 const char *__pyx_filename = NULL((void*)0);
16579 int __pyx_clineno = 0;
16580 PyObject *__pyx_r = 0;
16581 __Pyx_RefNannyDeclarations
16582 __Pyx_RefNannySetupContext("mds_command (wrapper)", 0);
16583 {
16584 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mds_spec,&__pyx_n_s_args,&__pyx_n_s_input_data,0};
16585 PyObject* values[3] = {0,0,0};
16586 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
16587 Py_ssize_t kw_args;
16588 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
16589 switch (pos_args) {
16590 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
16591 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
16592 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
16593 case 0: break;
16594 default: goto __pyx_L5_argtuple_error;
16595 }
16596 kw_args = PyDict_Size(__pyx_kwds);
16597 switch (pos_args) {
16598 case 0:
16599 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mds_spec)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mds_spec
)) != 0), 1)
) kw_args--;
16600 else goto __pyx_L5_argtuple_error;
16601 case 1:
16602 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args
)) != 0), 1)
) kw_args--;
16603 else {
16604 __Pyx_RaiseArgtupleInvalid("mds_command", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__16604; goto __pyx_L3_error;}
16605 }
16606 case 2:
16607 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input_data)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input_data
)) != 0), 1)
) kw_args--;
16608 else {
16609 __Pyx_RaiseArgtupleInvalid("mds_command", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__16609; goto __pyx_L3_error;}
16610 }
16611 }
16612 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
16613 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mds_command") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mds_command") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__16613; goto __pyx_L3_error;}
16614 }
16615 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
16616 goto __pyx_L5_argtuple_error;
16617 } else {
16618 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
16619 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
16620 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
16621 }
16622 __pyx_v_mds_spec = values[0];
16623 __pyx_v_args = values[1];
16624 __pyx_v_input_data = values[2];
16625 }
16626 goto __pyx_L4_argument_unpacking_done;
16627 __pyx_L5_argtuple_error:;
16628 __Pyx_RaiseArgtupleInvalid("mds_command", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__16628; goto __pyx_L3_error;}
16629 __pyx_L3_error:;
16630 __Pyx_AddTraceback("cephfs.LibCephFS.mds_command", __pyx_clineno, __pyx_lineno, __pyx_filename);
16631 __Pyx_RefNannyFinishContext();
16632 return NULL((void*)0);
16633 __pyx_L4_argument_unpacking_done:;
16634 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_88mds_command(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_mds_spec, __pyx_v_args, __pyx_v_input_data);
16635
16636 /* function exit code */
16637 __Pyx_RefNannyFinishContext();
16638 return __pyx_r;
16639}
16640
16641static PyObject *__pyx_pf_6cephfs_9LibCephFS_88mds_command(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_mds_spec, PyObject *__pyx_v_args, PyObject *__pyx_v_input_data) {
16642 char *__pyx_v__mds_spec;
16643 char **__pyx_v__cmd;
16644 size_t __pyx_v__cmdlen;
16645 char *__pyx_v__inbuf;
16646 size_t __pyx_v__inbuf_len;
16647 char *__pyx_v__outbuf;
16648 size_t __pyx_v__outbuf_len;
16649 char *__pyx_v__outs;
16650 size_t __pyx_v__outs_len;
16651 int __pyx_v_ret;
16652 PyObject *__pyx_v_my_outs = NULL((void*)0);
16653 PyObject *__pyx_v_my_outbuf = NULL((void*)0);
16654 PyObject *__pyx_r = NULL((void*)0);
16655 __Pyx_RefNannyDeclarations
16656 PyObject *__pyx_t_1 = NULL((void*)0);
16657 PyObject *__pyx_t_2 = NULL((void*)0);
16658 PyObject *__pyx_t_3 = NULL((void*)0);
16659 Py_ssize_t __pyx_t_4;
16660 PyObject *__pyx_t_5 = NULL((void*)0);
16661 char *__pyx_t_6;
16662 PyObject *__pyx_t_7 = NULL((void*)0);
16663 int __pyx_t_8;
16664 int __pyx_t_9;
16665 int __pyx_t_10;
16666 char const *__pyx_t_11;
16667 PyObject *__pyx_t_12 = NULL((void*)0);
16668 PyObject *__pyx_t_13 = NULL((void*)0);
16669 PyObject *__pyx_t_14 = NULL((void*)0);
16670 PyObject *__pyx_t_15 = NULL((void*)0);
16671 PyObject *__pyx_t_16 = NULL((void*)0);
16672 PyObject *__pyx_t_17 = NULL((void*)0);
16673 int __pyx_lineno = 0;
16674 const char *__pyx_filename = NULL((void*)0);
16675 int __pyx_clineno = 0;
16676 __Pyx_RefNannySetupContext("mds_command", 0);
16677 __Pyx_INCREF(__pyx_v_mds_spec)( ((PyObject*)(__pyx_v_mds_spec))->ob_refcnt++);
16678 __Pyx_INCREF(__pyx_v_args)( ((PyObject*)(__pyx_v_args))->ob_refcnt++);
16679 __Pyx_INCREF(__pyx_v_input_data)( ((PyObject*)(__pyx_v_input_data))->ob_refcnt++);
16680
16681 /* "cephfs.pyx":1260
16682 * :return 3-tuple of output status int, output status string, output data
16683 * """
16684 * mds_spec = cstr(mds_spec, 'mds_spec') # <<<<<<<<<<<<<<
16685 * args = cstr_list(args, 'args')
16686 * input_data = cstr(input_data, 'input_data')
16687 */
16688 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__16688; goto __pyx_L1_error;}
16689 __Pyx_GOTREF(__pyx_t_2);
16690 __pyx_t_3 = NULL((void*)0);
16691 __pyx_t_4 = 0;
16692 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
16693 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
16694 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
16695 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
16696 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
16697 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16698 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16699 __pyx_t_4 = 1;
16700 }
16701 }
16702 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__16702; goto __pyx_L1_error;}
16703 __Pyx_GOTREF(__pyx_t_5);
16704 if (__pyx_t_3) {
16705 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
16706 }
16707 __Pyx_INCREF(__pyx_v_mds_spec)( ((PyObject*)(__pyx_v_mds_spec))->ob_refcnt++);
16708 __Pyx_GIVEREF(__pyx_v_mds_spec);
16709 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_mds_spec)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_mds_spec
)
;
16710 __Pyx_INCREF(__pyx_n_s_mds_spec)( ((PyObject*)(__pyx_n_s_mds_spec))->ob_refcnt++);
16711 __Pyx_GIVEREF(__pyx_n_s_mds_spec);
16712 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_mds_spec)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_mds_spec
)
;
16713 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__16713; goto __pyx_L1_error;}
16714 __Pyx_GOTREF(__pyx_t_1);
16715 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16716 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16717 __Pyx_DECREF_SET(__pyx_v_mds_spec, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_mds_spec; __pyx_v_mds_spec
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
16718 __pyx_t_1 = 0;
16719
16720 /* "cephfs.pyx":1261
16721 * """
16722 * mds_spec = cstr(mds_spec, 'mds_spec')
16723 * args = cstr_list(args, 'args') # <<<<<<<<<<<<<<
16724 * input_data = cstr(input_data, 'input_data')
16725 *
16726 */
16727 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr_list); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__16727; goto __pyx_L1_error;}
16728 __Pyx_GOTREF(__pyx_t_2);
16729 __pyx_t_5 = NULL((void*)0);
16730 __pyx_t_4 = 0;
16731 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
16732 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
16733 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
16734 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
16735 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
16736 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16737 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16738 __pyx_t_4 = 1;
16739 }
16740 }
16741 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__16741; goto __pyx_L1_error;}
16742 __Pyx_GOTREF(__pyx_t_3);
16743 if (__pyx_t_5) {
16744 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
16745 }
16746 __Pyx_INCREF(__pyx_v_args)( ((PyObject*)(__pyx_v_args))->ob_refcnt++);
16747 __Pyx_GIVEREF(__pyx_v_args);
16748 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_args)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_args
)
;
16749 __Pyx_INCREF(__pyx_n_s_args)( ((PyObject*)(__pyx_n_s_args))->ob_refcnt++);
16750 __Pyx_GIVEREF(__pyx_n_s_args);
16751 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_args)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_args
)
;
16752 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__16752; goto __pyx_L1_error;}
16753 __Pyx_GOTREF(__pyx_t_1);
16754 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
16755 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16756 __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_args; __pyx_v_args =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
16757 __pyx_t_1 = 0;
16758
16759 /* "cephfs.pyx":1262
16760 * mds_spec = cstr(mds_spec, 'mds_spec')
16761 * args = cstr_list(args, 'args')
16762 * input_data = cstr(input_data, 'input_data') # <<<<<<<<<<<<<<
16763 *
16764 * cdef:
16765 */
16766 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__16766; goto __pyx_L1_error;}
16767 __Pyx_GOTREF(__pyx_t_2);
16768 __pyx_t_3 = NULL((void*)0);
16769 __pyx_t_4 = 0;
16770 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
16771 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
16772 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
16773 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
16774 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
16775 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16776 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16777 __pyx_t_4 = 1;
16778 }
16779 }
16780 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__16780; goto __pyx_L1_error;}
16781 __Pyx_GOTREF(__pyx_t_5);
16782 if (__pyx_t_3) {
16783 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
16784 }
16785 __Pyx_INCREF(__pyx_v_input_data)( ((PyObject*)(__pyx_v_input_data))->ob_refcnt++);
16786 __Pyx_GIVEREF(__pyx_v_input_data);
16787 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_input_data)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_input_data
)
;
16788 __Pyx_INCREF(__pyx_n_s_input_data)( ((PyObject*)(__pyx_n_s_input_data))->ob_refcnt++);
16789 __Pyx_GIVEREF(__pyx_n_s_input_data);
16790 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_input_data)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_input_data
)
;
16791 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__16791; goto __pyx_L1_error;}
16792 __Pyx_GOTREF(__pyx_t_1);
16793 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16794 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16795 __Pyx_DECREF_SET(__pyx_v_input_data, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_input_data; __pyx_v_input_data
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
16796 __pyx_t_1 = 0;
16797
16798 /* "cephfs.pyx":1265
16799 *
16800 * cdef:
16801 * char *_mds_spec = opt_str(mds_spec) # <<<<<<<<<<<<<<
16802 * char **_cmd = to_bytes_array(args)
16803 * size_t _cmdlen = len(args)
16804 */
16805 __pyx_t_6 = __pyx_f_6cephfs_opt_str(__pyx_v_mds_spec); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__16805; goto __pyx_L1_error;}
16806 __pyx_v__mds_spec = __pyx_t_6;
16807
16808 /* "cephfs.pyx":1266
16809 * cdef:
16810 * char *_mds_spec = opt_str(mds_spec)
16811 * char **_cmd = to_bytes_array(args) # <<<<<<<<<<<<<<
16812 * size_t _cmdlen = len(args)
16813 *
16814 */
16815 __pyx_v__cmd = __pyx_f_6cephfs_to_bytes_array(__pyx_v_args);
16816
16817 /* "cephfs.pyx":1267
16818 * char *_mds_spec = opt_str(mds_spec)
16819 * char **_cmd = to_bytes_array(args)
16820 * size_t _cmdlen = len(args) # <<<<<<<<<<<<<<
16821 *
16822 * char *_inbuf = input_data
16823 */
16824 __pyx_t_4 = PyObject_LengthPyObject_Size(__pyx_v_args); if (unlikely(__pyx_t_4 == -1)__builtin_expect(!!(__pyx_t_4 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__16824; goto __pyx_L1_error;}
16825 __pyx_v__cmdlen = __pyx_t_4;
16826
16827 /* "cephfs.pyx":1269
16828 * size_t _cmdlen = len(args)
16829 *
16830 * char *_inbuf = input_data # <<<<<<<<<<<<<<
16831 * size_t _inbuf_len = len(input_data)
16832 *
16833 */
16834 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_input_data); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__16834; goto __pyx_L1_error;}
16835 __pyx_v__inbuf = __pyx_t_6;
16836
16837 /* "cephfs.pyx":1270
16838 *
16839 * char *_inbuf = input_data
16840 * size_t _inbuf_len = len(input_data) # <<<<<<<<<<<<<<
16841 *
16842 * char *_outbuf = NULL
16843 */
16844 __pyx_t_4 = PyObject_LengthPyObject_Size(__pyx_v_input_data); if (unlikely(__pyx_t_4 == -1)__builtin_expect(!!(__pyx_t_4 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__16844; goto __pyx_L1_error;}
16845 __pyx_v__inbuf_len = __pyx_t_4;
16846
16847 /* "cephfs.pyx":1272
16848 * size_t _inbuf_len = len(input_data)
16849 *
16850 * char *_outbuf = NULL # <<<<<<<<<<<<<<
16851 * size_t _outbuf_len = 0
16852 * char *_outs = NULL
16853 */
16854 __pyx_v__outbuf = NULL((void*)0);
16855
16856 /* "cephfs.pyx":1273
16857 *
16858 * char *_outbuf = NULL
16859 * size_t _outbuf_len = 0 # <<<<<<<<<<<<<<
16860 * char *_outs = NULL
16861 * size_t _outs_len = 0
16862 */
16863 __pyx_v__outbuf_len = 0;
16864
16865 /* "cephfs.pyx":1274
16866 * char *_outbuf = NULL
16867 * size_t _outbuf_len = 0
16868 * char *_outs = NULL # <<<<<<<<<<<<<<
16869 * size_t _outs_len = 0
16870 *
16871 */
16872 __pyx_v__outs = NULL((void*)0);
16873
16874 /* "cephfs.pyx":1275
16875 * size_t _outbuf_len = 0
16876 * char *_outs = NULL
16877 * size_t _outs_len = 0 # <<<<<<<<<<<<<<
16878 *
16879 * try:
16880 */
16881 __pyx_v__outs_len = 0;
16882
16883 /* "cephfs.pyx":1277
16884 * size_t _outs_len = 0
16885 *
16886 * try: # <<<<<<<<<<<<<<
16887 * with nogil:
16888 * ret = ceph_mds_command(self.cluster, _mds_spec,
16889 */
16890 /*try:*/ {
16891
16892 /* "cephfs.pyx":1278
16893 *
16894 * try:
16895 * with nogil: # <<<<<<<<<<<<<<
16896 * ret = ceph_mds_command(self.cluster, _mds_spec,
16897 * <const char **>_cmd, _cmdlen,
16898 */
16899 {
16900 #ifdef WITH_THREAD1
16901 PyThreadState *_save;
16902 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
16903 #endif
16904 /*try:*/ {
16905
16906 /* "cephfs.pyx":1279
16907 * try:
16908 * with nogil:
16909 * ret = ceph_mds_command(self.cluster, _mds_spec, # <<<<<<<<<<<<<<
16910 * <const char **>_cmd, _cmdlen,
16911 * <const char*>_inbuf, _inbuf_len,
16912 */
16913 __pyx_v_ret = ceph_mds_command(__pyx_v_self->cluster, __pyx_v__mds_spec, ((char const **)__pyx_v__cmd), __pyx_v__cmdlen, ((char const *)__pyx_v__inbuf), __pyx_v__inbuf_len, (&__pyx_v__outbuf), (&__pyx_v__outbuf_len), (&__pyx_v__outs), (&__pyx_v__outs_len));
16914 }
16915
16916 /* "cephfs.pyx":1278
16917 *
16918 * try:
16919 * with nogil: # <<<<<<<<<<<<<<
16920 * ret = ceph_mds_command(self.cluster, _mds_spec,
16921 * <const char **>_cmd, _cmdlen,
16922 */
16923 /*finally:*/ {
16924 /*normal exit:*/{
16925 #ifdef WITH_THREAD1
16926 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
16927 #endif
16928 goto __pyx_L8;
16929 }
16930 __pyx_L8:;
16931 }
16932 }
16933
16934 /* "cephfs.pyx":1284
16935 * &_outbuf, &_outbuf_len,
16936 * &_outs, &_outs_len)
16937 * my_outs = decode_cstr(_outs[:_outs_len]) # <<<<<<<<<<<<<<
16938 * my_outbuf = _outbuf[:_outbuf_len]
16939 * if _outs_len:
16940 */
16941 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__16941; goto __pyx_L4_error;}
16942 __Pyx_GOTREF(__pyx_t_2);
16943 __pyx_t_5 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v__outs + 0, __pyx_v__outs_len - 0); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__16943; goto __pyx_L4_error;}
16944 __Pyx_GOTREF(__pyx_t_5);
16945 __pyx_t_3 = NULL((void*)0);
16946 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
16947 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
16948 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
16949 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
16950 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
16951 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16952 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16953 }
16954 }
16955 if (!__pyx_t_3) {
16956 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__16956; goto __pyx_L4_error;}
16957 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16958 __Pyx_GOTREF(__pyx_t_1);
16959 } else {
16960 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__16960; goto __pyx_L4_error;}
16961 __Pyx_GOTREF(__pyx_t_7);
16962 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
16963 __Pyx_GIVEREF(__pyx_t_5);
16964 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_5);
16965 __pyx_t_5 = 0;
16966 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__16966; goto __pyx_L4_error;}
16967 __Pyx_GOTREF(__pyx_t_1);
16968 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
16969 }
16970 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16971 __pyx_v_my_outs = __pyx_t_1;
16972 __pyx_t_1 = 0;
16973
16974 /* "cephfs.pyx":1285
16975 * &_outs, &_outs_len)
16976 * my_outs = decode_cstr(_outs[:_outs_len])
16977 * my_outbuf = _outbuf[:_outbuf_len] # <<<<<<<<<<<<<<
16978 * if _outs_len:
16979 * ceph_buffer_free(_outs)
16980 */
16981 __pyx_t_1 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v__outbuf + 0, __pyx_v__outbuf_len - 0); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__16981; goto __pyx_L4_error;}
16982 __Pyx_GOTREF(__pyx_t_1);
16983 __pyx_v_my_outbuf = ((PyObject*)__pyx_t_1);
16984 __pyx_t_1 = 0;
16985
16986 /* "cephfs.pyx":1286
16987 * my_outs = decode_cstr(_outs[:_outs_len])
16988 * my_outbuf = _outbuf[:_outbuf_len]
16989 * if _outs_len: # <<<<<<<<<<<<<<
16990 * ceph_buffer_free(_outs)
16991 * if _outbuf_len:
16992 */
16993 __pyx_t_8 = (__pyx_v__outs_len != 0);
16994 if (__pyx_t_8) {
16995
16996 /* "cephfs.pyx":1287
16997 * my_outbuf = _outbuf[:_outbuf_len]
16998 * if _outs_len:
16999 * ceph_buffer_free(_outs) # <<<<<<<<<<<<<<
17000 * if _outbuf_len:
17001 * ceph_buffer_free(_outbuf)
17002 */
17003 ceph_buffer_free(__pyx_v__outs);
17004
17005 /* "cephfs.pyx":1286
17006 * my_outs = decode_cstr(_outs[:_outs_len])
17007 * my_outbuf = _outbuf[:_outbuf_len]
17008 * if _outs_len: # <<<<<<<<<<<<<<
17009 * ceph_buffer_free(_outs)
17010 * if _outbuf_len:
17011 */
17012 }
17013
17014 /* "cephfs.pyx":1288
17015 * if _outs_len:
17016 * ceph_buffer_free(_outs)
17017 * if _outbuf_len: # <<<<<<<<<<<<<<
17018 * ceph_buffer_free(_outbuf)
17019 * return (ret, my_outbuf, my_outs)
17020 */
17021 __pyx_t_8 = (__pyx_v__outbuf_len != 0);
17022 if (__pyx_t_8) {
17023
17024 /* "cephfs.pyx":1289
17025 * ceph_buffer_free(_outs)
17026 * if _outbuf_len:
17027 * ceph_buffer_free(_outbuf) # <<<<<<<<<<<<<<
17028 * return (ret, my_outbuf, my_outs)
17029 * finally:
17030 */
17031 ceph_buffer_free(__pyx_v__outbuf);
17032
17033 /* "cephfs.pyx":1288
17034 * if _outs_len:
17035 * ceph_buffer_free(_outs)
17036 * if _outbuf_len: # <<<<<<<<<<<<<<
17037 * ceph_buffer_free(_outbuf)
17038 * return (ret, my_outbuf, my_outs)
17039 */
17040 }
17041
17042 /* "cephfs.pyx":1290
17043 * if _outbuf_len:
17044 * ceph_buffer_free(_outbuf)
17045 * return (ret, my_outbuf, my_outs) # <<<<<<<<<<<<<<
17046 * finally:
17047 * free(_cmd)
17048 */
17049 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
17050 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; __pyx_clineno = __LINE__17050; goto __pyx_L4_error;}
17051 __Pyx_GOTREF(__pyx_t_1);
17052 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; __pyx_clineno = __LINE__17052; goto __pyx_L4_error;}
17053 __Pyx_GOTREF(__pyx_t_2);
17054 __Pyx_GIVEREF(__pyx_t_1);
17055 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1);
17056 __Pyx_INCREF(__pyx_v_my_outbuf)( ((PyObject*)(__pyx_v_my_outbuf))->ob_refcnt++);
17057 __Pyx_GIVEREF(__pyx_v_my_outbuf);
17058 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_my_outbuf)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_v_my_outbuf
)
;
17059 __Pyx_INCREF(__pyx_v_my_outs)( ((PyObject*)(__pyx_v_my_outs))->ob_refcnt++);
17060 __Pyx_GIVEREF(__pyx_v_my_outs);
17061 PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_my_outs)(((PyTupleObject *)(__pyx_t_2))->ob_item[2] = __pyx_v_my_outs
)
;
17062 __pyx_t_1 = 0;
17063 __pyx_r = __pyx_t_2;
17064 __pyx_t_2 = 0;
17065 goto __pyx_L3_return;
17066 }
17067
17068 /* "cephfs.pyx":1292
17069 * return (ret, my_outbuf, my_outs)
17070 * finally:
17071 * free(_cmd) # <<<<<<<<<<<<<<
17072 *
17073 * def umask(self, mode) :
17074 */
17075 /*finally:*/ {
17076 /*exception exit:*/{
17077 __pyx_L4_error:;
17078 __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
17079 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
17080 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
17081 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
17082 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
17083 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
17084 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
17085 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_12, &
__pyx_t_13, &__pyx_t_14) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
17086 __Pyx_XGOTREF(__pyx_t_12);
17087 __Pyx_XGOTREF(__pyx_t_13);
17088 __Pyx_XGOTREF(__pyx_t_14);
17089 __Pyx_XGOTREF(__pyx_t_15);
17090 __Pyx_XGOTREF(__pyx_t_16);
17091 __Pyx_XGOTREF(__pyx_t_17);
17092 __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
17093 {
17094 free(__pyx_v__cmd);
17095 }
17096 if (PY_MAJOR_VERSION2 >= 3) {
17097 __Pyx_XGIVEREF(__pyx_t_15);
17098 __Pyx_XGIVEREF(__pyx_t_16);
17099 __Pyx_XGIVEREF(__pyx_t_17);
17100 __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
17101 }
17102 __Pyx_XGIVEREF(__pyx_t_12);
17103 __Pyx_XGIVEREF(__pyx_t_13);
17104 __Pyx_XGIVEREF(__pyx_t_14);
17105 __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
17106 __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
17107 __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
17108 goto __pyx_L1_error;
17109 }
17110 __pyx_L3_return: {
17111 __pyx_t_17 = __pyx_r;
17112 __pyx_r = 0;
17113 free(__pyx_v__cmd);
17114 __pyx_r = __pyx_t_17;
17115 __pyx_t_17 = 0;
17116 goto __pyx_L0;
17117 }
17118 }
17119
17120 /* "cephfs.pyx":1256
17121 * 'utf-8'), dst.decode('utf-8')))
17122 *
17123 * def mds_command(self, mds_spec, args, input_data): # <<<<<<<<<<<<<<
17124 * """
17125 * :return 3-tuple of output status int, output status string, output data
17126 */
17127
17128 /* function exit code */
17129 __pyx_L1_error:;
17130 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
17131 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
17132 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
17133 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
17134 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
17135 __Pyx_AddTraceback("cephfs.LibCephFS.mds_command", __pyx_clineno, __pyx_lineno, __pyx_filename);
17136 __pyx_r = NULL((void*)0);
17137 __pyx_L0:;
17138 __Pyx_XDECREF(__pyx_v_my_outs)do { if ((__pyx_v_my_outs) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_my_outs))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_my_outs)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_my_outs)))); } while
(0); } while (0)
;
17139 __Pyx_XDECREF(__pyx_v_my_outbuf)do { if ((__pyx_v_my_outbuf) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_my_outbuf))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_my_outbuf)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_my_outbuf
)))); } while (0); } while (0)
;
17140 __Pyx_XDECREF(__pyx_v_mds_spec)do { if ((__pyx_v_mds_spec) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_mds_spec))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_mds_spec)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_mds_spec)))); }
while (0); } while (0)
;
17141 __Pyx_XDECREF(__pyx_v_args)do { if ((__pyx_v_args) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_args))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_args)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_args)))); } while (0); } while
(0)
;
17142 __Pyx_XDECREF(__pyx_v_input_data)do { if ((__pyx_v_input_data) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_input_data))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_input_data)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_input_data
)))); } while (0); } while (0)
;
17143 __Pyx_XGIVEREF(__pyx_r);
17144 __Pyx_RefNannyFinishContext();
17145 return __pyx_r;
17146}
17147
17148/* "cephfs.pyx":1294
17149 * free(_cmd)
17150 *
17151 * def umask(self, mode) : # <<<<<<<<<<<<<<
17152 * self.require_state("mounted")
17153 * cdef:
17154 */
17155
17156/* Python wrapper */
17157static PyObject *__pyx_pw_6cephfs_9LibCephFS_91umask(PyObject *__pyx_v_self, PyObject *__pyx_v_mode); /*proto*/
17158static PyObject *__pyx_pw_6cephfs_9LibCephFS_91umask(PyObject *__pyx_v_self, PyObject *__pyx_v_mode) {
17159 PyObject *__pyx_r = 0;
17160 __Pyx_RefNannyDeclarations
17161 __Pyx_RefNannySetupContext("umask (wrapper)", 0);
17162 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_90umask(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_mode));
17163
17164 /* function exit code */
17165 __Pyx_RefNannyFinishContext();
17166 return __pyx_r;
17167}
17168
17169static PyObject *__pyx_pf_6cephfs_9LibCephFS_90umask(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_mode) {
17170 mode_t __pyx_v__mode;
17171 mode_t __pyx_v_ret;
17172 PyObject *__pyx_r = NULL((void*)0);
17173 __Pyx_RefNannyDeclarations
17174 PyObject *__pyx_t_1 = NULL((void*)0);
17175 PyObject *__pyx_t_2 = NULL((void*)0);
17176 mode_t __pyx_t_3;
17177 int __pyx_t_4;
17178 int __pyx_lineno = 0;
17179 const char *__pyx_filename = NULL((void*)0);
17180 int __pyx_clineno = 0;
17181 __Pyx_RefNannySetupContext("umask", 0);
17182
17183 /* "cephfs.pyx":1295
17184 *
17185 * def umask(self, mode) :
17186 * self.require_state("mounted") # <<<<<<<<<<<<<<
17187 * cdef:
17188 * mode_t _mode = mode
17189 */
17190 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__17190; goto __pyx_L1_error;}
17191 __Pyx_GOTREF(__pyx_t_1);
17192 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__70, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__17192; goto __pyx_L1_error;}
17193 __Pyx_GOTREF(__pyx_t_2);
17194 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
17195 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
17196
17197 /* "cephfs.pyx":1297
17198 * self.require_state("mounted")
17199 * cdef:
17200 * mode_t _mode = mode # <<<<<<<<<<<<<<
17201 * with nogil:
17202 * ret = ceph_umask(self.cluster, _mode)
17203 */
17204 __pyx_t_3 = __Pyx_PyInt_As_mode_t(__pyx_v_mode); if (unlikely((__pyx_t_3 == (mode_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (mode_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__17204; goto __pyx_L1_error;}
17205 __pyx_v__mode = __pyx_t_3;
17206
17207 /* "cephfs.pyx":1298
17208 * cdef:
17209 * mode_t _mode = mode
17210 * with nogil: # <<<<<<<<<<<<<<
17211 * ret = ceph_umask(self.cluster, _mode)
17212 * if ret < 0:
17213 */
17214 {
17215 #ifdef WITH_THREAD1
17216 PyThreadState *_save;
17217 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
17218 #endif
17219 /*try:*/ {
17220
17221 /* "cephfs.pyx":1299
17222 * mode_t _mode = mode
17223 * with nogil:
17224 * ret = ceph_umask(self.cluster, _mode) # <<<<<<<<<<<<<<
17225 * if ret < 0:
17226 * raise make_ex(ret, "error in umask")
17227 */
17228 __pyx_v_ret = ceph_umask(__pyx_v_self->cluster, __pyx_v__mode);
17229 }
17230
17231 /* "cephfs.pyx":1298
17232 * cdef:
17233 * mode_t _mode = mode
17234 * with nogil: # <<<<<<<<<<<<<<
17235 * ret = ceph_umask(self.cluster, _mode)
17236 * if ret < 0:
17237 */
17238 /*finally:*/ {
17239 /*normal exit:*/{
17240 #ifdef WITH_THREAD1
17241 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
17242 #endif
17243 goto __pyx_L5;
17244 }
17245 __pyx_L5:;
17246 }
17247 }
17248
17249 /* "cephfs.pyx":1300
17250 * with nogil:
17251 * ret = ceph_umask(self.cluster, _mode)
17252 * if ret < 0: # <<<<<<<<<<<<<<
17253 * raise make_ex(ret, "error in umask")
17254 * return ret
17255 */
17256 __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
17257 if (__pyx_t_4) {
17258
17259 /* "cephfs.pyx":1301
17260 * ret = ceph_umask(self.cluster, _mode)
17261 * if ret < 0:
17262 * raise make_ex(ret, "error in umask") # <<<<<<<<<<<<<<
17263 * return ret
17264 *
17265 */
17266 __pyx_t_2 = __Pyx_PyInt_From_mode_t(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__17266; goto __pyx_L1_error;}
17267 __Pyx_GOTREF(__pyx_t_2);
17268 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_umask); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__17268; goto __pyx_L1_error;}
17269 __Pyx_GOTREF(__pyx_t_1);
17270 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
17271 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
17272 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
17273 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__17273; goto __pyx_L1_error;}
17274
17275 /* "cephfs.pyx":1300
17276 * with nogil:
17277 * ret = ceph_umask(self.cluster, _mode)
17278 * if ret < 0: # <<<<<<<<<<<<<<
17279 * raise make_ex(ret, "error in umask")
17280 * return ret
17281 */
17282 }
17283
17284 /* "cephfs.pyx":1302
17285 * if ret < 0:
17286 * raise make_ex(ret, "error in umask")
17287 * return ret # <<<<<<<<<<<<<<
17288 *
17289 * def lseek(self, fd, offset, whence):
17290 */
17291 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
17292 __pyx_t_1 = __Pyx_PyInt_From_mode_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__17292; goto __pyx_L1_error;}
17293 __Pyx_GOTREF(__pyx_t_1);
17294 __pyx_r = __pyx_t_1;
17295 __pyx_t_1 = 0;
17296 goto __pyx_L0;
17297
17298 /* "cephfs.pyx":1294
17299 * free(_cmd)
17300 *
17301 * def umask(self, mode) : # <<<<<<<<<<<<<<
17302 * self.require_state("mounted")
17303 * cdef:
17304 */
17305
17306 /* function exit code */
17307 __pyx_L1_error:;
17308 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
17309 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
17310 __Pyx_AddTraceback("cephfs.LibCephFS.umask", __pyx_clineno, __pyx_lineno, __pyx_filename);
17311 __pyx_r = NULL((void*)0);
17312 __pyx_L0:;
17313 __Pyx_XGIVEREF(__pyx_r);
17314 __Pyx_RefNannyFinishContext();
17315 return __pyx_r;
17316}
17317
17318/* "cephfs.pyx":1304
17319 * return ret
17320 *
17321 * def lseek(self, fd, offset, whence): # <<<<<<<<<<<<<<
17322 * """
17323 * Set the file's current position.
17324 */
17325
17326/* Python wrapper */
17327static PyObject *__pyx_pw_6cephfs_9LibCephFS_93lseek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17328static char __pyx_doc_6cephfs_9LibCephFS_92lseek[] = "\n Set the file's current position.\n \n :param fd : the file descriptor of the open file to read from.\n :param offset : the offset in the file to read from. If this value is negative, the\n function reads from the current offset of the file descriptor.\n :param whence : the flag to indicate what type of seeking to performs:SEEK_SET, SEEK_CUR, SEEK_END\n ";
17329static PyObject *__pyx_pw_6cephfs_9LibCephFS_93lseek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17330 PyObject *__pyx_v_fd = 0;
17331 PyObject *__pyx_v_offset = 0;
17332 PyObject *__pyx_v_whence = 0;
17333 int __pyx_lineno = 0;
17334 const char *__pyx_filename = NULL((void*)0);
17335 int __pyx_clineno = 0;
17336 PyObject *__pyx_r = 0;
17337 __Pyx_RefNannyDeclarations
17338 __Pyx_RefNannySetupContext("lseek (wrapper)", 0);
17339 {
17340 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_offset,&__pyx_n_s_whence,0};
17341 PyObject* values[3] = {0,0,0};
17342 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
17343 Py_ssize_t kw_args;
17344 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
17345 switch (pos_args) {
17346 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
17347 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
17348 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
17349 case 0: break;
17350 default: goto __pyx_L5_argtuple_error;
17351 }
17352 kw_args = PyDict_Size(__pyx_kwds);
17353 switch (pos_args) {
17354 case 0:
17355 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd
)) != 0), 1)
) kw_args--;
17356 else goto __pyx_L5_argtuple_error;
17357 case 1:
17358 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset
)) != 0), 1)
) kw_args--;
17359 else {
17360 __Pyx_RaiseArgtupleInvalid("lseek", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__17360; goto __pyx_L3_error;}
17361 }
17362 case 2:
17363 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_whence)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_whence
)) != 0), 1)
) kw_args--;
17364 else {
17365 __Pyx_RaiseArgtupleInvalid("lseek", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__17365; goto __pyx_L3_error;}
17366 }
17367 }
17368 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
17369 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lseek") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "lseek") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__17369; goto __pyx_L3_error;}
17370 }
17371 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
17372 goto __pyx_L5_argtuple_error;
17373 } else {
17374 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
17375 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
17376 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
17377 }
17378 __pyx_v_fd = values[0];
17379 __pyx_v_offset = values[1];
17380 __pyx_v_whence = values[2];
17381 }
17382 goto __pyx_L4_argument_unpacking_done;
17383 __pyx_L5_argtuple_error:;
17384 __Pyx_RaiseArgtupleInvalid("lseek", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__17384; goto __pyx_L3_error;}
17385 __pyx_L3_error:;
17386 __Pyx_AddTraceback("cephfs.LibCephFS.lseek", __pyx_clineno, __pyx_lineno, __pyx_filename);
17387 __Pyx_RefNannyFinishContext();
17388 return NULL((void*)0);
17389 __pyx_L4_argument_unpacking_done:;
17390 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_92lseek(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), __pyx_v_fd, __pyx_v_offset, __pyx_v_whence);
17391
17392 /* function exit code */
17393 __Pyx_RefNannyFinishContext();
17394 return __pyx_r;
17395}
17396
17397static PyObject *__pyx_pf_6cephfs_9LibCephFS_92lseek(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_offset, PyObject *__pyx_v_whence) {
17398 int __pyx_v__fd;
17399 int64_t __pyx_v__offset;
17400 int64_t __pyx_v__whence;
17401 int64_t __pyx_v_ret;
17402 PyObject *__pyx_r = NULL((void*)0);
17403 __Pyx_RefNannyDeclarations
17404 PyObject *__pyx_t_1 = NULL((void*)0);
17405 PyObject *__pyx_t_2 = NULL((void*)0);
17406 int __pyx_t_3;
17407 int __pyx_t_4;
17408 int __pyx_t_5;
17409 int64_t __pyx_t_6;
17410 int __pyx_lineno = 0;
17411 const char *__pyx_filename = NULL((void*)0);
17412 int __pyx_clineno = 0;
17413 __Pyx_RefNannySetupContext("lseek", 0);
17414
17415 /* "cephfs.pyx":1313
17416 * :param whence : the flag to indicate what type of seeking to performs:SEEK_SET, SEEK_CUR, SEEK_END
17417 * """
17418 * self.require_state("mounted") # <<<<<<<<<<<<<<
17419 * if not isinstance(fd, int):
17420 * raise TypeError('fd must be an int')
17421 */
17422 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_require_state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__17422; goto __pyx_L1_error;}
17423 __Pyx_GOTREF(__pyx_t_1);
17424 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__71, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__17424; goto __pyx_L1_error;}
17425 __Pyx_GOTREF(__pyx_t_2);
17426 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
17427 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
17428
17429 /* "cephfs.pyx":1314
17430 * """
17431 * self.require_state("mounted")
17432 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
17433 * raise TypeError('fd must be an int')
17434 * if not isinstance(offset, int):
17435 */
17436 __pyx_t_3 = PyInt_Check(__pyx_v_fd)((((__pyx_v_fd)->ob_type)->tp_flags & ((1L<<23
))) != 0)
;
17437 __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
17438 if (__pyx_t_4) {
17439
17440 /* "cephfs.pyx":1315
17441 * self.require_state("mounted")
17442 * if not isinstance(fd, int):
17443 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
17444 * if not isinstance(offset, int):
17445 * raise TypeError('offset must be an int')
17446 */
17447 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__72, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__17447; goto __pyx_L1_error;}
17448 __Pyx_GOTREF(__pyx_t_2);
17449 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
17450 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
17451 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__17451; goto __pyx_L1_error;}
17452
17453 /* "cephfs.pyx":1314
17454 * """
17455 * self.require_state("mounted")
17456 * if not isinstance(fd, int): # <<<<<<<<<<<<<<
17457 * raise TypeError('fd must be an int')
17458 * if not isinstance(offset, int):
17459 */
17460 }
17461
17462 /* "cephfs.pyx":1316
17463 * if not isinstance(fd, int):
17464 * raise TypeError('fd must be an int')
17465 * if not isinstance(offset, int): # <<<<<<<<<<<<<<
17466 * raise TypeError('offset must be an int')
17467 * if not isinstance(whence, int):
17468 */
17469 __pyx_t_4 = PyInt_Check(__pyx_v_offset)((((__pyx_v_offset)->ob_type)->tp_flags & ((1L<<
23))) != 0)
;
17470 __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0);
17471 if (__pyx_t_3) {
17472
17473 /* "cephfs.pyx":1317
17474 * raise TypeError('fd must be an int')
17475 * if not isinstance(offset, int):
17476 * raise TypeError('offset must be an int') # <<<<<<<<<<<<<<
17477 * if not isinstance(whence, int):
17478 * raise TypeError('whence must be an int')
17479 */
17480 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__73, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__17480; goto __pyx_L1_error;}
17481 __Pyx_GOTREF(__pyx_t_2);
17482 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
17483 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
17484 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__17484; goto __pyx_L1_error;}
17485
17486 /* "cephfs.pyx":1316
17487 * if not isinstance(fd, int):
17488 * raise TypeError('fd must be an int')
17489 * if not isinstance(offset, int): # <<<<<<<<<<<<<<
17490 * raise TypeError('offset must be an int')
17491 * if not isinstance(whence, int):
17492 */
17493 }
17494
17495 /* "cephfs.pyx":1318
17496 * if not isinstance(offset, int):
17497 * raise TypeError('offset must be an int')
17498 * if not isinstance(whence, int): # <<<<<<<<<<<<<<
17499 * raise TypeError('whence must be an int')
17500 *
17501 */
17502 __pyx_t_3 = PyInt_Check(__pyx_v_whence)((((__pyx_v_whence)->ob_type)->tp_flags & ((1L<<
23))) != 0)
;
17503 __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
17504 if (__pyx_t_4) {
17505
17506 /* "cephfs.pyx":1319
17507 * raise TypeError('offset must be an int')
17508 * if not isinstance(whence, int):
17509 * raise TypeError('whence must be an int') # <<<<<<<<<<<<<<
17510 *
17511 * cdef:
17512 */
17513 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__17513; goto __pyx_L1_error;}
17514 __Pyx_GOTREF(__pyx_t_2);
17515 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
17516 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
17517 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__17517; goto __pyx_L1_error;}
17518
17519 /* "cephfs.pyx":1318
17520 * if not isinstance(offset, int):
17521 * raise TypeError('offset must be an int')
17522 * if not isinstance(whence, int): # <<<<<<<<<<<<<<
17523 * raise TypeError('whence must be an int')
17524 *
17525 */
17526 }
17527
17528 /* "cephfs.pyx":1322
17529 *
17530 * cdef:
17531 * int _fd = fd # <<<<<<<<<<<<<<
17532 * int64_t _offset = offset
17533 * int64_t _whence = whence
17534 */
17535 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_5 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__17535; goto __pyx_L1_error;}
17536 __pyx_v__fd = __pyx_t_5;
17537
17538 /* "cephfs.pyx":1323
17539 * cdef:
17540 * int _fd = fd
17541 * int64_t _offset = offset # <<<<<<<<<<<<<<
17542 * int64_t _whence = whence
17543 *
17544 */
17545 __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_6 == (int64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_6 == (int64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__17545; goto __pyx_L1_error;}
17546 __pyx_v__offset = __pyx_t_6;
17547
17548 /* "cephfs.pyx":1324
17549 * int _fd = fd
17550 * int64_t _offset = offset
17551 * int64_t _whence = whence # <<<<<<<<<<<<<<
17552 *
17553 * with nogil:
17554 */
17555 __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_v_whence); if (unlikely((__pyx_t_6 == (int64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_6 == (int64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__17555; goto __pyx_L1_error;}
17556 __pyx_v__whence = __pyx_t_6;
17557
17558 /* "cephfs.pyx":1326
17559 * int64_t _whence = whence
17560 *
17561 * with nogil: # <<<<<<<<<<<<<<
17562 * ret = ceph_lseek(self.cluster, _fd, _offset, _whence)
17563 *
17564 */
17565 {
17566 #ifdef WITH_THREAD1
17567 PyThreadState *_save;
17568 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
17569 #endif
17570 /*try:*/ {
17571
17572 /* "cephfs.pyx":1327
17573 *
17574 * with nogil:
17575 * ret = ceph_lseek(self.cluster, _fd, _offset, _whence) # <<<<<<<<<<<<<<
17576 *
17577 * if ret < 0:
17578 */
17579 __pyx_v_ret = ceph_lseek(__pyx_v_self->cluster, __pyx_v__fd, __pyx_v__offset, __pyx_v__whence);
17580 }
17581
17582 /* "cephfs.pyx":1326
17583 * int64_t _whence = whence
17584 *
17585 * with nogil: # <<<<<<<<<<<<<<
17586 * ret = ceph_lseek(self.cluster, _fd, _offset, _whence)
17587 *
17588 */
17589 /*finally:*/ {
17590 /*normal exit:*/{
17591 #ifdef WITH_THREAD1
17592 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
17593 #endif
17594 goto __pyx_L8;
17595 }
17596 __pyx_L8:;
17597 }
17598 }
17599
17600 /* "cephfs.pyx":1329
17601 * ret = ceph_lseek(self.cluster, _fd, _offset, _whence)
17602 *
17603 * if ret < 0: # <<<<<<<<<<<<<<
17604 * raise make_ex(ret, "error in lseek")
17605 *
17606 */
17607 __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
17608 if (__pyx_t_4) {
17609
17610 /* "cephfs.pyx":1330
17611 *
17612 * if ret < 0:
17613 * raise make_ex(ret, "error in lseek") # <<<<<<<<<<<<<<
17614 *
17615 * return ret
17616 */
17617 __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__17617; goto __pyx_L1_error;}
17618 __Pyx_GOTREF(__pyx_t_2);
17619 __pyx_t_1 = __pyx_f_6cephfs_make_ex(__pyx_t_2, __pyx_kp_s_error_in_lseek); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__17619; goto __pyx_L1_error;}
17620 __Pyx_GOTREF(__pyx_t_1);
17621 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
17622 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
17623 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
17624 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__17624; goto __pyx_L1_error;}
17625
17626 /* "cephfs.pyx":1329
17627 * ret = ceph_lseek(self.cluster, _fd, _offset, _whence)
17628 *
17629 * if ret < 0: # <<<<<<<<<<<<<<
17630 * raise make_ex(ret, "error in lseek")
17631 *
17632 */
17633 }
17634
17635 /* "cephfs.pyx":1332
17636 * raise make_ex(ret, "error in lseek")
17637 *
17638 * return ret # <<<<<<<<<<<<<<
17639 */
17640 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
17641 __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__17641; goto __pyx_L1_error;}
17642 __Pyx_GOTREF(__pyx_t_1);
17643 __pyx_r = __pyx_t_1;
17644 __pyx_t_1 = 0;
17645 goto __pyx_L0;
17646
17647 /* "cephfs.pyx":1304
17648 * return ret
17649 *
17650 * def lseek(self, fd, offset, whence): # <<<<<<<<<<<<<<
17651 * """
17652 * Set the file's current position.
17653 */
17654
17655 /* function exit code */
17656 __pyx_L1_error:;
17657 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
17658 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
17659 __Pyx_AddTraceback("cephfs.LibCephFS.lseek", __pyx_clineno, __pyx_lineno, __pyx_filename);
17660 __pyx_r = NULL((void*)0);
17661 __pyx_L0:;
17662 __Pyx_XGIVEREF(__pyx_r);
17663 __Pyx_RefNannyFinishContext();
17664 return __pyx_r;
17665}
17666
17667/* "cephfs.pyx":399
17668 * """libcephfs python wrapper"""
17669 *
17670 * cdef public object state # <<<<<<<<<<<<<<
17671 * cdef ceph_mount_info *cluster
17672 *
17673 */
17674
17675/* Python wrapper */
17676static PyObject *__pyx_pw_6cephfs_9LibCephFS_5state_1__get__(PyObject *__pyx_v_self); /*proto*/
17677static PyObject *__pyx_pw_6cephfs_9LibCephFS_5state_1__get__(PyObject *__pyx_v_self) {
17678 PyObject *__pyx_r = 0;
17679 __Pyx_RefNannyDeclarations
17680 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
17681 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_5state___get__(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
17682
17683 /* function exit code */
17684 __Pyx_RefNannyFinishContext();
17685 return __pyx_r;
17686}
17687
17688static PyObject *__pyx_pf_6cephfs_9LibCephFS_5state___get__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
17689 PyObject *__pyx_r = NULL((void*)0);
17690 __Pyx_RefNannyDeclarations
17691 __Pyx_RefNannySetupContext("__get__", 0);
17692 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
17693 __Pyx_INCREF(__pyx_v_self->state)( ((PyObject*)(__pyx_v_self->state))->ob_refcnt++);
17694 __pyx_r = __pyx_v_self->state;
17695 goto __pyx_L0;
17696
17697 /* function exit code */
17698 __pyx_L0:;
17699 __Pyx_XGIVEREF(__pyx_r);
17700 __Pyx_RefNannyFinishContext();
17701 return __pyx_r;
17702}
17703
17704/* Python wrapper */
17705static int __pyx_pw_6cephfs_9LibCephFS_5state_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
17706static int __pyx_pw_6cephfs_9LibCephFS_5state_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
17707 int __pyx_r;
17708 __Pyx_RefNannyDeclarations
17709 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
17710 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_5state_2__set__(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self), ((PyObject *)__pyx_v_value));
17711
17712 /* function exit code */
17713 __Pyx_RefNannyFinishContext();
17714 return __pyx_r;
17715}
17716
17717static int __pyx_pf_6cephfs_9LibCephFS_5state_2__set__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self, PyObject *__pyx_v_value) {
17718 int __pyx_r;
17719 __Pyx_RefNannyDeclarations
17720 __Pyx_RefNannySetupContext("__set__", 0);
17721 __Pyx_INCREF(__pyx_v_value)( ((PyObject*)(__pyx_v_value))->ob_refcnt++);
17722 __Pyx_GIVEREF(__pyx_v_value);
17723 __Pyx_GOTREF(__pyx_v_self->state);
17724 __Pyx_DECREF(__pyx_v_self->state)do { if ( --((PyObject*)(__pyx_v_self->state))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
state)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->state)))); } while (0)
;
17725 __pyx_v_self->state = __pyx_v_value;
17726
17727 /* function exit code */
17728 __pyx_r = 0;
17729 __Pyx_RefNannyFinishContext();
17730 return __pyx_r;
17731}
17732
17733/* Python wrapper */
17734static int __pyx_pw_6cephfs_9LibCephFS_5state_5__del__(PyObject *__pyx_v_self); /*proto*/
17735static int __pyx_pw_6cephfs_9LibCephFS_5state_5__del__(PyObject *__pyx_v_self) {
17736 int __pyx_r;
17737 __Pyx_RefNannyDeclarations
17738 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
17739 __pyx_r = __pyx_pf_6cephfs_9LibCephFS_5state_4__del__(((struct __pyx_obj_6cephfs_LibCephFS *)__pyx_v_self));
17740
17741 /* function exit code */
17742 __Pyx_RefNannyFinishContext();
17743 return __pyx_r;
17744}
17745
17746static int __pyx_pf_6cephfs_9LibCephFS_5state_4__del__(struct __pyx_obj_6cephfs_LibCephFS *__pyx_v_self) {
17747 int __pyx_r;
17748 __Pyx_RefNannyDeclarations
17749 __Pyx_RefNannySetupContext("__del__", 0);
17750 __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
17751 __Pyx_GIVEREF(Py_None);
17752 __Pyx_GOTREF(__pyx_v_self->state);
17753 __Pyx_DECREF(__pyx_v_self->state)do { if ( --((PyObject*)(__pyx_v_self->state))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
state)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->state)))); } while (0)
;
17754 __pyx_v_self->state = Py_None(&_Py_NoneStruct);
17755
17756 /* function exit code */
17757 __pyx_r = 0;
17758 __Pyx_RefNannyFinishContext();
17759 return __pyx_r;
17760}
17761
17762static PyObject *__pyx_tp_new_6cephfs_DirResult(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
17763 struct __pyx_obj_6cephfs_DirResult *p;
17764 PyObject *o;
17765 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
17766 o = (*t->tp_alloc)(t, 0);
17767 } else {
17768 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
17769 }
17770 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
17771 p = ((struct __pyx_obj_6cephfs_DirResult *)o);
17772 p->lib = ((struct __pyx_obj_6cephfs_LibCephFS *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
17773 return o;
17774}
17775
17776static void __pyx_tp_dealloc_6cephfs_DirResult(PyObject *o) {
17777 struct __pyx_obj_6cephfs_DirResult *p = (struct __pyx_obj_6cephfs_DirResult *)o;
17778 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
17779 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
17780 if (PyObject_CallFinalizerFromDealloc(o)) return;
17781 }
17782 #endif
17783 PyObject_GC_UnTrack(o);
17784 {
17785 PyObject *etype, *eval, *etb;
17786 PyErr_Fetch(&etype, &eval, &etb);
17787 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
17788 __pyx_pw_6cephfs_9DirResult_1__dealloc__(o);
17789 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
17790 PyErr_Restore(etype, eval, etb);
17791 }
17792 Py_CLEAR(p->lib)do { if (p->lib) { PyObject *_py_tmp = (PyObject *)(p->
lib); (p->lib) = ((void*)0); do { if ( --((PyObject*)(_py_tmp
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
17793 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
17794}
17795
17796static int __pyx_tp_traverse_6cephfs_DirResult(PyObject *o, visitproc v, void *a) {
17797 int e;
17798 struct __pyx_obj_6cephfs_DirResult *p = (struct __pyx_obj_6cephfs_DirResult *)o;
17799 if (p->lib) {
17800 e = (*v)(((PyObject*)p->lib), a); if (e) return e;
17801 }
17802 return 0;
17803}
17804
17805static int __pyx_tp_clear_6cephfs_DirResult(PyObject *o) {
17806 PyObject* tmp;
17807 struct __pyx_obj_6cephfs_DirResult *p = (struct __pyx_obj_6cephfs_DirResult *)o;
17808 tmp = ((PyObject*)p->lib);
17809 p->lib = ((struct __pyx_obj_6cephfs_LibCephFS *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
17810 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
17811 return 0;
17812}
17813
17814static PyMethodDef __pyx_methods_6cephfs_DirResult[] = {
17815 {"__enter__", (PyCFunction)__pyx_pw_6cephfs_9DirResult_3__enter__, METH_NOARGS0x0004, 0},
17816 {"__exit__", (PyCFunction)__pyx_pw_6cephfs_9DirResult_5__exit__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0},
17817 {"readdir", (PyCFunction)__pyx_pw_6cephfs_9DirResult_7readdir, METH_NOARGS0x0004, 0},
17818 {"close", (PyCFunction)__pyx_pw_6cephfs_9DirResult_9close, METH_NOARGS0x0004, 0},
17819 {0, 0, 0, 0}
17820};
17821
17822static PyTypeObject __pyx_type_6cephfs_DirResult = {
17823 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
17824 "cephfs.DirResult", /*tp_name*/
17825 sizeof(struct __pyx_obj_6cephfs_DirResult), /*tp_basicsize*/
17826 0, /*tp_itemsize*/
17827 __pyx_tp_dealloc_6cephfs_DirResult, /*tp_dealloc*/
17828 0, /*tp_print*/
17829 0, /*tp_getattr*/
17830 0, /*tp_setattr*/
17831 #if PY_MAJOR_VERSION2 < 3
17832 0, /*tp_compare*/
17833 #endif
17834 #if PY_MAJOR_VERSION2 >= 3
17835 0, /*tp_as_async*/
17836 #endif
17837 0, /*tp_repr*/
17838 0, /*tp_as_number*/
17839 0, /*tp_as_sequence*/
17840 0, /*tp_as_mapping*/
17841 0, /*tp_hash*/
17842 0, /*tp_call*/
17843 0, /*tp_str*/
17844 0, /*tp_getattro*/
17845 0, /*tp_setattro*/
17846 0, /*tp_as_buffer*/
17847 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
17848 0, /*tp_doc*/
17849 __pyx_tp_traverse_6cephfs_DirResult, /*tp_traverse*/
17850 __pyx_tp_clear_6cephfs_DirResult, /*tp_clear*/
17851 0, /*tp_richcompare*/
17852 0, /*tp_weaklistoffset*/
17853 0, /*tp_iter*/
17854 0, /*tp_iternext*/
17855 __pyx_methods_6cephfs_DirResult, /*tp_methods*/
17856 0, /*tp_members*/
17857 0, /*tp_getset*/
17858 0, /*tp_base*/
17859 0, /*tp_dict*/
17860 0, /*tp_descr_get*/
17861 0, /*tp_descr_set*/
17862 0, /*tp_dictoffset*/
17863 0, /*tp_init*/
17864 0, /*tp_alloc*/
17865 __pyx_tp_new_6cephfs_DirResult, /*tp_new*/
17866 0, /*tp_free*/
17867 0, /*tp_is_gc*/
17868 0, /*tp_bases*/
17869 0, /*tp_mro*/
17870 0, /*tp_cache*/
17871 0, /*tp_subclasses*/
17872 0, /*tp_weaklist*/
17873 0, /*tp_del*/
17874 0, /*tp_version_tag*/
17875 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
17876 0, /*tp_finalize*/
17877 #endif
17878};
17879
17880static PyObject *__pyx_tp_new_6cephfs_LibCephFS(PyTypeObject *t, PyObject *a, PyObject *k) {
17881 struct __pyx_obj_6cephfs_LibCephFS *p;
17882 PyObject *o;
17883 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
17884 o = (*t->tp_alloc)(t, 0);
17885 } else {
17886 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
17887 }
17888 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
17889 p = ((struct __pyx_obj_6cephfs_LibCephFS *)o);
17890 p->state = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
17891 if (unlikely(__pyx_pw_6cephfs_9LibCephFS_3__cinit__(o, a, k) < 0)__builtin_expect(!!(__pyx_pw_6cephfs_9LibCephFS_3__cinit__(o,
a, k) < 0), 0)
) {
17892 Py_DECREF(o)do { if ( --((PyObject*)(o))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(o)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(o)))); } while (0)
; o = 0;
17893 }
17894 return o;
17895}
17896
17897static void __pyx_tp_dealloc_6cephfs_LibCephFS(PyObject *o) {
17898 struct __pyx_obj_6cephfs_LibCephFS *p = (struct __pyx_obj_6cephfs_LibCephFS *)o;
17899 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
17900 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
17901 if (PyObject_CallFinalizerFromDealloc(o)) return;
17902 }
17903 #endif
17904 PyObject_GC_UnTrack(o);
17905 {
17906 PyObject *etype, *eval, *etb;
17907 PyErr_Fetch(&etype, &eval, &etb);
17908 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
17909 __pyx_pw_6cephfs_9LibCephFS_19__dealloc__(o);
17910 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
17911 PyErr_Restore(etype, eval, etb);
17912 }
17913 Py_CLEAR(p->state)do { if (p->state) { PyObject *_py_tmp = (PyObject *)(p->
state); (p->state) = ((void*)0); do { if ( --((PyObject*)(
_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
17914 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
17915}
17916
17917static int __pyx_tp_traverse_6cephfs_LibCephFS(PyObject *o, visitproc v, void *a) {
17918 int e;
17919 struct __pyx_obj_6cephfs_LibCephFS *p = (struct __pyx_obj_6cephfs_LibCephFS *)o;
17920 if (p->state) {
17921 e = (*v)(p->state, a); if (e) return e;
17922 }
17923 return 0;
17924}
17925
17926static int __pyx_tp_clear_6cephfs_LibCephFS(PyObject *o) {
17927 PyObject* tmp;
17928 struct __pyx_obj_6cephfs_LibCephFS *p = (struct __pyx_obj_6cephfs_LibCephFS *)o;
17929 tmp = ((PyObject*)p->state);
17930 p->state = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
17931 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
17932 return 0;
17933}
17934
17935static PyObject *__pyx_getprop_6cephfs_9LibCephFS_state(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) {
17936 return __pyx_pw_6cephfs_9LibCephFS_5state_1__get__(o);
17937}
17938
17939static int __pyx_setprop_6cephfs_9LibCephFS_state(PyObject *o, PyObject *v, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) {
17940 if (v) {
17941 return __pyx_pw_6cephfs_9LibCephFS_5state_3__set__(o, v);
17942 }
17943 else {
17944 return __pyx_pw_6cephfs_9LibCephFS_5state_5__del__(o);
17945 }
17946}
17947
17948static PyMethodDef __pyx_methods_6cephfs_LibCephFS[] = {
17949 {"require_state", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_1require_state, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0},
17950 {"create_with_rados", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_5create_with_rados, METH_O0x0008, 0},
17951 {"create", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_7create, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_6create},
17952 {"conf_read_file", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_9conf_read_file, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_8conf_read_file},
17953 {"conf_parse_argv", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_11conf_parse_argv, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_10conf_parse_argv},
17954 {"shutdown", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_13shutdown, METH_NOARGS0x0004, __pyx_doc_6cephfs_9LibCephFS_12shutdown},
17955 {"__enter__", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_15__enter__, METH_NOARGS0x0004, 0},
17956 {"__exit__", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_17__exit__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0},
17957 {"version", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_21version, METH_NOARGS0x0004, __pyx_doc_6cephfs_9LibCephFS_20version},
17958 {"conf_get", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_23conf_get, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_22conf_get},
17959 {"conf_set", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_25conf_set, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_24conf_set},
17960 {"init", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_27init, METH_NOARGS0x0004, __pyx_doc_6cephfs_9LibCephFS_26init},
17961 {"mount", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_29mount, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_28mount},
17962 {"unmount", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_31unmount, METH_NOARGS0x0004, __pyx_doc_6cephfs_9LibCephFS_30unmount},
17963 {"abort_conn", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_33abort_conn, METH_NOARGS0x0004, __pyx_doc_6cephfs_9LibCephFS_32abort_conn},
17964 {"get_instance_id", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_35get_instance_id, METH_NOARGS0x0004, __pyx_doc_6cephfs_9LibCephFS_34get_instance_id},
17965 {"statfs", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_37statfs, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_36statfs},
17966 {"sync_fs", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_39sync_fs, METH_NOARGS0x0004, __pyx_doc_6cephfs_9LibCephFS_38sync_fs},
17967 {"fsync", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_41fsync, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_40fsync},
17968 {"getcwd", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_43getcwd, METH_NOARGS0x0004, __pyx_doc_6cephfs_9LibCephFS_42getcwd},
17969 {"chdir", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_45chdir, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_44chdir},
17970 {"opendir", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_47opendir, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_46opendir},
17971 {"readdir", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_49readdir, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_48readdir},
17972 {"closedir", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_51closedir, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_50closedir},
17973 {"mkdir", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_53mkdir, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_52mkdir},
17974 {"chmod", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_55chmod, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_54chmod},
17975 {"mkdirs", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_57mkdirs, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_56mkdirs},
17976 {"rmdir", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_59rmdir, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_58rmdir},
17977 {"open", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_61open, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_60open},
17978 {"close", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_63close, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_62close},
17979 {"read", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_65read, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_64read},
17980 {"write", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_67write, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_66write},
17981 {"flock", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_69flock, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_68flock},
17982 {"getxattr", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_71getxattr, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_70getxattr},
17983 {"setxattr", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_73setxattr, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_72setxattr},
17984 {"stat", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_75stat, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_74stat},
17985 {"fstat", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_77fstat, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_76fstat},
17986 {"symlink", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_79symlink, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_78symlink},
17987 {"link", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_81link, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_80link},
17988 {"readlink", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_83readlink, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_82readlink},
17989 {"unlink", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_85unlink, METH_O0x0008, __pyx_doc_6cephfs_9LibCephFS_84unlink},
17990 {"rename", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_87rename, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_86rename},
17991 {"mds_command", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_89mds_command, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_88mds_command},
17992 {"umask", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_91umask, METH_O0x0008, 0},
17993 {"lseek", (PyCFunction)__pyx_pw_6cephfs_9LibCephFS_93lseek, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_6cephfs_9LibCephFS_92lseek},
17994 {0, 0, 0, 0}
17995};
17996
17997static struct PyGetSetDef __pyx_getsets_6cephfs_LibCephFS[] = {
17998 {(char *)"state", __pyx_getprop_6cephfs_9LibCephFS_state, __pyx_setprop_6cephfs_9LibCephFS_state, 0, 0},
17999 {0, 0, 0, 0, 0}
18000};
18001
18002static PyTypeObject __pyx_type_6cephfs_LibCephFS = {
18003 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
18004 "cephfs.LibCephFS", /*tp_name*/
18005 sizeof(struct __pyx_obj_6cephfs_LibCephFS), /*tp_basicsize*/
18006 0, /*tp_itemsize*/
18007 __pyx_tp_dealloc_6cephfs_LibCephFS, /*tp_dealloc*/
18008 0, /*tp_print*/
18009 0, /*tp_getattr*/
18010 0, /*tp_setattr*/
18011 #if PY_MAJOR_VERSION2 < 3
18012 0, /*tp_compare*/
18013 #endif
18014 #if PY_MAJOR_VERSION2 >= 3
18015 0, /*tp_as_async*/
18016 #endif
18017 0, /*tp_repr*/
18018 0, /*tp_as_number*/
18019 0, /*tp_as_sequence*/
18020 0, /*tp_as_mapping*/
18021 0, /*tp_hash*/
18022 0, /*tp_call*/
18023 0, /*tp_str*/
18024 0, /*tp_getattro*/
18025 0, /*tp_setattro*/
18026 0, /*tp_as_buffer*/
18027 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
18028 "libcephfs python wrapper", /*tp_doc*/
18029 __pyx_tp_traverse_6cephfs_LibCephFS, /*tp_traverse*/
18030 __pyx_tp_clear_6cephfs_LibCephFS, /*tp_clear*/
18031 0, /*tp_richcompare*/
18032 0, /*tp_weaklistoffset*/
18033 0, /*tp_iter*/
18034 0, /*tp_iternext*/
18035 __pyx_methods_6cephfs_LibCephFS, /*tp_methods*/
18036 0, /*tp_members*/
18037 __pyx_getsets_6cephfs_LibCephFS, /*tp_getset*/
18038 0, /*tp_base*/
18039 0, /*tp_dict*/
18040 0, /*tp_descr_get*/
18041 0, /*tp_descr_set*/
18042 0, /*tp_dictoffset*/
18043 0, /*tp_init*/
18044 0, /*tp_alloc*/
18045 __pyx_tp_new_6cephfs_LibCephFS, /*tp_new*/
18046 0, /*tp_free*/
18047 0, /*tp_is_gc*/
18048 0, /*tp_bases*/
18049 0, /*tp_mro*/
18050 0, /*tp_cache*/
18051 0, /*tp_subclasses*/
18052 0, /*tp_weaklist*/
18053 0, /*tp_del*/
18054 0, /*tp_version_tag*/
18055 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
18056 0, /*tp_finalize*/
18057 #endif
18058};
18059
18060static PyMethodDef __pyx_methods[] = {
18061 {0, 0, 0, 0}
18062};
18063
18064#if PY_MAJOR_VERSION2 >= 3
18065static struct PyModuleDef __pyx_moduledef = {
18066 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03020000
18067 { PyObject_HEAD_INIT(NULL)1, ((void*)0), NULL((void*)0), 0, NULL((void*)0) },
18068 #else
18069 PyModuleDef_HEAD_INIT,
18070 #endif
18071 "cephfs",
18072 __pyx_k_This_module_is_a_thin_wrapper_a, /* m_doc */
18073 -1, /* m_size */
18074 __pyx_methods /* m_methods */,
18075 NULL((void*)0), /* m_reload */
18076 NULL((void*)0), /* m_traverse */
18077 NULL((void*)0), /* m_clear */
18078 NULL((void*)0) /* m_free */
18079};
18080#endif
18081
18082static __Pyx_StringTabEntry __pyx_string_tab[] = {
18083 {&__pyx_kp_s_0_1_Errno_2, __pyx_k_0_1_Errno_2, sizeof(__pyx_k_0_1_Errno_2), 0, 0, 1, 0},
18084 {&__pyx_n_s_DT_DIR, __pyx_k_DT_DIR, sizeof(__pyx_k_DT_DIR), 0, 0, 1, 1},
18085 {&__pyx_n_s_DT_LNK, __pyx_k_DT_LNK, sizeof(__pyx_k_DT_LNK), 0, 0, 1, 1},
18086 {&__pyx_n_s_DT_REG, __pyx_k_DT_REG, sizeof(__pyx_k_DT_REG), 0, 0, 1, 1},
18087 {&__pyx_n_s_DirEntry, __pyx_k_DirEntry, sizeof(__pyx_k_DirEntry), 0, 0, 1, 1},
18088 {&__pyx_n_s_DirEntry_is_dir, __pyx_k_DirEntry_is_dir, sizeof(__pyx_k_DirEntry_is_dir), 0, 0, 1, 1},
18089 {&__pyx_n_s_DirEntry_is_file, __pyx_k_DirEntry_is_file, sizeof(__pyx_k_DirEntry_is_file), 0, 0, 1, 1},
18090 {&__pyx_n_s_DirEntry_is_symbol_file, __pyx_k_DirEntry_is_symbol_file, sizeof(__pyx_k_DirEntry_is_symbol_file), 0, 0, 1, 1},
18091 {&__pyx_n_s_EWOULDBLOCK, __pyx_k_EWOULDBLOCK, sizeof(__pyx_k_EWOULDBLOCK), 0, 0, 1, 1},
18092 {&__pyx_kp_s_Errno_d, __pyx_k_Errno_d, sizeof(__pyx_k_Errno_d), 0, 0, 1, 0},
18093 {&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1},
18094 {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1},
18095 {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
18096 {&__pyx_n_s_InvalidValue, __pyx_k_InvalidValue, sizeof(__pyx_k_InvalidValue), 0, 0, 1, 1},
18097 {&__pyx_n_s_LibCephFSStateError, __pyx_k_LibCephFSStateError, sizeof(__pyx_k_LibCephFSStateError), 0, 0, 1, 1},
18098 {&__pyx_kp_s_May_not_pass_RADOS_instance_as_w, __pyx_k_May_not_pass_RADOS_instance_as_w, sizeof(__pyx_k_May_not_pass_RADOS_instance_as_w), 0, 0, 1, 0},
18099 {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
18100 {&__pyx_n_s_NoData, __pyx_k_NoData, sizeof(__pyx_k_NoData), 0, 0, 1, 1},
18101 {&__pyx_n_s_NoSpace, __pyx_k_NoSpace, sizeof(__pyx_k_NoSpace), 0, 0, 1, 1},
18102 {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1},
18103 {&__pyx_n_s_OSError___init, __pyx_k_OSError___init, sizeof(__pyx_k_OSError___init), 0, 0, 1, 1},
18104 {&__pyx_n_s_OSError___str, __pyx_k_OSError___str, sizeof(__pyx_k_OSError___str), 0, 0, 1, 1},
18105 {&__pyx_n_s_O_CREAT, __pyx_k_O_CREAT, sizeof(__pyx_k_O_CREAT), 0, 0, 1, 1},
18106 {&__pyx_n_s_O_RDONLY, __pyx_k_O_RDONLY, sizeof(__pyx_k_O_RDONLY), 0, 0, 1, 1},
18107 {&__pyx_n_s_O_RDWR, __pyx_k_O_RDWR, sizeof(__pyx_k_O_RDWR), 0, 0, 1, 1},
18108 {&__pyx_n_s_O_TRUNC, __pyx_k_O_TRUNC, sizeof(__pyx_k_O_TRUNC), 0, 0, 1, 1},
18109 {&__pyx_n_s_O_WRONLY, __pyx_k_O_WRONLY, sizeof(__pyx_k_O_WRONLY), 0, 0, 1, 1},
18110 {&__pyx_n_s_ObjectExists, __pyx_k_ObjectExists, sizeof(__pyx_k_ObjectExists), 0, 0, 1, 1},
18111 {&__pyx_n_s_ObjectNotEmpty, __pyx_k_ObjectNotEmpty, sizeof(__pyx_k_ObjectNotEmpty), 0, 0, 1, 1},
18112 {&__pyx_n_s_ObjectNotFound, __pyx_k_ObjectNotFound, sizeof(__pyx_k_ObjectNotFound), 0, 0, 1, 1},
18113 {&__pyx_n_s_OperationNotSupported, __pyx_k_OperationNotSupported, sizeof(__pyx_k_OperationNotSupported), 0, 0, 1, 1},
18114 {&__pyx_n_s_OutOfRange, __pyx_k_OutOfRange, sizeof(__pyx_k_OutOfRange), 0, 0, 1, 1},
18115 {&__pyx_n_s_PermissionError, __pyx_k_PermissionError, sizeof(__pyx_k_PermissionError), 0, 0, 1, 1},
18116 {&__pyx_n_s_StatResult, __pyx_k_StatResult, sizeof(__pyx_k_StatResult), 0, 0, 1, 1},
18117 {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
18118 {&__pyx_n_s_WouldBlock, __pyx_k_WouldBlock, sizeof(__pyx_k_WouldBlock), 0, 0, 1, 1},
18119 {&__pyx_kp_s_You_cannot_perform_that_operatio, __pyx_k_You_cannot_perform_that_operatio, sizeof(__pyx_k_You_cannot_perform_that_operatio), 0, 0, 1, 0},
18120 {&__pyx_kp_b__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 0, 0},
18121 {&__pyx_kp_s__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 0, 1, 0},
18122 {&__pyx_kp_b__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 0, 0},
18123 {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
18124 {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
18125 {&__pyx_n_s_argv, __pyx_k_argv, sizeof(__pyx_k_argv), 0, 0, 1, 1},
18126 {&__pyx_n_s_auth_id, __pyx_k_auth_id, sizeof(__pyx_k_auth_id), 0, 0, 1, 1},
18127 {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1},
18128 {&__pyx_kp_s_buf_must_be_a_bytes, __pyx_k_buf_must_be_a_bytes, sizeof(__pyx_k_buf_must_be_a_bytes), 0, 0, 1, 0},
18129 {&__pyx_n_s_cephfs, __pyx_k_cephfs, sizeof(__pyx_k_cephfs), 0, 0, 1, 1},
18130 {&__pyx_kp_s_chdir_failed, __pyx_k_chdir_failed, sizeof(__pyx_k_chdir_failed), 0, 0, 1, 0},
18131 {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
18132 {&__pyx_kp_s_closedir_failed, __pyx_k_closedir_failed, sizeof(__pyx_k_closedir_failed), 0, 0, 1, 0},
18133 {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
18134 {&__pyx_n_s_conf, __pyx_k_conf, sizeof(__pyx_k_conf), 0, 0, 1, 1},
18135 {&__pyx_kp_s_conf_must_be_dict_or_None, __pyx_k_conf_must_be_dict_or_None, sizeof(__pyx_k_conf_must_be_dict_or_None), 0, 0, 1, 0},
18136 {&__pyx_n_s_conf_read_file, __pyx_k_conf_read_file, sizeof(__pyx_k_conf_read_file), 0, 0, 1, 1},
18137 {&__pyx_n_s_conf_set, __pyx_k_conf_set, sizeof(__pyx_k_conf_set), 0, 0, 1, 1},
18138 {&__pyx_n_s_conffile, __pyx_k_conffile, sizeof(__pyx_k_conffile), 0, 0, 1, 1},
18139 {&__pyx_n_s_configfile, __pyx_k_configfile, sizeof(__pyx_k_configfile), 0, 0, 1, 1},
18140 {&__pyx_n_s_configuring, __pyx_k_configuring, sizeof(__pyx_k_configuring), 0, 0, 1, 1},
18141 {&__pyx_n_s_create, __pyx_k_create, sizeof(__pyx_k_create), 0, 0, 1, 1},
18142 {&__pyx_n_s_create_with_rados, __pyx_k_create_with_rados, sizeof(__pyx_k_create_with_rados), 0, 0, 1, 1},
18143 {&__pyx_n_s_cstr, __pyx_k_cstr, sizeof(__pyx_k_cstr), 0, 0, 1, 1},
18144 {&__pyx_n_s_cstr_list, __pyx_k_cstr_list, sizeof(__pyx_k_cstr_list), 0, 0, 1, 1},
18145 {&__pyx_n_s_d_ino, __pyx_k_d_ino, sizeof(__pyx_k_d_ino), 0, 0, 1, 1},
18146 {&__pyx_n_s_d_name, __pyx_k_d_name, sizeof(__pyx_k_d_name), 0, 0, 1, 1},
18147 {&__pyx_n_s_d_off, __pyx_k_d_off, sizeof(__pyx_k_d_off), 0, 0, 1, 1},
18148 {&__pyx_n_s_d_reclen, __pyx_k_d_reclen, sizeof(__pyx_k_d_reclen), 0, 0, 1, 1},
18149 {&__pyx_n_s_d_type, __pyx_k_d_type, sizeof(__pyx_k_d_type), 0, 0, 1, 1},
18150 {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
18151 {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
18152 {&__pyx_n_s_decode_cstr, __pyx_k_decode_cstr, sizeof(__pyx_k_decode_cstr), 0, 0, 1, 1},
18153 {&__pyx_n_s_destination, __pyx_k_destination, sizeof(__pyx_k_destination), 0, 0, 1, 1},
18154 {&__pyx_kp_s_dir_is_not_open, __pyx_k_dir_is_not_open, sizeof(__pyx_k_dir_is_not_open), 0, 0, 1, 0},
18155 {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
18156 {&__pyx_n_s_dst, __pyx_k_dst, sizeof(__pyx_k_dst), 0, 0, 1, 1},
18157 {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
18158 {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1},
18159 {&__pyx_n_s_errno, __pyx_k_errno, sizeof(__pyx_k_errno), 0, 0, 1, 1},
18160 {&__pyx_kp_s_error_calling_ceph_abort_conn, __pyx_k_error_calling_ceph_abort_conn, sizeof(__pyx_k_error_calling_ceph_abort_conn), 0, 0, 1, 0},
18161 {&__pyx_kp_s_error_calling_ceph_init, __pyx_k_error_calling_ceph_init, sizeof(__pyx_k_error_calling_ceph_init), 0, 0, 1, 0},
18162 {&__pyx_kp_s_error_calling_ceph_mount, __pyx_k_error_calling_ceph_mount, sizeof(__pyx_k_error_calling_ceph_mount), 0, 0, 1, 0},
18163 {&__pyx_kp_s_error_calling_ceph_select_filesy, __pyx_k_error_calling_ceph_select_filesy, sizeof(__pyx_k_error_calling_ceph_select_filesy), 0, 0, 1, 0},
18164 {&__pyx_kp_s_error_calling_ceph_unmount, __pyx_k_error_calling_ceph_unmount, sizeof(__pyx_k_error_calling_ceph_unmount), 0, 0, 1, 0},
18165 {&__pyx_kp_s_error_calling_conf_get, __pyx_k_error_calling_conf_get, sizeof(__pyx_k_error_calling_conf_get), 0, 0, 1, 0},
18166 {&__pyx_kp_s_error_calling_conf_parse_argv, __pyx_k_error_calling_conf_parse_argv, sizeof(__pyx_k_error_calling_conf_parse_argv), 0, 0, 1, 0},
18167 {&__pyx_kp_s_error_calling_conf_read_file, __pyx_k_error_calling_conf_read_file, sizeof(__pyx_k_error_calling_conf_read_file), 0, 0, 1, 0},
18168 {&__pyx_kp_s_error_calling_conf_set, __pyx_k_error_calling_conf_set, sizeof(__pyx_k_error_calling_conf_set), 0, 0, 1, 0},
18169 {&__pyx_kp_s_error_in_chmod, __pyx_k_error_in_chmod, sizeof(__pyx_k_error_in_chmod), 0, 0, 1, 0},
18170 {&__pyx_kp_s_error_in_close, __pyx_k_error_in_close, sizeof(__pyx_k_error_in_close), 0, 0, 1, 0},
18171 {&__pyx_kp_s_error_in_fsat, __pyx_k_error_in_fsat, sizeof(__pyx_k_error_in_fsat), 0, 0, 1, 0},
18172 {&__pyx_kp_s_error_in_getxattr, __pyx_k_error_in_getxattr, sizeof(__pyx_k_error_in_getxattr), 0, 0, 1, 0},
18173 {&__pyx_kp_s_error_in_link, __pyx_k_error_in_link, sizeof(__pyx_k_error_in_link), 0, 0, 1, 0},
18174 {&__pyx_kp_s_error_in_lseek, __pyx_k_error_in_lseek, sizeof(__pyx_k_error_in_lseek), 0, 0, 1, 0},
18175 {&__pyx_kp_s_error_in_mkdir, __pyx_k_error_in_mkdir, sizeof(__pyx_k_error_in_mkdir), 0, 0, 1, 0},
18176 {&__pyx_kp_s_error_in_mkdirs, __pyx_k_error_in_mkdirs, sizeof(__pyx_k_error_in_mkdirs), 0, 0, 1, 0},
18177 {&__pyx_kp_s_error_in_open, __pyx_k_error_in_open, sizeof(__pyx_k_error_in_open), 0, 0, 1, 0},
18178 {&__pyx_kp_s_error_in_read, __pyx_k_error_in_read, sizeof(__pyx_k_error_in_read), 0, 0, 1, 0},
18179 {&__pyx_kp_s_error_in_readlink, __pyx_k_error_in_readlink, sizeof(__pyx_k_error_in_readlink), 0, 0, 1, 0},
18180 {&__pyx_kp_s_error_in_rename_to, __pyx_k_error_in_rename_to, sizeof(__pyx_k_error_in_rename_to), 0, 0, 1, 0},
18181 {&__pyx_kp_s_error_in_rmdir, __pyx_k_error_in_rmdir, sizeof(__pyx_k_error_in_rmdir), 0, 0, 1, 0},
18182 {&__pyx_kp_s_error_in_setxattr, __pyx_k_error_in_setxattr, sizeof(__pyx_k_error_in_setxattr), 0, 0, 1, 0},
18183 {&__pyx_kp_s_error_in_stat, __pyx_k_error_in_stat, sizeof(__pyx_k_error_in_stat), 0, 0, 1, 0},
18184 {&__pyx_kp_s_error_in_symlink, __pyx_k_error_in_symlink, sizeof(__pyx_k_error_in_symlink), 0, 0, 1, 0},
18185 {&__pyx_kp_s_error_in_umask, __pyx_k_error_in_umask, sizeof(__pyx_k_error_in_umask), 0, 0, 1, 0},
18186 {&__pyx_kp_s_error_in_unlink, __pyx_k_error_in_unlink, sizeof(__pyx_k_error_in_unlink), 0, 0, 1, 0},
18187 {&__pyx_kp_s_error_in_write, __pyx_k_error_in_write, sizeof(__pyx_k_error_in_write), 0, 0, 1, 0},
18188 {&__pyx_n_s_existing, __pyx_k_existing, sizeof(__pyx_k_existing), 0, 0, 1, 1},
18189 {&__pyx_n_s_f_bavail, __pyx_k_f_bavail, sizeof(__pyx_k_f_bavail), 0, 0, 1, 1},
18190 {&__pyx_n_s_f_bfree, __pyx_k_f_bfree, sizeof(__pyx_k_f_bfree), 0, 0, 1, 1},
18191 {&__pyx_n_s_f_blocks, __pyx_k_f_blocks, sizeof(__pyx_k_f_blocks), 0, 0, 1, 1},
18192 {&__pyx_n_s_f_bsize, __pyx_k_f_bsize, sizeof(__pyx_k_f_bsize), 0, 0, 1, 1},
18193 {&__pyx_n_s_f_favail, __pyx_k_f_favail, sizeof(__pyx_k_f_favail), 0, 0, 1, 1},
18194 {&__pyx_n_s_f_ffree, __pyx_k_f_ffree, sizeof(__pyx_k_f_ffree), 0, 0, 1, 1},
18195 {&__pyx_n_s_f_files, __pyx_k_f_files, sizeof(__pyx_k_f_files), 0, 0, 1, 1},
18196 {&__pyx_n_s_f_flag, __pyx_k_f_flag, sizeof(__pyx_k_f_flag), 0, 0, 1, 1},
18197 {&__pyx_n_s_f_frsize, __pyx_k_f_frsize, sizeof(__pyx_k_f_frsize), 0, 0, 1, 1},
18198 {&__pyx_n_s_f_fsid, __pyx_k_f_fsid, sizeof(__pyx_k_f_fsid), 0, 0, 1, 1},
18199 {&__pyx_n_s_f_namemax, __pyx_k_f_namemax, sizeof(__pyx_k_f_namemax), 0, 0, 1, 1},
18200 {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
18201 {&__pyx_kp_s_fd_must_be_an_int, __pyx_k_fd_must_be_an_int, sizeof(__pyx_k_fd_must_be_an_int), 0, 0, 1, 0},
18202 {&__pyx_n_s_filesystem_name, __pyx_k_filesystem_name, sizeof(__pyx_k_filesystem_name), 0, 0, 1, 1},
18203 {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
18204 {&__pyx_kp_s_flags_must_be_a_int, __pyx_k_flags_must_be_a_int, sizeof(__pyx_k_flags_must_be_a_int), 0, 0, 1, 0},
18205 {&__pyx_kp_s_flags_must_be_a_string_or_an_int, __pyx_k_flags_must_be_a_string_or_an_int, sizeof(__pyx_k_flags_must_be_a_string_or_an_int), 0, 0, 1, 0},
18206 {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
18207 {&__pyx_n_s_fromtimestamp, __pyx_k_fromtimestamp, sizeof(__pyx_k_fromtimestamp), 0, 0, 1, 1},
18208 {&__pyx_kp_s_fsync_failed, __pyx_k_fsync_failed, sizeof(__pyx_k_fsync_failed), 0, 0, 1, 0},
18209 {&__pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_k_home_bhubbard_working_src_ceph, sizeof(__pyx_k_home_bhubbard_working_src_ceph), 0, 0, 1, 0},
18210 {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
18211 {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
18212 {&__pyx_n_s_init_2, __pyx_k_init_2, sizeof(__pyx_k_init_2), 0, 0, 1, 1},
18213 {&__pyx_n_s_initialized, __pyx_k_initialized, sizeof(__pyx_k_initialized), 0, 0, 1, 1},
18214 {&__pyx_n_s_input_data, __pyx_k_input_data, sizeof(__pyx_k_input_data), 0, 0, 1, 1},
18215 {&__pyx_n_s_is_dir, __pyx_k_is_dir, sizeof(__pyx_k_is_dir), 0, 0, 1, 1},
18216 {&__pyx_n_s_is_file, __pyx_k_is_file, sizeof(__pyx_k_is_file), 0, 0, 1, 1},
18217 {&__pyx_n_s_is_symbol_file, __pyx_k_is_symbol_file, sizeof(__pyx_k_is_symbol_file), 0, 0, 1, 1},
18218 {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
18219 {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1},
18220 {&__pyx_kp_s_l_must_be_an_int, __pyx_k_l_must_be_an_int, sizeof(__pyx_k_l_must_be_an_int), 0, 0, 1, 0},
18221 {&__pyx_kp_s_libcephfs_initialize_failed_with, __pyx_k_libcephfs_initialize_failed_with, sizeof(__pyx_k_libcephfs_initialize_failed_with), 0, 0, 1, 0},
18222 {&__pyx_n_s_list_str, __pyx_k_list_str, sizeof(__pyx_k_list_str), 0, 0, 1, 1},
18223 {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
18224 {&__pyx_kp_s_malloc_failed, __pyx_k_malloc_failed, sizeof(__pyx_k_malloc_failed), 0, 0, 1, 0},
18225 {&__pyx_n_s_mds_spec, __pyx_k_mds_spec, sizeof(__pyx_k_mds_spec), 0, 0, 1, 1},
18226 {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
18227 {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
18228 {&__pyx_kp_s_mode_must_be_an_int, __pyx_k_mode_must_be_an_int, sizeof(__pyx_k_mode_must_be_an_int), 0, 0, 1, 0},
18229 {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
18230 {&__pyx_n_s_mount, __pyx_k_mount, sizeof(__pyx_k_mount), 0, 0, 1, 1},
18231 {&__pyx_n_s_mount_root, __pyx_k_mount_root, sizeof(__pyx_k_mount_root), 0, 0, 1, 1},
18232 {&__pyx_n_s_mounted, __pyx_k_mounted, sizeof(__pyx_k_mounted), 0, 0, 1, 1},
18233 {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
18234 {&__pyx_n_s_namedtuple, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1},
18235 {&__pyx_n_s_newname, __pyx_k_newname, sizeof(__pyx_k_newname), 0, 0, 1, 1},
18236 {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
18237 {&__pyx_kp_s_offset_must_be_an_int, __pyx_k_offset_must_be_an_int, sizeof(__pyx_k_offset_must_be_an_int), 0, 0, 1, 0},
18238 {&__pyx_kp_s_open_flags_doesn_t_support_s, __pyx_k_open_flags_doesn_t_support_s, sizeof(__pyx_k_open_flags_doesn_t_support_s), 0, 0, 1, 0},
18239 {&__pyx_kp_s_opendir_failed, __pyx_k_opendir_failed, sizeof(__pyx_k_opendir_failed), 0, 0, 1, 0},
18240 {&__pyx_n_s_operation, __pyx_k_operation, sizeof(__pyx_k_operation), 0, 0, 1, 1},
18241 {&__pyx_kp_s_operation_must_be_an_int, __pyx_k_operation_must_be_an_int, sizeof(__pyx_k_operation_must_be_an_int), 0, 0, 1, 0},
18242 {&__pyx_n_s_opt, __pyx_k_opt, sizeof(__pyx_k_opt), 0, 0, 1, 1},
18243 {&__pyx_n_s_option, __pyx_k_option, sizeof(__pyx_k_option), 0, 0, 1, 1},
18244 {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
18245 {&__pyx_n_s_owner, __pyx_k_owner, sizeof(__pyx_k_owner), 0, 0, 1, 1},
18246 {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
18247 {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
18248 {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
18249 {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
18250 {&__pyx_n_s_rados_inst, __pyx_k_rados_inst, sizeof(__pyx_k_rados_inst), 0, 0, 1, 1},
18251 {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
18252 {&__pyx_n_s_readdir, __pyx_k_readdir, sizeof(__pyx_k_readdir), 0, 0, 1, 1},
18253 {&__pyx_kp_s_realloc_failed, __pyx_k_realloc_failed, sizeof(__pyx_k_realloc_failed), 0, 0, 1, 0},
18254 {&__pyx_n_s_require_state, __pyx_k_require_state, sizeof(__pyx_k_require_state), 0, 0, 1, 1},
18255 {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
18256 {&__pyx_kp_s_s_must_be_encodeable_as_a_bytea, __pyx_k_s_must_be_encodeable_as_a_bytea, sizeof(__pyx_k_s_must_be_encodeable_as_a_bytea), 0, 0, 1, 0},
18257 {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
18258 {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1},
18259 {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
18260 {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
18261 {&__pyx_n_s_src, __pyx_k_src, sizeof(__pyx_k_src), 0, 0, 1, 1},
18262 {&__pyx_n_s_st_atime, __pyx_k_st_atime, sizeof(__pyx_k_st_atime), 0, 0, 1, 1},
18263 {&__pyx_n_s_st_blksize, __pyx_k_st_blksize, sizeof(__pyx_k_st_blksize), 0, 0, 1, 1},
18264 {&__pyx_n_s_st_blocks, __pyx_k_st_blocks, sizeof(__pyx_k_st_blocks), 0, 0, 1, 1},
18265 {&__pyx_n_s_st_ctime, __pyx_k_st_ctime, sizeof(__pyx_k_st_ctime), 0, 0, 1, 1},
18266 {&__pyx_n_s_st_dev, __pyx_k_st_dev, sizeof(__pyx_k_st_dev), 0, 0, 1, 1},
18267 {&__pyx_n_s_st_gid, __pyx_k_st_gid, sizeof(__pyx_k_st_gid), 0, 0, 1, 1},
18268 {&__pyx_n_s_st_ino, __pyx_k_st_ino, sizeof(__pyx_k_st_ino), 0, 0, 1, 1},
18269 {&__pyx_n_s_st_mode, __pyx_k_st_mode, sizeof(__pyx_k_st_mode), 0, 0, 1, 1},
18270 {&__pyx_n_s_st_mtime, __pyx_k_st_mtime, sizeof(__pyx_k_st_mtime), 0, 0, 1, 1},
18271 {&__pyx_n_s_st_nlink, __pyx_k_st_nlink, sizeof(__pyx_k_st_nlink), 0, 0, 1, 1},
18272 {&__pyx_n_s_st_rdev, __pyx_k_st_rdev, sizeof(__pyx_k_st_rdev), 0, 0, 1, 1},
18273 {&__pyx_n_s_st_size, __pyx_k_st_size, sizeof(__pyx_k_st_size), 0, 0, 1, 1},
18274 {&__pyx_n_s_st_uid, __pyx_k_st_uid, sizeof(__pyx_k_st_uid), 0, 0, 1, 1},
18275 {&__pyx_kp_s_statfs_failed_s, __pyx_k_statfs_failed_s, sizeof(__pyx_k_statfs_failed_s), 0, 0, 1, 0},
18276 {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
18277 {&__pyx_n_s_str_type, __pyx_k_str_type, sizeof(__pyx_k_str_type), 0, 0, 1, 1},
18278 {&__pyx_n_s_strerror, __pyx_k_strerror, sizeof(__pyx_k_strerror), 0, 0, 1, 1},
18279 {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
18280 {&__pyx_kp_s_sync_fs_failed, __pyx_k_sync_fs_failed, sizeof(__pyx_k_sync_fs_failed), 0, 0, 1, 0},
18281 {&__pyx_n_s_syncdataonly, __pyx_k_syncdataonly, sizeof(__pyx_k_syncdataonly), 0, 0, 1, 1},
18282 {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
18283 {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
18284 {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
18285 {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
18286 {&__pyx_n_s_uninitialized, __pyx_k_uninitialized, sizeof(__pyx_k_uninitialized), 0, 0, 1, 1},
18287 {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
18288 {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
18289 {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
18290 {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
18291 {&__pyx_kp_s_value_must_be_a_bytes, __pyx_k_value_must_be_a_bytes, sizeof(__pyx_k_value_must_be_a_bytes), 0, 0, 1, 0},
18292 {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
18293 {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
18294 {&__pyx_n_s_whence, __pyx_k_whence, sizeof(__pyx_k_whence), 0, 0, 1, 1},
18295 {&__pyx_kp_s_whence_must_be_an_int, __pyx_k_whence_must_be_an_int, sizeof(__pyx_k_whence_must_be_an_int), 0, 0, 1, 0},
18296 {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
18297 {0, 0, 0, 0, 0, 0, 0}
18298};
18299static int __Pyx_InitCachedBuiltins(void) {
18300 __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__18300; goto __pyx_L1_error;}
18301 __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__18301; goto __pyx_L1_error;}
18302 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__18302; goto __pyx_L1_error;}
18303 __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__18303; goto __pyx_L1_error;}
18304 #if PY_MAJOR_VERSION2 >= 3
18305 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__18305; goto __pyx_L1_error;}
18306 #else
18307 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__18307; goto __pyx_L1_error;}
18308 #endif
18309 return 0;
18310 __pyx_L1_error:;
18311 return -1;
18312}
18313
18314static int __Pyx_InitCachedConstants(void) {
18315 __Pyx_RefNannyDeclarations
18316 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
18317
18318 /* "cephfs.pyx":302
18319 * if not self.handle:
18320 * raise make_ex(errno.EBADF, "dir is not open")
18321 * self.lib.require_state("mounted") # <<<<<<<<<<<<<<
18322 * with nogil:
18323 * ceph_rewinddir(self.lib.cluster, self.handle)
18324 */
18325 __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple_)__builtin_expect(!!(!__pyx_tuple_), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__18325; goto __pyx_L1_error;}
18326 __Pyx_GOTREF(__pyx_tuple_);
18327 __Pyx_GIVEREF(__pyx_tuple_);
18328
18329 /* "cephfs.pyx":312
18330 *
18331 * def readdir(self):
18332 * self.lib.require_state("mounted") # <<<<<<<<<<<<<<
18333 *
18334 * with nogil:
18335 */
18336 __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__2)__builtin_expect(!!(!__pyx_tuple__2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__18336; goto __pyx_L1_error;}
18337 __Pyx_GOTREF(__pyx_tuple__2);
18338 __Pyx_GIVEREF(__pyx_tuple__2);
18339
18340 /* "cephfs.pyx":327
18341 * def close(self):
18342 * if self.handle:
18343 * self.lib.require_state("mounted") # <<<<<<<<<<<<<<
18344 * with nogil:
18345 * ret = ceph_closedir(self.lib.cluster, self.handle)
18346 */
18347 __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__3)__builtin_expect(!!(!__pyx_tuple__3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__18347; goto __pyx_L1_error;}
18348 __Pyx_GOTREF(__pyx_tuple__3);
18349 __Pyx_GIVEREF(__pyx_tuple__3);
18350
18351 /* "cephfs.pyx":383
18352 * cdef char **ret = <char **>malloc(len(list_bytes) * sizeof(char *))
18353 * if ret == NULL:
18354 * raise MemoryError("malloc failed") # <<<<<<<<<<<<<<
18355 * for i in xrange(len(list_bytes)):
18356 * ret[i] = <char *>list_bytes[i]
18357 */
18358 __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_malloc_failed); if (unlikely(!__pyx_tuple__4)__builtin_expect(!!(!__pyx_tuple__4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__18358; goto __pyx_L1_error;}
18359 __Pyx_GOTREF(__pyx_tuple__4);
18360 __Pyx_GIVEREF(__pyx_tuple__4);
18361
18362 /* "cephfs.pyx":392
18363 * cdef void *ret = realloc(ptr, size)
18364 * if ret == NULL:
18365 * raise MemoryError("realloc failed") # <<<<<<<<<<<<<<
18366 * return ret
18367 *
18368 */
18369 __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_realloc_failed); if (unlikely(!__pyx_tuple__5)__builtin_expect(!!(!__pyx_tuple__5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__18369; goto __pyx_L1_error;}
18370 __Pyx_GOTREF(__pyx_tuple__5);
18371 __Pyx_GIVEREF(__pyx_tuple__5);
18372
18373 /* "cephfs.pyx":445
18374 * """
18375 * if conf is not None and not isinstance(conf, dict):
18376 * raise TypeError("conf must be dict or None") # <<<<<<<<<<<<<<
18377 * cstr(conffile, 'configfile', opt=True)
18378 * auth_id = cstr(auth_id, 'auth_id', opt=True)
18379 */
18380 __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_conf_must_be_dict_or_None); if (unlikely(!__pyx_tuple__6)__builtin_expect(!!(!__pyx_tuple__6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__18380; goto __pyx_L1_error;}
18381 __Pyx_GOTREF(__pyx_tuple__6);
18382 __Pyx_GIVEREF(__pyx_tuple__6);
18383
18384 /* "cephfs.pyx":488
18385 * :param argv: the argument list
18386 * """
18387 * self.require_state("configuring") # <<<<<<<<<<<<<<
18388 * cargv = cstr_list(argv, 'argv')
18389 * cdef:
18390 */
18391 __pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_s_configuring); if (unlikely(!__pyx_tuple__8)__builtin_expect(!!(!__pyx_tuple__8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__18391; goto __pyx_L1_error;}
18392 __Pyx_GOTREF(__pyx_tuple__8);
18393 __Pyx_GIVEREF(__pyx_tuple__8);
18394
18395 /* "cephfs.pyx":544
18396 * :param option: the config option to get
18397 * """
18398 * self.require_state("configuring", "initialized", "mounted") # <<<<<<<<<<<<<<
18399 *
18400 * option = cstr(option, 'option')
18401 */
18402 __pyx_tuple__9 = PyTuple_Pack(3, __pyx_n_s_configuring, __pyx_n_s_initialized, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__9)__builtin_expect(!!(!__pyx_tuple__9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__18402; goto __pyx_L1_error;}
18403 __Pyx_GOTREF(__pyx_tuple__9);
18404 __Pyx_GIVEREF(__pyx_tuple__9);
18405
18406 /* "cephfs.pyx":575
18407 * :param value: the value of the configuration option to set
18408 * """
18409 * self.require_state("configuring", "initialized", "mounted") # <<<<<<<<<<<<<<
18410 *
18411 * option = cstr(option, 'option')
18412 */
18413 __pyx_tuple__10 = PyTuple_Pack(3, __pyx_n_s_configuring, __pyx_n_s_initialized, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__10)__builtin_expect(!!(!__pyx_tuple__10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__18413; goto __pyx_L1_error;}
18414 __Pyx_GOTREF(__pyx_tuple__10);
18415 __Pyx_GIVEREF(__pyx_tuple__10);
18416
18417 /* "cephfs.pyx":592
18418 * Initialize the filesystem client (but do not mount the filesystem yet)
18419 * """
18420 * self.require_state("configuring") # <<<<<<<<<<<<<<
18421 * with nogil:
18422 * ret = ceph_init(self.cluster)
18423 */
18424 __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_configuring); if (unlikely(!__pyx_tuple__11)__builtin_expect(!!(!__pyx_tuple__11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__18424; goto __pyx_L1_error;}
18425 __Pyx_GOTREF(__pyx_tuple__11);
18426 __Pyx_GIVEREF(__pyx_tuple__11);
18427
18428 /* "cephfs.pyx":605
18429 * if self.state == "configuring":
18430 * self.init()
18431 * self.require_state("initialized") # <<<<<<<<<<<<<<
18432 *
18433 * # Configure which filesystem to mount if one was specified
18434 */
18435 __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_initialized); if (unlikely(!__pyx_tuple__12)__builtin_expect(!!(!__pyx_tuple__12), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__18435; goto __pyx_L1_error;}
18436 __Pyx_GOTREF(__pyx_tuple__12);
18437 __Pyx_GIVEREF(__pyx_tuple__12);
18438
18439 /* "cephfs.pyx":634
18440 * Unmount a mount handle.
18441 * """
18442 * self.require_state("mounted") # <<<<<<<<<<<<<<
18443 * with nogil:
18444 * ret = ceph_unmount(self.cluster)
18445 */
18446 __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__14)__builtin_expect(!!(!__pyx_tuple__14), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__18446; goto __pyx_L1_error;}
18447 __Pyx_GOTREF(__pyx_tuple__14);
18448 __Pyx_GIVEREF(__pyx_tuple__14);
18449
18450 /* "cephfs.pyx":645
18451 * Abort mds connections.
18452 * """
18453 * self.require_state("mounted") # <<<<<<<<<<<<<<
18454 * with nogil:
18455 * ret = ceph_abort_conn(self.cluster)
18456 */
18457 __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__15)__builtin_expect(!!(!__pyx_tuple__15), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__18457; goto __pyx_L1_error;}
18458 __Pyx_GOTREF(__pyx_tuple__15);
18459 __Pyx_GIVEREF(__pyx_tuple__15);
18460
18461 /* "cephfs.pyx":656
18462 * Get a global id for current instance
18463 * """
18464 * self.require_state("initialized", "mounted") # <<<<<<<<<<<<<<
18465 * with nogil:
18466 * ret = ceph_get_instance_id(self.cluster)
18467 */
18468 __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_s_initialized, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__16)__builtin_expect(!!(!__pyx_tuple__16), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__18468; goto __pyx_L1_error;}
18469 __Pyx_GOTREF(__pyx_tuple__16);
18470 __Pyx_GIVEREF(__pyx_tuple__16);
18471
18472 /* "cephfs.pyx":668
18473 * :param path: any path within the mounted filesystem
18474 * """
18475 * self.require_state("mounted") # <<<<<<<<<<<<<<
18476 * path = cstr(path, 'path')
18477 * cdef:
18478 */
18479 __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__17)__builtin_expect(!!(!__pyx_tuple__17), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__18479; goto __pyx_L1_error;}
18480 __Pyx_GOTREF(__pyx_tuple__17);
18481 __Pyx_GIVEREF(__pyx_tuple__17);
18482
18483 /* "cephfs.pyx":694
18484 * Synchronize all filesystem data to persistent media
18485 * """
18486 * self.require_state("mounted") # <<<<<<<<<<<<<<
18487 * with nogil:
18488 * ret = ceph_sync_fs(self.cluster)
18489 */
18490 __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__18)__builtin_expect(!!(!__pyx_tuple__18), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__18490; goto __pyx_L1_error;}
18491 __Pyx_GOTREF(__pyx_tuple__18);
18492 __Pyx_GIVEREF(__pyx_tuple__18);
18493
18494 /* "cephfs.pyx":708
18495 * or just data (1).
18496 * """
18497 * self.require_state("mounted") # <<<<<<<<<<<<<<
18498 * with nogil:
18499 * ret = ceph_fsync(self.cluster, fd, syncdataonly)
18500 */
18501 __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__19)__builtin_expect(!!(!__pyx_tuple__19), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__18501; goto __pyx_L1_error;}
18502 __Pyx_GOTREF(__pyx_tuple__19);
18503 __Pyx_GIVEREF(__pyx_tuple__19);
18504
18505 /* "cephfs.pyx":720
18506 * :rtype the path to the current working directory
18507 * """
18508 * self.require_state("mounted") # <<<<<<<<<<<<<<
18509 * with nogil:
18510 * ret = ceph_getcwd(self.cluster)
18511 */
18512 __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__20)__builtin_expect(!!(!__pyx_tuple__20), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__18512; goto __pyx_L1_error;}
18513 __Pyx_GOTREF(__pyx_tuple__20);
18514 __Pyx_GIVEREF(__pyx_tuple__20);
18515
18516 /* "cephfs.pyx":731
18517 * :param path the path to the working directory to change into.
18518 * """
18519 * self.require_state("mounted") # <<<<<<<<<<<<<<
18520 *
18521 * path = cstr(path, 'path')
18522 */
18523 __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__21)__builtin_expect(!!(!__pyx_tuple__21), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__18523; goto __pyx_L1_error;}
18524 __Pyx_GOTREF(__pyx_tuple__21);
18525 __Pyx_GIVEREF(__pyx_tuple__21);
18526
18527 /* "cephfs.pyx":748
18528 * :rtype handle: the open directory stream handle
18529 * """
18530 * self.require_state("mounted") # <<<<<<<<<<<<<<
18531 *
18532 * path = cstr(path, 'path')
18533 */
18534 __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__22)__builtin_expect(!!(!__pyx_tuple__22), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__18534; goto __pyx_L1_error;}
18535 __Pyx_GOTREF(__pyx_tuple__22);
18536 __Pyx_GIVEREF(__pyx_tuple__22);
18537
18538 /* "cephfs.pyx":774
18539 * closedir.
18540 * """
18541 * self.require_state("mounted") # <<<<<<<<<<<<<<
18542 *
18543 * return handle.readdir()
18544 */
18545 __pyx_tuple__23 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__23)__builtin_expect(!!(!__pyx_tuple__23), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__18545; goto __pyx_L1_error;}
18546 __Pyx_GOTREF(__pyx_tuple__23);
18547 __Pyx_GIVEREF(__pyx_tuple__23);
18548
18549 /* "cephfs.pyx":784
18550 * :param handle: the open directory stream handle
18551 * """
18552 * self.require_state("mounted") # <<<<<<<<<<<<<<
18553 *
18554 * return handle.close()
18555 */
18556 __pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__24)__builtin_expect(!!(!__pyx_tuple__24), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__18556; goto __pyx_L1_error;}
18557 __Pyx_GOTREF(__pyx_tuple__24);
18558 __Pyx_GIVEREF(__pyx_tuple__24);
18559
18560 /* "cephfs.pyx":797
18561 * """
18562 *
18563 * self.require_state("mounted") # <<<<<<<<<<<<<<
18564 * path = cstr(path, 'path')
18565 * if not isinstance(mode, int):
18566 */
18567 __pyx_tuple__25 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__25)__builtin_expect(!!(!__pyx_tuple__25), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__18567; goto __pyx_L1_error;}
18568 __Pyx_GOTREF(__pyx_tuple__25);
18569 __Pyx_GIVEREF(__pyx_tuple__25);
18570
18571 /* "cephfs.pyx":800
18572 * path = cstr(path, 'path')
18573 * if not isinstance(mode, int):
18574 * raise TypeError('mode must be an int') # <<<<<<<<<<<<<<
18575 * cdef:
18576 * char* _path = path
18577 */
18578 __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_mode_must_be_an_int); if (unlikely(!__pyx_tuple__26)__builtin_expect(!!(!__pyx_tuple__26), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__18578; goto __pyx_L1_error;}
18579 __Pyx_GOTREF(__pyx_tuple__26);
18580 __Pyx_GIVEREF(__pyx_tuple__26);
18581
18582 /* "cephfs.pyx":807
18583 * ret = ceph_mkdir(self.cluster, _path, _mode)
18584 * if ret < 0:
18585 * raise make_ex(ret, "error in mkdir {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
18586 *
18587 * def chmod(self, path, mode) :
18588 */
18589 __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__27)__builtin_expect(!!(!__pyx_tuple__27), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__18589; goto __pyx_L1_error;}
18590 __Pyx_GOTREF(__pyx_tuple__27);
18591 __Pyx_GIVEREF(__pyx_tuple__27);
18592
18593 /* "cephfs.pyx":816
18594 * :param mode the permissions the directory should have once created.
18595 * """
18596 * self.require_state("mounted") # <<<<<<<<<<<<<<
18597 * path = cstr(path, 'path')
18598 * if not isinstance(mode, int):
18599 */
18600 __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__28)__builtin_expect(!!(!__pyx_tuple__28), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__18600; goto __pyx_L1_error;}
18601 __Pyx_GOTREF(__pyx_tuple__28);
18602 __Pyx_GIVEREF(__pyx_tuple__28);
18603
18604 /* "cephfs.pyx":819
18605 * path = cstr(path, 'path')
18606 * if not isinstance(mode, int):
18607 * raise TypeError('mode must be an int') # <<<<<<<<<<<<<<
18608 * cdef:
18609 * char* _path = path
18610 */
18611 __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_mode_must_be_an_int); if (unlikely(!__pyx_tuple__29)__builtin_expect(!!(!__pyx_tuple__29), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__18611; goto __pyx_L1_error;}
18612 __Pyx_GOTREF(__pyx_tuple__29);
18613 __Pyx_GIVEREF(__pyx_tuple__29);
18614
18615 /* "cephfs.pyx":826
18616 * ret = ceph_chmod(self.cluster, _path, _mode)
18617 * if ret < 0:
18618 * raise make_ex(ret, "error in chmod {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
18619 *
18620 * def mkdirs(self, path, mode):
18621 */
18622 __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__30)__builtin_expect(!!(!__pyx_tuple__30), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__18622; goto __pyx_L1_error;}
18623 __Pyx_GOTREF(__pyx_tuple__30);
18624 __Pyx_GIVEREF(__pyx_tuple__30);
18625
18626 /* "cephfs.pyx":836
18627 * :param mode the permissions the directory should have once created
18628 * """
18629 * self.require_state("mounted") # <<<<<<<<<<<<<<
18630 * path = cstr(path, 'path')
18631 * if not isinstance(mode, int):
18632 */
18633 __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__31)__builtin_expect(!!(!__pyx_tuple__31), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__18633; goto __pyx_L1_error;}
18634 __Pyx_GOTREF(__pyx_tuple__31);
18635 __Pyx_GIVEREF(__pyx_tuple__31);
18636
18637 /* "cephfs.pyx":839
18638 * path = cstr(path, 'path')
18639 * if not isinstance(mode, int):
18640 * raise TypeError('mode must be an int') # <<<<<<<<<<<<<<
18641 * cdef:
18642 * char* _path = path
18643 */
18644 __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_mode_must_be_an_int); if (unlikely(!__pyx_tuple__32)__builtin_expect(!!(!__pyx_tuple__32), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__18644; goto __pyx_L1_error;}
18645 __Pyx_GOTREF(__pyx_tuple__32);
18646 __Pyx_GIVEREF(__pyx_tuple__32);
18647
18648 /* "cephfs.pyx":847
18649 * ret = ceph_mkdirs(self.cluster, _path, _mode)
18650 * if ret < 0:
18651 * raise make_ex(ret, "error in mkdirs {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
18652 *
18653 * def rmdir(self, path):
18654 */
18655 __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__33)__builtin_expect(!!(!__pyx_tuple__33), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__18655; goto __pyx_L1_error;}
18656 __Pyx_GOTREF(__pyx_tuple__33);
18657 __Pyx_GIVEREF(__pyx_tuple__33);
18658
18659 /* "cephfs.pyx":855
18660 * :param path: the path of the directory to remove.
18661 * """
18662 * self.require_state("mounted") # <<<<<<<<<<<<<<
18663 * path = cstr(path, 'path')
18664 * cdef char* _path = path
18665 */
18666 __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__34)__builtin_expect(!!(!__pyx_tuple__34), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__18666; goto __pyx_L1_error;}
18667 __Pyx_GOTREF(__pyx_tuple__34);
18668 __Pyx_GIVEREF(__pyx_tuple__34);
18669
18670 /* "cephfs.pyx":860
18671 * ret = ceph_rmdir(self.cluster, _path)
18672 * if ret < 0:
18673 * raise make_ex(ret, "error in rmdir {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
18674 *
18675 * def open(self, path, flags, mode=0):
18676 */
18677 __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__35)__builtin_expect(!!(!__pyx_tuple__35), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__18677; goto __pyx_L1_error;}
18678 __Pyx_GOTREF(__pyx_tuple__35);
18679 __Pyx_GIVEREF(__pyx_tuple__35);
18680
18681 /* "cephfs.pyx":872
18682 * is specified in the flags.
18683 * """
18684 * self.require_state("mounted") # <<<<<<<<<<<<<<
18685 * path = cstr(path, 'path')
18686 *
18687 */
18688 __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__36)__builtin_expect(!!(!__pyx_tuple__36), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__18688; goto __pyx_L1_error;}
18689 __Pyx_GOTREF(__pyx_tuple__36);
18690 __Pyx_GIVEREF(__pyx_tuple__36);
18691
18692 /* "cephfs.pyx":876
18693 *
18694 * if not isinstance(mode, int):
18695 * raise TypeError('mode must be an int') # <<<<<<<<<<<<<<
18696 * if isinstance(flags, str):
18697 * cephfs_flags = 0
18698 */
18699 __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_mode_must_be_an_int); if (unlikely(!__pyx_tuple__37)__builtin_expect(!!(!__pyx_tuple__37), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__18699; goto __pyx_L1_error;}
18700 __Pyx_GOTREF(__pyx_tuple__37);
18701 __Pyx_GIVEREF(__pyx_tuple__37);
18702
18703 /* "cephfs.pyx":905
18704 * cephfs_flags = flags
18705 * else:
18706 * raise TypeError("flags must be a string or an integer") # <<<<<<<<<<<<<<
18707 *
18708 * cdef:
18709 */
18710 __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_flags_must_be_a_string_or_an_int); if (unlikely(!__pyx_tuple__39)__builtin_expect(!!(!__pyx_tuple__39), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__18710; goto __pyx_L1_error;}
18711 __Pyx_GOTREF(__pyx_tuple__39);
18712 __Pyx_GIVEREF(__pyx_tuple__39);
18713
18714 /* "cephfs.pyx":915
18715 * ret = ceph_open(self.cluster, _path, _flags, _mode)
18716 * if ret < 0:
18717 * raise make_ex(ret, "error in open {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
18718 * return ret
18719 *
18720 */
18721 __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__40)__builtin_expect(!!(!__pyx_tuple__40), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__18721; goto __pyx_L1_error;}
18722 __Pyx_GOTREF(__pyx_tuple__40);
18723 __Pyx_GIVEREF(__pyx_tuple__40);
18724
18725 /* "cephfs.pyx":925
18726 * """
18727 *
18728 * self.require_state("mounted") # <<<<<<<<<<<<<<
18729 * if not isinstance(fd, int):
18730 * raise TypeError('fd must be an int')
18731 */
18732 __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__41)__builtin_expect(!!(!__pyx_tuple__41), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__18732; goto __pyx_L1_error;}
18733 __Pyx_GOTREF(__pyx_tuple__41);
18734 __Pyx_GIVEREF(__pyx_tuple__41);
18735
18736 /* "cephfs.pyx":927
18737 * self.require_state("mounted")
18738 * if not isinstance(fd, int):
18739 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
18740 * cdef int _fd = fd
18741 * with nogil:
18742 */
18743 __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_fd_must_be_an_int); if (unlikely(!__pyx_tuple__42)__builtin_expect(!!(!__pyx_tuple__42), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__18743; goto __pyx_L1_error;}
18744 __Pyx_GOTREF(__pyx_tuple__42);
18745 __Pyx_GIVEREF(__pyx_tuple__42);
18746
18747 /* "cephfs.pyx":943
18748 * :param l : the flag to indicate what type of seeking to perform
18749 * """
18750 * self.require_state("mounted") # <<<<<<<<<<<<<<
18751 * if not isinstance(offset, int):
18752 * raise TypeError('offset must be an int')
18753 */
18754 __pyx_tuple__43 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__43)__builtin_expect(!!(!__pyx_tuple__43), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__18754; goto __pyx_L1_error;}
18755 __Pyx_GOTREF(__pyx_tuple__43);
18756 __Pyx_GIVEREF(__pyx_tuple__43);
18757
18758 /* "cephfs.pyx":945
18759 * self.require_state("mounted")
18760 * if not isinstance(offset, int):
18761 * raise TypeError('offset must be an int') # <<<<<<<<<<<<<<
18762 * if not isinstance(l, int):
18763 * raise TypeError('l must be an int')
18764 */
18765 __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_offset_must_be_an_int); if (unlikely(!__pyx_tuple__44)__builtin_expect(!!(!__pyx_tuple__44), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__18765; goto __pyx_L1_error;}
18766 __Pyx_GOTREF(__pyx_tuple__44);
18767 __Pyx_GIVEREF(__pyx_tuple__44);
18768
18769 /* "cephfs.pyx":947
18770 * raise TypeError('offset must be an int')
18771 * if not isinstance(l, int):
18772 * raise TypeError('l must be an int') # <<<<<<<<<<<<<<
18773 * if not isinstance(fd, int):
18774 * raise TypeError('fd must be an int')
18775 */
18776 __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_l_must_be_an_int); if (unlikely(!__pyx_tuple__45)__builtin_expect(!!(!__pyx_tuple__45), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__18776; goto __pyx_L1_error;}
18777 __Pyx_GOTREF(__pyx_tuple__45);
18778 __Pyx_GIVEREF(__pyx_tuple__45);
18779
18780 /* "cephfs.pyx":949
18781 * raise TypeError('l must be an int')
18782 * if not isinstance(fd, int):
18783 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
18784 * cdef:
18785 * int _fd = fd
18786 */
18787 __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_fd_must_be_an_int); if (unlikely(!__pyx_tuple__46)__builtin_expect(!!(!__pyx_tuple__46), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__18787; goto __pyx_L1_error;}
18788 __Pyx_GOTREF(__pyx_tuple__46);
18789 __Pyx_GIVEREF(__pyx_tuple__46);
18790
18791 /* "cephfs.pyx":986
18792 * function writes to the current offset of the file descriptor.
18793 * """
18794 * self.require_state("mounted") # <<<<<<<<<<<<<<
18795 * if not isinstance(fd, int):
18796 * raise TypeError('fd must be an int')
18797 */
18798 __pyx_tuple__47 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__47)__builtin_expect(!!(!__pyx_tuple__47), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__18798; goto __pyx_L1_error;}
18799 __Pyx_GOTREF(__pyx_tuple__47);
18800 __Pyx_GIVEREF(__pyx_tuple__47);
18801
18802 /* "cephfs.pyx":988
18803 * self.require_state("mounted")
18804 * if not isinstance(fd, int):
18805 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
18806 * if not isinstance(buf, bytes):
18807 * raise TypeError('buf must be a bytes')
18808 */
18809 __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_fd_must_be_an_int); if (unlikely(!__pyx_tuple__48)__builtin_expect(!!(!__pyx_tuple__48), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__18809; goto __pyx_L1_error;}
18810 __Pyx_GOTREF(__pyx_tuple__48);
18811 __Pyx_GIVEREF(__pyx_tuple__48);
18812
18813 /* "cephfs.pyx":990
18814 * raise TypeError('fd must be an int')
18815 * if not isinstance(buf, bytes):
18816 * raise TypeError('buf must be a bytes') # <<<<<<<<<<<<<<
18817 * if not isinstance(offset, int):
18818 * raise TypeError('offset must be an int')
18819 */
18820 __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_buf_must_be_a_bytes); if (unlikely(!__pyx_tuple__49)__builtin_expect(!!(!__pyx_tuple__49), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__18820; goto __pyx_L1_error;}
18821 __Pyx_GOTREF(__pyx_tuple__49);
18822 __Pyx_GIVEREF(__pyx_tuple__49);
18823
18824 /* "cephfs.pyx":992
18825 * raise TypeError('buf must be a bytes')
18826 * if not isinstance(offset, int):
18827 * raise TypeError('offset must be an int') # <<<<<<<<<<<<<<
18828 *
18829 * cdef:
18830 */
18831 __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_offset_must_be_an_int); if (unlikely(!__pyx_tuple__50)__builtin_expect(!!(!__pyx_tuple__50), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__18831; goto __pyx_L1_error;}
18832 __Pyx_GOTREF(__pyx_tuple__50);
18833 __Pyx_GIVEREF(__pyx_tuple__50);
18834
18835 /* "cephfs.pyx":1015
18836 * :param owner: the user-supplied owner identifier (an arbitrary integer)
18837 * """
18838 * self.require_state("mounted") # <<<<<<<<<<<<<<
18839 * if not isinstance(fd, int):
18840 * raise TypeError('fd must be an int')
18841 */
18842 __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__51)__builtin_expect(!!(!__pyx_tuple__51), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__18842; goto __pyx_L1_error;}
18843 __Pyx_GOTREF(__pyx_tuple__51);
18844 __Pyx_GIVEREF(__pyx_tuple__51);
18845
18846 /* "cephfs.pyx":1017
18847 * self.require_state("mounted")
18848 * if not isinstance(fd, int):
18849 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
18850 * if not isinstance(operation, int):
18851 * raise TypeError('operation must be an int')
18852 */
18853 __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_fd_must_be_an_int); if (unlikely(!__pyx_tuple__52)__builtin_expect(!!(!__pyx_tuple__52), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__18853; goto __pyx_L1_error;}
18854 __Pyx_GOTREF(__pyx_tuple__52);
18855 __Pyx_GIVEREF(__pyx_tuple__52);
18856
18857 /* "cephfs.pyx":1019
18858 * raise TypeError('fd must be an int')
18859 * if not isinstance(operation, int):
18860 * raise TypeError('operation must be an int') # <<<<<<<<<<<<<<
18861 *
18862 * cdef:
18863 */
18864 __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_operation_must_be_an_int); if (unlikely(!__pyx_tuple__53)__builtin_expect(!!(!__pyx_tuple__53), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__18864; goto __pyx_L1_error;}
18865 __Pyx_GOTREF(__pyx_tuple__53);
18866 __Pyx_GIVEREF(__pyx_tuple__53);
18867
18868 /* "cephfs.pyx":1040
18869 * :param size: the size of the pre-allocated buffer
18870 * """
18871 * self.require_state("mounted") # <<<<<<<<<<<<<<
18872 *
18873 * path = cstr(path, 'path')
18874 */
18875 __pyx_tuple__54 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__54)__builtin_expect(!!(!__pyx_tuple__54), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__18875; goto __pyx_L1_error;}
18876 __Pyx_GOTREF(__pyx_tuple__54);
18877 __Pyx_GIVEREF(__pyx_tuple__54);
18878
18879 /* "cephfs.pyx":1073
18880 * :param value: the bytes of the extended attribute value
18881 * """
18882 * self.require_state("mounted") # <<<<<<<<<<<<<<
18883 *
18884 * name = cstr(name, 'name')
18885 */
18886 __pyx_tuple__55 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__55)__builtin_expect(!!(!__pyx_tuple__55), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__18886; goto __pyx_L1_error;}
18887 __Pyx_GOTREF(__pyx_tuple__55);
18888 __Pyx_GIVEREF(__pyx_tuple__55);
18889
18890 /* "cephfs.pyx":1078
18891 * path = cstr(path, 'path')
18892 * if not isinstance(flags, int):
18893 * raise TypeError('flags must be a int') # <<<<<<<<<<<<<<
18894 * if not isinstance(value, bytes):
18895 * raise TypeError('value must be a bytes')
18896 */
18897 __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_flags_must_be_a_int); if (unlikely(!__pyx_tuple__56)__builtin_expect(!!(!__pyx_tuple__56), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__18897; goto __pyx_L1_error;}
18898 __Pyx_GOTREF(__pyx_tuple__56);
18899 __Pyx_GIVEREF(__pyx_tuple__56);
18900
18901 /* "cephfs.pyx":1080
18902 * raise TypeError('flags must be a int')
18903 * if not isinstance(value, bytes):
18904 * raise TypeError('value must be a bytes') # <<<<<<<<<<<<<<
18905 *
18906 * cdef:
18907 */
18908 __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_value_must_be_a_bytes); if (unlikely(!__pyx_tuple__57)__builtin_expect(!!(!__pyx_tuple__57), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__18908; goto __pyx_L1_error;}
18909 __Pyx_GOTREF(__pyx_tuple__57);
18910 __Pyx_GIVEREF(__pyx_tuple__57);
18911
18912 /* "cephfs.pyx":1102
18913 * :param path: the file or directory to get the statistics of.
18914 * """
18915 * self.require_state("mounted") # <<<<<<<<<<<<<<
18916 * path = cstr(path, 'path')
18917 *
18918 */
18919 __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__58)__builtin_expect(!!(!__pyx_tuple__58), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__18919; goto __pyx_L1_error;}
18920 __Pyx_GOTREF(__pyx_tuple__58);
18921 __Pyx_GIVEREF(__pyx_tuple__58);
18922
18923 /* "cephfs.pyx":1113
18924 * ret = ceph_statx(self.cluster, _path, &stx, 0x7ffu, 0)
18925 * if ret < 0:
18926 * raise make_ex(ret, "error in stat: {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
18927 * return StatResult(st_dev=stx.stx_dev, st_ino=stx.stx_ino,
18928 * st_mode=stx.stx_mode, st_nlink=stx.stx_nlink,
18929 */
18930 __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__59)__builtin_expect(!!(!__pyx_tuple__59), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__18930; goto __pyx_L1_error;}
18931 __Pyx_GOTREF(__pyx_tuple__59);
18932 __Pyx_GIVEREF(__pyx_tuple__59);
18933
18934 /* "cephfs.pyx":1130
18935 * :param fd: the file descriptor of the file to get statistics of.
18936 * """
18937 * self.require_state("mounted") # <<<<<<<<<<<<<<
18938 * if not isinstance(fd, int):
18939 * raise TypeError('fd must be an int')
18940 */
18941 __pyx_tuple__60 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__60)__builtin_expect(!!(!__pyx_tuple__60), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__18941; goto __pyx_L1_error;}
18942 __Pyx_GOTREF(__pyx_tuple__60);
18943 __Pyx_GIVEREF(__pyx_tuple__60);
18944
18945 /* "cephfs.pyx":1132
18946 * self.require_state("mounted")
18947 * if not isinstance(fd, int):
18948 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
18949 *
18950 * cdef:
18951 */
18952 __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_fd_must_be_an_int); if (unlikely(!__pyx_tuple__61)__builtin_expect(!!(!__pyx_tuple__61), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__18952; goto __pyx_L1_error;}
18953 __Pyx_GOTREF(__pyx_tuple__61);
18954 __Pyx_GIVEREF(__pyx_tuple__61);
18955
18956 /* "cephfs.pyx":1160
18957 * :param newname: the path to the new file/directory to link from.
18958 * """
18959 * self.require_state("mounted") # <<<<<<<<<<<<<<
18960 * existing = cstr(existing, 'existing')
18961 * newname = cstr(newname, 'newname')
18962 */
18963 __pyx_tuple__62 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__62)__builtin_expect(!!(!__pyx_tuple__62), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__18963; goto __pyx_L1_error;}
18964 __Pyx_GOTREF(__pyx_tuple__62);
18965 __Pyx_GIVEREF(__pyx_tuple__62);
18966
18967 /* "cephfs.pyx":1180
18968 * """
18969 *
18970 * self.require_state("mounted") # <<<<<<<<<<<<<<
18971 * existing = cstr(existing, 'existing')
18972 * newname = cstr(newname, 'newname')
18973 */
18974 __pyx_tuple__63 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__63)__builtin_expect(!!(!__pyx_tuple__63), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__18974; goto __pyx_L1_error;}
18975 __Pyx_GOTREF(__pyx_tuple__63);
18976 __Pyx_GIVEREF(__pyx_tuple__63);
18977
18978 /* "cephfs.pyx":1200
18979 * :rtype buf: buffer to hold the path of the file that the symlink points to.
18980 * """
18981 * self.require_state("mounted") # <<<<<<<<<<<<<<
18982 * path = cstr(path, 'path')
18983 *
18984 */
18985 __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__64)__builtin_expect(!!(!__pyx_tuple__64), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__18985; goto __pyx_L1_error;}
18986 __Pyx_GOTREF(__pyx_tuple__64);
18987 __Pyx_GIVEREF(__pyx_tuple__64);
18988
18989 /* "cephfs.pyx":1225
18990 * :param path: the path of the file or link to unlink.
18991 * """
18992 * self.require_state("mounted") # <<<<<<<<<<<<<<
18993 * path = cstr(path, 'path')
18994 * cdef char* _path = path
18995 */
18996 __pyx_tuple__65 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__65)__builtin_expect(!!(!__pyx_tuple__65), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__18996; goto __pyx_L1_error;}
18997 __Pyx_GOTREF(__pyx_tuple__65);
18998 __Pyx_GIVEREF(__pyx_tuple__65);
18999
19000 /* "cephfs.pyx":1231
19001 * ret = ceph_unlink(self.cluster, _path)
19002 * if ret < 0:
19003 * raise make_ex(ret, "error in unlink: {}".format(path.decode('utf-8'))) # <<<<<<<<<<<<<<
19004 *
19005 * def rename(self, src, dst):
19006 */
19007 __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__66)__builtin_expect(!!(!__pyx_tuple__66), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__19007; goto __pyx_L1_error;}
19008 __Pyx_GOTREF(__pyx_tuple__66);
19009 __Pyx_GIVEREF(__pyx_tuple__66);
19010
19011 /* "cephfs.pyx":1241
19012 * """
19013 *
19014 * self.require_state("mounted") # <<<<<<<<<<<<<<
19015 *
19016 * src = cstr(src, 'source')
19017 */
19018 __pyx_tuple__67 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__67)__builtin_expect(!!(!__pyx_tuple__67), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__19018; goto __pyx_L1_error;}
19019 __Pyx_GOTREF(__pyx_tuple__67);
19020 __Pyx_GIVEREF(__pyx_tuple__67);
19021
19022 /* "cephfs.pyx":1253
19023 * ret = ceph_rename(self.cluster, _src, _dst)
19024 * if ret < 0:
19025 * raise make_ex(ret, "error in rename {} to {}".format(src.decode( # <<<<<<<<<<<<<<
19026 * 'utf-8'), dst.decode('utf-8')))
19027 *
19028 */
19029 __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__68)__builtin_expect(!!(!__pyx_tuple__68), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__19029; goto __pyx_L1_error;}
19030 __Pyx_GOTREF(__pyx_tuple__68);
19031 __Pyx_GIVEREF(__pyx_tuple__68);
19032
19033 /* "cephfs.pyx":1254
19034 * if ret < 0:
19035 * raise make_ex(ret, "error in rename {} to {}".format(src.decode(
19036 * 'utf-8'), dst.decode('utf-8'))) # <<<<<<<<<<<<<<
19037 *
19038 * def mds_command(self, mds_spec, args, input_data):
19039 */
19040 __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__69)__builtin_expect(!!(!__pyx_tuple__69), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__19040; goto __pyx_L1_error;}
19041 __Pyx_GOTREF(__pyx_tuple__69);
19042 __Pyx_GIVEREF(__pyx_tuple__69);
19043
19044 /* "cephfs.pyx":1295
19045 *
19046 * def umask(self, mode) :
19047 * self.require_state("mounted") # <<<<<<<<<<<<<<
19048 * cdef:
19049 * mode_t _mode = mode
19050 */
19051 __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__70)__builtin_expect(!!(!__pyx_tuple__70), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__19051; goto __pyx_L1_error;}
19052 __Pyx_GOTREF(__pyx_tuple__70);
19053 __Pyx_GIVEREF(__pyx_tuple__70);
19054
19055 /* "cephfs.pyx":1313
19056 * :param whence : the flag to indicate what type of seeking to performs:SEEK_SET, SEEK_CUR, SEEK_END
19057 * """
19058 * self.require_state("mounted") # <<<<<<<<<<<<<<
19059 * if not isinstance(fd, int):
19060 * raise TypeError('fd must be an int')
19061 */
19062 __pyx_tuple__71 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__71)__builtin_expect(!!(!__pyx_tuple__71), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__19062; goto __pyx_L1_error;}
19063 __Pyx_GOTREF(__pyx_tuple__71);
19064 __Pyx_GIVEREF(__pyx_tuple__71);
19065
19066 /* "cephfs.pyx":1315
19067 * self.require_state("mounted")
19068 * if not isinstance(fd, int):
19069 * raise TypeError('fd must be an int') # <<<<<<<<<<<<<<
19070 * if not isinstance(offset, int):
19071 * raise TypeError('offset must be an int')
19072 */
19073 __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_fd_must_be_an_int); if (unlikely(!__pyx_tuple__72)__builtin_expect(!!(!__pyx_tuple__72), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__19073; goto __pyx_L1_error;}
19074 __Pyx_GOTREF(__pyx_tuple__72);
19075 __Pyx_GIVEREF(__pyx_tuple__72);
19076
19077 /* "cephfs.pyx":1317
19078 * raise TypeError('fd must be an int')
19079 * if not isinstance(offset, int):
19080 * raise TypeError('offset must be an int') # <<<<<<<<<<<<<<
19081 * if not isinstance(whence, int):
19082 * raise TypeError('whence must be an int')
19083 */
19084 __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_offset_must_be_an_int); if (unlikely(!__pyx_tuple__73)__builtin_expect(!!(!__pyx_tuple__73), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__19084; goto __pyx_L1_error;}
19085 __Pyx_GOTREF(__pyx_tuple__73);
19086 __Pyx_GIVEREF(__pyx_tuple__73);
19087
19088 /* "cephfs.pyx":1319
19089 * raise TypeError('offset must be an int')
19090 * if not isinstance(whence, int):
19091 * raise TypeError('whence must be an int') # <<<<<<<<<<<<<<
19092 *
19093 * cdef:
19094 */
19095 __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_whence_must_be_an_int); if (unlikely(!__pyx_tuple__74)__builtin_expect(!!(!__pyx_tuple__74), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__19095; goto __pyx_L1_error;}
19096 __Pyx_GOTREF(__pyx_tuple__74);
19097 __Pyx_GIVEREF(__pyx_tuple__74);
19098
19099 /* "cephfs.pyx":161
19100 *
19101 * class OSError(Error):
19102 * def __init__(self, errno, strerror): # <<<<<<<<<<<<<<
19103 * super(OSError, self).__init__(errno, strerror)
19104 * self.errno = errno
19105 */
19106 __pyx_tuple__75 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_errno, __pyx_n_s_strerror); if (unlikely(!__pyx_tuple__75)__builtin_expect(!!(!__pyx_tuple__75), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__19106; goto __pyx_L1_error;}
19107 __Pyx_GOTREF(__pyx_tuple__75);
19108 __Pyx_GIVEREF(__pyx_tuple__75);
19109 __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 161, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 161
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__76)__builtin_expect(!!(!__pyx_codeobj__76), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__19109; goto __pyx_L1_error;}
19110
19111 /* "cephfs.pyx":166
19112 * self.strerror = strerror
19113 *
19114 * def __str__(self): # <<<<<<<<<<<<<<
19115 * return '{0}: {1} [Errno {2}]'.format(self.strerror, os.strerror(self.errno), self.errno)
19116 *
19117 */
19118 __pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__77)__builtin_expect(!!(!__pyx_tuple__77), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__19118; goto __pyx_L1_error;}
19119 __Pyx_GOTREF(__pyx_tuple__77);
19120 __Pyx_GIVEREF(__pyx_tuple__77);
19121 __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_str, 166, __pyx_empty_bytes)PyCode_New(1 +0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_str, 166
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__78)__builtin_expect(!!(!__pyx_codeobj__78), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__19121; goto __pyx_L1_error;}
19122
19123 /* "cephfs.pyx":270
19124 * DT_REG = 0xA
19125 * DT_LNK = 0xC
19126 * def is_dir(self): # <<<<<<<<<<<<<<
19127 * return self.d_type == self.DT_DIR
19128 *
19129 */
19130 __pyx_tuple__79 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__79)__builtin_expect(!!(!__pyx_tuple__79), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__19130; goto __pyx_L1_error;}
19131 __Pyx_GOTREF(__pyx_tuple__79);
19132 __Pyx_GIVEREF(__pyx_tuple__79);
19133 __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_is_dir, 270, __pyx_empty_bytes)PyCode_New(1 +0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_is_dir
, 270, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__80)__builtin_expect(!!(!__pyx_codeobj__80), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__19133; goto __pyx_L1_error;}
19134
19135 /* "cephfs.pyx":273
19136 * return self.d_type == self.DT_DIR
19137 *
19138 * def is_symbol_file(self): # <<<<<<<<<<<<<<
19139 * return self.d_type == self.DT_LNK
19140 *
19141 */
19142 __pyx_tuple__81 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__81)__builtin_expect(!!(!__pyx_tuple__81), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__19142; goto __pyx_L1_error;}
19143 __Pyx_GOTREF(__pyx_tuple__81);
19144 __Pyx_GIVEREF(__pyx_tuple__81);
19145 __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_is_symbol_file, 273, __pyx_empty_bytes)PyCode_New(1 +0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_is_symbol_file
, 273, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__82)__builtin_expect(!!(!__pyx_codeobj__82), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__19145; goto __pyx_L1_error;}
19146
19147 /* "cephfs.pyx":276
19148 * return self.d_type == self.DT_LNK
19149 *
19150 * def is_file(self): # <<<<<<<<<<<<<<
19151 * return self.d_type == self.DT_REG
19152 *
19153 */
19154 __pyx_tuple__83 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__83)__builtin_expect(!!(!__pyx_tuple__83), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__19154; goto __pyx_L1_error;}
19155 __Pyx_GOTREF(__pyx_tuple__83);
19156 __Pyx_GIVEREF(__pyx_tuple__83);
19157 __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_is_file, 276, __pyx_empty_bytes)PyCode_New(1 +0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_is_file
, 276, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__84)__builtin_expect(!!(!__pyx_codeobj__84), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__19157; goto __pyx_L1_error;}
19158
19159 /* "cephfs.pyx":334
19160 * self.handle = NULL
19161 *
19162 * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<<
19163 * """
19164 * Create a byte string from a Python string
19165 */
19166 __pyx_tuple__85 = PyTuple_Pack(5, __pyx_n_s_val, __pyx_n_s_name, __pyx_n_s_encoding, __pyx_n_s_opt, __pyx_n_s_v); if (unlikely(!__pyx_tuple__85)__builtin_expect(!!(!__pyx_tuple__85), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__19166; goto __pyx_L1_error;}
19167 __Pyx_GOTREF(__pyx_tuple__85);
19168 __Pyx_GIVEREF(__pyx_tuple__85);
19169 __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_cstr, 334, __pyx_empty_bytes)PyCode_New(4 +0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_cstr, 334
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__86)__builtin_expect(!!(!__pyx_codeobj__86), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__19169; goto __pyx_L1_error;}
19170
19171 /* "cephfs.pyx":357
19172 * return v
19173 *
19174 * def cstr_list(list_str, name, encoding="utf-8"): # <<<<<<<<<<<<<<
19175 * return [cstr(s, name) for s in list_str]
19176 *
19177 */
19178 __pyx_tuple__87 = PyTuple_Pack(4, __pyx_n_s_list_str, __pyx_n_s_name, __pyx_n_s_encoding, __pyx_n_s_s); if (unlikely(!__pyx_tuple__87)__builtin_expect(!!(!__pyx_tuple__87), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__19178; goto __pyx_L1_error;}
19179 __Pyx_GOTREF(__pyx_tuple__87);
19180 __Pyx_GIVEREF(__pyx_tuple__87);
19181 __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_cstr_list, 357, __pyx_empty_bytes)PyCode_New(3 +0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_cstr_list
, 357, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__88)__builtin_expect(!!(!__pyx_codeobj__88), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__19181; goto __pyx_L1_error;}
19182
19183 /* "cephfs.pyx":361
19184 *
19185 *
19186 * def decode_cstr(val, encoding="utf-8"): # <<<<<<<<<<<<<<
19187 * """
19188 * Decode a byte string into a Python string.
19189 */
19190 __pyx_tuple__89 = PyTuple_Pack(2, __pyx_n_s_val, __pyx_n_s_encoding); if (unlikely(!__pyx_tuple__89)__builtin_expect(!!(!__pyx_tuple__89), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__19190; goto __pyx_L1_error;}
19191 __Pyx_GOTREF(__pyx_tuple__89);
19192 __Pyx_GIVEREF(__pyx_tuple__89);
19193 __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_decode_cstr, 361, __pyx_empty_bytes)PyCode_New(2 +0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_decode_cstr
, 361, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__90)__builtin_expect(!!(!__pyx_codeobj__90), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__19193; goto __pyx_L1_error;}
19194 __Pyx_RefNannyFinishContext();
19195 return 0;
19196 __pyx_L1_error:;
19197 __Pyx_RefNannyFinishContext();
19198 return -1;
19199}
19200
19201static int __Pyx_InitGlobals(void) {
19202 if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19202; goto __pyx_L1_error;};
19203 __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)__builtin_expect(!!(!__pyx_int_0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19203; goto __pyx_L1_error;}
19204 __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)__builtin_expect(!!(!__pyx_int_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19204; goto __pyx_L1_error;}
19205 __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)__builtin_expect(!!(!__pyx_int_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19205; goto __pyx_L1_error;}
19206 __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)__builtin_expect(!!(!__pyx_int_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19206; goto __pyx_L1_error;}
19207 __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)__builtin_expect(!!(!__pyx_int_12), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19207; goto __pyx_L1_error;}
19208 __pyx_int_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)__builtin_expect(!!(!__pyx_int_255), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19208; goto __pyx_L1_error;}
19209 return 0;
19210 __pyx_L1_error:;
19211 return -1;
19212}
19213
19214#if PY_MAJOR_VERSION2 < 3
19215PyMODINIT_FUNCvoid initcephfs(void); /*proto*/
19216PyMODINIT_FUNCvoid initcephfs(void)
19217#else
19218PyMODINIT_FUNCvoid PyInit_cephfs(void); /*proto*/
19219PyMODINIT_FUNCvoid PyInit_cephfs(void)
19220#endif
19221{
19222 PyObject *__pyx_t_1 = NULL((void*)0);
19223 PyObject *__pyx_t_2 = NULL((void*)0);
19224 int __pyx_t_3;
19225 PyObject *__pyx_t_4 = NULL((void*)0);
19226 PyObject *__pyx_t_5 = NULL((void*)0);
19227 Py_ssize_t __pyx_t_6;
19228 PyObject *__pyx_t_7 = NULL((void*)0);
19229 int __pyx_lineno = 0;
19230 const char *__pyx_filename = NULL((void*)0);
19231 int __pyx_clineno = 0;
19232 __Pyx_RefNannyDeclarations
19233 #if CYTHON_REFNANNY0
19234 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
19235 if (!__Pyx_RefNanny) {
19236 PyErr_Clear();
19237 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
19238 if (!__Pyx_RefNanny)
19239 Py_FatalError("failed to import 'refnanny' module");
19240 }
19241 #endif
19242 __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_cephfs(void)", 0);
19243 if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19243; goto __pyx_L1_error;}
19244 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)__builtin_expect(!!(!__pyx_empty_tuple), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19244; goto __pyx_L1_error;}
19245 __pyx_empty_bytes = PyBytes_FromStringAndSizePyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)__builtin_expect(!!(!__pyx_empty_bytes), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19245; goto __pyx_L1_error;}
19246 #ifdef __Pyx_CyFunction_USED1
19247 if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19247; goto __pyx_L1_error;}
19248 #endif
19249 #ifdef __Pyx_FusedFunction_USED
19250 if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19250; goto __pyx_L1_error;}
19251 #endif
19252 #ifdef __Pyx_Coroutine_USED
19253 if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19253; goto __pyx_L1_error;}
19254 #endif
19255 #ifdef __Pyx_Generator_USED
19256 if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19256; goto __pyx_L1_error;}
19257 #endif
19258 #ifdef __Pyx_StopAsyncIteration_USED
19259 if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19259; goto __pyx_L1_error;}
19260 #endif
19261 /*--- Library function declarations ---*/
19262 /*--- Threads initialization code ---*/
19263 #if defined(__PYX_FORCE_INIT_THREADS0) && __PYX_FORCE_INIT_THREADS0
19264 #ifdef WITH_THREAD1 /* Python build with threading support? */
19265 PyEval_InitThreads();
19266 #endif
19267 #endif
19268 /*--- Module creation code ---*/
19269 #if PY_MAJOR_VERSION2 < 3
19270 __pyx_m = Py_InitModule4Py_InitModule4_64("cephfs", __pyx_methods, __pyx_k_This_module_is_a_thin_wrapper_a, 0, PYTHON_API_VERSION1013); Py_XINCREF(__pyx_m)do { if ((__pyx_m) == ((void*)0)) ; else ( ((PyObject*)(__pyx_m
))->ob_refcnt++); } while (0)
;
19271 #else
19272 __pyx_m = PyModule_Create(&__pyx_moduledef);
19273 #endif
19274 if (unlikely(!__pyx_m)__builtin_expect(!!(!__pyx_m), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19274; goto __pyx_L1_error;}
19275 __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)__builtin_expect(!!(!__pyx_d), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19275; goto __pyx_L1_error;}
19276 Py_INCREF(__pyx_d)( ((PyObject*)(__pyx_d))->ob_refcnt++);
19277 __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME"__builtin__"); if (unlikely(!__pyx_b)__builtin_expect(!!(!__pyx_b), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19277; goto __pyx_L1_error;}
19278 #if CYTHON_COMPILING_IN_PYPY0
19279 Py_INCREF(__pyx_b)( ((PyObject*)(__pyx_b))->ob_refcnt++);
19280 #endif
19281 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19281; goto __pyx_L1_error;};
19282 /*--- Initialize various global constants etc. ---*/
19283 if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19283; goto __pyx_L1_error;}
19284 #if PY_MAJOR_VERSION2 < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0)
19285 if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19285; goto __pyx_L1_error;}
19286 #endif
19287 if (__pyx_module_is_main_cephfs) {
19288 if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19288; goto __pyx_L1_error;}
19289 }
19290 #if PY_MAJOR_VERSION2 >= 3
19291 {
19292 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)__builtin_expect(!!(!modules), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19292; goto __pyx_L1_error;}
19293 if (!PyDict_GetItemString(modules, "cephfs")) {
19294 if (unlikely(PyDict_SetItemString(modules, "cephfs", __pyx_m) < 0)__builtin_expect(!!(PyDict_SetItemString(modules, "cephfs", __pyx_m
) < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19294; goto __pyx_L1_error;}
19295 }
19296 }
19297 #endif
19298 /*--- Builtin init code ---*/
19299 if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19299; goto __pyx_L1_error;}
19300 /*--- Constants init code ---*/
19301 if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19301; goto __pyx_L1_error;}
19302 /*--- Global init code ---*/
19303 __pyx_v_6cephfs_errno_to_exception = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
19304 /*--- Variable export code ---*/
19305 /*--- Function export code ---*/
19306 /*--- Type init code ---*/
19307 if (PyType_Ready(&__pyx_type_6cephfs_DirResult) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__19307; goto __pyx_L1_error;}
19308 __pyx_type_6cephfs_DirResult.tp_print = 0;
19309 if (PyObject_SetAttrString(__pyx_m, "DirResult", (PyObject *)&__pyx_type_6cephfs_DirResult) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__19309; goto __pyx_L1_error;}
19310 __pyx_ptype_6cephfs_DirResult = &__pyx_type_6cephfs_DirResult;
19311 if (PyType_Ready(&__pyx_type_6cephfs_LibCephFS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__19311; goto __pyx_L1_error;}
19312 __pyx_type_6cephfs_LibCephFS.tp_print = 0;
19313 if (PyObject_SetAttrString(__pyx_m, "LibCephFS", (PyObject *)&__pyx_type_6cephfs_LibCephFS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__19313; goto __pyx_L1_error;}
19314 __pyx_ptype_6cephfs_LibCephFS = &__pyx_type_6cephfs_LibCephFS;
19315 /*--- Type import code ---*/
19316 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME"__builtin__", "type",
19317 #if CYTHON_COMPILING_IN_PYPY0
19318 sizeof(PyTypeObject),
19319 #else
19320 sizeof(PyHeapTypeObject),
19321 #endif
19322 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)__builtin_expect(!!(!__pyx_ptype_7cpython_4type_type), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__19322; goto __pyx_L1_error;}
19323 __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME"__builtin__", "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)__builtin_expect(!!(!__pyx_ptype_7cpython_4bool_bool), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__19323; goto __pyx_L1_error;}
19324 __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME"__builtin__", "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)__builtin_expect(!!(!__pyx_ptype_7cpython_7complex_complex), 0
)
) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__19324; goto __pyx_L1_error;}
19325 __pyx_ptype_5rados_Rados = __Pyx_ImportType("rados", "Rados", sizeof(struct __pyx_obj_5rados_Rados), 1); if (unlikely(!__pyx_ptype_5rados_Rados)__builtin_expect(!!(!__pyx_ptype_5rados_Rados), 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__19325; goto __pyx_L1_error;}
19326 __pyx_ptype_5rados_Ioctx = __Pyx_ImportType("rados", "Ioctx", sizeof(struct __pyx_obj_5rados_Ioctx), 1); if (unlikely(!__pyx_ptype_5rados_Ioctx)__builtin_expect(!!(!__pyx_ptype_5rados_Ioctx), 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__19326; goto __pyx_L1_error;}
19327 /*--- Variable import code ---*/
19328 /*--- Function import code ---*/
19329 /*--- Execution code ---*/
19330 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
19331 if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__19331; goto __pyx_L1_error;}
19332 #endif
19333
19334 /* "cephfs.pyx":12
19335 * cimport rados
19336 *
19337 * from collections import namedtuple # <<<<<<<<<<<<<<
19338 * from datetime import datetime
19339 * import errno
19340 */
19341 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__19341; goto __pyx_L1_error;}
19342 __Pyx_GOTREF(__pyx_t_1);
19343 __Pyx_INCREF(__pyx_n_s_namedtuple)( ((PyObject*)(__pyx_n_s_namedtuple))->ob_refcnt++);
19344 __Pyx_GIVEREF(__pyx_n_s_namedtuple);
19345 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_namedtuple)(((PyListObject *)(__pyx_t_1))->ob_item[0] = (__pyx_n_s_namedtuple
))
;
19346 __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__19346; goto __pyx_L1_error;}
19347 __Pyx_GOTREF(__pyx_t_2);
19348 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19349 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__19349; goto __pyx_L1_error;}
19350 __Pyx_GOTREF(__pyx_t_1);
19351 if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__19351; goto __pyx_L1_error;}
19352 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19353 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19354
19355 /* "cephfs.pyx":13
19356 *
19357 * from collections import namedtuple
19358 * from datetime import datetime # <<<<<<<<<<<<<<
19359 * import errno
19360 * import os
19361 */
19362 __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__19362; goto __pyx_L1_error;}
19363 __Pyx_GOTREF(__pyx_t_2);
19364 __Pyx_INCREF(__pyx_n_s_datetime)( ((PyObject*)(__pyx_n_s_datetime))->ob_refcnt++);
19365 __Pyx_GIVEREF(__pyx_n_s_datetime);
19366 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_datetime)(((PyListObject *)(__pyx_t_2))->ob_item[0] = (__pyx_n_s_datetime
))
;
19367 __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__19367; goto __pyx_L1_error;}
19368 __Pyx_GOTREF(__pyx_t_1);
19369 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19370 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__19370; goto __pyx_L1_error;}
19371 __Pyx_GOTREF(__pyx_t_2);
19372 if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__19372; goto __pyx_L1_error;}
19373 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19374 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19375
19376 /* "cephfs.pyx":14
19377 * from collections import namedtuple
19378 * from datetime import datetime
19379 * import errno # <<<<<<<<<<<<<<
19380 * import os
19381 * import sys
19382 */
19383 __pyx_t_1 = __Pyx_Import(__pyx_n_s_errno, 0, -1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__19383; goto __pyx_L1_error;}
19384 __Pyx_GOTREF(__pyx_t_1);
19385 if (PyDict_SetItem(__pyx_d, __pyx_n_s_errno, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__19385; goto __pyx_L1_error;}
19386 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19387
19388 /* "cephfs.pyx":15
19389 * from datetime import datetime
19390 * import errno
19391 * import os # <<<<<<<<<<<<<<
19392 * import sys
19393 *
19394 */
19395 __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__19395; goto __pyx_L1_error;}
19396 __Pyx_GOTREF(__pyx_t_1);
19397 if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__19397; goto __pyx_L1_error;}
19398 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19399
19400 /* "cephfs.pyx":16
19401 * import errno
19402 * import os
19403 * import sys # <<<<<<<<<<<<<<
19404 *
19405 * # Are we running Python 2.x
19406 */
19407 __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__19407; goto __pyx_L1_error;}
19408 __Pyx_GOTREF(__pyx_t_1);
19409 if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__19409; goto __pyx_L1_error;}
19410 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19411
19412 /* "cephfs.pyx":19
19413 *
19414 * # Are we running Python 2.x
19415 * if sys.version_info[0] < 3: # <<<<<<<<<<<<<<
19416 * str_type = basestring
19417 * else:
19418 */
19419 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__19419; goto __pyx_L1_error;}
19420 __Pyx_GOTREF(__pyx_t_1);
19421 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__19421; goto __pyx_L1_error;}
19422 __Pyx_GOTREF(__pyx_t_2);
19423 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19424 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1)(( (sizeof(long) < sizeof(Py_ssize_t)) || (sizeof(long) >
sizeof(Py_ssize_t) && __builtin_expect(!!(0 < (long
)((Py_ssize_t)(((size_t)-1)>>1)) || 0 == (long)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!1 || __builtin_expect
(!!(0 > (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
0 == (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(long) == sizeof(Py_ssize_t) && (1 || __builtin_expect
(!!(0 < (long)((Py_ssize_t)(((size_t)-1)>>1)) || 0 ==
(long)((Py_ssize_t)(((size_t)-1)>>1))), 1))) ) ? __Pyx_GetItemInt_Fast
(__pyx_t_2, (Py_ssize_t)0, 0, 0, 1) : (0 ? (PyErr_SetString(PyExc_IndexError
, "list index out of range"), (PyObject*)((void*)0)) : __Pyx_GetItemInt_Generic
(__pyx_t_2, __Pyx_PyInt_From_long(0))))
; if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__19424; goto __pyx_L1_error;};
19425 __Pyx_GOTREF(__pyx_t_1);
19426 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19427 __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_LT0); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__19427; goto __pyx_L1_error;}
19428 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19429 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)__builtin_expect(!!(__pyx_t_3 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__19429; goto __pyx_L1_error;}
19430 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19431 if (__pyx_t_3) {
19432
19433 /* "cephfs.pyx":20
19434 * # Are we running Python 2.x
19435 * if sys.version_info[0] < 3:
19436 * str_type = basestring # <<<<<<<<<<<<<<
19437 * else:
19438 * str_type = str
19439 */
19440 if (PyDict_SetItem(__pyx_d, __pyx_n_s_str_type, ((PyObject *)(&PyBaseString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__19440; goto __pyx_L1_error;}
19441
19442 /* "cephfs.pyx":19
19443 *
19444 * # Are we running Python 2.x
19445 * if sys.version_info[0] < 3: # <<<<<<<<<<<<<<
19446 * str_type = basestring
19447 * else:
19448 */
19449 goto __pyx_L2;
19450 }
19451
19452 /* "cephfs.pyx":22
19453 * str_type = basestring
19454 * else:
19455 * str_type = str # <<<<<<<<<<<<<<
19456 *
19457 *
19458 */
19459 /*else*/ {
19460 if (PyDict_SetItem(__pyx_d, __pyx_n_s_str_type, ((PyObject *)(&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__19460; goto __pyx_L1_error;}
19461 }
19462 __pyx_L2:;
19463
19464 /* "cephfs.pyx":156
19465 *
19466 *
19467 * class Error(Exception): # <<<<<<<<<<<<<<
19468 * pass
19469 *
19470 */
19471 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__19471; goto __pyx_L1_error;}
19472 __Pyx_GOTREF(__pyx_t_2);
19473 __Pyx_INCREF(__pyx_builtin_Exception)( ((PyObject*)(__pyx_builtin_Exception))->ob_refcnt++);
19474 __Pyx_GIVEREF(__pyx_builtin_Exception);
19475 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_Exception)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_builtin_Exception
)
;
19476 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__19476; goto __pyx_L1_error;}
19477 __Pyx_GOTREF(__pyx_t_1);
19478 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Error, __pyx_n_s_Error, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__19478; goto __pyx_L1_error;}
19479 __Pyx_GOTREF(__pyx_t_4);
19480 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Error, __pyx_t_2, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__19480; goto __pyx_L1_error;}
19481 __Pyx_GOTREF(__pyx_t_5);
19482 if (PyDict_SetItem(__pyx_d, __pyx_n_s_Error, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__19482; goto __pyx_L1_error;}
19483 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19484 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19485 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19486 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19487
19488 /* "cephfs.pyx":160
19489 *
19490 *
19491 * class OSError(Error): # <<<<<<<<<<<<<<
19492 * def __init__(self, errno, strerror):
19493 * super(OSError, self).__init__(errno, strerror)
19494 */
19495 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__19495; goto __pyx_L1_error;}
19496 __Pyx_GOTREF(__pyx_t_2);
19497 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__19497; goto __pyx_L1_error;}
19498 __Pyx_GOTREF(__pyx_t_1);
19499 __Pyx_GIVEREF(__pyx_t_2);
19500 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2);
19501 __pyx_t_2 = 0;
19502 __pyx_t_2 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__19502; goto __pyx_L1_error;}
19503 __Pyx_GOTREF(__pyx_t_2);
19504 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_OSError, __pyx_n_s_OSError, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__19504; goto __pyx_L1_error;}
19505 __Pyx_GOTREF(__pyx_t_4);
19506
19507 /* "cephfs.pyx":161
19508 *
19509 * class OSError(Error):
19510 * def __init__(self, errno, strerror): # <<<<<<<<<<<<<<
19511 * super(OSError, self).__init__(errno, strerror)
19512 * self.errno = errno
19513 */
19514 __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6cephfs_7OSError_1__init__, 0, __pyx_n_s_OSError___init, NULL, __pyx_n_s_cephfs, __pyx_d, ((PyObject *)__pyx_codeobj__76))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_6cephfs_7OSError_1__init__
, 0, __pyx_n_s_OSError___init, ((void*)0), __pyx_n_s_cephfs, __pyx_d
, ((PyObject *)__pyx_codeobj__76))
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__19514; goto __pyx_L1_error;}
19515 __Pyx_GOTREF(__pyx_t_5);
19516 if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__19516; goto __pyx_L1_error;}
19517 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19518
19519 /* "cephfs.pyx":166
19520 * self.strerror = strerror
19521 *
19522 * def __str__(self): # <<<<<<<<<<<<<<
19523 * return '{0}: {1} [Errno {2}]'.format(self.strerror, os.strerror(self.errno), self.errno)
19524 *
19525 */
19526 __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6cephfs_7OSError_3__str__, 0, __pyx_n_s_OSError___str, NULL, __pyx_n_s_cephfs, __pyx_d, ((PyObject *)__pyx_codeobj__78))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_6cephfs_7OSError_3__str__
, 0, __pyx_n_s_OSError___str, ((void*)0), __pyx_n_s_cephfs, __pyx_d
, ((PyObject *)__pyx_codeobj__78))
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__19526; goto __pyx_L1_error;}
19527 __Pyx_GOTREF(__pyx_t_5);
19528 if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_str, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__19528; goto __pyx_L1_error;}
19529 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19530
19531 /* "cephfs.pyx":160
19532 *
19533 *
19534 * class OSError(Error): # <<<<<<<<<<<<<<
19535 * def __init__(self, errno, strerror):
19536 * super(OSError, self).__init__(errno, strerror)
19537 */
19538 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_OSError, __pyx_t_1, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__19538; goto __pyx_L1_error;}
19539 __Pyx_GOTREF(__pyx_t_5);
19540 if (PyDict_SetItem(__pyx_d, __pyx_n_s_OSError, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__19540; goto __pyx_L1_error;}
19541 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19542 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19543 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19544 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19545
19546 /* "cephfs.pyx":170
19547 *
19548 *
19549 * class PermissionError(OSError): # <<<<<<<<<<<<<<
19550 * pass
19551 *
19552 */
19553 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__19553; goto __pyx_L1_error;}
19554 __Pyx_GOTREF(__pyx_t_1);
19555 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__19555; goto __pyx_L1_error;}
19556 __Pyx_GOTREF(__pyx_t_2);
19557 __Pyx_GIVEREF(__pyx_t_1);
19558 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1);
19559 __pyx_t_1 = 0;
19560 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__19560; goto __pyx_L1_error;}
19561 __Pyx_GOTREF(__pyx_t_1);
19562 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_PermissionError, __pyx_n_s_PermissionError, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__19562; goto __pyx_L1_error;}
19563 __Pyx_GOTREF(__pyx_t_4);
19564 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PermissionError, __pyx_t_2, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__19564; goto __pyx_L1_error;}
19565 __Pyx_GOTREF(__pyx_t_5);
19566 if (PyDict_SetItem(__pyx_d, __pyx_n_s_PermissionError, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__19566; goto __pyx_L1_error;}
19567 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19568 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19569 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19570 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19571
19572 /* "cephfs.pyx":174
19573 *
19574 *
19575 * class ObjectNotFound(OSError): # <<<<<<<<<<<<<<
19576 * pass
19577 *
19578 */
19579 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__19579; goto __pyx_L1_error;}
19580 __Pyx_GOTREF(__pyx_t_2);
19581 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__19581; goto __pyx_L1_error;}
19582 __Pyx_GOTREF(__pyx_t_1);
19583 __Pyx_GIVEREF(__pyx_t_2);
19584 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2);
19585 __pyx_t_2 = 0;
19586 __pyx_t_2 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__19586; goto __pyx_L1_error;}
19587 __Pyx_GOTREF(__pyx_t_2);
19588 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ObjectNotFound, __pyx_n_s_ObjectNotFound, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__19588; goto __pyx_L1_error;}
19589 __Pyx_GOTREF(__pyx_t_4);
19590 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ObjectNotFound, __pyx_t_1, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__19590; goto __pyx_L1_error;}
19591 __Pyx_GOTREF(__pyx_t_5);
19592 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObjectNotFound, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__19592; goto __pyx_L1_error;}
19593 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19594 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19595 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19596 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19597
19598 /* "cephfs.pyx":178
19599 *
19600 *
19601 * class NoData(OSError): # <<<<<<<<<<<<<<
19602 * pass
19603 *
19604 */
19605 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__19605; goto __pyx_L1_error;}
19606 __Pyx_GOTREF(__pyx_t_1);
19607 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__19607; goto __pyx_L1_error;}
19608 __Pyx_GOTREF(__pyx_t_2);
19609 __Pyx_GIVEREF(__pyx_t_1);
19610 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1);
19611 __pyx_t_1 = 0;
19612 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__19612; goto __pyx_L1_error;}
19613 __Pyx_GOTREF(__pyx_t_1);
19614 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NoData, __pyx_n_s_NoData, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__19614; goto __pyx_L1_error;}
19615 __Pyx_GOTREF(__pyx_t_4);
19616 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NoData, __pyx_t_2, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__19616; goto __pyx_L1_error;}
19617 __Pyx_GOTREF(__pyx_t_5);
19618 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoData, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__19618; goto __pyx_L1_error;}
19619 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19620 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19621 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19622 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19623
19624 /* "cephfs.pyx":182
19625 *
19626 *
19627 * class ObjectExists(OSError): # <<<<<<<<<<<<<<
19628 * pass
19629 *
19630 */
19631 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__19631; goto __pyx_L1_error;}
19632 __Pyx_GOTREF(__pyx_t_2);
19633 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__19633; goto __pyx_L1_error;}
19634 __Pyx_GOTREF(__pyx_t_1);
19635 __Pyx_GIVEREF(__pyx_t_2);
19636 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2);
19637 __pyx_t_2 = 0;
19638 __pyx_t_2 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__19638; goto __pyx_L1_error;}
19639 __Pyx_GOTREF(__pyx_t_2);
19640 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ObjectExists, __pyx_n_s_ObjectExists, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__19640; goto __pyx_L1_error;}
19641 __Pyx_GOTREF(__pyx_t_4);
19642 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ObjectExists, __pyx_t_1, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__19642; goto __pyx_L1_error;}
19643 __Pyx_GOTREF(__pyx_t_5);
19644 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObjectExists, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__19644; goto __pyx_L1_error;}
19645 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19646 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19647 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19648 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19649
19650 /* "cephfs.pyx":186
19651 *
19652 *
19653 * class IOError(OSError): # <<<<<<<<<<<<<<
19654 * pass
19655 *
19656 */
19657 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__19657; goto __pyx_L1_error;}
19658 __Pyx_GOTREF(__pyx_t_1);
19659 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__19659; goto __pyx_L1_error;}
19660 __Pyx_GOTREF(__pyx_t_2);
19661 __Pyx_GIVEREF(__pyx_t_1);
19662 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1);
19663 __pyx_t_1 = 0;
19664 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__19664; goto __pyx_L1_error;}
19665 __Pyx_GOTREF(__pyx_t_1);
19666 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_IOError, __pyx_n_s_IOError, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__19666; goto __pyx_L1_error;}
19667 __Pyx_GOTREF(__pyx_t_4);
19668 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_IOError, __pyx_t_2, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__19668; goto __pyx_L1_error;}
19669 __Pyx_GOTREF(__pyx_t_5);
19670 if (PyDict_SetItem(__pyx_d, __pyx_n_s_IOError, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__19670; goto __pyx_L1_error;}
19671 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19672 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19673 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19674 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19675
19676 /* "cephfs.pyx":190
19677 *
19678 *
19679 * class NoSpace(OSError): # <<<<<<<<<<<<<<
19680 * pass
19681 *
19682 */
19683 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__19683; goto __pyx_L1_error;}
19684 __Pyx_GOTREF(__pyx_t_2);
19685 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__19685; goto __pyx_L1_error;}
19686 __Pyx_GOTREF(__pyx_t_1);
19687 __Pyx_GIVEREF(__pyx_t_2);
19688 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2);
19689 __pyx_t_2 = 0;
19690 __pyx_t_2 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__19690; goto __pyx_L1_error;}
19691 __Pyx_GOTREF(__pyx_t_2);
19692 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NoSpace, __pyx_n_s_NoSpace, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__19692; goto __pyx_L1_error;}
19693 __Pyx_GOTREF(__pyx_t_4);
19694 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NoSpace, __pyx_t_1, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__19694; goto __pyx_L1_error;}
19695 __Pyx_GOTREF(__pyx_t_5);
19696 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoSpace, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__19696; goto __pyx_L1_error;}
19697 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19698 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19699 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19700 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19701
19702 /* "cephfs.pyx":194
19703 *
19704 *
19705 * class InvalidValue(OSError): # <<<<<<<<<<<<<<
19706 * pass
19707 *
19708 */
19709 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__19709; goto __pyx_L1_error;}
19710 __Pyx_GOTREF(__pyx_t_1);
19711 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__19711; goto __pyx_L1_error;}
19712 __Pyx_GOTREF(__pyx_t_2);
19713 __Pyx_GIVEREF(__pyx_t_1);
19714 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1);
19715 __pyx_t_1 = 0;
19716 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__19716; goto __pyx_L1_error;}
19717 __Pyx_GOTREF(__pyx_t_1);
19718 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_InvalidValue, __pyx_n_s_InvalidValue, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__19718; goto __pyx_L1_error;}
19719 __Pyx_GOTREF(__pyx_t_4);
19720 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_InvalidValue, __pyx_t_2, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__19720; goto __pyx_L1_error;}
19721 __Pyx_GOTREF(__pyx_t_5);
19722 if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidValue, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__19722; goto __pyx_L1_error;}
19723 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19724 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19725 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19726 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19727
19728 /* "cephfs.pyx":198
19729 *
19730 *
19731 * class OperationNotSupported(OSError): # <<<<<<<<<<<<<<
19732 * pass
19733 *
19734 */
19735 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__19735; goto __pyx_L1_error;}
19736 __Pyx_GOTREF(__pyx_t_2);
19737 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__19737; goto __pyx_L1_error;}
19738 __Pyx_GOTREF(__pyx_t_1);
19739 __Pyx_GIVEREF(__pyx_t_2);
19740 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2);
19741 __pyx_t_2 = 0;
19742 __pyx_t_2 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__19742; goto __pyx_L1_error;}
19743 __Pyx_GOTREF(__pyx_t_2);
19744 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_OperationNotSupported, __pyx_n_s_OperationNotSupported, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__19744; goto __pyx_L1_error;}
19745 __Pyx_GOTREF(__pyx_t_4);
19746 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_OperationNotSupported, __pyx_t_1, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__19746; goto __pyx_L1_error;}
19747 __Pyx_GOTREF(__pyx_t_5);
19748 if (PyDict_SetItem(__pyx_d, __pyx_n_s_OperationNotSupported, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__19748; goto __pyx_L1_error;}
19749 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19750 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19751 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19752 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19753
19754 /* "cephfs.pyx":202
19755 *
19756 *
19757 * class LibCephFSStateError(Error): # <<<<<<<<<<<<<<
19758 * pass
19759 *
19760 */
19761 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__19761; goto __pyx_L1_error;}
19762 __Pyx_GOTREF(__pyx_t_1);
19763 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__19763; goto __pyx_L1_error;}
19764 __Pyx_GOTREF(__pyx_t_2);
19765 __Pyx_GIVEREF(__pyx_t_1);
19766 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1);
19767 __pyx_t_1 = 0;
19768 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__19768; goto __pyx_L1_error;}
19769 __Pyx_GOTREF(__pyx_t_1);
19770 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_LibCephFSStateError, __pyx_n_s_LibCephFSStateError, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__19770; goto __pyx_L1_error;}
19771 __Pyx_GOTREF(__pyx_t_4);
19772 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_LibCephFSStateError, __pyx_t_2, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__19772; goto __pyx_L1_error;}
19773 __Pyx_GOTREF(__pyx_t_5);
19774 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LibCephFSStateError, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__19774; goto __pyx_L1_error;}
19775 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19776 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19777 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19778 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19779
19780 /* "cephfs.pyx":206
19781 *
19782 *
19783 * class WouldBlock(OSError): # <<<<<<<<<<<<<<
19784 * pass
19785 *
19786 */
19787 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__19787; goto __pyx_L1_error;}
19788 __Pyx_GOTREF(__pyx_t_2);
19789 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__19789; goto __pyx_L1_error;}
19790 __Pyx_GOTREF(__pyx_t_1);
19791 __Pyx_GIVEREF(__pyx_t_2);
19792 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2);
19793 __pyx_t_2 = 0;
19794 __pyx_t_2 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__19794; goto __pyx_L1_error;}
19795 __Pyx_GOTREF(__pyx_t_2);
19796 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_WouldBlock, __pyx_n_s_WouldBlock, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__19796; goto __pyx_L1_error;}
19797 __Pyx_GOTREF(__pyx_t_4);
19798 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_WouldBlock, __pyx_t_1, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__19798; goto __pyx_L1_error;}
19799 __Pyx_GOTREF(__pyx_t_5);
19800 if (PyDict_SetItem(__pyx_d, __pyx_n_s_WouldBlock, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__19800; goto __pyx_L1_error;}
19801 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19802 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19803 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19804 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19805
19806 /* "cephfs.pyx":210
19807 *
19808 *
19809 * class OutOfRange(OSError): # <<<<<<<<<<<<<<
19810 * pass
19811 *
19812 */
19813 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__19813; goto __pyx_L1_error;}
19814 __Pyx_GOTREF(__pyx_t_1);
19815 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__19815; goto __pyx_L1_error;}
19816 __Pyx_GOTREF(__pyx_t_2);
19817 __Pyx_GIVEREF(__pyx_t_1);
19818 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1);
19819 __pyx_t_1 = 0;
19820 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__19820; goto __pyx_L1_error;}
19821 __Pyx_GOTREF(__pyx_t_1);
19822 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_OutOfRange, __pyx_n_s_OutOfRange, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__19822; goto __pyx_L1_error;}
19823 __Pyx_GOTREF(__pyx_t_4);
19824 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OutOfRange, __pyx_t_2, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__19824; goto __pyx_L1_error;}
19825 __Pyx_GOTREF(__pyx_t_5);
19826 if (PyDict_SetItem(__pyx_d, __pyx_n_s_OutOfRange, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__19826; goto __pyx_L1_error;}
19827 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19828 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19829 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19830 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19831
19832 /* "cephfs.pyx":214
19833 *
19834 *
19835 * class ObjectNotEmpty(OSError): # <<<<<<<<<<<<<<
19836 * pass
19837 *
19838 */
19839 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__19839; goto __pyx_L1_error;}
19840 __Pyx_GOTREF(__pyx_t_2);
19841 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__19841; goto __pyx_L1_error;}
19842 __Pyx_GOTREF(__pyx_t_1);
19843 __Pyx_GIVEREF(__pyx_t_2);
19844 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2);
19845 __pyx_t_2 = 0;
19846 __pyx_t_2 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__19846; goto __pyx_L1_error;}
19847 __Pyx_GOTREF(__pyx_t_2);
19848 __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ObjectNotEmpty, __pyx_n_s_ObjectNotEmpty, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__19848; goto __pyx_L1_error;}
19849 __Pyx_GOTREF(__pyx_t_4);
19850 __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ObjectNotEmpty, __pyx_t_1, __pyx_t_4, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__19850; goto __pyx_L1_error;}
19851 __Pyx_GOTREF(__pyx_t_5);
19852 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObjectNotEmpty, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__19852; goto __pyx_L1_error;}
19853 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19854 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19855 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19856 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19857
19858 /* "cephfs.pyx":234
19859 * ELSE:
19860 * cdef errno_to_exception = {
19861 * errno.EPERM : PermissionError, # <<<<<<<<<<<<<<
19862 * errno.ENOENT : ObjectNotFound,
19863 * errno.EIO : IOError,
19864 */
19865 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19865; goto __pyx_L1_error;}
19866 __Pyx_GOTREF(__pyx_t_1);
19867 __pyx_t_2 = __Pyx_PyInt_From_int(EPERM1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19867; goto __pyx_L1_error;}
19868 __Pyx_GOTREF(__pyx_t_2);
19869 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PermissionError); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19869; goto __pyx_L1_error;}
19870 __Pyx_GOTREF(__pyx_t_4);
19871 if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19871; goto __pyx_L1_error;}
19872 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19873 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19874
19875 /* "cephfs.pyx":235
19876 * cdef errno_to_exception = {
19877 * errno.EPERM : PermissionError,
19878 * errno.ENOENT : ObjectNotFound, # <<<<<<<<<<<<<<
19879 * errno.EIO : IOError,
19880 * errno.ENOSPC : NoSpace,
19881 */
19882 __pyx_t_4 = __Pyx_PyInt_From_int(ENOENT2); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__19882; goto __pyx_L1_error;}
19883 __Pyx_GOTREF(__pyx_t_4);
19884 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ObjectNotFound); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__19884; goto __pyx_L1_error;}
19885 __Pyx_GOTREF(__pyx_t_2);
19886 if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19886; goto __pyx_L1_error;}
19887 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19888 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19889
19890 /* "cephfs.pyx":236
19891 * errno.EPERM : PermissionError,
19892 * errno.ENOENT : ObjectNotFound,
19893 * errno.EIO : IOError, # <<<<<<<<<<<<<<
19894 * errno.ENOSPC : NoSpace,
19895 * errno.EEXIST : ObjectExists,
19896 */
19897 __pyx_t_2 = __Pyx_PyInt_From_int(EIO5); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__19897; goto __pyx_L1_error;}
19898 __Pyx_GOTREF(__pyx_t_2);
19899 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_IOError); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__19899; goto __pyx_L1_error;}
19900 __Pyx_GOTREF(__pyx_t_4);
19901 if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19901; goto __pyx_L1_error;}
19902 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19903 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19904
19905 /* "cephfs.pyx":237
19906 * errno.ENOENT : ObjectNotFound,
19907 * errno.EIO : IOError,
19908 * errno.ENOSPC : NoSpace, # <<<<<<<<<<<<<<
19909 * errno.EEXIST : ObjectExists,
19910 * errno.ENODATA : NoData,
19911 */
19912 __pyx_t_4 = __Pyx_PyInt_From_int(ENOSPC28); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__19912; goto __pyx_L1_error;}
19913 __Pyx_GOTREF(__pyx_t_4);
19914 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NoSpace); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__19914; goto __pyx_L1_error;}
19915 __Pyx_GOTREF(__pyx_t_2);
19916 if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19916; goto __pyx_L1_error;}
19917 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19918 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19919
19920 /* "cephfs.pyx":238
19921 * errno.EIO : IOError,
19922 * errno.ENOSPC : NoSpace,
19923 * errno.EEXIST : ObjectExists, # <<<<<<<<<<<<<<
19924 * errno.ENODATA : NoData,
19925 * errno.EINVAL : InvalidValue,
19926 */
19927 __pyx_t_2 = __Pyx_PyInt_From_int(EEXIST17); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__19927; goto __pyx_L1_error;}
19928 __Pyx_GOTREF(__pyx_t_2);
19929 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ObjectExists); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__19929; goto __pyx_L1_error;}
19930 __Pyx_GOTREF(__pyx_t_4);
19931 if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19931; goto __pyx_L1_error;}
19932 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19933 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19934
19935 /* "cephfs.pyx":239
19936 * errno.ENOSPC : NoSpace,
19937 * errno.EEXIST : ObjectExists,
19938 * errno.ENODATA : NoData, # <<<<<<<<<<<<<<
19939 * errno.EINVAL : InvalidValue,
19940 * errno.EOPNOTSUPP : OperationNotSupported,
19941 */
19942 __pyx_t_4 = __Pyx_PyInt_From_int(ENODATA61); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__19942; goto __pyx_L1_error;}
19943 __Pyx_GOTREF(__pyx_t_4);
19944 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NoData); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__19944; goto __pyx_L1_error;}
19945 __Pyx_GOTREF(__pyx_t_2);
19946 if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19946; goto __pyx_L1_error;}
19947 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19948 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19949
19950 /* "cephfs.pyx":240
19951 * errno.EEXIST : ObjectExists,
19952 * errno.ENODATA : NoData,
19953 * errno.EINVAL : InvalidValue, # <<<<<<<<<<<<<<
19954 * errno.EOPNOTSUPP : OperationNotSupported,
19955 * errno.ERANGE : OutOfRange,
19956 */
19957 __pyx_t_2 = __Pyx_PyInt_From_int(EINVAL22); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__19957; goto __pyx_L1_error;}
19958 __Pyx_GOTREF(__pyx_t_2);
19959 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidValue); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__19959; goto __pyx_L1_error;}
19960 __Pyx_GOTREF(__pyx_t_4);
19961 if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19961; goto __pyx_L1_error;}
19962 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19963 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19964
19965 /* "cephfs.pyx":241
19966 * errno.ENODATA : NoData,
19967 * errno.EINVAL : InvalidValue,
19968 * errno.EOPNOTSUPP : OperationNotSupported, # <<<<<<<<<<<<<<
19969 * errno.ERANGE : OutOfRange,
19970 * errno.EWOULDBLOCK: WouldBlock,
19971 */
19972 __pyx_t_4 = __Pyx_PyInt_From_int(EOPNOTSUPP95); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__19972; goto __pyx_L1_error;}
19973 __Pyx_GOTREF(__pyx_t_4);
19974 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OperationNotSupported); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__19974; goto __pyx_L1_error;}
19975 __Pyx_GOTREF(__pyx_t_2);
19976 if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19976; goto __pyx_L1_error;}
19977 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19978 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19979
19980 /* "cephfs.pyx":242
19981 * errno.EINVAL : InvalidValue,
19982 * errno.EOPNOTSUPP : OperationNotSupported,
19983 * errno.ERANGE : OutOfRange, # <<<<<<<<<<<<<<
19984 * errno.EWOULDBLOCK: WouldBlock,
19985 * errno.ENOTEMPTY : ObjectNotEmpty,
19986 */
19987 __pyx_t_2 = __Pyx_PyInt_From_int(ERANGE34); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__19987; goto __pyx_L1_error;}
19988 __Pyx_GOTREF(__pyx_t_2);
19989 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_OutOfRange); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__19989; goto __pyx_L1_error;}
19990 __Pyx_GOTREF(__pyx_t_4);
19991 if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__19991; goto __pyx_L1_error;}
19992 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19993 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
19994
19995 /* "cephfs.pyx":243
19996 * errno.EOPNOTSUPP : OperationNotSupported,
19997 * errno.ERANGE : OutOfRange,
19998 * errno.EWOULDBLOCK: WouldBlock, # <<<<<<<<<<<<<<
19999 * errno.ENOTEMPTY : ObjectNotEmpty,
20000 * }
20001 */
20002 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_errno); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__20002; goto __pyx_L1_error;}
20003 __Pyx_GOTREF(__pyx_t_4);
20004 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_EWOULDBLOCK); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__20004; goto __pyx_L1_error;}
20005 __Pyx_GOTREF(__pyx_t_2);
20006 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
20007 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_WouldBlock); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__20007; goto __pyx_L1_error;}
20008 __Pyx_GOTREF(__pyx_t_4);
20009 if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__20009; goto __pyx_L1_error;}
20010 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20011 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
20012
20013 /* "cephfs.pyx":244
20014 * errno.ERANGE : OutOfRange,
20015 * errno.EWOULDBLOCK: WouldBlock,
20016 * errno.ENOTEMPTY : ObjectNotEmpty, # <<<<<<<<<<<<<<
20017 * }
20018 *
20019 */
20020 __pyx_t_4 = __Pyx_PyInt_From_int(ENOTEMPTY39); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__20020; goto __pyx_L1_error;}
20021 __Pyx_GOTREF(__pyx_t_4);
20022 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ObjectNotEmpty); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__20022; goto __pyx_L1_error;}
20023 __Pyx_GOTREF(__pyx_t_2);
20024 if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__20024; goto __pyx_L1_error;}
20025 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
20026 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20027 __Pyx_XGOTREF(__pyx_v_6cephfs_errno_to_exception);
20028 __Pyx_DECREF_SET(__pyx_v_6cephfs_errno_to_exception, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_6cephfs_errno_to_exception
; __pyx_v_6cephfs_errno_to_exception = __pyx_t_1; do { if ( --
((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp)))); } while (0); } while (0)
;
20029 __Pyx_GIVEREF(__pyx_t_1);
20030 __pyx_t_1 = 0;
20031
20032 /* "cephfs.pyx":265
20033 *
20034 *
20035 * class DirEntry(namedtuple('DirEntry', # <<<<<<<<<<<<<<
20036 * ['d_ino', 'd_off', 'd_reclen', 'd_type', 'd_name'])):
20037 * DT_DIR = 0x4
20038 */
20039 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__20039; goto __pyx_L1_error;}
20040 __Pyx_GOTREF(__pyx_t_2);
20041
20042 /* "cephfs.pyx":266
20043 *
20044 * class DirEntry(namedtuple('DirEntry',
20045 * ['d_ino', 'd_off', 'd_reclen', 'd_type', 'd_name'])): # <<<<<<<<<<<<<<
20046 * DT_DIR = 0x4
20047 * DT_REG = 0xA
20048 */
20049 __pyx_t_4 = PyList_New(5); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__20049; goto __pyx_L1_error;}
20050 __Pyx_GOTREF(__pyx_t_4);
20051 __Pyx_INCREF(__pyx_n_s_d_ino)( ((PyObject*)(__pyx_n_s_d_ino))->ob_refcnt++);
20052 __Pyx_GIVEREF(__pyx_n_s_d_ino);
20053 PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_d_ino)(((PyListObject *)(__pyx_t_4))->ob_item[0] = (__pyx_n_s_d_ino
))
;
20054 __Pyx_INCREF(__pyx_n_s_d_off)( ((PyObject*)(__pyx_n_s_d_off))->ob_refcnt++);
20055 __Pyx_GIVEREF(__pyx_n_s_d_off);
20056 PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_d_off)(((PyListObject *)(__pyx_t_4))->ob_item[1] = (__pyx_n_s_d_off
))
;
20057 __Pyx_INCREF(__pyx_n_s_d_reclen)( ((PyObject*)(__pyx_n_s_d_reclen))->ob_refcnt++);
20058 __Pyx_GIVEREF(__pyx_n_s_d_reclen);
20059 PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_s_d_reclen)(((PyListObject *)(__pyx_t_4))->ob_item[2] = (__pyx_n_s_d_reclen
))
;
20060 __Pyx_INCREF(__pyx_n_s_d_type)( ((PyObject*)(__pyx_n_s_d_type))->ob_refcnt++);
20061 __Pyx_GIVEREF(__pyx_n_s_d_type);
20062 PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_s_d_type)(((PyListObject *)(__pyx_t_4))->ob_item[3] = (__pyx_n_s_d_type
))
;
20063 __Pyx_INCREF(__pyx_n_s_d_name)( ((PyObject*)(__pyx_n_s_d_name))->ob_refcnt++);
20064 __Pyx_GIVEREF(__pyx_n_s_d_name);
20065 PyList_SET_ITEM(__pyx_t_4, 4, __pyx_n_s_d_name)(((PyListObject *)(__pyx_t_4))->ob_item[4] = (__pyx_n_s_d_name
))
;
20066 __pyx_t_5 = NULL((void*)0);
20067 __pyx_t_6 = 0;
20068 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
20069 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
20070 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
20071 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
20072 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
20073 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
20074 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
20075 __pyx_t_6 = 1;
20076 }
20077 }
20078 __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__20078; goto __pyx_L1_error;}
20079 __Pyx_GOTREF(__pyx_t_7);
20080 if (__pyx_t_5) {
20081 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
20082 }
20083 __Pyx_INCREF(__pyx_n_s_DirEntry)( ((PyObject*)(__pyx_n_s_DirEntry))->ob_refcnt++);
20084 __Pyx_GIVEREF(__pyx_n_s_DirEntry);
20085 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_n_s_DirEntry)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+__pyx_t_6] = __pyx_n_s_DirEntry
)
;
20086 __Pyx_GIVEREF(__pyx_t_4);
20087 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4)(((PyTupleObject *)(__pyx_t_7))->ob_item[1+__pyx_t_6] = __pyx_t_4
)
;
20088 __pyx_t_4 = 0;
20089 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__20089; goto __pyx_L1_error;}
20090 __Pyx_GOTREF(__pyx_t_1);
20091 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
20092 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20093
20094 /* "cephfs.pyx":265
20095 *
20096 *
20097 * class DirEntry(namedtuple('DirEntry', # <<<<<<<<<<<<<<
20098 * ['d_ino', 'd_off', 'd_reclen', 'd_type', 'd_name'])):
20099 * DT_DIR = 0x4
20100 */
20101 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__20101; goto __pyx_L1_error;}
20102 __Pyx_GOTREF(__pyx_t_2);
20103 __Pyx_GIVEREF(__pyx_t_1);
20104 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1);
20105 __pyx_t_1 = 0;
20106 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__20106; goto __pyx_L1_error;}
20107 __Pyx_GOTREF(__pyx_t_1);
20108 __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DirEntry, __pyx_n_s_DirEntry, (PyObject *) NULL((void*)0), __pyx_n_s_cephfs, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__20108; goto __pyx_L1_error;}
20109 __Pyx_GOTREF(__pyx_t_7);
20110
20111 /* "cephfs.pyx":267
20112 * class DirEntry(namedtuple('DirEntry',
20113 * ['d_ino', 'd_off', 'd_reclen', 'd_type', 'd_name'])):
20114 * DT_DIR = 0x4 # <<<<<<<<<<<<<<
20115 * DT_REG = 0xA
20116 * DT_LNK = 0xC
20117 */
20118 if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_DT_DIR, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__20118; goto __pyx_L1_error;}
20119
20120 /* "cephfs.pyx":268
20121 * ['d_ino', 'd_off', 'd_reclen', 'd_type', 'd_name'])):
20122 * DT_DIR = 0x4
20123 * DT_REG = 0xA # <<<<<<<<<<<<<<
20124 * DT_LNK = 0xC
20125 * def is_dir(self):
20126 */
20127 if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_DT_REG, __pyx_int_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__20127; goto __pyx_L1_error;}
20128
20129 /* "cephfs.pyx":269
20130 * DT_DIR = 0x4
20131 * DT_REG = 0xA
20132 * DT_LNK = 0xC # <<<<<<<<<<<<<<
20133 * def is_dir(self):
20134 * return self.d_type == self.DT_DIR
20135 */
20136 if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_DT_LNK, __pyx_int_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__20136; goto __pyx_L1_error;}
20137
20138 /* "cephfs.pyx":270
20139 * DT_REG = 0xA
20140 * DT_LNK = 0xC
20141 * def is_dir(self): # <<<<<<<<<<<<<<
20142 * return self.d_type == self.DT_DIR
20143 *
20144 */
20145 __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6cephfs_8DirEntry_1is_dir, 0, __pyx_n_s_DirEntry_is_dir, NULL, __pyx_n_s_cephfs, __pyx_d, ((PyObject *)__pyx_codeobj__80))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_6cephfs_8DirEntry_1is_dir
, 0, __pyx_n_s_DirEntry_is_dir, ((void*)0), __pyx_n_s_cephfs,
__pyx_d, ((PyObject *)__pyx_codeobj__80))
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__20145; goto __pyx_L1_error;}
20146 __Pyx_GOTREF(__pyx_t_4);
20147 if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_is_dir, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__20147; goto __pyx_L1_error;}
20148 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
20149
20150 /* "cephfs.pyx":273
20151 * return self.d_type == self.DT_DIR
20152 *
20153 * def is_symbol_file(self): # <<<<<<<<<<<<<<
20154 * return self.d_type == self.DT_LNK
20155 *
20156 */
20157 __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6cephfs_8DirEntry_3is_symbol_file, 0, __pyx_n_s_DirEntry_is_symbol_file, NULL, __pyx_n_s_cephfs, __pyx_d, ((PyObject *)__pyx_codeobj__82))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_6cephfs_8DirEntry_3is_symbol_file
, 0, __pyx_n_s_DirEntry_is_symbol_file, ((void*)0), __pyx_n_s_cephfs
, __pyx_d, ((PyObject *)__pyx_codeobj__82))
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__20157; goto __pyx_L1_error;}
20158 __Pyx_GOTREF(__pyx_t_4);
20159 if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_is_symbol_file, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__20159; goto __pyx_L1_error;}
20160 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
20161
20162 /* "cephfs.pyx":276
20163 * return self.d_type == self.DT_LNK
20164 *
20165 * def is_file(self): # <<<<<<<<<<<<<<
20166 * return self.d_type == self.DT_REG
20167 *
20168 */
20169 __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6cephfs_8DirEntry_5is_file, 0, __pyx_n_s_DirEntry_is_file, NULL, __pyx_n_s_cephfs, __pyx_d, ((PyObject *)__pyx_codeobj__84))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_6cephfs_8DirEntry_5is_file
, 0, __pyx_n_s_DirEntry_is_file, ((void*)0), __pyx_n_s_cephfs
, __pyx_d, ((PyObject *)__pyx_codeobj__84))
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__20169; goto __pyx_L1_error;}
20170 __Pyx_GOTREF(__pyx_t_4);
20171 if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_is_file, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__20171; goto __pyx_L1_error;}
20172 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
20173
20174 /* "cephfs.pyx":265
20175 *
20176 *
20177 * class DirEntry(namedtuple('DirEntry', # <<<<<<<<<<<<<<
20178 * ['d_ino', 'd_off', 'd_reclen', 'd_type', 'd_name'])):
20179 * DT_DIR = 0x4
20180 */
20181 __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DirEntry, __pyx_t_2, __pyx_t_7, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__20181; goto __pyx_L1_error;}
20182 __Pyx_GOTREF(__pyx_t_4);
20183 if (PyDict_SetItem(__pyx_d, __pyx_n_s_DirEntry, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__20183; goto __pyx_L1_error;}
20184 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
20185 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
20186 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
20187 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20188
20189 /* "cephfs.pyx":279
20190 * return self.d_type == self.DT_REG
20191 *
20192 * StatResult = namedtuple('StatResult', # <<<<<<<<<<<<<<
20193 * ["st_dev", "st_ino", "st_mode", "st_nlink", "st_uid",
20194 * "st_gid", "st_rdev", "st_size", "st_blksize",
20195 */
20196 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__20196; goto __pyx_L1_error;}
20197 __Pyx_GOTREF(__pyx_t_1);
20198
20199 /* "cephfs.pyx":280
20200 *
20201 * StatResult = namedtuple('StatResult',
20202 * ["st_dev", "st_ino", "st_mode", "st_nlink", "st_uid", # <<<<<<<<<<<<<<
20203 * "st_gid", "st_rdev", "st_size", "st_blksize",
20204 * "st_blocks", "st_atime", "st_mtime", "st_ctime"])
20205 */
20206 __pyx_t_7 = PyList_New(13); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__20206; goto __pyx_L1_error;}
20207 __Pyx_GOTREF(__pyx_t_7);
20208 __Pyx_INCREF(__pyx_n_s_st_dev)( ((PyObject*)(__pyx_n_s_st_dev))->ob_refcnt++);
20209 __Pyx_GIVEREF(__pyx_n_s_st_dev);
20210 PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_st_dev)(((PyListObject *)(__pyx_t_7))->ob_item[0] = (__pyx_n_s_st_dev
))
;
20211 __Pyx_INCREF(__pyx_n_s_st_ino)( ((PyObject*)(__pyx_n_s_st_ino))->ob_refcnt++);
20212 __Pyx_GIVEREF(__pyx_n_s_st_ino);
20213 PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_st_ino)(((PyListObject *)(__pyx_t_7))->ob_item[1] = (__pyx_n_s_st_ino
))
;
20214 __Pyx_INCREF(__pyx_n_s_st_mode)( ((PyObject*)(__pyx_n_s_st_mode))->ob_refcnt++);
20215 __Pyx_GIVEREF(__pyx_n_s_st_mode);
20216 PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_s_st_mode)(((PyListObject *)(__pyx_t_7))->ob_item[2] = (__pyx_n_s_st_mode
))
;
20217 __Pyx_INCREF(__pyx_n_s_st_nlink)( ((PyObject*)(__pyx_n_s_st_nlink))->ob_refcnt++);
20218 __Pyx_GIVEREF(__pyx_n_s_st_nlink);
20219 PyList_SET_ITEM(__pyx_t_7, 3, __pyx_n_s_st_nlink)(((PyListObject *)(__pyx_t_7))->ob_item[3] = (__pyx_n_s_st_nlink
))
;
20220 __Pyx_INCREF(__pyx_n_s_st_uid)( ((PyObject*)(__pyx_n_s_st_uid))->ob_refcnt++);
20221 __Pyx_GIVEREF(__pyx_n_s_st_uid);
20222 PyList_SET_ITEM(__pyx_t_7, 4, __pyx_n_s_st_uid)(((PyListObject *)(__pyx_t_7))->ob_item[4] = (__pyx_n_s_st_uid
))
;
20223 __Pyx_INCREF(__pyx_n_s_st_gid)( ((PyObject*)(__pyx_n_s_st_gid))->ob_refcnt++);
20224 __Pyx_GIVEREF(__pyx_n_s_st_gid);
20225 PyList_SET_ITEM(__pyx_t_7, 5, __pyx_n_s_st_gid)(((PyListObject *)(__pyx_t_7))->ob_item[5] = (__pyx_n_s_st_gid
))
;
20226 __Pyx_INCREF(__pyx_n_s_st_rdev)( ((PyObject*)(__pyx_n_s_st_rdev))->ob_refcnt++);
20227 __Pyx_GIVEREF(__pyx_n_s_st_rdev);
20228 PyList_SET_ITEM(__pyx_t_7, 6, __pyx_n_s_st_rdev)(((PyListObject *)(__pyx_t_7))->ob_item[6] = (__pyx_n_s_st_rdev
))
;
20229 __Pyx_INCREF(__pyx_n_s_st_size)( ((PyObject*)(__pyx_n_s_st_size))->ob_refcnt++);
20230 __Pyx_GIVEREF(__pyx_n_s_st_size);
20231 PyList_SET_ITEM(__pyx_t_7, 7, __pyx_n_s_st_size)(((PyListObject *)(__pyx_t_7))->ob_item[7] = (__pyx_n_s_st_size
))
;
20232 __Pyx_INCREF(__pyx_n_s_st_blksize)( ((PyObject*)(__pyx_n_s_st_blksize))->ob_refcnt++);
20233 __Pyx_GIVEREF(__pyx_n_s_st_blksize);
20234 PyList_SET_ITEM(__pyx_t_7, 8, __pyx_n_s_st_blksize)(((PyListObject *)(__pyx_t_7))->ob_item[8] = (__pyx_n_s_st_blksize
))
;
20235 __Pyx_INCREF(__pyx_n_s_st_blocks)( ((PyObject*)(__pyx_n_s_st_blocks))->ob_refcnt++);
20236 __Pyx_GIVEREF(__pyx_n_s_st_blocks);
20237 PyList_SET_ITEM(__pyx_t_7, 9, __pyx_n_s_st_blocks)(((PyListObject *)(__pyx_t_7))->ob_item[9] = (__pyx_n_s_st_blocks
))
;
20238 __Pyx_INCREF(__pyx_n_s_st_atime)( ((PyObject*)(__pyx_n_s_st_atime))->ob_refcnt++);
20239 __Pyx_GIVEREF(__pyx_n_s_st_atime);
20240 PyList_SET_ITEM(__pyx_t_7, 10, __pyx_n_s_st_atime)(((PyListObject *)(__pyx_t_7))->ob_item[10] = (__pyx_n_s_st_atime
))
;
20241 __Pyx_INCREF(__pyx_n_s_st_mtime)( ((PyObject*)(__pyx_n_s_st_mtime))->ob_refcnt++);
20242 __Pyx_GIVEREF(__pyx_n_s_st_mtime);
20243 PyList_SET_ITEM(__pyx_t_7, 11, __pyx_n_s_st_mtime)(((PyListObject *)(__pyx_t_7))->ob_item[11] = (__pyx_n_s_st_mtime
))
;
20244 __Pyx_INCREF(__pyx_n_s_st_ctime)( ((PyObject*)(__pyx_n_s_st_ctime))->ob_refcnt++);
20245 __Pyx_GIVEREF(__pyx_n_s_st_ctime);
20246 PyList_SET_ITEM(__pyx_t_7, 12, __pyx_n_s_st_ctime)(((PyListObject *)(__pyx_t_7))->ob_item[12] = (__pyx_n_s_st_ctime
))
;
20247 __pyx_t_4 = NULL((void*)0);
20248 __pyx_t_6 = 0;
20249 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
20250 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
20251 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
20252 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
20253 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
20254 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
20255 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
20256 __pyx_t_6 = 1;
20257 }
20258 }
20259 __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__20259; goto __pyx_L1_error;}
20260 __Pyx_GOTREF(__pyx_t_5);
20261 if (__pyx_t_4) {
20262 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
20263 }
20264 __Pyx_INCREF(__pyx_n_s_StatResult)( ((PyObject*)(__pyx_n_s_StatResult))->ob_refcnt++);
20265 __Pyx_GIVEREF(__pyx_n_s_StatResult);
20266 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_n_s_StatResult)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_6] = __pyx_n_s_StatResult
)
;
20267 __Pyx_GIVEREF(__pyx_t_7);
20268 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_t_7)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_6] = __pyx_t_7
)
;
20269 __pyx_t_7 = 0;
20270 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__20270; goto __pyx_L1_error;}
20271 __Pyx_GOTREF(__pyx_t_2);
20272 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
20273 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
20274 if (PyDict_SetItem(__pyx_d, __pyx_n_s_StatResult, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__20274; goto __pyx_L1_error;}
20275 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20276
20277 /* "cephfs.pyx":334
20278 * self.handle = NULL
20279 *
20280 * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<<
20281 * """
20282 * Create a byte string from a Python string
20283 */
20284 __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6cephfs_1cstr, NULL((void*)0), __pyx_n_s_cephfs); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__20284; goto __pyx_L1_error;}
20285 __Pyx_GOTREF(__pyx_t_2);
20286 if (PyDict_SetItem(__pyx_d, __pyx_n_s_cstr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__20286; goto __pyx_L1_error;}
20287 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20288
20289 /* "cephfs.pyx":357
20290 * return v
20291 *
20292 * def cstr_list(list_str, name, encoding="utf-8"): # <<<<<<<<<<<<<<
20293 * return [cstr(s, name) for s in list_str]
20294 *
20295 */
20296 __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6cephfs_3cstr_list, NULL((void*)0), __pyx_n_s_cephfs); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__20296; goto __pyx_L1_error;}
20297 __Pyx_GOTREF(__pyx_t_2);
20298 if (PyDict_SetItem(__pyx_d, __pyx_n_s_cstr_list, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__20298; goto __pyx_L1_error;}
20299 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20300
20301 /* "cephfs.pyx":361
20302 *
20303 *
20304 * def decode_cstr(val, encoding="utf-8"): # <<<<<<<<<<<<<<
20305 * """
20306 * Decode a byte string into a Python string.
20307 */
20308 __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6cephfs_5decode_cstr, NULL((void*)0), __pyx_n_s_cephfs); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__20308; goto __pyx_L1_error;}
20309 __Pyx_GOTREF(__pyx_t_2);
20310 if (PyDict_SetItem(__pyx_d, __pyx_n_s_decode_cstr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__20310; goto __pyx_L1_error;}
20311 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20312
20313 /* "cephfs.pyx":1
20314 * """ # <<<<<<<<<<<<<<
20315 * This module is a thin wrapper around libcephfs.
20316 * """
20317 */
20318 __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__20318; goto __pyx_L1_error;}
20319 __Pyx_GOTREF(__pyx_t_2);
20320 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__20320; goto __pyx_L1_error;}
20321 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20322
20323 /*--- Wrapped vars code ---*/
20324
20325 goto __pyx_L0;
20326 __pyx_L1_error:;
20327 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
20328 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
20329 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
20330 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
20331 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
20332 if (__pyx_m) {
20333 if (__pyx_d) {
20334 __Pyx_AddTraceback("init cephfs", __pyx_clineno, __pyx_lineno, __pyx_filename);
20335 }
20336 Py_DECREF(__pyx_m)do { if ( --((PyObject*)(__pyx_m))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_m)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(__pyx_m)))); } while (0)
; __pyx_m = 0;
20337 } else if (!PyErr_Occurred()) {
20338 PyErr_SetString(PyExc_ImportError, "init cephfs");
20339 }
20340 __pyx_L0:;
20341 __Pyx_RefNannyFinishContext();
20342 #if PY_MAJOR_VERSION2 < 3
20343 return;
20344 #else
20345 return __pyx_m;
20346 #endif
20347}
20348
20349/* --- Runtime support code --- */
20350#if CYTHON_REFNANNY0
20351static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20352 PyObject *m = NULL((void*)0), *p = NULL((void*)0);
20353 void *r = NULL((void*)0);
20354 m = PyImport_ImportModule((char *)modname);
20355 if (!m) goto end;
20356 p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
20357 if (!p) goto end;
20358 r = PyLong_AsVoidPtr(p);
20359end:
20360 Py_XDECREF(p)do { if ((p) == ((void*)0)) ; else do { if ( --((PyObject*)(p
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
p)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(p
)))); } while (0); } while (0)
;
20361 Py_XDECREF(m)do { if ((m) == ((void*)0)) ; else do { if ( --((PyObject*)(m
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
m)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(m
)))); } while (0); } while (0)
;
20362 return (__Pyx_RefNannyAPIStruct *)r;
20363}
20364#endif
20365
20366static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20367 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20368 if (unlikely(!result)__builtin_expect(!!(!result), 0)) {
20369 PyErr_Format(PyExc_NameError,
20370#if PY_MAJOR_VERSION2 >= 3
20371 "name '%U' is not defined", name);
20372#else
20373 "name '%.200s' is not defined", PyString_AS_STRING(name)(((PyStringObject *)(name))->ob_sval));
20374#endif
20375 }
20376 return result;
20377}
20378
20379static void __Pyx_RaiseArgtupleInvalid(
20380 const char* func_name,
20381 int exact,
20382 Py_ssize_t num_min,
20383 Py_ssize_t num_max,
20384 Py_ssize_t num_found)
20385{
20386 Py_ssize_t num_expected;
20387 const char *more_or_less;
20388 if (num_found < num_min) {
20389 num_expected = num_min;
20390 more_or_less = "at least";
20391 } else {
20392 num_expected = num_max;
20393 more_or_less = "at most";
20394 }
20395 if (exact) {
20396 more_or_less = "exactly";
20397 }
20398 PyErr_Format(PyExc_TypeError,
20399 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T"z" "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T"z" "d given)",
20400 func_name, more_or_less, num_expected,
20401 (num_expected == 1) ? "" : "s", num_found);
20402}
20403
20404static void __Pyx_RaiseDoubleKeywordsError(
20405 const char* func_name,
20406 PyObject* kw_name)
20407{
20408 PyErr_Format(PyExc_TypeError,
20409 #if PY_MAJOR_VERSION2 >= 3
20410 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
20411 #else
20412 "%s() got multiple values for keyword argument '%s'", func_name,
20413 PyString_AsString(kw_name));
20414 #endif
20415}
20416
20417static int __Pyx_ParseOptionalKeywords(
20418 PyObject *kwds,
20419 PyObject **argnames[],
20420 PyObject *kwds2,
20421 PyObject *values[],
20422 Py_ssize_t num_pos_args,
20423 const char* function_name)
20424{
20425 PyObject *key = 0, *value = 0;
20426 Py_ssize_t pos = 0;
20427 PyObject*** name;
20428 PyObject*** first_kw_arg = argnames + num_pos_args;
20429 while (PyDict_Next(kwds, &pos, &key, &value)) {
20430 name = first_kw_arg;
20431 while (*name && (**name != key)) name++;
20432 if (*name) {
20433 values[name-argnames] = value;
20434 continue;
20435 }
20436 name = first_kw_arg;
20437 #if PY_MAJOR_VERSION2 < 3
20438 if (likely(PyString_CheckExact(key))__builtin_expect(!!(((((PyObject*)(key))->ob_type) == &
PyString_Type)), 1)
|| likely(PyString_Check(key))__builtin_expect(!!(((((((PyObject*)(key))->ob_type))->
tp_flags & ((1L<<27))) != 0)), 1)
) {
20439 while (*name) {
20440 if ((CYTHON_COMPILING_IN_PYPY0 || PyString_GET_SIZE(**name)(((PyVarObject*)(**name))->ob_size) == PyString_GET_SIZE(key)(((PyVarObject*)(key))->ob_size))
20441 && _PyString_Eq(**name, key)) {
20442 values[name-argnames] = value;
20443 break;
20444 }
20445 name++;
20446 }
20447 if (*name) continue;
20448 else {
20449 PyObject*** argname = argnames;
20450 while (argname != first_kw_arg) {
20451 if ((**argname == key) || (
20452 (CYTHON_COMPILING_IN_PYPY0 || PyString_GET_SIZE(**argname)(((PyVarObject*)(**argname))->ob_size) == PyString_GET_SIZE(key)(((PyVarObject*)(key))->ob_size))
20453 && _PyString_Eq(**argname, key))) {
20454 goto arg_passed_twice;
20455 }
20456 argname++;
20457 }
20458 }
20459 } else
20460 #endif
20461 if (likely(PyUnicode_Check(key))__builtin_expect(!!(((((((PyObject*)(key))->ob_type))->
tp_flags & ((1L<<28))) != 0)), 1)
) {
20462 while (*name) {
20463 int cmp = (**name == key) ? 0 :
20464 #if !CYTHON_COMPILING_IN_PYPY0 && PY_MAJOR_VERSION2 >= 3
20465 (PyUnicode_GET_SIZE(**name)(((PyUnicodeObject *)(**name))->length) != PyUnicode_GET_SIZE(key)(((PyUnicodeObject *)(key))->length)) ? 1 :
20466 #endif
20467 PyUnicode_ComparePyUnicodeUCS4_Compare(**name, key);
20468 if (cmp < 0 && unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) goto bad;
20469 if (cmp == 0) {
20470 values[name-argnames] = value;
20471 break;
20472 }
20473 name++;
20474 }
20475 if (*name) continue;
20476 else {
20477 PyObject*** argname = argnames;
20478 while (argname != first_kw_arg) {
20479 int cmp = (**argname == key) ? 0 :
20480 #if !CYTHON_COMPILING_IN_PYPY0 && PY_MAJOR_VERSION2 >= 3
20481 (PyUnicode_GET_SIZE(**argname)(((PyUnicodeObject *)(**argname))->length) != PyUnicode_GET_SIZE(key)(((PyUnicodeObject *)(key))->length)) ? 1 :
20482 #endif
20483 PyUnicode_ComparePyUnicodeUCS4_Compare(**argname, key);
20484 if (cmp < 0 && unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) goto bad;
20485 if (cmp == 0) goto arg_passed_twice;
20486 argname++;
20487 }
20488 }
20489 } else
20490 goto invalid_keyword_type;
20491 if (kwds2) {
20492 if (unlikely(PyDict_SetItem(kwds2, key, value))__builtin_expect(!!(PyDict_SetItem(kwds2, key, value)), 0)) goto bad;
20493 } else {
20494 goto invalid_keyword;
20495 }
20496 }
20497 return 0;
20498arg_passed_twice:
20499 __Pyx_RaiseDoubleKeywordsError(function_name, key);
20500 goto bad;
20501invalid_keyword_type:
20502 PyErr_Format(PyExc_TypeError,
20503 "%.200s() keywords must be strings", function_name);
20504 goto bad;
20505invalid_keyword:
20506 PyErr_Format(PyExc_TypeError,
20507 #if PY_MAJOR_VERSION2 < 3
20508 "%.200s() got an unexpected keyword argument '%.200s'",
20509 function_name, PyString_AsString(key));
20510 #else
20511 "%s() got an unexpected keyword argument '%U'",
20512 function_name, key);
20513 #endif
20514bad:
20515 return -1;
20516}
20517
20518static CYTHON_INLINE__inline__ PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
20519 PyObject *result;
20520#if CYTHON_COMPILING_IN_CPYTHON1
20521 result = PyDict_GetItem(__pyx_d, name);
20522 if (likely(result)__builtin_expect(!!(result), 1)) {
20523 Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++);
20524 } else {
20525#else
20526 result = PyObject_GetItem(__pyx_d, name);
20527 if (!result) {
20528 PyErr_Clear();
20529#endif
20530 result = __Pyx_GetBuiltinName(name);
20531 }
20532 return result;
20533}
20534
20535#if CYTHON_COMPILING_IN_CPYTHON1
20536static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20537 PyObject *result;
20538 ternaryfunc call = func->ob_type->tp_call;
20539 if (unlikely(!call)__builtin_expect(!!(!call), 0))
20540 return PyObject_Call(func, arg, kw);
20541 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))__builtin_expect(!!(((++((_PyThreadState_Current)->recursion_depth
) > _Py_CheckRecursionLimit) && _Py_CheckRecursiveCall
((char*)" while calling a Python object"))), 0)
)
20542 return NULL((void*)0);
20543 result = (*call)(func, arg, kw);
20544 Py_LeaveRecursiveCall()(--(_PyThreadState_Current)->recursion_depth);
20545 if (unlikely(!result)__builtin_expect(!!(!result), 0) && unlikely(!PyErr_Occurred())__builtin_expect(!!(!PyErr_Occurred()), 0)) {
20546 PyErr_SetString(
20547 PyExc_SystemError,
20548 "NULL result without error in PyObject_Call");
20549 }
20550 return result;
20551}
20552#endif
20553
20554#if CYTHON_COMPILING_IN_CPYTHON1
20555static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
20556 PyObject *self, *result;
20557 PyCFunction cfunc;
20558 cfunc = PyCFunction_GET_FUNCTION(func)(((PyCFunctionObject *)func) -> m_ml -> ml_meth);
20559 self = PyCFunction_GET_SELF(func)(((PyCFunctionObject *)func) -> m_self);
20560 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))__builtin_expect(!!(((++((_PyThreadState_Current)->recursion_depth
) > _Py_CheckRecursionLimit) && _Py_CheckRecursiveCall
((char*)" while calling a Python object"))), 0)
)
20561 return NULL((void*)0);
20562 result = cfunc(self, arg);
20563 Py_LeaveRecursiveCall()(--(_PyThreadState_Current)->recursion_depth);
20564 if (unlikely(!result)__builtin_expect(!!(!result), 0) && unlikely(!PyErr_Occurred())__builtin_expect(!!(!PyErr_Occurred()), 0)) {
20565 PyErr_SetString(
20566 PyExc_SystemError,
20567 "NULL result without error in PyObject_Call");
20568 }
20569 return result;
20570}
20571#endif
20572
20573#if CYTHON_COMPILING_IN_CPYTHON1
20574static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20575 PyObject *result;
20576 PyObject *args = PyTuple_New(1);
20577 if (unlikely(!args)__builtin_expect(!!(!args), 0)) return NULL((void*)0);
20578 Py_INCREF(arg)( ((PyObject*)(arg))->ob_refcnt++);
20579 PyTuple_SET_ITEM(args, 0, arg)(((PyTupleObject *)(args))->ob_item[0] = arg);
20580 result = __Pyx_PyObject_Call(func, args, NULL((void*)0));
20581 Py_DECREF(args)do { if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(args)))); } while (0)
;
20582 return result;
20583}
20584static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20585#ifdef __Pyx_CyFunction_USED1
20586 if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))__builtin_expect(!!(((((PyObject*)(func))->ob_type) == &
PyCFunction_Type) || ((((PyObject*)(func))->ob_type) == (__pyx_CyFunctionType
) || PyType_IsSubtype((((PyObject*)(func))->ob_type), (__pyx_CyFunctionType
)))), 1)
) {
20587#else
20588 if (likely(PyCFunction_Check(func))__builtin_expect(!!(((((PyObject*)(func))->ob_type) == &
PyCFunction_Type)), 1)
) {
20589#endif
20590 if (likely(PyCFunction_GET_FLAGS(func) & METH_O)__builtin_expect(!!((((PyCFunctionObject *)func) -> m_ml ->
ml_flags) & 0x0008), 1)
) {
20591 return __Pyx_PyObject_CallMethO(func, arg);
20592 }
20593 }
20594 return __Pyx__PyObject_CallOneArg(func, arg);
20595}
20596#else
20597static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20598 PyObject *result;
20599 PyObject *args = PyTuple_Pack(1, arg);
20600 if (unlikely(!args)__builtin_expect(!!(!args), 0)) return NULL((void*)0);
20601 result = __Pyx_PyObject_Call(func, args, NULL((void*)0));
20602 Py_DECREF(args)do { if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(args)))); } while (0)
;
20603 return result;
20604}
20605#endif
20606
20607#if CYTHON_COMPILING_IN_CPYTHON1
20608static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
20609#ifdef __Pyx_CyFunction_USED1
20610 if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))__builtin_expect(!!(((((PyObject*)(func))->ob_type) == &
PyCFunction_Type) || ((((PyObject*)(func))->ob_type) == (__pyx_CyFunctionType
) || PyType_IsSubtype((((PyObject*)(func))->ob_type), (__pyx_CyFunctionType
)))), 1)
) {
20611#else
20612 if (likely(PyCFunction_Check(func))__builtin_expect(!!(((((PyObject*)(func))->ob_type) == &
PyCFunction_Type)), 1)
) {
20613#endif
20614 if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)__builtin_expect(!!((((PyCFunctionObject *)func) -> m_ml ->
ml_flags) & 0x0004), 1)
) {
20615 return __Pyx_PyObject_CallMethO(func, NULL((void*)0));
20616 }
20617 }
20618 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL((void*)0));
20619}
20620#endif
20621
20622static CYTHON_INLINE__inline__ void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
20623#if CYTHON_COMPILING_IN_CPYTHON1
20624 PyObject *tmp_type, *tmp_value, *tmp_tb;
20625 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
20626 tmp_type = tstate->curexc_type;
20627 tmp_value = tstate->curexc_value;
20628 tmp_tb = tstate->curexc_traceback;
20629 tstate->curexc_type = type;
20630 tstate->curexc_value = value;
20631 tstate->curexc_traceback = tb;
20632 Py_XDECREF(tmp_type)do { if ((tmp_type) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_type))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_type)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_type)))); } while (0); } while (0)
;
20633 Py_XDECREF(tmp_value)do { if ((tmp_value) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_value))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(tmp_value)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp_value)))); } while (0); } while (0)
;
20634 Py_XDECREF(tmp_tb)do { if ((tmp_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_tb)))); } while (0); } while (0)
;
20635#else
20636 PyErr_Restore(type, value, tb);
20637#endif
20638}
20639static CYTHON_INLINE__inline__ void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
20640#if CYTHON_COMPILING_IN_CPYTHON1
20641 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
20642 *type = tstate->curexc_type;
20643 *value = tstate->curexc_value;
20644 *tb = tstate->curexc_traceback;
20645 tstate->curexc_type = 0;
20646 tstate->curexc_value = 0;
20647 tstate->curexc_traceback = 0;
20648#else
20649 PyErr_Fetch(type, value, tb);
20650#endif
20651}
20652
20653static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED__attribute__ ((__unused__)) int clineno,
20654 CYTHON_UNUSED__attribute__ ((__unused__)) int lineno, CYTHON_UNUSED__attribute__ ((__unused__)) const char *filename,
20655 int full_traceback, CYTHON_UNUSED__attribute__ ((__unused__)) int nogil) {
20656 PyObject *old_exc, *old_val, *old_tb;
20657 PyObject *ctx;
20658#ifdef WITH_THREAD1
20659 PyGILState_STATE state;
20660 if (nogil)
20661 state = PyGILState_Ensure();
20662#endif
20663 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
20664 if (full_traceback) {
20665 Py_XINCREF(old_exc)do { if ((old_exc) == ((void*)0)) ; else ( ((PyObject*)(old_exc
))->ob_refcnt++); } while (0)
;
20666 Py_XINCREF(old_val)do { if ((old_val) == ((void*)0)) ; else ( ((PyObject*)(old_val
))->ob_refcnt++); } while (0)
;
20667 Py_XINCREF(old_tb)do { if ((old_tb) == ((void*)0)) ; else ( ((PyObject*)(old_tb
))->ob_refcnt++); } while (0)
;
20668 __Pyx_ErrRestore(old_exc, old_val, old_tb);
20669 PyErr_PrintEx(1);
20670 }
20671 #if PY_MAJOR_VERSION2 < 3
20672 ctx = PyString_FromString(name);
20673 #else
20674 ctx = PyUnicode_FromStringPyUnicodeUCS4_FromString(name);
20675 #endif
20676 __Pyx_ErrRestore(old_exc, old_val, old_tb);
20677 if (!ctx) {
20678 PyErr_WriteUnraisable(Py_None(&_Py_NoneStruct));
20679 } else {
20680 PyErr_WriteUnraisable(ctx);
20681 Py_DECREF(ctx)do { if ( --((PyObject*)(ctx))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(ctx)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(ctx)))); } while (0)
;
20682 }
20683#ifdef WITH_THREAD1
20684 if (nogil)
20685 PyGILState_Release(state);
20686#endif
20687}
20688
20689#if PY_MAJOR_VERSION2 < 3
20690static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
20691 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *cause) {
20692 Py_XINCREF(type)do { if ((type) == ((void*)0)) ; else ( ((PyObject*)(type))->
ob_refcnt++); } while (0)
;
20693 if (!value || value == Py_None(&_Py_NoneStruct))
20694 value = NULL((void*)0);
20695 else
20696 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
20697 if (!tb || tb == Py_None(&_Py_NoneStruct))
20698 tb = NULL((void*)0);
20699 else {
20700 Py_INCREF(tb)( ((PyObject*)(tb))->ob_refcnt++);
20701 if (!PyTraceBack_Check(tb)((((PyObject*)(tb))->ob_type) == &PyTraceBack_Type)) {
20702 PyErr_SetString(PyExc_TypeError,
20703 "raise: arg 3 must be a traceback or None");
20704 goto raise_error;
20705 }
20706 }
20707 if (PyType_Check(type)((((((PyObject*)(type))->ob_type))->tp_flags & ((1L
<<31))) != 0)
) {
20708#if CYTHON_COMPILING_IN_PYPY0
20709 if (!value) {
20710 Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
20711 value = Py_None(&_Py_NoneStruct);
20712 }
20713#endif
20714 PyErr_NormalizeException(&type, &value, &tb);
20715 } else {
20716 if (value) {
20717 PyErr_SetString(PyExc_TypeError,
20718 "instance exception may not have a separate value");
20719 goto raise_error;
20720 }
20721 value = type;
20722 type = (PyObject*) Py_TYPE(type)(((PyObject*)(type))->ob_type);
20723 Py_INCREF(type)( ((PyObject*)(type))->ob_refcnt++);
20724 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
20725 PyErr_SetString(PyExc_TypeError,
20726 "raise: exception class must be a subclass of BaseException");
20727 goto raise_error;
20728 }
20729 }
20730 __Pyx_ErrRestore(type, value, tb);
20731 return;
20732raise_error:
20733 Py_XDECREF(value)do { if ((value) == ((void*)0)) ; else do { if ( --((PyObject
*)(value))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(value)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(value)))); } while (0); } while (0)
;
20734 Py_XDECREF(type)do { if ((type) == ((void*)0)) ; else do { if ( --((PyObject*
)(type))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(type)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(type)))); } while (0); } while (0)
;
20735 Py_XDECREF(tb)do { if ((tb) == ((void*)0)) ; else do { if ( --((PyObject*)(
tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *
)(tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(tb)))); } while (0); } while (0)
;
20736 return;
20737}
20738#else
20739static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
20740 PyObject* owned_instance = NULL((void*)0);
20741 if (tb == Py_None(&_Py_NoneStruct)) {
20742 tb = 0;
20743 } else if (tb && !PyTraceBack_Check(tb)((((PyObject*)(tb))->ob_type) == &PyTraceBack_Type)) {
20744 PyErr_SetString(PyExc_TypeError,
20745 "raise: arg 3 must be a traceback or None");
20746 goto bad;
20747 }
20748 if (value == Py_None(&_Py_NoneStruct))
20749 value = 0;
20750 if (PyExceptionInstance_Check(type)((((type))->ob_type == &PyInstance_Type) || ((((type)->
ob_type)->tp_flags & ((1L<<30))) != 0))
) {
20751 if (value) {
20752 PyErr_SetString(PyExc_TypeError,
20753 "instance exception may not have a separate value");
20754 goto bad;
20755 }
20756 value = type;
20757 type = (PyObject*) Py_TYPE(value)(((PyObject*)(value))->ob_type);
20758 } else if (PyExceptionClass_Check(type)((((type))->ob_type == &PyClass_Type) || (((((((PyObject
*)((type)))->ob_type))->tp_flags & ((1L<<31))
) != 0) && ((((PyTypeObject*)(type))->tp_flags &
((1L<<30))) != 0)))
) {
20759 PyObject *instance_class = NULL((void*)0);
20760 if (value && PyExceptionInstance_Check(value)((((value))->ob_type == &PyInstance_Type) || ((((value
)->ob_type)->tp_flags & ((1L<<30))) != 0))
) {
20761 instance_class = (PyObject*) Py_TYPE(value)(((PyObject*)(value))->ob_type);
20762 if (instance_class != type) {
20763 int is_subclass = PyObject_IsSubclass(instance_class, type);
20764 if (!is_subclass) {
20765 instance_class = NULL((void*)0);
20766 } else if (unlikely(is_subclass == -1)__builtin_expect(!!(is_subclass == -1), 0)) {
20767 goto bad;
20768 } else {
20769 type = instance_class;
20770 }
20771 }
20772 }
20773 if (!instance_class) {
20774 PyObject *args;
20775 if (!value)
20776 args = PyTuple_New(0);
20777 else if (PyTuple_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L
<<26))) != 0)
) {
20778 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
20779 args = value;
20780 } else
20781 args = PyTuple_Pack(1, value);
20782 if (!args)
20783 goto bad;
20784 owned_instance = PyObject_Call(type, args, NULL((void*)0));
20785 Py_DECREF(args)do { if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(args)))); } while (0)
;
20786 if (!owned_instance)
20787 goto bad;
20788 value = owned_instance;
20789 if (!PyExceptionInstance_Check(value)((((value))->ob_type == &PyInstance_Type) || ((((value
)->ob_type)->tp_flags & ((1L<<30))) != 0))
) {
20790 PyErr_Format(PyExc_TypeError,
20791 "calling %R should have returned an instance of "
20792 "BaseException, not %R",
20793 type, Py_TYPE(value)(((PyObject*)(value))->ob_type));
20794 goto bad;
20795 }
20796 }
20797 } else {
20798 PyErr_SetString(PyExc_TypeError,
20799 "raise: exception class must be a subclass of BaseException");
20800 goto bad;
20801 }
20802#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x03030000
20803 if (cause) {
20804#else
20805 if (cause && cause != Py_None(&_Py_NoneStruct)) {
20806#endif
20807 PyObject *fixed_cause;
20808 if (cause == Py_None(&_Py_NoneStruct)) {
20809 fixed_cause = NULL((void*)0);
20810 } else if (PyExceptionClass_Check(cause)((((cause))->ob_type == &PyClass_Type) || (((((((PyObject
*)((cause)))->ob_type))->tp_flags & ((1L<<31)
)) != 0) && ((((PyTypeObject*)(cause))->tp_flags &
((1L<<30))) != 0)))
) {
20811 fixed_cause = PyObject_CallObject(cause, NULL((void*)0));
20812 if (fixed_cause == NULL((void*)0))
20813 goto bad;
20814 } else if (PyExceptionInstance_Check(cause)((((cause))->ob_type == &PyInstance_Type) || ((((cause
)->ob_type)->tp_flags & ((1L<<30))) != 0))
) {
20815 fixed_cause = cause;
20816 Py_INCREF(fixed_cause)( ((PyObject*)(fixed_cause))->ob_refcnt++);
20817 } else {
20818 PyErr_SetString(PyExc_TypeError,
20819 "exception causes must derive from "
20820 "BaseException");
20821 goto bad;
20822 }
20823 PyException_SetCause(value, fixed_cause);
20824 }
20825 PyErr_SetObject(type, value);
20826 if (tb) {
20827#if CYTHON_COMPILING_IN_PYPY0
20828 PyObject *tmp_type, *tmp_value, *tmp_tb;
20829 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
20830 Py_INCREF(tb)( ((PyObject*)(tb))->ob_refcnt++);
20831 PyErr_Restore(tmp_type, tmp_value, tb);
20832 Py_XDECREF(tmp_tb)do { if ((tmp_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_tb)))); } while (0); } while (0)
;
20833#else
20834 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
20835 PyObject* tmp_tb = tstate->curexc_traceback;
20836 if (tb != tmp_tb) {
20837 Py_INCREF(tb)( ((PyObject*)(tb))->ob_refcnt++);
20838 tstate->curexc_traceback = tb;
20839 Py_XDECREF(tmp_tb)do { if ((tmp_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_tb)))); } while (0); } while (0)
;
20840 }
20841#endif
20842 }
20843bad:
20844 Py_XDECREF(owned_instance)do { if ((owned_instance) == ((void*)0)) ; else do { if ( --(
(PyObject*)(owned_instance))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(owned_instance)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(owned_instance)))); } while
(0); } while (0)
;
20845 return;
20846}
20847#endif
20848
20849static CYTHON_INLINE__inline__ void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
20850#if CYTHON_COMPILING_IN_CPYTHON1
20851 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
20852 *type = tstate->exc_type;
20853 *value = tstate->exc_value;
20854 *tb = tstate->exc_traceback;
20855 Py_XINCREF(*type)do { if ((*type) == ((void*)0)) ; else ( ((PyObject*)(*type))
->ob_refcnt++); } while (0)
;
20856 Py_XINCREF(*value)do { if ((*value) == ((void*)0)) ; else ( ((PyObject*)(*value
))->ob_refcnt++); } while (0)
;
20857 Py_XINCREF(*tb)do { if ((*tb) == ((void*)0)) ; else ( ((PyObject*)(*tb))->
ob_refcnt++); } while (0)
;
20858#else
20859 PyErr_GetExcInfo(type, value, tb);
20860#endif
20861}
20862static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
20863#if CYTHON_COMPILING_IN_CPYTHON1
20864 PyObject *tmp_type, *tmp_value, *tmp_tb;
20865 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
20866 tmp_type = tstate->exc_type;
20867 tmp_value = tstate->exc_value;
20868 tmp_tb = tstate->exc_traceback;
20869 tstate->exc_type = type;
20870 tstate->exc_value = value;
20871 tstate->exc_traceback = tb;
20872 Py_XDECREF(tmp_type)do { if ((tmp_type) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_type))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_type)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_type)))); } while (0); } while (0)
;
20873 Py_XDECREF(tmp_value)do { if ((tmp_value) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_value))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(tmp_value)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp_value)))); } while (0); } while (0)
;
20874 Py_XDECREF(tmp_tb)do { if ((tmp_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_tb)))); } while (0); } while (0)
;
20875#else
20876 PyErr_SetExcInfo(type, value, tb);
20877#endif
20878}
20879
20880static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
20881 PyObject *local_type, *local_value, *local_tb;
20882#if CYTHON_COMPILING_IN_CPYTHON1
20883 PyObject *tmp_type, *tmp_value, *tmp_tb;
20884 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
20885 local_type = tstate->curexc_type;
20886 local_value = tstate->curexc_value;
20887 local_tb = tstate->curexc_traceback;
20888 tstate->curexc_type = 0;
20889 tstate->curexc_value = 0;
20890 tstate->curexc_traceback = 0;
20891#else
20892 PyErr_Fetch(&local_type, &local_value, &local_tb);
20893#endif
20894 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
20895#if CYTHON_COMPILING_IN_CPYTHON1
20896 if (unlikely(tstate->curexc_type)__builtin_expect(!!(tstate->curexc_type), 0))
20897#else
20898 if (unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0))
20899#endif
20900 goto bad;
20901 #if PY_MAJOR_VERSION2 >= 3
20902 if (local_tb) {
20903 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)__builtin_expect(!!(PyException_SetTraceback(local_value, local_tb
) < 0), 0)
)
20904 goto bad;
20905 }
20906 #endif
20907 Py_XINCREF(local_tb)do { if ((local_tb) == ((void*)0)) ; else ( ((PyObject*)(local_tb
))->ob_refcnt++); } while (0)
;
20908 Py_XINCREF(local_type)do { if ((local_type) == ((void*)0)) ; else ( ((PyObject*)(local_type
))->ob_refcnt++); } while (0)
;
20909 Py_XINCREF(local_value)do { if ((local_value) == ((void*)0)) ; else ( ((PyObject*)(local_value
))->ob_refcnt++); } while (0)
;
20910 *type = local_type;
20911 *value = local_value;
20912 *tb = local_tb;
20913#if CYTHON_COMPILING_IN_CPYTHON1
20914 tmp_type = tstate->exc_type;
20915 tmp_value = tstate->exc_value;
20916 tmp_tb = tstate->exc_traceback;
20917 tstate->exc_type = local_type;
20918 tstate->exc_value = local_value;
20919 tstate->exc_traceback = local_tb;
20920 Py_XDECREF(tmp_type)do { if ((tmp_type) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_type))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_type)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_type)))); } while (0); } while (0)
;
20921 Py_XDECREF(tmp_value)do { if ((tmp_value) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_value))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(tmp_value)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp_value)))); } while (0); } while (0)
;
20922 Py_XDECREF(tmp_tb)do { if ((tmp_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_tb)))); } while (0); } while (0)
;
20923#else
20924 PyErr_SetExcInfo(local_type, local_value, local_tb);
20925#endif
20926 return 0;
20927bad:
20928 *type = 0;
20929 *value = 0;
20930 *tb = 0;
20931 Py_XDECREF(local_type)do { if ((local_type) == ((void*)0)) ; else do { if ( --((PyObject
*)(local_type))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(local_type)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(local_type)))); } while (0); } while (0)
;
20932 Py_XDECREF(local_value)do { if ((local_value) == ((void*)0)) ; else do { if ( --((PyObject
*)(local_value))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(local_value)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(local_value)))); } while (0); } while (0)
;
20933 Py_XDECREF(local_tb)do { if ((local_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(local_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(local_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(local_tb)))); } while (0); } while (0)
;
20934 return -1;
20935}
20936
20937static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
20938 PyObject *r;
20939 if (!j) return NULL((void*)0);
20940 r = PyObject_GetItem(o, j);
20941 Py_DECREF(j)do { if ( --((PyObject*)(j))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(j)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(j)))); } while (0)
;
20942 return r;
20943}
20944static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
20945 CYTHON_NCP_UNUSED int wraparound,
20946 CYTHON_NCP_UNUSED int boundscheck) {
20947#if CYTHON_COMPILING_IN_CPYTHON1
20948 if (wraparound & unlikely(i < 0)__builtin_expect(!!(i < 0), 0)) i += PyList_GET_SIZE(o)(((PyVarObject*)(o))->ob_size);
20949 if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))__builtin_expect(!!((0 <= i) & (i < (((PyVarObject*
)(o))->ob_size))), 1)
) {
20950 PyObject *r = PyList_GET_ITEM(o, i)(((PyListObject *)(o))->ob_item[i]);
20951 Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++);
20952 return r;
20953 }
20954 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
20955#else
20956 return PySequence_GetItem(o, i);
20957#endif
20958}
20959static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
20960 CYTHON_NCP_UNUSED int wraparound,
20961 CYTHON_NCP_UNUSED int boundscheck) {
20962#if CYTHON_COMPILING_IN_CPYTHON1
20963 if (wraparound & unlikely(i < 0)__builtin_expect(!!(i < 0), 0)) i += PyTuple_GET_SIZE(o)(((PyVarObject*)(o))->ob_size);
20964 if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))__builtin_expect(!!((0 <= i) & (i < (((PyVarObject*
)(o))->ob_size))), 1)
) {
20965 PyObject *r = PyTuple_GET_ITEM(o, i)(((PyTupleObject *)(o))->ob_item[i]);
20966 Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++);
20967 return r;
20968 }
20969 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
20970#else
20971 return PySequence_GetItem(o, i);
20972#endif
20973}
20974static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
20975 CYTHON_NCP_UNUSED int wraparound,
20976 CYTHON_NCP_UNUSED int boundscheck) {
20977#if CYTHON_COMPILING_IN_CPYTHON1
20978 if (is_list || PyList_CheckExact(o)((((PyObject*)(o))->ob_type) == &PyList_Type)) {
20979 Py_ssize_t n = ((!wraparound) | likely(i >= 0)__builtin_expect(!!(i >= 0), 1)) ? i : i + PyList_GET_SIZE(o)(((PyVarObject*)(o))->ob_size);
20980 if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o)))__builtin_expect(!!((n >= 0) & (n < (((PyVarObject*
)(o))->ob_size))), 1)
)) {
20981 PyObject *r = PyList_GET_ITEM(o, n)(((PyListObject *)(o))->ob_item[n]);
20982 Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++);
20983 return r;
20984 }
20985 }
20986 else if (PyTuple_CheckExact(o)((((PyObject*)(o))->ob_type) == &PyTuple_Type)) {
20987 Py_ssize_t n = ((!wraparound) | likely(i >= 0)__builtin_expect(!!(i >= 0), 1)) ? i : i + PyTuple_GET_SIZE(o)(((PyVarObject*)(o))->ob_size);
20988 if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))__builtin_expect(!!((n >= 0) & (n < (((PyVarObject*
)(o))->ob_size))), 1)
) {
20989 PyObject *r = PyTuple_GET_ITEM(o, n)(((PyTupleObject *)(o))->ob_item[n]);
20990 Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++);
20991 return r;
20992 }
20993 } else {
20994 PySequenceMethods *m = Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_as_sequence;
20995 if (likely(m && m->sq_item)__builtin_expect(!!(m && m->sq_item), 1)) {
20996 if (wraparound && unlikely(i < 0)__builtin_expect(!!(i < 0), 0) && likely(m->sq_length)__builtin_expect(!!(m->sq_length), 1)) {
20997 Py_ssize_t l = m->sq_length(o);
20998 if (likely(l >= 0)__builtin_expect(!!(l >= 0), 1)) {
20999 i += l;
21000 } else {
21001 if (PyErr_ExceptionMatches(PyExc_OverflowError))
21002 PyErr_Clear();
21003 else
21004 return NULL((void*)0);
21005 }
21006 }
21007 return m->sq_item(o, i);
21008 }
21009 }
21010#else
21011 if (is_list || PySequence_Check(o)) {
21012 return PySequence_GetItem(o, i);
21013 }
21014#endif
21015 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
21016}
21017
21018static CYTHON_INLINE__inline__ int __Pyx_CheckKeywordStrings(
21019 PyObject *kwdict,
21020 const char* function_name,
21021 int kw_allowed)
21022{
21023 PyObject* key = 0;
21024 Py_ssize_t pos = 0;
21025#if CYTHON_COMPILING_IN_PYPY0
21026 if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
21027 goto invalid_keyword;
21028 return 1;
21029#else
21030 while (PyDict_Next(kwdict, &pos, &key, 0)) {
21031 #if PY_MAJOR_VERSION2 < 3
21032 if (unlikely(!PyString_CheckExact(key))__builtin_expect(!!(!((((PyObject*)(key))->ob_type) == &
PyString_Type)), 0)
&& unlikely(!PyString_Check(key))__builtin_expect(!!(!((((((PyObject*)(key))->ob_type))->
tp_flags & ((1L<<27))) != 0)), 0)
)
21033 #endif
21034 if (unlikely(!PyUnicode_Check(key))__builtin_expect(!!(!((((((PyObject*)(key))->ob_type))->
tp_flags & ((1L<<28))) != 0)), 0)
)
21035 goto invalid_keyword_type;
21036 }
21037 if ((!kw_allowed) && unlikely(key)__builtin_expect(!!(key), 0))
21038 goto invalid_keyword;
21039 return 1;
21040invalid_keyword_type:
21041 PyErr_Format(PyExc_TypeError,
21042 "%.200s() keywords must be strings", function_name);
21043 return 0;
21044#endif
21045invalid_keyword:
21046 PyErr_Format(PyExc_TypeError,
21047 #if PY_MAJOR_VERSION2 < 3
21048 "%.200s() got an unexpected keyword argument '%.200s'",
21049 function_name, PyString_AsString(key));
21050 #else
21051 "%s() got an unexpected keyword argument '%U'",
21052 function_name, key);
21053 #endif
21054 return 0;
21055}
21056
21057static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
21058 PyErr_Format(PyExc_TypeError,
21059 "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21060 name, type->tp_name, Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_name);
21061}
21062static CYTHON_INLINE__inline__ int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
21063 const char *name, int exact)
21064{
21065 if (unlikely(!type)__builtin_expect(!!(!type), 0)) {
21066 PyErr_SetString(PyExc_SystemError, "Missing type object");
21067 return 0;
21068 }
21069 if (none_allowed && obj == Py_None(&_Py_NoneStruct)) return 1;
21070 else if (exact) {
21071 if (likely(Py_TYPE(obj) == type)__builtin_expect(!!((((PyObject*)(obj))->ob_type) == type)
, 1)
) return 1;
21072 #if PY_MAJOR_VERSION2 == 2
21073 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))__builtin_expect(!!((((((PyObject*)(obj))->ob_type) == &
PyString_Type) || ((((PyObject*)(obj))->ob_type) == &PyUnicode_Type
))), 1)
) return 1;
21074 #endif
21075 }
21076 else {
21077 if (likely(PyObject_TypeCheck(obj, type))__builtin_expect(!!(((((PyObject*)(obj))->ob_type) == (type
) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (type
)))), 1)
) return 1;
21078 }
21079 __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
21080 return 0;
21081}
21082
21083static CYTHON_INLINE__inline__ int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
21084#if CYTHON_COMPILING_IN_PYPY0
21085 return PyObject_RichCompareBool(s1, s2, equals);
21086#else
21087 if (s1 == s2) {
21088 return (equals == Py_EQ2);
21089 } else if (PyBytes_CheckExact(s1)((((PyObject*)(s1))->ob_type) == &PyString_Type) & PyBytes_CheckExact(s2)((((PyObject*)(s2))->ob_type) == &PyString_Type)) {
21090 const char *ps1, *ps2;
21091 Py_ssize_t length = PyBytes_GET_SIZE(s1)(((PyVarObject*)(s1))->ob_size);
21092 if (length != PyBytes_GET_SIZE(s2)(((PyVarObject*)(s2))->ob_size))
21093 return (equals == Py_NE3);
21094 ps1 = PyBytes_AS_STRING(s1)(((PyStringObject *)(s1))->ob_sval);
21095 ps2 = PyBytes_AS_STRING(s2)(((PyStringObject *)(s2))->ob_sval);
21096 if (ps1[0] != ps2[0]) {
21097 return (equals == Py_NE3);
21098 } else if (length == 1) {
21099 return (equals == Py_EQ2);
21100 } else {
21101 int result = memcmp(ps1, ps2, (size_t)length);
21102 return (equals == Py_EQ2) ? (result == 0) : (result != 0);
21103 }
21104 } else if ((s1 == Py_None(&_Py_NoneStruct)) & PyBytes_CheckExact(s2)((((PyObject*)(s2))->ob_type) == &PyString_Type)) {
21105 return (equals == Py_NE3);
21106 } else if ((s2 == Py_None(&_Py_NoneStruct)) & PyBytes_CheckExact(s1)((((PyObject*)(s1))->ob_type) == &PyString_Type)) {
21107 return (equals == Py_NE3);
21108 } else {
21109 int result;
21110 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21111 if (!py_result)
21112 return -1;
21113 result = __Pyx_PyObject_IsTrue(py_result);
21114 Py_DECREF(py_result)do { if ( --((PyObject*)(py_result))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_result)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_result)))); } while (
0)
;
21115 return result;
21116 }
21117#endif
21118}
21119
21120static CYTHON_INLINE__inline__ int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
21121#if CYTHON_COMPILING_IN_PYPY0
21122 return PyObject_RichCompareBool(s1, s2, equals);
21123#else
21124#if PY_MAJOR_VERSION2 < 3
21125 PyObject* owned_ref = NULL((void*)0);
21126#endif
21127 int s1_is_unicode, s2_is_unicode;
21128 if (s1 == s2) {
21129 goto return_eq;
21130 }
21131 s1_is_unicode = PyUnicode_CheckExact(s1)((((PyObject*)(s1))->ob_type) == &PyUnicode_Type);
21132 s2_is_unicode = PyUnicode_CheckExact(s2)((((PyObject*)(s2))->ob_type) == &PyUnicode_Type);
21133#if PY_MAJOR_VERSION2 < 3
21134 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)((((PyObject*)(s2))->ob_type) == &PyString_Type)) {
21135 owned_ref = PyUnicode_FromObjectPyUnicodeUCS4_FromObject(s2);
21136 if (unlikely(!owned_ref)__builtin_expect(!!(!owned_ref), 0))
21137 return -1;
21138 s2 = owned_ref;
21139 s2_is_unicode = 1;
21140 } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)((((PyObject*)(s1))->ob_type) == &PyString_Type)) {
21141 owned_ref = PyUnicode_FromObjectPyUnicodeUCS4_FromObject(s1);
21142 if (unlikely(!owned_ref)__builtin_expect(!!(!owned_ref), 0))
21143 return -1;
21144 s1 = owned_ref;
21145 s1_is_unicode = 1;
21146 } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
21147 return __Pyx_PyBytes_Equals(s1, s2, equals);
21148 }
21149#endif
21150 if (s1_is_unicode & s2_is_unicode) {
21151 Py_ssize_t length;
21152 int kind;
21153 void *data1, *data2;
21154 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0)__builtin_expect(!!((0) < 0), 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)__builtin_expect(!!((0) < 0), 0))
21155 return -1;
21156 length = __Pyx_PyUnicode_GET_LENGTH(s1)(((PyUnicodeObject *)(s1))->length);
21157 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)(((PyUnicodeObject *)(s2))->length)) {
21158 goto return_ne;
21159 }
21160 kind = __Pyx_PyUnicode_KIND(s1)(sizeof(Py_UNICODE));
21161 if (kind != __Pyx_PyUnicode_KIND(s2)(sizeof(Py_UNICODE))) {
21162 goto return_ne;
21163 }
21164 data1 = __Pyx_PyUnicode_DATA(s1)((void*)(((PyUnicodeObject *)(s1))->str));
21165 data2 = __Pyx_PyUnicode_DATA(s2)((void*)(((PyUnicodeObject *)(s2))->str));
21166 if (__Pyx_PyUnicode_READ(kind, data1, 0)((void)(kind), (Py_UCS4)(((Py_UNICODE*)data1)[0])) != __Pyx_PyUnicode_READ(kind, data2, 0)((void)(kind), (Py_UCS4)(((Py_UNICODE*)data2)[0]))) {
21167 goto return_ne;
21168 } else if (length == 1) {
21169 goto return_eq;
21170 } else {
21171 int result = memcmp(data1, data2, (size_t)(length * kind));
21172 #if PY_MAJOR_VERSION2 < 3
21173 Py_XDECREF(owned_ref)do { if ((owned_ref) == ((void*)0)) ; else do { if ( --((PyObject
*)(owned_ref))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(owned_ref)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(owned_ref)))); } while (0); } while (0)
;
21174 #endif
21175 return (equals == Py_EQ2) ? (result == 0) : (result != 0);
21176 }
21177 } else if ((s1 == Py_None(&_Py_NoneStruct)) & s2_is_unicode) {
21178 goto return_ne;
21179 } else if ((s2 == Py_None(&_Py_NoneStruct)) & s1_is_unicode) {
21180 goto return_ne;
21181 } else {
21182 int result;
21183 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21184 if (!py_result)
21185 return -1;
21186 result = __Pyx_PyObject_IsTrue(py_result);
21187 Py_DECREF(py_result)do { if ( --((PyObject*)(py_result))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_result)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_result)))); } while (
0)
;
21188 return result;
21189 }
21190return_eq:
21191 #if PY_MAJOR_VERSION2 < 3
21192 Py_XDECREF(owned_ref)do { if ((owned_ref) == ((void*)0)) ; else do { if ( --((PyObject
*)(owned_ref))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(owned_ref)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(owned_ref)))); } while (0); } while (0)
;
21193 #endif
21194 return (equals == Py_EQ2);
21195return_ne:
21196 #if PY_MAJOR_VERSION2 < 3
21197 Py_XDECREF(owned_ref)do { if ((owned_ref) == ((void*)0)) ; else do { if ( --((PyObject
*)(owned_ref))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(owned_ref)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(owned_ref)))); } while (0); } while (0)
;
21198 #endif
21199 return (equals == Py_NE3);
21200#endif
21201}
21202
21203static CYTHON_INLINE__inline__ int __Pyx_IterFinish(void) {
21204#if CYTHON_COMPILING_IN_CPYTHON1
21205 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
21206 PyObject* exc_type = tstate->curexc_type;
21207 if (unlikely(exc_type)__builtin_expect(!!(exc_type), 0)) {
21208 if (likely(exc_type == PyExc_StopIteration)__builtin_expect(!!(exc_type == PyExc_StopIteration), 1) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
21209 PyObject *exc_value, *exc_tb;
21210 exc_value = tstate->curexc_value;
21211 exc_tb = tstate->curexc_traceback;
21212 tstate->curexc_type = 0;
21213 tstate->curexc_value = 0;
21214 tstate->curexc_traceback = 0;
21215 Py_DECREF(exc_type)do { if ( --((PyObject*)(exc_type))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(exc_type)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(exc_type)))); } while (
0)
;
21216 Py_XDECREF(exc_value)do { if ((exc_value) == ((void*)0)) ; else do { if ( --((PyObject
*)(exc_value))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(exc_value)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(exc_value)))); } while (0); } while (0)
;
21217 Py_XDECREF(exc_tb)do { if ((exc_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(exc_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(exc_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(exc_tb)))); } while (0); } while (0)
;
21218 return 0;
21219 } else {
21220 return -1;
21221 }
21222 }
21223 return 0;
21224#else
21225 if (unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) {
21226 if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))__builtin_expect(!!(PyErr_ExceptionMatches(PyExc_StopIteration
)), 1)
) {
21227 PyErr_Clear();
21228 return 0;
21229 } else {
21230 return -1;
21231 }
21232 }
21233 return 0;
21234#endif
21235}
21236
21237static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
21238 PyObject *method, *result = NULL((void*)0);
21239 method = __Pyx_PyObject_GetAttrStr(obj, method_name);
21240 if (unlikely(!method)__builtin_expect(!!(!method), 0)) goto bad;
21241#if CYTHON_COMPILING_IN_CPYTHON1
21242 if (likely(PyMethod_Check(method))__builtin_expect(!!(((method)->ob_type == &PyMethod_Type
)), 1)
) {
21243 PyObject *self = PyMethod_GET_SELF(method)(((PyMethodObject *)method) -> im_self);
21244 if (likely(self)__builtin_expect(!!(self), 1)) {
21245 PyObject *function = PyMethod_GET_FUNCTION(method)(((PyMethodObject *)method) -> im_func);
21246 result = __Pyx_PyObject_CallOneArg(function, self);
21247 Py_DECREF(method)do { if ( --((PyObject*)(method))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(method)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(method)))); } while (0)
;
21248 return result;
21249 }
21250 }
21251#endif
21252 result = __Pyx_PyObject_CallNoArg(method);
21253 Py_DECREF(method)do { if ( --((PyObject*)(method))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(method)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(method)))); } while (0)
;
21254bad:
21255 return result;
21256}
21257
21258static CYTHON_INLINE__inline__ void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
21259 PyErr_Format(PyExc_ValueError,
21260 "need more than %" CYTHON_FORMAT_SSIZE_T"z" "d value%.1s to unpack",
21261 index, (index == 1) ? "" : "s");
21262}
21263
21264static CYTHON_INLINE__inline__ void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
21265 PyErr_Format(PyExc_ValueError,
21266 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T"z" "d)", expected);
21267}
21268
21269static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
21270 if (unlikely(retval)__builtin_expect(!!(retval), 0)) {
21271 Py_DECREF(retval)do { if ( --((PyObject*)(retval))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(retval)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(retval)))); } while (0)
;
21272 __Pyx_RaiseTooManyValuesError(expected);
21273 return -1;
21274 } else {
21275 return __Pyx_IterFinish();
21276 }
21277 return 0;
21278}
21279
21280static CYTHON_INLINE__inline__ void __Pyx_RaiseNoneNotIterableError(void) {
21281 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
21282}
21283
21284static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
21285 if (t == Py_None(&_Py_NoneStruct)) {
21286 __Pyx_RaiseNoneNotIterableError();
21287 } else if (PyTuple_GET_SIZE(t)(((PyVarObject*)(t))->ob_size) < index) {
21288 __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)(((PyVarObject*)(t))->ob_size));
21289 } else {
21290 __Pyx_RaiseTooManyValuesError(index);
21291 }
21292}
21293
21294static CYTHON_INLINE__inline__ int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
21295 int is_tuple, int has_known_size, int decref_tuple) {
21296 Py_ssize_t index;
21297 PyObject *value1 = NULL((void*)0), *value2 = NULL((void*)0), *iter = NULL((void*)0);
21298 if (!is_tuple && unlikely(!PyTuple_Check(tuple))__builtin_expect(!!(!((((((PyObject*)(tuple))->ob_type))->
tp_flags & ((1L<<26))) != 0)), 0)
) {
21299 iternextfunc iternext;
21300 iter = PyObject_GetIter(tuple);
21301 if (unlikely(!iter)__builtin_expect(!!(!iter), 0)) goto bad;
21302 if (decref_tuple) { Py_DECREF(tuple)do { if ( --((PyObject*)(tuple))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tuple)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tuple)))); } while (0)
; tuple = NULL((void*)0); }
21303 iternext = Py_TYPE(iter)(((PyObject*)(iter))->ob_type)->tp_iternext;
21304 value1 = iternext(iter); if (unlikely(!value1)__builtin_expect(!!(!value1), 0)) { index = 0; goto unpacking_failed; }
21305 value2 = iternext(iter); if (unlikely(!value2)__builtin_expect(!!(!value2), 0)) { index = 1; goto unpacking_failed; }
21306 if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))__builtin_expect(!!(__Pyx_IternextUnpackEndCheck(iternext(iter
), 2)), 0)
) goto bad;
21307 Py_DECREF(iter)do { if ( --((PyObject*)(iter))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(iter)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(iter)))); } while (0)
;
21308 } else {
21309 if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)__builtin_expect(!!((((PyVarObject*)(tuple))->ob_size) != 2
), 0)
) {
21310 __Pyx_UnpackTupleError(tuple, 2);
21311 goto bad;
21312 }
21313#if CYTHON_COMPILING_IN_PYPY0
21314 value1 = PySequence_ITEM(tuple, 0)( (((PyObject*)(tuple))->ob_type)->tp_as_sequence->sq_item
(tuple, 0) )
;
21315 if (unlikely(!value1)__builtin_expect(!!(!value1), 0)) goto bad;
21316 value2 = PySequence_ITEM(tuple, 1)( (((PyObject*)(tuple))->ob_type)->tp_as_sequence->sq_item
(tuple, 1) )
;
21317 if (unlikely(!value2)__builtin_expect(!!(!value2), 0)) goto bad;
21318#else
21319 value1 = PyTuple_GET_ITEM(tuple, 0)(((PyTupleObject *)(tuple))->ob_item[0]);
21320 value2 = PyTuple_GET_ITEM(tuple, 1)(((PyTupleObject *)(tuple))->ob_item[1]);
21321 Py_INCREF(value1)( ((PyObject*)(value1))->ob_refcnt++);
21322 Py_INCREF(value2)( ((PyObject*)(value2))->ob_refcnt++);
21323#endif
21324 if (decref_tuple) { Py_DECREF(tuple)do { if ( --((PyObject*)(tuple))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tuple)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tuple)))); } while (0)
; }
21325 }
21326 *pvalue1 = value1;
21327 *pvalue2 = value2;
21328 return 0;
21329unpacking_failed:
21330 if (!has_known_size && __Pyx_IterFinish() == 0)
21331 __Pyx_RaiseNeedMoreValuesError(index);
21332bad:
21333 Py_XDECREF(iter)do { if ((iter) == ((void*)0)) ; else do { if ( --((PyObject*
)(iter))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(iter)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(iter)))); } while (0); } while (0)
;
21334 Py_XDECREF(value1)do { if ((value1) == ((void*)0)) ; else do { if ( --((PyObject
*)(value1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(value1)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(value1)))); } while (0); } while (0)
;
21335 Py_XDECREF(value2)do { if ((value2) == ((void*)0)) ; else do { if ( --((PyObject
*)(value2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(value2)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(value2)))); } while (0); } while (0)
;
21336 if (decref_tuple) { Py_XDECREF(tuple)do { if ((tuple) == ((void*)0)) ; else do { if ( --((PyObject
*)(tuple))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tuple)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tuple)))); } while (0); } while (0)
; }
21337 return -1;
21338}
21339
21340static CYTHON_INLINE__inline__ PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
21341 Py_ssize_t* p_orig_length, int* p_source_is_dict) {
21342 is_dict = is_dict || likely(PyDict_CheckExact(iterable))__builtin_expect(!!(((((PyObject*)(iterable))->ob_type) ==
&PyDict_Type)), 1)
;
21343 *p_source_is_dict = is_dict;
21344#if !CYTHON_COMPILING_IN_PYPY0
21345 if (is_dict) {
21346 *p_orig_length = PyDict_Size(iterable);
21347 Py_INCREF(iterable)( ((PyObject*)(iterable))->ob_refcnt++);
21348 return iterable;
21349 }
21350#endif
21351 *p_orig_length = 0;
21352 if (method_name) {
21353 PyObject* iter;
21354 iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
21355 if (!iterable)
21356 return NULL((void*)0);
21357#if !CYTHON_COMPILING_IN_PYPY0
21358 if (PyTuple_CheckExact(iterable)((((PyObject*)(iterable))->ob_type) == &PyTuple_Type) || PyList_CheckExact(iterable)((((PyObject*)(iterable))->ob_type) == &PyList_Type))
21359 return iterable;
21360#endif
21361 iter = PyObject_GetIter(iterable);
21362 Py_DECREF(iterable)do { if ( --((PyObject*)(iterable))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(iterable)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(iterable)))); } while (
0)
;
21363 return iter;
21364 }
21365 return PyObject_GetIter(iterable);
21366}
21367static CYTHON_INLINE__inline__ int __Pyx_dict_iter_next(
21368 PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
21369 PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
21370 PyObject* next_item;
21371#if !CYTHON_COMPILING_IN_PYPY0
21372 if (source_is_dict) {
21373 PyObject *key, *value;
21374 if (unlikely(orig_length != PyDict_Size(iter_obj))__builtin_expect(!!(orig_length != PyDict_Size(iter_obj)), 0)) {
21375 PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
21376 return -1;
21377 }
21378 if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))__builtin_expect(!!(!PyDict_Next(iter_obj, ppos, &key, &
value)), 0)
) {
21379 return 0;
21380 }
21381 if (pitem) {
21382 PyObject* tuple = PyTuple_New(2);
21383 if (unlikely(!tuple)__builtin_expect(!!(!tuple), 0)) {
21384 return -1;
21385 }
21386 Py_INCREF(key)( ((PyObject*)(key))->ob_refcnt++);
21387 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
21388 PyTuple_SET_ITEM(tuple, 0, key)(((PyTupleObject *)(tuple))->ob_item[0] = key);
21389 PyTuple_SET_ITEM(tuple, 1, value)(((PyTupleObject *)(tuple))->ob_item[1] = value);
21390 *pitem = tuple;
21391 } else {
21392 if (pkey) {
21393 Py_INCREF(key)( ((PyObject*)(key))->ob_refcnt++);
21394 *pkey = key;
21395 }
21396 if (pvalue) {
21397 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
21398 *pvalue = value;
21399 }
21400 }
21401 return 1;
21402 } else if (PyTuple_CheckExact(iter_obj)((((PyObject*)(iter_obj))->ob_type) == &PyTuple_Type)) {
21403 Py_ssize_t pos = *ppos;
21404 if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))__builtin_expect(!!(pos >= (((PyVarObject*)(iter_obj))->
ob_size)), 0)
) return 0;
21405 *ppos = pos + 1;
21406 next_item = PyTuple_GET_ITEM(iter_obj, pos)(((PyTupleObject *)(iter_obj))->ob_item[pos]);
21407 Py_INCREF(next_item)( ((PyObject*)(next_item))->ob_refcnt++);
21408 } else if (PyList_CheckExact(iter_obj)((((PyObject*)(iter_obj))->ob_type) == &PyList_Type)) {
21409 Py_ssize_t pos = *ppos;
21410 if (unlikely(pos >= PyList_GET_SIZE(iter_obj))__builtin_expect(!!(pos >= (((PyVarObject*)(iter_obj))->
ob_size)), 0)
) return 0;
21411 *ppos = pos + 1;
21412 next_item = PyList_GET_ITEM(iter_obj, pos)(((PyListObject *)(iter_obj))->ob_item[pos]);
21413 Py_INCREF(next_item)( ((PyObject*)(next_item))->ob_refcnt++);
21414 } else
21415#endif
21416 {
21417 next_item = PyIter_Next(iter_obj);
21418 if (unlikely(!next_item)__builtin_expect(!!(!next_item), 0)) {
21419 return __Pyx_IterFinish();
21420 }
21421 }
21422 if (pitem) {
21423 *pitem = next_item;
21424 } else if (pkey && pvalue) {
21425 if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
21426 return -1;
21427 } else if (pkey) {
21428 *pkey = next_item;
21429 } else {
21430 *pvalue = next_item;
21431 }
21432 return 1;
21433}
21434
21435static CYTHON_INLINE__inline__ void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
21436 PyObject *tmp_type, *tmp_value, *tmp_tb;
21437#if CYTHON_COMPILING_IN_CPYTHON1
21438 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
21439 tmp_type = tstate->exc_type;
21440 tmp_value = tstate->exc_value;
21441 tmp_tb = tstate->exc_traceback;
21442 tstate->exc_type = *type;
21443 tstate->exc_value = *value;
21444 tstate->exc_traceback = *tb;
21445#else
21446 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
21447 PyErr_SetExcInfo(*type, *value, *tb);
21448#endif
21449 *type = tmp_type;
21450 *value = tmp_value;
21451 *tb = tmp_tb;
21452}
21453
21454static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21455 PyObject *empty_list = 0;
21456 PyObject *module = 0;
21457 PyObject *global_dict = 0;
21458 PyObject *empty_dict = 0;
21459 PyObject *list;
21460 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03030000
21461 PyObject *py_import;
21462 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21463 if (!py_import)
21464 goto bad;
21465 #endif
21466 if (from_list)
21467 list = from_list;
21468 else {
21469 empty_list = PyList_New(0);
21470 if (!empty_list)
21471 goto bad;
21472 list = empty_list;
21473 }
21474 global_dict = PyModule_GetDict(__pyx_m);
21475 if (!global_dict)
21476 goto bad;
21477 empty_dict = PyDict_New();
21478 if (!empty_dict)
21479 goto bad;
21480 {
21481 #if PY_MAJOR_VERSION2 >= 3
21482 if (level == -1) {
21483 if (strchr(__Pyx_MODULE_NAME, '.')(__extension__ (__builtin_constant_p ('.') && !__builtin_constant_p
("cephfs") && ('.') == '\0' ? (char *) __rawmemchr (
"cephfs", '.') : __builtin_strchr ("cephfs", '.')))
) {
21484 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03030000
21485 PyObject *py_level = PyInt_FromLong(1);
21486 if (!py_level)
21487 goto bad;
21488 module = PyObject_CallFunctionObjArgs(py_import,
21489 name, global_dict, empty_dict, list, py_level, NULL((void*)0));
21490 Py_DECREF(py_level)do { if ( --((PyObject*)(py_level))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_level)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_level)))); } while (
0)
;
21491 #else
21492 module = PyImport_ImportModuleLevelObject(
21493 name, global_dict, empty_dict, list, 1);
21494 #endif
21495 if (!module) {
21496 if (!PyErr_ExceptionMatches(PyExc_ImportError))
21497 goto bad;
21498 PyErr_Clear();
21499 }
21500 }
21501 level = 0;
21502 }
21503 #endif
21504 if (!module) {
21505 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03030000
21506 PyObject *py_level = PyInt_FromLong(level);
21507 if (!py_level)
21508 goto bad;
21509 module = PyObject_CallFunctionObjArgs(py_import,
21510 name, global_dict, empty_dict, list, py_level, NULL((void*)0));
21511 Py_DECREF(py_level)do { if ( --((PyObject*)(py_level))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_level)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_level)))); } while (
0)
;
21512 #else
21513 module = PyImport_ImportModuleLevelObject(
21514 name, global_dict, empty_dict, list, level);
21515 #endif
21516 }
21517 }
21518bad:
21519 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03030000
21520 Py_XDECREF(py_import)do { if ((py_import) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_import))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(py_import)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(py_import)))); } while (0); } while (0)
;
21521 #endif
21522 Py_XDECREF(empty_list)do { if ((empty_list) == ((void*)0)) ; else do { if ( --((PyObject
*)(empty_list))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(empty_list)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(empty_list)))); } while (0); } while (0)
;
21523 Py_XDECREF(empty_dict)do { if ((empty_dict) == ((void*)0)) ; else do { if ( --((PyObject
*)(empty_dict))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(empty_dict)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(empty_dict)))); } while (0); } while (0)
;
21524 return module;
21525}
21526
21527static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
21528 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
21529 if (unlikely(!value)__builtin_expect(!!(!value), 0) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
21530 PyErr_Format(PyExc_ImportError,
21531 #if PY_MAJOR_VERSION2 < 3
21532 "cannot import name %.230s", PyString_AS_STRING(name)(((PyStringObject *)(name))->ob_sval));
21533 #else
21534 "cannot import name %S", name);
21535 #endif
21536 }
21537 return value;
21538}
21539
21540static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
21541 Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases)(((PyVarObject*)(bases))->ob_size);
21542 for (i=0; i < nbases; i++) {
21543 PyTypeObject *tmptype;
21544 PyObject *tmp = PyTuple_GET_ITEM(bases, i)(((PyTupleObject *)(bases))->ob_item[i]);
21545 tmptype = Py_TYPE(tmp)(((PyObject*)(tmp))->ob_type);
21546#if PY_MAJOR_VERSION2 < 3
21547 if (tmptype == &PyClass_Type)
21548 continue;
21549#endif
21550 if (!metaclass) {
21551 metaclass = tmptype;
21552 continue;
21553 }
21554 if (PyType_IsSubtype(metaclass, tmptype))
21555 continue;
21556 if (PyType_IsSubtype(tmptype, metaclass)) {
21557 metaclass = tmptype;
21558 continue;
21559 }
21560 PyErr_SetString(PyExc_TypeError,
21561 "metaclass conflict: "
21562 "the metaclass of a derived class "
21563 "must be a (non-strict) subclass "
21564 "of the metaclasses of all its bases");
21565 return NULL((void*)0);
21566 }
21567 if (!metaclass) {
21568#if PY_MAJOR_VERSION2 < 3
21569 metaclass = &PyClass_Type;
21570#else
21571 metaclass = &PyType_Type;
21572#endif
21573 }
21574 Py_INCREF((PyObject*) metaclass)( ((PyObject*)((PyObject*) metaclass))->ob_refcnt++);
21575 return (PyObject*) metaclass;
21576}
21577
21578static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
21579 PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
21580 PyObject *ns;
21581 if (metaclass) {
21582 PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
21583 if (prep) {
21584 PyObject *pargs = PyTuple_Pack(2, name, bases);
21585 if (unlikely(!pargs)__builtin_expect(!!(!pargs), 0)) {
21586 Py_DECREF(prep)do { if ( --((PyObject*)(prep))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(prep)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(prep)))); } while (0)
;
21587 return NULL((void*)0);
21588 }
21589 ns = PyObject_Call(prep, pargs, mkw);
21590 Py_DECREF(prep)do { if ( --((PyObject*)(prep))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(prep)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(prep)))); } while (0)
;
21591 Py_DECREF(pargs)do { if ( --((PyObject*)(pargs))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(pargs)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(pargs)))); } while (0)
;
21592 } else {
21593 if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))__builtin_expect(!!(!PyErr_ExceptionMatches(PyExc_AttributeError
)), 0)
)
21594 return NULL((void*)0);
21595 PyErr_Clear();
21596 ns = PyDict_New();
21597 }
21598 } else {
21599 ns = PyDict_New();
21600 }
21601 if (unlikely(!ns)__builtin_expect(!!(!ns), 0))
21602 return NULL((void*)0);
21603 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)__builtin_expect(!!(PyObject_SetItem(ns, __pyx_n_s_module, modname
) < 0), 0)
) goto bad;
21604 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)__builtin_expect(!!(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname
) < 0), 0)
) goto bad;
21605 if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)__builtin_expect(!!(doc && PyObject_SetItem(ns, __pyx_n_s_doc
, doc) < 0), 0)
) goto bad;
21606 return ns;
21607bad:
21608 Py_DECREF(ns)do { if ( --((PyObject*)(ns))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(ns)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(ns)))); } while (0)
;
21609 return NULL((void*)0);
21610}
21611static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
21612 PyObject *dict, PyObject *mkw,
21613 int calculate_metaclass, int allow_py2_metaclass) {
21614 PyObject *result, *margs;
21615 PyObject *owned_metaclass = NULL((void*)0);
21616 if (allow_py2_metaclass) {
21617 owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
21618 if (owned_metaclass) {
21619 metaclass = owned_metaclass;
21620 } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))__builtin_expect(!!(PyErr_ExceptionMatches(PyExc_KeyError)), 1
)
) {
21621 PyErr_Clear();
21622 } else {
21623 return NULL((void*)0);
21624 }
21625 }
21626 if (calculate_metaclass && (!metaclass || PyType_Check(metaclass)((((((PyObject*)(metaclass))->ob_type))->tp_flags &
((1L<<31))) != 0)
)) {
21627 metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
21628 Py_XDECREF(owned_metaclass)do { if ((owned_metaclass) == ((void*)0)) ; else do { if ( --
((PyObject*)(owned_metaclass))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(owned_metaclass)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(owned_metaclass)))); } while
(0); } while (0)
;
21629 if (unlikely(!metaclass)__builtin_expect(!!(!metaclass), 0))
21630 return NULL((void*)0);
21631 owned_metaclass = metaclass;
21632 }
21633 margs = PyTuple_Pack(3, name, bases, dict);
21634 if (unlikely(!margs)__builtin_expect(!!(!margs), 0)) {
21635 result = NULL((void*)0);
21636 } else {
21637 result = PyObject_Call(metaclass, margs, mkw);
21638 Py_DECREF(margs)do { if ( --((PyObject*)(margs))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(margs)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(margs)))); } while (0)
;
21639 }
21640 Py_XDECREF(owned_metaclass)do { if ((owned_metaclass) == ((void*)0)) ; else do { if ( --
((PyObject*)(owned_metaclass))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(owned_metaclass)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(owned_metaclass)))); } while
(0); } while (0)
;
21641 return result;
21642}
21643
21644static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
21645 PyObject* fake_module;
21646 PyTypeObject* cached_type = NULL((void*)0);
21647 fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI"0_23_4");
21648 if (!fake_module) return NULL((void*)0);
21649 Py_INCREF(fake_module)( ((PyObject*)(fake_module))->ob_refcnt++);
21650 cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
21651 if (cached_type) {
21652 if (!PyType_Check((PyObject*)cached_type)((((((PyObject*)((PyObject*)cached_type))->ob_type))->tp_flags
& ((1L<<31))) != 0)
) {
21653 PyErr_Format(PyExc_TypeError,
21654 "Shared Cython type %.200s is not a type object",
21655 type->tp_name);
21656 goto bad;
21657 }
21658 if (cached_type->tp_basicsize != type->tp_basicsize) {
21659 PyErr_Format(PyExc_TypeError,
21660 "Shared Cython type %.200s has the wrong size, try recompiling",
21661 type->tp_name);
21662 goto bad;
21663 }
21664 } else {
21665 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
21666 PyErr_Clear();
21667 if (PyType_Ready(type) < 0) goto bad;
21668 if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
21669 goto bad;
21670 Py_INCREF(type)( ((PyObject*)(type))->ob_refcnt++);
21671 cached_type = type;
21672 }
21673done:
21674 Py_DECREF(fake_module)do { if ( --((PyObject*)(fake_module))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(fake_module)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(fake_module)))); } while
(0)
;
21675 return cached_type;
21676bad:
21677 Py_XDECREF(cached_type)do { if ((cached_type) == ((void*)0)) ; else do { if ( --((PyObject
*)(cached_type))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(cached_type)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(cached_type)))); } while (0); } while (0)
;
21678 cached_type = NULL((void*)0);
21679 goto done;
21680}
21681
21682static PyObject *
21683__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED__attribute__ ((__unused__)) void *closure)
21684{
21685 if (unlikely(op->func_doc == NULL)__builtin_expect(!!(op->func_doc == ((void*)0)), 0)) {
21686 if (op->func.m_ml->ml_doc) {
21687#if PY_MAJOR_VERSION2 >= 3
21688 op->func_doc = PyUnicode_FromStringPyUnicodeUCS4_FromString(op->func.m_ml->ml_doc);
21689#else
21690 op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
21691#endif
21692 if (unlikely(op->func_doc == NULL)__builtin_expect(!!(op->func_doc == ((void*)0)), 0))
21693 return NULL((void*)0);
21694 } else {
21695 Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
21696 return Py_None(&_Py_NoneStruct);
21697 }
21698 }
21699 Py_INCREF(op->func_doc)( ((PyObject*)(op->func_doc))->ob_refcnt++);
21700 return op->func_doc;
21701}
21702static int
21703__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
21704{
21705 PyObject *tmp = op->func_doc;
21706 if (value == NULL((void*)0)) {
21707 value = Py_None(&_Py_NoneStruct);
21708 }
21709 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
21710 op->func_doc = value;
21711 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
21712 return 0;
21713}
21714static PyObject *
21715__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
21716{
21717 if (unlikely(op->func_name == NULL)__builtin_expect(!!(op->func_name == ((void*)0)), 0)) {
21718#if PY_MAJOR_VERSION2 >= 3
21719 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
21720#else
21721 op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
21722#endif
21723 if (unlikely(op->func_name == NULL)__builtin_expect(!!(op->func_name == ((void*)0)), 0))
21724 return NULL((void*)0);
21725 }
21726 Py_INCREF(op->func_name)( ((PyObject*)(op->func_name))->ob_refcnt++);
21727 return op->func_name;
21728}
21729static int
21730__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
21731{
21732 PyObject *tmp;
21733#if PY_MAJOR_VERSION2 >= 3
21734 if (unlikely(value == NULL || !PyUnicode_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<28))) !=
0)), 0)
) {
21735#else
21736 if (unlikely(value == NULL || !PyString_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<27))) !=
0)), 0)
) {
21737#endif
21738 PyErr_SetString(PyExc_TypeError,
21739 "__name__ must be set to a string object");
21740 return -1;
21741 }
21742 tmp = op->func_name;
21743 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
21744 op->func_name = value;
21745 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
21746 return 0;
21747}
21748static PyObject *
21749__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
21750{
21751 Py_INCREF(op->func_qualname)( ((PyObject*)(op->func_qualname))->ob_refcnt++);
21752 return op->func_qualname;
21753}
21754static int
21755__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
21756{
21757 PyObject *tmp;
21758#if PY_MAJOR_VERSION2 >= 3
21759 if (unlikely(value == NULL || !PyUnicode_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<28))) !=
0)), 0)
) {
21760#else
21761 if (unlikely(value == NULL || !PyString_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<27))) !=
0)), 0)
) {
21762#endif
21763 PyErr_SetString(PyExc_TypeError,
21764 "__qualname__ must be set to a string object");
21765 return -1;
21766 }
21767 tmp = op->func_qualname;
21768 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
21769 op->func_qualname = value;
21770 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
21771 return 0;
21772}
21773static PyObject *
21774__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED__attribute__ ((__unused__)) void *closure)
21775{
21776 PyObject *self;
21777 self = m->func_closure;
21778 if (self == NULL((void*)0))
21779 self = Py_None(&_Py_NoneStruct);
21780 Py_INCREF(self)( ((PyObject*)(self))->ob_refcnt++);
21781 return self;
21782}
21783static PyObject *
21784__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
21785{
21786 if (unlikely(op->func_dict == NULL)__builtin_expect(!!(op->func_dict == ((void*)0)), 0)) {
21787 op->func_dict = PyDict_New();
21788 if (unlikely(op->func_dict == NULL)__builtin_expect(!!(op->func_dict == ((void*)0)), 0))
21789 return NULL((void*)0);
21790 }
21791 Py_INCREF(op->func_dict)( ((PyObject*)(op->func_dict))->ob_refcnt++);
21792 return op->func_dict;
21793}
21794static int
21795__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
21796{
21797 PyObject *tmp;
21798 if (unlikely(value == NULL)__builtin_expect(!!(value == ((void*)0)), 0)) {
21799 PyErr_SetString(PyExc_TypeError,
21800 "function's dictionary may not be deleted");
21801 return -1;
21802 }
21803 if (unlikely(!PyDict_Check(value))__builtin_expect(!!(!((((((PyObject*)(value))->ob_type))->
tp_flags & ((1L<<29))) != 0)), 0)
) {
21804 PyErr_SetString(PyExc_TypeError,
21805 "setting function's dictionary to a non-dict");
21806 return -1;
21807 }
21808 tmp = op->func_dict;
21809 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
21810 op->func_dict = value;
21811 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
21812 return 0;
21813}
21814static PyObject *
21815__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
21816{
21817 Py_INCREF(op->func_globals)( ((PyObject*)(op->func_globals))->ob_refcnt++);
21818 return op->func_globals;
21819}
21820static PyObject *
21821__Pyx_CyFunction_get_closure(CYTHON_UNUSED__attribute__ ((__unused__)) __pyx_CyFunctionObject *op)
21822{
21823 Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
21824 return Py_None(&_Py_NoneStruct);
21825}
21826static PyObject *
21827__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
21828{
21829 PyObject* result = (op->func_code) ? op->func_code : Py_None(&_Py_NoneStruct);
21830 Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++);
21831 return result;
21832}
21833static int
21834__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
21835 int result = 0;
21836 PyObject *res = op->defaults_getter((PyObject *) op);
21837 if (unlikely(!res)__builtin_expect(!!(!res), 0))
21838 return -1;
21839 #if CYTHON_COMPILING_IN_CPYTHON1
21840 op->defaults_tuple = PyTuple_GET_ITEM(res, 0)(((PyTupleObject *)(res))->ob_item[0]);
21841 Py_INCREF(op->defaults_tuple)( ((PyObject*)(op->defaults_tuple))->ob_refcnt++);
21842 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1)(((PyTupleObject *)(res))->ob_item[1]);
21843 Py_INCREF(op->defaults_kwdict)( ((PyObject*)(op->defaults_kwdict))->ob_refcnt++);
21844 #else
21845 op->defaults_tuple = PySequence_ITEM(res, 0)( (((PyObject*)(res))->ob_type)->tp_as_sequence->sq_item
(res, 0) )
;
21846 if (unlikely(!op->defaults_tuple)__builtin_expect(!!(!op->defaults_tuple), 0)) result = -1;
21847 else {
21848 op->defaults_kwdict = PySequence_ITEM(res, 1)( (((PyObject*)(res))->ob_type)->tp_as_sequence->sq_item
(res, 1) )
;
21849 if (unlikely(!op->defaults_kwdict)__builtin_expect(!!(!op->defaults_kwdict), 0)) result = -1;
21850 }
21851 #endif
21852 Py_DECREF(res)do { if ( --((PyObject*)(res))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(res)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(res)))); } while (0)
;
21853 return result;
21854}
21855static int
21856__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
21857 PyObject* tmp;
21858 if (!value) {
21859 value = Py_None(&_Py_NoneStruct);
21860 } else if (value != Py_None(&_Py_NoneStruct) && !PyTuple_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L
<<26))) != 0)
) {
21861 PyErr_SetString(PyExc_TypeError,
21862 "__defaults__ must be set to a tuple object");
21863 return -1;
21864 }
21865 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
21866 tmp = op->defaults_tuple;
21867 op->defaults_tuple = value;
21868 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
21869 return 0;
21870}
21871static PyObject *
21872__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
21873 PyObject* result = op->defaults_tuple;
21874 if (unlikely(!result)__builtin_expect(!!(!result), 0)) {
21875 if (op->defaults_getter) {
21876 if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL((void*)0);
21877 result = op->defaults_tuple;
21878 } else {
21879 result = Py_None(&_Py_NoneStruct);
21880 }
21881 }
21882 Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++);
21883 return result;
21884}
21885static int
21886__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
21887 PyObject* tmp;
21888 if (!value) {
21889 value = Py_None(&_Py_NoneStruct);
21890 } else if (value != Py_None(&_Py_NoneStruct) && !PyDict_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L
<<29))) != 0)
) {
21891 PyErr_SetString(PyExc_TypeError,
21892 "__kwdefaults__ must be set to a dict object");
21893 return -1;
21894 }
21895 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
21896 tmp = op->defaults_kwdict;
21897 op->defaults_kwdict = value;
21898 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
21899 return 0;
21900}
21901static PyObject *
21902__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
21903 PyObject* result = op->defaults_kwdict;
21904 if (unlikely(!result)__builtin_expect(!!(!result), 0)) {
21905 if (op->defaults_getter) {
21906 if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL((void*)0);
21907 result = op->defaults_kwdict;
21908 } else {
21909 result = Py_None(&_Py_NoneStruct);
21910 }
21911 }
21912 Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++);
21913 return result;
21914}
21915static int
21916__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
21917 PyObject* tmp;
21918 if (!value || value == Py_None(&_Py_NoneStruct)) {
21919 value = NULL((void*)0);
21920 } else if (!PyDict_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L
<<29))) != 0)
) {
21921 PyErr_SetString(PyExc_TypeError,
21922 "__annotations__ must be set to a dict object");
21923 return -1;
21924 }
21925 Py_XINCREF(value)do { if ((value) == ((void*)0)) ; else ( ((PyObject*)(value))
->ob_refcnt++); } while (0)
;
21926 tmp = op->func_annotations;
21927 op->func_annotations = value;
21928 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
21929 return 0;
21930}
21931static PyObject *
21932__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
21933 PyObject* result = op->func_annotations;
21934 if (unlikely(!result)__builtin_expect(!!(!result), 0)) {
21935 result = PyDict_New();
21936 if (unlikely(!result)__builtin_expect(!!(!result), 0)) return NULL((void*)0);
21937 op->func_annotations = result;
21938 }
21939 Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++);
21940 return result;
21941}
21942static PyGetSetDef __pyx_CyFunction_getsets[] = {
21943 {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
21944 {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
21945 {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
21946 {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
21947 {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
21948 {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
21949 {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
21950 {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
21951 {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
21952 {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
21953 {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
21954 {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
21955 {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
21956 {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
21957 {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
21958 {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
21959 {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
21960 {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
21961 {0, 0, 0, 0, 0}
21962};
21963static PyMemberDef __pyx_CyFunction_members[] = {
21964 {(char *) "__module__", T_OBJECT6, offsetof(__pyx_CyFunctionObject, func.m_module)__builtin_offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED4, 0},
21965 {0, 0, 0, 0, 0}
21966};
21967static PyObject *
21968__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *args)
21969{
21970#if PY_MAJOR_VERSION2 >= 3
21971 return PyUnicode_FromStringPyUnicodeUCS4_FromString(m->func.m_ml->ml_name);
21972#else
21973 return PyString_FromString(m->func.m_ml->ml_name);
21974#endif
21975}
21976static PyMethodDef __pyx_CyFunction_methods[] = {
21977 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS0x0001, 0},
21978 {0, 0, 0, 0}
21979};
21980#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030500A0
21981#define __Pyx_CyFunction_weakreflist(cyfunc)((cyfunc)->func_weakreflist) ((cyfunc)->func_weakreflist)
21982#else
21983#define __Pyx_CyFunction_weakreflist(cyfunc)((cyfunc)->func_weakreflist) ((cyfunc)->func.m_weakreflist)
21984#endif
21985static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
21986 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
21987 __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type)( (__pyx_CyFunctionObject *) _PyObject_GC_New(type) );
21988 if (op == NULL((void*)0))
21989 return NULL((void*)0);
21990 op->flags = flags;
21991 __Pyx_CyFunction_weakreflist(op)((op)->func_weakreflist) = NULL((void*)0);
21992 op->func.m_ml = ml;
21993 op->func.m_self = (PyObject *) op;
21994 Py_XINCREF(closure)do { if ((closure) == ((void*)0)) ; else ( ((PyObject*)(closure
))->ob_refcnt++); } while (0)
;
21995 op->func_closure = closure;
21996 Py_XINCREF(module)do { if ((module) == ((void*)0)) ; else ( ((PyObject*)(module
))->ob_refcnt++); } while (0)
;
21997 op->func.m_module = module;
21998 op->func_dict = NULL((void*)0);
21999 op->func_name = NULL((void*)0);
22000 Py_INCREF(qualname)( ((PyObject*)(qualname))->ob_refcnt++);
22001 op->func_qualname = qualname;
22002 op->func_doc = NULL((void*)0);
22003 op->func_classobj = NULL((void*)0);
22004 op->func_globals = globals;
22005 Py_INCREF(op->func_globals)( ((PyObject*)(op->func_globals))->ob_refcnt++);
22006 Py_XINCREF(code)do { if ((code) == ((void*)0)) ; else ( ((PyObject*)(code))->
ob_refcnt++); } while (0)
;
22007 op->func_code = code;
22008 op->defaults_pyobjects = 0;
22009 op->defaults = NULL((void*)0);
22010 op->defaults_tuple = NULL((void*)0);
22011 op->defaults_kwdict = NULL((void*)0);
22012 op->defaults_getter = NULL((void*)0);
22013 op->func_annotations = NULL((void*)0);
22014 PyObject_GC_Track(op);
22015 return (PyObject *) op;
22016}
22017static int
22018__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
22019{
22020 Py_CLEAR(m->func_closure)do { if (m->func_closure) { PyObject *_py_tmp = (PyObject *
)(m->func_closure); (m->func_closure) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
22021 Py_CLEAR(m->func.m_module)do { if (m->func.m_module) { PyObject *_py_tmp = (PyObject
*)(m->func.m_module); (m->func.m_module) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
22022 Py_CLEAR(m->func_dict)do { if (m->func_dict) { PyObject *_py_tmp = (PyObject *)(
m->func_dict); (m->func_dict) = ((void*)0); do { if ( --
((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
22023 Py_CLEAR(m->func_name)do { if (m->func_name) { PyObject *_py_tmp = (PyObject *)(
m->func_name); (m->func_name) = ((void*)0); do { if ( --
((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
22024 Py_CLEAR(m->func_qualname)do { if (m->func_qualname) { PyObject *_py_tmp = (PyObject
*)(m->func_qualname); (m->func_qualname) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
22025 Py_CLEAR(m->func_doc)do { if (m->func_doc) { PyObject *_py_tmp = (PyObject *)(m
->func_doc); (m->func_doc) = ((void*)0); do { if ( --((
PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
22026 Py_CLEAR(m->func_globals)do { if (m->func_globals) { PyObject *_py_tmp = (PyObject *
)(m->func_globals); (m->func_globals) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
22027 Py_CLEAR(m->func_code)do { if (m->func_code) { PyObject *_py_tmp = (PyObject *)(
m->func_code); (m->func_code) = ((void*)0); do { if ( --
((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
22028 Py_CLEAR(m->func_classobj)do { if (m->func_classobj) { PyObject *_py_tmp = (PyObject
*)(m->func_classobj); (m->func_classobj) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
22029 Py_CLEAR(m->defaults_tuple)do { if (m->defaults_tuple) { PyObject *_py_tmp = (PyObject
*)(m->defaults_tuple); (m->defaults_tuple) = ((void*)0
); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
22030 Py_CLEAR(m->defaults_kwdict)do { if (m->defaults_kwdict) { PyObject *_py_tmp = (PyObject
*)(m->defaults_kwdict); (m->defaults_kwdict) = ((void*
)0); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(_py_tmp)))); } while (0
); } } while (0)
;
22031 Py_CLEAR(m->func_annotations)do { if (m->func_annotations) { PyObject *_py_tmp = (PyObject
*)(m->func_annotations); (m->func_annotations) = ((void
*)0); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(_py_tmp)))); } while (0
); } } while (0)
;
22032 if (m->defaults) {
22033 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m)((PyObject * *)(((__pyx_CyFunctionObject *) (m))->defaults
))
;
22034 int i;
22035 for (i = 0; i < m->defaults_pyobjects; i++)
22036 Py_XDECREF(pydefaults[i])do { if ((pydefaults[i]) == ((void*)0)) ; else do { if ( --((
PyObject*)(pydefaults[i]))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(pydefaults[i])))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(pydefaults[i])))); } while (0); }
while (0)
;
22037 PyMem_Free(m->defaults);
22038 m->defaults = NULL((void*)0);
22039 }
22040 return 0;
22041}
22042static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
22043{
22044 PyObject_GC_UnTrack(m);
22045 if (__Pyx_CyFunction_weakreflist(m)((m)->func_weakreflist) != NULL((void*)0))
22046 PyObject_ClearWeakRefs((PyObject *) m);
22047 __Pyx_CyFunction_clear(m);
22048 PyObject_GC_Del(m);
22049}
22050static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
22051{
22052 Py_VISIT(m->func_closure)do { if (m->func_closure) { int vret = visit((PyObject *)(
m->func_closure), arg); if (vret) return vret; } } while (
0)
;
22053 Py_VISIT(m->func.m_module)do { if (m->func.m_module) { int vret = visit((PyObject *)
(m->func.m_module), arg); if (vret) return vret; } } while
(0)
;
22054 Py_VISIT(m->func_dict)do { if (m->func_dict) { int vret = visit((PyObject *)(m->
func_dict), arg); if (vret) return vret; } } while (0)
;
22055 Py_VISIT(m->func_name)do { if (m->func_name) { int vret = visit((PyObject *)(m->
func_name), arg); if (vret) return vret; } } while (0)
;
22056 Py_VISIT(m->func_qualname)do { if (m->func_qualname) { int vret = visit((PyObject *)
(m->func_qualname), arg); if (vret) return vret; } } while
(0)
;
22057 Py_VISIT(m->func_doc)do { if (m->func_doc) { int vret = visit((PyObject *)(m->
func_doc), arg); if (vret) return vret; } } while (0)
;
22058 Py_VISIT(m->func_globals)do { if (m->func_globals) { int vret = visit((PyObject *)(
m->func_globals), arg); if (vret) return vret; } } while (
0)
;
22059 Py_VISIT(m->func_code)do { if (m->func_code) { int vret = visit((PyObject *)(m->
func_code), arg); if (vret) return vret; } } while (0)
;
22060 Py_VISIT(m->func_classobj)do { if (m->func_classobj) { int vret = visit((PyObject *)
(m->func_classobj), arg); if (vret) return vret; } } while
(0)
;
22061 Py_VISIT(m->defaults_tuple)do { if (m->defaults_tuple) { int vret = visit((PyObject *
)(m->defaults_tuple), arg); if (vret) return vret; } } while
(0)
;
22062 Py_VISIT(m->defaults_kwdict)do { if (m->defaults_kwdict) { int vret = visit((PyObject *
)(m->defaults_kwdict), arg); if (vret) return vret; } } while
(0)
;
22063 if (m->defaults) {
22064 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m)((PyObject * *)(((__pyx_CyFunctionObject *) (m))->defaults
))
;
22065 int i;
22066 for (i = 0; i < m->defaults_pyobjects; i++)
22067 Py_VISIT(pydefaults[i])do { if (pydefaults[i]) { int vret = visit((PyObject *)(pydefaults
[i]), arg); if (vret) return vret; } } while (0)
;
22068 }
22069 return 0;
22070}
22071static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
22072{
22073 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
22074 if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD0x01) {
22075 Py_INCREF(func)( ((PyObject*)(func))->ob_refcnt++);
22076 return func;
22077 }
22078 if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD0x02) {
22079 if (type == NULL((void*)0))
22080 type = (PyObject *)(Py_TYPE(obj)(((PyObject*)(obj))->ob_type));
22081 return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)))PyMethod_New(func, type, (PyObject *)((((PyObject*)(type))->
ob_type)))
;
22082 }
22083 if (obj == Py_None(&_Py_NoneStruct))
22084 obj = NULL((void*)0);
22085 return __Pyx_PyMethod_New(func, obj, type)PyMethod_New(func, obj, type);
22086}
22087static PyObject*
22088__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
22089{
22090#if PY_MAJOR_VERSION2 >= 3
22091 return PyUnicode_FromFormatPyUnicodeUCS4_FromFormat("<cyfunction %U at %p>",
22092 op->func_qualname, (void *)op);
22093#else
22094 return PyString_FromFormat("<cyfunction %s at %p>",
22095 PyString_AsString(op->func_qualname), (void *)op);
22096#endif
22097}
22098#if CYTHON_COMPILING_IN_PYPY0
22099static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
22100 PyCFunctionObject* f = (PyCFunctionObject*)func;
22101 PyCFunction meth = f->m_ml->ml_meth;
22102 PyObject *self = f->m_self;
22103 Py_ssize_t size;
22104 switch (f->m_ml->ml_flags & (METH_VARARGS0x0001 | METH_KEYWORDS0x0002 | METH_NOARGS0x0004 | METH_O0x0008)) {
22105 case METH_VARARGS0x0001:
22106 if (likely(kw == NULL || PyDict_Size(kw) == 0)__builtin_expect(!!(kw == ((void*)0) || PyDict_Size(kw) == 0)
, 1)
)
22107 return (*meth)(self, arg);
22108 break;
22109 case METH_VARARGS0x0001 | METH_KEYWORDS0x0002:
22110 return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
22111 case METH_NOARGS0x0004:
22112 if (likely(kw == NULL || PyDict_Size(kw) == 0)__builtin_expect(!!(kw == ((void*)0) || PyDict_Size(kw) == 0)
, 1)
) {
22113 size = PyTuple_GET_SIZE(arg)(((PyVarObject*)(arg))->ob_size);
22114 if (likely(size == 0)__builtin_expect(!!(size == 0), 1))
22115 return (*meth)(self, NULL((void*)0));
22116 PyErr_Format(PyExc_TypeError,
22117 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T"z" "d given)",
22118 f->m_ml->ml_name, size);
22119 return NULL((void*)0);
22120 }
22121 break;
22122 case METH_O0x0008:
22123 if (likely(kw == NULL || PyDict_Size(kw) == 0)__builtin_expect(!!(kw == ((void*)0) || PyDict_Size(kw) == 0)
, 1)
) {
22124 size = PyTuple_GET_SIZE(arg)(((PyVarObject*)(arg))->ob_size);
22125 if (likely(size == 1)__builtin_expect(!!(size == 1), 1)) {
22126 PyObject *result, *arg0 = PySequence_ITEM(arg, 0)( (((PyObject*)(arg))->ob_type)->tp_as_sequence->sq_item
(arg, 0) )
;
22127 if (unlikely(!arg0)__builtin_expect(!!(!arg0), 0)) return NULL((void*)0);
22128 result = (*meth)(self, arg0);
22129 Py_DECREF(arg0)do { if ( --((PyObject*)(arg0))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(arg0)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(arg0)))); } while (0)
;
22130 return result;
22131 }
22132 PyErr_Format(PyExc_TypeError,
22133 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T"z" "d given)",
22134 f->m_ml->ml_name, size);
22135 return NULL((void*)0);
22136 }
22137 break;
22138 default:
22139 PyErr_SetString(PyExc_SystemError, "Bad call flags in "
22140 "__Pyx_CyFunction_Call. METH_OLDARGS is no "
22141 "longer supported!");
22142 return NULL((void*)0);
22143 }
22144 PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
22145 f->m_ml->ml_name);
22146 return NULL((void*)0);
22147}
22148#else
22149static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
22150 return PyCFunction_Call(func, arg, kw);
22151}
22152#endif
22153static PyTypeObject __pyx_CyFunctionType_type = {
22154 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
22155 "cython_function_or_method",
22156 sizeof(__pyx_CyFunctionObject),
22157 0,
22158 (destructor) __Pyx_CyFunction_dealloc,
22159 0,
22160 0,
22161 0,
22162#if PY_MAJOR_VERSION2 < 3
22163 0,
22164#else
22165 0,
22166#endif
22167 (reprfunc) __Pyx_CyFunction_repr,
22168 0,
22169 0,
22170 0,
22171 0,
22172 __Pyx_CyFunction_Call,
22173 0,
22174 0,
22175 0,
22176 0,
22177 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
| Py_TPFLAGS_HAVE_GC(1L<<14),
22178 0,
22179 (traverseproc) __Pyx_CyFunction_traverse,
22180 (inquiry) __Pyx_CyFunction_clear,
22181 0,
22182#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030500A0
22183 offsetof(__pyx_CyFunctionObject, func_weakreflist)__builtin_offsetof(__pyx_CyFunctionObject, func_weakreflist),
22184#else
22185 offsetof(PyCFunctionObject, m_weakreflist)__builtin_offsetof(PyCFunctionObject, m_weakreflist),
22186#endif
22187 0,
22188 0,
22189 __pyx_CyFunction_methods,
22190 __pyx_CyFunction_members,
22191 __pyx_CyFunction_getsets,
22192 0,
22193 0,
22194 __Pyx_CyFunction_descr_get,
22195 0,
22196 offsetof(__pyx_CyFunctionObject, func_dict)__builtin_offsetof(__pyx_CyFunctionObject, func_dict),
22197 0,
22198 0,
22199 0,
22200 0,
22201 0,
22202 0,
22203 0,
22204 0,
22205 0,
22206 0,
22207 0,
22208 0,
22209#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
22210 0,
22211#endif
22212};
22213static int __pyx_CyFunction_init(void) {
22214#if !CYTHON_COMPILING_IN_PYPY0
22215 __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
22216#endif
22217 __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
22218 if (__pyx_CyFunctionType == NULL((void*)0)) {
22219 return -1;
22220 }
22221 return 0;
22222}
22223static CYTHON_INLINE__inline__ void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
22224 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
22225 m->defaults = PyMem_Malloc(size);
22226 if (!m->defaults)
22227 return PyErr_NoMemory();
22228 memset(m->defaults, 0, size);
22229 m->defaults_pyobjects = pyobjects;
22230 return m->defaults;
22231}
22232static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
22233 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
22234 m->defaults_tuple = tuple;
22235 Py_INCREF(tuple)( ((PyObject*)(tuple))->ob_refcnt++);
22236}
22237static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
22238 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
22239 m->defaults_kwdict = dict;
22240 Py_INCREF(dict)( ((PyObject*)(dict))->ob_refcnt++);
22241}
22242static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
22243 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
22244 m->func_annotations = dict;
22245 Py_INCREF(dict)( ((PyObject*)(dict))->ob_refcnt++);
22246}
22247
22248static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
22249 int start = 0, mid = 0, end = count - 1;
22250 if (end >= 0 && code_line > entries[end].code_line) {
22251 return count;
22252 }
22253 while (start < end) {
22254 mid = start + (end - start) / 2;
22255 if (code_line < entries[mid].code_line) {
22256 end = mid;
22257 } else if (code_line > entries[mid].code_line) {
22258 start = mid + 1;
22259 } else {
22260 return mid;
22261 }
22262 }
22263 if (code_line <= entries[mid].code_line) {
22264 return mid;
22265 } else {
22266 return mid + 1;
22267 }
22268}
22269static PyCodeObject *__pyx_find_code_object(int code_line) {
22270 PyCodeObject* code_object;
22271 int pos;
22272 if (unlikely(!code_line)__builtin_expect(!!(!code_line), 0) || unlikely(!__pyx_code_cache.entries)__builtin_expect(!!(!__pyx_code_cache.entries), 0)) {
22273 return NULL((void*)0);
22274 }
22275 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22276 if (unlikely(pos >= __pyx_code_cache.count)__builtin_expect(!!(pos >= __pyx_code_cache.count), 0) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)__builtin_expect(!!(__pyx_code_cache.entries[pos].code_line !=
code_line), 0)
) {
22277 return NULL((void*)0);
22278 }
22279 code_object = __pyx_code_cache.entries[pos].code_object;
22280 Py_INCREF(code_object)( ((PyObject*)(code_object))->ob_refcnt++);
22281 return code_object;
22282}
22283static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
22284 int pos, i;
22285 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
22286 if (unlikely(!code_line)__builtin_expect(!!(!code_line), 0)) {
22287 return;
22288 }
22289 if (unlikely(!entries)__builtin_expect(!!(!entries), 0)) {
22290 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
22291 if (likely(entries)__builtin_expect(!!(entries), 1)) {
22292 __pyx_code_cache.entries = entries;
22293 __pyx_code_cache.max_count = 64;
22294 __pyx_code_cache.count = 1;
22295 entries[0].code_line = code_line;
22296 entries[0].code_object = code_object;
22297 Py_INCREF(code_object)( ((PyObject*)(code_object))->ob_refcnt++);
22298 }
22299 return;
22300 }
22301 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22302 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)__builtin_expect(!!(__pyx_code_cache.entries[pos].code_line ==
code_line), 0)
) {
22303 PyCodeObject* tmp = entries[pos].code_object;
22304 entries[pos].code_object = code_object;
22305 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
22306 return;
22307 }
22308 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
22309 int new_max = __pyx_code_cache.max_count + 64;
22310 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
22311 __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
22312 if (unlikely(!entries)__builtin_expect(!!(!entries), 0)) {
22313 return;
22314 }
22315 __pyx_code_cache.entries = entries;
22316 __pyx_code_cache.max_count = new_max;
22317 }
22318 for (i=__pyx_code_cache.count; i>pos; i--) {
22319 entries[i] = entries[i-1];
22320 }
22321 entries[pos].code_line = code_line;
22322 entries[pos].code_object = code_object;
22323 __pyx_code_cache.count++;
22324 Py_INCREF(code_object)( ((PyObject*)(code_object))->ob_refcnt++);
22325}
22326
22327#include "compile.h"
22328#include "frameobject.h"
22329#include "traceback.h"
22330static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
22331 const char *funcname, int c_line,
22332 int py_line, const char *filename) {
22333 PyCodeObject *py_code = 0;
22334 PyObject *py_srcfile = 0;
22335 PyObject *py_funcname = 0;
22336 #if PY_MAJOR_VERSION2 < 3
22337 py_srcfile = PyString_FromString(filename);
22338 #else
22339 py_srcfile = PyUnicode_FromStringPyUnicodeUCS4_FromString(filename);
22340 #endif
22341 if (!py_srcfile) goto bad;
22342 if (c_line) {
22343 #if PY_MAJOR_VERSION2 < 3
22344 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22345 #else
22346 py_funcname = PyUnicode_FromFormatPyUnicodeUCS4_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22347 #endif
22348 }
22349 else {
22350 #if PY_MAJOR_VERSION2 < 3
22351 py_funcname = PyString_FromString(funcname);
22352 #else
22353 py_funcname = PyUnicode_FromStringPyUnicodeUCS4_FromString(funcname);
22354 #endif
22355 }
22356 if (!py_funcname) goto bad;
22357 py_code = __Pyx_PyCode_New(PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22358 0,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22359 0,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22360 0,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22361 0,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22362 0,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22363 __pyx_empty_bytes, /*PyObject *code,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22364 __pyx_empty_tuple, /*PyObject *consts,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22365 __pyx_empty_tuple, /*PyObject *names,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22366 __pyx_empty_tuple, /*PyObject *varnames,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22367 __pyx_empty_tuple, /*PyObject *freevars,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22368 __pyx_empty_tuple, /*PyObject *cellvars,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22369 py_srcfile, /*PyObject *filename,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22370 py_funcname, /*PyObject *name,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22371 py_line,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22372 __pyx_empty_bytes /*PyObject *lnotab*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
22373 )PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
;
22374 Py_DECREF(py_srcfile)do { if ( --((PyObject*)(py_srcfile))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_srcfile)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_srcfile)))); } while
(0)
;
22375 Py_DECREF(py_funcname)do { if ( --((PyObject*)(py_funcname))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_funcname)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_funcname)))); } while
(0)
;
22376 return py_code;
22377bad:
22378 Py_XDECREF(py_srcfile)do { if ((py_srcfile) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_srcfile))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(py_srcfile)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(py_srcfile)))); } while (0); } while (0)
;
22379 Py_XDECREF(py_funcname)do { if ((py_funcname) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_funcname))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(py_funcname)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(py_funcname)))); } while (0); } while (0)
;
22380 return NULL((void*)0);
22381}
22382static void __Pyx_AddTraceback(const char *funcname, int c_line,
22383 int py_line, const char *filename) {
22384 PyCodeObject *py_code = 0;
22385 PyFrameObject *py_frame = 0;
22386 py_code = __pyx_find_code_object(c_line ? c_line : py_line);
22387 if (!py_code) {
22388 py_code = __Pyx_CreateCodeObjectForTraceback(
22389 funcname, c_line, py_line, filename);
22390 if (!py_code) goto bad;
22391 __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
22392 }
22393 py_frame = PyFrame_New(
22394 PyThreadState_GET()(_PyThreadState_Current), /*PyThreadState *tstate,*/
22395 py_code, /*PyCodeObject *code,*/
22396 __pyx_d, /*PyObject *globals,*/
22397 0 /*PyObject *locals*/
22398 );
22399 if (!py_frame) goto bad;
22400 py_frame->f_lineno = py_line;
22401 PyTraceBack_Here(py_frame);
22402bad:
22403 Py_XDECREF(py_code)do { if ((py_code) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_code))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(py_code)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(py_code)))); } while (0); } while (0)
;
22404 Py_XDECREF(py_frame)do { if ((py_frame) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_frame))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(py_frame)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(py_frame)))); } while (0); } while (0)
;
22405}
22406
22407static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_long(long value) {
22408 const long neg_one = (long) -1, const_zero = (long) 0;
22409 const int is_unsigned = neg_one > const_zero;
22410 if (is_unsigned) {
22411 if (sizeof(long) < sizeof(long)) {
22412 return PyInt_FromLong((long) value);
22413 } else if (sizeof(long) <= sizeof(unsigned long)) {
22414 return PyLong_FromUnsignedLong((unsigned long) value);
22415 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONGlong long)) {
22416 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
22417 }
22418 } else {
22419 if (sizeof(long) <= sizeof(long)) {
22420 return PyInt_FromLong((long) value);
22421 } else if (sizeof(long) <= sizeof(PY_LONG_LONGlong long)) {
22422 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
22423 }
22424 }
22425 {
22426 int one = 1; int little = (int)*(unsigned char *)&one;
22427 unsigned char *bytes = (unsigned char *)&value;
22428 return _PyLong_FromByteArray(bytes, sizeof(long),
22429 little, !is_unsigned);
22430 }
22431}
22432
22433static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_int(int value) {
22434 const int neg_one = (int) -1, const_zero = (int) 0;
22435 const int is_unsigned = neg_one > const_zero;
22436 if (is_unsigned) {
22437 if (sizeof(int) < sizeof(long)) {
22438 return PyInt_FromLong((long) value);
22439 } else if (sizeof(int) <= sizeof(unsigned long)) {
22440 return PyLong_FromUnsignedLong((unsigned long) value);
22441 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONGlong long)) {
22442 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
22443 }
22444 } else {
22445 if (sizeof(int) <= sizeof(long)) {
22446 return PyInt_FromLong((long) value);
22447 } else if (sizeof(int) <= sizeof(PY_LONG_LONGlong long)) {
22448 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
22449 }
22450 }
22451 {
22452 int one = 1; int little = (int)*(unsigned char *)&one;
22453 unsigned char *bytes = (unsigned char *)&value;
22454 return _PyLong_FromByteArray(bytes, sizeof(int),
22455 little, !is_unsigned);
22456 }
22457}
22458
22459#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value){ func_type value = func_value; if (sizeof(target_type) < sizeof
(func_type)) { if (__builtin_expect(!!(value != (func_type) (
target_type) value), 0)) { func_type zero = 0; if (0 &&
__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)) return (target_type) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (target_type) value; }
\
22460 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0){ func_type value = func_value; if (sizeof(target_type) < sizeof
(func_type)) { if (__builtin_expect(!!(value != (func_type) (
target_type) value), 0)) { func_type zero = 0; if (0 &&
__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)) return (target_type) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (target_type) value; }
22461#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value){ func_type value = func_value; if (sizeof(target_type) < sizeof
(func_type)) { if (__builtin_expect(!!(value != (func_type) (
target_type) value), 0)) { func_type zero = 0; if (1 &&
__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)) return (target_type) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (target_type) value; }
\
22462 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1){ func_type value = func_value; if (sizeof(target_type) < sizeof
(func_type)) { if (__builtin_expect(!!(value != (func_type) (
target_type) value), 0)) { func_type zero = 0; if (1 &&
__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)) return (target_type) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (target_type) value; }
22463#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc){ func_type value = func_value; if (sizeof(target_type) < sizeof
(func_type)) { if (__builtin_expect(!!(value != (func_type) (
target_type) value), 0)) { func_type zero = 0; if (exc &&
__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)) return (target_type) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (target_type) value; }
\
22464 {\
22465 func_type value = func_value;\
22466 if (sizeof(target_type) < sizeof(func_type)) {\
22467 if (unlikely(value != (func_type) (target_type) value)__builtin_expect(!!(value != (func_type) (target_type) value)
, 0)
) {\
22468 func_type zero = 0;\
22469 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred())__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)
)\
22470 return (target_type) -1;\
22471 if (is_unsigned && unlikely(value < zero)__builtin_expect(!!(value < zero), 0))\
22472 goto raise_neg_overflow;\
22473 else\
22474 goto raise_overflow;\
22475 }\
22476 }\
22477 return (target_type) value;\
22478 }
22479
22480#if CYTHON_USE_PYLONG_INTERNALS1
22481 #include "longintrepr.h"
22482#endif
22483
22484static CYTHON_INLINE__inline__ int __Pyx_PyInt_As_int(PyObject *x) {
22485 const int neg_one = (int) -1, const_zero = (int) 0;
22486 const int is_unsigned = neg_one > const_zero;
22487#if PY_MAJOR_VERSION2 < 3
22488 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
22489 if (sizeof(int) < sizeof(long)) {
22490 __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(int) < sizeof(long)) { if (__builtin_expect(!!(value != (
long) (int) value), 0)) { long zero = 0; if (0 && __builtin_expect
(!!(value == (long)-1 && PyErr_Occurred()), 0)) return
(int) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
22491 } else {
22492 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
22493 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
22494 goto raise_neg_overflow;
22495 }
22496 return (int) val;
22497 }
22498 } else
22499#endif
22500 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
22501 if (is_unsigned) {
22502#if CYTHON_USE_PYLONG_INTERNALS1
22503 const digit* digits = ((PyLongObject*)x)->ob_digit;
22504 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
22505 case 0: return (int) 0;
22506 case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]){ digit value = digits[0]; if (sizeof(int) < sizeof(digit)
) { if (__builtin_expect(!!(value != (digit) (int) value), 0)
) { digit zero = 0; if (0 && __builtin_expect(!!(value
== (digit)-1 && PyErr_Occurred()), 0)) return (int) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int) value; }
22507 case 2:
22508 if (8 * sizeof(int) > 1 * PyLong_SHIFT30) {
22509 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
22510 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (int) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (int) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
22511 } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT30) {
22512 return (int) (((((int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]));
22513 }
22514 }
22515 break;
22516 case 3:
22517 if (8 * sizeof(int) > 2 * PyLong_SHIFT30) {
22518 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
22519 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int) < sizeof(unsigned long)) { if
(__builtin_expect(!!(value != (unsigned long) (int) value), 0
)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (int) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
22520 } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT30) {
22521 return (int) (((((((int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]));
22522 }
22523 }
22524 break;
22525 case 4:
22526 if (8 * sizeof(int) > 3 * PyLong_SHIFT30) {
22527 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
22528 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (int) value), 0)) { unsigned long zero = 0
; if (0 && __builtin_expect(!!(value == (unsigned long
)-1 && PyErr_Occurred()), 0)) return (int) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (int) value; }
22529 } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT30) {
22530 return (int) (((((((((int)digits[3]) << PyLong_SHIFT30) | (int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]));
22531 }
22532 }
22533 break;
22534 }
22535#endif
22536#if CYTHON_COMPILING_IN_CPYTHON1
22537 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
22538 goto raise_neg_overflow;
22539 }
22540#else
22541 {
22542 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
22543 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
22544 return (int) -1;
22545 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
22546 goto raise_neg_overflow;
22547 }
22548#endif
22549 if (sizeof(int) <= sizeof(unsigned long)) {
22550 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
int) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (int) value), 0)) { unsigned long zero = 0
; if (1 && __builtin_expect(!!(value == (unsigned long
)-1 && PyErr_Occurred()), 0)) return (int) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (int) value; }
22551 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONGlong long)) {
22552 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(int) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (int) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(int) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
22553 }
22554 } else {
22555#if CYTHON_USE_PYLONG_INTERNALS1
22556 const digit* digits = ((PyLongObject*)x)->ob_digit;
22557 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
22558 case 0: return (int) 0;
22559 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(int) < sizeof
(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (int) value
), 0)) { sdigit zero = 0; if (0 && __builtin_expect(!
!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(int) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
22560 case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(int) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (int) value), 0
)) { digit zero = 0; if (0 && __builtin_expect(!!(value
== (digit)-1 && PyErr_Occurred()), 0)) return (int) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int) value; }
22561 case -2:
22562 if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT30) {
22563 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
22564 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (int) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (int
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
22565 } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT30) {
22566 return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
22567 }
22568 }
22569 break;
22570 case 2:
22571 if (8 * sizeof(int) > 1 * PyLong_SHIFT30) {
22572 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
22573 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (int) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (int) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
22574 } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT30) {
22575 return (int) ((((((int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
22576 }
22577 }
22578 break;
22579 case -3:
22580 if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT30) {
22581 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
22582 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (int) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (int) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
22583 } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT30) {
22584 return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
22585 }
22586 }
22587 break;
22588 case 3:
22589 if (8 * sizeof(int) > 2 * PyLong_SHIFT30) {
22590 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
22591 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int) < sizeof(unsigned long)) { if
(__builtin_expect(!!(value != (unsigned long) (int) value), 0
)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (int) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
22592 } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT30) {
22593 return (int) ((((((((int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
22594 }
22595 }
22596 break;
22597 case -4:
22598 if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT30) {
22599 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
22600 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int) < sizeof(long)) { if (__builtin_expect(!!(value != (
long) (int) value), 0)) { long zero = 0; if (0 && __builtin_expect
(!!(value == (long)-1 && PyErr_Occurred()), 0)) return
(int) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
22601 } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT30) {
22602 return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT30) | (int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
22603 }
22604 }
22605 break;
22606 case 4:
22607 if (8 * sizeof(int) > 3 * PyLong_SHIFT30) {
22608 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
22609 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (int) value), 0)) { unsigned long zero = 0
; if (0 && __builtin_expect(!!(value == (unsigned long
)-1 && PyErr_Occurred()), 0)) return (int) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (int) value; }
22610 } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT30) {
22611 return (int) ((((((((((int)digits[3]) << PyLong_SHIFT30) | (int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
22612 }
22613 }
22614 break;
22615 }
22616#endif
22617 if (sizeof(int) <= sizeof(long)) {
22618 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(int) < sizeof(
long)) { if (__builtin_expect(!!(value != (long) (int) value)
, 0)) { long zero = 0; if (1 && __builtin_expect(!!(value
== (long)-1 && PyErr_Occurred()), 0)) return (int) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int) value; }
22619 } else if (sizeof(int) <= sizeof(PY_LONG_LONGlong long)) {
22620 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(int) <
sizeof(long long)) { if (__builtin_expect(!!(value != (long long
) (int) value), 0)) { long long zero = 0; if (1 && __builtin_expect
(!!(value == (long long)-1 && PyErr_Occurred()), 0)) return
(int) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
22621 }
22622 }
22623 {
22624#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
22625 PyErr_SetString(PyExc_RuntimeError,
22626 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22627#else
22628 int val;
22629 PyObject *v = __Pyx_PyNumber_Int(x);
22630 #if PY_MAJOR_VERSION2 < 3
22631 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
22632 PyObject *tmp = v;
22633 v = PyNumber_Long(tmp);
22634 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
22635 }
22636 #endif
22637 if (likely(v)__builtin_expect(!!(v), 1)) {
22638 int one = 1; int is_little = (int)*(unsigned char *)&one;
22639 unsigned char *bytes = (unsigned char *)&val;
22640 int ret = _PyLong_AsByteArray((PyLongObject *)v,
22641 bytes, sizeof(val),
22642 is_little, !is_unsigned);
22643 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
22644 if (likely(!ret)__builtin_expect(!!(!ret), 1))
22645 return val;
22646 }
22647#endif
22648 return (int) -1;
22649 }
22650 } else {
22651 int val;
22652 PyObject *tmp = __Pyx_PyNumber_Int(x);
22653 if (!tmp) return (int) -1;
22654 val = __Pyx_PyInt_As_int(tmp);
22655 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
22656 return val;
22657 }
22658raise_overflow:
22659 PyErr_SetString(PyExc_OverflowError,
22660 "value too large to convert to int");
22661 return (int) -1;
22662raise_neg_overflow:
22663 PyErr_SetString(PyExc_OverflowError,
22664 "can't convert negative value to int");
22665 return (int) -1;
22666}
22667
22668static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
22669 const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
22670 const int is_unsigned = neg_one > const_zero;
22671 if (is_unsigned) {
22672 if (sizeof(unsigned long) < sizeof(long)) {
22673 return PyInt_FromLong((long) value);
22674 } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
22675 return PyLong_FromUnsignedLong((unsigned long) value);
22676 } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONGlong long)) {
22677 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
22678 }
22679 } else {
22680 if (sizeof(unsigned long) <= sizeof(long)) {
22681 return PyInt_FromLong((long) value);
22682 } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONGlong long)) {
22683 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
22684 }
22685 }
22686 {
22687 int one = 1; int little = (int)*(unsigned char *)&one;
22688 unsigned char *bytes = (unsigned char *)&value;
22689 return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
22690 little, !is_unsigned);
22691 }
22692}
22693
22694static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value) {
22695 const unsigned short neg_one = (unsigned short) -1, const_zero = (unsigned short) 0;
22696 const int is_unsigned = neg_one > const_zero;
22697 if (is_unsigned) {
22698 if (sizeof(unsigned short) < sizeof(long)) {
22699 return PyInt_FromLong((long) value);
22700 } else if (sizeof(unsigned short) <= sizeof(unsigned long)) {
22701 return PyLong_FromUnsignedLong((unsigned long) value);
22702 } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONGlong long)) {
22703 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
22704 }
22705 } else {
22706 if (sizeof(unsigned short) <= sizeof(long)) {
22707 return PyInt_FromLong((long) value);
22708 } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONGlong long)) {
22709 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
22710 }
22711 }
22712 {
22713 int one = 1; int little = (int)*(unsigned char *)&one;
22714 unsigned char *bytes = (unsigned char *)&value;
22715 return _PyLong_FromByteArray(bytes, sizeof(unsigned short),
22716 little, !is_unsigned);
22717 }
22718}
22719
22720static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value) {
22721 const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0;
22722 const int is_unsigned = neg_one > const_zero;
22723 if (is_unsigned) {
22724 if (sizeof(unsigned char) < sizeof(long)) {
22725 return PyInt_FromLong((long) value);
22726 } else if (sizeof(unsigned char) <= sizeof(unsigned long)) {
22727 return PyLong_FromUnsignedLong((unsigned long) value);
22728 } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONGlong long)) {
22729 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
22730 }
22731 } else {
22732 if (sizeof(unsigned char) <= sizeof(long)) {
22733 return PyInt_FromLong((long) value);
22734 } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONGlong long)) {
22735 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
22736 }
22737 }
22738 {
22739 int one = 1; int little = (int)*(unsigned char *)&one;
22740 unsigned char *bytes = (unsigned char *)&value;
22741 return _PyLong_FromByteArray(bytes, sizeof(unsigned char),
22742 little, !is_unsigned);
22743 }
22744}
22745
22746static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
22747 const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
22748 const int is_unsigned = neg_one > const_zero;
22749 if (is_unsigned) {
22750 if (sizeof(uint64_t) < sizeof(long)) {
22751 return PyInt_FromLong((long) value);
22752 } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
22753 return PyLong_FromUnsignedLong((unsigned long) value);
22754 } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
22755 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
22756 }
22757 } else {
22758 if (sizeof(uint64_t) <= sizeof(long)) {
22759 return PyInt_FromLong((long) value);
22760 } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONGlong long)) {
22761 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
22762 }
22763 }
22764 {
22765 int one = 1; int little = (int)*(unsigned char *)&one;
22766 unsigned char *bytes = (unsigned char *)&value;
22767 return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
22768 little, !is_unsigned);
22769 }
22770}
22771
22772static CYTHON_INLINE__inline__ int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
22773 const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
22774 const int is_unsigned = neg_one > const_zero;
22775#if PY_MAJOR_VERSION2 < 3
22776 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
22777 if (sizeof(int64_t) < sizeof(long)) {
22778 __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(int64_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (int64_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22779 } else {
22780 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
22781 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
22782 goto raise_neg_overflow;
22783 }
22784 return (int64_t) val;
22785 }
22786 } else
22787#endif
22788 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
22789 if (is_unsigned) {
22790#if CYTHON_USE_PYLONG_INTERNALS1
22791 const digit* digits = ((PyLongObject*)x)->ob_digit;
22792 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
22793 case 0: return (int64_t) 0;
22794 case 1: __PYX_VERIFY_RETURN_INT(int64_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(int64_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (int64_t) value
), 0)) { digit zero = 0; if (0 && __builtin_expect(!!
(value == (digit)-1 && PyErr_Occurred()), 0)) return (
int64_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22795 case 2:
22796 if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT30) {
22797 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
22798 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int64_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (int64_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22799 } else if (8 * sizeof(int64_t) >= 2 * PyLong_SHIFT30) {
22800 return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0]));
22801 }
22802 }
22803 break;
22804 case 3:
22805 if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT30) {
22806 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
22807 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int64_t) < sizeof(unsigned long))
{ if (__builtin_expect(!!(value != (unsigned long) (int64_t)
value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22808 } else if (8 * sizeof(int64_t) >= 3 * PyLong_SHIFT30) {
22809 return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0]));
22810 }
22811 }
22812 break;
22813 case 4:
22814 if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT30) {
22815 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
22816 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int64_t) < sizeof(unsigned long)) { if (__builtin_expect(
!!(value != (unsigned long) (int64_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (int64_t) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int64_t) value; }
22817 } else if (8 * sizeof(int64_t) >= 4 * PyLong_SHIFT30) {
22818 return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT30) | (int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0]));
22819 }
22820 }
22821 break;
22822 }
22823#endif
22824#if CYTHON_COMPILING_IN_CPYTHON1
22825 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
22826 goto raise_neg_overflow;
22827 }
22828#else
22829 {
22830 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
22831 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
22832 return (int64_t) -1;
22833 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
22834 goto raise_neg_overflow;
22835 }
22836#endif
22837 if (sizeof(int64_t) <= sizeof(unsigned long)) {
22838 __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
int64_t) < sizeof(unsigned long)) { if (__builtin_expect(!
!(value != (unsigned long) (int64_t) value), 0)) { unsigned long
zero = 0; if (1 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (int64_t) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int64_t) value; }
22839 } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
22840 __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(int64_t) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (int64_t) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(int64_t) -1; if (is_unsigned && __builtin_expect(!!
(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22841 }
22842 } else {
22843#if CYTHON_USE_PYLONG_INTERNALS1
22844 const digit* digits = ((PyLongObject*)x)->ob_digit;
22845 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
22846 case 0: return (int64_t) 0;
22847 case -1: __PYX_VERIFY_RETURN_INT(int64_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(int64_t) <
sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (
int64_t) value), 0)) { sdigit zero = 0; if (0 && __builtin_expect
(!!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(int64_t) -1; if (is_unsigned && __builtin_expect(!!
(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22848 case 1: __PYX_VERIFY_RETURN_INT(int64_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(int64_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (int64_t) value
), 0)) { digit zero = 0; if (0 && __builtin_expect(!!
(value == (digit)-1 && PyErr_Occurred()), 0)) return (
int64_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22849 case -2:
22850 if (8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT30) {
22851 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
22852 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int64_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (int64_t) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (int64_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22853 } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT30) {
22854 return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
22855 }
22856 }
22857 break;
22858 case 2:
22859 if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT30) {
22860 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
22861 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int64_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (int64_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22862 } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT30) {
22863 return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
22864 }
22865 }
22866 break;
22867 case -3:
22868 if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT30) {
22869 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
22870 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int64_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (int64_t) value), 0)) { long zero = 0; if
(0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (int64_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (int64_t) value; }
22871 } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT30) {
22872 return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
22873 }
22874 }
22875 break;
22876 case 3:
22877 if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT30) {
22878 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
22879 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int64_t) < sizeof(unsigned long))
{ if (__builtin_expect(!!(value != (unsigned long) (int64_t)
value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22880 } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT30) {
22881 return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
22882 }
22883 }
22884 break;
22885 case -4:
22886 if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT30) {
22887 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
22888 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int64_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (int64_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22889 } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT30) {
22890 return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT30) | (int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
22891 }
22892 }
22893 break;
22894 case 4:
22895 if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT30) {
22896 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
22897 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int64_t) < sizeof(unsigned long)) { if (__builtin_expect(
!!(value != (unsigned long) (int64_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (int64_t) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int64_t) value; }
22898 } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT30) {
22899 return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT30) | (int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
22900 }
22901 }
22902 break;
22903 }
22904#endif
22905 if (sizeof(int64_t) <= sizeof(long)) {
22906 __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(int64_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (int64_t) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (int64_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22907 } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONGlong long)) {
22908 __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(int64_t)
< sizeof(long long)) { if (__builtin_expect(!!(value != (
long long) (int64_t) value), 0)) { long long zero = 0; if (1 &&
__builtin_expect(!!(value == (long long)-1 && PyErr_Occurred
()), 0)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
22909 }
22910 }
22911 {
22912#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
22913 PyErr_SetString(PyExc_RuntimeError,
22914 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22915#else
22916 int64_t val;
22917 PyObject *v = __Pyx_PyNumber_Int(x);
22918 #if PY_MAJOR_VERSION2 < 3
22919 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
22920 PyObject *tmp = v;
22921 v = PyNumber_Long(tmp);
22922 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
22923 }
22924 #endif
22925 if (likely(v)__builtin_expect(!!(v), 1)) {
22926 int one = 1; int is_little = (int)*(unsigned char *)&one;
22927 unsigned char *bytes = (unsigned char *)&val;
22928 int ret = _PyLong_AsByteArray((PyLongObject *)v,
22929 bytes, sizeof(val),
22930 is_little, !is_unsigned);
22931 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
22932 if (likely(!ret)__builtin_expect(!!(!ret), 1))
22933 return val;
22934 }
22935#endif
22936 return (int64_t) -1;
22937 }
22938 } else {
22939 int64_t val;
22940 PyObject *tmp = __Pyx_PyNumber_Int(x);
22941 if (!tmp) return (int64_t) -1;
22942 val = __Pyx_PyInt_As_int64_t(tmp);
22943 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
22944 return val;
22945 }
22946raise_overflow:
22947 PyErr_SetString(PyExc_OverflowError,
22948 "value too large to convert to int64_t");
22949 return (int64_t) -1;
22950raise_neg_overflow:
22951 PyErr_SetString(PyExc_OverflowError,
22952 "can't convert negative value to int64_t");
22953 return (int64_t) -1;
22954}
22955
22956static CYTHON_INLINE__inline__ uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
22957 const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
22958 const int is_unsigned = neg_one > const_zero;
22959#if PY_MAJOR_VERSION2 < 3
22960 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
22961 if (sizeof(uint64_t) < sizeof(long)) {
22962 __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(uint64_t) < sizeof(long)) { if (__builtin_expect(!!(value
!= (long) (uint64_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (uint64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
22963 } else {
22964 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
22965 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
22966 goto raise_neg_overflow;
22967 }
22968 return (uint64_t) val;
22969 }
22970 } else
22971#endif
22972 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
22973 if (is_unsigned) {
22974#if CYTHON_USE_PYLONG_INTERNALS1
22975 const digit* digits = ((PyLongObject*)x)->ob_digit;
22976 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
22977 case 0: return (uint64_t) 0;
22978 case 1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(uint64_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (uint64_t) value
), 0)) { digit zero = 0; if (0 && __builtin_expect(!!
(value == (digit)-1 && PyErr_Occurred()), 0)) return (
uint64_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
22979 case 2:
22980 if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT30) {
22981 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
22982 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint64_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (uint64_t) value), 0)) { unsigned long zero = 0; if (0
&& __builtin_expect(!!(value == (unsigned long)-1 &&
PyErr_Occurred()), 0)) return (uint64_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint64_t) value; }
22983 } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT30) {
22984 return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0]));
22985 }
22986 }
22987 break;
22988 case 3:
22989 if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT30) {
22990 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
22991 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint64_t) < sizeof(unsigned long)
) { if (__builtin_expect(!!(value != (unsigned long) (uint64_t
) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (uint64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
22992 } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT30) {
22993 return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0]));
22994 }
22995 }
22996 break;
22997 case 4:
22998 if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT30) {
22999 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23000 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint64_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (uint64_t) value), 0)) { unsigned
long zero = 0; if (0 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
uint64_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
23001 } else if (8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT30) {
23002 return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT30) | (uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0]));
23003 }
23004 }
23005 break;
23006 }
23007#endif
23008#if CYTHON_COMPILING_IN_CPYTHON1
23009 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
23010 goto raise_neg_overflow;
23011 }
23012#else
23013 {
23014 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
23015 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
23016 return (uint64_t) -1;
23017 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
23018 goto raise_neg_overflow;
23019 }
23020#endif
23021 if (sizeof(uint64_t) <= sizeof(unsigned long)) {
23022 __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
uint64_t) < sizeof(unsigned long)) { if (__builtin_expect(
!!(value != (unsigned long) (uint64_t) value), 0)) { unsigned
long zero = 0; if (1 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
uint64_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
23023 } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
23024 __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(uint64_t) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (uint64_t) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(uint64_t) -1; if (is_unsigned && __builtin_expect(!
!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
23025 }
23026 } else {
23027#if CYTHON_USE_PYLONG_INTERNALS1
23028 const digit* digits = ((PyLongObject*)x)->ob_digit;
23029 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
23030 case 0: return (uint64_t) 0;
23031 case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(uint64_t) <
sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (
uint64_t) value), 0)) { sdigit zero = 0; if (0 && __builtin_expect
(!!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(uint64_t) -1; if (is_unsigned && __builtin_expect(!
!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
23032 case 1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(uint64_t) < sizeof(
digit)) { if (__builtin_expect(!!(value != (digit) (uint64_t)
value), 0)) { digit zero = 0; if (0 && __builtin_expect
(!!(value == (digit)-1 && PyErr_Occurred()), 0)) return
(uint64_t) -1; if (is_unsigned && __builtin_expect(!
!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
23033 case -2:
23034 if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT30) {
23035 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
23036 __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint64_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (uint64_t) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (uint64_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
23037 } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT30) {
23038 return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
23039 }
23040 }
23041 break;
23042 case 2:
23043 if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT30) {
23044 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
23045 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint64_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (uint64_t) value), 0)) { unsigned long zero = 0; if (0
&& __builtin_expect(!!(value == (unsigned long)-1 &&
PyErr_Occurred()), 0)) return (uint64_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint64_t) value; }
23046 } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT30) {
23047 return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
23048 }
23049 }
23050 break;
23051 case -3:
23052 if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT30) {
23053 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
23054 __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint64_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (uint64_t) value), 0)) { long zero = 0; if
(0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (uint64_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint64_t) value; }
23055 } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT30) {
23056 return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
23057 }
23058 }
23059 break;
23060 case 3:
23061 if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT30) {
23062 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
23063 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint64_t) < sizeof(unsigned long)
) { if (__builtin_expect(!!(value != (unsigned long) (uint64_t
) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (uint64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
23064 } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT30) {
23065 return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
23066 }
23067 }
23068 break;
23069 case -4:
23070 if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT30) {
23071 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23072 __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint64_t) < sizeof(long)) { if (__builtin_expect(!!(value
!= (long) (uint64_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (uint64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
23073 } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT30) {
23074 return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT30) | (uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
23075 }
23076 }
23077 break;
23078 case 4:
23079 if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT30) {
23080 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23081 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint64_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (uint64_t) value), 0)) { unsigned
long zero = 0; if (0 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
uint64_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
23082 } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT30) {
23083 return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT30) | (uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
23084 }
23085 }
23086 break;
23087 }
23088#endif
23089 if (sizeof(uint64_t) <= sizeof(long)) {
23090 __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(uint64_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (uint64_t) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (uint64_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
23091 } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONGlong long)) {
23092 __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(uint64_t
) < sizeof(long long)) { if (__builtin_expect(!!(value != (
long long) (uint64_t) value), 0)) { long long zero = 0; if (1
&& __builtin_expect(!!(value == (long long)-1 &&
PyErr_Occurred()), 0)) return (uint64_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint64_t) value; }
23093 }
23094 }
23095 {
23096#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
23097 PyErr_SetString(PyExc_RuntimeError,
23098 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
23099#else
23100 uint64_t val;
23101 PyObject *v = __Pyx_PyNumber_Int(x);
23102 #if PY_MAJOR_VERSION2 < 3
23103 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
23104 PyObject *tmp = v;
23105 v = PyNumber_Long(tmp);
23106 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
23107 }
23108 #endif
23109 if (likely(v)__builtin_expect(!!(v), 1)) {
23110 int one = 1; int is_little = (int)*(unsigned char *)&one;
23111 unsigned char *bytes = (unsigned char *)&val;
23112 int ret = _PyLong_AsByteArray((PyLongObject *)v,
23113 bytes, sizeof(val),
23114 is_little, !is_unsigned);
23115 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
23116 if (likely(!ret)__builtin_expect(!!(!ret), 1))
23117 return val;
23118 }
23119#endif
23120 return (uint64_t) -1;
23121 }
23122 } else {
23123 uint64_t val;
23124 PyObject *tmp = __Pyx_PyNumber_Int(x);
23125 if (!tmp) return (uint64_t) -1;
23126 val = __Pyx_PyInt_As_uint64_t(tmp);
23127 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
23128 return val;
23129 }
23130raise_overflow:
23131 PyErr_SetString(PyExc_OverflowError,
23132 "value too large to convert to uint64_t");
23133 return (uint64_t) -1;
23134raise_neg_overflow:
23135 PyErr_SetString(PyExc_OverflowError,
23136 "can't convert negative value to uint64_t");
23137 return (uint64_t) -1;
23138}
23139
23140static CYTHON_INLINE__inline__ size_t __Pyx_PyInt_As_size_t(PyObject *x) {
23141 const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
23142 const int is_unsigned = neg_one > const_zero;
23143#if PY_MAJOR_VERSION2 < 3
23144 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
23145 if (sizeof(size_t) < sizeof(long)) {
23146 __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(size_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (size_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23147 } else {
23148 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
23149 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
23150 goto raise_neg_overflow;
23151 }
23152 return (size_t) val;
23153 }
23154 } else
23155#endif
23156 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
23157 if (is_unsigned) {
23158#if CYTHON_USE_PYLONG_INTERNALS1
23159 const digit* digits = ((PyLongObject*)x)->ob_digit;
23160 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
23161 case 0: return (size_t) 0;
23162 case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(size_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (size_t) value)
, 0)) { digit zero = 0; if (0 && __builtin_expect(!!(
value == (digit)-1 && PyErr_Occurred()), 0)) return (
size_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23163 case 2:
23164 if (8 * sizeof(size_t) > 1 * PyLong_SHIFT30) {
23165 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
23166 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(size_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (size_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23167 } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT30) {
23168 return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
23169 }
23170 }
23171 break;
23172 case 3:
23173 if (8 * sizeof(size_t) > 2 * PyLong_SHIFT30) {
23174 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
23175 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(size_t) < sizeof(unsigned long)) {
if (__builtin_expect(!!(value != (unsigned long) (size_t) value
), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23176 } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT30) {
23177 return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
23178 }
23179 }
23180 break;
23181 case 4:
23182 if (8 * sizeof(size_t) > 3 * PyLong_SHIFT30) {
23183 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23184 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(size_t) < sizeof(unsigned long)) { if (__builtin_expect(!
!(value != (unsigned long) (size_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (size_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (size_t) value; }
23185 } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT30) {
23186 return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT30) | (size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
23187 }
23188 }
23189 break;
23190 }
23191#endif
23192#if CYTHON_COMPILING_IN_CPYTHON1
23193 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
23194 goto raise_neg_overflow;
23195 }
23196#else
23197 {
23198 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
23199 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
23200 return (size_t) -1;
23201 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
23202 goto raise_neg_overflow;
23203 }
23204#endif
23205 if (sizeof(size_t) <= sizeof(unsigned long)) {
23206 __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
size_t) < sizeof(unsigned long)) { if (__builtin_expect(!!
(value != (unsigned long) (size_t) value), 0)) { unsigned long
zero = 0; if (1 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (size_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (size_t) value; }
23207 } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
23208 __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(size_t) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (size_t) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(size_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23209 }
23210 } else {
23211#if CYTHON_USE_PYLONG_INTERNALS1
23212 const digit* digits = ((PyLongObject*)x)->ob_digit;
23213 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
23214 case 0: return (size_t) 0;
23215 case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(size_t) <
sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (
size_t) value), 0)) { sdigit zero = 0; if (0 && __builtin_expect
(!!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(size_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23216 case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(size_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (size_t) value)
, 0)) { digit zero = 0; if (0 && __builtin_expect(!!(
value == (digit)-1 && PyErr_Occurred()), 0)) return (
size_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23217 case -2:
23218 if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT30) {
23219 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
23220 __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(size_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (size_t) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (size_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23221 } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT30) {
23222 return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
23223 }
23224 }
23225 break;
23226 case 2:
23227 if (8 * sizeof(size_t) > 1 * PyLong_SHIFT30) {
23228 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
23229 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(size_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (size_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23230 } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT30) {
23231 return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
23232 }
23233 }
23234 break;
23235 case -3:
23236 if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT30) {
23237 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
23238 __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(size_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (size_t) value), 0)) { long zero = 0; if (
0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (size_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (size_t) value; }
23239 } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT30) {
23240 return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
23241 }
23242 }
23243 break;
23244 case 3:
23245 if (8 * sizeof(size_t) > 2 * PyLong_SHIFT30) {
23246 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
23247 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(size_t) < sizeof(unsigned long)) {
if (__builtin_expect(!!(value != (unsigned long) (size_t) value
), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23248 } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT30) {
23249 return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
23250 }
23251 }
23252 break;
23253 case -4:
23254 if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT30) {
23255 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23256 __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(size_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (size_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23257 } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT30) {
23258 return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT30) | (size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
23259 }
23260 }
23261 break;
23262 case 4:
23263 if (8 * sizeof(size_t) > 3 * PyLong_SHIFT30) {
23264 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23265 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(size_t) < sizeof(unsigned long)) { if (__builtin_expect(!
!(value != (unsigned long) (size_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (size_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (size_t) value; }
23266 } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT30) {
23267 return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT30) | (size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
23268 }
23269 }
23270 break;
23271 }
23272#endif
23273 if (sizeof(size_t) <= sizeof(long)) {
23274 __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(size_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (size_t) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (size_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23275 } else if (sizeof(size_t) <= sizeof(PY_LONG_LONGlong long)) {
23276 __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(size_t) <
sizeof(long long)) { if (__builtin_expect(!!(value != (long long
) (size_t) value), 0)) { long long zero = 0; if (1 &&
__builtin_expect(!!(value == (long long)-1 && PyErr_Occurred
()), 0)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
23277 }
23278 }
23279 {
23280#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
23281 PyErr_SetString(PyExc_RuntimeError,
23282 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
23283#else
23284 size_t val;
23285 PyObject *v = __Pyx_PyNumber_Int(x);
23286 #if PY_MAJOR_VERSION2 < 3
23287 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
23288 PyObject *tmp = v;
23289 v = PyNumber_Long(tmp);
23290 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
23291 }
23292 #endif
23293 if (likely(v)__builtin_expect(!!(v), 1)) {
23294 int one = 1; int is_little = (int)*(unsigned char *)&one;
23295 unsigned char *bytes = (unsigned char *)&val;
23296 int ret = _PyLong_AsByteArray((PyLongObject *)v,
23297 bytes, sizeof(val),
23298 is_little, !is_unsigned);
23299 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
23300 if (likely(!ret)__builtin_expect(!!(!ret), 1))
23301 return val;
23302 }
23303#endif
23304 return (size_t) -1;
23305 }
23306 } else {
23307 size_t val;
23308 PyObject *tmp = __Pyx_PyNumber_Int(x);
23309 if (!tmp) return (size_t) -1;
23310 val = __Pyx_PyInt_As_size_t(tmp);
23311 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
23312 return val;
23313 }
23314raise_overflow:
23315 PyErr_SetString(PyExc_OverflowError,
23316 "value too large to convert to size_t");
23317 return (size_t) -1;
23318raise_neg_overflow:
23319 PyErr_SetString(PyExc_OverflowError,
23320 "can't convert negative value to size_t");
23321 return (size_t) -1;
23322}
23323
23324static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint16_t(uint16_t value) {
23325 const uint16_t neg_one = (uint16_t) -1, const_zero = (uint16_t) 0;
23326 const int is_unsigned = neg_one > const_zero;
23327 if (is_unsigned) {
23328 if (sizeof(uint16_t) < sizeof(long)) {
23329 return PyInt_FromLong((long) value);
23330 } else if (sizeof(uint16_t) <= sizeof(unsigned long)) {
23331 return PyLong_FromUnsignedLong((unsigned long) value);
23332 } else if (sizeof(uint16_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
23333 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
23334 }
23335 } else {
23336 if (sizeof(uint16_t) <= sizeof(long)) {
23337 return PyInt_FromLong((long) value);
23338 } else if (sizeof(uint16_t) <= sizeof(PY_LONG_LONGlong long)) {
23339 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
23340 }
23341 }
23342 {
23343 int one = 1; int little = (int)*(unsigned char *)&one;
23344 unsigned char *bytes = (unsigned char *)&value;
23345 return _PyLong_FromByteArray(bytes, sizeof(uint16_t),
23346 little, !is_unsigned);
23347 }
23348}
23349
23350static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
23351 const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
23352 const int is_unsigned = neg_one > const_zero;
23353 if (is_unsigned) {
23354 if (sizeof(uint32_t) < sizeof(long)) {
23355 return PyInt_FromLong((long) value);
23356 } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
23357 return PyLong_FromUnsignedLong((unsigned long) value);
23358 } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
23359 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
23360 }
23361 } else {
23362 if (sizeof(uint32_t) <= sizeof(long)) {
23363 return PyInt_FromLong((long) value);
23364 } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONGlong long)) {
23365 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
23366 }
23367 }
23368 {
23369 int one = 1; int little = (int)*(unsigned char *)&one;
23370 unsigned char *bytes = (unsigned char *)&value;
23371 return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
23372 little, !is_unsigned);
23373 }
23374}
23375
23376static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_time_t(time_t value) {
23377 const time_t neg_one = (time_t) -1, const_zero = (time_t) 0;
23378 const int is_unsigned = neg_one > const_zero;
23379 if (is_unsigned) {
23380 if (sizeof(time_t) < sizeof(long)) {
23381 return PyInt_FromLong((long) value);
23382 } else if (sizeof(time_t) <= sizeof(unsigned long)) {
23383 return PyLong_FromUnsignedLong((unsigned long) value);
23384 } else if (sizeof(time_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
23385 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
23386 }
23387 } else {
23388 if (sizeof(time_t) <= sizeof(long)) {
23389 return PyInt_FromLong((long) value);
23390 } else if (sizeof(time_t) <= sizeof(PY_LONG_LONGlong long)) {
23391 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
23392 }
23393 }
23394 {
23395 int one = 1; int little = (int)*(unsigned char *)&one;
23396 unsigned char *bytes = (unsigned char *)&value;
23397 return _PyLong_FromByteArray(bytes, sizeof(time_t),
23398 little, !is_unsigned);
23399 }
23400}
23401
23402static CYTHON_INLINE__inline__ mode_t __Pyx_PyInt_As_mode_t(PyObject *x) {
23403 const mode_t neg_one = (mode_t) -1, const_zero = (mode_t) 0;
23404 const int is_unsigned = neg_one > const_zero;
23405#if PY_MAJOR_VERSION2 < 3
23406 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
23407 if (sizeof(mode_t) < sizeof(long)) {
23408 __PYX_VERIFY_RETURN_INT(mode_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(mode_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (mode_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23409 } else {
23410 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
23411 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
23412 goto raise_neg_overflow;
23413 }
23414 return (mode_t) val;
23415 }
23416 } else
23417#endif
23418 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
23419 if (is_unsigned) {
23420#if CYTHON_USE_PYLONG_INTERNALS1
23421 const digit* digits = ((PyLongObject*)x)->ob_digit;
23422 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
23423 case 0: return (mode_t) 0;
23424 case 1: __PYX_VERIFY_RETURN_INT(mode_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(mode_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (mode_t) value)
, 0)) { digit zero = 0; if (0 && __builtin_expect(!!(
value == (digit)-1 && PyErr_Occurred()), 0)) return (
mode_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23425 case 2:
23426 if (8 * sizeof(mode_t) > 1 * PyLong_SHIFT30) {
23427 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
23428 __PYX_VERIFY_RETURN_INT(mode_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(mode_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (mode_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23429 } else if (8 * sizeof(mode_t) >= 2 * PyLong_SHIFT30) {
23430 return (mode_t) (((((mode_t)digits[1]) << PyLong_SHIFT30) | (mode_t)digits[0]));
23431 }
23432 }
23433 break;
23434 case 3:
23435 if (8 * sizeof(mode_t) > 2 * PyLong_SHIFT30) {
23436 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
23437 __PYX_VERIFY_RETURN_INT(mode_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(mode_t) < sizeof(unsigned long)) {
if (__builtin_expect(!!(value != (unsigned long) (mode_t) value
), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23438 } else if (8 * sizeof(mode_t) >= 3 * PyLong_SHIFT30) {
23439 return (mode_t) (((((((mode_t)digits[2]) << PyLong_SHIFT30) | (mode_t)digits[1]) << PyLong_SHIFT30) | (mode_t)digits[0]));
23440 }
23441 }
23442 break;
23443 case 4:
23444 if (8 * sizeof(mode_t) > 3 * PyLong_SHIFT30) {
23445 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23446 __PYX_VERIFY_RETURN_INT(mode_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(mode_t) < sizeof(unsigned long)) { if (__builtin_expect(!
!(value != (unsigned long) (mode_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (mode_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (mode_t) value; }
23447 } else if (8 * sizeof(mode_t) >= 4 * PyLong_SHIFT30) {
23448 return (mode_t) (((((((((mode_t)digits[3]) << PyLong_SHIFT30) | (mode_t)digits[2]) << PyLong_SHIFT30) | (mode_t)digits[1]) << PyLong_SHIFT30) | (mode_t)digits[0]));
23449 }
23450 }
23451 break;
23452 }
23453#endif
23454#if CYTHON_COMPILING_IN_CPYTHON1
23455 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
23456 goto raise_neg_overflow;
23457 }
23458#else
23459 {
23460 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
23461 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
23462 return (mode_t) -1;
23463 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
23464 goto raise_neg_overflow;
23465 }
23466#endif
23467 if (sizeof(mode_t) <= sizeof(unsigned long)) {
23468 __PYX_VERIFY_RETURN_INT_EXC(mode_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
mode_t) < sizeof(unsigned long)) { if (__builtin_expect(!!
(value != (unsigned long) (mode_t) value), 0)) { unsigned long
zero = 0; if (1 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (mode_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (mode_t) value; }
23469 } else if (sizeof(mode_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
23470 __PYX_VERIFY_RETURN_INT_EXC(mode_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(mode_t) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (mode_t) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(mode_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23471 }
23472 } else {
23473#if CYTHON_USE_PYLONG_INTERNALS1
23474 const digit* digits = ((PyLongObject*)x)->ob_digit;
23475 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
23476 case 0: return (mode_t) 0;
23477 case -1: __PYX_VERIFY_RETURN_INT(mode_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(mode_t) <
sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (
mode_t) value), 0)) { sdigit zero = 0; if (0 && __builtin_expect
(!!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(mode_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23478 case 1: __PYX_VERIFY_RETURN_INT(mode_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(mode_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (mode_t) value)
, 0)) { digit zero = 0; if (0 && __builtin_expect(!!(
value == (digit)-1 && PyErr_Occurred()), 0)) return (
mode_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23479 case -2:
23480 if (8 * sizeof(mode_t) - 1 > 1 * PyLong_SHIFT30) {
23481 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
23482 __PYX_VERIFY_RETURN_INT(mode_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(mode_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (mode_t) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (mode_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23483 } else if (8 * sizeof(mode_t) - 1 > 2 * PyLong_SHIFT30) {
23484 return (mode_t) (((mode_t)-1)*(((((mode_t)digits[1]) << PyLong_SHIFT30) | (mode_t)digits[0])));
23485 }
23486 }
23487 break;
23488 case 2:
23489 if (8 * sizeof(mode_t) > 1 * PyLong_SHIFT30) {
23490 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
23491 __PYX_VERIFY_RETURN_INT(mode_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(mode_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (mode_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23492 } else if (8 * sizeof(mode_t) - 1 > 2 * PyLong_SHIFT30) {
23493 return (mode_t) ((((((mode_t)digits[1]) << PyLong_SHIFT30) | (mode_t)digits[0])));
23494 }
23495 }
23496 break;
23497 case -3:
23498 if (8 * sizeof(mode_t) - 1 > 2 * PyLong_SHIFT30) {
23499 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
23500 __PYX_VERIFY_RETURN_INT(mode_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(mode_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (mode_t) value), 0)) { long zero = 0; if (
0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (mode_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (mode_t) value; }
23501 } else if (8 * sizeof(mode_t) - 1 > 3 * PyLong_SHIFT30) {
23502 return (mode_t) (((mode_t)-1)*(((((((mode_t)digits[2]) << PyLong_SHIFT30) | (mode_t)digits[1]) << PyLong_SHIFT30) | (mode_t)digits[0])));
23503 }
23504 }
23505 break;
23506 case 3:
23507 if (8 * sizeof(mode_t) > 2 * PyLong_SHIFT30) {
23508 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
23509 __PYX_VERIFY_RETURN_INT(mode_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(mode_t) < sizeof(unsigned long)) {
if (__builtin_expect(!!(value != (unsigned long) (mode_t) value
), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23510 } else if (8 * sizeof(mode_t) - 1 > 3 * PyLong_SHIFT30) {
23511 return (mode_t) ((((((((mode_t)digits[2]) << PyLong_SHIFT30) | (mode_t)digits[1]) << PyLong_SHIFT30) | (mode_t)digits[0])));
23512 }
23513 }
23514 break;
23515 case -4:
23516 if (8 * sizeof(mode_t) - 1 > 3 * PyLong_SHIFT30) {
23517 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23518 __PYX_VERIFY_RETURN_INT(mode_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(mode_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (mode_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23519 } else if (8 * sizeof(mode_t) - 1 > 4 * PyLong_SHIFT30) {
23520 return (mode_t) (((mode_t)-1)*(((((((((mode_t)digits[3]) << PyLong_SHIFT30) | (mode_t)digits[2]) << PyLong_SHIFT30) | (mode_t)digits[1]) << PyLong_SHIFT30) | (mode_t)digits[0])));
23521 }
23522 }
23523 break;
23524 case 4:
23525 if (8 * sizeof(mode_t) > 3 * PyLong_SHIFT30) {
23526 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23527 __PYX_VERIFY_RETURN_INT(mode_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(mode_t) < sizeof(unsigned long)) { if (__builtin_expect(!
!(value != (unsigned long) (mode_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (mode_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (mode_t) value; }
23528 } else if (8 * sizeof(mode_t) - 1 > 4 * PyLong_SHIFT30) {
23529 return (mode_t) ((((((((((mode_t)digits[3]) << PyLong_SHIFT30) | (mode_t)digits[2]) << PyLong_SHIFT30) | (mode_t)digits[1]) << PyLong_SHIFT30) | (mode_t)digits[0])));
23530 }
23531 }
23532 break;
23533 }
23534#endif
23535 if (sizeof(mode_t) <= sizeof(long)) {
23536 __PYX_VERIFY_RETURN_INT_EXC(mode_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(mode_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (mode_t) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (mode_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23537 } else if (sizeof(mode_t) <= sizeof(PY_LONG_LONGlong long)) {
23538 __PYX_VERIFY_RETURN_INT_EXC(mode_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(mode_t) <
sizeof(long long)) { if (__builtin_expect(!!(value != (long long
) (mode_t) value), 0)) { long long zero = 0; if (1 &&
__builtin_expect(!!(value == (long long)-1 && PyErr_Occurred
()), 0)) return (mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (mode_t) value; }
23539 }
23540 }
23541 {
23542#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
23543 PyErr_SetString(PyExc_RuntimeError,
23544 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
23545#else
23546 mode_t val;
23547 PyObject *v = __Pyx_PyNumber_Int(x);
23548 #if PY_MAJOR_VERSION2 < 3
23549 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
23550 PyObject *tmp = v;
23551 v = PyNumber_Long(tmp);
23552 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
23553 }
23554 #endif
23555 if (likely(v)__builtin_expect(!!(v), 1)) {
23556 int one = 1; int is_little = (int)*(unsigned char *)&one;
23557 unsigned char *bytes = (unsigned char *)&val;
23558 int ret = _PyLong_AsByteArray((PyLongObject *)v,
23559 bytes, sizeof(val),
23560 is_little, !is_unsigned);
23561 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
23562 if (likely(!ret)__builtin_expect(!!(!ret), 1))
23563 return val;
23564 }
23565#endif
23566 return (mode_t) -1;
23567 }
23568 } else {
23569 mode_t val;
23570 PyObject *tmp = __Pyx_PyNumber_Int(x);
23571 if (!tmp) return (mode_t) -1;
23572 val = __Pyx_PyInt_As_mode_t(tmp);
23573 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
23574 return val;
23575 }
23576raise_overflow:
23577 PyErr_SetString(PyExc_OverflowError,
23578 "value too large to convert to mode_t");
23579 return (mode_t) -1;
23580raise_neg_overflow:
23581 PyErr_SetString(PyExc_OverflowError,
23582 "can't convert negative value to mode_t");
23583 return (mode_t) -1;
23584}
23585
23586static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_mode_t(mode_t value) {
23587 const mode_t neg_one = (mode_t) -1, const_zero = (mode_t) 0;
23588 const int is_unsigned = neg_one > const_zero;
23589 if (is_unsigned) {
23590 if (sizeof(mode_t) < sizeof(long)) {
23591 return PyInt_FromLong((long) value);
23592 } else if (sizeof(mode_t) <= sizeof(unsigned long)) {
23593 return PyLong_FromUnsignedLong((unsigned long) value);
23594 } else if (sizeof(mode_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
23595 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
23596 }
23597 } else {
23598 if (sizeof(mode_t) <= sizeof(long)) {
23599 return PyInt_FromLong((long) value);
23600 } else if (sizeof(mode_t) <= sizeof(PY_LONG_LONGlong long)) {
23601 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
23602 }
23603 }
23604 {
23605 int one = 1; int little = (int)*(unsigned char *)&one;
23606 unsigned char *bytes = (unsigned char *)&value;
23607 return _PyLong_FromByteArray(bytes, sizeof(mode_t),
23608 little, !is_unsigned);
23609 }
23610}
23611
23612static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
23613 const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
23614 const int is_unsigned = neg_one > const_zero;
23615 if (is_unsigned) {
23616 if (sizeof(int64_t) < sizeof(long)) {
23617 return PyInt_FromLong((long) value);
23618 } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
23619 return PyLong_FromUnsignedLong((unsigned long) value);
23620 } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
23621 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
23622 }
23623 } else {
23624 if (sizeof(int64_t) <= sizeof(long)) {
23625 return PyInt_FromLong((long) value);
23626 } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONGlong long)) {
23627 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
23628 }
23629 }
23630 {
23631 int one = 1; int little = (int)*(unsigned char *)&one;
23632 unsigned char *bytes = (unsigned char *)&value;
23633 return _PyLong_FromByteArray(bytes, sizeof(int64_t),
23634 little, !is_unsigned);
23635 }
23636}
23637
23638static CYTHON_INLINE__inline__ long __Pyx_PyInt_As_long(PyObject *x) {
23639 const long neg_one = (long) -1, const_zero = (long) 0;
23640 const int is_unsigned = neg_one > const_zero;
23641#if PY_MAJOR_VERSION2 < 3
23642 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
23643 if (sizeof(long) < sizeof(long)) {
23644 __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(long) < sizeof(long)) { if (__builtin_expect(!!(value != (
long) (long) value), 0)) { long zero = 0; if (0 && __builtin_expect
(!!(value == (long)-1 && PyErr_Occurred()), 0)) return
(long) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23645 } else {
23646 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
23647 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
23648 goto raise_neg_overflow;
23649 }
23650 return (long) val;
23651 }
23652 } else
23653#endif
23654 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
23655 if (is_unsigned) {
23656#if CYTHON_USE_PYLONG_INTERNALS1
23657 const digit* digits = ((PyLongObject*)x)->ob_digit;
23658 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
23659 case 0: return (long) 0;
23660 case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]){ digit value = digits[0]; if (sizeof(long) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (long) value), 0
)) { digit zero = 0; if (0 && __builtin_expect(!!(value
== (digit)-1 && PyErr_Occurred()), 0)) return (long)
-1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23661 case 2:
23662 if (8 * sizeof(long) > 1 * PyLong_SHIFT30) {
23663 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
23664 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(long) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (long) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (long) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23665 } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT30) {
23666 return (long) (((((long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]));
23667 }
23668 }
23669 break;
23670 case 3:
23671 if (8 * sizeof(long) > 2 * PyLong_SHIFT30) {
23672 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
23673 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(long) < sizeof(unsigned long)) { if
(__builtin_expect(!!(value != (unsigned long) (long) value),
0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (long) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23674 } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT30) {
23675 return (long) (((((((long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]));
23676 }
23677 }
23678 break;
23679 case 4:
23680 if (8 * sizeof(long) > 3 * PyLong_SHIFT30) {
23681 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23682 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(long) < sizeof(unsigned long)) { if (__builtin_expect(!!(
value != (unsigned long) (long) value), 0)) { unsigned long zero
= 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (long) -1; if
(is_unsigned && __builtin_expect(!!(value < zero)
, 0)) goto raise_neg_overflow; else goto raise_overflow; } } return
(long) value; }
23683 } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT30) {
23684 return (long) (((((((((long)digits[3]) << PyLong_SHIFT30) | (long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]));
23685 }
23686 }
23687 break;
23688 }
23689#endif
23690#if CYTHON_COMPILING_IN_CPYTHON1
23691 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
23692 goto raise_neg_overflow;
23693 }
23694#else
23695 {
23696 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
23697 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
23698 return (long) -1;
23699 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
23700 goto raise_neg_overflow;
23701 }
23702#endif
23703 if (sizeof(long) <= sizeof(unsigned long)) {
23704 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
long) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (long) value), 0)) { unsigned long zero =
0; if (1 && __builtin_expect(!!(value == (unsigned long
)-1 && PyErr_Occurred()), 0)) return (long) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (long) value; }
23705 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONGlong long)) {
23706 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(long) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (long) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(long) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23707 }
23708 } else {
23709#if CYTHON_USE_PYLONG_INTERNALS1
23710 const digit* digits = ((PyLongObject*)x)->ob_digit;
23711 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
23712 case 0: return (long) 0;
23713 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(long) < sizeof
(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (long) value
), 0)) { sdigit zero = 0; if (0 && __builtin_expect(!
!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(long) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23714 case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(long) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (long) value), 0
)) { digit zero = 0; if (0 && __builtin_expect(!!(value
== (digit)-1 && PyErr_Occurred()), 0)) return (long)
-1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23715 case -2:
23716 if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT30) {
23717 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
23718 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(long) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (long) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (long
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23719 } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT30) {
23720 return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
23721 }
23722 }
23723 break;
23724 case 2:
23725 if (8 * sizeof(long) > 1 * PyLong_SHIFT30) {
23726 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
23727 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(long) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (long) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (long) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23728 } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT30) {
23729 return (long) ((((((long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
23730 }
23731 }
23732 break;
23733 case -3:
23734 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT30) {
23735 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
23736 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(long) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (long) value), 0)) { long zero = 0; if (0
&& __builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (long) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23737 } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT30) {
23738 return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
23739 }
23740 }
23741 break;
23742 case 3:
23743 if (8 * sizeof(long) > 2 * PyLong_SHIFT30) {
23744 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
23745 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(long) < sizeof(unsigned long)) { if
(__builtin_expect(!!(value != (unsigned long) (long) value),
0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (long) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23746 } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT30) {
23747 return (long) ((((((((long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
23748 }
23749 }
23750 break;
23751 case -4:
23752 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT30) {
23753 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23754 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(long) < sizeof(long)) { if (__builtin_expect(!!(value != (
long) (long) value), 0)) { long zero = 0; if (0 && __builtin_expect
(!!(value == (long)-1 && PyErr_Occurred()), 0)) return
(long) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23755 } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT30) {
23756 return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT30) | (long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
23757 }
23758 }
23759 break;
23760 case 4:
23761 if (8 * sizeof(long) > 3 * PyLong_SHIFT30) {
23762 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
23763 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(long) < sizeof(unsigned long)) { if (__builtin_expect(!!(
value != (unsigned long) (long) value), 0)) { unsigned long zero
= 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (long) -1; if
(is_unsigned && __builtin_expect(!!(value < zero)
, 0)) goto raise_neg_overflow; else goto raise_overflow; } } return
(long) value; }
23764 } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT30) {
23765 return (long) ((((((((((long)digits[3]) << PyLong_SHIFT30) | (long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
23766 }
23767 }
23768 break;
23769 }
23770#endif
23771 if (sizeof(long) <= sizeof(long)) {
23772 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(long) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (long) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (long
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23773 } else if (sizeof(long) <= sizeof(PY_LONG_LONGlong long)) {
23774 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(long) <
sizeof(long long)) { if (__builtin_expect(!!(value != (long long
) (long) value), 0)) { long long zero = 0; if (1 && __builtin_expect
(!!(value == (long long)-1 && PyErr_Occurred()), 0)) return
(long) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
23775 }
23776 }
23777 {
23778#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
23779 PyErr_SetString(PyExc_RuntimeError,
23780 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
23781#else
23782 long val;
23783 PyObject *v = __Pyx_PyNumber_Int(x);
23784 #if PY_MAJOR_VERSION2 < 3
23785 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
23786 PyObject *tmp = v;
23787 v = PyNumber_Long(tmp);
23788 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
23789 }
23790 #endif
23791 if (likely(v)__builtin_expect(!!(v), 1)) {
23792 int one = 1; int is_little = (int)*(unsigned char *)&one;
23793 unsigned char *bytes = (unsigned char *)&val;
23794 int ret = _PyLong_AsByteArray((PyLongObject *)v,
23795 bytes, sizeof(val),
23796 is_little, !is_unsigned);
23797 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
23798 if (likely(!ret)__builtin_expect(!!(!ret), 1))
23799 return val;
23800 }
23801#endif
23802 return (long) -1;
23803 }
23804 } else {
23805 long val;
23806 PyObject *tmp = __Pyx_PyNumber_Int(x);
23807 if (!tmp) return (long) -1;
23808 val = __Pyx_PyInt_As_long(tmp);
23809 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
23810 return val;
23811 }
23812raise_overflow:
23813 PyErr_SetString(PyExc_OverflowError,
23814 "value too large to convert to long");
23815 return (long) -1;
23816raise_neg_overflow:
23817 PyErr_SetString(PyExc_OverflowError,
23818 "can't convert negative value to long");
23819 return (long) -1;
23820}
23821
23822static int __Pyx_check_binary_version(void) {
23823 char ctversion[4], rtversion[4];
23824 PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION2, PY_MINOR_VERSION7);
23825 PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
23826 if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
23827 char message[200];
23828 PyOS_snprintf(message, sizeof(message),
23829 "compiletime version %s of module '%.100s' "
23830 "does not match runtime version %s",
23831 ctversion, __Pyx_MODULE_NAME"cephfs", rtversion);
23832 return PyErr_WarnEx(NULL((void*)0), message, 1);
23833 }
23834 return 0;
23835}
23836
23837#ifndef __PYX_HAVE_RT_ImportModule
23838#define __PYX_HAVE_RT_ImportModule
23839static PyObject *__Pyx_ImportModule(const char *name) {
23840 PyObject *py_name = 0;
23841 PyObject *py_module = 0;
23842 py_name = __Pyx_PyIdentifier_FromString(name)PyString_FromString(name);
23843 if (!py_name)
23844 goto bad;
23845 py_module = PyImport_Import(py_name);
23846 Py_DECREF(py_name)do { if ( --((PyObject*)(py_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_name)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(py_name)))); } while (0)
;
23847 return py_module;
23848bad:
23849 Py_XDECREF(py_name)do { if ((py_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_name))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(py_name)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(py_name)))); } while (0); } while (0)
;
23850 return 0;
23851}
23852#endif
23853
23854#ifndef __PYX_HAVE_RT_ImportType
23855#define __PYX_HAVE_RT_ImportType
23856static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
23857 size_t size, int strict)
23858{
23859 PyObject *py_module = 0;
23860 PyObject *result = 0;
23861 PyObject *py_name = 0;
23862 char warning[200];
23863 Py_ssize_t basicsize;
23864#ifdef Py_LIMITED_API
23865 PyObject *py_basicsize;
23866#endif
23867 py_module = __Pyx_ImportModule(module_name);
23868 if (!py_module)
23869 goto bad;
23870 py_name = __Pyx_PyIdentifier_FromString(class_name)PyString_FromString(class_name);
23871 if (!py_name)
23872 goto bad;
23873 result = PyObject_GetAttr(py_module, py_name);
23874 Py_DECREF(py_name)do { if ( --((PyObject*)(py_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_name)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(py_name)))); } while (0)
;
23875 py_name = 0;
23876 Py_DECREF(py_module)do { if ( --((PyObject*)(py_module))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_module)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_module)))); } while (
0)
;
23877 py_module = 0;
23878 if (!result)
23879 goto bad;
23880 if (!PyType_Check(result)((((((PyObject*)(result))->ob_type))->tp_flags & ((
1L<<31))) != 0)
) {
23881 PyErr_Format(PyExc_TypeError,
23882 "%.200s.%.200s is not a type object",
23883 module_name, class_name);
23884 goto bad;
23885 }
23886#ifndef Py_LIMITED_API
23887 basicsize = ((PyTypeObject *)result)->tp_basicsize;
23888#else
23889 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
23890 if (!py_basicsize)
23891 goto bad;
23892 basicsize = PyLong_AsSsize_t(py_basicsize);
23893 Py_DECREF(py_basicsize)do { if ( --((PyObject*)(py_basicsize))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(py_basicsize)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(py_basicsize))));
} while (0)
;
23894 py_basicsize = 0;
23895 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
23896 goto bad;
23897#endif
23898 if (!strict && (size_t)basicsize > size) {
23899 PyOS_snprintf(warning, sizeof(warning),
23900 "%s.%s size changed, may indicate binary incompatibility",
23901 module_name, class_name);
23902 if (PyErr_WarnEx(NULL((void*)0), warning, 0) < 0) goto bad;
23903 }
23904 else if ((size_t)basicsize != size) {
23905 PyErr_Format(PyExc_ValueError,
23906 "%.200s.%.200s has the wrong size, try recompiling",
23907 module_name, class_name);
23908 goto bad;
23909 }
23910 return (PyTypeObject *)result;
23911bad:
23912 Py_XDECREF(py_module)do { if ((py_module) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_module))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(py_module)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(py_module)))); } while (0); } while (0)
;
23913 Py_XDECREF(result)do { if ((result) == ((void*)0)) ; else do { if ( --((PyObject
*)(result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(result)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(result)))); } while (0); } while (0)
;
23914 return NULL((void*)0);
23915}
23916#endif
23917
23918static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
23919 while (t->p) {
23920 #if PY_MAJOR_VERSION2 < 3
23921 if (t->is_unicode) {
23922 *t->p = PyUnicode_DecodeUTF8PyUnicodeUCS4_DecodeUTF8(t->s, t->n - 1, NULL((void*)0));
23923 } else if (t->intern) {
23924 *t->p = PyString_InternFromString(t->s);
23925 } else {
23926 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
23927 }
23928 #else
23929 if (t->is_unicode | t->is_str) {
23930 if (t->intern) {
23931 *t->p = PyUnicode_InternFromString(t->s);
23932 } else if (t->encoding) {
23933 *t->p = PyUnicode_DecodePyUnicodeUCS4_Decode(t->s, t->n - 1, t->encoding, NULL((void*)0));
23934 } else {
23935 *t->p = PyUnicode_FromStringAndSizePyUnicodeUCS4_FromStringAndSize(t->s, t->n - 1);
23936 }
23937 } else {
23938 *t->p = PyBytes_FromStringAndSizePyString_FromStringAndSize(t->s, t->n - 1);
23939 }
23940 #endif
23941 if (!*t->p)
23942 return -1;
23943 ++t;
23944 }
23945 return 0;
23946}
23947
23948static CYTHON_INLINE__inline__ PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
23949 return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str))PyUnicodeUCS4_Decode(c_str, (Py_ssize_t)strlen(c_str), "", ((
void*)0))
;
23950}
23951static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsString(PyObject* o) {
23952 Py_ssize_t ignore;
23953 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
23954}
23955static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23956#if CYTHON_COMPILING_IN_CPYTHON1 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0)
23957 if (
23958#if PY_MAJOR_VERSION2 < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0
23959 __Pyx_sys_getdefaultencoding_not_ascii &&
23960#endif
23961 PyUnicode_Check(o)((((((PyObject*)(o))->ob_type))->tp_flags & ((1L<<
28))) != 0)
) {
23962#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03030000
23963 char* defenc_c;
23964 PyObject* defenc = _PyUnicode_AsDefaultEncodedString_PyUnicodeUCS4_AsDefaultEncodedString(o, NULL((void*)0));
23965 if (!defenc) return NULL((void*)0);
23966 defenc_c = PyBytes_AS_STRING(defenc)(((PyStringObject *)(defenc))->ob_sval);
23967#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0
23968 {
23969 char* end = defenc_c + PyBytes_GET_SIZE(defenc)(((PyVarObject*)(defenc))->ob_size);
23970 char* c;
23971 for (c = defenc_c; c < end; c++) {
23972 if ((unsigned char) (*c) >= 128) {
23973 PyUnicode_AsASCIIStringPyUnicodeUCS4_AsASCIIString(o);
23974 return NULL((void*)0);
23975 }
23976 }
23977 }
23978#endif
23979 *length = PyBytes_GET_SIZE(defenc)(((PyVarObject*)(defenc))->ob_size);
23980 return defenc_c;
23981#else
23982 if (__Pyx_PyUnicode_READY(o)(0) == -1) return NULL((void*)0);
23983#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0
23984 if (PyUnicode_IS_ASCII(o)) {
23985 *length = PyUnicode_GET_LENGTH(o);
23986 return PyUnicode_AsUTF8(o);
23987 } else {
23988 PyUnicode_AsASCIIStringPyUnicodeUCS4_AsASCIIString(o);
23989 return NULL((void*)0);
23990 }
23991#else
23992 return PyUnicode_AsUTF8AndSize(o, length);
23993#endif
23994#endif
23995 } else
23996#endif
23997#if (!CYTHON_COMPILING_IN_PYPY0) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
23998 if (PyByteArray_Check(o)((((PyObject*)(o))->ob_type) == (&PyByteArray_Type) ||
PyType_IsSubtype((((PyObject*)(o))->ob_type), (&PyByteArray_Type
)))
) {
23999 *length = PyByteArray_GET_SIZE(o)(((void) (0)),(((PyVarObject*)(o))->ob_size));
24000 return PyByteArray_AS_STRING(o)(((void) (0)), (((PyVarObject*)(o))->ob_size) ? ((PyByteArrayObject
*)(o))->ob_bytes : _PyByteArray_empty_string)
;
24001 } else
24002#endif
24003 {
24004 char* result;
24005 int r = PyBytes_AsStringAndSizePyString_AsStringAndSize(o, &result, length);
24006 if (unlikely(r < 0)__builtin_expect(!!(r < 0), 0)) {
24007 return NULL((void*)0);
24008 } else {
24009 return result;
24010 }
24011 }
24012}
24013static CYTHON_INLINE__inline__ int __Pyx_PyObject_IsTrue(PyObject* x) {
24014 int is_true = x == Py_True((PyObject *) &_Py_TrueStruct);
24015 if (is_true | (x == Py_False((PyObject *) &_Py_ZeroStruct)) | (x == Py_None(&_Py_NoneStruct))) return is_true;
24016 else return PyObject_IsTrue(x);
24017}
24018static CYTHON_INLINE__inline__ PyObject* __Pyx_PyNumber_Int(PyObject* x) {
24019 PyNumberMethods *m;
24020 const char *name = NULL((void*)0);
24021 PyObject *res = NULL((void*)0);
24022#if PY_MAJOR_VERSION2 < 3
24023 if (PyInt_Check(x)((((x)->ob_type)->tp_flags & ((1L<<23))) != 0
)
|| PyLong_Check(x)((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<<
24))) != 0)
)
24024#else
24025 if (PyLong_Check(x)((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<<
24))) != 0)
)
24026#endif
24027 return __Pyx_NewRef(x)(( ((PyObject*)(x))->ob_refcnt++), x);
24028 m = Py_TYPE(x)(((PyObject*)(x))->ob_type)->tp_as_number;
24029#if PY_MAJOR_VERSION2 < 3
24030 if (m && m->nb_int) {
24031 name = "int";
24032 res = PyNumber_Int(x);
24033 }
24034 else if (m && m->nb_long) {
24035 name = "long";
24036 res = PyNumber_Long(x);
24037 }
24038#else
24039 if (m && m->nb_int) {
24040 name = "int";
24041 res = PyNumber_Long(x);
24042 }
24043#endif
24044 if (res) {
24045#if PY_MAJOR_VERSION2 < 3
24046 if (!PyInt_Check(res)((((res)->ob_type)->tp_flags & ((1L<<23))) !=
0)
&& !PyLong_Check(res)((((((PyObject*)(res))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
24047#else
24048 if (!PyLong_Check(res)((((((PyObject*)(res))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
24049#endif
24050 PyErr_Format(PyExc_TypeError,
24051 "__%.4s__ returned non-%.4s (type %.200s)",
24052 name, name, Py_TYPE(res)(((PyObject*)(res))->ob_type)->tp_name);
24053 Py_DECREF(res)do { if ( --((PyObject*)(res))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(res)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(res)))); } while (0)
;
24054 return NULL((void*)0);
24055 }
24056 }
24057 else if (!PyErr_Occurred()) {
24058 PyErr_SetString(PyExc_TypeError,
24059 "an integer is required");
24060 }
24061 return res;
24062}
24063static CYTHON_INLINE__inline__ Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
24064 Py_ssize_t ival;
24065 PyObject *x;
24066#if PY_MAJOR_VERSION2 < 3
24067 if (likely(PyInt_CheckExact(b))__builtin_expect(!!(((b)->ob_type == &PyInt_Type)), 1)) {
24068 if (sizeof(Py_ssize_t) >= sizeof(long))
24069 return PyInt_AS_LONG(b)(((PyIntObject *)(b))->ob_ival);
24070 else
24071 return PyInt_AsSsize_t(x);
24072 }
24073#endif
24074 if (likely(PyLong_CheckExact(b))__builtin_expect(!!(((((PyObject*)(b))->ob_type) == &PyLong_Type
)), 1)
) {
24075 #if CYTHON_USE_PYLONG_INTERNALS1
24076 const digit* digits = ((PyLongObject*)b)->ob_digit;
24077 const Py_ssize_t size = Py_SIZE(b)(((PyVarObject*)(b))->ob_size);
24078 if (likely(__Pyx_sst_abs(size) <= 1)__builtin_expect(!!(labs(size) <= 1), 1)) {
24079 ival = likely(size)__builtin_expect(!!(size), 1) ? digits[0] : 0;
24080 if (size == -1) ival = -ival;
24081 return ival;
24082 } else {
24083 switch (size) {
24084 case 2:
24085 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT30) {
24086 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
24087 }
24088 break;
24089 case -2:
24090 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT30) {
24091 return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
24092 }
24093 break;
24094 case 3:
24095 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT30) {
24096 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
24097 }
24098 break;
24099 case -3:
24100 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT30) {
24101 return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
24102 }
24103 break;
24104 case 4:
24105 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT30) {
24106 return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT30) | (size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
24107 }
24108 break;
24109 case -4:
24110 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT30) {
24111 return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT30) | (size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
24112 }
24113 break;
24114 }
24115 }
24116 #endif
24117 return PyLong_AsSsize_t(b);
24118 }
24119 x = PyNumber_Index(b);
24120 if (!x) return -1;
24121 ival = PyInt_AsSsize_t(x);
24122 Py_DECREF(x)do { if ( --((PyObject*)(x))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(x)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(x)))); } while (0)
;
24123 return ival;
24124}
24125static CYTHON_INLINE__inline__ PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
24126 return PyInt_FromSize_t(ival);
24127}
24128
24129
24130#endif /* Py_PYTHON_H */