| File: | home/bhubbard/working/src/ceph/build/src/pybind/rgw2/rgw.c |
| Warning: | line 5600, column 123 Value stored to '__pyx_filename' is never read |
[?] 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 | "rados", |
| 38 | "rgw", |
| 39 | "pthread", |
| 40 | "dl", |
| 41 | "util", |
| 42 | "m" |
| 43 | ], |
| 44 | "library_dirs": [ |
| 45 | "/usr/lib", |
| 46 | "/usr/lib/python2.7/config-x86_64-linux-gnu" |
| 47 | ] |
| 48 | } |
| 49 | } |
| 50 | END: Cython Metadata */ |
| 51 | |
| 52 | #define PY_SSIZE_T_CLEAN |
| 53 | #include "Python.h" |
| 54 | #ifndef Py_PYTHON_H |
| 55 | #error Python headers needed to compile C extensions, please install development version of Python. |
| 56 | #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) |
| 57 | #error Cython requires Python 2.6+ or Python 3.2+. |
| 58 | #else |
| 59 | #define CYTHON_ABI"0_23_4" "0_23_4" |
| 60 | #include <stddef.h> |
| 61 | #ifndef offsetof |
| 62 | #define offsetof(type, member)__builtin_offsetof(type, member) ( (size_t) & ((type*)0) -> member ) |
| 63 | #endif |
| 64 | #if !defined(WIN32) && !defined(MS_WINDOWS) |
| 65 | #ifndef __stdcall |
| 66 | #define __stdcall |
| 67 | #endif |
| 68 | #ifndef __cdecl |
| 69 | #define __cdecl |
| 70 | #endif |
| 71 | #ifndef __fastcall |
| 72 | #define __fastcall |
| 73 | #endif |
| 74 | #endif |
| 75 | #ifndef DL_IMPORT |
| 76 | #define DL_IMPORT(t)t t |
| 77 | #endif |
| 78 | #ifndef DL_EXPORT |
| 79 | #define DL_EXPORT(t)t t |
| 80 | #endif |
| 81 | #ifndef PY_LONG_LONGlong long |
| 82 | #define PY_LONG_LONGlong long LONG_LONG |
| 83 | #endif |
| 84 | #ifndef Py_HUGE_VAL(__builtin_huge_val()) |
| 85 | #define Py_HUGE_VAL(__builtin_huge_val()) HUGE_VAL(__builtin_huge_val()) |
| 86 | #endif |
| 87 | #ifdef PYPY_VERSION |
| 88 | #define CYTHON_COMPILING_IN_PYPY0 1 |
| 89 | #define CYTHON_COMPILING_IN_CPYTHON1 0 |
| 90 | #else |
| 91 | #define CYTHON_COMPILING_IN_PYPY0 0 |
| 92 | #define CYTHON_COMPILING_IN_CPYTHON1 1 |
| 93 | #endif |
| 94 | #if !defined(CYTHON_USE_PYLONG_INTERNALS1) && CYTHON_COMPILING_IN_CPYTHON1 && PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x02070000 |
| 95 | #define CYTHON_USE_PYLONG_INTERNALS1 1 |
| 96 | #endif |
| 97 | #if CYTHON_COMPILING_IN_PYPY0 && PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) < 0x02070600 && !defined(Py_OptimizeFlag) |
| 98 | #define Py_OptimizeFlag 0 |
| 99 | #endif |
| 100 | #define __PYX_BUILD_PY_SSIZE_T"n" "n" |
| 101 | #define CYTHON_FORMAT_SSIZE_T"z" "z" |
| 102 | #if PY_MAJOR_VERSION2 < 3 |
| 103 | #define __Pyx_BUILTIN_MODULE_NAME"__builtin__" "__builtin__" |
| 104 | #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)\ |
| 105 | PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) |
| 106 | #define __Pyx_DefaultClassTypePyClass_Type PyClass_Type |
| 107 | #else |
| 108 | #define __Pyx_BUILTIN_MODULE_NAME"__builtin__" "builtins" |
| 109 | #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)\ |
| 110 | PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) |
| 111 | #define __Pyx_DefaultClassTypePyClass_Type PyType_Type |
| 112 | #endif |
| 113 | #ifndef Py_TPFLAGS_CHECKTYPES(1L<<4) |
| 114 | #define Py_TPFLAGS_CHECKTYPES(1L<<4) 0 |
| 115 | #endif |
| 116 | #ifndef Py_TPFLAGS_HAVE_INDEX(1L<<17) |
| 117 | #define Py_TPFLAGS_HAVE_INDEX(1L<<17) 0 |
| 118 | #endif |
| 119 | #ifndef Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21) |
| 120 | #define Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21) 0 |
| 121 | #endif |
| 122 | #ifndef Py_TPFLAGS_HAVE_FINALIZE0 |
| 123 | #define Py_TPFLAGS_HAVE_FINALIZE0 0 |
| 124 | #endif |
| 125 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) > 0x03030000 && defined(PyUnicode_KIND) |
| 126 | #define CYTHON_PEP393_ENABLED0 1 |
| 127 | #define __Pyx_PyUnicode_READY(op)(0) (likely(PyUnicode_IS_READY(op))__builtin_expect(!!(PyUnicode_IS_READY(op)), 1) ?\ |
| 128 | 0 : _PyUnicode_Ready((PyObject *)(op))) |
| 129 | #define __Pyx_PyUnicode_GET_LENGTH(u)(((PyUnicodeObject *)(u))->length) PyUnicode_GET_LENGTH(u) |
| 130 | #define __Pyx_PyUnicode_READ_CHAR(u, i)((Py_UCS4)((((PyUnicodeObject *)(u))->str)[i])) PyUnicode_READ_CHAR(u, i) |
| 131 | #define __Pyx_PyUnicode_KIND(u)(sizeof(Py_UNICODE)) PyUnicode_KIND(u) |
| 132 | #define __Pyx_PyUnicode_DATA(u)((void*)(((PyUnicodeObject *)(u))->str)) PyUnicode_DATA(u) |
| 133 | #define __Pyx_PyUnicode_READ(k, d, i)((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) PyUnicode_READ(k, d, i) |
| 134 | #else |
| 135 | #define CYTHON_PEP393_ENABLED0 0 |
| 136 | #define __Pyx_PyUnicode_READY(op)(0) (0) |
| 137 | #define __Pyx_PyUnicode_GET_LENGTH(u)(((PyUnicodeObject *)(u))->length) PyUnicode_GET_SIZE(u)(((PyUnicodeObject *)(u))->length) |
| 138 | #define __Pyx_PyUnicode_READ_CHAR(u, i)((Py_UCS4)((((PyUnicodeObject *)(u))->str)[i])) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)(((PyUnicodeObject *)(u))->str)[i])) |
| 139 | #define __Pyx_PyUnicode_KIND(u)(sizeof(Py_UNICODE)) (sizeof(Py_UNICODE)) |
| 140 | #define __Pyx_PyUnicode_DATA(u)((void*)(((PyUnicodeObject *)(u))->str)) ((void*)PyUnicode_AS_UNICODE(u)(((PyUnicodeObject *)(u))->str)) |
| 141 | #define __Pyx_PyUnicode_READ(k, d, i)((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) |
| 142 | #endif |
| 143 | #if CYTHON_COMPILING_IN_PYPY0 |
| 144 | #define __Pyx_PyUnicode_Concat(a, b)PyUnicodeUCS4_Concat(a, b) PyNumber_Add(a, b) |
| 145 | #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) |
| 146 | #else |
| 147 | #define __Pyx_PyUnicode_Concat(a, b)PyUnicodeUCS4_Concat(a, b) PyUnicode_ConcatPyUnicodeUCS4_Concat(a, b) |
| 148 | #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)) ?\ |
| 149 | PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)PyUnicodeUCS4_Concat(a, b)) |
| 150 | #endif |
| 151 | #if CYTHON_COMPILING_IN_PYPY0 && !defined(PyUnicode_ContainsPyUnicodeUCS4_Contains) |
| 152 | #define PyUnicode_ContainsPyUnicodeUCS4_Contains(u, s) PySequence_Contains(u, s) |
| 153 | #endif |
| 154 | #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)) |
| 155 | #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)) |
| 156 | #if PY_MAJOR_VERSION2 >= 3 |
| 157 | #define __Pyx_PyString_Format(a, b)PyString_Format(a, b) PyUnicode_FormatPyUnicodeUCS4_Format(a, b) |
| 158 | #else |
| 159 | #define __Pyx_PyString_Format(a, b)PyString_Format(a, b) PyString_Format(a, b) |
| 160 | #endif |
| 161 | #if PY_MAJOR_VERSION2 >= 3 |
| 162 | #define PyBaseString_Type PyUnicode_Type |
| 163 | #define PyStringObject PyUnicodeObject |
| 164 | #define PyString_Type PyUnicode_Type |
| 165 | #define PyString_Check PyUnicode_Check |
| 166 | #define PyString_CheckExact PyUnicode_CheckExact |
| 167 | #endif |
| 168 | #if PY_MAJOR_VERSION2 >= 3 |
| 169 | #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) |
| 170 | #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) |
| 171 | #else |
| 172 | #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)) |
| 173 | #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)) |
| 174 | #endif |
| 175 | #ifndef PySet_CheckExact |
| 176 | #define PySet_CheckExact(obj)((((PyObject*)(obj))->ob_type) == &PySet_Type) (Py_TYPE(obj)(((PyObject*)(obj))->ob_type) == &PySet_Type) |
| 177 | #endif |
| 178 | #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))) |
| 179 | #if PY_MAJOR_VERSION2 >= 3 |
| 180 | #define PyIntObject PyLongObject |
| 181 | #define PyInt_Type PyLong_Type |
| 182 | #define PyInt_Check(op)((((op)->ob_type)->tp_flags & ((1L<<23))) != 0 ) PyLong_Check(op)((((((PyObject*)(op))->ob_type))->tp_flags & ((1L<< 24))) != 0) |
| 183 | #define PyInt_CheckExact(op)((op)->ob_type == &PyInt_Type) PyLong_CheckExact(op)((((PyObject*)(op))->ob_type) == &PyLong_Type) |
| 184 | #define PyInt_FromString PyLong_FromString |
| 185 | #define PyInt_FromUnicode PyLong_FromUnicode |
| 186 | #define PyInt_FromLong PyLong_FromLong |
| 187 | #define PyInt_FromSize_t PyLong_FromSize_t |
| 188 | #define PyInt_FromSsize_t PyLong_FromSsize_t |
| 189 | #define PyInt_AsLong PyLong_AsLong |
| 190 | #define PyInt_AS_LONG PyLong_AS_LONG |
| 191 | #define PyInt_AsSsize_t PyLong_AsSsize_t |
| 192 | #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask |
| 193 | #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask |
| 194 | #define PyNumber_Int PyNumber_Long |
| 195 | #endif |
| 196 | #if PY_MAJOR_VERSION2 >= 3 |
| 197 | #define PyBoolObject PyLongObject |
| 198 | #endif |
| 199 | #if PY_MAJOR_VERSION2 >= 3 && CYTHON_COMPILING_IN_PYPY0 |
| 200 | #ifndef PyUnicode_InternFromString |
| 201 | #define PyUnicode_InternFromString(s) PyUnicode_FromStringPyUnicodeUCS4_FromString(s) |
| 202 | #endif |
| 203 | #endif |
| 204 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) < 0x030200A4 |
| 205 | typedef long Py_hash_t; |
| 206 | #define __Pyx_PyInt_FromHash_tPyInt_FromLong PyInt_FromLong |
| 207 | #define __Pyx_PyInt_AsHash_tPyInt_AsLong PyInt_AsLong |
| 208 | #else |
| 209 | #define __Pyx_PyInt_FromHash_tPyInt_FromLong PyInt_FromSsize_t |
| 210 | #define __Pyx_PyInt_AsHash_tPyInt_AsLong PyInt_AsSsize_t |
| 211 | #endif |
| 212 | #if PY_MAJOR_VERSION2 >= 3 |
| 213 | #define __Pyx_PyMethod_New(func, self, klass)PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) |
| 214 | #else |
| 215 | #define __Pyx_PyMethod_New(func, self, klass)PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) |
| 216 | #endif |
| 217 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030500B1 |
| 218 | #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods |
| 219 | #define __Pyx_PyType_AsAsync(obj)((void*)0) (Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_as_async) |
| 220 | #elif CYTHON_COMPILING_IN_CPYTHON1 && PY_MAJOR_VERSION2 >= 3 |
| 221 | typedef struct { |
| 222 | unaryfunc am_await; |
| 223 | unaryfunc am_aiter; |
| 224 | unaryfunc am_anext; |
| 225 | } __Pyx_PyAsyncMethodsStruct; |
| 226 | #define __Pyx_PyType_AsAsync(obj)((void*)0) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_reserved)) |
| 227 | #else |
| 228 | #define __Pyx_PyType_AsAsync(obj)((void*)0) NULL((void*)0) |
| 229 | #endif |
| 230 | #ifndef CYTHON_RESTRICT__restrict__ |
| 231 | #if defined(__GNUC__4) |
| 232 | #define CYTHON_RESTRICT__restrict__ __restrict__ |
| 233 | #elif defined(_MSC_VER) && _MSC_VER >= 1400 |
| 234 | #define CYTHON_RESTRICT__restrict__ __restrict |
| 235 | #elif defined (__STDC_VERSION__199901L) && __STDC_VERSION__199901L >= 199901L |
| 236 | #define CYTHON_RESTRICT__restrict__ restrict |
| 237 | #else |
| 238 | #define CYTHON_RESTRICT__restrict__ |
| 239 | #endif |
| 240 | #endif |
| 241 | #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)) |
| 242 | |
| 243 | #ifndef CYTHON_INLINE__inline__ |
| 244 | #if defined(__GNUC__4) |
| 245 | #define CYTHON_INLINE__inline__ __inline__ |
| 246 | #elif defined(_MSC_VER) |
| 247 | #define CYTHON_INLINE__inline__ __inline |
| 248 | #elif defined (__STDC_VERSION__199901L) && __STDC_VERSION__199901L >= 199901L |
| 249 | #define CYTHON_INLINE__inline__ inline |
| 250 | #else |
| 251 | #define CYTHON_INLINE__inline__ |
| 252 | #endif |
| 253 | #endif |
| 254 | |
| 255 | #if defined(WIN32) || defined(MS_WINDOWS) |
| 256 | #define _USE_MATH_DEFINES |
| 257 | #endif |
| 258 | #include <math.h> |
| 259 | #ifdef NAN(__builtin_nanf ("")) |
| 260 | #define __PYX_NAN()((float) (__builtin_nanf (""))) ((float) NAN(__builtin_nanf (""))) |
| 261 | #else |
| 262 | static CYTHON_INLINE__inline__ float __PYX_NAN()((float) (__builtin_nanf (""))) { |
| 263 | float value; |
| 264 | memset(&value, 0xFF, sizeof(value)); |
| 265 | return value; |
| 266 | } |
| 267 | #endif |
| 268 | |
| 269 | |
| 270 | #if PY_MAJOR_VERSION2 >= 3 |
| 271 | #define __Pyx_PyNumber_Divide(x,y)PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) |
| 272 | #define __Pyx_PyNumber_InPlaceDivide(x,y)PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) |
| 273 | #else |
| 274 | #define __Pyx_PyNumber_Divide(x,y)PyNumber_Divide(x,y) PyNumber_Divide(x,y) |
| 275 | #define __Pyx_PyNumber_InPlaceDivide(x,y)PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) |
| 276 | #endif |
| 277 | |
| 278 | #ifndef __PYX_EXTERN_Cextern |
| 279 | #ifdef __cplusplus |
| 280 | #define __PYX_EXTERN_Cextern extern "C" |
| 281 | #else |
| 282 | #define __PYX_EXTERN_Cextern extern |
| 283 | #endif |
| 284 | #endif |
| 285 | |
| 286 | #define __PYX_HAVE__rgw |
| 287 | #define __PYX_HAVE_API__rgw |
| 288 | #include "string.h" |
| 289 | #include "stdio.h" |
| 290 | #include "pythread.h" |
| 291 | #include "stdint.h" |
| 292 | #include "stdlib.h" |
| 293 | #include "rados/librados.h" |
| 294 | #include "time.h" |
| 295 | #include "sys/stat.h" |
| 296 | #include "rados/librgw.h" |
| 297 | #include "rados/rgw_file.h" |
| 298 | #include "pystate.h" |
| 299 | #ifdef _OPENMP |
| 300 | #include <omp.h> |
| 301 | #endif /* _OPENMP */ |
| 302 | |
| 303 | #ifdef PYREX_WITHOUT_ASSERTIONS |
| 304 | #define CYTHON_WITHOUT_ASSERTIONS |
| 305 | #endif |
| 306 | |
| 307 | #ifndef CYTHON_UNUSED__attribute__ ((__unused__)) |
| 308 | # if defined(__GNUC__4) |
| 309 | # if !(defined(__cplusplus)) || (__GNUC__4 > 3 || (__GNUC__4 == 3 && __GNUC_MINOR__2 >= 4)) |
| 310 | # define CYTHON_UNUSED__attribute__ ((__unused__)) __attribute__ ((__unused__)) |
| 311 | # else |
| 312 | # define CYTHON_UNUSED__attribute__ ((__unused__)) |
| 313 | # endif |
| 314 | # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) |
| 315 | # define CYTHON_UNUSED__attribute__ ((__unused__)) __attribute__ ((__unused__)) |
| 316 | # else |
| 317 | # define CYTHON_UNUSED__attribute__ ((__unused__)) |
| 318 | # endif |
| 319 | #endif |
| 320 | #ifndef CYTHON_NCP_UNUSED |
| 321 | # if CYTHON_COMPILING_IN_CPYTHON1 |
| 322 | # define CYTHON_NCP_UNUSED |
| 323 | # else |
| 324 | # define CYTHON_NCP_UNUSED CYTHON_UNUSED__attribute__ ((__unused__)) |
| 325 | # endif |
| 326 | #endif |
| 327 | typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; |
| 328 | const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; |
| 329 | |
| 330 | #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 0 |
| 331 | #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0 0 |
| 332 | #define __PYX_DEFAULT_STRING_ENCODING"" "" |
| 333 | #define __Pyx_PyObject_FromStringPyString_FromString __Pyx_PyBytes_FromStringPyString_FromString |
| 334 | #define __Pyx_PyObject_FromStringAndSizePyString_FromStringAndSize __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize |
| 335 | #define __Pyx_uchar_cast(c)((unsigned char)c) ((unsigned char)c) |
| 336 | #define __Pyx_long_cast(x)((long)x) ((long)x) |
| 337 | #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))) ) (\ |
| 338 | (sizeof(type) < sizeof(Py_ssize_t)) ||\ |
| 339 | (sizeof(type) > sizeof(Py_ssize_t) &&\ |
| 340 | 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) |
| 341 | 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 | (!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) |
| 343 | 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 | (sizeof(type) == sizeof(Py_ssize_t) &&\ |
| 345 | (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) |
| 346 | 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 | #if defined (__cplusplus) && __cplusplus >= 201103L |
| 348 | #include <cstdlib> |
| 349 | #define __Pyx_sst_abs(value)labs(value) std::abs(value) |
| 350 | #elif SIZEOF_INT4 >= SIZEOF_SIZE_T8 |
| 351 | #define __Pyx_sst_abs(value)labs(value) abs(value) |
| 352 | #elif SIZEOF_LONG8 >= SIZEOF_SIZE_T8 |
| 353 | #define __Pyx_sst_abs(value)labs(value) labs(value) |
| 354 | #elif defined (_MSC_VER) && defined (_M_X64) |
| 355 | #define __Pyx_sst_abs(value)labs(value) _abs64(value) |
| 356 | #elif defined (__STDC_VERSION__199901L) && __STDC_VERSION__199901L >= 199901L |
| 357 | #define __Pyx_sst_abs(value)labs(value) llabs(value) |
| 358 | #elif defined (__GNUC__4) |
| 359 | #define __Pyx_sst_abs(value)labs(value) __builtin_llabs(value) |
| 360 | #else |
| 361 | #define __Pyx_sst_abs(value)labs(value) ((value<0) ? -value : value) |
| 362 | #endif |
| 363 | static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsString(PyObject*); |
| 364 | static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); |
| 365 | #define __Pyx_PyByteArray_FromString(s)PyByteArray_FromStringAndSize((const char*)s, strlen((const char *)s)) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) |
| 366 | #define __Pyx_PyByteArray_FromStringAndSize(s, l)PyByteArray_FromStringAndSize((const char*)s, l) PyByteArray_FromStringAndSize((const char*)s, l) |
| 367 | #define __Pyx_PyBytes_FromStringPyString_FromString PyBytes_FromStringPyString_FromString |
| 368 | #define __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize PyBytes_FromStringAndSizePyString_FromStringAndSize |
| 369 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyUnicode_FromString(const char*); |
| 370 | #if PY_MAJOR_VERSION2 < 3 |
| 371 | #define __Pyx_PyStr_FromStringPyString_FromString __Pyx_PyBytes_FromStringPyString_FromString |
| 372 | #define __Pyx_PyStr_FromStringAndSizePyString_FromStringAndSize __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize |
| 373 | #else |
| 374 | #define __Pyx_PyStr_FromStringPyString_FromString __Pyx_PyUnicode_FromString |
| 375 | #define __Pyx_PyStr_FromStringAndSizePyString_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize |
| 376 | #endif |
| 377 | #define __Pyx_PyObject_AsSString(s)((signed char*) __Pyx_PyObject_AsString(s)) ((signed char*) __Pyx_PyObject_AsString(s)) |
| 378 | #define __Pyx_PyObject_AsUString(s)((unsigned char*) __Pyx_PyObject_AsString(s)) ((unsigned char*) __Pyx_PyObject_AsString(s)) |
| 379 | #define __Pyx_PyObject_FromCString(s)PyString_FromString((const char*)s) __Pyx_PyObject_FromStringPyString_FromString((const char*)s) |
| 380 | #define __Pyx_PyBytes_FromCString(s)PyString_FromString((const char*)s) __Pyx_PyBytes_FromStringPyString_FromString((const char*)s) |
| 381 | #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)) |
| 382 | #define __Pyx_PyStr_FromCString(s)PyString_FromString((const char*)s) __Pyx_PyStr_FromStringPyString_FromString((const char*)s) |
| 383 | #define __Pyx_PyUnicode_FromCString(s)__Pyx_PyUnicode_FromString((const char*)s) __Pyx_PyUnicode_FromString((const char*)s) |
| 384 | #if PY_MAJOR_VERSION2 < 3 |
| 385 | static CYTHON_INLINE__inline__ size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) |
| 386 | { |
| 387 | const Py_UNICODE *u_end = u; |
| 388 | while (*u_end++) ; |
| 389 | return (size_t)(u_end - u - 1); |
| 390 | } |
| 391 | #else |
| 392 | #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen |
| 393 | #endif |
| 394 | #define __Pyx_PyUnicode_FromUnicode(u)PyUnicodeUCS4_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) PyUnicode_FromUnicodePyUnicodeUCS4_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) |
| 395 | #define __Pyx_PyUnicode_FromUnicodeAndLengthPyUnicodeUCS4_FromUnicode PyUnicode_FromUnicodePyUnicodeUCS4_FromUnicode |
| 396 | #define __Pyx_PyUnicode_AsUnicodePyUnicodeUCS4_AsUnicode PyUnicode_AsUnicodePyUnicodeUCS4_AsUnicode |
| 397 | #define __Pyx_NewRef(obj)(( ((PyObject*)(obj))->ob_refcnt++), obj) (Py_INCREF(obj)( ((PyObject*)(obj))->ob_refcnt++), obj) |
| 398 | #define __Pyx_Owned_Py_None(b)(( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (& _Py_NoneStruct)) __Pyx_NewRef(Py_None)(( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (& _Py_NoneStruct)) |
| 399 | #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))) |
| 400 | static CYTHON_INLINE__inline__ int __Pyx_PyObject_IsTrue(PyObject*); |
| 401 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyNumber_Int(PyObject* x); |
| 402 | static CYTHON_INLINE__inline__ Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); |
| 403 | static CYTHON_INLINE__inline__ PyObject * __Pyx_PyInt_FromSize_t(size_t); |
| 404 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 405 | #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)) |
| 406 | #else |
| 407 | #define __pyx_PyFloat_AsDouble(x)(((((PyObject*)(x))->ob_type) == &PyFloat_Type) ? (((PyFloatObject *)(x))->ob_fval) : PyFloat_AsDouble(x)) PyFloat_AsDouble(x) |
| 408 | #endif |
| 409 | #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))) |
| 410 | #if PY_MAJOR_VERSION2 < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 |
| 411 | static int __Pyx_sys_getdefaultencoding_not_ascii; |
| 412 | static int __Pyx_init_sys_getdefaultencoding_params(void) { |
| 413 | PyObject* sys; |
| 414 | PyObject* default_encoding = NULL((void*)0); |
| 415 | PyObject* ascii_chars_u = NULL((void*)0); |
| 416 | PyObject* ascii_chars_b = NULL((void*)0); |
| 417 | const char* default_encoding_c; |
| 418 | sys = PyImport_ImportModule("sys"); |
| 419 | if (!sys) goto bad; |
| 420 | default_encoding = PyObject_CallMethod_PyObject_CallMethod_SizeT(sys, (char*) "getdefaultencoding", NULL((void*)0)); |
| 421 | Py_DECREF(sys)do { if ( --((PyObject*)(sys))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(sys)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(sys)))); } while (0); |
| 422 | if (!default_encoding) goto bad; |
| 423 | default_encoding_c = PyBytes_AsStringPyString_AsString(default_encoding); |
| 424 | if (!default_encoding_c) goto bad; |
| 425 | 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) { |
| 426 | __Pyx_sys_getdefaultencoding_not_ascii = 0; |
| 427 | } else { |
| 428 | char ascii_chars[128]; |
| 429 | int c; |
| 430 | for (c = 0; c < 128; c++) { |
| 431 | ascii_chars[c] = c; |
| 432 | } |
| 433 | __Pyx_sys_getdefaultencoding_not_ascii = 1; |
| 434 | ascii_chars_u = PyUnicode_DecodeASCIIPyUnicodeUCS4_DecodeASCII(ascii_chars, 128, NULL((void*)0)); |
| 435 | if (!ascii_chars_u) goto bad; |
| 436 | ascii_chars_b = PyUnicode_AsEncodedStringPyUnicodeUCS4_AsEncodedString(ascii_chars_u, default_encoding_c, NULL((void*)0)); |
| 437 | 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) { |
| 438 | PyErr_Format( |
| 439 | PyExc_ValueError, |
| 440 | "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", |
| 441 | default_encoding_c); |
| 442 | goto bad; |
| 443 | } |
| 444 | 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); |
| 445 | 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); |
| 446 | } |
| 447 | 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); |
| 448 | return 0; |
| 449 | bad: |
| 450 | 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); |
| 451 | 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); |
| 452 | 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); |
| 453 | return -1; |
| 454 | } |
| 455 | #endif |
| 456 | #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0 && PY_MAJOR_VERSION2 >= 3 |
| 457 | #define __Pyx_PyUnicode_FromStringAndSize(c_str, size)PyUnicodeUCS4_Decode(c_str, size, "", ((void*)0)) PyUnicode_DecodeUTF8PyUnicodeUCS4_DecodeUTF8(c_str, size, NULL((void*)0)) |
| 458 | #else |
| 459 | #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)) |
| 460 | #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0 |
| 461 | static char* __PYX_DEFAULT_STRING_ENCODING""; |
| 462 | static int __Pyx_init_sys_getdefaultencoding_params(void) { |
| 463 | PyObject* sys; |
| 464 | PyObject* default_encoding = NULL((void*)0); |
| 465 | char* default_encoding_c; |
| 466 | sys = PyImport_ImportModule("sys"); |
| 467 | if (!sys) goto bad; |
| 468 | default_encoding = PyObject_CallMethod_PyObject_CallMethod_SizeT(sys, (char*) (const char*) "getdefaultencoding", NULL((void*)0)); |
| 469 | Py_DECREF(sys)do { if ( --((PyObject*)(sys))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(sys)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(sys)))); } while (0); |
| 470 | if (!default_encoding) goto bad; |
| 471 | default_encoding_c = PyBytes_AsStringPyString_AsString(default_encoding); |
| 472 | if (!default_encoding_c) goto bad; |
| 473 | __PYX_DEFAULT_STRING_ENCODING"" = (char*) malloc(strlen(default_encoding_c)); |
| 474 | if (!__PYX_DEFAULT_STRING_ENCODING"") goto bad; |
| 475 | strcpy(__PYX_DEFAULT_STRING_ENCODING"", default_encoding_c); |
| 476 | 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); |
| 477 | return 0; |
| 478 | bad: |
| 479 | 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); |
| 480 | return -1; |
| 481 | } |
| 482 | #endif |
| 483 | #endif |
| 484 | |
| 485 | |
| 486 | /* Test for GCC > 2.95 */ |
| 487 | #if defined(__GNUC__4) && (__GNUC__4 > 2 || (__GNUC__4 == 2 && (__GNUC_MINOR__2 > 95))) |
| 488 | #define likely(x)__builtin_expect(!!(x), 1) __builtin_expect(!!(x), 1) |
| 489 | #define unlikely(x)__builtin_expect(!!(x), 0) __builtin_expect(!!(x), 0) |
| 490 | #else /* !__GNUC__ or GCC < 2.95 */ |
| 491 | #define likely(x)__builtin_expect(!!(x), 1) (x) |
| 492 | #define unlikely(x)__builtin_expect(!!(x), 0) (x) |
| 493 | #endif /* __GNUC__ */ |
| 494 | |
| 495 | static PyObject *__pyx_m; |
| 496 | static PyObject *__pyx_d; |
| 497 | static PyObject *__pyx_b; |
| 498 | static PyObject *__pyx_empty_tuple; |
| 499 | static PyObject *__pyx_empty_bytes; |
| 500 | static int __pyx_lineno; |
| 501 | static int __pyx_clineno = 0; |
| 502 | static const char * __pyx_cfilenm= __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/rgw2/rgw.c"; |
| 503 | static const char *__pyx_filename; |
| 504 | |
| 505 | |
| 506 | static const char *__pyx_f[] = { |
| 507 | "rgw.pyx", |
| 508 | "array.pxd", |
| 509 | "stringsource", |
| 510 | "type.pxd", |
| 511 | "bool.pxd", |
| 512 | "complex.pxd", |
| 513 | "rados.pxd", |
| 514 | }; |
| 515 | struct __pyx_memoryview_obj; |
| 516 | typedef struct { |
| 517 | struct __pyx_memoryview_obj *memview; |
| 518 | char *data; |
| 519 | Py_ssize_t shape[8]; |
| 520 | Py_ssize_t strides[8]; |
| 521 | Py_ssize_t suboffsets[8]; |
| 522 | } __Pyx_memviewslice; |
| 523 | |
| 524 | #define IS_UNSIGNED(type)(((type) -1) > 0) (((type) -1) > 0) |
| 525 | struct __Pyx_StructField_; |
| 526 | #define __PYX_BUF_FLAGS_PACKED_STRUCT(1 << 0) (1 << 0) |
| 527 | typedef struct { |
| 528 | const char* name; |
| 529 | struct __Pyx_StructField_* fields; |
| 530 | size_t size; |
| 531 | size_t arraysize[8]; |
| 532 | int ndim; |
| 533 | char typegroup; |
| 534 | char is_unsigned; |
| 535 | int flags; |
| 536 | } __Pyx_TypeInfo; |
| 537 | typedef struct __Pyx_StructField_ { |
| 538 | __Pyx_TypeInfo* type; |
| 539 | const char* name; |
| 540 | size_t offset; |
| 541 | } __Pyx_StructField; |
| 542 | typedef struct { |
| 543 | __Pyx_StructField* field; |
| 544 | size_t parent_offset; |
| 545 | } __Pyx_BufFmt_StackElem; |
| 546 | typedef struct { |
| 547 | __Pyx_StructField root; |
| 548 | __Pyx_BufFmt_StackElem* head; |
| 549 | size_t fmt_offset; |
| 550 | size_t new_count, enc_count; |
| 551 | size_t struct_alignment; |
| 552 | int is_complex; |
| 553 | char enc_type; |
| 554 | char new_packmode; |
| 555 | char enc_packmode; |
| 556 | char is_valid_array; |
| 557 | } __Pyx_BufFmt_Context; |
| 558 | |
| 559 | #include <pythread.h> |
| 560 | #ifndef CYTHON_ATOMICS1 |
| 561 | #define CYTHON_ATOMICS1 1 |
| 562 | #endif |
| 563 | #define __pyx_atomic_int_typeint int |
| 564 | #if CYTHON_ATOMICS1 && __GNUC__4 >= 4 && (__GNUC_MINOR__2 > 1 ||\ |
| 565 | (__GNUC_MINOR__2 == 1 && __GNUC_PATCHLEVEL >= 2)) &&\ |
| 566 | !defined(__i386__) |
| 567 | #define __pyx_atomic_incr_aligned(value, lock)__sync_fetch_and_add(value, 1) __sync_fetch_and_add(value, 1) |
| 568 | #define __pyx_atomic_decr_aligned(value, lock)__sync_fetch_and_sub(value, 1) __sync_fetch_and_sub(value, 1) |
| 569 | #ifdef __PYX_DEBUG_ATOMICS |
| 570 | #warning "Using GNU atomics" |
| 571 | #endif |
| 572 | #elif CYTHON_ATOMICS1 && defined(_MSC_VER) && 0 |
| 573 | #include <Windows.h> |
| 574 | #undef __pyx_atomic_int_typeint |
| 575 | #define __pyx_atomic_int_typeint LONG |
| 576 | #define __pyx_atomic_incr_aligned(value, lock)__sync_fetch_and_add(value, 1) InterlockedIncrement(value) |
| 577 | #define __pyx_atomic_decr_aligned(value, lock)__sync_fetch_and_sub(value, 1) InterlockedDecrement(value) |
| 578 | #ifdef __PYX_DEBUG_ATOMICS |
| 579 | #pragma message ("Using MSVC atomics") |
| 580 | #endif |
| 581 | #elif CYTHON_ATOMICS1 && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0 |
| 582 | #define __pyx_atomic_incr_aligned(value, lock)__sync_fetch_and_add(value, 1) _InterlockedIncrement(value) |
| 583 | #define __pyx_atomic_decr_aligned(value, lock)__sync_fetch_and_sub(value, 1) _InterlockedDecrement(value) |
| 584 | #ifdef __PYX_DEBUG_ATOMICS |
| 585 | #warning "Using Intel atomics" |
| 586 | #endif |
| 587 | #else |
| 588 | #undef CYTHON_ATOMICS1 |
| 589 | #define CYTHON_ATOMICS1 0 |
| 590 | #ifdef __PYX_DEBUG_ATOMICS |
| 591 | #warning "Not using atomics" |
| 592 | #endif |
| 593 | #endif |
| 594 | typedef volatile __pyx_atomic_int_typeint __pyx_atomic_int; |
| 595 | #if CYTHON_ATOMICS1 |
| 596 | #define __pyx_add_acquisition_count(memview)__sync_fetch_and_add((memview->acquisition_count_aligned_p ), 1)\ |
| 597 | __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)__sync_fetch_and_add((memview->acquisition_count_aligned_p ), 1) |
| 598 | #define __pyx_sub_acquisition_count(memview)__sync_fetch_and_sub((memview->acquisition_count_aligned_p ), 1)\ |
| 599 | __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)__sync_fetch_and_sub((memview->acquisition_count_aligned_p ), 1) |
| 600 | #else |
| 601 | #define __pyx_add_acquisition_count(memview)__sync_fetch_and_add((memview->acquisition_count_aligned_p ), 1)\ |
| 602 | __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview)(memview->acquisition_count_aligned_p), memview->lock) |
| 603 | #define __pyx_sub_acquisition_count(memview)__sync_fetch_and_sub((memview->acquisition_count_aligned_p ), 1)\ |
| 604 | __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview)(memview->acquisition_count_aligned_p), memview->lock) |
| 605 | #endif |
| 606 | |
| 607 | |
| 608 | /*--- Type declarations ---*/ |
| 609 | #ifndef _ARRAYARRAY_H |
| 610 | struct arrayobject; |
| 611 | typedef struct arrayobject arrayobject; |
| 612 | #endif |
| 613 | struct __pyx_obj_5rados_Rados; |
| 614 | struct __pyx_obj_5rados_Ioctx; |
| 615 | struct __pyx_obj_3rgw_FileHandle; |
| 616 | struct __pyx_obj_3rgw_LibRGWFS; |
| 617 | struct __pyx_array_obj; |
| 618 | struct __pyx_MemviewEnum_obj; |
| 619 | struct __pyx_memoryview_obj; |
| 620 | struct __pyx_memoryviewslice_obj; |
| 621 | |
| 622 | /* "rados.pxd":14 |
| 623 | * |
| 624 | * |
| 625 | * cdef class Rados(object): # <<<<<<<<<<<<<< |
| 626 | * cdef: |
| 627 | * rados_t cluster |
| 628 | */ |
| 629 | struct __pyx_obj_5rados_Rados { |
| 630 | PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type; |
| 631 | rados_t cluster; |
| 632 | PyObject *state; |
| 633 | PyObject *monitor_callback; |
| 634 | PyObject *monitor_callback2; |
| 635 | PyObject *parsed_args; |
| 636 | PyObject *conf_defaults; |
| 637 | PyObject *conffile; |
| 638 | PyObject *rados_id; |
| 639 | }; |
| 640 | |
| 641 | |
| 642 | /* "rados.pxd":26 |
| 643 | * |
| 644 | * |
| 645 | * cdef class Ioctx(object): # <<<<<<<<<<<<<< |
| 646 | * cdef: |
| 647 | * rados_ioctx_t io |
| 648 | */ |
| 649 | struct __pyx_obj_5rados_Ioctx { |
| 650 | PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type; |
| 651 | rados_ioctx_t io; |
| 652 | PyObject *name; |
| 653 | PyObject *state; |
| 654 | PyObject *locator_key; |
| 655 | PyObject *nspace; |
| 656 | PyObject *safe_completions; |
| 657 | PyObject *complete_completions; |
| 658 | PyObject *lock; |
| 659 | }; |
| 660 | |
| 661 | |
| 662 | /* "rgw.pyx":270 |
| 663 | * |
| 664 | * |
| 665 | * cdef class FileHandle(object): # <<<<<<<<<<<<<< |
| 666 | * cdef rgw_file_handle *handler |
| 667 | * |
| 668 | */ |
| 669 | struct __pyx_obj_3rgw_FileHandle { |
| 670 | PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type; |
| 671 | struct rgw_file_handle *handler; |
| 672 | }; |
| 673 | |
| 674 | |
| 675 | /* "rgw.pyx":330 |
| 676 | * |
| 677 | * |
| 678 | * cdef class LibRGWFS(object): # <<<<<<<<<<<<<< |
| 679 | * """librgwfs python wrapper""" |
| 680 | * |
| 681 | */ |
| 682 | struct __pyx_obj_3rgw_LibRGWFS { |
| 683 | PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type; |
| 684 | PyObject *state; |
| 685 | PyObject *uid; |
| 686 | PyObject *key; |
| 687 | PyObject *secret; |
| 688 | librgw_t cluster; |
| 689 | struct rgw_fs *fs; |
| 690 | }; |
| 691 | |
| 692 | |
| 693 | /* "View.MemoryView":101 |
| 694 | * |
| 695 | * @cname("__pyx_array") |
| 696 | * cdef class array: # <<<<<<<<<<<<<< |
| 697 | * |
| 698 | * cdef: |
| 699 | */ |
| 700 | struct __pyx_array_obj { |
| 701 | PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type; |
| 702 | char *data; |
| 703 | Py_ssize_t len; |
| 704 | char *format; |
| 705 | int ndim; |
| 706 | Py_ssize_t *_shape; |
| 707 | Py_ssize_t *_strides; |
| 708 | Py_ssize_t itemsize; |
| 709 | PyObject *mode; |
| 710 | PyObject *_format; |
| 711 | void (*callback_free_data)(void *); |
| 712 | int free_data; |
| 713 | int dtype_is_object; |
| 714 | }; |
| 715 | |
| 716 | |
| 717 | /* "View.MemoryView":271 |
| 718 | * |
| 719 | * @cname('__pyx_MemviewEnum') |
| 720 | * cdef class Enum(object): # <<<<<<<<<<<<<< |
| 721 | * cdef object name |
| 722 | * def __init__(self, name): |
| 723 | */ |
| 724 | struct __pyx_MemviewEnum_obj { |
| 725 | PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type; |
| 726 | PyObject *name; |
| 727 | }; |
| 728 | |
| 729 | |
| 730 | /* "View.MemoryView":304 |
| 731 | * |
| 732 | * @cname('__pyx_memoryview') |
| 733 | * cdef class memoryview(object): # <<<<<<<<<<<<<< |
| 734 | * |
| 735 | * cdef object obj |
| 736 | */ |
| 737 | struct __pyx_memoryview_obj { |
| 738 | PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type; |
| 739 | struct __pyx_vtabstruct_memoryview *__pyx_vtab; |
| 740 | PyObject *obj; |
| 741 | PyObject *_size; |
| 742 | PyObject *_array_interface; |
| 743 | PyThread_type_lock lock; |
| 744 | __pyx_atomic_int acquisition_count[2]; |
| 745 | __pyx_atomic_int *acquisition_count_aligned_p; |
| 746 | Py_buffer view; |
| 747 | int flags; |
| 748 | int dtype_is_object; |
| 749 | __Pyx_TypeInfo *typeinfo; |
| 750 | }; |
| 751 | |
| 752 | |
| 753 | /* "View.MemoryView":923 |
| 754 | * |
| 755 | * @cname('__pyx_memoryviewslice') |
| 756 | * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<< |
| 757 | * "Internal class for passing memoryview slices to Python" |
| 758 | * |
| 759 | */ |
| 760 | struct __pyx_memoryviewslice_obj { |
| 761 | struct __pyx_memoryview_obj __pyx_base; |
| 762 | __Pyx_memviewslice from_slice; |
| 763 | PyObject *from_object; |
| 764 | PyObject *(*to_object_func)(char *); |
| 765 | int (*to_dtype_func)(char *, PyObject *); |
| 766 | }; |
| 767 | |
| 768 | |
| 769 | |
| 770 | /* "View.MemoryView":304 |
| 771 | * |
| 772 | * @cname('__pyx_memoryview') |
| 773 | * cdef class memoryview(object): # <<<<<<<<<<<<<< |
| 774 | * |
| 775 | * cdef object obj |
| 776 | */ |
| 777 | |
| 778 | struct __pyx_vtabstruct_memoryview { |
| 779 | char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *); |
| 780 | PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *); |
| 781 | PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); |
| 782 | PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *); |
| 783 | PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); |
| 784 | PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *); |
| 785 | PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *); |
| 786 | }; |
| 787 | static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview; |
| 788 | |
| 789 | |
| 790 | /* "View.MemoryView":923 |
| 791 | * |
| 792 | * @cname('__pyx_memoryviewslice') |
| 793 | * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<< |
| 794 | * "Internal class for passing memoryview slices to Python" |
| 795 | * |
| 796 | */ |
| 797 | |
| 798 | struct __pyx_vtabstruct__memoryviewslice { |
| 799 | struct __pyx_vtabstruct_memoryview __pyx_base; |
| 800 | }; |
| 801 | static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice; |
| 802 | |
| 803 | /* --- Runtime support code (head) --- */ |
| 804 | #ifndef CYTHON_REFNANNY0 |
| 805 | #define CYTHON_REFNANNY0 0 |
| 806 | #endif |
| 807 | #if CYTHON_REFNANNY0 |
| 808 | typedef struct { |
| 809 | void (*INCREF)(void*, PyObject*, int); |
| 810 | void (*DECREF)(void*, PyObject*, int); |
| 811 | void (*GOTREF)(void*, PyObject*, int); |
| 812 | void (*GIVEREF)(void*, PyObject*, int); |
| 813 | void* (*SetupContext)(const char*, int, const char*); |
| 814 | void (*FinishContext)(void**); |
| 815 | } __Pyx_RefNannyAPIStruct; |
| 816 | static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL((void*)0); |
| 817 | static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); |
| 818 | #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL((void*)0); |
| 819 | #ifdef WITH_THREAD1 |
| 820 | #define __Pyx_RefNannySetupContext(name, acquire_gil)\ |
| 821 | if (acquire_gil) {\ |
| 822 | PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ |
| 823 | __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__823, __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/rgw2/rgw.c");\ |
| 824 | PyGILState_Release(__pyx_gilstate_save);\ |
| 825 | } else {\ |
| 826 | __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__826, __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/rgw2/rgw.c");\ |
| 827 | } |
| 828 | #else |
| 829 | #define __Pyx_RefNannySetupContext(name, acquire_gil)\ |
| 830 | __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__830, __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/rgw2/rgw.c") |
| 831 | #endif |
| 832 | #define __Pyx_RefNannyFinishContext()\ |
| 833 | __Pyx_RefNanny->FinishContext(&__pyx_refnanny) |
| 834 | #define __Pyx_INCREF(r)( ((PyObject*)(r))->ob_refcnt++) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__834) |
| 835 | #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__835) |
| 836 | #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__836) |
| 837 | #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__837) |
| 838 | #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) |
| 839 | #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) |
| 840 | #define __Pyx_XGOTREF(r) do { if((r) != NULL((void*)0)) {__Pyx_GOTREF(r); }} while(0) |
| 841 | #define __Pyx_XGIVEREF(r) do { if((r) != NULL((void*)0)) {__Pyx_GIVEREF(r);}} while(0) |
| 842 | #else |
| 843 | #define __Pyx_RefNannyDeclarations |
| 844 | #define __Pyx_RefNannySetupContext(name, acquire_gil) |
| 845 | #define __Pyx_RefNannyFinishContext() |
| 846 | #define __Pyx_INCREF(r)( ((PyObject*)(r))->ob_refcnt++) Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++) |
| 847 | #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) |
| 848 | #define __Pyx_GOTREF(r) |
| 849 | #define __Pyx_GIVEREF(r) |
| 850 | #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) |
| 851 | #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) |
| 852 | #define __Pyx_XGOTREF(r) |
| 853 | #define __Pyx_XGIVEREF(r) |
| 854 | #endif |
| 855 | #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 {\ |
| 856 | PyObject *tmp = (PyObject *) r;\ |
| 857 | 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);\ |
| 858 | } while (0) |
| 859 | #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 {\ |
| 860 | PyObject *tmp = (PyObject *) r;\ |
| 861 | 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);\ |
| 862 | } while (0) |
| 863 | #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) |
| 864 | #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) |
| 865 | |
| 866 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 867 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { |
| 868 | PyTypeObject* tp = Py_TYPE(obj)(((PyObject*)(obj))->ob_type); |
| 869 | if (likely(tp->tp_getattro)__builtin_expect(!!(tp->tp_getattro), 1)) |
| 870 | return tp->tp_getattro(obj, attr_name); |
| 871 | #if PY_MAJOR_VERSION2 < 3 |
| 872 | if (likely(tp->tp_getattr)__builtin_expect(!!(tp->tp_getattr), 1)) |
| 873 | return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)(((PyStringObject *)(attr_name))->ob_sval)); |
| 874 | #endif |
| 875 | return PyObject_GetAttr(obj, attr_name); |
| 876 | } |
| 877 | #else |
| 878 | #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) |
| 879 | #endif |
| 880 | |
| 881 | static PyObject *__Pyx_GetBuiltinName(PyObject *name); |
| 882 | |
| 883 | static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, |
| 884 | Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); |
| 885 | |
| 886 | static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); |
| 887 | |
| 888 | static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ |
| 889 | PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ |
| 890 | const char* function_name); |
| 891 | |
| 892 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 893 | #define __Pyx_PyObject_DelAttrStr(o,n)__Pyx_PyObject_SetAttrStr(o,n,((void*)0)) __Pyx_PyObject_SetAttrStr(o,n,NULL((void*)0)) |
| 894 | static CYTHON_INLINE__inline__ int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { |
| 895 | PyTypeObject* tp = Py_TYPE(obj)(((PyObject*)(obj))->ob_type); |
| 896 | if (likely(tp->tp_setattro)__builtin_expect(!!(tp->tp_setattro), 1)) |
| 897 | return tp->tp_setattro(obj, attr_name, value); |
| 898 | #if PY_MAJOR_VERSION2 < 3 |
| 899 | if (likely(tp->tp_setattr)__builtin_expect(!!(tp->tp_setattr), 1)) |
| 900 | return tp->tp_setattr(obj, PyString_AS_STRING(attr_name)(((PyStringObject *)(attr_name))->ob_sval), value); |
| 901 | #endif |
| 902 | return PyObject_SetAttr(obj, attr_name, value); |
| 903 | } |
| 904 | #else |
| 905 | #define __Pyx_PyObject_DelAttrStr(o,n)__Pyx_PyObject_SetAttrStr(o,n,((void*)0)) PyObject_DelAttr(o,n)PyObject_SetAttr((o),(n),((void*)0)) |
| 906 | #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) |
| 907 | #endif |
| 908 | |
| 909 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 910 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); |
| 911 | #else |
| 912 | #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) |
| 913 | #endif |
| 914 | |
| 915 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 916 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); |
| 917 | #endif |
| 918 | |
| 919 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); |
| 920 | |
| 921 | static CYTHON_INLINE__inline__ void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); |
| 922 | static CYTHON_INLINE__inline__ void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); |
| 923 | |
| 924 | static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); |
| 925 | |
| 926 | static CYTHON_INLINE__inline__ int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { |
| 927 | int result = PySequence_Contains(seq, item); |
| 928 | return unlikely(result < 0)__builtin_expect(!!(result < 0), 0) ? result : (result == (eq == Py_EQ2)); |
| 929 | } |
| 930 | |
| 931 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetModuleGlobalName(PyObject *name); |
| 932 | |
| 933 | #ifndef __PYX_FORCE_INIT_THREADS0 |
| 934 | #define __PYX_FORCE_INIT_THREADS0 0 |
| 935 | #endif |
| 936 | |
| 937 | static CYTHON_INLINE__inline__ int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); |
| 938 | |
| 939 | #include <string.h> |
| 940 | |
| 941 | static CYTHON_INLINE__inline__ int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); |
| 942 | |
| 943 | static CYTHON_INLINE__inline__ int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); |
| 944 | |
| 945 | #if PY_MAJOR_VERSION2 >= 3 |
| 946 | #define __Pyx_PyString_Equals__Pyx_PyBytes_Equals __Pyx_PyUnicode_Equals |
| 947 | #else |
| 948 | #define __Pyx_PyString_Equals__Pyx_PyBytes_Equals __Pyx_PyBytes_Equals |
| 949 | #endif |
| 950 | |
| 951 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 952 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); |
| 953 | #else |
| 954 | #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL((void*)0)) |
| 955 | #endif |
| 956 | |
| 957 | static void __Pyx_WriteUnraisable(const char *name, int clineno, |
| 958 | int lineno, const char *filename, |
| 959 | int full_traceback, int nogil); |
| 960 | |
| 961 | static CYTHON_INLINE__inline__ int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, |
| 962 | __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); |
| 963 | static CYTHON_INLINE__inline__ void __Pyx_SafeReleaseBuffer(Py_buffer* info); |
| 964 | |
| 965 | #define __Pyx_BUF_MAX_NDIMS%(BUF_MAX_NDIMS)d %(BUF_MAX_NDIMS)d |
| 966 | #define __Pyx_MEMVIEW_DIRECT1 1 |
| 967 | #define __Pyx_MEMVIEW_PTR2 2 |
| 968 | #define __Pyx_MEMVIEW_FULL4 4 |
| 969 | #define __Pyx_MEMVIEW_CONTIG8 8 |
| 970 | #define __Pyx_MEMVIEW_STRIDED16 16 |
| 971 | #define __Pyx_MEMVIEW_FOLLOW32 32 |
| 972 | #define __Pyx_IS_C_CONTIG1 1 |
| 973 | #define __Pyx_IS_F_CONTIG2 2 |
| 974 | static int __Pyx_init_memviewslice( |
| 975 | struct __pyx_memoryview_obj *memview, |
| 976 | int ndim, |
| 977 | __Pyx_memviewslice *memviewslice, |
| 978 | int memview_is_new_reference); |
| 979 | static CYTHON_INLINE__inline__ int __pyx_add_acquisition_count_locked( |
| 980 | __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); |
| 981 | static CYTHON_INLINE__inline__ int __pyx_sub_acquisition_count_locked( |
| 982 | __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); |
| 983 | #define __pyx_get_slice_count_pointer(memview)(memview->acquisition_count_aligned_p) (memview->acquisition_count_aligned_p) |
| 984 | #define __pyx_get_slice_count(memview)(*(memview->acquisition_count_aligned_p)) (*__pyx_get_slice_count_pointer(memview)(memview->acquisition_count_aligned_p)) |
| 985 | #define __PYX_INC_MEMVIEW(slice, have_gil)__Pyx_INC_MEMVIEW(slice, have_gil, 985) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__985) |
| 986 | #define __PYX_XDEC_MEMVIEW(slice, have_gil)__Pyx_XDEC_MEMVIEW(slice, have_gil, 986) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__986) |
| 987 | static CYTHON_INLINE__inline__ void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int); |
| 988 | static CYTHON_INLINE__inline__ void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int); |
| 989 | |
| 990 | static CYTHON_INLINE__inline__ int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, |
| 991 | const char *name, int exact); |
| 992 | |
| 993 | static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); |
| 994 | |
| 995 | static CYTHON_INLINE__inline__ void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); |
| 996 | |
| 997 | static CYTHON_INLINE__inline__ void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); |
| 998 | static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); |
| 999 | |
| 1000 | static CYTHON_INLINE__inline__ Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); |
| 1001 | |
| 1002 | #define UNARY_NEG_WOULD_OVERFLOW(x)(((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)( x)))\ |
| 1003 | (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) |
| 1004 | |
| 1005 | static CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ |
| 1006 | static PyObject *get_memview(PyObject *__pyx_v_self); /*proto*/ |
| 1007 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetAttr(PyObject *, PyObject *); |
| 1008 | |
| 1009 | static CYTHON_INLINE__inline__ PyObject* __Pyx_decode_c_string( |
| 1010 | const char* cstring, Py_ssize_t start, Py_ssize_t stop, |
| 1011 | const char* encoding, const char* errors, |
| 1012 | PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); |
| 1013 | |
| 1014 | static CYTHON_INLINE__inline__ void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); |
| 1015 | |
| 1016 | static CYTHON_INLINE__inline__ void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); |
| 1017 | |
| 1018 | static CYTHON_INLINE__inline__ void __Pyx_RaiseNoneNotIterableError(void); |
| 1019 | |
| 1020 | static CYTHON_INLINE__inline__ int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); |
| 1021 | |
| 1022 | static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); |
| 1023 | |
| 1024 | #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))))\ |
| 1025 | (__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))) ) ?\ |
| 1026 | __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ |
| 1027 | (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL((void*)0)) :\ |
| 1028 | __Pyx_GetItemInt_Generic(o, to_py_func(i)))) |
| 1029 | #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)))\ |
| 1030 | (__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))) ) ?\ |
| 1031 | __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ |
| 1032 | (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL((void*)0))) |
| 1033 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, |
| 1034 | int wraparound, int boundscheck); |
| 1035 | #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)))\ |
| 1036 | (__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))) ) ?\ |
| 1037 | __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ |
| 1038 | (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL((void*)0))) |
| 1039 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, |
| 1040 | int wraparound, int boundscheck); |
| 1041 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); |
| 1042 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, |
| 1043 | int is_list, int wraparound, int boundscheck); |
| 1044 | |
| 1045 | static CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ |
| 1046 | static PyObject *__pyx_memoryview_transpose(PyObject *__pyx_v_self); /*proto*/ |
| 1047 | static PyObject *__pyx_memoryview__get__base(PyObject *__pyx_v_self); /*proto*/ |
| 1048 | static PyObject *__pyx_memoryview_get_shape(PyObject *__pyx_v_self); /*proto*/ |
| 1049 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 1050 | static CYTHON_INLINE__inline__ int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { |
| 1051 | PyListObject* L = (PyListObject*) list; |
| 1052 | Py_ssize_t len = Py_SIZE(list)(((PyVarObject*)(list))->ob_size); |
| 1053 | if (likely(L->allocated > len)__builtin_expect(!!(L->allocated > len), 1)) { |
| 1054 | Py_INCREF(x)( ((PyObject*)(x))->ob_refcnt++); |
| 1055 | PyList_SET_ITEM(list, len, x)(((PyListObject *)(list))->ob_item[len] = (x)); |
| 1056 | Py_SIZE(list)(((PyVarObject*)(list))->ob_size) = len+1; |
| 1057 | return 0; |
| 1058 | } |
| 1059 | return PyList_Append(list, x); |
| 1060 | } |
| 1061 | #else |
| 1062 | #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) |
| 1063 | #endif |
| 1064 | |
| 1065 | static PyObject *__pyx_memoryview_get_strides(PyObject *__pyx_v_self); /*proto*/ |
| 1066 | static PyObject *__pyx_memoryview_get_suboffsets(PyObject *__pyx_v_self); /*proto*/ |
| 1067 | static PyObject *__pyx_memoryview_get_ndim(PyObject *__pyx_v_self); /*proto*/ |
| 1068 | static PyObject *__pyx_memoryview_get_itemsize(PyObject *__pyx_v_self); /*proto*/ |
| 1069 | static PyObject *__pyx_memoryview_get_nbytes(PyObject *__pyx_v_self); /*proto*/ |
| 1070 | static PyObject *__pyx_memoryview_get_size(PyObject *__pyx_v_self); /*proto*/ |
| 1071 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 1072 | static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace); |
| 1073 | #else |
| 1074 | #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\ |
| 1075 | (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) |
| 1076 | #endif |
| 1077 | |
| 1078 | static CYTHON_INLINE__inline__ int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { |
| 1079 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 1080 | PyObject* none = _PyList_Extend((PyListObject*)L, v); |
| 1081 | if (unlikely(!none)__builtin_expect(!!(!none), 0)) |
| 1082 | return -1; |
| 1083 | Py_DECREF(none)do { if ( --((PyObject*)(none))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(none)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(none)))); } while (0); |
| 1084 | return 0; |
| 1085 | #else |
| 1086 | return PyList_SetSlice(L, PY_SSIZE_T_MAX((Py_ssize_t)(((size_t)-1)>>1)), PY_SSIZE_T_MAX((Py_ssize_t)(((size_t)-1)>>1)), v); |
| 1087 | #endif |
| 1088 | } |
| 1089 | |
| 1090 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 1091 | static CYTHON_INLINE__inline__ int __Pyx_PyList_Append(PyObject* list, PyObject* x) { |
| 1092 | PyListObject* L = (PyListObject*) list; |
| 1093 | Py_ssize_t len = Py_SIZE(list)(((PyVarObject*)(list))->ob_size); |
| 1094 | if (likely(L->allocated > len)__builtin_expect(!!(L->allocated > len), 1) & likely(len > (L->allocated >> 1))__builtin_expect(!!(len > (L->allocated >> 1)), 1 )) { |
| 1095 | Py_INCREF(x)( ((PyObject*)(x))->ob_refcnt++); |
| 1096 | PyList_SET_ITEM(list, len, x)(((PyListObject *)(list))->ob_item[len] = (x)); |
| 1097 | Py_SIZE(list)(((PyVarObject*)(list))->ob_size) = len+1; |
| 1098 | return 0; |
| 1099 | } |
| 1100 | return PyList_Append(list, x); |
| 1101 | } |
| 1102 | #else |
| 1103 | #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) |
| 1104 | #endif |
| 1105 | |
| 1106 | static CYTHON_INLINE__inline__ void __Pyx_RaiseUnboundLocalError(const char *varname); |
| 1107 | |
| 1108 | static CYTHON_INLINE__inline__ long __Pyx_div_long(long, long); |
| 1109 | |
| 1110 | static PyObject *__pyx_memoryviewslice__get__base(PyObject *__pyx_v_self); /*proto*/ |
| 1111 | #if PY_MAJOR_VERSION2 < 3 |
| 1112 | #define __Pyx_PyString_Join_PyString_Join __Pyx_PyBytes_Join_PyString_Join |
| 1113 | #define __Pyx_PyBaseString_Join(s, v)(((((PyObject*)(s))->ob_type) == &PyUnicode_Type) ? PyUnicodeUCS4_Join (s, v) : _PyString_Join(s, v)) (PyUnicode_CheckExact(s)((((PyObject*)(s))->ob_type) == &PyUnicode_Type) ? PyUnicode_JoinPyUnicodeUCS4_Join(s, v) : __Pyx_PyBytes_Join_PyString_Join(s, v)) |
| 1114 | #else |
| 1115 | #define __Pyx_PyString_Join_PyString_Join PyUnicode_JoinPyUnicodeUCS4_Join |
| 1116 | #define __Pyx_PyBaseString_Join PyUnicode_JoinPyUnicodeUCS4_Join |
| 1117 | #endif |
| 1118 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 1119 | #if PY_MAJOR_VERSION2 < 3 |
| 1120 | #define __Pyx_PyBytes_Join_PyString_Join _PyString_Join |
| 1121 | #else |
| 1122 | #define __Pyx_PyBytes_Join_PyString_Join _PyBytes_Join_PyString_Join |
| 1123 | #endif |
| 1124 | #else |
| 1125 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyBytes_Join_PyString_Join(PyObject* sep, PyObject* values); |
| 1126 | #endif |
| 1127 | |
| 1128 | static int __Pyx_SetVtable(PyObject *dict, void *vtable); |
| 1129 | |
| 1130 | static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); |
| 1131 | |
| 1132 | static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); |
| 1133 | |
| 1134 | static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, |
| 1135 | PyObject *mkw, PyObject *modname, PyObject *doc); |
| 1136 | static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, |
| 1137 | PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); |
| 1138 | |
| 1139 | static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); |
| 1140 | |
| 1141 | #define __Pyx_CyFunction_USED1 1 |
| 1142 | #include <structmember.h> |
| 1143 | #define __Pyx_CYFUNCTION_STATICMETHOD0x01 0x01 |
| 1144 | #define __Pyx_CYFUNCTION_CLASSMETHOD0x02 0x02 |
| 1145 | #define __Pyx_CYFUNCTION_CCLASS0x04 0x04 |
| 1146 | #define __Pyx_CyFunction_GetClosure(f)(((__pyx_CyFunctionObject *) (f))->func_closure)\ |
| 1147 | (((__pyx_CyFunctionObject *) (f))->func_closure) |
| 1148 | #define __Pyx_CyFunction_GetClassObj(f)(((__pyx_CyFunctionObject *) (f))->func_classobj)\ |
| 1149 | (((__pyx_CyFunctionObject *) (f))->func_classobj) |
| 1150 | #define __Pyx_CyFunction_Defaults(type, f)((type *)(((__pyx_CyFunctionObject *) (f))->defaults))\ |
| 1151 | ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) |
| 1152 | #define __Pyx_CyFunction_SetDefaultsGetter(f, g)((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)\ |
| 1153 | ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) |
| 1154 | typedef struct { |
| 1155 | PyCFunctionObject func; |
| 1156 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) < 0x030500A0 |
| 1157 | PyObject *func_weakreflist; |
| 1158 | #endif |
| 1159 | PyObject *func_dict; |
| 1160 | PyObject *func_name; |
| 1161 | PyObject *func_qualname; |
| 1162 | PyObject *func_doc; |
| 1163 | PyObject *func_globals; |
| 1164 | PyObject *func_code; |
| 1165 | PyObject *func_closure; |
| 1166 | PyObject *func_classobj; |
| 1167 | void *defaults; |
| 1168 | int defaults_pyobjects; |
| 1169 | int flags; |
| 1170 | PyObject *defaults_tuple; |
| 1171 | PyObject *defaults_kwdict; |
| 1172 | PyObject *(*defaults_getter)(PyObject *); |
| 1173 | PyObject *func_annotations; |
| 1174 | } __pyx_CyFunctionObject; |
| 1175 | static PyTypeObject *__pyx_CyFunctionType = 0; |
| 1176 | #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)__Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname , self, module, globals, code)\ |
| 1177 | __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) |
| 1178 | static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, |
| 1179 | int flags, PyObject* qualname, |
| 1180 | PyObject *self, |
| 1181 | PyObject *module, PyObject *globals, |
| 1182 | PyObject* code); |
| 1183 | static CYTHON_INLINE__inline__ void *__Pyx_CyFunction_InitDefaults(PyObject *m, |
| 1184 | size_t size, |
| 1185 | int pyobjects); |
| 1186 | static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, |
| 1187 | PyObject *tuple); |
| 1188 | static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, |
| 1189 | PyObject *dict); |
| 1190 | static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, |
| 1191 | PyObject *dict); |
| 1192 | static int __pyx_CyFunction_init(void); |
| 1193 | |
| 1194 | typedef struct { |
| 1195 | int code_line; |
| 1196 | PyCodeObject* code_object; |
| 1197 | } __Pyx_CodeObjectCacheEntry; |
| 1198 | struct __Pyx_CodeObjectCache { |
| 1199 | int count; |
| 1200 | int max_count; |
| 1201 | __Pyx_CodeObjectCacheEntry* entries; |
| 1202 | }; |
| 1203 | static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL((void*)0)}; |
| 1204 | static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); |
| 1205 | static PyCodeObject *__pyx_find_code_object(int code_line); |
| 1206 | static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); |
| 1207 | |
| 1208 | static void __Pyx_AddTraceback(const char *funcname, int c_line, |
| 1209 | int py_line, const char *filename); |
| 1210 | |
| 1211 | #ifndef _ARRAYARRAY_H |
| 1212 | #define _ARRAYARRAY_H |
| 1213 | typedef struct arraydescr { |
| 1214 | int typecode; |
| 1215 | int itemsize; |
| 1216 | PyObject * (*getitem)(struct arrayobject *, Py_ssize_t); |
| 1217 | int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *); |
| 1218 | #if PY_MAJOR_VERSION2 >= 3 |
| 1219 | char *formats; |
| 1220 | #endif |
| 1221 | } arraydescr; |
| 1222 | struct arrayobject { |
| 1223 | PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type; |
| 1224 | Py_ssize_t ob_size; |
| 1225 | union { |
| 1226 | char *ob_item; |
| 1227 | float *as_floats; |
| 1228 | double *as_doubles; |
| 1229 | int *as_ints; |
| 1230 | unsigned int *as_uints; |
| 1231 | unsigned char *as_uchars; |
| 1232 | signed char *as_schars; |
| 1233 | char *as_chars; |
| 1234 | unsigned long *as_ulongs; |
| 1235 | long *as_longs; |
| 1236 | short *as_shorts; |
| 1237 | unsigned short *as_ushorts; |
| 1238 | Py_UNICODE *as_pyunicodes; |
| 1239 | void *as_voidptr; |
| 1240 | } data; |
| 1241 | Py_ssize_t allocated; |
| 1242 | struct arraydescr *ob_descr; |
| 1243 | PyObject *weakreflist; |
| 1244 | #if PY_MAJOR_VERSION2 >= 3 |
| 1245 | int ob_exports; |
| 1246 | #endif |
| 1247 | }; |
| 1248 | #ifndef NO_NEWARRAY_INLINE |
| 1249 | static CYTHON_INLINE__inline__ PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size, |
| 1250 | struct arraydescr *descr) { |
| 1251 | arrayobject *op; |
| 1252 | size_t nbytes; |
| 1253 | if (size < 0) { |
| 1254 | PyErr_BadInternalCall()_PyErr_BadInternalCall("/home/bhubbard/working/src/ceph/build/src/pybind/rgw2/rgw.c" , 1254); |
| 1255 | return NULL((void*)0); |
| 1256 | } |
| 1257 | nbytes = size * descr->itemsize; |
| 1258 | if (nbytes / descr->itemsize != (size_t)size) { |
| 1259 | return PyErr_NoMemory(); |
| 1260 | } |
| 1261 | op = (arrayobject *) type->tp_alloc(type, 0); |
| 1262 | if (op == NULL((void*)0)) { |
| 1263 | return NULL((void*)0); |
| 1264 | } |
| 1265 | op->ob_descr = descr; |
| 1266 | op->allocated = size; |
| 1267 | op->weakreflist = NULL((void*)0); |
| 1268 | op->ob_size = size; |
| 1269 | if (size <= 0) { |
| 1270 | op->data.ob_item = NULL((void*)0); |
| 1271 | } |
| 1272 | else { |
| 1273 | op->data.ob_item = PyMem_NEW(char, nbytes)( ((size_t)(nbytes) > ((Py_ssize_t)(((size_t)-1)>>1) ) / sizeof(char)) ? ((void*)0) : ( (char *) ((size_t)((nbytes ) * sizeof(char)) > (size_t)((Py_ssize_t)(((size_t)-1)>> 1)) ? ((void*)0) : malloc(((nbytes) * sizeof(char)) ? ((nbytes ) * sizeof(char)) : 1)) ) ); |
| 1274 | if (op->data.ob_item == NULL((void*)0)) { |
| 1275 | Py_DECREF(op)do { if ( --((PyObject*)(op))->ob_refcnt != 0) ; else ( (* (((PyObject*)((PyObject *)(op)))->ob_type)->tp_dealloc) ((PyObject *)((PyObject *)(op)))); } while (0); |
| 1276 | return PyErr_NoMemory(); |
| 1277 | } |
| 1278 | } |
| 1279 | return (PyObject *) op; |
| 1280 | } |
| 1281 | #else |
| 1282 | PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size, |
| 1283 | struct arraydescr *descr); |
| 1284 | #endif |
| 1285 | static CYTHON_INLINE__inline__ int resize(arrayobject *self, Py_ssize_t n) { |
| 1286 | void *items = (void*) self->data.ob_item; |
| 1287 | PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize))( (items) = ((size_t)((size_t)(n * self->ob_descr->itemsize )) > ((Py_ssize_t)(((size_t)-1)>>1)) / sizeof(char)) ? ((void*)0) : (char *) PyMem_Realloc((items), ((size_t)(n * self->ob_descr->itemsize)) * sizeof(char)) ); |
| 1288 | if (items == NULL((void*)0)) { |
| 1289 | PyErr_NoMemory(); |
| 1290 | return -1; |
| 1291 | } |
| 1292 | self->data.ob_item = (char*) items; |
| 1293 | self->ob_size = n; |
| 1294 | self->allocated = n; |
| 1295 | return 0; |
| 1296 | } |
| 1297 | static CYTHON_INLINE__inline__ int resize_smart(arrayobject *self, Py_ssize_t n) { |
| 1298 | void *items = (void*) self->data.ob_item; |
| 1299 | Py_ssize_t newsize; |
| 1300 | if (n < self->ob_size) { |
| 1301 | self->ob_size = n; |
| 1302 | return 0; |
| 1303 | } |
| 1304 | newsize = n + (n / 2) + 1; |
| 1305 | if (newsize <= self->allocated) { |
| 1306 | PyErr_NoMemory(); |
| 1307 | return -1; |
| 1308 | } |
| 1309 | PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize))( (items) = ((size_t)((size_t)(newsize * self->ob_descr-> itemsize)) > ((Py_ssize_t)(((size_t)-1)>>1)) / sizeof (char)) ? ((void*)0) : (char *) PyMem_Realloc((items), ((size_t )(newsize * self->ob_descr->itemsize)) * sizeof(char)) ); |
| 1310 | if (items == NULL((void*)0)) { |
| 1311 | PyErr_NoMemory(); |
| 1312 | return -1; |
| 1313 | } |
| 1314 | self->data.ob_item = (char*) items; |
| 1315 | self->ob_size = n; |
| 1316 | self->allocated = newsize; |
| 1317 | return 0; |
| 1318 | } |
| 1319 | #endif |
| 1320 | |
| 1321 | typedef struct { |
| 1322 | Py_ssize_t shape, strides, suboffsets; |
| 1323 | } __Pyx_Buf_DimInfo; |
| 1324 | typedef struct { |
| 1325 | size_t refcount; |
| 1326 | Py_buffer pybuffer; |
| 1327 | } __Pyx_Buffer; |
| 1328 | typedef struct { |
| 1329 | __Pyx_Buffer *rcbuffer; |
| 1330 | char *data; |
| 1331 | __Pyx_Buf_DimInfo diminfo[8]; |
| 1332 | } __Pyx_LocalBuf_ND; |
| 1333 | |
| 1334 | #if PY_MAJOR_VERSION2 < 3 |
| 1335 | static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); |
| 1336 | static void __Pyx_ReleaseBuffer(Py_buffer *view); |
| 1337 | #else |
| 1338 | #define __Pyx_GetBuffer PyObject_GetBuffer |
| 1339 | #define __Pyx_ReleaseBuffer PyBuffer_Release |
| 1340 | #endif |
| 1341 | |
| 1342 | |
| 1343 | static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; |
| 1344 | static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; |
| 1345 | |
| 1346 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value); |
| 1347 | |
| 1348 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value); |
| 1349 | |
| 1350 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_int(int value); |
| 1351 | |
| 1352 | static CYTHON_INLINE__inline__ uint64_t __Pyx_PyInt_As_uint64_t(PyObject *); |
| 1353 | |
| 1354 | static PyObject *__pyx_memview_get_nn_uint64_t(const char *itemp); |
| 1355 | static int __pyx_memview_set_nn_uint64_t(const char *itemp, PyObject *obj); |
| 1356 | |
| 1357 | static CYTHON_INLINE__inline__ int __Pyx_PyInt_As_int(PyObject *); |
| 1358 | |
| 1359 | static CYTHON_INLINE__inline__ uint32_t __Pyx_PyInt_As_uint32_t(PyObject *); |
| 1360 | |
| 1361 | static CYTHON_INLINE__inline__ int __Pyx_ErrOccurredWithGIL(void); /* proto */ |
| 1362 | |
| 1363 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value); |
| 1364 | |
| 1365 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); |
| 1366 | |
| 1367 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_long(long value); |
| 1368 | |
| 1369 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_time_t(time_t value); |
| 1370 | |
| 1371 | static CYTHON_INLINE__inline__ int64_t __Pyx_PyInt_As_int64_t(PyObject *); |
| 1372 | |
| 1373 | static CYTHON_INLINE__inline__ size_t __Pyx_PyInt_As_size_t(PyObject *); |
| 1374 | |
| 1375 | static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice *mvs, |
| 1376 | char order, int ndim); |
| 1377 | |
| 1378 | static int __pyx_slices_overlap(__Pyx_memviewslice *slice1, |
| 1379 | __Pyx_memviewslice *slice2, |
| 1380 | int ndim, size_t itemsize); |
| 1381 | |
| 1382 | static __Pyx_memviewslice |
| 1383 | __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, |
| 1384 | const char *mode, int ndim, |
| 1385 | size_t sizeof_dtype, int contig_flag, |
| 1386 | int dtype_is_object); |
| 1387 | |
| 1388 | static CYTHON_INLINE__inline__ PyObject *__pyx_capsule_create(void *p, const char *sig); |
| 1389 | |
| 1390 | static CYTHON_INLINE__inline__ char __Pyx_PyInt_As_char(PyObject *); |
| 1391 | |
| 1392 | struct __pyx_typeinfo_string { |
| 1393 | char string[3]; |
| 1394 | }; |
| 1395 | static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type); |
| 1396 | |
| 1397 | static CYTHON_INLINE__inline__ long __Pyx_PyInt_As_long(PyObject *); |
| 1398 | |
| 1399 | static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b); |
| 1400 | |
| 1401 | static int __Pyx_ValidateAndInit_memviewslice( |
| 1402 | int *axes_specs, |
| 1403 | int c_or_f_flag, |
| 1404 | int buf_flags, |
| 1405 | int ndim, |
| 1406 | __Pyx_TypeInfo *dtype, |
| 1407 | __Pyx_BufFmt_StackElem stack[], |
| 1408 | __Pyx_memviewslice *memviewslice, |
| 1409 | PyObject *original_obj); |
| 1410 | |
| 1411 | static CYTHON_INLINE__inline__ __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint64_t(PyObject *); |
| 1412 | |
| 1413 | static int __Pyx_check_binary_version(void); |
| 1414 | |
| 1415 | #if !defined(__Pyx_PyIdentifier_FromString) |
| 1416 | #if PY_MAJOR_VERSION2 < 3 |
| 1417 | #define __Pyx_PyIdentifier_FromString(s)PyString_FromString(s) PyString_FromString(s) |
| 1418 | #else |
| 1419 | #define __Pyx_PyIdentifier_FromString(s)PyString_FromString(s) PyUnicode_FromStringPyUnicodeUCS4_FromString(s) |
| 1420 | #endif |
| 1421 | #endif |
| 1422 | |
| 1423 | static PyObject *__Pyx_ImportModule(const char *name); |
| 1424 | |
| 1425 | static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); |
| 1426 | |
| 1427 | static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); |
| 1428 | |
| 1429 | static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/ |
| 1430 | static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/ |
| 1431 | static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/ |
| 1432 | static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/ |
| 1433 | static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/ |
| 1434 | static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ |
| 1435 | static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ |
| 1436 | static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ |
| 1437 | static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ |
| 1438 | |
| 1439 | /* Module declarations from 'cpython.version' */ |
| 1440 | |
| 1441 | /* Module declarations from '__builtin__' */ |
| 1442 | |
| 1443 | /* Module declarations from 'cpython.type' */ |
| 1444 | static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; |
| 1445 | |
| 1446 | /* Module declarations from 'libc.string' */ |
| 1447 | |
| 1448 | /* Module declarations from 'libc.stdio' */ |
| 1449 | |
| 1450 | /* Module declarations from 'cpython.object' */ |
| 1451 | |
| 1452 | /* Module declarations from 'cpython.ref' */ |
| 1453 | |
| 1454 | /* Module declarations from 'cpython.exc' */ |
| 1455 | |
| 1456 | /* Module declarations from 'cpython.module' */ |
| 1457 | |
| 1458 | /* Module declarations from 'cpython.mem' */ |
| 1459 | |
| 1460 | /* Module declarations from 'cpython.tuple' */ |
| 1461 | |
| 1462 | /* Module declarations from 'cpython.list' */ |
| 1463 | |
| 1464 | /* Module declarations from 'cpython.sequence' */ |
| 1465 | |
| 1466 | /* Module declarations from 'cpython.mapping' */ |
| 1467 | |
| 1468 | /* Module declarations from 'cpython.iterator' */ |
| 1469 | |
| 1470 | /* Module declarations from 'cpython.number' */ |
| 1471 | |
| 1472 | /* Module declarations from 'cpython.int' */ |
| 1473 | |
| 1474 | /* Module declarations from '__builtin__' */ |
| 1475 | |
| 1476 | /* Module declarations from 'cpython.bool' */ |
| 1477 | static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; |
| 1478 | |
| 1479 | /* Module declarations from 'cpython.long' */ |
| 1480 | |
| 1481 | /* Module declarations from 'cpython.float' */ |
| 1482 | |
| 1483 | /* Module declarations from '__builtin__' */ |
| 1484 | |
| 1485 | /* Module declarations from 'cpython.complex' */ |
| 1486 | static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; |
| 1487 | |
| 1488 | /* Module declarations from 'cpython.string' */ |
| 1489 | |
| 1490 | /* Module declarations from 'cpython.unicode' */ |
| 1491 | |
| 1492 | /* Module declarations from 'cpython.dict' */ |
| 1493 | |
| 1494 | /* Module declarations from 'cpython.instance' */ |
| 1495 | |
| 1496 | /* Module declarations from 'cpython.function' */ |
| 1497 | |
| 1498 | /* Module declarations from 'cpython.method' */ |
| 1499 | |
| 1500 | /* Module declarations from 'cpython.weakref' */ |
| 1501 | |
| 1502 | /* Module declarations from 'cpython.getargs' */ |
| 1503 | |
| 1504 | /* Module declarations from 'cpython.pythread' */ |
| 1505 | |
| 1506 | /* Module declarations from 'cpython.pystate' */ |
| 1507 | |
| 1508 | /* Module declarations from 'cpython.cobject' */ |
| 1509 | |
| 1510 | /* Module declarations from 'cpython.oldbuffer' */ |
| 1511 | |
| 1512 | /* Module declarations from 'cpython.set' */ |
| 1513 | |
| 1514 | /* Module declarations from 'cpython.buffer' */ |
| 1515 | |
| 1516 | /* Module declarations from 'cpython.bytes' */ |
| 1517 | |
| 1518 | /* Module declarations from 'cpython.pycapsule' */ |
| 1519 | |
| 1520 | /* Module declarations from 'cpython' */ |
| 1521 | |
| 1522 | /* Module declarations from 'array' */ |
| 1523 | |
| 1524 | /* Module declarations from 'cpython.array' */ |
| 1525 | static PyTypeObject *__pyx_ptype_7cpython_5array_array = 0; |
| 1526 | static CYTHON_INLINE__inline__ int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/ |
| 1527 | |
| 1528 | /* Module declarations from 'libc.stdint' */ |
| 1529 | |
| 1530 | /* Module declarations from 'libcpp' */ |
| 1531 | |
| 1532 | /* Module declarations from 'libc.stdlib' */ |
| 1533 | |
| 1534 | /* Module declarations from 'rados' */ |
| 1535 | static PyTypeObject *__pyx_ptype_5rados_Rados = 0; |
| 1536 | static PyTypeObject *__pyx_ptype_5rados_Ioctx = 0; |
| 1537 | |
| 1538 | /* Module declarations from 'rgw' */ |
| 1539 | static PyTypeObject *__pyx_ptype_3rgw_FileHandle = 0; |
| 1540 | static PyTypeObject *__pyx_ptype_3rgw_LibRGWFS = 0; |
| 1541 | static PyTypeObject *__pyx_array_type = 0; |
| 1542 | static PyTypeObject *__pyx_MemviewEnum_type = 0; |
| 1543 | static PyTypeObject *__pyx_memoryview_type = 0; |
| 1544 | static PyTypeObject *__pyx_memoryviewslice_type = 0; |
| 1545 | static PyObject *__pyx_v_3rgw_errno_to_exception = 0; |
| 1546 | static PyObject *generic = 0; |
| 1547 | static PyObject *strided = 0; |
| 1548 | static PyObject *indirect = 0; |
| 1549 | static PyObject *contiguous = 0; |
| 1550 | static PyObject *indirect_contiguous = 0; |
| 1551 | static PyObject *__pyx_f_3rgw_make_ex(PyObject *, PyObject *); /*proto*/ |
| 1552 | static bool_Bool __pyx_f_3rgw_readdir_cb(char const *, void *, uint64_t, struct stat *, uint32_t, uint32_t); /*proto*/ |
| 1553 | static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/ |
| 1554 | static void *__pyx_align_pointer(void *, size_t); /*proto*/ |
| 1555 | static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/ |
| 1556 | static CYTHON_INLINE__inline__ int __pyx_memoryview_check(PyObject *); /*proto*/ |
| 1557 | static PyObject *_unellipsify(PyObject *, int); /*proto*/ |
| 1558 | static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/ |
| 1559 | static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/ |
| 1560 | static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/ |
| 1561 | static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/ |
| 1562 | static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/ |
| 1563 | static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/ |
| 1564 | static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ |
| 1565 | static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ |
| 1566 | static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/ |
| 1567 | static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ |
| 1568 | static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/ |
| 1569 | static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/ |
| 1570 | static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/ |
| 1571 | static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/ |
| 1572 | static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/ |
| 1573 | static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/ |
| 1574 | static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/ |
| 1575 | static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/ |
| 1576 | static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/ |
| 1577 | static int __pyx_memoryview_err(PyObject *, char *); /*proto*/ |
| 1578 | static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/ |
| 1579 | static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/ |
| 1580 | static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/ |
| 1581 | static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ |
| 1582 | static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ |
| 1583 | static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/ |
| 1584 | static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/ |
| 1585 | static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *); /*proto*/ |
| 1586 | static __Pyx_TypeInfo __Pyx_TypeInfo_nn_uint64_t = { "uint64_t", NULL((void*)0), sizeof(uint64_t), { 0 }, 0, IS_UNSIGNED(uint64_t)(((uint64_t) -1) > 0) ? 'U' : 'I', IS_UNSIGNED(uint64_t)(((uint64_t) -1) > 0), 0 }; |
| 1587 | #define __Pyx_MODULE_NAME"rgw" "rgw" |
| 1588 | int __pyx_module_is_main_rgw = 0; |
| 1589 | |
| 1590 | /* Implementation of 'rgw' */ |
| 1591 | static PyObject *__pyx_builtin_Exception; |
| 1592 | static PyObject *__pyx_builtin_TypeError; |
| 1593 | static PyObject *__pyx_builtin_MemoryError; |
| 1594 | static PyObject *__pyx_builtin_ValueError; |
| 1595 | static PyObject *__pyx_builtin_enumerate; |
| 1596 | static PyObject *__pyx_builtin_range; |
| 1597 | static PyObject *__pyx_builtin_Ellipsis; |
| 1598 | static PyObject *__pyx_builtin_id; |
| 1599 | static PyObject *__pyx_builtin_IndexError; |
| 1600 | static char __pyx_k_O[] = "O"; |
| 1601 | static char __pyx_k_T[] = "T{"; |
| 1602 | static char __pyx_k_c[] = "c"; |
| 1603 | static char __pyx_k_l[] = "l"; |
| 1604 | static char __pyx_k_s[] = "(%s)"; |
| 1605 | static char __pyx_k_id[] = "id"; |
| 1606 | static char __pyx_k_EIO[] = "EIO"; |
| 1607 | static char __pyx_k__36[] = "^"; |
| 1608 | static char __pyx_k__37[] = ""; |
| 1609 | static char __pyx_k__38[] = ":"; |
| 1610 | static char __pyx_k__39[] = "}"; |
| 1611 | static char __pyx_k__40[] = ","; |
| 1612 | static char __pyx_k_buf[] = "buf"; |
| 1613 | static char __pyx_k_doc[] = "__doc__"; |
| 1614 | static char __pyx_k_key[] = "key"; |
| 1615 | static char __pyx_k_obj[] = "obj"; |
| 1616 | static char __pyx_k_opt[] = "opt"; |
| 1617 | static char __pyx_k_rgw[] = "rgw"; |
| 1618 | static char __pyx_k_str[] = "__str__"; |
| 1619 | static char __pyx_k_uid[] = "uid"; |
| 1620 | static char __pyx_k_val[] = "val"; |
| 1621 | static char __pyx_k_base[] = "base"; |
| 1622 | static char __pyx_k_cstr[] = "cstr"; |
| 1623 | static char __pyx_k_init[] = "__init__"; |
| 1624 | static char __pyx_k_join[] = "join"; |
| 1625 | static char __pyx_k_main[] = "__main__"; |
| 1626 | static char __pyx_k_mode[] = "mode"; |
| 1627 | static char __pyx_k_name[] = "name"; |
| 1628 | static char __pyx_k_ndim[] = "ndim"; |
| 1629 | static char __pyx_k_pack[] = "pack"; |
| 1630 | static char __pyx_k_self[] = "self"; |
| 1631 | static char __pyx_k_size[] = "size"; |
| 1632 | static char __pyx_k_step[] = "step"; |
| 1633 | static char __pyx_k_stop[] = "stop"; |
| 1634 | static char __pyx_k_test[] = "__test__"; |
| 1635 | static char __pyx_k_type[] = "type_"; |
| 1636 | static char __pyx_k_ASCII[] = "ASCII"; |
| 1637 | static char __pyx_k_EPERM[] = "EPERM"; |
| 1638 | static char __pyx_k_Error[] = "Error"; |
| 1639 | static char __pyx_k_class[] = "__class__"; |
| 1640 | static char __pyx_k_errno[] = "errno"; |
| 1641 | static char __pyx_k_error[] = "error"; |
| 1642 | static char __pyx_k_flags[] = "flags"; |
| 1643 | static char __pyx_k_mount[] = "mount"; |
| 1644 | static char __pyx_k_range[] = "range"; |
| 1645 | static char __pyx_k_shape[] = "shape"; |
| 1646 | static char __pyx_k_start[] = "start"; |
| 1647 | static char __pyx_k_utf_8[] = "utf-8"; |
| 1648 | static char __pyx_k_value[] = "value"; |
| 1649 | static char __pyx_k_EEXIST[] = "EEXIST"; |
| 1650 | static char __pyx_k_EINVAL[] = "EINVAL"; |
| 1651 | static char __pyx_k_ENOENT[] = "ENOENT"; |
| 1652 | static char __pyx_k_ENOSPC[] = "ENOSPC"; |
| 1653 | static char __pyx_k_ERANGE[] = "ERANGE"; |
| 1654 | static char __pyx_k_NoData[] = "NoData"; |
| 1655 | static char __pyx_k_encode[] = "encode"; |
| 1656 | static char __pyx_k_f_flag[] = "f_flag"; |
| 1657 | static char __pyx_k_f_fsid[] = "f_fsid"; |
| 1658 | static char __pyx_k_format[] = "format"; |
| 1659 | static char __pyx_k_import[] = "__import__"; |
| 1660 | static char __pyx_k_module[] = "__module__"; |
| 1661 | static char __pyx_k_name_2[] = "__name__"; |
| 1662 | static char __pyx_k_offset[] = "offset"; |
| 1663 | static char __pyx_k_secret[] = "secret"; |
| 1664 | static char __pyx_k_st_dev[] = "st_dev"; |
| 1665 | static char __pyx_k_st_gid[] = "st_gid"; |
| 1666 | static char __pyx_k_st_ino[] = "st_ino"; |
| 1667 | static char __pyx_k_st_uid[] = "st_uid"; |
| 1668 | static char __pyx_k_struct[] = "struct"; |
| 1669 | static char __pyx_k_unpack[] = "unpack"; |
| 1670 | static char __pyx_k_ENODATA[] = "ENODATA"; |
| 1671 | static char __pyx_k_IOError[] = "IOError"; |
| 1672 | static char __pyx_k_NoSpace[] = "NoSpace"; |
| 1673 | static char __pyx_k_OSError[] = "OSError"; |
| 1674 | static char __pyx_k_dirname[] = "dirname"; |
| 1675 | static char __pyx_k_f_bfree[] = "f_bfree"; |
| 1676 | static char __pyx_k_f_bsize[] = "f_bsize"; |
| 1677 | static char __pyx_k_f_ffree[] = "f_ffree"; |
| 1678 | static char __pyx_k_f_files[] = "f_files"; |
| 1679 | static char __pyx_k_fortran[] = "fortran"; |
| 1680 | static char __pyx_k_handler[] = "handler"; |
| 1681 | static char __pyx_k_memview[] = "memview"; |
| 1682 | static char __pyx_k_mounted[] = "mounted"; |
| 1683 | static char __pyx_k_prepare[] = "__prepare__"; |
| 1684 | static char __pyx_k_st_mode[] = "st_mode"; |
| 1685 | static char __pyx_k_st_rdev[] = "st_rdev"; |
| 1686 | static char __pyx_k_st_size[] = "st_size"; |
| 1687 | static char __pyx_k_Ellipsis[] = "Ellipsis"; |
| 1688 | static char __pyx_k_datetime[] = "datetime"; |
| 1689 | static char __pyx_k_dst_name[] = "dst_name"; |
| 1690 | static char __pyx_k_encoding[] = "encoding"; |
| 1691 | static char __pyx_k_f_bavail[] = "f_bavail"; |
| 1692 | static char __pyx_k_f_blocks[] = "f_blocks"; |
| 1693 | static char __pyx_k_f_favail[] = "f_favail"; |
| 1694 | static char __pyx_k_f_frsize[] = "f_frsize"; |
| 1695 | static char __pyx_k_filename[] = "filename"; |
| 1696 | static char __pyx_k_itemsize[] = "itemsize"; |
| 1697 | static char __pyx_k_qualname[] = "__qualname__"; |
| 1698 | static char __pyx_k_shutdown[] = "shutdown"; |
| 1699 | static char __pyx_k_src_name[] = "src_name"; |
| 1700 | static char __pyx_k_st_atime[] = "st_atime"; |
| 1701 | static char __pyx_k_st_ctime[] = "st_ctime"; |
| 1702 | static char __pyx_k_st_mtime[] = "st_mtime"; |
| 1703 | static char __pyx_k_st_nlink[] = "st_nlink"; |
| 1704 | static char __pyx_k_strerror[] = "strerror"; |
| 1705 | static char __pyx_k_umounted[] = "umounted"; |
| 1706 | static char __pyx_k_Errno_0_1[] = "[Errno {0}] {1}"; |
| 1707 | static char __pyx_k_Exception[] = "Exception"; |
| 1708 | static char __pyx_k_TypeError[] = "TypeError"; |
| 1709 | static char __pyx_k_enumerate[] = "enumerate"; |
| 1710 | static char __pyx_k_f_namemax[] = "f_namemax"; |
| 1711 | static char __pyx_k_metaclass[] = "__metaclass__"; |
| 1712 | static char __pyx_k_st_blocks[] = "st_blocks"; |
| 1713 | static char __pyx_k_traceback[] = "traceback"; |
| 1714 | static char __pyx_k_EOPNOTSUPP[] = "EOPNOTSUPP"; |
| 1715 | static char __pyx_k_IndexError[] = "IndexError"; |
| 1716 | static char __pyx_k_OutOfRange[] = "OutOfRange"; |
| 1717 | static char __pyx_k_StatResult[] = "StatResult"; |
| 1718 | static char __pyx_k_ValueError[] = "ValueError"; |
| 1719 | static char __pyx_k_WouldBlock[] = "WouldBlock"; |
| 1720 | static char __pyx_k_iterate_cb[] = "iterate_cb"; |
| 1721 | static char __pyx_k_namedtuple[] = "namedtuple"; |
| 1722 | static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; |
| 1723 | static char __pyx_k_st_blksize[] = "st_blksize"; |
| 1724 | static char __pyx_k_EWOULDBLOCK[] = "EWOULDBLOCK"; |
| 1725 | static char __pyx_k_MemoryError[] = "MemoryError"; |
| 1726 | static char __pyx_k_collections[] = "collections"; |
| 1727 | static char __pyx_k_dir_handler[] = "dir_handler"; |
| 1728 | static char __pyx_k_dst_handler[] = "dst_handler"; |
| 1729 | static char __pyx_k_src_handler[] = "src_handler"; |
| 1730 | static char __pyx_k_InvalidValue[] = "InvalidValue"; |
| 1731 | static char __pyx_k_ObjectExists[] = "ObjectExists"; |
| 1732 | static char __pyx_k_error_code_d[] = ": error code %d"; |
| 1733 | static char __pyx_k_file_handler[] = "file_handler"; |
| 1734 | static char __pyx_k_fsync_failed[] = "fsync failed"; |
| 1735 | static char __pyx_k_OSError___str[] = "OSError.__str__"; |
| 1736 | static char __pyx_k_error_in_read[] = "error in read"; |
| 1737 | static char __pyx_k_fromtimestamp[] = "fromtimestamp"; |
| 1738 | static char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer"; |
| 1739 | static char __pyx_k_require_state[] = "require_state"; |
| 1740 | static char __pyx_k_statfs_failed[] = "statfs failed"; |
| 1741 | static char __pyx_k_OSError___init[] = "OSError.__init__"; |
| 1742 | static char __pyx_k_ObjectNotFound[] = "ObjectNotFound"; |
| 1743 | static char __pyx_k_error_in_close[] = "error in close"; |
| 1744 | static char __pyx_k_error_in_write[] = "error in write"; |
| 1745 | static char __pyx_k_PermissionError[] = "PermissionError"; |
| 1746 | static char __pyx_k_allocate_buffer[] = "allocate_buffer"; |
| 1747 | static char __pyx_k_dtype_is_object[] = "dtype_is_object"; |
| 1748 | static char __pyx_k_error_in_open_s[] = "error in open '%s'"; |
| 1749 | static char __pyx_k_error_in_unlink[] = "error in unlink"; |
| 1750 | static char __pyx_k_error_in_getattr[] = "error in getattr"; |
| 1751 | static char __pyx_k_error_in_mkdir_s[] = "error in mkdir '%s'"; |
| 1752 | static char __pyx_k_error_in_readdir[] = "error in readdir"; |
| 1753 | static char __pyx_k_l_must_be_an_int[] = "l must be an int"; |
| 1754 | static char __pyx_k_error_in_create_s[] = "error in create '%s'"; |
| 1755 | static char __pyx_k_s_must_be_a_string[] = "%s must be a string"; |
| 1756 | static char __pyx_k_strided_and_direct[] = "<strided and direct>"; |
| 1757 | static char __pyx_k_LibCephFSStateError[] = "LibCephFSStateError"; |
| 1758 | static char __pyx_k_buf_must_be_a_bytes[] = "buf must be a bytes"; |
| 1759 | static char __pyx_k_IncompleteWriteError[] = "IncompleteWriteError"; |
| 1760 | static char __pyx_k_strided_and_indirect[] = "<strided and indirect>"; |
| 1761 | static char __pyx_k_OperationNotSupported[] = "OperationNotSupported"; |
| 1762 | static char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>"; |
| 1763 | static char __pyx_k_offset_must_be_an_int[] = "offset must be an int"; |
| 1764 | static char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>"; |
| 1765 | static char __pyx_k_error_in_rename_s_to_s[] = "error in rename '%s' to '%s'"; |
| 1766 | static char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>"; |
| 1767 | static char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>"; |
| 1768 | static char __pyx_k_error_calling_rgw_mount[] = "error calling rgw_mount"; |
| 1769 | static char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'"; |
| 1770 | static char __pyx_k_error_calling_rgw_umount[] = "error calling rgw_umount"; |
| 1771 | static char __pyx_k_flags_must_be_an_integer[] = "flags must be an integer"; |
| 1772 | static char __pyx_k_getbuffer_obj_view_flags[] = "getbuffer(obj, view, flags)"; |
| 1773 | static char __pyx_k_Dimension_d_is_not_direct[] = "Dimension %d is not direct"; |
| 1774 | static char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d."; |
| 1775 | static char __pyx_k_error_calling_rgw_unmount[] = "error calling rgw_unmount"; |
| 1776 | static char __pyx_k_Index_out_of_bounds_axis_d[] = "Index out of bounds (axis %d)"; |
| 1777 | static char __pyx_k_Step_may_not_be_zero_axis_d[] = "Step may not be zero (axis %d)"; |
| 1778 | static char __pyx_k_error_calling_librgw_create[] = "error calling librgw_create"; |
| 1779 | static char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array"; |
| 1780 | static char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data."; |
| 1781 | static char __pyx_k_home_bhubbard_working_src_ceph[] = "/home/bhubbard/working/src/ceph/src/pybind/rgw/rgw.pyx"; |
| 1782 | static char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>"; |
| 1783 | static char __pyx_k_OSError_class_derived_from_Erro[] = " `OSError` class, derived from `Error` "; |
| 1784 | static char __pyx_k_This_module_is_a_thin_wrapper_a[] = "\nThis module is a thin wrapper around rgw_file.\n"; |
| 1785 | static char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced"; |
| 1786 | static char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides"; |
| 1787 | static char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory."; |
| 1788 | static char __pyx_k_Cannot_transpose_memoryview_with[] = "Cannot transpose memoryview with indirect dimensions"; |
| 1789 | static char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array"; |
| 1790 | static char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported"; |
| 1791 | static char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s"; |
| 1792 | static char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)"; |
| 1793 | static char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object"; |
| 1794 | static char __pyx_k_You_cannot_perform_that_operatio[] = "You cannot perform that operation on a RGWFS object in state %s."; |
| 1795 | static char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)"; |
| 1796 | static char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides."; |
| 1797 | static PyObject *__pyx_n_s_ASCII; |
| 1798 | static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri; |
| 1799 | static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is; |
| 1800 | static PyObject *__pyx_kp_s_Cannot_index_with_type_s; |
| 1801 | static PyObject *__pyx_n_s_EEXIST; |
| 1802 | static PyObject *__pyx_n_s_EINVAL; |
| 1803 | static PyObject *__pyx_n_s_EIO; |
| 1804 | static PyObject *__pyx_n_s_ENODATA; |
| 1805 | static PyObject *__pyx_n_s_ENOENT; |
| 1806 | static PyObject *__pyx_n_s_ENOSPC; |
| 1807 | static PyObject *__pyx_n_s_EOPNOTSUPP; |
| 1808 | static PyObject *__pyx_n_s_EPERM; |
| 1809 | static PyObject *__pyx_n_s_ERANGE; |
| 1810 | static PyObject *__pyx_n_s_EWOULDBLOCK; |
| 1811 | static PyObject *__pyx_n_s_Ellipsis; |
| 1812 | static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr; |
| 1813 | static PyObject *__pyx_kp_s_Errno_0_1; |
| 1814 | static PyObject *__pyx_n_s_Error; |
| 1815 | static PyObject *__pyx_n_s_Exception; |
| 1816 | static PyObject *__pyx_n_s_IOError; |
| 1817 | static PyObject *__pyx_n_s_IncompleteWriteError; |
| 1818 | static PyObject *__pyx_n_s_IndexError; |
| 1819 | static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte; |
| 1820 | static PyObject *__pyx_n_s_InvalidValue; |
| 1821 | static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr; |
| 1822 | static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d; |
| 1823 | static PyObject *__pyx_n_s_LibCephFSStateError; |
| 1824 | static PyObject *__pyx_n_s_MemoryError; |
| 1825 | static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x; |
| 1826 | static PyObject *__pyx_kp_s_MemoryView_of_r_object; |
| 1827 | static PyObject *__pyx_n_s_NoData; |
| 1828 | static PyObject *__pyx_n_s_NoSpace; |
| 1829 | static PyObject *__pyx_n_b_O; |
| 1830 | static PyObject *__pyx_n_s_OSError; |
| 1831 | static PyObject *__pyx_n_s_OSError___init; |
| 1832 | static PyObject *__pyx_n_s_OSError___str; |
| 1833 | static PyObject *__pyx_kp_s_OSError_class_derived_from_Erro; |
| 1834 | static PyObject *__pyx_n_s_ObjectExists; |
| 1835 | static PyObject *__pyx_n_s_ObjectNotFound; |
| 1836 | static PyObject *__pyx_n_s_OperationNotSupported; |
| 1837 | static PyObject *__pyx_n_s_OutOfRange; |
| 1838 | static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a; |
| 1839 | static PyObject *__pyx_n_s_PermissionError; |
| 1840 | static PyObject *__pyx_n_s_StatResult; |
| 1841 | static PyObject *__pyx_kp_b_T; |
| 1842 | static PyObject *__pyx_n_s_TypeError; |
| 1843 | static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object; |
| 1844 | static PyObject *__pyx_n_s_ValueError; |
| 1845 | static PyObject *__pyx_n_s_WouldBlock; |
| 1846 | static PyObject *__pyx_kp_s_You_cannot_perform_that_operatio; |
| 1847 | static PyObject *__pyx_kp_b__36; |
| 1848 | static PyObject *__pyx_kp_b__37; |
| 1849 | static PyObject *__pyx_kp_b__38; |
| 1850 | static PyObject *__pyx_kp_b__39; |
| 1851 | static PyObject *__pyx_kp_u__40; |
| 1852 | static PyObject *__pyx_n_s_allocate_buffer; |
| 1853 | static PyObject *__pyx_n_s_base; |
| 1854 | static PyObject *__pyx_n_s_buf; |
| 1855 | static PyObject *__pyx_kp_s_buf_must_be_a_bytes; |
| 1856 | static PyObject *__pyx_n_s_c; |
| 1857 | static PyObject *__pyx_n_u_c; |
| 1858 | static PyObject *__pyx_n_s_class; |
| 1859 | static PyObject *__pyx_n_s_collections; |
| 1860 | static PyObject *__pyx_kp_s_contiguous_and_direct; |
| 1861 | static PyObject *__pyx_kp_s_contiguous_and_indirect; |
| 1862 | static PyObject *__pyx_n_s_cstr; |
| 1863 | static PyObject *__pyx_n_s_datetime; |
| 1864 | static PyObject *__pyx_n_s_dir_handler; |
| 1865 | static PyObject *__pyx_n_s_dirname; |
| 1866 | static PyObject *__pyx_n_s_doc; |
| 1867 | static PyObject *__pyx_n_s_dst_handler; |
| 1868 | static PyObject *__pyx_n_s_dst_name; |
| 1869 | static PyObject *__pyx_n_s_dtype_is_object; |
| 1870 | static PyObject *__pyx_n_s_encode; |
| 1871 | static PyObject *__pyx_n_s_encoding; |
| 1872 | static PyObject *__pyx_n_s_enumerate; |
| 1873 | static PyObject *__pyx_n_s_errno; |
| 1874 | static PyObject *__pyx_n_s_error; |
| 1875 | static PyObject *__pyx_kp_s_error_calling_librgw_create; |
| 1876 | static PyObject *__pyx_kp_s_error_calling_rgw_mount; |
| 1877 | static PyObject *__pyx_kp_s_error_calling_rgw_umount; |
| 1878 | static PyObject *__pyx_kp_s_error_calling_rgw_unmount; |
| 1879 | static PyObject *__pyx_kp_s_error_code_d; |
| 1880 | static PyObject *__pyx_kp_s_error_in_close; |
| 1881 | static PyObject *__pyx_kp_s_error_in_create_s; |
| 1882 | static PyObject *__pyx_kp_s_error_in_getattr; |
| 1883 | static PyObject *__pyx_kp_s_error_in_mkdir_s; |
| 1884 | static PyObject *__pyx_kp_s_error_in_open_s; |
| 1885 | static PyObject *__pyx_kp_s_error_in_read; |
| 1886 | static PyObject *__pyx_kp_s_error_in_readdir; |
| 1887 | static PyObject *__pyx_kp_s_error_in_rename_s_to_s; |
| 1888 | static PyObject *__pyx_kp_s_error_in_unlink; |
| 1889 | static PyObject *__pyx_kp_s_error_in_write; |
| 1890 | static PyObject *__pyx_n_s_f_bavail; |
| 1891 | static PyObject *__pyx_n_s_f_bfree; |
| 1892 | static PyObject *__pyx_n_s_f_blocks; |
| 1893 | static PyObject *__pyx_n_s_f_bsize; |
| 1894 | static PyObject *__pyx_n_s_f_favail; |
| 1895 | static PyObject *__pyx_n_s_f_ffree; |
| 1896 | static PyObject *__pyx_n_s_f_files; |
| 1897 | static PyObject *__pyx_n_s_f_flag; |
| 1898 | static PyObject *__pyx_n_s_f_frsize; |
| 1899 | static PyObject *__pyx_n_s_f_fsid; |
| 1900 | static PyObject *__pyx_n_s_f_namemax; |
| 1901 | static PyObject *__pyx_n_s_file_handler; |
| 1902 | static PyObject *__pyx_n_s_filename; |
| 1903 | static PyObject *__pyx_n_s_flags; |
| 1904 | static PyObject *__pyx_kp_s_flags_must_be_an_integer; |
| 1905 | static PyObject *__pyx_n_s_format; |
| 1906 | static PyObject *__pyx_n_s_fortran; |
| 1907 | static PyObject *__pyx_n_u_fortran; |
| 1908 | static PyObject *__pyx_n_s_fromtimestamp; |
| 1909 | static PyObject *__pyx_kp_s_fsync_failed; |
| 1910 | static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi; |
| 1911 | static PyObject *__pyx_n_s_handler; |
| 1912 | static PyObject *__pyx_kp_s_home_bhubbard_working_src_ceph; |
| 1913 | static PyObject *__pyx_n_s_id; |
| 1914 | static PyObject *__pyx_n_s_import; |
| 1915 | static PyObject *__pyx_n_s_init; |
| 1916 | static PyObject *__pyx_n_s_itemsize; |
| 1917 | static PyObject *__pyx_kp_s_itemsize_0_for_cython_array; |
| 1918 | static PyObject *__pyx_n_s_iterate_cb; |
| 1919 | static PyObject *__pyx_n_s_join; |
| 1920 | static PyObject *__pyx_n_s_key; |
| 1921 | static PyObject *__pyx_n_s_l; |
| 1922 | static PyObject *__pyx_kp_s_l_must_be_an_int; |
| 1923 | static PyObject *__pyx_n_s_main; |
| 1924 | static PyObject *__pyx_n_s_memview; |
| 1925 | static PyObject *__pyx_n_s_metaclass; |
| 1926 | static PyObject *__pyx_n_s_mode; |
| 1927 | static PyObject *__pyx_n_s_module; |
| 1928 | static PyObject *__pyx_n_s_mount; |
| 1929 | static PyObject *__pyx_n_s_mounted; |
| 1930 | static PyObject *__pyx_n_s_name; |
| 1931 | static PyObject *__pyx_n_s_name_2; |
| 1932 | static PyObject *__pyx_n_s_namedtuple; |
| 1933 | static PyObject *__pyx_n_s_ndim; |
| 1934 | static PyObject *__pyx_n_s_obj; |
| 1935 | static PyObject *__pyx_n_s_offset; |
| 1936 | static PyObject *__pyx_kp_s_offset_must_be_an_int; |
| 1937 | static PyObject *__pyx_n_s_opt; |
| 1938 | static PyObject *__pyx_n_s_pack; |
| 1939 | static PyObject *__pyx_n_s_prepare; |
| 1940 | static PyObject *__pyx_n_s_pyx_getbuffer; |
| 1941 | static PyObject *__pyx_n_s_pyx_vtable; |
| 1942 | static PyObject *__pyx_n_s_qualname; |
| 1943 | static PyObject *__pyx_n_s_range; |
| 1944 | static PyObject *__pyx_n_s_require_state; |
| 1945 | static PyObject *__pyx_n_s_rgw; |
| 1946 | static PyObject *__pyx_kp_u_s; |
| 1947 | static PyObject *__pyx_kp_s_s_must_be_a_string; |
| 1948 | static PyObject *__pyx_n_s_secret; |
| 1949 | static PyObject *__pyx_n_s_self; |
| 1950 | static PyObject *__pyx_n_s_shape; |
| 1951 | static PyObject *__pyx_n_s_shutdown; |
| 1952 | static PyObject *__pyx_n_s_size; |
| 1953 | static PyObject *__pyx_n_s_src_handler; |
| 1954 | static PyObject *__pyx_n_s_src_name; |
| 1955 | static PyObject *__pyx_n_s_st_atime; |
| 1956 | static PyObject *__pyx_n_s_st_blksize; |
| 1957 | static PyObject *__pyx_n_s_st_blocks; |
| 1958 | static PyObject *__pyx_n_s_st_ctime; |
| 1959 | static PyObject *__pyx_n_s_st_dev; |
| 1960 | static PyObject *__pyx_n_s_st_gid; |
| 1961 | static PyObject *__pyx_n_s_st_ino; |
| 1962 | static PyObject *__pyx_n_s_st_mode; |
| 1963 | static PyObject *__pyx_n_s_st_mtime; |
| 1964 | static PyObject *__pyx_n_s_st_nlink; |
| 1965 | static PyObject *__pyx_n_s_st_rdev; |
| 1966 | static PyObject *__pyx_n_s_st_size; |
| 1967 | static PyObject *__pyx_n_s_st_uid; |
| 1968 | static PyObject *__pyx_n_s_start; |
| 1969 | static PyObject *__pyx_kp_s_statfs_failed; |
| 1970 | static PyObject *__pyx_n_s_step; |
| 1971 | static PyObject *__pyx_n_s_stop; |
| 1972 | static PyObject *__pyx_n_s_str; |
| 1973 | static PyObject *__pyx_n_s_strerror; |
| 1974 | static PyObject *__pyx_kp_s_strided_and_direct; |
| 1975 | static PyObject *__pyx_kp_s_strided_and_direct_or_indirect; |
| 1976 | static PyObject *__pyx_kp_s_strided_and_indirect; |
| 1977 | static PyObject *__pyx_n_s_struct; |
| 1978 | static PyObject *__pyx_n_s_test; |
| 1979 | static PyObject *__pyx_n_s_traceback; |
| 1980 | static PyObject *__pyx_n_s_type; |
| 1981 | static PyObject *__pyx_n_s_uid; |
| 1982 | static PyObject *__pyx_n_s_umounted; |
| 1983 | static PyObject *__pyx_kp_s_unable_to_allocate_array_data; |
| 1984 | static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str; |
| 1985 | static PyObject *__pyx_n_s_unpack; |
| 1986 | static PyObject *__pyx_kp_s_utf_8; |
| 1987 | static PyObject *__pyx_n_s_val; |
| 1988 | static PyObject *__pyx_n_s_value; |
| 1989 | static PyObject *__pyx_pf_3rgw_7OSError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errno, PyObject *__pyx_v_strerror); /* proto */ |
| 1990 | static PyObject *__pyx_pf_3rgw_7OSError_2__str__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ |
| 1991 | static PyObject *__pyx_pf_3rgw_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 */ |
| 1992 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_require_state(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ |
| 1993 | static int __pyx_pf_3rgw_8LibRGWFS_2__cinit__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_uid, PyObject *__pyx_v_key, PyObject *__pyx_v_secret); /* proto */ |
| 1994 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_4shutdown(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 1995 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_6__enter__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 1996 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_8__exit__(struct __pyx_obj_3rgw_LibRGWFS *__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 */ |
| 1997 | static void __pyx_pf_3rgw_8LibRGWFS_10__dealloc__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 1998 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_12version(CYTHON_UNUSED__attribute__ ((__unused__)) struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 1999 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_14mount(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 2000 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_16unmount(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 2001 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_18statfs(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 2002 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_20create(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler, PyObject *__pyx_v_filename, PyObject *__pyx_v_flags); /* proto */ |
| 2003 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_22mkdir(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler, PyObject *__pyx_v_dirname, PyObject *__pyx_v_flags); /* proto */ |
| 2004 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_24rename(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_src_handler, PyObject *__pyx_v_src_name, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dst_handler, PyObject *__pyx_v_dst_name, PyObject *__pyx_v_flags); /* proto */ |
| 2005 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_26unlink(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_handler, PyObject *__pyx_v_name, PyObject *__pyx_v_flags); /* proto */ |
| 2006 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_28readdir(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler, PyObject *__pyx_v_iterate_cb, PyObject *__pyx_v_offset, PyObject *__pyx_v_flags); /* proto */ |
| 2007 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_30fstat(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler); /* proto */ |
| 2008 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_32opendir(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler, PyObject *__pyx_v_dirname, PyObject *__pyx_v_flags); /* proto */ |
| 2009 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_34open(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler, PyObject *__pyx_v_filename, PyObject *__pyx_v_flags); /* proto */ |
| 2010 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_36close(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler, PyObject *__pyx_v_flags); /* proto */ |
| 2011 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_38read(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler, PyObject *__pyx_v_offset, PyObject *__pyx_v_l, PyObject *__pyx_v_flags); /* proto */ |
| 2012 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_40write(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler, PyObject *__pyx_v_offset, PyObject *__pyx_v_buf, PyObject *__pyx_v_flags); /* proto */ |
| 2013 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_42fsync(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_handler, PyObject *__pyx_v_flags); /* proto */ |
| 2014 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_5state___get__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 2015 | static int __pyx_pf_3rgw_8LibRGWFS_5state_2__set__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ |
| 2016 | static int __pyx_pf_3rgw_8LibRGWFS_5state_4__del__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 2017 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_3uid___get__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 2018 | static int __pyx_pf_3rgw_8LibRGWFS_3uid_2__set__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ |
| 2019 | static int __pyx_pf_3rgw_8LibRGWFS_3uid_4__del__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 2020 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_3key___get__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 2021 | static int __pyx_pf_3rgw_8LibRGWFS_3key_2__set__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ |
| 2022 | static int __pyx_pf_3rgw_8LibRGWFS_3key_4__del__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 2023 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_6secret___get__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 2024 | static int __pyx_pf_3rgw_8LibRGWFS_6secret_2__set__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ |
| 2025 | static int __pyx_pf_3rgw_8LibRGWFS_6secret_4__del__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self); /* proto */ |
| 2026 | static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_v_flags); /* proto */ |
| 2027 | static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED__attribute__ ((__unused__)) arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ |
| 2028 | static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */ |
| 2029 | static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ |
| 2030 | static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */ |
| 2031 | static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */ |
| 2032 | static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */ |
| 2033 | static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ |
| 2034 | static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */ |
| 2035 | static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ |
| 2036 | static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */ |
| 2037 | static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */ |
| 2038 | static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2039 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */ |
| 2040 | static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */ |
| 2041 | static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ |
| 2042 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2043 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2044 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2045 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2046 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2047 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2048 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2049 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2050 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2051 | static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2052 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2053 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2054 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2055 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2056 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2057 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ |
| 2058 | static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ |
| 2059 | static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ |
| 2060 | static PyObject *__pyx_tp_new_3rgw_FileHandle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ |
| 2061 | static PyObject *__pyx_tp_new_3rgw_LibRGWFS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ |
| 2062 | static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ |
| 2063 | static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ |
| 2064 | static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ |
| 2065 | static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ |
| 2066 | static PyObject *__pyx_int_0; |
| 2067 | static PyObject *__pyx_int_1; |
| 2068 | static PyObject *__pyx_int_neg_1; |
| 2069 | static PyObject *__pyx_tuple_; |
| 2070 | static PyObject *__pyx_tuple__2; |
| 2071 | static PyObject *__pyx_tuple__3; |
| 2072 | static PyObject *__pyx_tuple__4; |
| 2073 | static PyObject *__pyx_tuple__5; |
| 2074 | static PyObject *__pyx_tuple__6; |
| 2075 | static PyObject *__pyx_tuple__7; |
| 2076 | static PyObject *__pyx_tuple__8; |
| 2077 | static PyObject *__pyx_tuple__9; |
| 2078 | static PyObject *__pyx_slice__32; |
| 2079 | static PyObject *__pyx_slice__33; |
| 2080 | static PyObject *__pyx_slice__34; |
| 2081 | static PyObject *__pyx_tuple__10; |
| 2082 | static PyObject *__pyx_tuple__11; |
| 2083 | static PyObject *__pyx_tuple__12; |
| 2084 | static PyObject *__pyx_tuple__13; |
| 2085 | static PyObject *__pyx_tuple__14; |
| 2086 | static PyObject *__pyx_tuple__15; |
| 2087 | static PyObject *__pyx_tuple__16; |
| 2088 | static PyObject *__pyx_tuple__17; |
| 2089 | static PyObject *__pyx_tuple__18; |
| 2090 | static PyObject *__pyx_tuple__19; |
| 2091 | static PyObject *__pyx_tuple__20; |
| 2092 | static PyObject *__pyx_tuple__21; |
| 2093 | static PyObject *__pyx_tuple__22; |
| 2094 | static PyObject *__pyx_tuple__23; |
| 2095 | static PyObject *__pyx_tuple__24; |
| 2096 | static PyObject *__pyx_tuple__25; |
| 2097 | static PyObject *__pyx_tuple__26; |
| 2098 | static PyObject *__pyx_tuple__27; |
| 2099 | static PyObject *__pyx_tuple__28; |
| 2100 | static PyObject *__pyx_tuple__29; |
| 2101 | static PyObject *__pyx_tuple__30; |
| 2102 | static PyObject *__pyx_tuple__31; |
| 2103 | static PyObject *__pyx_tuple__35; |
| 2104 | static PyObject *__pyx_tuple__41; |
| 2105 | static PyObject *__pyx_tuple__43; |
| 2106 | static PyObject *__pyx_tuple__45; |
| 2107 | static PyObject *__pyx_tuple__47; |
| 2108 | static PyObject *__pyx_tuple__48; |
| 2109 | static PyObject *__pyx_tuple__49; |
| 2110 | static PyObject *__pyx_tuple__50; |
| 2111 | static PyObject *__pyx_tuple__51; |
| 2112 | static PyObject *__pyx_codeobj__42; |
| 2113 | static PyObject *__pyx_codeobj__44; |
| 2114 | static PyObject *__pyx_codeobj__46; |
| 2115 | |
| 2116 | /* "rgw.pyx":189 |
| 2117 | * class OSError(Error): |
| 2118 | * """ `OSError` class, derived from `Error` """ |
| 2119 | * def __init__(self, errno, strerror): # <<<<<<<<<<<<<< |
| 2120 | * self.errno = errno |
| 2121 | * self.strerror = strerror |
| 2122 | */ |
| 2123 | |
| 2124 | /* Python wrapper */ |
| 2125 | static PyObject *__pyx_pw_3rgw_7OSError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 2126 | static PyMethodDef __pyx_mdef_3rgw_7OSError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rgw_7OSError_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}; |
| 2127 | static PyObject *__pyx_pw_3rgw_7OSError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 2128 | PyObject *__pyx_v_self = 0; |
| 2129 | PyObject *__pyx_v_errno = 0; |
| 2130 | PyObject *__pyx_v_strerror = 0; |
| 2131 | int __pyx_lineno = 0; |
| 2132 | const char *__pyx_filename = NULL((void*)0); |
| 2133 | int __pyx_clineno = 0; |
| 2134 | PyObject *__pyx_r = 0; |
| 2135 | __Pyx_RefNannyDeclarations |
| 2136 | __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); |
| 2137 | { |
| 2138 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_errno,&__pyx_n_s_strerror,0}; |
| 2139 | PyObject* values[3] = {0,0,0}; |
| 2140 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 2141 | Py_ssize_t kw_args; |
| 2142 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 2143 | switch (pos_args) { |
| 2144 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 2145 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 2146 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 2147 | case 0: break; |
| 2148 | default: goto __pyx_L5_argtuple_error; |
| 2149 | } |
| 2150 | kw_args = PyDict_Size(__pyx_kwds); |
| 2151 | switch (pos_args) { |
| 2152 | case 0: |
| 2153 | 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--; |
| 2154 | else goto __pyx_L5_argtuple_error; |
| 2155 | case 1: |
| 2156 | 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--; |
| 2157 | else { |
| 2158 | __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__2158; goto __pyx_L3_error;} |
| 2159 | } |
| 2160 | case 2: |
| 2161 | 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--; |
| 2162 | else { |
| 2163 | __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__2163; goto __pyx_L3_error;} |
| 2164 | } |
| 2165 | } |
| 2166 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 2167 | 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 = 189; __pyx_clineno = __LINE__2167; goto __pyx_L3_error;} |
| 2168 | } |
| 2169 | } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) { |
| 2170 | goto __pyx_L5_argtuple_error; |
| 2171 | } else { |
| 2172 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 2173 | values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 2174 | values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 2175 | } |
| 2176 | __pyx_v_self = values[0]; |
| 2177 | __pyx_v_errno = values[1]; |
| 2178 | __pyx_v_strerror = values[2]; |
| 2179 | } |
| 2180 | goto __pyx_L4_argument_unpacking_done; |
| 2181 | __pyx_L5_argtuple_error:; |
| 2182 | __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__2182; goto __pyx_L3_error;} |
| 2183 | __pyx_L3_error:; |
| 2184 | __Pyx_AddTraceback("rgw.OSError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2185 | __Pyx_RefNannyFinishContext(); |
| 2186 | return NULL((void*)0); |
| 2187 | __pyx_L4_argument_unpacking_done:; |
| 2188 | __pyx_r = __pyx_pf_3rgw_7OSError___init__(__pyx_self, __pyx_v_self, __pyx_v_errno, __pyx_v_strerror); |
| 2189 | |
| 2190 | /* function exit code */ |
| 2191 | __Pyx_RefNannyFinishContext(); |
| 2192 | return __pyx_r; |
| 2193 | } |
| 2194 | |
| 2195 | static PyObject *__pyx_pf_3rgw_7OSError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errno, PyObject *__pyx_v_strerror) { |
| 2196 | PyObject *__pyx_r = NULL((void*)0); |
| 2197 | __Pyx_RefNannyDeclarations |
| 2198 | int __pyx_lineno = 0; |
| 2199 | const char *__pyx_filename = NULL((void*)0); |
| 2200 | int __pyx_clineno = 0; |
| 2201 | __Pyx_RefNannySetupContext("__init__", 0); |
| 2202 | |
| 2203 | /* "rgw.pyx":190 |
| 2204 | * """ `OSError` class, derived from `Error` """ |
| 2205 | * def __init__(self, errno, strerror): |
| 2206 | * self.errno = errno # <<<<<<<<<<<<<< |
| 2207 | * self.strerror = strerror |
| 2208 | * |
| 2209 | */ |
| 2210 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_errno, __pyx_v_errno) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__2210; goto __pyx_L1_error;} |
| 2211 | |
| 2212 | /* "rgw.pyx":191 |
| 2213 | * def __init__(self, errno, strerror): |
| 2214 | * self.errno = errno |
| 2215 | * self.strerror = strerror # <<<<<<<<<<<<<< |
| 2216 | * |
| 2217 | * def __str__(self): |
| 2218 | */ |
| 2219 | if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strerror, __pyx_v_strerror) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__2219; goto __pyx_L1_error;} |
| 2220 | |
| 2221 | /* "rgw.pyx":189 |
| 2222 | * class OSError(Error): |
| 2223 | * """ `OSError` class, derived from `Error` """ |
| 2224 | * def __init__(self, errno, strerror): # <<<<<<<<<<<<<< |
| 2225 | * self.errno = errno |
| 2226 | * self.strerror = strerror |
| 2227 | */ |
| 2228 | |
| 2229 | /* function exit code */ |
| 2230 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 2231 | goto __pyx_L0; |
| 2232 | __pyx_L1_error:; |
| 2233 | __Pyx_AddTraceback("rgw.OSError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2234 | __pyx_r = NULL((void*)0); |
| 2235 | __pyx_L0:; |
| 2236 | __Pyx_XGIVEREF(__pyx_r); |
| 2237 | __Pyx_RefNannyFinishContext(); |
| 2238 | return __pyx_r; |
| 2239 | } |
| 2240 | |
| 2241 | /* "rgw.pyx":193 |
| 2242 | * self.strerror = strerror |
| 2243 | * |
| 2244 | * def __str__(self): # <<<<<<<<<<<<<< |
| 2245 | * return '[Errno {0}] {1}'.format(self.errno, self.strerror) |
| 2246 | * |
| 2247 | */ |
| 2248 | |
| 2249 | /* Python wrapper */ |
| 2250 | static PyObject *__pyx_pw_3rgw_7OSError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ |
| 2251 | static PyMethodDef __pyx_mdef_3rgw_7OSError_3__str__ = {"__str__", (PyCFunction)__pyx_pw_3rgw_7OSError_3__str__, METH_O0x0008, 0}; |
| 2252 | static PyObject *__pyx_pw_3rgw_7OSError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { |
| 2253 | PyObject *__pyx_r = 0; |
| 2254 | __Pyx_RefNannyDeclarations |
| 2255 | __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); |
| 2256 | __pyx_r = __pyx_pf_3rgw_7OSError_2__str__(__pyx_self, ((PyObject *)__pyx_v_self)); |
| 2257 | |
| 2258 | /* function exit code */ |
| 2259 | __Pyx_RefNannyFinishContext(); |
| 2260 | return __pyx_r; |
| 2261 | } |
| 2262 | |
| 2263 | static PyObject *__pyx_pf_3rgw_7OSError_2__str__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self) { |
| 2264 | PyObject *__pyx_r = NULL((void*)0); |
| 2265 | __Pyx_RefNannyDeclarations |
| 2266 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 2267 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 2268 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 2269 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 2270 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 2271 | Py_ssize_t __pyx_t_6; |
| 2272 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 2273 | int __pyx_lineno = 0; |
| 2274 | const char *__pyx_filename = NULL((void*)0); |
| 2275 | int __pyx_clineno = 0; |
| 2276 | __Pyx_RefNannySetupContext("__str__", 0); |
| 2277 | |
| 2278 | /* "rgw.pyx":194 |
| 2279 | * |
| 2280 | * def __str__(self): |
| 2281 | * return '[Errno {0}] {1}'.format(self.errno, self.strerror) # <<<<<<<<<<<<<< |
| 2282 | * |
| 2283 | * |
| 2284 | */ |
| 2285 | __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); |
| 2286 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Errno_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__2286; goto __pyx_L1_error;} |
| 2287 | __Pyx_GOTREF(__pyx_t_2); |
| 2288 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errno); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__2288; goto __pyx_L1_error;} |
| 2289 | __Pyx_GOTREF(__pyx_t_3); |
| 2290 | __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strerror); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__2290; goto __pyx_L1_error;} |
| 2291 | __Pyx_GOTREF(__pyx_t_4); |
| 2292 | __pyx_t_5 = NULL((void*)0); |
| 2293 | __pyx_t_6 = 0; |
| 2294 | if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type )), 1)) { |
| 2295 | __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self); |
| 2296 | if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) { |
| 2297 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func); |
| 2298 | __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); |
| 2299 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 2300 | __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); |
| 2301 | __pyx_t_6 = 1; |
| 2302 | } |
| 2303 | } |
| 2304 | __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 = 194; __pyx_clineno = __LINE__2304; goto __pyx_L1_error;} |
| 2305 | __Pyx_GOTREF(__pyx_t_7); |
| 2306 | if (__pyx_t_5) { |
| 2307 | __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); |
| 2308 | } |
| 2309 | __Pyx_GIVEREF(__pyx_t_3); |
| 2310 | PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+__pyx_t_6] = __pyx_t_3 ); |
| 2311 | __Pyx_GIVEREF(__pyx_t_4); |
| 2312 | 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 ); |
| 2313 | __pyx_t_3 = 0; |
| 2314 | __pyx_t_4 = 0; |
| 2315 | __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 = 194; __pyx_clineno = __LINE__2315; goto __pyx_L1_error;} |
| 2316 | __Pyx_GOTREF(__pyx_t_1); |
| 2317 | __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; |
| 2318 | __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; |
| 2319 | __pyx_r = __pyx_t_1; |
| 2320 | __pyx_t_1 = 0; |
| 2321 | goto __pyx_L0; |
| 2322 | |
| 2323 | /* "rgw.pyx":193 |
| 2324 | * self.strerror = strerror |
| 2325 | * |
| 2326 | * def __str__(self): # <<<<<<<<<<<<<< |
| 2327 | * return '[Errno {0}] {1}'.format(self.errno, self.strerror) |
| 2328 | * |
| 2329 | */ |
| 2330 | |
| 2331 | /* function exit code */ |
| 2332 | __pyx_L1_error:; |
| 2333 | __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); |
| 2334 | __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); |
| 2335 | __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); |
| 2336 | __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); |
| 2337 | __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); |
| 2338 | __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); |
| 2339 | __Pyx_AddTraceback("rgw.OSError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2340 | __pyx_r = NULL((void*)0); |
| 2341 | __pyx_L0:; |
| 2342 | __Pyx_XGIVEREF(__pyx_r); |
| 2343 | __Pyx_RefNannyFinishContext(); |
| 2344 | return __pyx_r; |
| 2345 | } |
| 2346 | |
| 2347 | /* "rgw.pyx":280 |
| 2348 | * |
| 2349 | * |
| 2350 | * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<< |
| 2351 | * """ |
| 2352 | * Create a byte string from a Python string |
| 2353 | */ |
| 2354 | |
| 2355 | /* Python wrapper */ |
| 2356 | static PyObject *__pyx_pw_3rgw_1cstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 2357 | static char __pyx_doc_3rgw_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 "; |
| 2358 | static PyMethodDef __pyx_mdef_3rgw_1cstr = {"cstr", (PyCFunction)__pyx_pw_3rgw_1cstr, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rgw_cstr}; |
| 2359 | static PyObject *__pyx_pw_3rgw_1cstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 2360 | PyObject *__pyx_v_val = 0; |
| 2361 | PyObject *__pyx_v_name = 0; |
| 2362 | PyObject *__pyx_v_encoding = 0; |
| 2363 | PyObject *__pyx_v_opt = 0; |
| 2364 | int __pyx_lineno = 0; |
| 2365 | const char *__pyx_filename = NULL((void*)0); |
| 2366 | int __pyx_clineno = 0; |
| 2367 | PyObject *__pyx_r = 0; |
| 2368 | __Pyx_RefNannyDeclarations |
| 2369 | __Pyx_RefNannySetupContext("cstr (wrapper)", 0); |
| 2370 | { |
| 2371 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val,&__pyx_n_s_name,&__pyx_n_s_encoding,&__pyx_n_s_opt,0}; |
| 2372 | PyObject* values[4] = {0,0,0,0}; |
| 2373 | values[2] = ((PyObject *)__pyx_kp_s_utf_8); |
| 2374 | values[3] = ((PyObject *)Py_False((PyObject *) &_Py_ZeroStruct)); |
| 2375 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 2376 | Py_ssize_t kw_args; |
| 2377 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 2378 | switch (pos_args) { |
| 2379 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 2380 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 2381 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 2382 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 2383 | case 0: break; |
| 2384 | default: goto __pyx_L5_argtuple_error; |
| 2385 | } |
| 2386 | kw_args = PyDict_Size(__pyx_kwds); |
| 2387 | switch (pos_args) { |
| 2388 | case 0: |
| 2389 | 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--; |
| 2390 | else goto __pyx_L5_argtuple_error; |
| 2391 | case 1: |
| 2392 | 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--; |
| 2393 | else { |
| 2394 | __Pyx_RaiseArgtupleInvalid("cstr", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__2394; goto __pyx_L3_error;} |
| 2395 | } |
| 2396 | case 2: |
| 2397 | if (kw_args > 0) { |
| 2398 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding); |
| 2399 | if (value) { values[2] = value; kw_args--; } |
| 2400 | } |
| 2401 | case 3: |
| 2402 | if (kw_args > 0) { |
| 2403 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opt); |
| 2404 | if (value) { values[3] = value; kw_args--; } |
| 2405 | } |
| 2406 | } |
| 2407 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 2408 | 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 = 280; __pyx_clineno = __LINE__2408; goto __pyx_L3_error;} |
| 2409 | } |
| 2410 | } else { |
| 2411 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 2412 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 2413 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 2414 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 2415 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 2416 | break; |
| 2417 | default: goto __pyx_L5_argtuple_error; |
| 2418 | } |
| 2419 | } |
| 2420 | __pyx_v_val = values[0]; |
| 2421 | __pyx_v_name = values[1]; |
| 2422 | __pyx_v_encoding = values[2]; |
| 2423 | __pyx_v_opt = values[3]; |
| 2424 | } |
| 2425 | goto __pyx_L4_argument_unpacking_done; |
| 2426 | __pyx_L5_argtuple_error:; |
| 2427 | __Pyx_RaiseArgtupleInvalid("cstr", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__2427; goto __pyx_L3_error;} |
| 2428 | __pyx_L3_error:; |
| 2429 | __Pyx_AddTraceback("rgw.cstr", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2430 | __Pyx_RefNannyFinishContext(); |
| 2431 | return NULL((void*)0); |
| 2432 | __pyx_L4_argument_unpacking_done:; |
| 2433 | __pyx_r = __pyx_pf_3rgw_cstr(__pyx_self, __pyx_v_val, __pyx_v_name, __pyx_v_encoding, __pyx_v_opt); |
| 2434 | |
| 2435 | /* function exit code */ |
| 2436 | __Pyx_RefNannyFinishContext(); |
| 2437 | return __pyx_r; |
| 2438 | } |
| 2439 | |
| 2440 | static PyObject *__pyx_pf_3rgw_cstr(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_name, PyObject *__pyx_v_encoding, PyObject *__pyx_v_opt) { |
| 2441 | PyObject *__pyx_r = NULL((void*)0); |
| 2442 | __Pyx_RefNannyDeclarations |
| 2443 | int __pyx_t_1; |
| 2444 | int __pyx_t_2; |
| 2445 | int __pyx_t_3; |
| 2446 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 2447 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 2448 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 2449 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 2450 | int __pyx_lineno = 0; |
| 2451 | const char *__pyx_filename = NULL((void*)0); |
| 2452 | int __pyx_clineno = 0; |
| 2453 | __Pyx_RefNannySetupContext("cstr", 0); |
| 2454 | |
| 2455 | /* "rgw.pyx":291 |
| 2456 | * :raises: :class:`InvalidArgument` |
| 2457 | * """ |
| 2458 | * if opt and val is None: # <<<<<<<<<<<<<< |
| 2459 | * return None |
| 2460 | * if isinstance(val, bytes): |
| 2461 | */ |
| 2462 | __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 = 291; __pyx_clineno = __LINE__2462; goto __pyx_L1_error;} |
| 2463 | if (__pyx_t_2) { |
| 2464 | } else { |
| 2465 | __pyx_t_1 = __pyx_t_2; |
| 2466 | goto __pyx_L4_bool_binop_done; |
| 2467 | } |
| 2468 | __pyx_t_2 = (__pyx_v_val == Py_None(&_Py_NoneStruct)); |
| 2469 | __pyx_t_3 = (__pyx_t_2 != 0); |
| 2470 | __pyx_t_1 = __pyx_t_3; |
| 2471 | __pyx_L4_bool_binop_done:; |
| 2472 | if (__pyx_t_1) { |
| 2473 | |
| 2474 | /* "rgw.pyx":292 |
| 2475 | * """ |
| 2476 | * if opt and val is None: |
| 2477 | * return None # <<<<<<<<<<<<<< |
| 2478 | * if isinstance(val, bytes): |
| 2479 | * return val |
| 2480 | */ |
| 2481 | __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); |
| 2482 | __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 2483 | __pyx_r = Py_None(&_Py_NoneStruct); |
| 2484 | goto __pyx_L0; |
| 2485 | |
| 2486 | /* "rgw.pyx":291 |
| 2487 | * :raises: :class:`InvalidArgument` |
| 2488 | * """ |
| 2489 | * if opt and val is None: # <<<<<<<<<<<<<< |
| 2490 | * return None |
| 2491 | * if isinstance(val, bytes): |
| 2492 | */ |
| 2493 | } |
| 2494 | |
| 2495 | /* "rgw.pyx":293 |
| 2496 | * if opt and val is None: |
| 2497 | * return None |
| 2498 | * if isinstance(val, bytes): # <<<<<<<<<<<<<< |
| 2499 | * return val |
| 2500 | * elif isinstance(val, unicode): |
| 2501 | */ |
| 2502 | __pyx_t_1 = PyBytes_Check(__pyx_v_val)((((((PyObject*)(__pyx_v_val))->ob_type))->tp_flags & ((1L<<27))) != 0); |
| 2503 | __pyx_t_3 = (__pyx_t_1 != 0); |
| 2504 | if (__pyx_t_3) { |
| 2505 | |
| 2506 | /* "rgw.pyx":294 |
| 2507 | * return None |
| 2508 | * if isinstance(val, bytes): |
| 2509 | * return val # <<<<<<<<<<<<<< |
| 2510 | * elif isinstance(val, unicode): |
| 2511 | * return val.encode(encoding) |
| 2512 | */ |
| 2513 | __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); |
| 2514 | __Pyx_INCREF(__pyx_v_val)( ((PyObject*)(__pyx_v_val))->ob_refcnt++); |
| 2515 | __pyx_r = __pyx_v_val; |
| 2516 | goto __pyx_L0; |
| 2517 | |
| 2518 | /* "rgw.pyx":293 |
| 2519 | * if opt and val is None: |
| 2520 | * return None |
| 2521 | * if isinstance(val, bytes): # <<<<<<<<<<<<<< |
| 2522 | * return val |
| 2523 | * elif isinstance(val, unicode): |
| 2524 | */ |
| 2525 | } |
| 2526 | |
| 2527 | /* "rgw.pyx":295 |
| 2528 | * if isinstance(val, bytes): |
| 2529 | * return val |
| 2530 | * elif isinstance(val, unicode): # <<<<<<<<<<<<<< |
| 2531 | * return val.encode(encoding) |
| 2532 | * else: |
| 2533 | */ |
| 2534 | __pyx_t_3 = PyUnicode_Check(__pyx_v_val)((((((PyObject*)(__pyx_v_val))->ob_type))->tp_flags & ((1L<<28))) != 0); |
| 2535 | __pyx_t_1 = (__pyx_t_3 != 0); |
| 2536 | if (__pyx_t_1) { |
| 2537 | |
| 2538 | /* "rgw.pyx":296 |
| 2539 | * return val |
| 2540 | * elif isinstance(val, unicode): |
| 2541 | * return val.encode(encoding) # <<<<<<<<<<<<<< |
| 2542 | * else: |
| 2543 | * raise TypeError('%s must be a string' % name) |
| 2544 | */ |
| 2545 | __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); |
| 2546 | __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__2546; goto __pyx_L1_error;} |
| 2547 | __Pyx_GOTREF(__pyx_t_5); |
| 2548 | __pyx_t_6 = NULL((void*)0); |
| 2549 | if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type )), 1)) { |
| 2550 | __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self); |
| 2551 | if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) { |
| 2552 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func); |
| 2553 | __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++); |
| 2554 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 2555 | __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); |
| 2556 | } |
| 2557 | } |
| 2558 | if (!__pyx_t_6) { |
| 2559 | __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_encoding); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__2559; goto __pyx_L1_error;} |
| 2560 | __Pyx_GOTREF(__pyx_t_4); |
| 2561 | } else { |
| 2562 | __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 = 296; __pyx_clineno = __LINE__2562; goto __pyx_L1_error;} |
| 2563 | __Pyx_GOTREF(__pyx_t_7); |
| 2564 | __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); |
| 2565 | __Pyx_INCREF(__pyx_v_encoding)( ((PyObject*)(__pyx_v_encoding))->ob_refcnt++); |
| 2566 | __Pyx_GIVEREF(__pyx_v_encoding); |
| 2567 | PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_encoding)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_v_encoding ); |
| 2568 | __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 = 296; __pyx_clineno = __LINE__2568; goto __pyx_L1_error;} |
| 2569 | __Pyx_GOTREF(__pyx_t_4); |
| 2570 | __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; |
| 2571 | } |
| 2572 | __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; |
| 2573 | __pyx_r = __pyx_t_4; |
| 2574 | __pyx_t_4 = 0; |
| 2575 | goto __pyx_L0; |
| 2576 | |
| 2577 | /* "rgw.pyx":295 |
| 2578 | * if isinstance(val, bytes): |
| 2579 | * return val |
| 2580 | * elif isinstance(val, unicode): # <<<<<<<<<<<<<< |
| 2581 | * return val.encode(encoding) |
| 2582 | * else: |
| 2583 | */ |
| 2584 | } |
| 2585 | |
| 2586 | /* "rgw.pyx":298 |
| 2587 | * return val.encode(encoding) |
| 2588 | * else: |
| 2589 | * raise TypeError('%s must be a string' % name) # <<<<<<<<<<<<<< |
| 2590 | * |
| 2591 | * |
| 2592 | */ |
| 2593 | /*else*/ { |
| 2594 | __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_must_be_a_string, __pyx_v_name)PyString_Format(__pyx_kp_s_s_must_be_a_string, __pyx_v_name); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__2594; goto __pyx_L1_error;} |
| 2595 | __Pyx_GOTREF(__pyx_t_4); |
| 2596 | __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__2596; goto __pyx_L1_error;} |
| 2597 | __Pyx_GOTREF(__pyx_t_5); |
| 2598 | __Pyx_GIVEREF(__pyx_t_4); |
| 2599 | PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_4); |
| 2600 | __pyx_t_4 = 0; |
| 2601 | __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__2601; goto __pyx_L1_error;} |
| 2602 | __Pyx_GOTREF(__pyx_t_4); |
| 2603 | __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; |
| 2604 | __Pyx_Raise(__pyx_t_4, 0, 0, 0); |
| 2605 | __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; |
| 2606 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__2606; goto __pyx_L1_error;} |
| 2607 | } |
| 2608 | |
| 2609 | /* "rgw.pyx":280 |
| 2610 | * |
| 2611 | * |
| 2612 | * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<< |
| 2613 | * """ |
| 2614 | * Create a byte string from a Python string |
| 2615 | */ |
| 2616 | |
| 2617 | /* function exit code */ |
| 2618 | __pyx_L1_error:; |
| 2619 | __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); |
| 2620 | __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); |
| 2621 | __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); |
| 2622 | __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); |
| 2623 | __Pyx_AddTraceback("rgw.cstr", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2624 | __pyx_r = NULL((void*)0); |
| 2625 | __pyx_L0:; |
| 2626 | __Pyx_XGIVEREF(__pyx_r); |
| 2627 | __Pyx_RefNannyFinishContext(); |
| 2628 | return __pyx_r; |
| 2629 | } |
| 2630 | |
| 2631 | /* "rgw.pyx":301 |
| 2632 | * |
| 2633 | * |
| 2634 | * cdef make_ex(ret, msg): # <<<<<<<<<<<<<< |
| 2635 | * """ |
| 2636 | * Translate a librados return code into an exception. |
| 2637 | */ |
| 2638 | |
| 2639 | static PyObject *__pyx_f_3rgw_make_ex(PyObject *__pyx_v_ret, PyObject *__pyx_v_msg) { |
| 2640 | PyObject *__pyx_r = NULL((void*)0); |
| 2641 | __Pyx_RefNannyDeclarations |
| 2642 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 2643 | int __pyx_t_2; |
| 2644 | int __pyx_t_3; |
| 2645 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 2646 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 2647 | Py_ssize_t __pyx_t_6; |
| 2648 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 2649 | PyObject *__pyx_t_8 = NULL((void*)0); |
| 2650 | int __pyx_lineno = 0; |
| 2651 | const char *__pyx_filename = NULL((void*)0); |
| 2652 | int __pyx_clineno = 0; |
| 2653 | __Pyx_RefNannySetupContext("make_ex", 0); |
| 2654 | __Pyx_INCREF(__pyx_v_ret)( ((PyObject*)(__pyx_v_ret))->ob_refcnt++); |
| 2655 | |
| 2656 | /* "rgw.pyx":311 |
| 2657 | * :returns: a subclass of :class:`Error` |
| 2658 | * """ |
| 2659 | * ret = abs(ret) # <<<<<<<<<<<<<< |
| 2660 | * if ret in errno_to_exception: |
| 2661 | * return errno_to_exception[ret](ret, msg) |
| 2662 | */ |
| 2663 | __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 = 311; __pyx_clineno = __LINE__2663; goto __pyx_L1_error;} |
| 2664 | __Pyx_GOTREF(__pyx_t_1); |
| 2665 | __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); |
| 2666 | __pyx_t_1 = 0; |
| 2667 | |
| 2668 | /* "rgw.pyx":312 |
| 2669 | * """ |
| 2670 | * ret = abs(ret) |
| 2671 | * if ret in errno_to_exception: # <<<<<<<<<<<<<< |
| 2672 | * return errno_to_exception[ret](ret, msg) |
| 2673 | * else: |
| 2674 | */ |
| 2675 | __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_ret, __pyx_v_3rgw_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 = 312; __pyx_clineno = __LINE__2675; goto __pyx_L1_error;} |
| 2676 | __pyx_t_3 = (__pyx_t_2 != 0); |
| 2677 | if (__pyx_t_3) { |
| 2678 | |
| 2679 | /* "rgw.pyx":313 |
| 2680 | * ret = abs(ret) |
| 2681 | * if ret in errno_to_exception: |
| 2682 | * return errno_to_exception[ret](ret, msg) # <<<<<<<<<<<<<< |
| 2683 | * else: |
| 2684 | * return Error(msg + (": error code %d" % ret)) |
| 2685 | */ |
| 2686 | __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); |
| 2687 | __pyx_t_4 = PyObject_GetItem(__pyx_v_3rgw_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 = 313; __pyx_clineno = __LINE__2687; goto __pyx_L1_error;}; |
| 2688 | __Pyx_GOTREF(__pyx_t_4); |
| 2689 | __pyx_t_5 = NULL((void*)0); |
| 2690 | __pyx_t_6 = 0; |
| 2691 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type )), 0)) { |
| 2692 | __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self); |
| 2693 | if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) { |
| 2694 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func); |
| 2695 | __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); |
| 2696 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 2697 | __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); |
| 2698 | __pyx_t_6 = 1; |
| 2699 | } |
| 2700 | } |
| 2701 | __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 = 313; __pyx_clineno = __LINE__2701; goto __pyx_L1_error;} |
| 2702 | __Pyx_GOTREF(__pyx_t_7); |
| 2703 | if (__pyx_t_5) { |
| 2704 | __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); |
| 2705 | } |
| 2706 | __Pyx_INCREF(__pyx_v_ret)( ((PyObject*)(__pyx_v_ret))->ob_refcnt++); |
| 2707 | __Pyx_GIVEREF(__pyx_v_ret); |
| 2708 | 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 ); |
| 2709 | __Pyx_INCREF(__pyx_v_msg)( ((PyObject*)(__pyx_v_msg))->ob_refcnt++); |
| 2710 | __Pyx_GIVEREF(__pyx_v_msg); |
| 2711 | 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 ); |
| 2712 | __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 = 313; __pyx_clineno = __LINE__2712; goto __pyx_L1_error;} |
| 2713 | __Pyx_GOTREF(__pyx_t_1); |
| 2714 | __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; |
| 2715 | __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; |
| 2716 | __pyx_r = __pyx_t_1; |
| 2717 | __pyx_t_1 = 0; |
| 2718 | goto __pyx_L0; |
| 2719 | |
| 2720 | /* "rgw.pyx":312 |
| 2721 | * """ |
| 2722 | * ret = abs(ret) |
| 2723 | * if ret in errno_to_exception: # <<<<<<<<<<<<<< |
| 2724 | * return errno_to_exception[ret](ret, msg) |
| 2725 | * else: |
| 2726 | */ |
| 2727 | } |
| 2728 | |
| 2729 | /* "rgw.pyx":315 |
| 2730 | * return errno_to_exception[ret](ret, msg) |
| 2731 | * else: |
| 2732 | * return Error(msg + (": error code %d" % ret)) # <<<<<<<<<<<<<< |
| 2733 | * |
| 2734 | * |
| 2735 | */ |
| 2736 | /*else*/ { |
| 2737 | __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); |
| 2738 | __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 = 315; __pyx_clineno = __LINE__2738; goto __pyx_L1_error;} |
| 2739 | __Pyx_GOTREF(__pyx_t_4); |
| 2740 | __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_error_code_d, __pyx_v_ret)PyString_Format(__pyx_kp_s_error_code_d, __pyx_v_ret); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__2740; goto __pyx_L1_error;} |
| 2741 | __Pyx_GOTREF(__pyx_t_7); |
| 2742 | __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 = 315; __pyx_clineno = __LINE__2742; goto __pyx_L1_error;} |
| 2743 | __Pyx_GOTREF(__pyx_t_5); |
| 2744 | __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; |
| 2745 | __pyx_t_7 = NULL((void*)0); |
| 2746 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type )), 0)) { |
| 2747 | __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self); |
| 2748 | if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) { |
| 2749 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func); |
| 2750 | __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++); |
| 2751 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 2752 | __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); |
| 2753 | } |
| 2754 | } |
| 2755 | if (!__pyx_t_7) { |
| 2756 | __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 = 315; __pyx_clineno = __LINE__2756; goto __pyx_L1_error;} |
| 2757 | __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; |
| 2758 | __Pyx_GOTREF(__pyx_t_1); |
| 2759 | } else { |
| 2760 | __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 = 315; __pyx_clineno = __LINE__2760; goto __pyx_L1_error;} |
| 2761 | __Pyx_GOTREF(__pyx_t_8); |
| 2762 | __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); |
| 2763 | __Pyx_GIVEREF(__pyx_t_5); |
| 2764 | PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_5); |
| 2765 | __pyx_t_5 = 0; |
| 2766 | __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__2766; goto __pyx_L1_error;} |
| 2767 | __Pyx_GOTREF(__pyx_t_1); |
| 2768 | __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; |
| 2769 | } |
| 2770 | __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; |
| 2771 | __pyx_r = __pyx_t_1; |
| 2772 | __pyx_t_1 = 0; |
| 2773 | goto __pyx_L0; |
| 2774 | } |
| 2775 | |
| 2776 | /* "rgw.pyx":301 |
| 2777 | * |
| 2778 | * |
| 2779 | * cdef make_ex(ret, msg): # <<<<<<<<<<<<<< |
| 2780 | * """ |
| 2781 | * Translate a librados return code into an exception. |
| 2782 | */ |
| 2783 | |
| 2784 | /* function exit code */ |
| 2785 | __pyx_L1_error:; |
| 2786 | __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); |
| 2787 | __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); |
| 2788 | __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); |
| 2789 | __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); |
| 2790 | __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); |
| 2791 | __Pyx_AddTraceback("rgw.make_ex", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2792 | __pyx_r = 0; |
| 2793 | __pyx_L0:; |
| 2794 | __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); |
| 2795 | __Pyx_XGIVEREF(__pyx_r); |
| 2796 | __Pyx_RefNannyFinishContext(); |
| 2797 | return __pyx_r; |
| 2798 | } |
| 2799 | |
| 2800 | /* "rgw.pyx":318 |
| 2801 | * |
| 2802 | * |
| 2803 | * cdef bool readdir_cb(const char *name, void *arg, uint64_t offset, stat *st, uint32_t st_mask, uint32_t flags) \ # <<<<<<<<<<<<<< |
| 2804 | * except? -9000 with gil: |
| 2805 | * if exc.PyErr_Occurred(): |
| 2806 | */ |
| 2807 | |
| 2808 | static bool_Bool __pyx_f_3rgw_readdir_cb(char const *__pyx_v_name, void *__pyx_v_arg, uint64_t __pyx_v_offset, CYTHON_UNUSED__attribute__ ((__unused__)) struct stat *__pyx_v_st, CYTHON_UNUSED__attribute__ ((__unused__)) uint32_t __pyx_v_st_mask, uint32_t __pyx_v_flags) { |
| 2809 | bool_Bool __pyx_r; |
| 2810 | __Pyx_RefNannyDeclarations |
| 2811 | int __pyx_t_1; |
| 2812 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 2813 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 2814 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 2815 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 2816 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 2817 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 2818 | Py_ssize_t __pyx_t_8; |
| 2819 | PyObject *__pyx_t_9 = NULL((void*)0); |
| 2820 | int __pyx_lineno = 0; |
| 2821 | const char *__pyx_filename = NULL((void*)0); |
| 2822 | int __pyx_clineno = 0; |
| 2823 | #ifdef WITH_THREAD1 |
| 2824 | PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); |
| 2825 | #endif |
| 2826 | __Pyx_RefNannySetupContext("readdir_cb", 0); |
| 2827 | |
| 2828 | /* "rgw.pyx":320 |
| 2829 | * cdef bool readdir_cb(const char *name, void *arg, uint64_t offset, stat *st, uint32_t st_mask, uint32_t flags) \ |
| 2830 | * except? -9000 with gil: |
| 2831 | * if exc.PyErr_Occurred(): # <<<<<<<<<<<<<< |
| 2832 | * return False |
| 2833 | * (<object>arg)(name, offset, flags) |
| 2834 | */ |
| 2835 | __pyx_t_1 = (PyErr_Occurred() != 0); |
| 2836 | if (__pyx_t_1) { |
| 2837 | |
| 2838 | /* "rgw.pyx":321 |
| 2839 | * except? -9000 with gil: |
| 2840 | * if exc.PyErr_Occurred(): |
| 2841 | * return False # <<<<<<<<<<<<<< |
| 2842 | * (<object>arg)(name, offset, flags) |
| 2843 | * return True |
| 2844 | */ |
| 2845 | __pyx_r = 0; |
| 2846 | goto __pyx_L0; |
| 2847 | |
| 2848 | /* "rgw.pyx":320 |
| 2849 | * cdef bool readdir_cb(const char *name, void *arg, uint64_t offset, stat *st, uint32_t st_mask, uint32_t flags) \ |
| 2850 | * except? -9000 with gil: |
| 2851 | * if exc.PyErr_Occurred(): # <<<<<<<<<<<<<< |
| 2852 | * return False |
| 2853 | * (<object>arg)(name, offset, flags) |
| 2854 | */ |
| 2855 | } |
| 2856 | |
| 2857 | /* "rgw.pyx":322 |
| 2858 | * if exc.PyErr_Occurred(): |
| 2859 | * return False |
| 2860 | * (<object>arg)(name, offset, flags) # <<<<<<<<<<<<<< |
| 2861 | * return True |
| 2862 | * |
| 2863 | */ |
| 2864 | __pyx_t_3 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__2864; goto __pyx_L1_error;} |
| 2865 | __Pyx_GOTREF(__pyx_t_3); |
| 2866 | __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_offset); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__2866; goto __pyx_L1_error;} |
| 2867 | __Pyx_GOTREF(__pyx_t_4); |
| 2868 | __pyx_t_5 = __Pyx_PyInt_From_uint32_t(__pyx_v_flags); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__2868; goto __pyx_L1_error;} |
| 2869 | __Pyx_GOTREF(__pyx_t_5); |
| 2870 | __Pyx_INCREF(((PyObject *)__pyx_v_arg))( ((PyObject*)(((PyObject *)__pyx_v_arg)))->ob_refcnt++); |
| 2871 | __pyx_t_6 = ((PyObject *)__pyx_v_arg); __pyx_t_7 = NULL((void*)0); |
| 2872 | __pyx_t_8 = 0; |
| 2873 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type )), 0)) { |
| 2874 | __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self); |
| 2875 | if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) { |
| 2876 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func); |
| 2877 | __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++); |
| 2878 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 2879 | __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); |
| 2880 | __pyx_t_8 = 1; |
| 2881 | } |
| 2882 | } |
| 2883 | __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__2883; goto __pyx_L1_error;} |
| 2884 | __Pyx_GOTREF(__pyx_t_9); |
| 2885 | if (__pyx_t_7) { |
| 2886 | __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); |
| 2887 | } |
| 2888 | __Pyx_GIVEREF(__pyx_t_3); |
| 2889 | PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+__pyx_t_8] = __pyx_t_3 ); |
| 2890 | __Pyx_GIVEREF(__pyx_t_4); |
| 2891 | PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4)(((PyTupleObject *)(__pyx_t_9))->ob_item[1+__pyx_t_8] = __pyx_t_4 ); |
| 2892 | __Pyx_GIVEREF(__pyx_t_5); |
| 2893 | PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5)(((PyTupleObject *)(__pyx_t_9))->ob_item[2+__pyx_t_8] = __pyx_t_5 ); |
| 2894 | __pyx_t_3 = 0; |
| 2895 | __pyx_t_4 = 0; |
| 2896 | __pyx_t_5 = 0; |
| 2897 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__2897; goto __pyx_L1_error;} |
| 2898 | __Pyx_GOTREF(__pyx_t_2); |
| 2899 | __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; |
| 2900 | __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; |
| 2901 | __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; |
| 2902 | |
| 2903 | /* "rgw.pyx":323 |
| 2904 | * return False |
| 2905 | * (<object>arg)(name, offset, flags) |
| 2906 | * return True # <<<<<<<<<<<<<< |
| 2907 | * |
| 2908 | * |
| 2909 | */ |
| 2910 | __pyx_r = 1; |
| 2911 | goto __pyx_L0; |
| 2912 | |
| 2913 | /* "rgw.pyx":318 |
| 2914 | * |
| 2915 | * |
| 2916 | * cdef bool readdir_cb(const char *name, void *arg, uint64_t offset, stat *st, uint32_t st_mask, uint32_t flags) \ # <<<<<<<<<<<<<< |
| 2917 | * except? -9000 with gil: |
| 2918 | * if exc.PyErr_Occurred(): |
| 2919 | */ |
| 2920 | |
| 2921 | /* function exit code */ |
| 2922 | __pyx_L1_error:; |
| 2923 | __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); |
| 2924 | __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); |
| 2925 | __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); |
| 2926 | __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); |
| 2927 | __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); |
| 2928 | __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); |
| 2929 | __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); |
| 2930 | __Pyx_AddTraceback("rgw.readdir_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2931 | __pyx_r = -9000; |
| 2932 | __pyx_L0:; |
| 2933 | __Pyx_RefNannyFinishContext(); |
| 2934 | #ifdef WITH_THREAD1 |
| 2935 | PyGILState_Release(__pyx_gilstate_save); |
| 2936 | #endif |
| 2937 | return __pyx_r; |
| 2938 | } |
| 2939 | |
| 2940 | /* "rgw.pyx":340 |
| 2941 | * cdef rgw_fs *fs |
| 2942 | * |
| 2943 | * def require_state(self, *args): # <<<<<<<<<<<<<< |
| 2944 | * if self.state in args: |
| 2945 | * return |
| 2946 | */ |
| 2947 | |
| 2948 | /* Python wrapper */ |
| 2949 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_1require_state(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 2950 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_1require_state(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 2951 | PyObject *__pyx_v_args = 0; |
| 2952 | PyObject *__pyx_r = 0; |
| 2953 | __Pyx_RefNannyDeclarations |
| 2954 | __Pyx_RefNannySetupContext("require_state (wrapper)", 0); |
| 2955 | 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); |
| 2956 | __Pyx_INCREF(__pyx_args)( ((PyObject*)(__pyx_args))->ob_refcnt++); |
| 2957 | __pyx_v_args = __pyx_args; |
| 2958 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_require_state(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_args); |
| 2959 | |
| 2960 | /* function exit code */ |
| 2961 | __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); |
| 2962 | __Pyx_RefNannyFinishContext(); |
| 2963 | return __pyx_r; |
| 2964 | } |
| 2965 | |
| 2966 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_require_state(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_args) { |
| 2967 | PyObject *__pyx_r = NULL((void*)0); |
| 2968 | __Pyx_RefNannyDeclarations |
| 2969 | int __pyx_t_1; |
| 2970 | int __pyx_t_2; |
| 2971 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 2972 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 2973 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 2974 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 2975 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 2976 | int __pyx_lineno = 0; |
| 2977 | const char *__pyx_filename = NULL((void*)0); |
| 2978 | int __pyx_clineno = 0; |
| 2979 | __Pyx_RefNannySetupContext("require_state", 0); |
| 2980 | |
| 2981 | /* "rgw.pyx":341 |
| 2982 | * |
| 2983 | * def require_state(self, *args): |
| 2984 | * if self.state in args: # <<<<<<<<<<<<<< |
| 2985 | * return |
| 2986 | * raise LibCephFSStateError("You cannot perform that operation on a " |
| 2987 | */ |
| 2988 | __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 = 341; __pyx_clineno = __LINE__2988; goto __pyx_L1_error;} |
| 2989 | __pyx_t_2 = (__pyx_t_1 != 0); |
| 2990 | if (__pyx_t_2) { |
| 2991 | |
| 2992 | /* "rgw.pyx":342 |
| 2993 | * def require_state(self, *args): |
| 2994 | * if self.state in args: |
| 2995 | * return # <<<<<<<<<<<<<< |
| 2996 | * raise LibCephFSStateError("You cannot perform that operation on a " |
| 2997 | * "RGWFS object in state %s." % (self.state)) |
| 2998 | */ |
| 2999 | __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); |
| 3000 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 3001 | goto __pyx_L0; |
| 3002 | |
| 3003 | /* "rgw.pyx":341 |
| 3004 | * |
| 3005 | * def require_state(self, *args): |
| 3006 | * if self.state in args: # <<<<<<<<<<<<<< |
| 3007 | * return |
| 3008 | * raise LibCephFSStateError("You cannot perform that operation on a " |
| 3009 | */ |
| 3010 | } |
| 3011 | |
| 3012 | /* "rgw.pyx":343 |
| 3013 | * if self.state in args: |
| 3014 | * return |
| 3015 | * raise LibCephFSStateError("You cannot perform that operation on a " # <<<<<<<<<<<<<< |
| 3016 | * "RGWFS object in state %s." % (self.state)) |
| 3017 | * |
| 3018 | */ |
| 3019 | __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 = 343; __pyx_clineno = __LINE__3019; goto __pyx_L1_error;} |
| 3020 | __Pyx_GOTREF(__pyx_t_4); |
| 3021 | |
| 3022 | /* "rgw.pyx":344 |
| 3023 | * return |
| 3024 | * raise LibCephFSStateError("You cannot perform that operation on a " |
| 3025 | * "RGWFS object in state %s." % (self.state)) # <<<<<<<<<<<<<< |
| 3026 | * |
| 3027 | * def __cinit__(self, uid, key, secret): |
| 3028 | */ |
| 3029 | __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 = 344; __pyx_clineno = __LINE__3029; goto __pyx_L1_error;} |
| 3030 | __Pyx_GOTREF(__pyx_t_5); |
| 3031 | __pyx_t_6 = NULL((void*)0); |
| 3032 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type )), 0)) { |
| 3033 | __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self); |
| 3034 | if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) { |
| 3035 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func); |
| 3036 | __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++); |
| 3037 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 3038 | __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); |
| 3039 | } |
| 3040 | } |
| 3041 | if (!__pyx_t_6) { |
| 3042 | __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 = 343; __pyx_clineno = __LINE__3042; goto __pyx_L1_error;} |
| 3043 | __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; |
| 3044 | __Pyx_GOTREF(__pyx_t_3); |
| 3045 | } else { |
| 3046 | __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 = 343; __pyx_clineno = __LINE__3046; goto __pyx_L1_error;} |
| 3047 | __Pyx_GOTREF(__pyx_t_7); |
| 3048 | __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); |
| 3049 | __Pyx_GIVEREF(__pyx_t_5); |
| 3050 | PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_5); |
| 3051 | __pyx_t_5 = 0; |
| 3052 | __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 = 343; __pyx_clineno = __LINE__3052; goto __pyx_L1_error;} |
| 3053 | __Pyx_GOTREF(__pyx_t_3); |
| 3054 | __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; |
| 3055 | } |
| 3056 | __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; |
| 3057 | __Pyx_Raise(__pyx_t_3, 0, 0, 0); |
| 3058 | __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; |
| 3059 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__3059; goto __pyx_L1_error;} |
| 3060 | |
| 3061 | /* "rgw.pyx":340 |
| 3062 | * cdef rgw_fs *fs |
| 3063 | * |
| 3064 | * def require_state(self, *args): # <<<<<<<<<<<<<< |
| 3065 | * if self.state in args: |
| 3066 | * return |
| 3067 | */ |
| 3068 | |
| 3069 | /* function exit code */ |
| 3070 | __pyx_L1_error:; |
| 3071 | __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); |
| 3072 | __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); |
| 3073 | __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); |
| 3074 | __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); |
| 3075 | __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); |
| 3076 | __Pyx_AddTraceback("rgw.LibRGWFS.require_state", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3077 | __pyx_r = NULL((void*)0); |
| 3078 | __pyx_L0:; |
| 3079 | __Pyx_XGIVEREF(__pyx_r); |
| 3080 | __Pyx_RefNannyFinishContext(); |
| 3081 | return __pyx_r; |
| 3082 | } |
| 3083 | |
| 3084 | /* "rgw.pyx":346 |
| 3085 | * "RGWFS object in state %s." % (self.state)) |
| 3086 | * |
| 3087 | * def __cinit__(self, uid, key, secret): # <<<<<<<<<<<<<< |
| 3088 | * PyEval_InitThreads() |
| 3089 | * self.state = "umounted" |
| 3090 | */ |
| 3091 | |
| 3092 | /* Python wrapper */ |
| 3093 | static int __pyx_pw_3rgw_8LibRGWFS_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 3094 | static int __pyx_pw_3rgw_8LibRGWFS_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 3095 | PyObject *__pyx_v_uid = 0; |
| 3096 | PyObject *__pyx_v_key = 0; |
| 3097 | PyObject *__pyx_v_secret = 0; |
| 3098 | int __pyx_lineno = 0; |
| 3099 | const char *__pyx_filename = NULL((void*)0); |
| 3100 | int __pyx_clineno = 0; |
| 3101 | int __pyx_r; |
| 3102 | __Pyx_RefNannyDeclarations |
| 3103 | __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); |
| 3104 | { |
| 3105 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_uid,&__pyx_n_s_key,&__pyx_n_s_secret,0}; |
| 3106 | PyObject* values[3] = {0,0,0}; |
| 3107 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 3108 | Py_ssize_t kw_args; |
| 3109 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 3110 | switch (pos_args) { |
| 3111 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 3112 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 3113 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 3114 | case 0: break; |
| 3115 | default: goto __pyx_L5_argtuple_error; |
| 3116 | } |
| 3117 | kw_args = PyDict_Size(__pyx_kwds); |
| 3118 | switch (pos_args) { |
| 3119 | case 0: |
| 3120 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uid)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uid )) != 0), 1)) kw_args--; |
| 3121 | else goto __pyx_L5_argtuple_error; |
| 3122 | case 1: |
| 3123 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key )) != 0), 1)) kw_args--; |
| 3124 | else { |
| 3125 | __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__3125; goto __pyx_L3_error;} |
| 3126 | } |
| 3127 | case 2: |
| 3128 | if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_secret)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_secret )) != 0), 1)) kw_args--; |
| 3129 | else { |
| 3130 | __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__3130; goto __pyx_L3_error;} |
| 3131 | } |
| 3132 | } |
| 3133 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 3134 | 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 = 346; __pyx_clineno = __LINE__3134; goto __pyx_L3_error;} |
| 3135 | } |
| 3136 | } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) { |
| 3137 | goto __pyx_L5_argtuple_error; |
| 3138 | } else { |
| 3139 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 3140 | values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 3141 | values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 3142 | } |
| 3143 | __pyx_v_uid = values[0]; |
| 3144 | __pyx_v_key = values[1]; |
| 3145 | __pyx_v_secret = values[2]; |
| 3146 | } |
| 3147 | goto __pyx_L4_argument_unpacking_done; |
| 3148 | __pyx_L5_argtuple_error:; |
| 3149 | __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__3149; goto __pyx_L3_error;} |
| 3150 | __pyx_L3_error:; |
| 3151 | __Pyx_AddTraceback("rgw.LibRGWFS.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3152 | __Pyx_RefNannyFinishContext(); |
| 3153 | return -1; |
| 3154 | __pyx_L4_argument_unpacking_done:; |
| 3155 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_2__cinit__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_uid, __pyx_v_key, __pyx_v_secret); |
| 3156 | |
| 3157 | /* function exit code */ |
| 3158 | __Pyx_RefNannyFinishContext(); |
| 3159 | return __pyx_r; |
| 3160 | } |
| 3161 | |
| 3162 | static int __pyx_pf_3rgw_8LibRGWFS_2__cinit__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_uid, PyObject *__pyx_v_key, PyObject *__pyx_v_secret) { |
| 3163 | int __pyx_v_ret; |
| 3164 | int __pyx_r; |
| 3165 | __Pyx_RefNannyDeclarations |
| 3166 | int __pyx_t_1; |
| 3167 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 3168 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 3169 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 3170 | Py_ssize_t __pyx_t_5; |
| 3171 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 3172 | int __pyx_lineno = 0; |
| 3173 | const char *__pyx_filename = NULL((void*)0); |
| 3174 | int __pyx_clineno = 0; |
| 3175 | __Pyx_RefNannySetupContext("__cinit__", 0); |
| 3176 | |
| 3177 | /* "rgw.pyx":347 |
| 3178 | * |
| 3179 | * def __cinit__(self, uid, key, secret): |
| 3180 | * PyEval_InitThreads() # <<<<<<<<<<<<<< |
| 3181 | * self.state = "umounted" |
| 3182 | * ret = librgw_create(&self.cluster, 0, NULL) |
| 3183 | */ |
| 3184 | PyEval_InitThreads(); |
| 3185 | |
| 3186 | /* "rgw.pyx":348 |
| 3187 | * def __cinit__(self, uid, key, secret): |
| 3188 | * PyEval_InitThreads() |
| 3189 | * self.state = "umounted" # <<<<<<<<<<<<<< |
| 3190 | * ret = librgw_create(&self.cluster, 0, NULL) |
| 3191 | * if ret != 0: |
| 3192 | */ |
| 3193 | __Pyx_INCREF(__pyx_n_s_umounted)( ((PyObject*)(__pyx_n_s_umounted))->ob_refcnt++); |
| 3194 | __Pyx_GIVEREF(__pyx_n_s_umounted); |
| 3195 | __Pyx_GOTREF(__pyx_v_self->state); |
| 3196 | __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); |
| 3197 | __pyx_v_self->state = __pyx_n_s_umounted; |
| 3198 | |
| 3199 | /* "rgw.pyx":349 |
| 3200 | * PyEval_InitThreads() |
| 3201 | * self.state = "umounted" |
| 3202 | * ret = librgw_create(&self.cluster, 0, NULL) # <<<<<<<<<<<<<< |
| 3203 | * if ret != 0: |
| 3204 | * raise make_ex(ret, "error calling librgw_create") |
| 3205 | */ |
| 3206 | __pyx_v_ret = librgw_create((&__pyx_v_self->cluster), 0, NULL((void*)0)); |
| 3207 | |
| 3208 | /* "rgw.pyx":350 |
| 3209 | * self.state = "umounted" |
| 3210 | * ret = librgw_create(&self.cluster, 0, NULL) |
| 3211 | * if ret != 0: # <<<<<<<<<<<<<< |
| 3212 | * raise make_ex(ret, "error calling librgw_create") |
| 3213 | * self.uid = cstr(uid, "uid") |
| 3214 | */ |
| 3215 | __pyx_t_1 = ((__pyx_v_ret != 0) != 0); |
| 3216 | if (__pyx_t_1) { |
| 3217 | |
| 3218 | /* "rgw.pyx":351 |
| 3219 | * ret = librgw_create(&self.cluster, 0, NULL) |
| 3220 | * if ret != 0: |
| 3221 | * raise make_ex(ret, "error calling librgw_create") # <<<<<<<<<<<<<< |
| 3222 | * self.uid = cstr(uid, "uid") |
| 3223 | * self.key = cstr(key, "key") |
| 3224 | */ |
| 3225 | __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 = 351; __pyx_clineno = __LINE__3225; goto __pyx_L1_error;} |
| 3226 | __Pyx_GOTREF(__pyx_t_2); |
| 3227 | __pyx_t_3 = __pyx_f_3rgw_make_ex(__pyx_t_2, __pyx_kp_s_error_calling_librgw_create); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__3227; goto __pyx_L1_error;} |
| 3228 | __Pyx_GOTREF(__pyx_t_3); |
| 3229 | __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; |
| 3230 | __Pyx_Raise(__pyx_t_3, 0, 0, 0); |
| 3231 | __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; |
| 3232 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__3232; goto __pyx_L1_error;} |
| 3233 | |
| 3234 | /* "rgw.pyx":350 |
| 3235 | * self.state = "umounted" |
| 3236 | * ret = librgw_create(&self.cluster, 0, NULL) |
| 3237 | * if ret != 0: # <<<<<<<<<<<<<< |
| 3238 | * raise make_ex(ret, "error calling librgw_create") |
| 3239 | * self.uid = cstr(uid, "uid") |
| 3240 | */ |
| 3241 | } |
| 3242 | |
| 3243 | /* "rgw.pyx":352 |
| 3244 | * if ret != 0: |
| 3245 | * raise make_ex(ret, "error calling librgw_create") |
| 3246 | * self.uid = cstr(uid, "uid") # <<<<<<<<<<<<<< |
| 3247 | * self.key = cstr(key, "key") |
| 3248 | * self.secret = cstr(secret, "secret") |
| 3249 | */ |
| 3250 | __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 = 352; __pyx_clineno = __LINE__3250; goto __pyx_L1_error;} |
| 3251 | __Pyx_GOTREF(__pyx_t_2); |
| 3252 | __pyx_t_4 = NULL((void*)0); |
| 3253 | __pyx_t_5 = 0; |
| 3254 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type )), 0)) { |
| 3255 | __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self); |
| 3256 | if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) { |
| 3257 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func); |
| 3258 | __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); |
| 3259 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 3260 | __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); |
| 3261 | __pyx_t_5 = 1; |
| 3262 | } |
| 3263 | } |
| 3264 | __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__3264; goto __pyx_L1_error;} |
| 3265 | __Pyx_GOTREF(__pyx_t_6); |
| 3266 | if (__pyx_t_4) { |
| 3267 | __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); |
| 3268 | } |
| 3269 | __Pyx_INCREF(__pyx_v_uid)( ((PyObject*)(__pyx_v_uid))->ob_refcnt++); |
| 3270 | __Pyx_GIVEREF(__pyx_v_uid); |
| 3271 | PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_uid)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_v_uid ); |
| 3272 | __Pyx_INCREF(__pyx_n_s_uid)( ((PyObject*)(__pyx_n_s_uid))->ob_refcnt++); |
| 3273 | __Pyx_GIVEREF(__pyx_n_s_uid); |
| 3274 | PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_n_s_uid)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_n_s_uid ); |
| 3275 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__3275; goto __pyx_L1_error;} |
| 3276 | __Pyx_GOTREF(__pyx_t_3); |
| 3277 | __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; |
| 3278 | __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; |
| 3279 | __Pyx_GIVEREF(__pyx_t_3); |
| 3280 | __Pyx_GOTREF(__pyx_v_self->uid); |
| 3281 | __Pyx_DECREF(__pyx_v_self->uid)do { if ( --((PyObject*)(__pyx_v_self->uid))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> uid)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_self->uid)))); } while (0); |
| 3282 | __pyx_v_self->uid = __pyx_t_3; |
| 3283 | __pyx_t_3 = 0; |
| 3284 | |
| 3285 | /* "rgw.pyx":353 |
| 3286 | * raise make_ex(ret, "error calling librgw_create") |
| 3287 | * self.uid = cstr(uid, "uid") |
| 3288 | * self.key = cstr(key, "key") # <<<<<<<<<<<<<< |
| 3289 | * self.secret = cstr(secret, "secret") |
| 3290 | * |
| 3291 | */ |
| 3292 | __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 = 353; __pyx_clineno = __LINE__3292; goto __pyx_L1_error;} |
| 3293 | __Pyx_GOTREF(__pyx_t_2); |
| 3294 | __pyx_t_6 = NULL((void*)0); |
| 3295 | __pyx_t_5 = 0; |
| 3296 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type )), 0)) { |
| 3297 | __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self); |
| 3298 | if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) { |
| 3299 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func); |
| 3300 | __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++); |
| 3301 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 3302 | __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); |
| 3303 | __pyx_t_5 = 1; |
| 3304 | } |
| 3305 | } |
| 3306 | __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__3306; goto __pyx_L1_error;} |
| 3307 | __Pyx_GOTREF(__pyx_t_4); |
| 3308 | if (__pyx_t_6) { |
| 3309 | __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0); |
| 3310 | } |
| 3311 | __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++); |
| 3312 | __Pyx_GIVEREF(__pyx_v_key); |
| 3313 | PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_key)(((PyTupleObject *)(__pyx_t_4))->ob_item[0+__pyx_t_5] = __pyx_v_key ); |
| 3314 | __Pyx_INCREF(__pyx_n_s_key)( ((PyObject*)(__pyx_n_s_key))->ob_refcnt++); |
| 3315 | __Pyx_GIVEREF(__pyx_n_s_key); |
| 3316 | PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_n_s_key)(((PyTupleObject *)(__pyx_t_4))->ob_item[1+__pyx_t_5] = __pyx_n_s_key ); |
| 3317 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__3317; goto __pyx_L1_error;} |
| 3318 | __Pyx_GOTREF(__pyx_t_3); |
| 3319 | __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; |
| 3320 | __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; |
| 3321 | __Pyx_GIVEREF(__pyx_t_3); |
| 3322 | __Pyx_GOTREF(__pyx_v_self->key); |
| 3323 | __Pyx_DECREF(__pyx_v_self->key)do { if ( --((PyObject*)(__pyx_v_self->key))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> key)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_self->key)))); } while (0); |
| 3324 | __pyx_v_self->key = __pyx_t_3; |
| 3325 | __pyx_t_3 = 0; |
| 3326 | |
| 3327 | /* "rgw.pyx":354 |
| 3328 | * self.uid = cstr(uid, "uid") |
| 3329 | * self.key = cstr(key, "key") |
| 3330 | * self.secret = cstr(secret, "secret") # <<<<<<<<<<<<<< |
| 3331 | * |
| 3332 | * def shutdown(self): |
| 3333 | */ |
| 3334 | __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 = 354; __pyx_clineno = __LINE__3334; goto __pyx_L1_error;} |
| 3335 | __Pyx_GOTREF(__pyx_t_2); |
| 3336 | __pyx_t_4 = NULL((void*)0); |
| 3337 | __pyx_t_5 = 0; |
| 3338 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type )), 0)) { |
| 3339 | __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self); |
| 3340 | if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) { |
| 3341 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func); |
| 3342 | __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); |
| 3343 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 3344 | __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); |
| 3345 | __pyx_t_5 = 1; |
| 3346 | } |
| 3347 | } |
| 3348 | __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__3348; goto __pyx_L1_error;} |
| 3349 | __Pyx_GOTREF(__pyx_t_6); |
| 3350 | if (__pyx_t_4) { |
| 3351 | __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); |
| 3352 | } |
| 3353 | __Pyx_INCREF(__pyx_v_secret)( ((PyObject*)(__pyx_v_secret))->ob_refcnt++); |
| 3354 | __Pyx_GIVEREF(__pyx_v_secret); |
| 3355 | PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_secret)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_v_secret ); |
| 3356 | __Pyx_INCREF(__pyx_n_s_secret)( ((PyObject*)(__pyx_n_s_secret))->ob_refcnt++); |
| 3357 | __Pyx_GIVEREF(__pyx_n_s_secret); |
| 3358 | PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_n_s_secret)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_n_s_secret ); |
| 3359 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__3359; goto __pyx_L1_error;} |
| 3360 | __Pyx_GOTREF(__pyx_t_3); |
| 3361 | __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; |
| 3362 | __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; |
| 3363 | __Pyx_GIVEREF(__pyx_t_3); |
| 3364 | __Pyx_GOTREF(__pyx_v_self->secret); |
| 3365 | __Pyx_DECREF(__pyx_v_self->secret)do { if ( --((PyObject*)(__pyx_v_self->secret))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> secret)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_self->secret)))); } while (0); |
| 3366 | __pyx_v_self->secret = __pyx_t_3; |
| 3367 | __pyx_t_3 = 0; |
| 3368 | |
| 3369 | /* "rgw.pyx":346 |
| 3370 | * "RGWFS object in state %s." % (self.state)) |
| 3371 | * |
| 3372 | * def __cinit__(self, uid, key, secret): # <<<<<<<<<<<<<< |
| 3373 | * PyEval_InitThreads() |
| 3374 | * self.state = "umounted" |
| 3375 | */ |
| 3376 | |
| 3377 | /* function exit code */ |
| 3378 | __pyx_r = 0; |
| 3379 | goto __pyx_L0; |
| 3380 | __pyx_L1_error:; |
| 3381 | __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); |
| 3382 | __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); |
| 3383 | __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); |
| 3384 | __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); |
| 3385 | __Pyx_AddTraceback("rgw.LibRGWFS.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3386 | __pyx_r = -1; |
| 3387 | __pyx_L0:; |
| 3388 | __Pyx_RefNannyFinishContext(); |
| 3389 | return __pyx_r; |
| 3390 | } |
| 3391 | |
| 3392 | /* "rgw.pyx":356 |
| 3393 | * self.secret = cstr(secret, "secret") |
| 3394 | * |
| 3395 | * def shutdown(self): # <<<<<<<<<<<<<< |
| 3396 | * """ |
| 3397 | * Unmount and destroy the ceph mount handle. |
| 3398 | */ |
| 3399 | |
| 3400 | /* Python wrapper */ |
| 3401 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_5shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/ |
| 3402 | static char __pyx_doc_3rgw_8LibRGWFS_4shutdown[] = "\n Unmount and destroy the ceph mount handle.\n "; |
| 3403 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_5shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) { |
| 3404 | PyObject *__pyx_r = 0; |
| 3405 | __Pyx_RefNannyDeclarations |
| 3406 | __Pyx_RefNannySetupContext("shutdown (wrapper)", 0); |
| 3407 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_4shutdown(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 3408 | |
| 3409 | /* function exit code */ |
| 3410 | __Pyx_RefNannyFinishContext(); |
| 3411 | return __pyx_r; |
| 3412 | } |
| 3413 | |
| 3414 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_4shutdown(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 3415 | int __pyx_v_ret; |
| 3416 | PyObject *__pyx_r = NULL((void*)0); |
| 3417 | __Pyx_RefNannyDeclarations |
| 3418 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 3419 | int __pyx_t_2; |
| 3420 | int __pyx_t_3; |
| 3421 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 3422 | int __pyx_lineno = 0; |
| 3423 | const char *__pyx_filename = NULL((void*)0); |
| 3424 | int __pyx_clineno = 0; |
| 3425 | __Pyx_RefNannySetupContext("shutdown", 0); |
| 3426 | |
| 3427 | /* "rgw.pyx":360 |
| 3428 | * Unmount and destroy the ceph mount handle. |
| 3429 | * """ |
| 3430 | * if self.state in ["mounted"]: # <<<<<<<<<<<<<< |
| 3431 | * with nogil: |
| 3432 | * ret = rgw_umount(self.fs, 0); |
| 3433 | */ |
| 3434 | __Pyx_INCREF(__pyx_v_self->state)( ((PyObject*)(__pyx_v_self->state))->ob_refcnt++); |
| 3435 | __pyx_t_1 = __pyx_v_self->state; |
| 3436 | __pyx_t_2 = (__Pyx_PyString_Equals__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_n_s_mounted, Py_EQ2)); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__3436; goto __pyx_L1_error;} |
| 3437 | __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; |
| 3438 | __pyx_t_3 = (__pyx_t_2 != 0); |
| 3439 | if (__pyx_t_3) { |
| 3440 | |
| 3441 | /* "rgw.pyx":361 |
| 3442 | * """ |
| 3443 | * if self.state in ["mounted"]: |
| 3444 | * with nogil: # <<<<<<<<<<<<<< |
| 3445 | * ret = rgw_umount(self.fs, 0); |
| 3446 | * if ret != 0: |
| 3447 | */ |
| 3448 | { |
| 3449 | #ifdef WITH_THREAD1 |
| 3450 | PyThreadState *_save; |
| 3451 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 3452 | #endif |
| 3453 | /*try:*/ { |
| 3454 | |
| 3455 | /* "rgw.pyx":362 |
| 3456 | * if self.state in ["mounted"]: |
| 3457 | * with nogil: |
| 3458 | * ret = rgw_umount(self.fs, 0); # <<<<<<<<<<<<<< |
| 3459 | * if ret != 0: |
| 3460 | * raise make_ex(ret, "error calling rgw_unmount") |
| 3461 | */ |
| 3462 | __pyx_v_ret = rgw_umount(__pyx_v_self->fs, 0); |
| 3463 | } |
| 3464 | |
| 3465 | /* "rgw.pyx":361 |
| 3466 | * """ |
| 3467 | * if self.state in ["mounted"]: |
| 3468 | * with nogil: # <<<<<<<<<<<<<< |
| 3469 | * ret = rgw_umount(self.fs, 0); |
| 3470 | * if ret != 0: |
| 3471 | */ |
| 3472 | /*finally:*/ { |
| 3473 | /*normal exit:*/{ |
| 3474 | #ifdef WITH_THREAD1 |
| 3475 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 3476 | #endif |
| 3477 | goto __pyx_L6; |
| 3478 | } |
| 3479 | __pyx_L6:; |
| 3480 | } |
| 3481 | } |
| 3482 | |
| 3483 | /* "rgw.pyx":363 |
| 3484 | * with nogil: |
| 3485 | * ret = rgw_umount(self.fs, 0); |
| 3486 | * if ret != 0: # <<<<<<<<<<<<<< |
| 3487 | * raise make_ex(ret, "error calling rgw_unmount") |
| 3488 | * self.state = "shutdown" |
| 3489 | */ |
| 3490 | __pyx_t_3 = ((__pyx_v_ret != 0) != 0); |
| 3491 | if (__pyx_t_3) { |
| 3492 | |
| 3493 | /* "rgw.pyx":364 |
| 3494 | * ret = rgw_umount(self.fs, 0); |
| 3495 | * if ret != 0: |
| 3496 | * raise make_ex(ret, "error calling rgw_unmount") # <<<<<<<<<<<<<< |
| 3497 | * self.state = "shutdown" |
| 3498 | * |
| 3499 | */ |
| 3500 | __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 = 364; __pyx_clineno = __LINE__3500; goto __pyx_L1_error;} |
| 3501 | __Pyx_GOTREF(__pyx_t_1); |
| 3502 | __pyx_t_4 = __pyx_f_3rgw_make_ex(__pyx_t_1, __pyx_kp_s_error_calling_rgw_unmount); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__3502; goto __pyx_L1_error;} |
| 3503 | __Pyx_GOTREF(__pyx_t_4); |
| 3504 | __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; |
| 3505 | __Pyx_Raise(__pyx_t_4, 0, 0, 0); |
| 3506 | __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; |
| 3507 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__3507; goto __pyx_L1_error;} |
| 3508 | |
| 3509 | /* "rgw.pyx":363 |
| 3510 | * with nogil: |
| 3511 | * ret = rgw_umount(self.fs, 0); |
| 3512 | * if ret != 0: # <<<<<<<<<<<<<< |
| 3513 | * raise make_ex(ret, "error calling rgw_unmount") |
| 3514 | * self.state = "shutdown" |
| 3515 | */ |
| 3516 | } |
| 3517 | |
| 3518 | /* "rgw.pyx":365 |
| 3519 | * if ret != 0: |
| 3520 | * raise make_ex(ret, "error calling rgw_unmount") |
| 3521 | * self.state = "shutdown" # <<<<<<<<<<<<<< |
| 3522 | * |
| 3523 | * def __enter__(self): |
| 3524 | */ |
| 3525 | __Pyx_INCREF(__pyx_n_s_shutdown)( ((PyObject*)(__pyx_n_s_shutdown))->ob_refcnt++); |
| 3526 | __Pyx_GIVEREF(__pyx_n_s_shutdown); |
| 3527 | __Pyx_GOTREF(__pyx_v_self->state); |
| 3528 | __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); |
| 3529 | __pyx_v_self->state = __pyx_n_s_shutdown; |
| 3530 | |
| 3531 | /* "rgw.pyx":360 |
| 3532 | * Unmount and destroy the ceph mount handle. |
| 3533 | * """ |
| 3534 | * if self.state in ["mounted"]: # <<<<<<<<<<<<<< |
| 3535 | * with nogil: |
| 3536 | * ret = rgw_umount(self.fs, 0); |
| 3537 | */ |
| 3538 | } |
| 3539 | |
| 3540 | /* "rgw.pyx":356 |
| 3541 | * self.secret = cstr(secret, "secret") |
| 3542 | * |
| 3543 | * def shutdown(self): # <<<<<<<<<<<<<< |
| 3544 | * """ |
| 3545 | * Unmount and destroy the ceph mount handle. |
| 3546 | */ |
| 3547 | |
| 3548 | /* function exit code */ |
| 3549 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 3550 | goto __pyx_L0; |
| 3551 | __pyx_L1_error:; |
| 3552 | __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); |
| 3553 | __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); |
| 3554 | __Pyx_AddTraceback("rgw.LibRGWFS.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3555 | __pyx_r = NULL((void*)0); |
| 3556 | __pyx_L0:; |
| 3557 | __Pyx_XGIVEREF(__pyx_r); |
| 3558 | __Pyx_RefNannyFinishContext(); |
| 3559 | return __pyx_r; |
| 3560 | } |
| 3561 | |
| 3562 | /* "rgw.pyx":367 |
| 3563 | * self.state = "shutdown" |
| 3564 | * |
| 3565 | * def __enter__(self): # <<<<<<<<<<<<<< |
| 3566 | * self.mount() |
| 3567 | * return self |
| 3568 | */ |
| 3569 | |
| 3570 | /* Python wrapper */ |
| 3571 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_7__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/ |
| 3572 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_7__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) { |
| 3573 | PyObject *__pyx_r = 0; |
| 3574 | __Pyx_RefNannyDeclarations |
| 3575 | __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); |
| 3576 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_6__enter__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 3577 | |
| 3578 | /* function exit code */ |
| 3579 | __Pyx_RefNannyFinishContext(); |
| 3580 | return __pyx_r; |
| 3581 | } |
| 3582 | |
| 3583 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_6__enter__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 3584 | PyObject *__pyx_r = NULL((void*)0); |
| 3585 | __Pyx_RefNannyDeclarations |
| 3586 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 3587 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 3588 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 3589 | int __pyx_lineno = 0; |
| 3590 | const char *__pyx_filename = NULL((void*)0); |
| 3591 | int __pyx_clineno = 0; |
| 3592 | __Pyx_RefNannySetupContext("__enter__", 0); |
| 3593 | |
| 3594 | /* "rgw.pyx":368 |
| 3595 | * |
| 3596 | * def __enter__(self): |
| 3597 | * self.mount() # <<<<<<<<<<<<<< |
| 3598 | * return self |
| 3599 | * |
| 3600 | */ |
| 3601 | __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 = 368; __pyx_clineno = __LINE__3601; goto __pyx_L1_error;} |
| 3602 | __Pyx_GOTREF(__pyx_t_2); |
| 3603 | __pyx_t_3 = NULL((void*)0); |
| 3604 | if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type )), 1)) { |
| 3605 | __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self); |
| 3606 | if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) { |
| 3607 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func); |
| 3608 | __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); |
| 3609 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 3610 | __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); |
| 3611 | } |
| 3612 | } |
| 3613 | if (__pyx_t_3) { |
| 3614 | __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 = 368; __pyx_clineno = __LINE__3614; goto __pyx_L1_error;} |
| 3615 | __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; |
| 3616 | } else { |
| 3617 | __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 = 368; __pyx_clineno = __LINE__3617; goto __pyx_L1_error;} |
| 3618 | } |
| 3619 | __Pyx_GOTREF(__pyx_t_1); |
| 3620 | __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; |
| 3621 | __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; |
| 3622 | |
| 3623 | /* "rgw.pyx":369 |
| 3624 | * def __enter__(self): |
| 3625 | * self.mount() |
| 3626 | * return self # <<<<<<<<<<<<<< |
| 3627 | * |
| 3628 | * def __exit__(self, type_, value, traceback): |
| 3629 | */ |
| 3630 | __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); |
| 3631 | __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++); |
| 3632 | __pyx_r = ((PyObject *)__pyx_v_self); |
| 3633 | goto __pyx_L0; |
| 3634 | |
| 3635 | /* "rgw.pyx":367 |
| 3636 | * self.state = "shutdown" |
| 3637 | * |
| 3638 | * def __enter__(self): # <<<<<<<<<<<<<< |
| 3639 | * self.mount() |
| 3640 | * return self |
| 3641 | */ |
| 3642 | |
| 3643 | /* function exit code */ |
| 3644 | __pyx_L1_error:; |
| 3645 | __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); |
| 3646 | __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); |
| 3647 | __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); |
| 3648 | __Pyx_AddTraceback("rgw.LibRGWFS.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3649 | __pyx_r = NULL((void*)0); |
| 3650 | __pyx_L0:; |
| 3651 | __Pyx_XGIVEREF(__pyx_r); |
| 3652 | __Pyx_RefNannyFinishContext(); |
| 3653 | return __pyx_r; |
| 3654 | } |
| 3655 | |
| 3656 | /* "rgw.pyx":371 |
| 3657 | * return self |
| 3658 | * |
| 3659 | * def __exit__(self, type_, value, traceback): # <<<<<<<<<<<<<< |
| 3660 | * self.shutdown() |
| 3661 | * |
| 3662 | */ |
| 3663 | |
| 3664 | /* Python wrapper */ |
| 3665 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_9__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 3666 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_9__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 3667 | CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_ = 0; |
| 3668 | CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value = 0; |
| 3669 | CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback = 0; |
| 3670 | int __pyx_lineno = 0; |
| 3671 | const char *__pyx_filename = NULL((void*)0); |
| 3672 | int __pyx_clineno = 0; |
| 3673 | PyObject *__pyx_r = 0; |
| 3674 | __Pyx_RefNannyDeclarations |
| 3675 | __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); |
| 3676 | { |
| 3677 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_traceback,0}; |
| 3678 | PyObject* values[3] = {0,0,0}; |
| 3679 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 3680 | Py_ssize_t kw_args; |
| 3681 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 3682 | switch (pos_args) { |
| 3683 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 3684 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 3685 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 3686 | case 0: break; |
| 3687 | default: goto __pyx_L5_argtuple_error; |
| 3688 | } |
| 3689 | kw_args = PyDict_Size(__pyx_kwds); |
| 3690 | switch (pos_args) { |
| 3691 | case 0: |
| 3692 | 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--; |
| 3693 | else goto __pyx_L5_argtuple_error; |
| 3694 | case 1: |
| 3695 | 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--; |
| 3696 | else { |
| 3697 | __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__3697; goto __pyx_L3_error;} |
| 3698 | } |
| 3699 | case 2: |
| 3700 | 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--; |
| 3701 | else { |
| 3702 | __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__3702; goto __pyx_L3_error;} |
| 3703 | } |
| 3704 | } |
| 3705 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 3706 | 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 = 371; __pyx_clineno = __LINE__3706; goto __pyx_L3_error;} |
| 3707 | } |
| 3708 | } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) { |
| 3709 | goto __pyx_L5_argtuple_error; |
| 3710 | } else { |
| 3711 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 3712 | values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 3713 | values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 3714 | } |
| 3715 | __pyx_v_type_ = values[0]; |
| 3716 | __pyx_v_value = values[1]; |
| 3717 | __pyx_v_traceback = values[2]; |
| 3718 | } |
| 3719 | goto __pyx_L4_argument_unpacking_done; |
| 3720 | __pyx_L5_argtuple_error:; |
| 3721 | __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__3721; goto __pyx_L3_error;} |
| 3722 | __pyx_L3_error:; |
| 3723 | __Pyx_AddTraceback("rgw.LibRGWFS.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3724 | __Pyx_RefNannyFinishContext(); |
| 3725 | return NULL((void*)0); |
| 3726 | __pyx_L4_argument_unpacking_done:; |
| 3727 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_8__exit__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_type_, __pyx_v_value, __pyx_v_traceback); |
| 3728 | |
| 3729 | /* function exit code */ |
| 3730 | __Pyx_RefNannyFinishContext(); |
| 3731 | return __pyx_r; |
| 3732 | } |
| 3733 | |
| 3734 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_8__exit__(struct __pyx_obj_3rgw_LibRGWFS *__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) { |
| 3735 | PyObject *__pyx_r = NULL((void*)0); |
| 3736 | __Pyx_RefNannyDeclarations |
| 3737 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 3738 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 3739 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 3740 | int __pyx_lineno = 0; |
| 3741 | const char *__pyx_filename = NULL((void*)0); |
| 3742 | int __pyx_clineno = 0; |
| 3743 | __Pyx_RefNannySetupContext("__exit__", 0); |
| 3744 | |
| 3745 | /* "rgw.pyx":372 |
| 3746 | * |
| 3747 | * def __exit__(self, type_, value, traceback): |
| 3748 | * self.shutdown() # <<<<<<<<<<<<<< |
| 3749 | * |
| 3750 | * def __dealloc__(self): |
| 3751 | */ |
| 3752 | __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 = 372; __pyx_clineno = __LINE__3752; goto __pyx_L1_error;} |
| 3753 | __Pyx_GOTREF(__pyx_t_2); |
| 3754 | __pyx_t_3 = NULL((void*)0); |
| 3755 | if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type )), 1)) { |
| 3756 | __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self); |
| 3757 | if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) { |
| 3758 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func); |
| 3759 | __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); |
| 3760 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 3761 | __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); |
| 3762 | } |
| 3763 | } |
| 3764 | if (__pyx_t_3) { |
| 3765 | __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 = 372; __pyx_clineno = __LINE__3765; goto __pyx_L1_error;} |
| 3766 | __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; |
| 3767 | } else { |
| 3768 | __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 = 372; __pyx_clineno = __LINE__3768; goto __pyx_L1_error;} |
| 3769 | } |
| 3770 | __Pyx_GOTREF(__pyx_t_1); |
| 3771 | __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; |
| 3772 | __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; |
| 3773 | |
| 3774 | /* "rgw.pyx":371 |
| 3775 | * return self |
| 3776 | * |
| 3777 | * def __exit__(self, type_, value, traceback): # <<<<<<<<<<<<<< |
| 3778 | * self.shutdown() |
| 3779 | * |
| 3780 | */ |
| 3781 | |
| 3782 | /* function exit code */ |
| 3783 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 3784 | goto __pyx_L0; |
| 3785 | __pyx_L1_error:; |
| 3786 | __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); |
| 3787 | __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); |
| 3788 | __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); |
| 3789 | __Pyx_AddTraceback("rgw.LibRGWFS.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3790 | __pyx_r = NULL((void*)0); |
| 3791 | __pyx_L0:; |
| 3792 | __Pyx_XGIVEREF(__pyx_r); |
| 3793 | __Pyx_RefNannyFinishContext(); |
| 3794 | return __pyx_r; |
| 3795 | } |
| 3796 | |
| 3797 | /* "rgw.pyx":374 |
| 3798 | * self.shutdown() |
| 3799 | * |
| 3800 | * def __dealloc__(self): # <<<<<<<<<<<<<< |
| 3801 | * self.shutdown() |
| 3802 | * |
| 3803 | */ |
| 3804 | |
| 3805 | /* Python wrapper */ |
| 3806 | static void __pyx_pw_3rgw_8LibRGWFS_11__dealloc__(PyObject *__pyx_v_self); /*proto*/ |
| 3807 | static void __pyx_pw_3rgw_8LibRGWFS_11__dealloc__(PyObject *__pyx_v_self) { |
| 3808 | __Pyx_RefNannyDeclarations |
| 3809 | __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); |
| 3810 | __pyx_pf_3rgw_8LibRGWFS_10__dealloc__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 3811 | |
| 3812 | /* function exit code */ |
| 3813 | __Pyx_RefNannyFinishContext(); |
| 3814 | } |
| 3815 | |
| 3816 | static void __pyx_pf_3rgw_8LibRGWFS_10__dealloc__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 3817 | __Pyx_RefNannyDeclarations |
| 3818 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 3819 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 3820 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 3821 | int __pyx_lineno = 0; |
| 3822 | const char *__pyx_filename = NULL((void*)0); |
| 3823 | int __pyx_clineno = 0; |
| 3824 | __Pyx_RefNannySetupContext("__dealloc__", 0); |
| 3825 | |
| 3826 | /* "rgw.pyx":375 |
| 3827 | * |
| 3828 | * def __dealloc__(self): |
| 3829 | * self.shutdown() # <<<<<<<<<<<<<< |
| 3830 | * |
| 3831 | * def version(self): |
| 3832 | */ |
| 3833 | __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 = 375; __pyx_clineno = __LINE__3833; goto __pyx_L1_error;} |
| 3834 | __Pyx_GOTREF(__pyx_t_2); |
| 3835 | __pyx_t_3 = NULL((void*)0); |
| 3836 | if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type )), 1)) { |
| 3837 | __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self); |
| 3838 | if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) { |
| 3839 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func); |
| 3840 | __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); |
| 3841 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 3842 | __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); |
| 3843 | } |
| 3844 | } |
| 3845 | if (__pyx_t_3) { |
| 3846 | __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 = 375; __pyx_clineno = __LINE__3846; goto __pyx_L1_error;} |
| 3847 | __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; |
| 3848 | } else { |
| 3849 | __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 = 375; __pyx_clineno = __LINE__3849; goto __pyx_L1_error;} |
| 3850 | } |
| 3851 | __Pyx_GOTREF(__pyx_t_1); |
| 3852 | __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; |
| 3853 | __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; |
| 3854 | |
| 3855 | /* "rgw.pyx":374 |
| 3856 | * self.shutdown() |
| 3857 | * |
| 3858 | * def __dealloc__(self): # <<<<<<<<<<<<<< |
| 3859 | * self.shutdown() |
| 3860 | * |
| 3861 | */ |
| 3862 | |
| 3863 | /* function exit code */ |
| 3864 | goto __pyx_L0; |
| 3865 | __pyx_L1_error:; |
| 3866 | __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); |
| 3867 | __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); |
| 3868 | __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); |
| 3869 | __Pyx_WriteUnraisable("rgw.LibRGWFS.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); |
| 3870 | __pyx_L0:; |
| 3871 | __Pyx_RefNannyFinishContext(); |
| 3872 | } |
| 3873 | |
| 3874 | /* "rgw.pyx":377 |
| 3875 | * self.shutdown() |
| 3876 | * |
| 3877 | * def version(self): # <<<<<<<<<<<<<< |
| 3878 | * """ |
| 3879 | * Get the version number of the ``librgwfile`` C library. |
| 3880 | */ |
| 3881 | |
| 3882 | /* Python wrapper */ |
| 3883 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_13version(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/ |
| 3884 | static char __pyx_doc_3rgw_8LibRGWFS_12version[] = "\n Get the version number of the ``librgwfile`` C library.\n\n :returns: a tuple of ``(major, minor, extra)`` components of the\n libcephfs version\n "; |
| 3885 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_13version(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) { |
| 3886 | PyObject *__pyx_r = 0; |
| 3887 | __Pyx_RefNannyDeclarations |
| 3888 | __Pyx_RefNannySetupContext("version (wrapper)", 0); |
| 3889 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_12version(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 3890 | |
| 3891 | /* function exit code */ |
| 3892 | __Pyx_RefNannyFinishContext(); |
| 3893 | return __pyx_r; |
| 3894 | } |
| 3895 | |
| 3896 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_12version(CYTHON_UNUSED__attribute__ ((__unused__)) struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 3897 | int __pyx_v_major; |
| 3898 | int __pyx_v_minor; |
| 3899 | int __pyx_v_extra; |
| 3900 | PyObject *__pyx_r = NULL((void*)0); |
| 3901 | __Pyx_RefNannyDeclarations |
| 3902 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 3903 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 3904 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 3905 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 3906 | int __pyx_lineno = 0; |
| 3907 | const char *__pyx_filename = NULL((void*)0); |
| 3908 | int __pyx_clineno = 0; |
| 3909 | __Pyx_RefNannySetupContext("version", 0); |
| 3910 | |
| 3911 | /* "rgw.pyx":385 |
| 3912 | * """ |
| 3913 | * cdef: |
| 3914 | * int major = 0 # <<<<<<<<<<<<<< |
| 3915 | * int minor = 0 |
| 3916 | * int extra = 0 |
| 3917 | */ |
| 3918 | __pyx_v_major = 0; |
| 3919 | |
| 3920 | /* "rgw.pyx":386 |
| 3921 | * cdef: |
| 3922 | * int major = 0 |
| 3923 | * int minor = 0 # <<<<<<<<<<<<<< |
| 3924 | * int extra = 0 |
| 3925 | * with nogil: |
| 3926 | */ |
| 3927 | __pyx_v_minor = 0; |
| 3928 | |
| 3929 | /* "rgw.pyx":387 |
| 3930 | * int major = 0 |
| 3931 | * int minor = 0 |
| 3932 | * int extra = 0 # <<<<<<<<<<<<<< |
| 3933 | * with nogil: |
| 3934 | * rgwfile_version(&major, &minor, &extra) |
| 3935 | */ |
| 3936 | __pyx_v_extra = 0; |
| 3937 | |
| 3938 | /* "rgw.pyx":388 |
| 3939 | * int minor = 0 |
| 3940 | * int extra = 0 |
| 3941 | * with nogil: # <<<<<<<<<<<<<< |
| 3942 | * rgwfile_version(&major, &minor, &extra) |
| 3943 | * return (major, minor, extra) |
| 3944 | */ |
| 3945 | { |
| 3946 | #ifdef WITH_THREAD1 |
| 3947 | PyThreadState *_save; |
| 3948 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 3949 | #endif |
| 3950 | /*try:*/ { |
| 3951 | |
| 3952 | /* "rgw.pyx":389 |
| 3953 | * int extra = 0 |
| 3954 | * with nogil: |
| 3955 | * rgwfile_version(&major, &minor, &extra) # <<<<<<<<<<<<<< |
| 3956 | * return (major, minor, extra) |
| 3957 | * |
| 3958 | */ |
| 3959 | rgwfile_version((&__pyx_v_major), (&__pyx_v_minor), (&__pyx_v_extra)); |
| 3960 | } |
| 3961 | |
| 3962 | /* "rgw.pyx":388 |
| 3963 | * int minor = 0 |
| 3964 | * int extra = 0 |
| 3965 | * with nogil: # <<<<<<<<<<<<<< |
| 3966 | * rgwfile_version(&major, &minor, &extra) |
| 3967 | * return (major, minor, extra) |
| 3968 | */ |
| 3969 | /*finally:*/ { |
| 3970 | /*normal exit:*/{ |
| 3971 | #ifdef WITH_THREAD1 |
| 3972 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 3973 | #endif |
| 3974 | goto __pyx_L5; |
| 3975 | } |
| 3976 | __pyx_L5:; |
| 3977 | } |
| 3978 | } |
| 3979 | |
| 3980 | /* "rgw.pyx":390 |
| 3981 | * with nogil: |
| 3982 | * rgwfile_version(&major, &minor, &extra) |
| 3983 | * return (major, minor, extra) # <<<<<<<<<<<<<< |
| 3984 | * |
| 3985 | * def mount(self): |
| 3986 | */ |
| 3987 | __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); |
| 3988 | __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 = 390; __pyx_clineno = __LINE__3988; goto __pyx_L1_error;} |
| 3989 | __Pyx_GOTREF(__pyx_t_1); |
| 3990 | __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 = 390; __pyx_clineno = __LINE__3990; goto __pyx_L1_error;} |
| 3991 | __Pyx_GOTREF(__pyx_t_2); |
| 3992 | __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 = 390; __pyx_clineno = __LINE__3992; goto __pyx_L1_error;} |
| 3993 | __Pyx_GOTREF(__pyx_t_3); |
| 3994 | __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__3994; goto __pyx_L1_error;} |
| 3995 | __Pyx_GOTREF(__pyx_t_4); |
| 3996 | __Pyx_GIVEREF(__pyx_t_1); |
| 3997 | PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_t_1); |
| 3998 | __Pyx_GIVEREF(__pyx_t_2); |
| 3999 | PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_4))->ob_item[1] = __pyx_t_2); |
| 4000 | __Pyx_GIVEREF(__pyx_t_3); |
| 4001 | PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)(((PyTupleObject *)(__pyx_t_4))->ob_item[2] = __pyx_t_3); |
| 4002 | __pyx_t_1 = 0; |
| 4003 | __pyx_t_2 = 0; |
| 4004 | __pyx_t_3 = 0; |
| 4005 | __pyx_r = __pyx_t_4; |
| 4006 | __pyx_t_4 = 0; |
| 4007 | goto __pyx_L0; |
| 4008 | |
| 4009 | /* "rgw.pyx":377 |
| 4010 | * self.shutdown() |
| 4011 | * |
| 4012 | * def version(self): # <<<<<<<<<<<<<< |
| 4013 | * """ |
| 4014 | * Get the version number of the ``librgwfile`` C library. |
| 4015 | */ |
| 4016 | |
| 4017 | /* function exit code */ |
| 4018 | __pyx_L1_error:; |
| 4019 | __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); |
| 4020 | __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); |
| 4021 | __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); |
| 4022 | __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); |
| 4023 | __Pyx_AddTraceback("rgw.LibRGWFS.version", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 4024 | __pyx_r = NULL((void*)0); |
| 4025 | __pyx_L0:; |
| 4026 | __Pyx_XGIVEREF(__pyx_r); |
| 4027 | __Pyx_RefNannyFinishContext(); |
| 4028 | return __pyx_r; |
| 4029 | } |
| 4030 | |
| 4031 | /* "rgw.pyx":392 |
| 4032 | * return (major, minor, extra) |
| 4033 | * |
| 4034 | * def mount(self): # <<<<<<<<<<<<<< |
| 4035 | * self.require_state("umounted") |
| 4036 | * cdef: |
| 4037 | */ |
| 4038 | |
| 4039 | /* Python wrapper */ |
| 4040 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_15mount(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/ |
| 4041 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_15mount(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) { |
| 4042 | PyObject *__pyx_r = 0; |
| 4043 | __Pyx_RefNannyDeclarations |
| 4044 | __Pyx_RefNannySetupContext("mount (wrapper)", 0); |
| 4045 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_14mount(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 4046 | |
| 4047 | /* function exit code */ |
| 4048 | __Pyx_RefNannyFinishContext(); |
| 4049 | return __pyx_r; |
| 4050 | } |
| 4051 | |
| 4052 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_14mount(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 4053 | char *__pyx_v__uid; |
| 4054 | char *__pyx_v__key; |
| 4055 | char *__pyx_v__secret; |
| 4056 | int __pyx_v_ret; |
| 4057 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler = NULL((void*)0); |
| 4058 | PyObject *__pyx_r = NULL((void*)0); |
| 4059 | __Pyx_RefNannyDeclarations |
| 4060 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 4061 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 4062 | char *__pyx_t_3; |
| 4063 | int __pyx_t_4; |
| 4064 | int __pyx_lineno = 0; |
| 4065 | const char *__pyx_filename = NULL((void*)0); |
| 4066 | int __pyx_clineno = 0; |
| 4067 | __Pyx_RefNannySetupContext("mount", 0); |
| 4068 | |
| 4069 | /* "rgw.pyx":393 |
| 4070 | * |
| 4071 | * def mount(self): |
| 4072 | * self.require_state("umounted") # <<<<<<<<<<<<<< |
| 4073 | * cdef: |
| 4074 | * char *_uid = self.uid |
| 4075 | */ |
| 4076 | __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 = 393; __pyx_clineno = __LINE__4076; goto __pyx_L1_error;} |
| 4077 | __Pyx_GOTREF(__pyx_t_1); |
| 4078 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__4078; goto __pyx_L1_error;} |
| 4079 | __Pyx_GOTREF(__pyx_t_2); |
| 4080 | __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; |
| 4081 | __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; |
| 4082 | |
| 4083 | /* "rgw.pyx":395 |
| 4084 | * self.require_state("umounted") |
| 4085 | * cdef: |
| 4086 | * char *_uid = self.uid # <<<<<<<<<<<<<< |
| 4087 | * char *_key = self.key |
| 4088 | * char *_secret = self.secret |
| 4089 | */ |
| 4090 | __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_self->uid); if (unlikely((!__pyx_t_3) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_3) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__4090; goto __pyx_L1_error;} |
| 4091 | __pyx_v__uid = __pyx_t_3; |
| 4092 | |
| 4093 | /* "rgw.pyx":396 |
| 4094 | * cdef: |
| 4095 | * char *_uid = self.uid |
| 4096 | * char *_key = self.key # <<<<<<<<<<<<<< |
| 4097 | * char *_secret = self.secret |
| 4098 | * with nogil: |
| 4099 | */ |
| 4100 | __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_self->key); if (unlikely((!__pyx_t_3) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_3) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__4100; goto __pyx_L1_error;} |
| 4101 | __pyx_v__key = __pyx_t_3; |
| 4102 | |
| 4103 | /* "rgw.pyx":397 |
| 4104 | * char *_uid = self.uid |
| 4105 | * char *_key = self.key |
| 4106 | * char *_secret = self.secret # <<<<<<<<<<<<<< |
| 4107 | * with nogil: |
| 4108 | * ret = rgw_mount(self.cluster, <const char*>_uid, <const char*>_key, |
| 4109 | */ |
| 4110 | __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_self->secret); if (unlikely((!__pyx_t_3) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_3) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__4110; goto __pyx_L1_error;} |
| 4111 | __pyx_v__secret = __pyx_t_3; |
| 4112 | |
| 4113 | /* "rgw.pyx":398 |
| 4114 | * char *_key = self.key |
| 4115 | * char *_secret = self.secret |
| 4116 | * with nogil: # <<<<<<<<<<<<<< |
| 4117 | * ret = rgw_mount(self.cluster, <const char*>_uid, <const char*>_key, |
| 4118 | * <const char*>_secret, &self.fs, 0) |
| 4119 | */ |
| 4120 | { |
| 4121 | #ifdef WITH_THREAD1 |
| 4122 | PyThreadState *_save; |
| 4123 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 4124 | #endif |
| 4125 | /*try:*/ { |
| 4126 | |
| 4127 | /* "rgw.pyx":399 |
| 4128 | * char *_secret = self.secret |
| 4129 | * with nogil: |
| 4130 | * ret = rgw_mount(self.cluster, <const char*>_uid, <const char*>_key, # <<<<<<<<<<<<<< |
| 4131 | * <const char*>_secret, &self.fs, 0) |
| 4132 | * if ret != 0: |
| 4133 | */ |
| 4134 | __pyx_v_ret = rgw_mount(__pyx_v_self->cluster, ((char const *)__pyx_v__uid), ((char const *)__pyx_v__key), ((char const *)__pyx_v__secret), (&__pyx_v_self->fs), 0); |
| 4135 | } |
| 4136 | |
| 4137 | /* "rgw.pyx":398 |
| 4138 | * char *_key = self.key |
| 4139 | * char *_secret = self.secret |
| 4140 | * with nogil: # <<<<<<<<<<<<<< |
| 4141 | * ret = rgw_mount(self.cluster, <const char*>_uid, <const char*>_key, |
| 4142 | * <const char*>_secret, &self.fs, 0) |
| 4143 | */ |
| 4144 | /*finally:*/ { |
| 4145 | /*normal exit:*/{ |
| 4146 | #ifdef WITH_THREAD1 |
| 4147 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 4148 | #endif |
| 4149 | goto __pyx_L5; |
| 4150 | } |
| 4151 | __pyx_L5:; |
| 4152 | } |
| 4153 | } |
| 4154 | |
| 4155 | /* "rgw.pyx":401 |
| 4156 | * ret = rgw_mount(self.cluster, <const char*>_uid, <const char*>_key, |
| 4157 | * <const char*>_secret, &self.fs, 0) |
| 4158 | * if ret != 0: # <<<<<<<<<<<<<< |
| 4159 | * raise make_ex(ret, "error calling rgw_mount") |
| 4160 | * self.state = "mounted" |
| 4161 | */ |
| 4162 | __pyx_t_4 = ((__pyx_v_ret != 0) != 0); |
| 4163 | if (__pyx_t_4) { |
| 4164 | |
| 4165 | /* "rgw.pyx":402 |
| 4166 | * <const char*>_secret, &self.fs, 0) |
| 4167 | * if ret != 0: |
| 4168 | * raise make_ex(ret, "error calling rgw_mount") # <<<<<<<<<<<<<< |
| 4169 | * self.state = "mounted" |
| 4170 | * dir_handler = FileHandle() |
| 4171 | */ |
| 4172 | __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 = 402; __pyx_clineno = __LINE__4172; goto __pyx_L1_error;} |
| 4173 | __Pyx_GOTREF(__pyx_t_2); |
| 4174 | __pyx_t_1 = __pyx_f_3rgw_make_ex(__pyx_t_2, __pyx_kp_s_error_calling_rgw_mount); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__4174; goto __pyx_L1_error;} |
| 4175 | __Pyx_GOTREF(__pyx_t_1); |
| 4176 | __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; |
| 4177 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 4178 | __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; |
| 4179 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__4179; goto __pyx_L1_error;} |
| 4180 | |
| 4181 | /* "rgw.pyx":401 |
| 4182 | * ret = rgw_mount(self.cluster, <const char*>_uid, <const char*>_key, |
| 4183 | * <const char*>_secret, &self.fs, 0) |
| 4184 | * if ret != 0: # <<<<<<<<<<<<<< |
| 4185 | * raise make_ex(ret, "error calling rgw_mount") |
| 4186 | * self.state = "mounted" |
| 4187 | */ |
| 4188 | } |
| 4189 | |
| 4190 | /* "rgw.pyx":403 |
| 4191 | * if ret != 0: |
| 4192 | * raise make_ex(ret, "error calling rgw_mount") |
| 4193 | * self.state = "mounted" # <<<<<<<<<<<<<< |
| 4194 | * dir_handler = FileHandle() |
| 4195 | * dir_handler.handler = <rgw_file_handle*>self.fs.root_fh |
| 4196 | */ |
| 4197 | __Pyx_INCREF(__pyx_n_s_mounted)( ((PyObject*)(__pyx_n_s_mounted))->ob_refcnt++); |
| 4198 | __Pyx_GIVEREF(__pyx_n_s_mounted); |
| 4199 | __Pyx_GOTREF(__pyx_v_self->state); |
| 4200 | __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); |
| 4201 | __pyx_v_self->state = __pyx_n_s_mounted; |
| 4202 | |
| 4203 | /* "rgw.pyx":404 |
| 4204 | * raise make_ex(ret, "error calling rgw_mount") |
| 4205 | * self.state = "mounted" |
| 4206 | * dir_handler = FileHandle() # <<<<<<<<<<<<<< |
| 4207 | * dir_handler.handler = <rgw_file_handle*>self.fs.root_fh |
| 4208 | * return dir_handler |
| 4209 | */ |
| 4210 | __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rgw_FileHandle), __pyx_empty_tuple, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__4210; goto __pyx_L1_error;} |
| 4211 | __Pyx_GOTREF(__pyx_t_1); |
| 4212 | __pyx_v_dir_handler = ((struct __pyx_obj_3rgw_FileHandle *)__pyx_t_1); |
| 4213 | __pyx_t_1 = 0; |
| 4214 | |
| 4215 | /* "rgw.pyx":405 |
| 4216 | * self.state = "mounted" |
| 4217 | * dir_handler = FileHandle() |
| 4218 | * dir_handler.handler = <rgw_file_handle*>self.fs.root_fh # <<<<<<<<<<<<<< |
| 4219 | * return dir_handler |
| 4220 | * |
| 4221 | */ |
| 4222 | __pyx_v_dir_handler->handler = ((struct rgw_file_handle *)__pyx_v_self->fs->root_fh); |
| 4223 | |
| 4224 | /* "rgw.pyx":406 |
| 4225 | * dir_handler = FileHandle() |
| 4226 | * dir_handler.handler = <rgw_file_handle*>self.fs.root_fh |
| 4227 | * return dir_handler # <<<<<<<<<<<<<< |
| 4228 | * |
| 4229 | * def unmount(self): |
| 4230 | */ |
| 4231 | __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); |
| 4232 | __Pyx_INCREF(((PyObject *)__pyx_v_dir_handler))( ((PyObject*)(((PyObject *)__pyx_v_dir_handler)))->ob_refcnt ++); |
| 4233 | __pyx_r = ((PyObject *)__pyx_v_dir_handler); |
| 4234 | goto __pyx_L0; |
| 4235 | |
| 4236 | /* "rgw.pyx":392 |
| 4237 | * return (major, minor, extra) |
| 4238 | * |
| 4239 | * def mount(self): # <<<<<<<<<<<<<< |
| 4240 | * self.require_state("umounted") |
| 4241 | * cdef: |
| 4242 | */ |
| 4243 | |
| 4244 | /* function exit code */ |
| 4245 | __pyx_L1_error:; |
| 4246 | __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); |
| 4247 | __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); |
| 4248 | __Pyx_AddTraceback("rgw.LibRGWFS.mount", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 4249 | __pyx_r = NULL((void*)0); |
| 4250 | __pyx_L0:; |
| 4251 | __Pyx_XDECREF((PyObject *)__pyx_v_dir_handler)do { if (((PyObject *)__pyx_v_dir_handler) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_dir_handler))-> ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_dir_handler)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject *)__pyx_v_dir_handler)))); } while (0); } while (0); |
| 4252 | __Pyx_XGIVEREF(__pyx_r); |
| 4253 | __Pyx_RefNannyFinishContext(); |
| 4254 | return __pyx_r; |
| 4255 | } |
| 4256 | |
| 4257 | /* "rgw.pyx":408 |
| 4258 | * return dir_handler |
| 4259 | * |
| 4260 | * def unmount(self): # <<<<<<<<<<<<<< |
| 4261 | * self.require_state("mounted") |
| 4262 | * with nogil: |
| 4263 | */ |
| 4264 | |
| 4265 | /* Python wrapper */ |
| 4266 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_17unmount(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/ |
| 4267 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_17unmount(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) { |
| 4268 | PyObject *__pyx_r = 0; |
| 4269 | __Pyx_RefNannyDeclarations |
| 4270 | __Pyx_RefNannySetupContext("unmount (wrapper)", 0); |
| 4271 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_16unmount(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 4272 | |
| 4273 | /* function exit code */ |
| 4274 | __Pyx_RefNannyFinishContext(); |
| 4275 | return __pyx_r; |
| 4276 | } |
| 4277 | |
| 4278 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_16unmount(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 4279 | int __pyx_v_ret; |
| 4280 | PyObject *__pyx_r = NULL((void*)0); |
| 4281 | __Pyx_RefNannyDeclarations |
| 4282 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 4283 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 4284 | int __pyx_t_3; |
| 4285 | int __pyx_lineno = 0; |
| 4286 | const char *__pyx_filename = NULL((void*)0); |
| 4287 | int __pyx_clineno = 0; |
| 4288 | __Pyx_RefNannySetupContext("unmount", 0); |
| 4289 | |
| 4290 | /* "rgw.pyx":409 |
| 4291 | * |
| 4292 | * def unmount(self): |
| 4293 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 4294 | * with nogil: |
| 4295 | * ret = rgw_umount(self.fs, 0) |
| 4296 | */ |
| 4297 | __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 = 409; __pyx_clineno = __LINE__4297; goto __pyx_L1_error;} |
| 4298 | __Pyx_GOTREF(__pyx_t_1); |
| 4299 | __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 = 409; __pyx_clineno = __LINE__4299; goto __pyx_L1_error;} |
| 4300 | __Pyx_GOTREF(__pyx_t_2); |
| 4301 | __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; |
| 4302 | __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; |
| 4303 | |
| 4304 | /* "rgw.pyx":410 |
| 4305 | * def unmount(self): |
| 4306 | * self.require_state("mounted") |
| 4307 | * with nogil: # <<<<<<<<<<<<<< |
| 4308 | * ret = rgw_umount(self.fs, 0) |
| 4309 | * if ret != 0: |
| 4310 | */ |
| 4311 | { |
| 4312 | #ifdef WITH_THREAD1 |
| 4313 | PyThreadState *_save; |
| 4314 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 4315 | #endif |
| 4316 | /*try:*/ { |
| 4317 | |
| 4318 | /* "rgw.pyx":411 |
| 4319 | * self.require_state("mounted") |
| 4320 | * with nogil: |
| 4321 | * ret = rgw_umount(self.fs, 0) # <<<<<<<<<<<<<< |
| 4322 | * if ret != 0: |
| 4323 | * raise make_ex(ret, "error calling rgw_umount") |
| 4324 | */ |
| 4325 | __pyx_v_ret = rgw_umount(__pyx_v_self->fs, 0); |
| 4326 | } |
| 4327 | |
| 4328 | /* "rgw.pyx":410 |
| 4329 | * def unmount(self): |
| 4330 | * self.require_state("mounted") |
| 4331 | * with nogil: # <<<<<<<<<<<<<< |
| 4332 | * ret = rgw_umount(self.fs, 0) |
| 4333 | * if ret != 0: |
| 4334 | */ |
| 4335 | /*finally:*/ { |
| 4336 | /*normal exit:*/{ |
| 4337 | #ifdef WITH_THREAD1 |
| 4338 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 4339 | #endif |
| 4340 | goto __pyx_L5; |
| 4341 | } |
| 4342 | __pyx_L5:; |
| 4343 | } |
| 4344 | } |
| 4345 | |
| 4346 | /* "rgw.pyx":412 |
| 4347 | * with nogil: |
| 4348 | * ret = rgw_umount(self.fs, 0) |
| 4349 | * if ret != 0: # <<<<<<<<<<<<<< |
| 4350 | * raise make_ex(ret, "error calling rgw_umount") |
| 4351 | * self.state = "umounted" |
| 4352 | */ |
| 4353 | __pyx_t_3 = ((__pyx_v_ret != 0) != 0); |
| 4354 | if (__pyx_t_3) { |
| 4355 | |
| 4356 | /* "rgw.pyx":413 |
| 4357 | * ret = rgw_umount(self.fs, 0) |
| 4358 | * if ret != 0: |
| 4359 | * raise make_ex(ret, "error calling rgw_umount") # <<<<<<<<<<<<<< |
| 4360 | * self.state = "umounted" |
| 4361 | * |
| 4362 | */ |
| 4363 | __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 = 413; __pyx_clineno = __LINE__4363; goto __pyx_L1_error;} |
| 4364 | __Pyx_GOTREF(__pyx_t_2); |
| 4365 | __pyx_t_1 = __pyx_f_3rgw_make_ex(__pyx_t_2, __pyx_kp_s_error_calling_rgw_umount); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__4365; goto __pyx_L1_error;} |
| 4366 | __Pyx_GOTREF(__pyx_t_1); |
| 4367 | __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; |
| 4368 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 4369 | __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; |
| 4370 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__4370; goto __pyx_L1_error;} |
| 4371 | |
| 4372 | /* "rgw.pyx":412 |
| 4373 | * with nogil: |
| 4374 | * ret = rgw_umount(self.fs, 0) |
| 4375 | * if ret != 0: # <<<<<<<<<<<<<< |
| 4376 | * raise make_ex(ret, "error calling rgw_umount") |
| 4377 | * self.state = "umounted" |
| 4378 | */ |
| 4379 | } |
| 4380 | |
| 4381 | /* "rgw.pyx":414 |
| 4382 | * if ret != 0: |
| 4383 | * raise make_ex(ret, "error calling rgw_umount") |
| 4384 | * self.state = "umounted" # <<<<<<<<<<<<<< |
| 4385 | * |
| 4386 | * def statfs(self): |
| 4387 | */ |
| 4388 | __Pyx_INCREF(__pyx_n_s_umounted)( ((PyObject*)(__pyx_n_s_umounted))->ob_refcnt++); |
| 4389 | __Pyx_GIVEREF(__pyx_n_s_umounted); |
| 4390 | __Pyx_GOTREF(__pyx_v_self->state); |
| 4391 | __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); |
| 4392 | __pyx_v_self->state = __pyx_n_s_umounted; |
| 4393 | |
| 4394 | /* "rgw.pyx":408 |
| 4395 | * return dir_handler |
| 4396 | * |
| 4397 | * def unmount(self): # <<<<<<<<<<<<<< |
| 4398 | * self.require_state("mounted") |
| 4399 | * with nogil: |
| 4400 | */ |
| 4401 | |
| 4402 | /* function exit code */ |
| 4403 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 4404 | goto __pyx_L0; |
| 4405 | __pyx_L1_error:; |
| 4406 | __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); |
| 4407 | __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); |
| 4408 | __Pyx_AddTraceback("rgw.LibRGWFS.unmount", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 4409 | __pyx_r = NULL((void*)0); |
| 4410 | __pyx_L0:; |
| 4411 | __Pyx_XGIVEREF(__pyx_r); |
| 4412 | __Pyx_RefNannyFinishContext(); |
| 4413 | return __pyx_r; |
| 4414 | } |
| 4415 | |
| 4416 | /* "rgw.pyx":416 |
| 4417 | * self.state = "umounted" |
| 4418 | * |
| 4419 | * def statfs(self): # <<<<<<<<<<<<<< |
| 4420 | * self.require_state("mounted") |
| 4421 | * cdef: |
| 4422 | */ |
| 4423 | |
| 4424 | /* Python wrapper */ |
| 4425 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_19statfs(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/ |
| 4426 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_19statfs(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) { |
| 4427 | PyObject *__pyx_r = 0; |
| 4428 | __Pyx_RefNannyDeclarations |
| 4429 | __Pyx_RefNannySetupContext("statfs (wrapper)", 0); |
| 4430 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_18statfs(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 4431 | |
| 4432 | /* function exit code */ |
| 4433 | __Pyx_RefNannyFinishContext(); |
| 4434 | return __pyx_r; |
| 4435 | } |
| 4436 | |
| 4437 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_18statfs(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 4438 | struct rgw_statvfs __pyx_v_statbuf; |
| 4439 | int __pyx_v_ret; |
| 4440 | __Pyx_memviewslice __pyx_v_fsid = { 0, 0, { 0 }, { 0 }, { 0 } }; |
| 4441 | PyObject *__pyx_r = NULL((void*)0); |
| 4442 | __Pyx_RefNannyDeclarations |
| 4443 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 4444 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 4445 | int __pyx_t_3; |
| 4446 | uint64_t *__pyx_t_4; |
| 4447 | struct __pyx_array_obj *__pyx_t_5 = NULL((void*)0); |
| 4448 | __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } }; |
| 4449 | int __pyx_lineno = 0; |
| 4450 | const char *__pyx_filename = NULL((void*)0); |
| 4451 | int __pyx_clineno = 0; |
| 4452 | __Pyx_RefNannySetupContext("statfs", 0); |
| 4453 | |
| 4454 | /* "rgw.pyx":417 |
| 4455 | * |
| 4456 | * def statfs(self): |
| 4457 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 4458 | * cdef: |
| 4459 | * rgw_statvfs statbuf |
| 4460 | */ |
| 4461 | __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 = 417; __pyx_clineno = __LINE__4461; goto __pyx_L1_error;} |
| 4462 | __Pyx_GOTREF(__pyx_t_1); |
| 4463 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__4463; goto __pyx_L1_error;} |
| 4464 | __Pyx_GOTREF(__pyx_t_2); |
| 4465 | __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; |
| 4466 | __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; |
| 4467 | |
| 4468 | /* "rgw.pyx":421 |
| 4469 | * rgw_statvfs statbuf |
| 4470 | * |
| 4471 | * with nogil: # <<<<<<<<<<<<<< |
| 4472 | * ret = rgw_statfs(self.fs, <rgw_file_handle*>self.fs.root_fh, &statbuf, 0) |
| 4473 | * if ret < 0: |
| 4474 | */ |
| 4475 | { |
| 4476 | #ifdef WITH_THREAD1 |
| 4477 | PyThreadState *_save; |
| 4478 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 4479 | #endif |
| 4480 | /*try:*/ { |
| 4481 | |
| 4482 | /* "rgw.pyx":422 |
| 4483 | * |
| 4484 | * with nogil: |
| 4485 | * ret = rgw_statfs(self.fs, <rgw_file_handle*>self.fs.root_fh, &statbuf, 0) # <<<<<<<<<<<<<< |
| 4486 | * if ret < 0: |
| 4487 | * raise make_ex(ret, "statfs failed") |
| 4488 | */ |
| 4489 | __pyx_v_ret = rgw_statfs(__pyx_v_self->fs, ((struct rgw_file_handle *)__pyx_v_self->fs->root_fh), (&__pyx_v_statbuf), 0); |
| 4490 | } |
| 4491 | |
| 4492 | /* "rgw.pyx":421 |
| 4493 | * rgw_statvfs statbuf |
| 4494 | * |
| 4495 | * with nogil: # <<<<<<<<<<<<<< |
| 4496 | * ret = rgw_statfs(self.fs, <rgw_file_handle*>self.fs.root_fh, &statbuf, 0) |
| 4497 | * if ret < 0: |
| 4498 | */ |
| 4499 | /*finally:*/ { |
| 4500 | /*normal exit:*/{ |
| 4501 | #ifdef WITH_THREAD1 |
| 4502 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 4503 | #endif |
| 4504 | goto __pyx_L5; |
| 4505 | } |
| 4506 | __pyx_L5:; |
| 4507 | } |
| 4508 | } |
| 4509 | |
| 4510 | /* "rgw.pyx":423 |
| 4511 | * with nogil: |
| 4512 | * ret = rgw_statfs(self.fs, <rgw_file_handle*>self.fs.root_fh, &statbuf, 0) |
| 4513 | * if ret < 0: # <<<<<<<<<<<<<< |
| 4514 | * raise make_ex(ret, "statfs failed") |
| 4515 | * cdef uint64_t[:] fsid = statbuf.f_fsid |
| 4516 | */ |
| 4517 | __pyx_t_3 = ((__pyx_v_ret < 0) != 0); |
| 4518 | if (__pyx_t_3) { |
| 4519 | |
| 4520 | /* "rgw.pyx":424 |
| 4521 | * ret = rgw_statfs(self.fs, <rgw_file_handle*>self.fs.root_fh, &statbuf, 0) |
| 4522 | * if ret < 0: |
| 4523 | * raise make_ex(ret, "statfs failed") # <<<<<<<<<<<<<< |
| 4524 | * cdef uint64_t[:] fsid = statbuf.f_fsid |
| 4525 | * return {'f_bsize': statbuf.f_bsize, |
| 4526 | */ |
| 4527 | __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 = 424; __pyx_clineno = __LINE__4527; goto __pyx_L1_error;} |
| 4528 | __Pyx_GOTREF(__pyx_t_2); |
| 4529 | __pyx_t_1 = __pyx_f_3rgw_make_ex(__pyx_t_2, __pyx_kp_s_statfs_failed); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__4529; goto __pyx_L1_error;} |
| 4530 | __Pyx_GOTREF(__pyx_t_1); |
| 4531 | __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; |
| 4532 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 4533 | __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; |
| 4534 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__4534; goto __pyx_L1_error;} |
| 4535 | |
| 4536 | /* "rgw.pyx":423 |
| 4537 | * with nogil: |
| 4538 | * ret = rgw_statfs(self.fs, <rgw_file_handle*>self.fs.root_fh, &statbuf, 0) |
| 4539 | * if ret < 0: # <<<<<<<<<<<<<< |
| 4540 | * raise make_ex(ret, "statfs failed") |
| 4541 | * cdef uint64_t[:] fsid = statbuf.f_fsid |
| 4542 | */ |
| 4543 | } |
| 4544 | |
| 4545 | /* "rgw.pyx":425 |
| 4546 | * if ret < 0: |
| 4547 | * raise make_ex(ret, "statfs failed") |
| 4548 | * cdef uint64_t[:] fsid = statbuf.f_fsid # <<<<<<<<<<<<<< |
| 4549 | * return {'f_bsize': statbuf.f_bsize, |
| 4550 | * 'f_frsize': statbuf.f_frsize, |
| 4551 | */ |
| 4552 | __pyx_t_4 = __pyx_v_statbuf.f_fsid; |
| 4553 | if (!__pyx_t_4) { |
| 4554 | PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer"); |
| 4555 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__4555; goto __pyx_L1_error;} |
| 4556 | } |
| 4557 | __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn_uint64_t); |
| 4558 | __pyx_t_1 = Py_BuildValue_Py_BuildValue_SizeT((char*) "(" __PYX_BUILD_PY_SSIZE_T"n" ")", ((Py_ssize_t)2)); |
| 4559 | if (unlikely(!__pyx_t_2 || !__pyx_t_1 || !PyBytes_AsString(__pyx_t_2))__builtin_expect(!!(!__pyx_t_2 || !__pyx_t_1 || !PyString_AsString (__pyx_t_2)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__4559; goto __pyx_L1_error;} |
| 4560 | __Pyx_GOTREF(__pyx_t_2); |
| 4561 | __Pyx_GOTREF(__pyx_t_1); |
| 4562 | __pyx_t_5 = __pyx_array_new(__pyx_t_1, sizeof(uint64_t), PyBytes_AS_STRING(__pyx_t_2)(((PyStringObject *)(__pyx_t_2))->ob_sval), (char *) "fortran", (char *) __pyx_t_4); |
| 4563 | if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__4563; goto __pyx_L1_error;} |
| 4564 | __Pyx_GOTREF(__pyx_t_5); |
| 4565 | __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; |
| 4566 | __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; |
| 4567 | __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint64_t(((PyObject *)__pyx_t_5)); |
| 4568 | if (unlikely(!__pyx_t_6.memview)__builtin_expect(!!(!__pyx_t_6.memview), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__4568; goto __pyx_L1_error;} |
| 4569 | __Pyx_DECREF(((PyObject *)__pyx_t_5))do { if ( --((PyObject*)(((PyObject *)__pyx_t_5)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject *)__pyx_t_5 ))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(( (PyObject *)__pyx_t_5))))); } while (0); __pyx_t_5 = 0; |
| 4570 | __pyx_v_fsid = __pyx_t_6; |
| 4571 | __pyx_t_6.memview = NULL((void*)0); |
| 4572 | __pyx_t_6.data = NULL((void*)0); |
| 4573 | |
| 4574 | /* "rgw.pyx":426 |
| 4575 | * raise make_ex(ret, "statfs failed") |
| 4576 | * cdef uint64_t[:] fsid = statbuf.f_fsid |
| 4577 | * return {'f_bsize': statbuf.f_bsize, # <<<<<<<<<<<<<< |
| 4578 | * 'f_frsize': statbuf.f_frsize, |
| 4579 | * 'f_blocks': statbuf.f_blocks, |
| 4580 | */ |
| 4581 | __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); |
| 4582 | __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4582; goto __pyx_L1_error;} |
| 4583 | __Pyx_GOTREF(__pyx_t_2); |
| 4584 | __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_statbuf.f_bsize); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4584; goto __pyx_L1_error;} |
| 4585 | __Pyx_GOTREF(__pyx_t_1); |
| 4586 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f_bsize, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4586; goto __pyx_L1_error;} |
| 4587 | __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; |
| 4588 | |
| 4589 | /* "rgw.pyx":427 |
| 4590 | * cdef uint64_t[:] fsid = statbuf.f_fsid |
| 4591 | * return {'f_bsize': statbuf.f_bsize, |
| 4592 | * 'f_frsize': statbuf.f_frsize, # <<<<<<<<<<<<<< |
| 4593 | * 'f_blocks': statbuf.f_blocks, |
| 4594 | * 'f_bfree': statbuf.f_bfree, |
| 4595 | */ |
| 4596 | __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_statbuf.f_frsize); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__4596; goto __pyx_L1_error;} |
| 4597 | __Pyx_GOTREF(__pyx_t_1); |
| 4598 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f_frsize, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4598; goto __pyx_L1_error;} |
| 4599 | __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; |
| 4600 | |
| 4601 | /* "rgw.pyx":428 |
| 4602 | * return {'f_bsize': statbuf.f_bsize, |
| 4603 | * 'f_frsize': statbuf.f_frsize, |
| 4604 | * 'f_blocks': statbuf.f_blocks, # <<<<<<<<<<<<<< |
| 4605 | * 'f_bfree': statbuf.f_bfree, |
| 4606 | * 'f_bavail': statbuf.f_bavail, |
| 4607 | */ |
| 4608 | __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_statbuf.f_blocks); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__4608; goto __pyx_L1_error;} |
| 4609 | __Pyx_GOTREF(__pyx_t_1); |
| 4610 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f_blocks, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4610; goto __pyx_L1_error;} |
| 4611 | __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; |
| 4612 | |
| 4613 | /* "rgw.pyx":429 |
| 4614 | * 'f_frsize': statbuf.f_frsize, |
| 4615 | * 'f_blocks': statbuf.f_blocks, |
| 4616 | * 'f_bfree': statbuf.f_bfree, # <<<<<<<<<<<<<< |
| 4617 | * 'f_bavail': statbuf.f_bavail, |
| 4618 | * 'f_files': statbuf.f_files, |
| 4619 | */ |
| 4620 | __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_statbuf.f_bfree); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__4620; goto __pyx_L1_error;} |
| 4621 | __Pyx_GOTREF(__pyx_t_1); |
| 4622 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f_bfree, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4622; goto __pyx_L1_error;} |
| 4623 | __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; |
| 4624 | |
| 4625 | /* "rgw.pyx":430 |
| 4626 | * 'f_blocks': statbuf.f_blocks, |
| 4627 | * 'f_bfree': statbuf.f_bfree, |
| 4628 | * 'f_bavail': statbuf.f_bavail, # <<<<<<<<<<<<<< |
| 4629 | * 'f_files': statbuf.f_files, |
| 4630 | * 'f_ffree': statbuf.f_ffree, |
| 4631 | */ |
| 4632 | __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_statbuf.f_bavail); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__4632; goto __pyx_L1_error;} |
| 4633 | __Pyx_GOTREF(__pyx_t_1); |
| 4634 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f_bavail, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4634; goto __pyx_L1_error;} |
| 4635 | __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; |
| 4636 | |
| 4637 | /* "rgw.pyx":431 |
| 4638 | * 'f_bfree': statbuf.f_bfree, |
| 4639 | * 'f_bavail': statbuf.f_bavail, |
| 4640 | * 'f_files': statbuf.f_files, # <<<<<<<<<<<<<< |
| 4641 | * 'f_ffree': statbuf.f_ffree, |
| 4642 | * 'f_favail': statbuf.f_favail, |
| 4643 | */ |
| 4644 | __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_statbuf.f_files); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__4644; goto __pyx_L1_error;} |
| 4645 | __Pyx_GOTREF(__pyx_t_1); |
| 4646 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f_files, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4646; goto __pyx_L1_error;} |
| 4647 | __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; |
| 4648 | |
| 4649 | /* "rgw.pyx":432 |
| 4650 | * 'f_bavail': statbuf.f_bavail, |
| 4651 | * 'f_files': statbuf.f_files, |
| 4652 | * 'f_ffree': statbuf.f_ffree, # <<<<<<<<<<<<<< |
| 4653 | * 'f_favail': statbuf.f_favail, |
| 4654 | * 'f_fsid': fsid, |
| 4655 | */ |
| 4656 | __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_statbuf.f_ffree); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__4656; goto __pyx_L1_error;} |
| 4657 | __Pyx_GOTREF(__pyx_t_1); |
| 4658 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f_ffree, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4658; goto __pyx_L1_error;} |
| 4659 | __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; |
| 4660 | |
| 4661 | /* "rgw.pyx":433 |
| 4662 | * 'f_files': statbuf.f_files, |
| 4663 | * 'f_ffree': statbuf.f_ffree, |
| 4664 | * 'f_favail': statbuf.f_favail, # <<<<<<<<<<<<<< |
| 4665 | * 'f_fsid': fsid, |
| 4666 | * 'f_flag': statbuf.f_flag, |
| 4667 | */ |
| 4668 | __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_statbuf.f_favail); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__4668; goto __pyx_L1_error;} |
| 4669 | __Pyx_GOTREF(__pyx_t_1); |
| 4670 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f_favail, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4670; goto __pyx_L1_error;} |
| 4671 | __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; |
| 4672 | |
| 4673 | /* "rgw.pyx":434 |
| 4674 | * 'f_ffree': statbuf.f_ffree, |
| 4675 | * 'f_favail': statbuf.f_favail, |
| 4676 | * 'f_fsid': fsid, # <<<<<<<<<<<<<< |
| 4677 | * 'f_flag': statbuf.f_flag, |
| 4678 | * 'f_namemax': statbuf.f_namemax} |
| 4679 | */ |
| 4680 | __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_fsid, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint64_t, 0);; if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__4680; goto __pyx_L1_error;} |
| 4681 | __Pyx_GOTREF(__pyx_t_1); |
| 4682 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f_fsid, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4682; goto __pyx_L1_error;} |
| 4683 | __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; |
| 4684 | |
| 4685 | /* "rgw.pyx":435 |
| 4686 | * 'f_favail': statbuf.f_favail, |
| 4687 | * 'f_fsid': fsid, |
| 4688 | * 'f_flag': statbuf.f_flag, # <<<<<<<<<<<<<< |
| 4689 | * 'f_namemax': statbuf.f_namemax} |
| 4690 | * |
| 4691 | */ |
| 4692 | __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_statbuf.f_flag); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__4692; goto __pyx_L1_error;} |
| 4693 | __Pyx_GOTREF(__pyx_t_1); |
| 4694 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f_flag, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4694; goto __pyx_L1_error;} |
| 4695 | __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; |
| 4696 | |
| 4697 | /* "rgw.pyx":436 |
| 4698 | * 'f_fsid': fsid, |
| 4699 | * 'f_flag': statbuf.f_flag, |
| 4700 | * 'f_namemax': statbuf.f_namemax} # <<<<<<<<<<<<<< |
| 4701 | * |
| 4702 | * |
| 4703 | */ |
| 4704 | __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_statbuf.f_namemax); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__4704; goto __pyx_L1_error;} |
| 4705 | __Pyx_GOTREF(__pyx_t_1); |
| 4706 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f_namemax, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__4706; goto __pyx_L1_error;} |
| 4707 | __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; |
| 4708 | __pyx_r = __pyx_t_2; |
| 4709 | __pyx_t_2 = 0; |
| 4710 | goto __pyx_L0; |
| 4711 | |
| 4712 | /* "rgw.pyx":416 |
| 4713 | * self.state = "umounted" |
| 4714 | * |
| 4715 | * def statfs(self): # <<<<<<<<<<<<<< |
| 4716 | * self.require_state("mounted") |
| 4717 | * cdef: |
| 4718 | */ |
| 4719 | |
| 4720 | /* function exit code */ |
| 4721 | __pyx_L1_error:; |
| 4722 | __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); |
| 4723 | __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); |
| 4724 | __Pyx_XDECREF(((PyObject *)__pyx_t_5))do { if ((((PyObject *)__pyx_t_5)) == ((void*)0)) ; else do { if ( --((PyObject*)(((PyObject *)__pyx_t_5)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject *)__pyx_t_5 ))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(( (PyObject *)__pyx_t_5))))); } while (0); } while (0); |
| 4725 | __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1)__Pyx_XDEC_MEMVIEW(&__pyx_t_6, 1, 4725); |
| 4726 | __Pyx_AddTraceback("rgw.LibRGWFS.statfs", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 4727 | __pyx_r = NULL((void*)0); |
| 4728 | __pyx_L0:; |
| 4729 | __PYX_XDEC_MEMVIEW(&__pyx_v_fsid, 1)__Pyx_XDEC_MEMVIEW(&__pyx_v_fsid, 1, 4729); |
| 4730 | __Pyx_XGIVEREF(__pyx_r); |
| 4731 | __Pyx_RefNannyFinishContext(); |
| 4732 | return __pyx_r; |
| 4733 | } |
| 4734 | |
| 4735 | /* "rgw.pyx":439 |
| 4736 | * |
| 4737 | * |
| 4738 | * def create(self, FileHandle dir_handler, filename, flags = 0): # <<<<<<<<<<<<<< |
| 4739 | * self.require_state("mounted") |
| 4740 | * |
| 4741 | */ |
| 4742 | |
| 4743 | /* Python wrapper */ |
| 4744 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_21create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 4745 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_21create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 4746 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler = 0; |
| 4747 | PyObject *__pyx_v_filename = 0; |
| 4748 | PyObject *__pyx_v_flags = 0; |
| 4749 | int __pyx_lineno = 0; |
| 4750 | const char *__pyx_filename = NULL((void*)0); |
| 4751 | int __pyx_clineno = 0; |
| 4752 | PyObject *__pyx_r = 0; |
| 4753 | __Pyx_RefNannyDeclarations |
| 4754 | __Pyx_RefNannySetupContext("create (wrapper)", 0); |
| 4755 | { |
| 4756 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dir_handler,&__pyx_n_s_filename,&__pyx_n_s_flags,0}; |
| 4757 | PyObject* values[3] = {0,0,0}; |
| 4758 | values[2] = ((PyObject *)__pyx_int_0); |
| 4759 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 4760 | Py_ssize_t kw_args; |
| 4761 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 4762 | switch (pos_args) { |
| 4763 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 4764 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 4765 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 4766 | case 0: break; |
| 4767 | default: goto __pyx_L5_argtuple_error; |
| 4768 | } |
| 4769 | kw_args = PyDict_Size(__pyx_kwds); |
| 4770 | switch (pos_args) { |
| 4771 | case 0: |
| 4772 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_handler)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_handler )) != 0), 1)) kw_args--; |
| 4773 | else goto __pyx_L5_argtuple_error; |
| 4774 | case 1: |
| 4775 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename )) != 0), 1)) kw_args--; |
| 4776 | else { |
| 4777 | __Pyx_RaiseArgtupleInvalid("create", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__4777; goto __pyx_L3_error;} |
| 4778 | } |
| 4779 | case 2: |
| 4780 | if (kw_args > 0) { |
| 4781 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); |
| 4782 | if (value) { values[2] = value; kw_args--; } |
| 4783 | } |
| 4784 | } |
| 4785 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 4786 | 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 = 439; __pyx_clineno = __LINE__4786; goto __pyx_L3_error;} |
| 4787 | } |
| 4788 | } else { |
| 4789 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 4790 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 4791 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 4792 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 4793 | break; |
| 4794 | default: goto __pyx_L5_argtuple_error; |
| 4795 | } |
| 4796 | } |
| 4797 | __pyx_v_dir_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[0]); |
| 4798 | __pyx_v_filename = values[1]; |
| 4799 | __pyx_v_flags = values[2]; |
| 4800 | } |
| 4801 | goto __pyx_L4_argument_unpacking_done; |
| 4802 | __pyx_L5_argtuple_error:; |
| 4803 | __Pyx_RaiseArgtupleInvalid("create", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__4803; goto __pyx_L3_error;} |
| 4804 | __pyx_L3_error:; |
| 4805 | __Pyx_AddTraceback("rgw.LibRGWFS.create", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 4806 | __Pyx_RefNannyFinishContext(); |
| 4807 | return NULL((void*)0); |
| 4808 | __pyx_L4_argument_unpacking_done:; |
| 4809 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dir_handler), __pyx_ptype_3rgw_FileHandle, 1, "dir_handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dir_handler ), __pyx_ptype_3rgw_FileHandle, 1, "dir_handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__4809; goto __pyx_L1_error;} |
| 4810 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_20create(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_dir_handler, __pyx_v_filename, __pyx_v_flags); |
| 4811 | |
| 4812 | /* function exit code */ |
| 4813 | goto __pyx_L0; |
| 4814 | __pyx_L1_error:; |
| 4815 | __pyx_r = NULL((void*)0); |
| 4816 | __pyx_L0:; |
| 4817 | __Pyx_RefNannyFinishContext(); |
| 4818 | return __pyx_r; |
| 4819 | } |
| 4820 | |
| 4821 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_20create(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler, PyObject *__pyx_v_filename, PyObject *__pyx_v_flags) { |
| 4822 | struct rgw_file_handle *__pyx_v__dir_handler; |
| 4823 | struct rgw_file_handle *__pyx_v__file_handler; |
| 4824 | int __pyx_v__flags; |
| 4825 | char *__pyx_v__filename; |
| 4826 | struct stat __pyx_v_statbuf; |
| 4827 | int __pyx_v_ret; |
| 4828 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler = NULL((void*)0); |
| 4829 | PyObject *__pyx_r = NULL((void*)0); |
| 4830 | __Pyx_RefNannyDeclarations |
| 4831 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 4832 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 4833 | int __pyx_t_3; |
| 4834 | int __pyx_t_4; |
| 4835 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 4836 | Py_ssize_t __pyx_t_6; |
| 4837 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 4838 | int __pyx_t_8; |
| 4839 | char *__pyx_t_9; |
| 4840 | int __pyx_lineno = 0; |
| 4841 | const char *__pyx_filename = NULL((void*)0); |
| 4842 | int __pyx_clineno = 0; |
| 4843 | __Pyx_RefNannySetupContext("create", 0); |
| 4844 | __Pyx_INCREF(__pyx_v_filename)( ((PyObject*)(__pyx_v_filename))->ob_refcnt++); |
| 4845 | |
| 4846 | /* "rgw.pyx":440 |
| 4847 | * |
| 4848 | * def create(self, FileHandle dir_handler, filename, flags = 0): |
| 4849 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 4850 | * |
| 4851 | * if not isinstance(flags, int): |
| 4852 | */ |
| 4853 | __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 = 440; __pyx_clineno = __LINE__4853; goto __pyx_L1_error;} |
| 4854 | __Pyx_GOTREF(__pyx_t_1); |
| 4855 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__4855; goto __pyx_L1_error;} |
| 4856 | __Pyx_GOTREF(__pyx_t_2); |
| 4857 | __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; |
| 4858 | __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; |
| 4859 | |
| 4860 | /* "rgw.pyx":442 |
| 4861 | * self.require_state("mounted") |
| 4862 | * |
| 4863 | * if not isinstance(flags, int): # <<<<<<<<<<<<<< |
| 4864 | * raise TypeError("flags must be an integer") |
| 4865 | * |
| 4866 | */ |
| 4867 | __pyx_t_3 = PyInt_Check(__pyx_v_flags)((((__pyx_v_flags)->ob_type)->tp_flags & ((1L<< 23))) != 0); |
| 4868 | __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); |
| 4869 | if (__pyx_t_4) { |
| 4870 | |
| 4871 | /* "rgw.pyx":443 |
| 4872 | * |
| 4873 | * if not isinstance(flags, int): |
| 4874 | * raise TypeError("flags must be an integer") # <<<<<<<<<<<<<< |
| 4875 | * |
| 4876 | * filename = cstr(filename, 'filename') |
| 4877 | */ |
| 4878 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__4878; goto __pyx_L1_error;} |
| 4879 | __Pyx_GOTREF(__pyx_t_2); |
| 4880 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
| 4881 | __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; |
| 4882 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__4882; goto __pyx_L1_error;} |
| 4883 | |
| 4884 | /* "rgw.pyx":442 |
| 4885 | * self.require_state("mounted") |
| 4886 | * |
| 4887 | * if not isinstance(flags, int): # <<<<<<<<<<<<<< |
| 4888 | * raise TypeError("flags must be an integer") |
| 4889 | * |
| 4890 | */ |
| 4891 | } |
| 4892 | |
| 4893 | /* "rgw.pyx":445 |
| 4894 | * raise TypeError("flags must be an integer") |
| 4895 | * |
| 4896 | * filename = cstr(filename, 'filename') # <<<<<<<<<<<<<< |
| 4897 | * |
| 4898 | * cdef: |
| 4899 | */ |
| 4900 | __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 = 445; __pyx_clineno = __LINE__4900; goto __pyx_L1_error;} |
| 4901 | __Pyx_GOTREF(__pyx_t_1); |
| 4902 | __pyx_t_5 = NULL((void*)0); |
| 4903 | __pyx_t_6 = 0; |
| 4904 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type )), 0)) { |
| 4905 | __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self); |
| 4906 | if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) { |
| 4907 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func); |
| 4908 | __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); |
| 4909 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 4910 | __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); |
| 4911 | __pyx_t_6 = 1; |
| 4912 | } |
| 4913 | } |
| 4914 | __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 = 445; __pyx_clineno = __LINE__4914; goto __pyx_L1_error;} |
| 4915 | __Pyx_GOTREF(__pyx_t_7); |
| 4916 | if (__pyx_t_5) { |
| 4917 | __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); |
| 4918 | } |
| 4919 | __Pyx_INCREF(__pyx_v_filename)( ((PyObject*)(__pyx_v_filename))->ob_refcnt++); |
| 4920 | __Pyx_GIVEREF(__pyx_v_filename); |
| 4921 | PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_filename)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+__pyx_t_6] = __pyx_v_filename ); |
| 4922 | __Pyx_INCREF(__pyx_n_s_filename)( ((PyObject*)(__pyx_n_s_filename))->ob_refcnt++); |
| 4923 | __Pyx_GIVEREF(__pyx_n_s_filename); |
| 4924 | PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_s_filename)(((PyTupleObject *)(__pyx_t_7))->ob_item[1+__pyx_t_6] = __pyx_n_s_filename ); |
| 4925 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__4925; goto __pyx_L1_error;} |
| 4926 | __Pyx_GOTREF(__pyx_t_2); |
| 4927 | __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; |
| 4928 | __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; |
| 4929 | __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_filename; __pyx_v_filename = __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); |
| 4930 | __pyx_t_2 = 0; |
| 4931 | |
| 4932 | /* "rgw.pyx":448 |
| 4933 | * |
| 4934 | * cdef: |
| 4935 | * rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler # <<<<<<<<<<<<<< |
| 4936 | * rgw_file_handle *_file_handler |
| 4937 | * int _flags = flags |
| 4938 | */ |
| 4939 | __pyx_v__dir_handler = ((struct rgw_file_handle *)__pyx_v_dir_handler->handler); |
| 4940 | |
| 4941 | /* "rgw.pyx":450 |
| 4942 | * rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler |
| 4943 | * rgw_file_handle *_file_handler |
| 4944 | * int _flags = flags # <<<<<<<<<<<<<< |
| 4945 | * char* _filename = filename |
| 4946 | * stat statbuf |
| 4947 | */ |
| 4948 | __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__4948; goto __pyx_L1_error;} |
| 4949 | __pyx_v__flags = __pyx_t_8; |
| 4950 | |
| 4951 | /* "rgw.pyx":451 |
| 4952 | * rgw_file_handle *_file_handler |
| 4953 | * int _flags = flags |
| 4954 | * char* _filename = filename # <<<<<<<<<<<<<< |
| 4955 | * stat statbuf |
| 4956 | * |
| 4957 | */ |
| 4958 | __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_9) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_9) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__4958; goto __pyx_L1_error;} |
| 4959 | __pyx_v__filename = __pyx_t_9; |
| 4960 | |
| 4961 | /* "rgw.pyx":454 |
| 4962 | * stat statbuf |
| 4963 | * |
| 4964 | * with nogil: # <<<<<<<<<<<<<< |
| 4965 | * ret = rgw_create(self.fs, _dir_handler, _filename, &statbuf, 0, |
| 4966 | * &_file_handler, 0, _flags) |
| 4967 | */ |
| 4968 | { |
| 4969 | #ifdef WITH_THREAD1 |
| 4970 | PyThreadState *_save; |
| 4971 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 4972 | #endif |
| 4973 | /*try:*/ { |
| 4974 | |
| 4975 | /* "rgw.pyx":455 |
| 4976 | * |
| 4977 | * with nogil: |
| 4978 | * ret = rgw_create(self.fs, _dir_handler, _filename, &statbuf, 0, # <<<<<<<<<<<<<< |
| 4979 | * &_file_handler, 0, _flags) |
| 4980 | * if ret < 0: |
| 4981 | */ |
| 4982 | __pyx_v_ret = rgw_create(__pyx_v_self->fs, __pyx_v__dir_handler, __pyx_v__filename, (&__pyx_v_statbuf), 0, (&__pyx_v__file_handler), 0, __pyx_v__flags); |
| 4983 | } |
| 4984 | |
| 4985 | /* "rgw.pyx":454 |
| 4986 | * stat statbuf |
| 4987 | * |
| 4988 | * with nogil: # <<<<<<<<<<<<<< |
| 4989 | * ret = rgw_create(self.fs, _dir_handler, _filename, &statbuf, 0, |
| 4990 | * &_file_handler, 0, _flags) |
| 4991 | */ |
| 4992 | /*finally:*/ { |
| 4993 | /*normal exit:*/{ |
| 4994 | #ifdef WITH_THREAD1 |
| 4995 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 4996 | #endif |
| 4997 | goto __pyx_L6; |
| 4998 | } |
| 4999 | __pyx_L6:; |
| 5000 | } |
| 5001 | } |
| 5002 | |
| 5003 | /* "rgw.pyx":457 |
| 5004 | * ret = rgw_create(self.fs, _dir_handler, _filename, &statbuf, 0, |
| 5005 | * &_file_handler, 0, _flags) |
| 5006 | * if ret < 0: # <<<<<<<<<<<<<< |
| 5007 | * raise make_ex(ret, "error in create '%s'" % filename) |
| 5008 | * with nogil: |
| 5009 | */ |
| 5010 | __pyx_t_4 = ((__pyx_v_ret < 0) != 0); |
| 5011 | if (__pyx_t_4) { |
| 5012 | |
| 5013 | /* "rgw.pyx":458 |
| 5014 | * &_file_handler, 0, _flags) |
| 5015 | * if ret < 0: |
| 5016 | * raise make_ex(ret, "error in create '%s'" % filename) # <<<<<<<<<<<<<< |
| 5017 | * with nogil: |
| 5018 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 5019 | */ |
| 5020 | __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 = 458; __pyx_clineno = __LINE__5020; goto __pyx_L1_error;} |
| 5021 | __Pyx_GOTREF(__pyx_t_2); |
| 5022 | __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_error_in_create_s, __pyx_v_filename)PyString_Format(__pyx_kp_s_error_in_create_s, __pyx_v_filename ); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__5022; goto __pyx_L1_error;} |
| 5023 | __Pyx_GOTREF(__pyx_t_1); |
| 5024 | __pyx_t_7 = __pyx_f_3rgw_make_ex(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__5024; goto __pyx_L1_error;} |
| 5025 | __Pyx_GOTREF(__pyx_t_7); |
| 5026 | __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; |
| 5027 | __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; |
| 5028 | __Pyx_Raise(__pyx_t_7, 0, 0, 0); |
| 5029 | __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; |
| 5030 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__5030; goto __pyx_L1_error;} |
| 5031 | |
| 5032 | /* "rgw.pyx":457 |
| 5033 | * ret = rgw_create(self.fs, _dir_handler, _filename, &statbuf, 0, |
| 5034 | * &_file_handler, 0, _flags) |
| 5035 | * if ret < 0: # <<<<<<<<<<<<<< |
| 5036 | * raise make_ex(ret, "error in create '%s'" % filename) |
| 5037 | * with nogil: |
| 5038 | */ |
| 5039 | } |
| 5040 | |
| 5041 | /* "rgw.pyx":459 |
| 5042 | * if ret < 0: |
| 5043 | * raise make_ex(ret, "error in create '%s'" % filename) |
| 5044 | * with nogil: # <<<<<<<<<<<<<< |
| 5045 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 5046 | * if ret < 0: |
| 5047 | */ |
| 5048 | { |
| 5049 | #ifdef WITH_THREAD1 |
| 5050 | PyThreadState *_save; |
| 5051 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 5052 | #endif |
| 5053 | /*try:*/ { |
| 5054 | |
| 5055 | /* "rgw.pyx":460 |
| 5056 | * raise make_ex(ret, "error in create '%s'" % filename) |
| 5057 | * with nogil: |
| 5058 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) # <<<<<<<<<<<<<< |
| 5059 | * if ret < 0: |
| 5060 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 5061 | */ |
| 5062 | __pyx_v_ret = rgw_open(__pyx_v_self->fs, __pyx_v__file_handler, 0, __pyx_v__flags); |
| 5063 | } |
| 5064 | |
| 5065 | /* "rgw.pyx":459 |
| 5066 | * if ret < 0: |
| 5067 | * raise make_ex(ret, "error in create '%s'" % filename) |
| 5068 | * with nogil: # <<<<<<<<<<<<<< |
| 5069 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 5070 | * if ret < 0: |
| 5071 | */ |
| 5072 | /*finally:*/ { |
| 5073 | /*normal exit:*/{ |
| 5074 | #ifdef WITH_THREAD1 |
| 5075 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 5076 | #endif |
| 5077 | goto __pyx_L10; |
| 5078 | } |
| 5079 | __pyx_L10:; |
| 5080 | } |
| 5081 | } |
| 5082 | |
| 5083 | /* "rgw.pyx":461 |
| 5084 | * with nogil: |
| 5085 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 5086 | * if ret < 0: # <<<<<<<<<<<<<< |
| 5087 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 5088 | * |
| 5089 | */ |
| 5090 | __pyx_t_4 = ((__pyx_v_ret < 0) != 0); |
| 5091 | if (__pyx_t_4) { |
| 5092 | |
| 5093 | /* "rgw.pyx":462 |
| 5094 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 5095 | * if ret < 0: |
| 5096 | * raise make_ex(ret, "error in open '%s'" % filename) # <<<<<<<<<<<<<< |
| 5097 | * |
| 5098 | * file_handler = FileHandle() |
| 5099 | */ |
| 5100 | __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__5100; goto __pyx_L1_error;} |
| 5101 | __Pyx_GOTREF(__pyx_t_7); |
| 5102 | __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_error_in_open_s, __pyx_v_filename)PyString_Format(__pyx_kp_s_error_in_open_s, __pyx_v_filename); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__5102; goto __pyx_L1_error;} |
| 5103 | __Pyx_GOTREF(__pyx_t_1); |
| 5104 | __pyx_t_2 = __pyx_f_3rgw_make_ex(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__5104; goto __pyx_L1_error;} |
| 5105 | __Pyx_GOTREF(__pyx_t_2); |
| 5106 | __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; |
| 5107 | __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; |
| 5108 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
| 5109 | __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; |
| 5110 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__5110; goto __pyx_L1_error;} |
| 5111 | |
| 5112 | /* "rgw.pyx":461 |
| 5113 | * with nogil: |
| 5114 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 5115 | * if ret < 0: # <<<<<<<<<<<<<< |
| 5116 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 5117 | * |
| 5118 | */ |
| 5119 | } |
| 5120 | |
| 5121 | /* "rgw.pyx":464 |
| 5122 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 5123 | * |
| 5124 | * file_handler = FileHandle() # <<<<<<<<<<<<<< |
| 5125 | * file_handler.handler = _file_handler |
| 5126 | * return file_handler |
| 5127 | */ |
| 5128 | __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rgw_FileHandle), __pyx_empty_tuple, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__5128; goto __pyx_L1_error;} |
| 5129 | __Pyx_GOTREF(__pyx_t_2); |
| 5130 | __pyx_v_file_handler = ((struct __pyx_obj_3rgw_FileHandle *)__pyx_t_2); |
| 5131 | __pyx_t_2 = 0; |
| 5132 | |
| 5133 | /* "rgw.pyx":465 |
| 5134 | * |
| 5135 | * file_handler = FileHandle() |
| 5136 | * file_handler.handler = _file_handler # <<<<<<<<<<<<<< |
| 5137 | * return file_handler |
| 5138 | * |
| 5139 | */ |
| 5140 | __pyx_v_file_handler->handler = __pyx_v__file_handler; |
| 5141 | |
| 5142 | /* "rgw.pyx":466 |
| 5143 | * file_handler = FileHandle() |
| 5144 | * file_handler.handler = _file_handler |
| 5145 | * return file_handler # <<<<<<<<<<<<<< |
| 5146 | * |
| 5147 | * def mkdir(self, FileHandle dir_handler, dirname, flags = 0): |
| 5148 | */ |
| 5149 | __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); |
| 5150 | __Pyx_INCREF(((PyObject *)__pyx_v_file_handler))( ((PyObject*)(((PyObject *)__pyx_v_file_handler)))->ob_refcnt ++); |
| 5151 | __pyx_r = ((PyObject *)__pyx_v_file_handler); |
| 5152 | goto __pyx_L0; |
| 5153 | |
| 5154 | /* "rgw.pyx":439 |
| 5155 | * |
| 5156 | * |
| 5157 | * def create(self, FileHandle dir_handler, filename, flags = 0): # <<<<<<<<<<<<<< |
| 5158 | * self.require_state("mounted") |
| 5159 | * |
| 5160 | */ |
| 5161 | |
| 5162 | /* function exit code */ |
| 5163 | __pyx_L1_error:; |
| 5164 | __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); |
| 5165 | __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); |
| 5166 | __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); |
| 5167 | __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); |
| 5168 | __Pyx_AddTraceback("rgw.LibRGWFS.create", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5169 | __pyx_r = NULL((void*)0); |
| 5170 | __pyx_L0:; |
| 5171 | __Pyx_XDECREF((PyObject *)__pyx_v_file_handler)do { if (((PyObject *)__pyx_v_file_handler) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_file_handler))-> ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_file_handler)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject *)__pyx_v_file_handler)))); } while (0); } while (0); |
| 5172 | __Pyx_XDECREF(__pyx_v_filename)do { if ((__pyx_v_filename) == ((void*)0)) ; else do { if ( -- ((PyObject*)(__pyx_v_filename))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(__pyx_v_filename)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_filename)))); } while (0); } while (0); |
| 5173 | __Pyx_XGIVEREF(__pyx_r); |
| 5174 | __Pyx_RefNannyFinishContext(); |
| 5175 | return __pyx_r; |
| 5176 | } |
| 5177 | |
| 5178 | /* "rgw.pyx":468 |
| 5179 | * return file_handler |
| 5180 | * |
| 5181 | * def mkdir(self, FileHandle dir_handler, dirname, flags = 0): # <<<<<<<<<<<<<< |
| 5182 | * self.require_state("mounted") |
| 5183 | * dirname = cstr(dirname, 'dirname') |
| 5184 | */ |
| 5185 | |
| 5186 | /* Python wrapper */ |
| 5187 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_23mkdir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 5188 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_23mkdir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 5189 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler = 0; |
| 5190 | PyObject *__pyx_v_dirname = 0; |
| 5191 | PyObject *__pyx_v_flags = 0; |
| 5192 | int __pyx_lineno = 0; |
| 5193 | const char *__pyx_filename = NULL((void*)0); |
| 5194 | int __pyx_clineno = 0; |
| 5195 | PyObject *__pyx_r = 0; |
| 5196 | __Pyx_RefNannyDeclarations |
| 5197 | __Pyx_RefNannySetupContext("mkdir (wrapper)", 0); |
| 5198 | { |
| 5199 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dir_handler,&__pyx_n_s_dirname,&__pyx_n_s_flags,0}; |
| 5200 | PyObject* values[3] = {0,0,0}; |
| 5201 | values[2] = ((PyObject *)__pyx_int_0); |
| 5202 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 5203 | Py_ssize_t kw_args; |
| 5204 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 5205 | switch (pos_args) { |
| 5206 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 5207 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 5208 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 5209 | case 0: break; |
| 5210 | default: goto __pyx_L5_argtuple_error; |
| 5211 | } |
| 5212 | kw_args = PyDict_Size(__pyx_kwds); |
| 5213 | switch (pos_args) { |
| 5214 | case 0: |
| 5215 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_handler)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_handler )) != 0), 1)) kw_args--; |
| 5216 | else goto __pyx_L5_argtuple_error; |
| 5217 | case 1: |
| 5218 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dirname)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dirname )) != 0), 1)) kw_args--; |
| 5219 | else { |
| 5220 | __Pyx_RaiseArgtupleInvalid("mkdir", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__5220; goto __pyx_L3_error;} |
| 5221 | } |
| 5222 | case 2: |
| 5223 | if (kw_args > 0) { |
| 5224 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); |
| 5225 | if (value) { values[2] = value; kw_args--; } |
| 5226 | } |
| 5227 | } |
| 5228 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 5229 | 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 = 468; __pyx_clineno = __LINE__5229; goto __pyx_L3_error;} |
| 5230 | } |
| 5231 | } else { |
| 5232 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 5233 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 5234 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 5235 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 5236 | break; |
| 5237 | default: goto __pyx_L5_argtuple_error; |
| 5238 | } |
| 5239 | } |
| 5240 | __pyx_v_dir_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[0]); |
| 5241 | __pyx_v_dirname = values[1]; |
| 5242 | __pyx_v_flags = values[2]; |
| 5243 | } |
| 5244 | goto __pyx_L4_argument_unpacking_done; |
| 5245 | __pyx_L5_argtuple_error:; |
| 5246 | __Pyx_RaiseArgtupleInvalid("mkdir", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__5246; goto __pyx_L3_error;} |
| 5247 | __pyx_L3_error:; |
| 5248 | __Pyx_AddTraceback("rgw.LibRGWFS.mkdir", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5249 | __Pyx_RefNannyFinishContext(); |
| 5250 | return NULL((void*)0); |
| 5251 | __pyx_L4_argument_unpacking_done:; |
| 5252 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dir_handler), __pyx_ptype_3rgw_FileHandle, 1, "dir_handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dir_handler ), __pyx_ptype_3rgw_FileHandle, 1, "dir_handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__5252; goto __pyx_L1_error;} |
| 5253 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_22mkdir(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_dir_handler, __pyx_v_dirname, __pyx_v_flags); |
| 5254 | |
| 5255 | /* function exit code */ |
| 5256 | goto __pyx_L0; |
| 5257 | __pyx_L1_error:; |
| 5258 | __pyx_r = NULL((void*)0); |
| 5259 | __pyx_L0:; |
| 5260 | __Pyx_RefNannyFinishContext(); |
| 5261 | return __pyx_r; |
| 5262 | } |
| 5263 | |
| 5264 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_22mkdir(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler, PyObject *__pyx_v_dirname, PyObject *__pyx_v_flags) { |
| 5265 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_new_dir_handler = NULL((void*)0); |
| 5266 | struct rgw_file_handle *__pyx_v__dir_handler; |
| 5267 | struct rgw_file_handle *__pyx_v__new_dir_handler; |
| 5268 | char *__pyx_v__dirname; |
| 5269 | int __pyx_v__flags; |
| 5270 | struct stat __pyx_v_statbuf; |
| 5271 | int __pyx_v_ret; |
| 5272 | PyObject *__pyx_r = NULL((void*)0); |
| 5273 | __Pyx_RefNannyDeclarations |
| 5274 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 5275 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 5276 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 5277 | Py_ssize_t __pyx_t_4; |
| 5278 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 5279 | char *__pyx_t_6; |
| 5280 | int __pyx_t_7; |
| 5281 | int __pyx_t_8; |
| 5282 | int __pyx_lineno = 0; |
| 5283 | const char *__pyx_filename = NULL((void*)0); |
| 5284 | int __pyx_clineno = 0; |
| 5285 | __Pyx_RefNannySetupContext("mkdir", 0); |
| 5286 | __Pyx_INCREF(__pyx_v_dirname)( ((PyObject*)(__pyx_v_dirname))->ob_refcnt++); |
| 5287 | |
| 5288 | /* "rgw.pyx":469 |
| 5289 | * |
| 5290 | * def mkdir(self, FileHandle dir_handler, dirname, flags = 0): |
| 5291 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 5292 | * dirname = cstr(dirname, 'dirname') |
| 5293 | * new_dir_handler = FileHandle() |
| 5294 | */ |
| 5295 | __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 = 469; __pyx_clineno = __LINE__5295; goto __pyx_L1_error;} |
| 5296 | __Pyx_GOTREF(__pyx_t_1); |
| 5297 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__5297; goto __pyx_L1_error;} |
| 5298 | __Pyx_GOTREF(__pyx_t_2); |
| 5299 | __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; |
| 5300 | __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; |
| 5301 | |
| 5302 | /* "rgw.pyx":470 |
| 5303 | * def mkdir(self, FileHandle dir_handler, dirname, flags = 0): |
| 5304 | * self.require_state("mounted") |
| 5305 | * dirname = cstr(dirname, 'dirname') # <<<<<<<<<<<<<< |
| 5306 | * new_dir_handler = FileHandle() |
| 5307 | * cdef: |
| 5308 | */ |
| 5309 | __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 = 470; __pyx_clineno = __LINE__5309; goto __pyx_L1_error;} |
| 5310 | __Pyx_GOTREF(__pyx_t_1); |
| 5311 | __pyx_t_3 = NULL((void*)0); |
| 5312 | __pyx_t_4 = 0; |
| 5313 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type )), 0)) { |
| 5314 | __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self); |
| 5315 | if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) { |
| 5316 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func); |
| 5317 | __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); |
| 5318 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 5319 | __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); |
| 5320 | __pyx_t_4 = 1; |
| 5321 | } |
| 5322 | } |
| 5323 | __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 = 470; __pyx_clineno = __LINE__5323; goto __pyx_L1_error;} |
| 5324 | __Pyx_GOTREF(__pyx_t_5); |
| 5325 | if (__pyx_t_3) { |
| 5326 | __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); |
| 5327 | } |
| 5328 | __Pyx_INCREF(__pyx_v_dirname)( ((PyObject*)(__pyx_v_dirname))->ob_refcnt++); |
| 5329 | __Pyx_GIVEREF(__pyx_v_dirname); |
| 5330 | PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_dirname)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_dirname ); |
| 5331 | __Pyx_INCREF(__pyx_n_s_dirname)( ((PyObject*)(__pyx_n_s_dirname))->ob_refcnt++); |
| 5332 | __Pyx_GIVEREF(__pyx_n_s_dirname); |
| 5333 | PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_dirname)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_dirname ); |
| 5334 | __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 = 470; __pyx_clineno = __LINE__5334; goto __pyx_L1_error;} |
| 5335 | __Pyx_GOTREF(__pyx_t_2); |
| 5336 | __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; |
| 5337 | __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; |
| 5338 | __Pyx_DECREF_SET(__pyx_v_dirname, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_dirname; __pyx_v_dirname = __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); |
| 5339 | __pyx_t_2 = 0; |
| 5340 | |
| 5341 | /* "rgw.pyx":471 |
| 5342 | * self.require_state("mounted") |
| 5343 | * dirname = cstr(dirname, 'dirname') |
| 5344 | * new_dir_handler = FileHandle() # <<<<<<<<<<<<<< |
| 5345 | * cdef: |
| 5346 | * rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler |
| 5347 | */ |
| 5348 | __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rgw_FileHandle), __pyx_empty_tuple, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__5348; goto __pyx_L1_error;} |
| 5349 | __Pyx_GOTREF(__pyx_t_2); |
| 5350 | __pyx_v_new_dir_handler = ((struct __pyx_obj_3rgw_FileHandle *)__pyx_t_2); |
| 5351 | __pyx_t_2 = 0; |
| 5352 | |
| 5353 | /* "rgw.pyx":473 |
| 5354 | * new_dir_handler = FileHandle() |
| 5355 | * cdef: |
| 5356 | * rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler # <<<<<<<<<<<<<< |
| 5357 | * rgw_file_handle *_new_dir_handler |
| 5358 | * char* _dirname = dirname |
| 5359 | */ |
| 5360 | __pyx_v__dir_handler = ((struct rgw_file_handle *)__pyx_v_dir_handler->handler); |
| 5361 | |
| 5362 | /* "rgw.pyx":475 |
| 5363 | * rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler |
| 5364 | * rgw_file_handle *_new_dir_handler |
| 5365 | * char* _dirname = dirname # <<<<<<<<<<<<<< |
| 5366 | * int _flags = flags |
| 5367 | * stat statbuf |
| 5368 | */ |
| 5369 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_dirname); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__5369; goto __pyx_L1_error;} |
| 5370 | __pyx_v__dirname = __pyx_t_6; |
| 5371 | |
| 5372 | /* "rgw.pyx":476 |
| 5373 | * rgw_file_handle *_new_dir_handler |
| 5374 | * char* _dirname = dirname |
| 5375 | * int _flags = flags # <<<<<<<<<<<<<< |
| 5376 | * stat statbuf |
| 5377 | * with nogil: |
| 5378 | */ |
| 5379 | __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_7 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__5379; goto __pyx_L1_error;} |
| 5380 | __pyx_v__flags = __pyx_t_7; |
| 5381 | |
| 5382 | /* "rgw.pyx":478 |
| 5383 | * int _flags = flags |
| 5384 | * stat statbuf |
| 5385 | * with nogil: # <<<<<<<<<<<<<< |
| 5386 | * ret = rgw_mkdir(self.fs, _dir_handler, _dirname, &statbuf, |
| 5387 | * 0, &_new_dir_handler, _flags) |
| 5388 | */ |
| 5389 | { |
| 5390 | #ifdef WITH_THREAD1 |
| 5391 | PyThreadState *_save; |
| 5392 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 5393 | #endif |
| 5394 | /*try:*/ { |
| 5395 | |
| 5396 | /* "rgw.pyx":479 |
| 5397 | * stat statbuf |
| 5398 | * with nogil: |
| 5399 | * ret = rgw_mkdir(self.fs, _dir_handler, _dirname, &statbuf, # <<<<<<<<<<<<<< |
| 5400 | * 0, &_new_dir_handler, _flags) |
| 5401 | * if ret < 0: |
| 5402 | */ |
| 5403 | __pyx_v_ret = rgw_mkdir(__pyx_v_self->fs, __pyx_v__dir_handler, __pyx_v__dirname, (&__pyx_v_statbuf), 0, (&__pyx_v__new_dir_handler), __pyx_v__flags); |
| 5404 | } |
| 5405 | |
| 5406 | /* "rgw.pyx":478 |
| 5407 | * int _flags = flags |
| 5408 | * stat statbuf |
| 5409 | * with nogil: # <<<<<<<<<<<<<< |
| 5410 | * ret = rgw_mkdir(self.fs, _dir_handler, _dirname, &statbuf, |
| 5411 | * 0, &_new_dir_handler, _flags) |
| 5412 | */ |
| 5413 | /*finally:*/ { |
| 5414 | /*normal exit:*/{ |
| 5415 | #ifdef WITH_THREAD1 |
| 5416 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 5417 | #endif |
| 5418 | goto __pyx_L5; |
| 5419 | } |
| 5420 | __pyx_L5:; |
| 5421 | } |
| 5422 | } |
| 5423 | |
| 5424 | /* "rgw.pyx":481 |
| 5425 | * ret = rgw_mkdir(self.fs, _dir_handler, _dirname, &statbuf, |
| 5426 | * 0, &_new_dir_handler, _flags) |
| 5427 | * if ret < 0: # <<<<<<<<<<<<<< |
| 5428 | * raise make_ex(ret, "error in mkdir '%s'" % dirname) |
| 5429 | * new_dir_handler.handler = _new_dir_handler |
| 5430 | */ |
| 5431 | __pyx_t_8 = ((__pyx_v_ret < 0) != 0); |
| 5432 | if (__pyx_t_8) { |
| 5433 | |
| 5434 | /* "rgw.pyx":482 |
| 5435 | * 0, &_new_dir_handler, _flags) |
| 5436 | * if ret < 0: |
| 5437 | * raise make_ex(ret, "error in mkdir '%s'" % dirname) # <<<<<<<<<<<<<< |
| 5438 | * new_dir_handler.handler = _new_dir_handler |
| 5439 | * return new_dir_handler |
| 5440 | */ |
| 5441 | __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 = 482; __pyx_clineno = __LINE__5441; goto __pyx_L1_error;} |
| 5442 | __Pyx_GOTREF(__pyx_t_2); |
| 5443 | __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_error_in_mkdir_s, __pyx_v_dirname)PyString_Format(__pyx_kp_s_error_in_mkdir_s, __pyx_v_dirname); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__5443; goto __pyx_L1_error;} |
| 5444 | __Pyx_GOTREF(__pyx_t_1); |
| 5445 | __pyx_t_5 = __pyx_f_3rgw_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 = 482; __pyx_clineno = __LINE__5445; goto __pyx_L1_error;} |
| 5446 | __Pyx_GOTREF(__pyx_t_5); |
| 5447 | __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; |
| 5448 | __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; |
| 5449 | __Pyx_Raise(__pyx_t_5, 0, 0, 0); |
| 5450 | __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; |
| 5451 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__5451; goto __pyx_L1_error;} |
| 5452 | |
| 5453 | /* "rgw.pyx":481 |
| 5454 | * ret = rgw_mkdir(self.fs, _dir_handler, _dirname, &statbuf, |
| 5455 | * 0, &_new_dir_handler, _flags) |
| 5456 | * if ret < 0: # <<<<<<<<<<<<<< |
| 5457 | * raise make_ex(ret, "error in mkdir '%s'" % dirname) |
| 5458 | * new_dir_handler.handler = _new_dir_handler |
| 5459 | */ |
| 5460 | } |
| 5461 | |
| 5462 | /* "rgw.pyx":483 |
| 5463 | * if ret < 0: |
| 5464 | * raise make_ex(ret, "error in mkdir '%s'" % dirname) |
| 5465 | * new_dir_handler.handler = _new_dir_handler # <<<<<<<<<<<<<< |
| 5466 | * return new_dir_handler |
| 5467 | * |
| 5468 | */ |
| 5469 | __pyx_v_new_dir_handler->handler = __pyx_v__new_dir_handler; |
| 5470 | |
| 5471 | /* "rgw.pyx":484 |
| 5472 | * raise make_ex(ret, "error in mkdir '%s'" % dirname) |
| 5473 | * new_dir_handler.handler = _new_dir_handler |
| 5474 | * return new_dir_handler # <<<<<<<<<<<<<< |
| 5475 | * |
| 5476 | * def rename(self, FileHandle src_handler, src_name, FileHandle dst_handler, dst_name, flags = 0): |
| 5477 | */ |
| 5478 | __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); |
| 5479 | __Pyx_INCREF(((PyObject *)__pyx_v_new_dir_handler))( ((PyObject*)(((PyObject *)__pyx_v_new_dir_handler)))->ob_refcnt ++); |
| 5480 | __pyx_r = ((PyObject *)__pyx_v_new_dir_handler); |
| 5481 | goto __pyx_L0; |
| 5482 | |
| 5483 | /* "rgw.pyx":468 |
| 5484 | * return file_handler |
| 5485 | * |
| 5486 | * def mkdir(self, FileHandle dir_handler, dirname, flags = 0): # <<<<<<<<<<<<<< |
| 5487 | * self.require_state("mounted") |
| 5488 | * dirname = cstr(dirname, 'dirname') |
| 5489 | */ |
| 5490 | |
| 5491 | /* function exit code */ |
| 5492 | __pyx_L1_error:; |
| 5493 | __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); |
| 5494 | __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); |
| 5495 | __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); |
| 5496 | __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); |
| 5497 | __Pyx_AddTraceback("rgw.LibRGWFS.mkdir", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5498 | __pyx_r = NULL((void*)0); |
| 5499 | __pyx_L0:; |
| 5500 | __Pyx_XDECREF((PyObject *)__pyx_v_new_dir_handler)do { if (((PyObject *)__pyx_v_new_dir_handler) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_new_dir_handler ))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)( (PyObject *)__pyx_v_new_dir_handler)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)((PyObject *)__pyx_v_new_dir_handler )))); } while (0); } while (0); |
| 5501 | __Pyx_XDECREF(__pyx_v_dirname)do { if ((__pyx_v_dirname) == ((void*)0)) ; else do { if ( -- ((PyObject*)(__pyx_v_dirname))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(__pyx_v_dirname)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_dirname)))); } while (0); } while (0); |
| 5502 | __Pyx_XGIVEREF(__pyx_r); |
| 5503 | __Pyx_RefNannyFinishContext(); |
| 5504 | return __pyx_r; |
| 5505 | } |
| 5506 | |
| 5507 | /* "rgw.pyx":486 |
| 5508 | * return new_dir_handler |
| 5509 | * |
| 5510 | * def rename(self, FileHandle src_handler, src_name, FileHandle dst_handler, dst_name, flags = 0): # <<<<<<<<<<<<<< |
| 5511 | * self.require_state("mounted") |
| 5512 | * |
| 5513 | */ |
| 5514 | |
| 5515 | /* Python wrapper */ |
| 5516 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_25rename(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 5517 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_25rename(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 5518 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_src_handler = 0; |
| 5519 | PyObject *__pyx_v_src_name = 0; |
| 5520 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_dst_handler = 0; |
| 5521 | PyObject *__pyx_v_dst_name = 0; |
| 5522 | PyObject *__pyx_v_flags = 0; |
| 5523 | int __pyx_lineno = 0; |
| 5524 | const char *__pyx_filename = NULL((void*)0); |
| 5525 | int __pyx_clineno = 0; |
| 5526 | PyObject *__pyx_r = 0; |
| 5527 | __Pyx_RefNannyDeclarations |
| 5528 | __Pyx_RefNannySetupContext("rename (wrapper)", 0); |
| 5529 | { |
| 5530 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_src_handler,&__pyx_n_s_src_name,&__pyx_n_s_dst_handler,&__pyx_n_s_dst_name,&__pyx_n_s_flags,0}; |
| 5531 | PyObject* values[5] = {0,0,0,0,0}; |
| 5532 | values[4] = ((PyObject *)__pyx_int_0); |
| 5533 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 5534 | Py_ssize_t kw_args; |
| 5535 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 5536 | switch (pos_args) { |
| 5537 | case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]); |
| 5538 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 5539 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 5540 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 5541 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 5542 | case 0: break; |
| 5543 | default: goto __pyx_L5_argtuple_error; |
| 5544 | } |
| 5545 | kw_args = PyDict_Size(__pyx_kwds); |
| 5546 | switch (pos_args) { |
| 5547 | case 0: |
| 5548 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_src_handler)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_src_handler )) != 0), 1)) kw_args--; |
| 5549 | else goto __pyx_L5_argtuple_error; |
| 5550 | case 1: |
| 5551 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_src_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_src_name )) != 0), 1)) kw_args--; |
| 5552 | else { |
| 5553 | __Pyx_RaiseArgtupleInvalid("rename", 0, 4, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__5553; goto __pyx_L3_error;} |
| 5554 | } |
| 5555 | case 2: |
| 5556 | if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dst_handler)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dst_handler )) != 0), 1)) kw_args--; |
| 5557 | else { |
| 5558 | __Pyx_RaiseArgtupleInvalid("rename", 0, 4, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__5558; goto __pyx_L3_error;} |
| 5559 | } |
| 5560 | case 3: |
| 5561 | if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dst_name)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dst_name )) != 0), 1)) kw_args--; |
| 5562 | else { |
| 5563 | __Pyx_RaiseArgtupleInvalid("rename", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__5563; goto __pyx_L3_error;} |
| 5564 | } |
| 5565 | case 4: |
| 5566 | if (kw_args > 0) { |
| 5567 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); |
| 5568 | if (value) { values[4] = value; kw_args--; } |
| 5569 | } |
| 5570 | } |
| 5571 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 5572 | 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 = 486; __pyx_clineno = __LINE__5572; goto __pyx_L3_error;} |
| 5573 | } |
| 5574 | } else { |
| 5575 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 5576 | case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]); |
| 5577 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 5578 | values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 5579 | values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 5580 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 5581 | break; |
| 5582 | default: goto __pyx_L5_argtuple_error; |
| 5583 | } |
| 5584 | } |
| 5585 | __pyx_v_src_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[0]); |
| 5586 | __pyx_v_src_name = values[1]; |
| 5587 | __pyx_v_dst_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[2]); |
| 5588 | __pyx_v_dst_name = values[3]; |
| 5589 | __pyx_v_flags = values[4]; |
| 5590 | } |
| 5591 | goto __pyx_L4_argument_unpacking_done; |
| 5592 | __pyx_L5_argtuple_error:; |
| 5593 | __Pyx_RaiseArgtupleInvalid("rename", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__5593; goto __pyx_L3_error;} |
| 5594 | __pyx_L3_error:; |
| 5595 | __Pyx_AddTraceback("rgw.LibRGWFS.rename", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5596 | __Pyx_RefNannyFinishContext(); |
| 5597 | return NULL((void*)0); |
| 5598 | __pyx_L4_argument_unpacking_done:; |
| 5599 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src_handler), __pyx_ptype_3rgw_FileHandle, 1, "src_handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src_handler ), __pyx_ptype_3rgw_FileHandle, 1, "src_handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__5599; goto __pyx_L1_error;} |
| 5600 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst_handler), __pyx_ptype_3rgw_FileHandle, 1, "dst_handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst_handler ), __pyx_ptype_3rgw_FileHandle, 1, "dst_handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__5600; goto __pyx_L1_error;} |
Value stored to '__pyx_filename' is never read | |
| 5601 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_24rename(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_src_handler, __pyx_v_src_name, __pyx_v_dst_handler, __pyx_v_dst_name, __pyx_v_flags); |
| 5602 | |
| 5603 | /* function exit code */ |
| 5604 | goto __pyx_L0; |
| 5605 | __pyx_L1_error:; |
| 5606 | __pyx_r = NULL((void*)0); |
| 5607 | __pyx_L0:; |
| 5608 | __Pyx_RefNannyFinishContext(); |
| 5609 | return __pyx_r; |
| 5610 | } |
| 5611 | |
| 5612 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_24rename(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_src_handler, PyObject *__pyx_v_src_name, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dst_handler, PyObject *__pyx_v_dst_name, PyObject *__pyx_v_flags) { |
| 5613 | struct rgw_file_handle *__pyx_v__src_dir_handler; |
| 5614 | struct rgw_file_handle *__pyx_v__dst_dir_handler; |
| 5615 | char *__pyx_v__src_name; |
| 5616 | char *__pyx_v__dst_name; |
| 5617 | int __pyx_v__flags; |
| 5618 | int __pyx_v_ret; |
| 5619 | PyObject *__pyx_r = NULL((void*)0); |
| 5620 | __Pyx_RefNannyDeclarations |
| 5621 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 5622 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 5623 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 5624 | Py_ssize_t __pyx_t_4; |
| 5625 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 5626 | char *__pyx_t_6; |
| 5627 | int __pyx_t_7; |
| 5628 | int __pyx_t_8; |
| 5629 | int __pyx_lineno = 0; |
| 5630 | const char *__pyx_filename = NULL((void*)0); |
| 5631 | int __pyx_clineno = 0; |
| 5632 | __Pyx_RefNannySetupContext("rename", 0); |
| 5633 | __Pyx_INCREF(__pyx_v_src_name)( ((PyObject*)(__pyx_v_src_name))->ob_refcnt++); |
| 5634 | __Pyx_INCREF(__pyx_v_dst_name)( ((PyObject*)(__pyx_v_dst_name))->ob_refcnt++); |
| 5635 | |
| 5636 | /* "rgw.pyx":487 |
| 5637 | * |
| 5638 | * def rename(self, FileHandle src_handler, src_name, FileHandle dst_handler, dst_name, flags = 0): |
| 5639 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 5640 | * |
| 5641 | * src_name = cstr(src_name, 'src_name') |
| 5642 | */ |
| 5643 | __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 = 487; __pyx_clineno = __LINE__5643; goto __pyx_L1_error;} |
| 5644 | __Pyx_GOTREF(__pyx_t_1); |
| 5645 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__7, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__5645; goto __pyx_L1_error;} |
| 5646 | __Pyx_GOTREF(__pyx_t_2); |
| 5647 | __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; |
| 5648 | __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; |
| 5649 | |
| 5650 | /* "rgw.pyx":489 |
| 5651 | * self.require_state("mounted") |
| 5652 | * |
| 5653 | * src_name = cstr(src_name, 'src_name') # <<<<<<<<<<<<<< |
| 5654 | * dst_name = cstr(dst_name, 'dst_name') |
| 5655 | * |
| 5656 | */ |
| 5657 | __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 = 489; __pyx_clineno = __LINE__5657; goto __pyx_L1_error;} |
| 5658 | __Pyx_GOTREF(__pyx_t_1); |
| 5659 | __pyx_t_3 = NULL((void*)0); |
| 5660 | __pyx_t_4 = 0; |
| 5661 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type )), 0)) { |
| 5662 | __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self); |
| 5663 | if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) { |
| 5664 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func); |
| 5665 | __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); |
| 5666 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 5667 | __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); |
| 5668 | __pyx_t_4 = 1; |
| 5669 | } |
| 5670 | } |
| 5671 | __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__5671; goto __pyx_L1_error;} |
| 5672 | __Pyx_GOTREF(__pyx_t_5); |
| 5673 | if (__pyx_t_3) { |
| 5674 | __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); |
| 5675 | } |
| 5676 | __Pyx_INCREF(__pyx_v_src_name)( ((PyObject*)(__pyx_v_src_name))->ob_refcnt++); |
| 5677 | __Pyx_GIVEREF(__pyx_v_src_name); |
| 5678 | PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_src_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_src_name ); |
| 5679 | __Pyx_INCREF(__pyx_n_s_src_name)( ((PyObject*)(__pyx_n_s_src_name))->ob_refcnt++); |
| 5680 | __Pyx_GIVEREF(__pyx_n_s_src_name); |
| 5681 | PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_src_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_src_name ); |
| 5682 | __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__5682; goto __pyx_L1_error;} |
| 5683 | __Pyx_GOTREF(__pyx_t_2); |
| 5684 | __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; |
| 5685 | __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; |
| 5686 | __Pyx_DECREF_SET(__pyx_v_src_name, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_src_name; __pyx_v_src_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); |
| 5687 | __pyx_t_2 = 0; |
| 5688 | |
| 5689 | /* "rgw.pyx":490 |
| 5690 | * |
| 5691 | * src_name = cstr(src_name, 'src_name') |
| 5692 | * dst_name = cstr(dst_name, 'dst_name') # <<<<<<<<<<<<<< |
| 5693 | * |
| 5694 | * cdef: |
| 5695 | */ |
| 5696 | __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 = 490; __pyx_clineno = __LINE__5696; goto __pyx_L1_error;} |
| 5697 | __Pyx_GOTREF(__pyx_t_1); |
| 5698 | __pyx_t_5 = NULL((void*)0); |
| 5699 | __pyx_t_4 = 0; |
| 5700 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type )), 0)) { |
| 5701 | __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self); |
| 5702 | if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) { |
| 5703 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func); |
| 5704 | __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); |
| 5705 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 5706 | __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); |
| 5707 | __pyx_t_4 = 1; |
| 5708 | } |
| 5709 | } |
| 5710 | __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 = 490; __pyx_clineno = __LINE__5710; goto __pyx_L1_error;} |
| 5711 | __Pyx_GOTREF(__pyx_t_3); |
| 5712 | if (__pyx_t_5) { |
| 5713 | __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); |
| 5714 | } |
| 5715 | __Pyx_INCREF(__pyx_v_dst_name)( ((PyObject*)(__pyx_v_dst_name))->ob_refcnt++); |
| 5716 | __Pyx_GIVEREF(__pyx_v_dst_name); |
| 5717 | PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_dst_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_dst_name ); |
| 5718 | __Pyx_INCREF(__pyx_n_s_dst_name)( ((PyObject*)(__pyx_n_s_dst_name))->ob_refcnt++); |
| 5719 | __Pyx_GIVEREF(__pyx_n_s_dst_name); |
| 5720 | PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_dst_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_dst_name ); |
| 5721 | __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 = 490; __pyx_clineno = __LINE__5721; goto __pyx_L1_error;} |
| 5722 | __Pyx_GOTREF(__pyx_t_2); |
| 5723 | __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; |
| 5724 | __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; |
| 5725 | __Pyx_DECREF_SET(__pyx_v_dst_name, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_dst_name; __pyx_v_dst_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); |
| 5726 | __pyx_t_2 = 0; |
| 5727 | |
| 5728 | /* "rgw.pyx":493 |
| 5729 | * |
| 5730 | * cdef: |
| 5731 | * rgw_file_handle *_src_dir_handler = <rgw_file_handle*>src_handler.handler # <<<<<<<<<<<<<< |
| 5732 | * rgw_file_handle *_dst_dir_handler = <rgw_file_handle*>dst_handler.handler |
| 5733 | * char* _src_name = src_name |
| 5734 | */ |
| 5735 | __pyx_v__src_dir_handler = ((struct rgw_file_handle *)__pyx_v_src_handler->handler); |
| 5736 | |
| 5737 | /* "rgw.pyx":494 |
| 5738 | * cdef: |
| 5739 | * rgw_file_handle *_src_dir_handler = <rgw_file_handle*>src_handler.handler |
| 5740 | * rgw_file_handle *_dst_dir_handler = <rgw_file_handle*>dst_handler.handler # <<<<<<<<<<<<<< |
| 5741 | * char* _src_name = src_name |
| 5742 | * char* _dst_name = dst_name |
| 5743 | */ |
| 5744 | __pyx_v__dst_dir_handler = ((struct rgw_file_handle *)__pyx_v_dst_handler->handler); |
| 5745 | |
| 5746 | /* "rgw.pyx":495 |
| 5747 | * rgw_file_handle *_src_dir_handler = <rgw_file_handle*>src_handler.handler |
| 5748 | * rgw_file_handle *_dst_dir_handler = <rgw_file_handle*>dst_handler.handler |
| 5749 | * char* _src_name = src_name # <<<<<<<<<<<<<< |
| 5750 | * char* _dst_name = dst_name |
| 5751 | * int _flags = flags |
| 5752 | */ |
| 5753 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_src_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__5753; goto __pyx_L1_error;} |
| 5754 | __pyx_v__src_name = __pyx_t_6; |
| 5755 | |
| 5756 | /* "rgw.pyx":496 |
| 5757 | * rgw_file_handle *_dst_dir_handler = <rgw_file_handle*>dst_handler.handler |
| 5758 | * char* _src_name = src_name |
| 5759 | * char* _dst_name = dst_name # <<<<<<<<<<<<<< |
| 5760 | * int _flags = flags |
| 5761 | * |
| 5762 | */ |
| 5763 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_dst_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__5763; goto __pyx_L1_error;} |
| 5764 | __pyx_v__dst_name = __pyx_t_6; |
| 5765 | |
| 5766 | /* "rgw.pyx":497 |
| 5767 | * char* _src_name = src_name |
| 5768 | * char* _dst_name = dst_name |
| 5769 | * int _flags = flags # <<<<<<<<<<<<<< |
| 5770 | * |
| 5771 | * with nogil: |
| 5772 | */ |
| 5773 | __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_7 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__5773; goto __pyx_L1_error;} |
| 5774 | __pyx_v__flags = __pyx_t_7; |
| 5775 | |
| 5776 | /* "rgw.pyx":499 |
| 5777 | * int _flags = flags |
| 5778 | * |
| 5779 | * with nogil: # <<<<<<<<<<<<<< |
| 5780 | * ret = rgw_rename(self.fs, _src_dir_handler, _src_name, |
| 5781 | * _dst_dir_handler, _dst_name, _flags) |
| 5782 | */ |
| 5783 | { |
| 5784 | #ifdef WITH_THREAD1 |
| 5785 | PyThreadState *_save; |
| 5786 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 5787 | #endif |
| 5788 | /*try:*/ { |
| 5789 | |
| 5790 | /* "rgw.pyx":500 |
| 5791 | * |
| 5792 | * with nogil: |
| 5793 | * ret = rgw_rename(self.fs, _src_dir_handler, _src_name, # <<<<<<<<<<<<<< |
| 5794 | * _dst_dir_handler, _dst_name, _flags) |
| 5795 | * if ret < 0: |
| 5796 | */ |
| 5797 | __pyx_v_ret = rgw_rename(__pyx_v_self->fs, __pyx_v__src_dir_handler, __pyx_v__src_name, __pyx_v__dst_dir_handler, __pyx_v__dst_name, __pyx_v__flags); |
| 5798 | } |
| 5799 | |
| 5800 | /* "rgw.pyx":499 |
| 5801 | * int _flags = flags |
| 5802 | * |
| 5803 | * with nogil: # <<<<<<<<<<<<<< |
| 5804 | * ret = rgw_rename(self.fs, _src_dir_handler, _src_name, |
| 5805 | * _dst_dir_handler, _dst_name, _flags) |
| 5806 | */ |
| 5807 | /*finally:*/ { |
| 5808 | /*normal exit:*/{ |
| 5809 | #ifdef WITH_THREAD1 |
| 5810 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 5811 | #endif |
| 5812 | goto __pyx_L5; |
| 5813 | } |
| 5814 | __pyx_L5:; |
| 5815 | } |
| 5816 | } |
| 5817 | |
| 5818 | /* "rgw.pyx":502 |
| 5819 | * ret = rgw_rename(self.fs, _src_dir_handler, _src_name, |
| 5820 | * _dst_dir_handler, _dst_name, _flags) |
| 5821 | * if ret < 0: # <<<<<<<<<<<<<< |
| 5822 | * raise make_ex(ret, "error in rename '%s' to '%s'" % (src_name, |
| 5823 | * dst_name)) |
| 5824 | */ |
| 5825 | __pyx_t_8 = ((__pyx_v_ret < 0) != 0); |
| 5826 | if (__pyx_t_8) { |
| 5827 | |
| 5828 | /* "rgw.pyx":503 |
| 5829 | * _dst_dir_handler, _dst_name, _flags) |
| 5830 | * if ret < 0: |
| 5831 | * raise make_ex(ret, "error in rename '%s' to '%s'" % (src_name, # <<<<<<<<<<<<<< |
| 5832 | * dst_name)) |
| 5833 | * return ret |
| 5834 | */ |
| 5835 | __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 = 503; __pyx_clineno = __LINE__5835; goto __pyx_L1_error;} |
| 5836 | __Pyx_GOTREF(__pyx_t_2); |
| 5837 | |
| 5838 | /* "rgw.pyx":504 |
| 5839 | * if ret < 0: |
| 5840 | * raise make_ex(ret, "error in rename '%s' to '%s'" % (src_name, |
| 5841 | * dst_name)) # <<<<<<<<<<<<<< |
| 5842 | * return ret |
| 5843 | * |
| 5844 | */ |
| 5845 | __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__5845; goto __pyx_L1_error;} |
| 5846 | __Pyx_GOTREF(__pyx_t_1); |
| 5847 | __Pyx_INCREF(__pyx_v_src_name)( ((PyObject*)(__pyx_v_src_name))->ob_refcnt++); |
| 5848 | __Pyx_GIVEREF(__pyx_v_src_name); |
| 5849 | PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_src_name)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_src_name ); |
| 5850 | __Pyx_INCREF(__pyx_v_dst_name)( ((PyObject*)(__pyx_v_dst_name))->ob_refcnt++); |
| 5851 | __Pyx_GIVEREF(__pyx_v_dst_name); |
| 5852 | PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_dst_name)(((PyTupleObject *)(__pyx_t_1))->ob_item[1] = __pyx_v_dst_name ); |
| 5853 | |
| 5854 | /* "rgw.pyx":503 |
| 5855 | * _dst_dir_handler, _dst_name, _flags) |
| 5856 | * if ret < 0: |
| 5857 | * raise make_ex(ret, "error in rename '%s' to '%s'" % (src_name, # <<<<<<<<<<<<<< |
| 5858 | * dst_name)) |
| 5859 | * return ret |
| 5860 | */ |
| 5861 | __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_in_rename_s_to_s, __pyx_t_1)PyString_Format(__pyx_kp_s_error_in_rename_s_to_s, __pyx_t_1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__5861; goto __pyx_L1_error;} |
| 5862 | __Pyx_GOTREF(__pyx_t_3); |
| 5863 | __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; |
| 5864 | __pyx_t_1 = __pyx_f_3rgw_make_ex(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__5864; goto __pyx_L1_error;} |
| 5865 | __Pyx_GOTREF(__pyx_t_1); |
| 5866 | __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; |
| 5867 | __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; |
| 5868 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 5869 | __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; |
| 5870 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__5870; goto __pyx_L1_error;} |
| 5871 | |
| 5872 | /* "rgw.pyx":502 |
| 5873 | * ret = rgw_rename(self.fs, _src_dir_handler, _src_name, |
| 5874 | * _dst_dir_handler, _dst_name, _flags) |
| 5875 | * if ret < 0: # <<<<<<<<<<<<<< |
| 5876 | * raise make_ex(ret, "error in rename '%s' to '%s'" % (src_name, |
| 5877 | * dst_name)) |
| 5878 | */ |
| 5879 | } |
| 5880 | |
| 5881 | /* "rgw.pyx":505 |
| 5882 | * raise make_ex(ret, "error in rename '%s' to '%s'" % (src_name, |
| 5883 | * dst_name)) |
| 5884 | * return ret # <<<<<<<<<<<<<< |
| 5885 | * |
| 5886 | * def unlink(self, FileHandle handler, name, flags = 0): |
| 5887 | */ |
| 5888 | __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); |
| 5889 | __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 = 505; __pyx_clineno = __LINE__5889; goto __pyx_L1_error;} |
| 5890 | __Pyx_GOTREF(__pyx_t_1); |
| 5891 | __pyx_r = __pyx_t_1; |
| 5892 | __pyx_t_1 = 0; |
| 5893 | goto __pyx_L0; |
| 5894 | |
| 5895 | /* "rgw.pyx":486 |
| 5896 | * return new_dir_handler |
| 5897 | * |
| 5898 | * def rename(self, FileHandle src_handler, src_name, FileHandle dst_handler, dst_name, flags = 0): # <<<<<<<<<<<<<< |
| 5899 | * self.require_state("mounted") |
| 5900 | * |
| 5901 | */ |
| 5902 | |
| 5903 | /* function exit code */ |
| 5904 | __pyx_L1_error:; |
| 5905 | __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); |
| 5906 | __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); |
| 5907 | __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); |
| 5908 | __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); |
| 5909 | __Pyx_AddTraceback("rgw.LibRGWFS.rename", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5910 | __pyx_r = NULL((void*)0); |
| 5911 | __pyx_L0:; |
| 5912 | __Pyx_XDECREF(__pyx_v_src_name)do { if ((__pyx_v_src_name) == ((void*)0)) ; else do { if ( -- ((PyObject*)(__pyx_v_src_name))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(__pyx_v_src_name)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_src_name)))); } while (0); } while (0); |
| 5913 | __Pyx_XDECREF(__pyx_v_dst_name)do { if ((__pyx_v_dst_name) == ((void*)0)) ; else do { if ( -- ((PyObject*)(__pyx_v_dst_name))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(__pyx_v_dst_name)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_dst_name)))); } while (0); } while (0); |
| 5914 | __Pyx_XGIVEREF(__pyx_r); |
| 5915 | __Pyx_RefNannyFinishContext(); |
| 5916 | return __pyx_r; |
| 5917 | } |
| 5918 | |
| 5919 | /* "rgw.pyx":507 |
| 5920 | * return ret |
| 5921 | * |
| 5922 | * def unlink(self, FileHandle handler, name, flags = 0): # <<<<<<<<<<<<<< |
| 5923 | * self.require_state("mounted") |
| 5924 | * name = cstr(name, 'name') |
| 5925 | */ |
| 5926 | |
| 5927 | /* Python wrapper */ |
| 5928 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_27unlink(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 5929 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_27unlink(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 5930 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_handler = 0; |
| 5931 | PyObject *__pyx_v_name = 0; |
| 5932 | PyObject *__pyx_v_flags = 0; |
| 5933 | int __pyx_lineno = 0; |
| 5934 | const char *__pyx_filename = NULL((void*)0); |
| 5935 | int __pyx_clineno = 0; |
| 5936 | PyObject *__pyx_r = 0; |
| 5937 | __Pyx_RefNannyDeclarations |
| 5938 | __Pyx_RefNannySetupContext("unlink (wrapper)", 0); |
| 5939 | { |
| 5940 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handler,&__pyx_n_s_name,&__pyx_n_s_flags,0}; |
| 5941 | PyObject* values[3] = {0,0,0}; |
| 5942 | values[2] = ((PyObject *)__pyx_int_0); |
| 5943 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 5944 | Py_ssize_t kw_args; |
| 5945 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 5946 | switch (pos_args) { |
| 5947 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 5948 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 5949 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 5950 | case 0: break; |
| 5951 | default: goto __pyx_L5_argtuple_error; |
| 5952 | } |
| 5953 | kw_args = PyDict_Size(__pyx_kwds); |
| 5954 | switch (pos_args) { |
| 5955 | case 0: |
| 5956 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handler)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handler )) != 0), 1)) kw_args--; |
| 5957 | else goto __pyx_L5_argtuple_error; |
| 5958 | case 1: |
| 5959 | 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--; |
| 5960 | else { |
| 5961 | __Pyx_RaiseArgtupleInvalid("unlink", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__5961; goto __pyx_L3_error;} |
| 5962 | } |
| 5963 | case 2: |
| 5964 | if (kw_args > 0) { |
| 5965 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); |
| 5966 | if (value) { values[2] = value; kw_args--; } |
| 5967 | } |
| 5968 | } |
| 5969 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 5970 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "unlink") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames , 0, values, pos_args, "unlink") < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__5970; goto __pyx_L3_error;} |
| 5971 | } |
| 5972 | } else { |
| 5973 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 5974 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 5975 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 5976 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 5977 | break; |
| 5978 | default: goto __pyx_L5_argtuple_error; |
| 5979 | } |
| 5980 | } |
| 5981 | __pyx_v_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[0]); |
| 5982 | __pyx_v_name = values[1]; |
| 5983 | __pyx_v_flags = values[2]; |
| 5984 | } |
| 5985 | goto __pyx_L4_argument_unpacking_done; |
| 5986 | __pyx_L5_argtuple_error:; |
| 5987 | __Pyx_RaiseArgtupleInvalid("unlink", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__5987; goto __pyx_L3_error;} |
| 5988 | __pyx_L3_error:; |
| 5989 | __Pyx_AddTraceback("rgw.LibRGWFS.unlink", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5990 | __Pyx_RefNannyFinishContext(); |
| 5991 | return NULL((void*)0); |
| 5992 | __pyx_L4_argument_unpacking_done:; |
| 5993 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handler), __pyx_ptype_3rgw_FileHandle, 1, "handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handler ), __pyx_ptype_3rgw_FileHandle, 1, "handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__5993; goto __pyx_L1_error;} |
| 5994 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_26unlink(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_handler, __pyx_v_name, __pyx_v_flags); |
| 5995 | |
| 5996 | /* function exit code */ |
| 5997 | goto __pyx_L0; |
| 5998 | __pyx_L1_error:; |
| 5999 | __pyx_r = NULL((void*)0); |
| 6000 | __pyx_L0:; |
| 6001 | __Pyx_RefNannyFinishContext(); |
| 6002 | return __pyx_r; |
| 6003 | } |
| 6004 | |
| 6005 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_26unlink(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_handler, PyObject *__pyx_v_name, PyObject *__pyx_v_flags) { |
| 6006 | struct rgw_file_handle *__pyx_v__handler; |
| 6007 | int __pyx_v__flags; |
| 6008 | char *__pyx_v__name; |
| 6009 | int __pyx_v_ret; |
| 6010 | PyObject *__pyx_r = NULL((void*)0); |
| 6011 | __Pyx_RefNannyDeclarations |
| 6012 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 6013 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 6014 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 6015 | Py_ssize_t __pyx_t_4; |
| 6016 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 6017 | int __pyx_t_6; |
| 6018 | char *__pyx_t_7; |
| 6019 | int __pyx_t_8; |
| 6020 | int __pyx_lineno = 0; |
| 6021 | const char *__pyx_filename = NULL((void*)0); |
| 6022 | int __pyx_clineno = 0; |
| 6023 | __Pyx_RefNannySetupContext("unlink", 0); |
| 6024 | __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++); |
| 6025 | |
| 6026 | /* "rgw.pyx":508 |
| 6027 | * |
| 6028 | * def unlink(self, FileHandle handler, name, flags = 0): |
| 6029 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 6030 | * name = cstr(name, 'name') |
| 6031 | * cdef: |
| 6032 | */ |
| 6033 | __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 = 508; __pyx_clineno = __LINE__6033; goto __pyx_L1_error;} |
| 6034 | __Pyx_GOTREF(__pyx_t_1); |
| 6035 | __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 = 508; __pyx_clineno = __LINE__6035; goto __pyx_L1_error;} |
| 6036 | __Pyx_GOTREF(__pyx_t_2); |
| 6037 | __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; |
| 6038 | __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; |
| 6039 | |
| 6040 | /* "rgw.pyx":509 |
| 6041 | * def unlink(self, FileHandle handler, name, flags = 0): |
| 6042 | * self.require_state("mounted") |
| 6043 | * name = cstr(name, 'name') # <<<<<<<<<<<<<< |
| 6044 | * cdef: |
| 6045 | * rgw_file_handle *_handler = <rgw_file_handle*>handler.handler |
| 6046 | */ |
| 6047 | __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 = 509; __pyx_clineno = __LINE__6047; goto __pyx_L1_error;} |
| 6048 | __Pyx_GOTREF(__pyx_t_1); |
| 6049 | __pyx_t_3 = NULL((void*)0); |
| 6050 | __pyx_t_4 = 0; |
| 6051 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type )), 0)) { |
| 6052 | __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self); |
| 6053 | if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) { |
| 6054 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func); |
| 6055 | __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); |
| 6056 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 6057 | __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); |
| 6058 | __pyx_t_4 = 1; |
| 6059 | } |
| 6060 | } |
| 6061 | __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 = 509; __pyx_clineno = __LINE__6061; goto __pyx_L1_error;} |
| 6062 | __Pyx_GOTREF(__pyx_t_5); |
| 6063 | if (__pyx_t_3) { |
| 6064 | __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); |
| 6065 | } |
| 6066 | __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++); |
| 6067 | __Pyx_GIVEREF(__pyx_v_name); |
| 6068 | 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 ); |
| 6069 | __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++); |
| 6070 | __Pyx_GIVEREF(__pyx_n_s_name); |
| 6071 | 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 ); |
| 6072 | __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 = 509; __pyx_clineno = __LINE__6072; goto __pyx_L1_error;} |
| 6073 | __Pyx_GOTREF(__pyx_t_2); |
| 6074 | __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; |
| 6075 | __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; |
| 6076 | __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); |
| 6077 | __pyx_t_2 = 0; |
| 6078 | |
| 6079 | /* "rgw.pyx":511 |
| 6080 | * name = cstr(name, 'name') |
| 6081 | * cdef: |
| 6082 | * rgw_file_handle *_handler = <rgw_file_handle*>handler.handler # <<<<<<<<<<<<<< |
| 6083 | * int _flags = flags |
| 6084 | * char* _name = name |
| 6085 | */ |
| 6086 | __pyx_v__handler = ((struct rgw_file_handle *)__pyx_v_handler->handler); |
| 6087 | |
| 6088 | /* "rgw.pyx":512 |
| 6089 | * cdef: |
| 6090 | * rgw_file_handle *_handler = <rgw_file_handle*>handler.handler |
| 6091 | * int _flags = flags # <<<<<<<<<<<<<< |
| 6092 | * char* _name = name |
| 6093 | * with nogil: |
| 6094 | */ |
| 6095 | __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_6 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__6095; goto __pyx_L1_error;} |
| 6096 | __pyx_v__flags = __pyx_t_6; |
| 6097 | |
| 6098 | /* "rgw.pyx":513 |
| 6099 | * rgw_file_handle *_handler = <rgw_file_handle*>handler.handler |
| 6100 | * int _flags = flags |
| 6101 | * char* _name = name # <<<<<<<<<<<<<< |
| 6102 | * with nogil: |
| 6103 | * ret = rgw_unlink(self.fs, _handler, _name, _flags) |
| 6104 | */ |
| 6105 | __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__6105; goto __pyx_L1_error;} |
| 6106 | __pyx_v__name = __pyx_t_7; |
| 6107 | |
| 6108 | /* "rgw.pyx":514 |
| 6109 | * int _flags = flags |
| 6110 | * char* _name = name |
| 6111 | * with nogil: # <<<<<<<<<<<<<< |
| 6112 | * ret = rgw_unlink(self.fs, _handler, _name, _flags) |
| 6113 | * if ret < 0: |
| 6114 | */ |
| 6115 | { |
| 6116 | #ifdef WITH_THREAD1 |
| 6117 | PyThreadState *_save; |
| 6118 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 6119 | #endif |
| 6120 | /*try:*/ { |
| 6121 | |
| 6122 | /* "rgw.pyx":515 |
| 6123 | * char* _name = name |
| 6124 | * with nogil: |
| 6125 | * ret = rgw_unlink(self.fs, _handler, _name, _flags) # <<<<<<<<<<<<<< |
| 6126 | * if ret < 0: |
| 6127 | * raise make_ex(ret, "error in unlink") |
| 6128 | */ |
| 6129 | __pyx_v_ret = rgw_unlink(__pyx_v_self->fs, __pyx_v__handler, __pyx_v__name, __pyx_v__flags); |
| 6130 | } |
| 6131 | |
| 6132 | /* "rgw.pyx":514 |
| 6133 | * int _flags = flags |
| 6134 | * char* _name = name |
| 6135 | * with nogil: # <<<<<<<<<<<<<< |
| 6136 | * ret = rgw_unlink(self.fs, _handler, _name, _flags) |
| 6137 | * if ret < 0: |
| 6138 | */ |
| 6139 | /*finally:*/ { |
| 6140 | /*normal exit:*/{ |
| 6141 | #ifdef WITH_THREAD1 |
| 6142 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 6143 | #endif |
| 6144 | goto __pyx_L5; |
| 6145 | } |
| 6146 | __pyx_L5:; |
| 6147 | } |
| 6148 | } |
| 6149 | |
| 6150 | /* "rgw.pyx":516 |
| 6151 | * with nogil: |
| 6152 | * ret = rgw_unlink(self.fs, _handler, _name, _flags) |
| 6153 | * if ret < 0: # <<<<<<<<<<<<<< |
| 6154 | * raise make_ex(ret, "error in unlink") |
| 6155 | * return ret |
| 6156 | */ |
| 6157 | __pyx_t_8 = ((__pyx_v_ret < 0) != 0); |
| 6158 | if (__pyx_t_8) { |
| 6159 | |
| 6160 | /* "rgw.pyx":517 |
| 6161 | * ret = rgw_unlink(self.fs, _handler, _name, _flags) |
| 6162 | * if ret < 0: |
| 6163 | * raise make_ex(ret, "error in unlink") # <<<<<<<<<<<<<< |
| 6164 | * return ret |
| 6165 | * |
| 6166 | */ |
| 6167 | __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 = 517; __pyx_clineno = __LINE__6167; goto __pyx_L1_error;} |
| 6168 | __Pyx_GOTREF(__pyx_t_2); |
| 6169 | __pyx_t_1 = __pyx_f_3rgw_make_ex(__pyx_t_2, __pyx_kp_s_error_in_unlink); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__6169; goto __pyx_L1_error;} |
| 6170 | __Pyx_GOTREF(__pyx_t_1); |
| 6171 | __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; |
| 6172 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 6173 | __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; |
| 6174 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__6174; goto __pyx_L1_error;} |
| 6175 | |
| 6176 | /* "rgw.pyx":516 |
| 6177 | * with nogil: |
| 6178 | * ret = rgw_unlink(self.fs, _handler, _name, _flags) |
| 6179 | * if ret < 0: # <<<<<<<<<<<<<< |
| 6180 | * raise make_ex(ret, "error in unlink") |
| 6181 | * return ret |
| 6182 | */ |
| 6183 | } |
| 6184 | |
| 6185 | /* "rgw.pyx":518 |
| 6186 | * if ret < 0: |
| 6187 | * raise make_ex(ret, "error in unlink") |
| 6188 | * return ret # <<<<<<<<<<<<<< |
| 6189 | * |
| 6190 | * def readdir(self, FileHandle dir_handler, iterate_cb, offset, flags = 0): |
| 6191 | */ |
| 6192 | __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); |
| 6193 | __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 = 518; __pyx_clineno = __LINE__6193; goto __pyx_L1_error;} |
| 6194 | __Pyx_GOTREF(__pyx_t_1); |
| 6195 | __pyx_r = __pyx_t_1; |
| 6196 | __pyx_t_1 = 0; |
| 6197 | goto __pyx_L0; |
| 6198 | |
| 6199 | /* "rgw.pyx":507 |
| 6200 | * return ret |
| 6201 | * |
| 6202 | * def unlink(self, FileHandle handler, name, flags = 0): # <<<<<<<<<<<<<< |
| 6203 | * self.require_state("mounted") |
| 6204 | * name = cstr(name, 'name') |
| 6205 | */ |
| 6206 | |
| 6207 | /* function exit code */ |
| 6208 | __pyx_L1_error:; |
| 6209 | __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); |
| 6210 | __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); |
| 6211 | __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); |
| 6212 | __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); |
| 6213 | __Pyx_AddTraceback("rgw.LibRGWFS.unlink", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 6214 | __pyx_r = NULL((void*)0); |
| 6215 | __pyx_L0:; |
| 6216 | __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); |
| 6217 | __Pyx_XGIVEREF(__pyx_r); |
| 6218 | __Pyx_RefNannyFinishContext(); |
| 6219 | return __pyx_r; |
| 6220 | } |
| 6221 | |
| 6222 | /* "rgw.pyx":520 |
| 6223 | * return ret |
| 6224 | * |
| 6225 | * def readdir(self, FileHandle dir_handler, iterate_cb, offset, flags = 0): # <<<<<<<<<<<<<< |
| 6226 | * self.require_state("mounted") |
| 6227 | * |
| 6228 | */ |
| 6229 | |
| 6230 | /* Python wrapper */ |
| 6231 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_29readdir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 6232 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_29readdir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 6233 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler = 0; |
| 6234 | PyObject *__pyx_v_iterate_cb = 0; |
| 6235 | PyObject *__pyx_v_offset = 0; |
| 6236 | PyObject *__pyx_v_flags = 0; |
| 6237 | int __pyx_lineno = 0; |
| 6238 | const char *__pyx_filename = NULL((void*)0); |
| 6239 | int __pyx_clineno = 0; |
| 6240 | PyObject *__pyx_r = 0; |
| 6241 | __Pyx_RefNannyDeclarations |
| 6242 | __Pyx_RefNannySetupContext("readdir (wrapper)", 0); |
| 6243 | { |
| 6244 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dir_handler,&__pyx_n_s_iterate_cb,&__pyx_n_s_offset,&__pyx_n_s_flags,0}; |
| 6245 | PyObject* values[4] = {0,0,0,0}; |
| 6246 | values[3] = ((PyObject *)__pyx_int_0); |
| 6247 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 6248 | Py_ssize_t kw_args; |
| 6249 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 6250 | switch (pos_args) { |
| 6251 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 6252 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 6253 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 6254 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 6255 | case 0: break; |
| 6256 | default: goto __pyx_L5_argtuple_error; |
| 6257 | } |
| 6258 | kw_args = PyDict_Size(__pyx_kwds); |
| 6259 | switch (pos_args) { |
| 6260 | case 0: |
| 6261 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_handler)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_handler )) != 0), 1)) kw_args--; |
| 6262 | else goto __pyx_L5_argtuple_error; |
| 6263 | case 1: |
| 6264 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_iterate_cb)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_iterate_cb )) != 0), 1)) kw_args--; |
| 6265 | else { |
| 6266 | __Pyx_RaiseArgtupleInvalid("readdir", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__6266; goto __pyx_L3_error;} |
| 6267 | } |
| 6268 | case 2: |
| 6269 | 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--; |
| 6270 | else { |
| 6271 | __Pyx_RaiseArgtupleInvalid("readdir", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__6271; goto __pyx_L3_error;} |
| 6272 | } |
| 6273 | case 3: |
| 6274 | if (kw_args > 0) { |
| 6275 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); |
| 6276 | if (value) { values[3] = value; kw_args--; } |
| 6277 | } |
| 6278 | } |
| 6279 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 6280 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "readdir") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames , 0, values, pos_args, "readdir") < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__6280; goto __pyx_L3_error;} |
| 6281 | } |
| 6282 | } else { |
| 6283 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 6284 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 6285 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 6286 | values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 6287 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 6288 | break; |
| 6289 | default: goto __pyx_L5_argtuple_error; |
| 6290 | } |
| 6291 | } |
| 6292 | __pyx_v_dir_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[0]); |
| 6293 | __pyx_v_iterate_cb = values[1]; |
| 6294 | __pyx_v_offset = values[2]; |
| 6295 | __pyx_v_flags = values[3]; |
| 6296 | } |
| 6297 | goto __pyx_L4_argument_unpacking_done; |
| 6298 | __pyx_L5_argtuple_error:; |
| 6299 | __Pyx_RaiseArgtupleInvalid("readdir", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__6299; goto __pyx_L3_error;} |
| 6300 | __pyx_L3_error:; |
| 6301 | __Pyx_AddTraceback("rgw.LibRGWFS.readdir", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 6302 | __Pyx_RefNannyFinishContext(); |
| 6303 | return NULL((void*)0); |
| 6304 | __pyx_L4_argument_unpacking_done:; |
| 6305 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dir_handler), __pyx_ptype_3rgw_FileHandle, 1, "dir_handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dir_handler ), __pyx_ptype_3rgw_FileHandle, 1, "dir_handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__6305; goto __pyx_L1_error;} |
| 6306 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_28readdir(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_dir_handler, __pyx_v_iterate_cb, __pyx_v_offset, __pyx_v_flags); |
| 6307 | |
| 6308 | /* function exit code */ |
| 6309 | goto __pyx_L0; |
| 6310 | __pyx_L1_error:; |
| 6311 | __pyx_r = NULL((void*)0); |
| 6312 | __pyx_L0:; |
| 6313 | __Pyx_RefNannyFinishContext(); |
| 6314 | return __pyx_r; |
| 6315 | } |
| 6316 | |
| 6317 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_28readdir(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler, PyObject *__pyx_v_iterate_cb, PyObject *__pyx_v_offset, PyObject *__pyx_v_flags) { |
| 6318 | struct rgw_file_handle *__pyx_v__dir_handler; |
| 6319 | uint64_t __pyx_v__offset; |
| 6320 | bool_Bool __pyx_v__eof; |
| 6321 | uint32_t __pyx_v__flags; |
| 6322 | int __pyx_v_ret; |
| 6323 | PyObject *__pyx_r = NULL((void*)0); |
| 6324 | __Pyx_RefNannyDeclarations |
| 6325 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 6326 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 6327 | uint64_t __pyx_t_3; |
| 6328 | uint32_t __pyx_t_4; |
| 6329 | int __pyx_t_5; |
| 6330 | int __pyx_t_6; |
| 6331 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 6332 | int __pyx_lineno = 0; |
| 6333 | const char *__pyx_filename = NULL((void*)0); |
| 6334 | int __pyx_clineno = 0; |
| 6335 | __Pyx_RefNannySetupContext("readdir", 0); |
| 6336 | |
| 6337 | /* "rgw.pyx":521 |
| 6338 | * |
| 6339 | * def readdir(self, FileHandle dir_handler, iterate_cb, offset, flags = 0): |
| 6340 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 6341 | * |
| 6342 | * cdef: |
| 6343 | */ |
| 6344 | __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 = 521; __pyx_clineno = __LINE__6344; goto __pyx_L1_error;} |
| 6345 | __Pyx_GOTREF(__pyx_t_1); |
| 6346 | __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 = 521; __pyx_clineno = __LINE__6346; goto __pyx_L1_error;} |
| 6347 | __Pyx_GOTREF(__pyx_t_2); |
| 6348 | __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; |
| 6349 | __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; |
| 6350 | |
| 6351 | /* "rgw.pyx":524 |
| 6352 | * |
| 6353 | * cdef: |
| 6354 | * rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler # <<<<<<<<<<<<<< |
| 6355 | * uint64_t _offset = offset |
| 6356 | * bool _eof |
| 6357 | */ |
| 6358 | __pyx_v__dir_handler = ((struct rgw_file_handle *)__pyx_v_dir_handler->handler); |
| 6359 | |
| 6360 | /* "rgw.pyx":525 |
| 6361 | * cdef: |
| 6362 | * rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler |
| 6363 | * uint64_t _offset = offset # <<<<<<<<<<<<<< |
| 6364 | * bool _eof |
| 6365 | * uint32_t _flags = flags |
| 6366 | */ |
| 6367 | __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_v_offset); if (unlikely((__pyx_t_3 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (uint64_t)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__6367; goto __pyx_L1_error;} |
| 6368 | __pyx_v__offset = __pyx_t_3; |
| 6369 | |
| 6370 | /* "rgw.pyx":527 |
| 6371 | * uint64_t _offset = offset |
| 6372 | * bool _eof |
| 6373 | * uint32_t _flags = flags # <<<<<<<<<<<<<< |
| 6374 | * with nogil: |
| 6375 | * ret = rgw_readdir(self.fs, _dir_handler, &_offset, &readdir_cb, |
| 6376 | */ |
| 6377 | __pyx_t_4 = __Pyx_PyInt_As_uint32_t(__pyx_v_flags); if (unlikely((__pyx_t_4 == (uint32_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_4 == (uint32_t)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__6377; goto __pyx_L1_error;} |
| 6378 | __pyx_v__flags = __pyx_t_4; |
| 6379 | |
| 6380 | /* "rgw.pyx":528 |
| 6381 | * bool _eof |
| 6382 | * uint32_t _flags = flags |
| 6383 | * with nogil: # <<<<<<<<<<<<<< |
| 6384 | * ret = rgw_readdir(self.fs, _dir_handler, &_offset, &readdir_cb, |
| 6385 | * <void *>iterate_cb, &_eof, _flags) |
| 6386 | */ |
| 6387 | { |
| 6388 | #ifdef WITH_THREAD1 |
| 6389 | PyThreadState *_save; |
| 6390 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 6391 | #endif |
| 6392 | /*try:*/ { |
| 6393 | |
| 6394 | /* "rgw.pyx":529 |
| 6395 | * uint32_t _flags = flags |
| 6396 | * with nogil: |
| 6397 | * ret = rgw_readdir(self.fs, _dir_handler, &_offset, &readdir_cb, # <<<<<<<<<<<<<< |
| 6398 | * <void *>iterate_cb, &_eof, _flags) |
| 6399 | * if ret < 0: |
| 6400 | */ |
| 6401 | __pyx_t_5 = rgw_readdir(__pyx_v_self->fs, __pyx_v__dir_handler, (&__pyx_v__offset), (&__pyx_f_3rgw_readdir_cb), ((void *)__pyx_v_iterate_cb), (&__pyx_v__eof), __pyx_v__flags); if (unlikely(__pyx_t_5 == -9000 && __Pyx_ErrOccurredWithGIL())__builtin_expect(!!(__pyx_t_5 == -9000 && __Pyx_ErrOccurredWithGIL ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__6401; goto __pyx_L4_error;} |
| 6402 | __pyx_v_ret = __pyx_t_5; |
| 6403 | } |
| 6404 | |
| 6405 | /* "rgw.pyx":528 |
| 6406 | * bool _eof |
| 6407 | * uint32_t _flags = flags |
| 6408 | * with nogil: # <<<<<<<<<<<<<< |
| 6409 | * ret = rgw_readdir(self.fs, _dir_handler, &_offset, &readdir_cb, |
| 6410 | * <void *>iterate_cb, &_eof, _flags) |
| 6411 | */ |
| 6412 | /*finally:*/ { |
| 6413 | /*normal exit:*/{ |
| 6414 | #ifdef WITH_THREAD1 |
| 6415 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 6416 | #endif |
| 6417 | goto __pyx_L5; |
| 6418 | } |
| 6419 | __pyx_L4_error: { |
| 6420 | #ifdef WITH_THREAD1 |
| 6421 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 6422 | #endif |
| 6423 | goto __pyx_L1_error; |
| 6424 | } |
| 6425 | __pyx_L5:; |
| 6426 | } |
| 6427 | } |
| 6428 | |
| 6429 | /* "rgw.pyx":531 |
| 6430 | * ret = rgw_readdir(self.fs, _dir_handler, &_offset, &readdir_cb, |
| 6431 | * <void *>iterate_cb, &_eof, _flags) |
| 6432 | * if ret < 0: # <<<<<<<<<<<<<< |
| 6433 | * raise make_ex(ret, "error in readdir") |
| 6434 | * |
| 6435 | */ |
| 6436 | __pyx_t_6 = ((__pyx_v_ret < 0) != 0); |
| 6437 | if (__pyx_t_6) { |
| 6438 | |
| 6439 | /* "rgw.pyx":532 |
| 6440 | * <void *>iterate_cb, &_eof, _flags) |
| 6441 | * if ret < 0: |
| 6442 | * raise make_ex(ret, "error in readdir") # <<<<<<<<<<<<<< |
| 6443 | * |
| 6444 | * return (_offset, _eof) |
| 6445 | */ |
| 6446 | __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 = 532; __pyx_clineno = __LINE__6446; goto __pyx_L1_error;} |
| 6447 | __Pyx_GOTREF(__pyx_t_2); |
| 6448 | __pyx_t_1 = __pyx_f_3rgw_make_ex(__pyx_t_2, __pyx_kp_s_error_in_readdir); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__6448; goto __pyx_L1_error;} |
| 6449 | __Pyx_GOTREF(__pyx_t_1); |
| 6450 | __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; |
| 6451 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 6452 | __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; |
| 6453 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__6453; goto __pyx_L1_error;} |
| 6454 | |
| 6455 | /* "rgw.pyx":531 |
| 6456 | * ret = rgw_readdir(self.fs, _dir_handler, &_offset, &readdir_cb, |
| 6457 | * <void *>iterate_cb, &_eof, _flags) |
| 6458 | * if ret < 0: # <<<<<<<<<<<<<< |
| 6459 | * raise make_ex(ret, "error in readdir") |
| 6460 | * |
| 6461 | */ |
| 6462 | } |
| 6463 | |
| 6464 | /* "rgw.pyx":534 |
| 6465 | * raise make_ex(ret, "error in readdir") |
| 6466 | * |
| 6467 | * return (_offset, _eof) # <<<<<<<<<<<<<< |
| 6468 | * |
| 6469 | * def fstat(self, FileHandle file_handler): |
| 6470 | */ |
| 6471 | __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); |
| 6472 | __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v__offset); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__6472; goto __pyx_L1_error;} |
| 6473 | __Pyx_GOTREF(__pyx_t_1); |
| 6474 | __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v__eof)((__pyx_v__eof) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct )))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : ( ( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt ++), ((PyObject *) &_Py_ZeroStruct))); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__6474; goto __pyx_L1_error;} |
| 6475 | __Pyx_GOTREF(__pyx_t_2); |
| 6476 | __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__6476; goto __pyx_L1_error;} |
| 6477 | __Pyx_GOTREF(__pyx_t_7); |
| 6478 | __Pyx_GIVEREF(__pyx_t_1); |
| 6479 | PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_1); |
| 6480 | __Pyx_GIVEREF(__pyx_t_2); |
| 6481 | PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_7))->ob_item[1] = __pyx_t_2); |
| 6482 | __pyx_t_1 = 0; |
| 6483 | __pyx_t_2 = 0; |
| 6484 | __pyx_r = __pyx_t_7; |
| 6485 | __pyx_t_7 = 0; |
| 6486 | goto __pyx_L0; |
| 6487 | |
| 6488 | /* "rgw.pyx":520 |
| 6489 | * return ret |
| 6490 | * |
| 6491 | * def readdir(self, FileHandle dir_handler, iterate_cb, offset, flags = 0): # <<<<<<<<<<<<<< |
| 6492 | * self.require_state("mounted") |
| 6493 | * |
| 6494 | */ |
| 6495 | |
| 6496 | /* function exit code */ |
| 6497 | __pyx_L1_error:; |
| 6498 | __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); |
| 6499 | __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); |
| 6500 | __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); |
| 6501 | __Pyx_AddTraceback("rgw.LibRGWFS.readdir", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 6502 | __pyx_r = NULL((void*)0); |
| 6503 | __pyx_L0:; |
| 6504 | __Pyx_XGIVEREF(__pyx_r); |
| 6505 | __Pyx_RefNannyFinishContext(); |
| 6506 | return __pyx_r; |
| 6507 | } |
| 6508 | |
| 6509 | /* "rgw.pyx":536 |
| 6510 | * return (_offset, _eof) |
| 6511 | * |
| 6512 | * def fstat(self, FileHandle file_handler): # <<<<<<<<<<<<<< |
| 6513 | * self.require_state("mounted") |
| 6514 | * |
| 6515 | */ |
| 6516 | |
| 6517 | /* Python wrapper */ |
| 6518 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_31fstat(PyObject *__pyx_v_self, PyObject *__pyx_v_file_handler); /*proto*/ |
| 6519 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_31fstat(PyObject *__pyx_v_self, PyObject *__pyx_v_file_handler) { |
| 6520 | CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_lineno = 0; |
| 6521 | CYTHON_UNUSED__attribute__ ((__unused__)) const char *__pyx_filename = NULL((void*)0); |
| 6522 | CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_clineno = 0; |
| 6523 | PyObject *__pyx_r = 0; |
| 6524 | __Pyx_RefNannyDeclarations |
| 6525 | __Pyx_RefNannySetupContext("fstat (wrapper)", 0); |
| 6526 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_handler), __pyx_ptype_3rgw_FileHandle, 1, "file_handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_handler ), __pyx_ptype_3rgw_FileHandle, 1, "file_handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__6526; goto __pyx_L1_error;} |
| 6527 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_30fstat(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), ((struct __pyx_obj_3rgw_FileHandle *)__pyx_v_file_handler)); |
| 6528 | |
| 6529 | /* function exit code */ |
| 6530 | goto __pyx_L0; |
| 6531 | __pyx_L1_error:; |
| 6532 | __pyx_r = NULL((void*)0); |
| 6533 | __pyx_L0:; |
| 6534 | __Pyx_RefNannyFinishContext(); |
| 6535 | return __pyx_r; |
| 6536 | } |
| 6537 | |
| 6538 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_30fstat(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler) { |
| 6539 | struct rgw_file_handle *__pyx_v__file_handler; |
| 6540 | struct stat __pyx_v_statbuf; |
| 6541 | int __pyx_v_ret; |
| 6542 | PyObject *__pyx_r = NULL((void*)0); |
| 6543 | __Pyx_RefNannyDeclarations |
| 6544 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 6545 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 6546 | int __pyx_t_3; |
| 6547 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 6548 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 6549 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 6550 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 6551 | PyObject *__pyx_t_8 = NULL((void*)0); |
| 6552 | int __pyx_lineno = 0; |
| 6553 | const char *__pyx_filename = NULL((void*)0); |
| 6554 | int __pyx_clineno = 0; |
| 6555 | __Pyx_RefNannySetupContext("fstat", 0); |
| 6556 | |
| 6557 | /* "rgw.pyx":537 |
| 6558 | * |
| 6559 | * def fstat(self, FileHandle file_handler): |
| 6560 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 6561 | * |
| 6562 | * cdef: |
| 6563 | */ |
| 6564 | __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 = 537; __pyx_clineno = __LINE__6564; goto __pyx_L1_error;} |
| 6565 | __Pyx_GOTREF(__pyx_t_1); |
| 6566 | __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 = 537; __pyx_clineno = __LINE__6566; goto __pyx_L1_error;} |
| 6567 | __Pyx_GOTREF(__pyx_t_2); |
| 6568 | __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; |
| 6569 | __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; |
| 6570 | |
| 6571 | /* "rgw.pyx":540 |
| 6572 | * |
| 6573 | * cdef: |
| 6574 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler # <<<<<<<<<<<<<< |
| 6575 | * stat statbuf |
| 6576 | * |
| 6577 | */ |
| 6578 | __pyx_v__file_handler = ((struct rgw_file_handle *)__pyx_v_file_handler->handler); |
| 6579 | |
| 6580 | /* "rgw.pyx":543 |
| 6581 | * stat statbuf |
| 6582 | * |
| 6583 | * with nogil: # <<<<<<<<<<<<<< |
| 6584 | * ret = rgw_getattr(self.fs, _file_handler, &statbuf, 0) |
| 6585 | * if ret < 0: |
| 6586 | */ |
| 6587 | { |
| 6588 | #ifdef WITH_THREAD1 |
| 6589 | PyThreadState *_save; |
| 6590 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 6591 | #endif |
| 6592 | /*try:*/ { |
| 6593 | |
| 6594 | /* "rgw.pyx":544 |
| 6595 | * |
| 6596 | * with nogil: |
| 6597 | * ret = rgw_getattr(self.fs, _file_handler, &statbuf, 0) # <<<<<<<<<<<<<< |
| 6598 | * if ret < 0: |
| 6599 | * raise make_ex(ret, "error in getattr") |
| 6600 | */ |
| 6601 | __pyx_v_ret = rgw_getattr(__pyx_v_self->fs, __pyx_v__file_handler, (&__pyx_v_statbuf), 0); |
| 6602 | } |
| 6603 | |
| 6604 | /* "rgw.pyx":543 |
| 6605 | * stat statbuf |
| 6606 | * |
| 6607 | * with nogil: # <<<<<<<<<<<<<< |
| 6608 | * ret = rgw_getattr(self.fs, _file_handler, &statbuf, 0) |
| 6609 | * if ret < 0: |
| 6610 | */ |
| 6611 | /*finally:*/ { |
| 6612 | /*normal exit:*/{ |
| 6613 | #ifdef WITH_THREAD1 |
| 6614 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 6615 | #endif |
| 6616 | goto __pyx_L5; |
| 6617 | } |
| 6618 | __pyx_L5:; |
| 6619 | } |
| 6620 | } |
| 6621 | |
| 6622 | /* "rgw.pyx":545 |
| 6623 | * with nogil: |
| 6624 | * ret = rgw_getattr(self.fs, _file_handler, &statbuf, 0) |
| 6625 | * if ret < 0: # <<<<<<<<<<<<<< |
| 6626 | * raise make_ex(ret, "error in getattr") |
| 6627 | * return StatResult(st_dev=statbuf.st_dev, st_ino=statbuf.st_ino, |
| 6628 | */ |
| 6629 | __pyx_t_3 = ((__pyx_v_ret < 0) != 0); |
| 6630 | if (__pyx_t_3) { |
| 6631 | |
| 6632 | /* "rgw.pyx":546 |
| 6633 | * ret = rgw_getattr(self.fs, _file_handler, &statbuf, 0) |
| 6634 | * if ret < 0: |
| 6635 | * raise make_ex(ret, "error in getattr") # <<<<<<<<<<<<<< |
| 6636 | * return StatResult(st_dev=statbuf.st_dev, st_ino=statbuf.st_ino, |
| 6637 | * st_mode=statbuf.st_mode, st_nlink=statbuf.st_nlink, |
| 6638 | */ |
| 6639 | __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 = 546; __pyx_clineno = __LINE__6639; goto __pyx_L1_error;} |
| 6640 | __Pyx_GOTREF(__pyx_t_2); |
| 6641 | __pyx_t_1 = __pyx_f_3rgw_make_ex(__pyx_t_2, __pyx_kp_s_error_in_getattr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__6641; goto __pyx_L1_error;} |
| 6642 | __Pyx_GOTREF(__pyx_t_1); |
| 6643 | __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; |
| 6644 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 6645 | __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; |
| 6646 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__6646; goto __pyx_L1_error;} |
| 6647 | |
| 6648 | /* "rgw.pyx":545 |
| 6649 | * with nogil: |
| 6650 | * ret = rgw_getattr(self.fs, _file_handler, &statbuf, 0) |
| 6651 | * if ret < 0: # <<<<<<<<<<<<<< |
| 6652 | * raise make_ex(ret, "error in getattr") |
| 6653 | * return StatResult(st_dev=statbuf.st_dev, st_ino=statbuf.st_ino, |
| 6654 | */ |
| 6655 | } |
| 6656 | |
| 6657 | /* "rgw.pyx":547 |
| 6658 | * if ret < 0: |
| 6659 | * raise make_ex(ret, "error in getattr") |
| 6660 | * return StatResult(st_dev=statbuf.st_dev, st_ino=statbuf.st_ino, # <<<<<<<<<<<<<< |
| 6661 | * st_mode=statbuf.st_mode, st_nlink=statbuf.st_nlink, |
| 6662 | * st_uid=statbuf.st_uid, st_gid=statbuf.st_gid, |
| 6663 | */ |
| 6664 | __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); |
| 6665 | __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 = 547; __pyx_clineno = __LINE__6665; goto __pyx_L1_error;} |
| 6666 | __Pyx_GOTREF(__pyx_t_1); |
| 6667 | __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6667; goto __pyx_L1_error;} |
| 6668 | __Pyx_GOTREF(__pyx_t_2); |
| 6669 | __pyx_t_4 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.st_dev); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6669; goto __pyx_L1_error;} |
| 6670 | __Pyx_GOTREF(__pyx_t_4); |
| 6671 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_dev, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6671; goto __pyx_L1_error;} |
| 6672 | __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; |
| 6673 | __pyx_t_4 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.st_ino); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6673; goto __pyx_L1_error;} |
| 6674 | __Pyx_GOTREF(__pyx_t_4); |
| 6675 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_ino, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6675; goto __pyx_L1_error;} |
| 6676 | __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; |
| 6677 | |
| 6678 | /* "rgw.pyx":548 |
| 6679 | * raise make_ex(ret, "error in getattr") |
| 6680 | * return StatResult(st_dev=statbuf.st_dev, st_ino=statbuf.st_ino, |
| 6681 | * st_mode=statbuf.st_mode, st_nlink=statbuf.st_nlink, # <<<<<<<<<<<<<< |
| 6682 | * st_uid=statbuf.st_uid, st_gid=statbuf.st_gid, |
| 6683 | * st_rdev=statbuf.st_rdev, st_size=statbuf.st_size, |
| 6684 | */ |
| 6685 | __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_statbuf.st_mode); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__6685; goto __pyx_L1_error;} |
| 6686 | __Pyx_GOTREF(__pyx_t_4); |
| 6687 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_mode, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6687; goto __pyx_L1_error;} |
| 6688 | __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; |
| 6689 | __pyx_t_4 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.st_nlink); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__6689; goto __pyx_L1_error;} |
| 6690 | __Pyx_GOTREF(__pyx_t_4); |
| 6691 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_nlink, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6691; goto __pyx_L1_error;} |
| 6692 | __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; |
| 6693 | |
| 6694 | /* "rgw.pyx":549 |
| 6695 | * return StatResult(st_dev=statbuf.st_dev, st_ino=statbuf.st_ino, |
| 6696 | * st_mode=statbuf.st_mode, st_nlink=statbuf.st_nlink, |
| 6697 | * st_uid=statbuf.st_uid, st_gid=statbuf.st_gid, # <<<<<<<<<<<<<< |
| 6698 | * st_rdev=statbuf.st_rdev, st_size=statbuf.st_size, |
| 6699 | * st_blksize=statbuf.st_blksize, |
| 6700 | */ |
| 6701 | __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_statbuf.st_uid); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__6701; goto __pyx_L1_error;} |
| 6702 | __Pyx_GOTREF(__pyx_t_4); |
| 6703 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_uid, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6703; goto __pyx_L1_error;} |
| 6704 | __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; |
| 6705 | __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_statbuf.st_gid); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__6705; goto __pyx_L1_error;} |
| 6706 | __Pyx_GOTREF(__pyx_t_4); |
| 6707 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_gid, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6707; goto __pyx_L1_error;} |
| 6708 | __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; |
| 6709 | |
| 6710 | /* "rgw.pyx":550 |
| 6711 | * st_mode=statbuf.st_mode, st_nlink=statbuf.st_nlink, |
| 6712 | * st_uid=statbuf.st_uid, st_gid=statbuf.st_gid, |
| 6713 | * st_rdev=statbuf.st_rdev, st_size=statbuf.st_size, # <<<<<<<<<<<<<< |
| 6714 | * st_blksize=statbuf.st_blksize, |
| 6715 | * st_blocks=statbuf.st_blocks, |
| 6716 | */ |
| 6717 | __pyx_t_4 = __Pyx_PyInt_From_unsigned_long(__pyx_v_statbuf.st_rdev); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__6717; goto __pyx_L1_error;} |
| 6718 | __Pyx_GOTREF(__pyx_t_4); |
| 6719 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_rdev, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6719; goto __pyx_L1_error;} |
| 6720 | __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; |
| 6721 | __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_statbuf.st_size); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__6721; goto __pyx_L1_error;} |
| 6722 | __Pyx_GOTREF(__pyx_t_4); |
| 6723 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_size, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6723; goto __pyx_L1_error;} |
| 6724 | __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; |
| 6725 | |
| 6726 | /* "rgw.pyx":551 |
| 6727 | * st_uid=statbuf.st_uid, st_gid=statbuf.st_gid, |
| 6728 | * st_rdev=statbuf.st_rdev, st_size=statbuf.st_size, |
| 6729 | * st_blksize=statbuf.st_blksize, # <<<<<<<<<<<<<< |
| 6730 | * st_blocks=statbuf.st_blocks, |
| 6731 | * st_atime=datetime.fromtimestamp(statbuf.st_atime), |
| 6732 | */ |
| 6733 | __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_statbuf.st_blksize); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__6733; goto __pyx_L1_error;} |
| 6734 | __Pyx_GOTREF(__pyx_t_4); |
| 6735 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_blksize, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6735; goto __pyx_L1_error;} |
| 6736 | __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; |
| 6737 | |
| 6738 | /* "rgw.pyx":552 |
| 6739 | * st_rdev=statbuf.st_rdev, st_size=statbuf.st_size, |
| 6740 | * st_blksize=statbuf.st_blksize, |
| 6741 | * st_blocks=statbuf.st_blocks, # <<<<<<<<<<<<<< |
| 6742 | * st_atime=datetime.fromtimestamp(statbuf.st_atime), |
| 6743 | * st_mtime=datetime.fromtimestamp(statbuf.st_mtime), |
| 6744 | */ |
| 6745 | __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_statbuf.st_blocks); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__6745; goto __pyx_L1_error;} |
| 6746 | __Pyx_GOTREF(__pyx_t_4); |
| 6747 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_blocks, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6747; goto __pyx_L1_error;} |
| 6748 | __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; |
| 6749 | |
| 6750 | /* "rgw.pyx":553 |
| 6751 | * st_blksize=statbuf.st_blksize, |
| 6752 | * st_blocks=statbuf.st_blocks, |
| 6753 | * st_atime=datetime.fromtimestamp(statbuf.st_atime), # <<<<<<<<<<<<<< |
| 6754 | * st_mtime=datetime.fromtimestamp(statbuf.st_mtime), |
| 6755 | * st_ctime=datetime.fromtimestamp(statbuf.st_ctime)) |
| 6756 | */ |
| 6757 | __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__6757; goto __pyx_L1_error;} |
| 6758 | __Pyx_GOTREF(__pyx_t_5); |
| 6759 | __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__6759; goto __pyx_L1_error;} |
| 6760 | __Pyx_GOTREF(__pyx_t_6); |
| 6761 | __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; |
| 6762 | __pyx_t_5 = __Pyx_PyInt_From_time_t(__pyx_v_statbuf.st_atimest_atim.tv_sec); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__6762; goto __pyx_L1_error;} |
| 6763 | __Pyx_GOTREF(__pyx_t_5); |
| 6764 | __pyx_t_7 = NULL((void*)0); |
| 6765 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type )), 0)) { |
| 6766 | __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self); |
| 6767 | if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) { |
| 6768 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func); |
| 6769 | __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++); |
| 6770 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 6771 | __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); |
| 6772 | } |
| 6773 | } |
| 6774 | if (!__pyx_t_7) { |
| 6775 | __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 = 553; __pyx_clineno = __LINE__6775; goto __pyx_L1_error;} |
| 6776 | __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; |
| 6777 | __Pyx_GOTREF(__pyx_t_4); |
| 6778 | } else { |
| 6779 | __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 = 553; __pyx_clineno = __LINE__6779; goto __pyx_L1_error;} |
| 6780 | __Pyx_GOTREF(__pyx_t_8); |
| 6781 | __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); |
| 6782 | __Pyx_GIVEREF(__pyx_t_5); |
| 6783 | PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_5); |
| 6784 | __pyx_t_5 = 0; |
| 6785 | __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 = 553; __pyx_clineno = __LINE__6785; goto __pyx_L1_error;} |
| 6786 | __Pyx_GOTREF(__pyx_t_4); |
| 6787 | __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; |
| 6788 | } |
| 6789 | __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; |
| 6790 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_atime, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6790; goto __pyx_L1_error;} |
| 6791 | __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; |
| 6792 | |
| 6793 | /* "rgw.pyx":554 |
| 6794 | * st_blocks=statbuf.st_blocks, |
| 6795 | * st_atime=datetime.fromtimestamp(statbuf.st_atime), |
| 6796 | * st_mtime=datetime.fromtimestamp(statbuf.st_mtime), # <<<<<<<<<<<<<< |
| 6797 | * st_ctime=datetime.fromtimestamp(statbuf.st_ctime)) |
| 6798 | * |
| 6799 | */ |
| 6800 | __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__6800; goto __pyx_L1_error;} |
| 6801 | __Pyx_GOTREF(__pyx_t_6); |
| 6802 | __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__6802; goto __pyx_L1_error;} |
| 6803 | __Pyx_GOTREF(__pyx_t_8); |
| 6804 | __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; |
| 6805 | __pyx_t_6 = __Pyx_PyInt_From_time_t(__pyx_v_statbuf.st_mtimest_mtim.tv_sec); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__6805; goto __pyx_L1_error;} |
| 6806 | __Pyx_GOTREF(__pyx_t_6); |
| 6807 | __pyx_t_5 = NULL((void*)0); |
| 6808 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type )), 0)) { |
| 6809 | __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self); |
| 6810 | if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) { |
| 6811 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func); |
| 6812 | __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); |
| 6813 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 6814 | __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); |
| 6815 | } |
| 6816 | } |
| 6817 | if (!__pyx_t_5) { |
| 6818 | __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__6818; goto __pyx_L1_error;} |
| 6819 | __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; |
| 6820 | __Pyx_GOTREF(__pyx_t_4); |
| 6821 | } else { |
| 6822 | __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 = 554; __pyx_clineno = __LINE__6822; goto __pyx_L1_error;} |
| 6823 | __Pyx_GOTREF(__pyx_t_7); |
| 6824 | __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); |
| 6825 | __Pyx_GIVEREF(__pyx_t_6); |
| 6826 | PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_6); |
| 6827 | __pyx_t_6 = 0; |
| 6828 | __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__6828; goto __pyx_L1_error;} |
| 6829 | __Pyx_GOTREF(__pyx_t_4); |
| 6830 | __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; |
| 6831 | } |
| 6832 | __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; |
| 6833 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_mtime, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6833; goto __pyx_L1_error;} |
| 6834 | __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; |
| 6835 | |
| 6836 | /* "rgw.pyx":555 |
| 6837 | * st_atime=datetime.fromtimestamp(statbuf.st_atime), |
| 6838 | * st_mtime=datetime.fromtimestamp(statbuf.st_mtime), |
| 6839 | * st_ctime=datetime.fromtimestamp(statbuf.st_ctime)) # <<<<<<<<<<<<<< |
| 6840 | * |
| 6841 | * def opendir(self, FileHandle dir_handler, dirname, flags = 0): |
| 6842 | */ |
| 6843 | __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 = 555; __pyx_clineno = __LINE__6843; goto __pyx_L1_error;} |
| 6844 | __Pyx_GOTREF(__pyx_t_8); |
| 6845 | __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__6845; goto __pyx_L1_error;} |
| 6846 | __Pyx_GOTREF(__pyx_t_7); |
| 6847 | __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; |
| 6848 | __pyx_t_8 = __Pyx_PyInt_From_time_t(__pyx_v_statbuf.st_ctimest_ctim.tv_sec); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__6848; goto __pyx_L1_error;} |
| 6849 | __Pyx_GOTREF(__pyx_t_8); |
| 6850 | __pyx_t_6 = NULL((void*)0); |
| 6851 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_7))__builtin_expect(!!(((__pyx_t_7)->ob_type == &PyMethod_Type )), 0)) { |
| 6852 | __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7)(((PyMethodObject *)__pyx_t_7) -> im_self); |
| 6853 | if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) { |
| 6854 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7)(((PyMethodObject *)__pyx_t_7) -> im_func); |
| 6855 | __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++); |
| 6856 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 6857 | __Pyx_DECREF_SET(__pyx_t_7, function)do { PyObject *tmp = (PyObject *) __pyx_t_7; __pyx_t_7 = function ; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0); |
| 6858 | } |
| 6859 | } |
| 6860 | if (!__pyx_t_6) { |
| 6861 | __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__6861; goto __pyx_L1_error;} |
| 6862 | __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; |
| 6863 | __Pyx_GOTREF(__pyx_t_4); |
| 6864 | } else { |
| 6865 | __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__6865; goto __pyx_L1_error;} |
| 6866 | __Pyx_GOTREF(__pyx_t_5); |
| 6867 | __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0); |
| 6868 | __Pyx_GIVEREF(__pyx_t_8); |
| 6869 | PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+1] = __pyx_t_8); |
| 6870 | __pyx_t_8 = 0; |
| 6871 | __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__6871; goto __pyx_L1_error;} |
| 6872 | __Pyx_GOTREF(__pyx_t_4); |
| 6873 | __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; |
| 6874 | } |
| 6875 | __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; |
| 6876 | if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_st_ctime, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6876; goto __pyx_L1_error;} |
| 6877 | __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; |
| 6878 | |
| 6879 | /* "rgw.pyx":547 |
| 6880 | * if ret < 0: |
| 6881 | * raise make_ex(ret, "error in getattr") |
| 6882 | * return StatResult(st_dev=statbuf.st_dev, st_ino=statbuf.st_ino, # <<<<<<<<<<<<<< |
| 6883 | * st_mode=statbuf.st_mode, st_nlink=statbuf.st_nlink, |
| 6884 | * st_uid=statbuf.st_uid, st_gid=statbuf.st_gid, |
| 6885 | */ |
| 6886 | __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__6886; goto __pyx_L1_error;} |
| 6887 | __Pyx_GOTREF(__pyx_t_4); |
| 6888 | __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; |
| 6889 | __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; |
| 6890 | __pyx_r = __pyx_t_4; |
| 6891 | __pyx_t_4 = 0; |
| 6892 | goto __pyx_L0; |
| 6893 | |
| 6894 | /* "rgw.pyx":536 |
| 6895 | * return (_offset, _eof) |
| 6896 | * |
| 6897 | * def fstat(self, FileHandle file_handler): # <<<<<<<<<<<<<< |
| 6898 | * self.require_state("mounted") |
| 6899 | * |
| 6900 | */ |
| 6901 | |
| 6902 | /* function exit code */ |
| 6903 | __pyx_L1_error:; |
| 6904 | __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); |
| 6905 | __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); |
| 6906 | __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); |
| 6907 | __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); |
| 6908 | __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); |
| 6909 | __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); |
| 6910 | __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); |
| 6911 | __Pyx_AddTraceback("rgw.LibRGWFS.fstat", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 6912 | __pyx_r = NULL((void*)0); |
| 6913 | __pyx_L0:; |
| 6914 | __Pyx_XGIVEREF(__pyx_r); |
| 6915 | __Pyx_RefNannyFinishContext(); |
| 6916 | return __pyx_r; |
| 6917 | } |
| 6918 | |
| 6919 | /* "rgw.pyx":557 |
| 6920 | * st_ctime=datetime.fromtimestamp(statbuf.st_ctime)) |
| 6921 | * |
| 6922 | * def opendir(self, FileHandle dir_handler, dirname, flags = 0): # <<<<<<<<<<<<<< |
| 6923 | * self.require_state("mounted") |
| 6924 | * |
| 6925 | */ |
| 6926 | |
| 6927 | /* Python wrapper */ |
| 6928 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_33opendir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 6929 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_33opendir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 6930 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler = 0; |
| 6931 | PyObject *__pyx_v_dirname = 0; |
| 6932 | PyObject *__pyx_v_flags = 0; |
| 6933 | int __pyx_lineno = 0; |
| 6934 | const char *__pyx_filename = NULL((void*)0); |
| 6935 | int __pyx_clineno = 0; |
| 6936 | PyObject *__pyx_r = 0; |
| 6937 | __Pyx_RefNannyDeclarations |
| 6938 | __Pyx_RefNannySetupContext("opendir (wrapper)", 0); |
| 6939 | { |
| 6940 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dir_handler,&__pyx_n_s_dirname,&__pyx_n_s_flags,0}; |
| 6941 | PyObject* values[3] = {0,0,0}; |
| 6942 | values[2] = ((PyObject *)__pyx_int_0); |
| 6943 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 6944 | Py_ssize_t kw_args; |
| 6945 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 6946 | switch (pos_args) { |
| 6947 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 6948 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 6949 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 6950 | case 0: break; |
| 6951 | default: goto __pyx_L5_argtuple_error; |
| 6952 | } |
| 6953 | kw_args = PyDict_Size(__pyx_kwds); |
| 6954 | switch (pos_args) { |
| 6955 | case 0: |
| 6956 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_handler)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_handler )) != 0), 1)) kw_args--; |
| 6957 | else goto __pyx_L5_argtuple_error; |
| 6958 | case 1: |
| 6959 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dirname)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dirname )) != 0), 1)) kw_args--; |
| 6960 | else { |
| 6961 | __Pyx_RaiseArgtupleInvalid("opendir", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__6961; goto __pyx_L3_error;} |
| 6962 | } |
| 6963 | case 2: |
| 6964 | if (kw_args > 0) { |
| 6965 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); |
| 6966 | if (value) { values[2] = value; kw_args--; } |
| 6967 | } |
| 6968 | } |
| 6969 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 6970 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "opendir") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames , 0, values, pos_args, "opendir") < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__6970; goto __pyx_L3_error;} |
| 6971 | } |
| 6972 | } else { |
| 6973 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 6974 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 6975 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 6976 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 6977 | break; |
| 6978 | default: goto __pyx_L5_argtuple_error; |
| 6979 | } |
| 6980 | } |
| 6981 | __pyx_v_dir_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[0]); |
| 6982 | __pyx_v_dirname = values[1]; |
| 6983 | __pyx_v_flags = values[2]; |
| 6984 | } |
| 6985 | goto __pyx_L4_argument_unpacking_done; |
| 6986 | __pyx_L5_argtuple_error:; |
| 6987 | __Pyx_RaiseArgtupleInvalid("opendir", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__6987; goto __pyx_L3_error;} |
| 6988 | __pyx_L3_error:; |
| 6989 | __Pyx_AddTraceback("rgw.LibRGWFS.opendir", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 6990 | __Pyx_RefNannyFinishContext(); |
| 6991 | return NULL((void*)0); |
| 6992 | __pyx_L4_argument_unpacking_done:; |
| 6993 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dir_handler), __pyx_ptype_3rgw_FileHandle, 1, "dir_handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dir_handler ), __pyx_ptype_3rgw_FileHandle, 1, "dir_handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__6993; goto __pyx_L1_error;} |
| 6994 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_32opendir(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_dir_handler, __pyx_v_dirname, __pyx_v_flags); |
| 6995 | |
| 6996 | /* function exit code */ |
| 6997 | goto __pyx_L0; |
| 6998 | __pyx_L1_error:; |
| 6999 | __pyx_r = NULL((void*)0); |
| 7000 | __pyx_L0:; |
| 7001 | __Pyx_RefNannyFinishContext(); |
| 7002 | return __pyx_r; |
| 7003 | } |
| 7004 | |
| 7005 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_32opendir(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler, PyObject *__pyx_v_dirname, PyObject *__pyx_v_flags) { |
| 7006 | struct rgw_file_handle *__pyx_v__dir_handler; |
| 7007 | struct rgw_file_handle *__pyx_v__file_handler; |
| 7008 | int __pyx_v__flags; |
| 7009 | char *__pyx_v__dirname; |
| 7010 | struct stat __pyx_v_st; |
| 7011 | uint32_t __pyx_v_st_mask; |
| 7012 | int __pyx_v_ret; |
| 7013 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler = NULL((void*)0); |
| 7014 | PyObject *__pyx_r = NULL((void*)0); |
| 7015 | __Pyx_RefNannyDeclarations |
| 7016 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 7017 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 7018 | int __pyx_t_3; |
| 7019 | int __pyx_t_4; |
| 7020 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 7021 | Py_ssize_t __pyx_t_6; |
| 7022 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 7023 | int __pyx_t_8; |
| 7024 | char *__pyx_t_9; |
| 7025 | int __pyx_lineno = 0; |
| 7026 | const char *__pyx_filename = NULL((void*)0); |
| 7027 | int __pyx_clineno = 0; |
| 7028 | __Pyx_RefNannySetupContext("opendir", 0); |
| 7029 | __Pyx_INCREF(__pyx_v_dirname)( ((PyObject*)(__pyx_v_dirname))->ob_refcnt++); |
| 7030 | |
| 7031 | /* "rgw.pyx":558 |
| 7032 | * |
| 7033 | * def opendir(self, FileHandle dir_handler, dirname, flags = 0): |
| 7034 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 7035 | * |
| 7036 | * if not isinstance(flags, int): |
| 7037 | */ |
| 7038 | __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 = 558; __pyx_clineno = __LINE__7038; goto __pyx_L1_error;} |
| 7039 | __Pyx_GOTREF(__pyx_t_1); |
| 7040 | __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 = 558; __pyx_clineno = __LINE__7040; goto __pyx_L1_error;} |
| 7041 | __Pyx_GOTREF(__pyx_t_2); |
| 7042 | __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; |
| 7043 | __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; |
| 7044 | |
| 7045 | /* "rgw.pyx":560 |
| 7046 | * self.require_state("mounted") |
| 7047 | * |
| 7048 | * if not isinstance(flags, int): # <<<<<<<<<<<<<< |
| 7049 | * raise TypeError("flags must be an integer") |
| 7050 | * |
| 7051 | */ |
| 7052 | __pyx_t_3 = PyInt_Check(__pyx_v_flags)((((__pyx_v_flags)->ob_type)->tp_flags & ((1L<< 23))) != 0); |
| 7053 | __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); |
| 7054 | if (__pyx_t_4) { |
| 7055 | |
| 7056 | /* "rgw.pyx":561 |
| 7057 | * |
| 7058 | * if not isinstance(flags, int): |
| 7059 | * raise TypeError("flags must be an integer") # <<<<<<<<<<<<<< |
| 7060 | * |
| 7061 | * dirname = cstr(dirname, 'dirname') |
| 7062 | */ |
| 7063 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__7063; goto __pyx_L1_error;} |
| 7064 | __Pyx_GOTREF(__pyx_t_2); |
| 7065 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
| 7066 | __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; |
| 7067 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__7067; goto __pyx_L1_error;} |
| 7068 | |
| 7069 | /* "rgw.pyx":560 |
| 7070 | * self.require_state("mounted") |
| 7071 | * |
| 7072 | * if not isinstance(flags, int): # <<<<<<<<<<<<<< |
| 7073 | * raise TypeError("flags must be an integer") |
| 7074 | * |
| 7075 | */ |
| 7076 | } |
| 7077 | |
| 7078 | /* "rgw.pyx":563 |
| 7079 | * raise TypeError("flags must be an integer") |
| 7080 | * |
| 7081 | * dirname = cstr(dirname, 'dirname') # <<<<<<<<<<<<<< |
| 7082 | * |
| 7083 | * cdef: |
| 7084 | */ |
| 7085 | __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 = 563; __pyx_clineno = __LINE__7085; goto __pyx_L1_error;} |
| 7086 | __Pyx_GOTREF(__pyx_t_1); |
| 7087 | __pyx_t_5 = NULL((void*)0); |
| 7088 | __pyx_t_6 = 0; |
| 7089 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type )), 0)) { |
| 7090 | __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self); |
| 7091 | if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) { |
| 7092 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func); |
| 7093 | __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); |
| 7094 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 7095 | __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); |
| 7096 | __pyx_t_6 = 1; |
| 7097 | } |
| 7098 | } |
| 7099 | __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 = 563; __pyx_clineno = __LINE__7099; goto __pyx_L1_error;} |
| 7100 | __Pyx_GOTREF(__pyx_t_7); |
| 7101 | if (__pyx_t_5) { |
| 7102 | __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); |
| 7103 | } |
| 7104 | __Pyx_INCREF(__pyx_v_dirname)( ((PyObject*)(__pyx_v_dirname))->ob_refcnt++); |
| 7105 | __Pyx_GIVEREF(__pyx_v_dirname); |
| 7106 | PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_dirname)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+__pyx_t_6] = __pyx_v_dirname ); |
| 7107 | __Pyx_INCREF(__pyx_n_s_dirname)( ((PyObject*)(__pyx_n_s_dirname))->ob_refcnt++); |
| 7108 | __Pyx_GIVEREF(__pyx_n_s_dirname); |
| 7109 | PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_s_dirname)(((PyTupleObject *)(__pyx_t_7))->ob_item[1+__pyx_t_6] = __pyx_n_s_dirname ); |
| 7110 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__7110; goto __pyx_L1_error;} |
| 7111 | __Pyx_GOTREF(__pyx_t_2); |
| 7112 | __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; |
| 7113 | __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; |
| 7114 | __Pyx_DECREF_SET(__pyx_v_dirname, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_dirname; __pyx_v_dirname = __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); |
| 7115 | __pyx_t_2 = 0; |
| 7116 | |
| 7117 | /* "rgw.pyx":566 |
| 7118 | * |
| 7119 | * cdef: |
| 7120 | * rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler # <<<<<<<<<<<<<< |
| 7121 | * rgw_file_handle *_file_handler |
| 7122 | * int _flags = flags |
| 7123 | */ |
| 7124 | __pyx_v__dir_handler = ((struct rgw_file_handle *)__pyx_v_dir_handler->handler); |
| 7125 | |
| 7126 | /* "rgw.pyx":568 |
| 7127 | * rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler |
| 7128 | * rgw_file_handle *_file_handler |
| 7129 | * int _flags = flags # <<<<<<<<<<<<<< |
| 7130 | * char* _dirname = dirname |
| 7131 | * stat st |
| 7132 | */ |
| 7133 | __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__7133; goto __pyx_L1_error;} |
| 7134 | __pyx_v__flags = __pyx_t_8; |
| 7135 | |
| 7136 | /* "rgw.pyx":569 |
| 7137 | * rgw_file_handle *_file_handler |
| 7138 | * int _flags = flags |
| 7139 | * char* _dirname = dirname # <<<<<<<<<<<<<< |
| 7140 | * stat st |
| 7141 | * uint32_t st_mask = 0 |
| 7142 | */ |
| 7143 | __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_dirname); if (unlikely((!__pyx_t_9) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_9) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__7143; goto __pyx_L1_error;} |
| 7144 | __pyx_v__dirname = __pyx_t_9; |
| 7145 | |
| 7146 | /* "rgw.pyx":571 |
| 7147 | * char* _dirname = dirname |
| 7148 | * stat st |
| 7149 | * uint32_t st_mask = 0 # <<<<<<<<<<<<<< |
| 7150 | * |
| 7151 | * with nogil: |
| 7152 | */ |
| 7153 | __pyx_v_st_mask = 0; |
| 7154 | |
| 7155 | /* "rgw.pyx":573 |
| 7156 | * uint32_t st_mask = 0 |
| 7157 | * |
| 7158 | * with nogil: # <<<<<<<<<<<<<< |
| 7159 | * ret = rgw_lookup(self.fs, _dir_handler, _dirname, |
| 7160 | * &_file_handler, &st, st_mask, _flags) |
| 7161 | */ |
| 7162 | { |
| 7163 | #ifdef WITH_THREAD1 |
| 7164 | PyThreadState *_save; |
| 7165 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 7166 | #endif |
| 7167 | /*try:*/ { |
| 7168 | |
| 7169 | /* "rgw.pyx":574 |
| 7170 | * |
| 7171 | * with nogil: |
| 7172 | * ret = rgw_lookup(self.fs, _dir_handler, _dirname, # <<<<<<<<<<<<<< |
| 7173 | * &_file_handler, &st, st_mask, _flags) |
| 7174 | * if ret < 0: |
| 7175 | */ |
| 7176 | __pyx_v_ret = rgw_lookup(__pyx_v_self->fs, __pyx_v__dir_handler, __pyx_v__dirname, (&__pyx_v__file_handler), (&__pyx_v_st), __pyx_v_st_mask, __pyx_v__flags); |
| 7177 | } |
| 7178 | |
| 7179 | /* "rgw.pyx":573 |
| 7180 | * uint32_t st_mask = 0 |
| 7181 | * |
| 7182 | * with nogil: # <<<<<<<<<<<<<< |
| 7183 | * ret = rgw_lookup(self.fs, _dir_handler, _dirname, |
| 7184 | * &_file_handler, &st, st_mask, _flags) |
| 7185 | */ |
| 7186 | /*finally:*/ { |
| 7187 | /*normal exit:*/{ |
| 7188 | #ifdef WITH_THREAD1 |
| 7189 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 7190 | #endif |
| 7191 | goto __pyx_L6; |
| 7192 | } |
| 7193 | __pyx_L6:; |
| 7194 | } |
| 7195 | } |
| 7196 | |
| 7197 | /* "rgw.pyx":576 |
| 7198 | * ret = rgw_lookup(self.fs, _dir_handler, _dirname, |
| 7199 | * &_file_handler, &st, st_mask, _flags) |
| 7200 | * if ret < 0: # <<<<<<<<<<<<<< |
| 7201 | * raise make_ex(ret, "error in open '%s'" % dirname) |
| 7202 | * |
| 7203 | */ |
| 7204 | __pyx_t_4 = ((__pyx_v_ret < 0) != 0); |
| 7205 | if (__pyx_t_4) { |
| 7206 | |
| 7207 | /* "rgw.pyx":577 |
| 7208 | * &_file_handler, &st, st_mask, _flags) |
| 7209 | * if ret < 0: |
| 7210 | * raise make_ex(ret, "error in open '%s'" % dirname) # <<<<<<<<<<<<<< |
| 7211 | * |
| 7212 | * file_handler = FileHandle() |
| 7213 | */ |
| 7214 | __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 = 577; __pyx_clineno = __LINE__7214; goto __pyx_L1_error;} |
| 7215 | __Pyx_GOTREF(__pyx_t_2); |
| 7216 | __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_error_in_open_s, __pyx_v_dirname)PyString_Format(__pyx_kp_s_error_in_open_s, __pyx_v_dirname); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__7216; goto __pyx_L1_error;} |
| 7217 | __Pyx_GOTREF(__pyx_t_1); |
| 7218 | __pyx_t_7 = __pyx_f_3rgw_make_ex(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__7218; goto __pyx_L1_error;} |
| 7219 | __Pyx_GOTREF(__pyx_t_7); |
| 7220 | __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; |
| 7221 | __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; |
| 7222 | __Pyx_Raise(__pyx_t_7, 0, 0, 0); |
| 7223 | __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; |
| 7224 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__7224; goto __pyx_L1_error;} |
| 7225 | |
| 7226 | /* "rgw.pyx":576 |
| 7227 | * ret = rgw_lookup(self.fs, _dir_handler, _dirname, |
| 7228 | * &_file_handler, &st, st_mask, _flags) |
| 7229 | * if ret < 0: # <<<<<<<<<<<<<< |
| 7230 | * raise make_ex(ret, "error in open '%s'" % dirname) |
| 7231 | * |
| 7232 | */ |
| 7233 | } |
| 7234 | |
| 7235 | /* "rgw.pyx":579 |
| 7236 | * raise make_ex(ret, "error in open '%s'" % dirname) |
| 7237 | * |
| 7238 | * file_handler = FileHandle() # <<<<<<<<<<<<<< |
| 7239 | * file_handler.handler = _file_handler |
| 7240 | * return file_handler |
| 7241 | */ |
| 7242 | __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rgw_FileHandle), __pyx_empty_tuple, NULL((void*)0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__7242; goto __pyx_L1_error;} |
| 7243 | __Pyx_GOTREF(__pyx_t_7); |
| 7244 | __pyx_v_file_handler = ((struct __pyx_obj_3rgw_FileHandle *)__pyx_t_7); |
| 7245 | __pyx_t_7 = 0; |
| 7246 | |
| 7247 | /* "rgw.pyx":580 |
| 7248 | * |
| 7249 | * file_handler = FileHandle() |
| 7250 | * file_handler.handler = _file_handler # <<<<<<<<<<<<<< |
| 7251 | * return file_handler |
| 7252 | * |
| 7253 | */ |
| 7254 | __pyx_v_file_handler->handler = __pyx_v__file_handler; |
| 7255 | |
| 7256 | /* "rgw.pyx":581 |
| 7257 | * file_handler = FileHandle() |
| 7258 | * file_handler.handler = _file_handler |
| 7259 | * return file_handler # <<<<<<<<<<<<<< |
| 7260 | * |
| 7261 | * def open(self, FileHandle dir_handler, filename, flags = 0): |
| 7262 | */ |
| 7263 | __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); |
| 7264 | __Pyx_INCREF(((PyObject *)__pyx_v_file_handler))( ((PyObject*)(((PyObject *)__pyx_v_file_handler)))->ob_refcnt ++); |
| 7265 | __pyx_r = ((PyObject *)__pyx_v_file_handler); |
| 7266 | goto __pyx_L0; |
| 7267 | |
| 7268 | /* "rgw.pyx":557 |
| 7269 | * st_ctime=datetime.fromtimestamp(statbuf.st_ctime)) |
| 7270 | * |
| 7271 | * def opendir(self, FileHandle dir_handler, dirname, flags = 0): # <<<<<<<<<<<<<< |
| 7272 | * self.require_state("mounted") |
| 7273 | * |
| 7274 | */ |
| 7275 | |
| 7276 | /* function exit code */ |
| 7277 | __pyx_L1_error:; |
| 7278 | __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); |
| 7279 | __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); |
| 7280 | __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); |
| 7281 | __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); |
| 7282 | __Pyx_AddTraceback("rgw.LibRGWFS.opendir", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 7283 | __pyx_r = NULL((void*)0); |
| 7284 | __pyx_L0:; |
| 7285 | __Pyx_XDECREF((PyObject *)__pyx_v_file_handler)do { if (((PyObject *)__pyx_v_file_handler) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_file_handler))-> ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_file_handler)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject *)__pyx_v_file_handler)))); } while (0); } while (0); |
| 7286 | __Pyx_XDECREF(__pyx_v_dirname)do { if ((__pyx_v_dirname) == ((void*)0)) ; else do { if ( -- ((PyObject*)(__pyx_v_dirname))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(__pyx_v_dirname)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_dirname)))); } while (0); } while (0); |
| 7287 | __Pyx_XGIVEREF(__pyx_r); |
| 7288 | __Pyx_RefNannyFinishContext(); |
| 7289 | return __pyx_r; |
| 7290 | } |
| 7291 | |
| 7292 | /* "rgw.pyx":583 |
| 7293 | * return file_handler |
| 7294 | * |
| 7295 | * def open(self, FileHandle dir_handler, filename, flags = 0): # <<<<<<<<<<<<<< |
| 7296 | * self.require_state("mounted") |
| 7297 | * |
| 7298 | */ |
| 7299 | |
| 7300 | /* Python wrapper */ |
| 7301 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_35open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 7302 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_35open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 7303 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler = 0; |
| 7304 | PyObject *__pyx_v_filename = 0; |
| 7305 | PyObject *__pyx_v_flags = 0; |
| 7306 | int __pyx_lineno = 0; |
| 7307 | const char *__pyx_filename = NULL((void*)0); |
| 7308 | int __pyx_clineno = 0; |
| 7309 | PyObject *__pyx_r = 0; |
| 7310 | __Pyx_RefNannyDeclarations |
| 7311 | __Pyx_RefNannySetupContext("open (wrapper)", 0); |
| 7312 | { |
| 7313 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dir_handler,&__pyx_n_s_filename,&__pyx_n_s_flags,0}; |
| 7314 | PyObject* values[3] = {0,0,0}; |
| 7315 | values[2] = ((PyObject *)__pyx_int_0); |
| 7316 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 7317 | Py_ssize_t kw_args; |
| 7318 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 7319 | switch (pos_args) { |
| 7320 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 7321 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 7322 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 7323 | case 0: break; |
| 7324 | default: goto __pyx_L5_argtuple_error; |
| 7325 | } |
| 7326 | kw_args = PyDict_Size(__pyx_kwds); |
| 7327 | switch (pos_args) { |
| 7328 | case 0: |
| 7329 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_handler)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_handler )) != 0), 1)) kw_args--; |
| 7330 | else goto __pyx_L5_argtuple_error; |
| 7331 | case 1: |
| 7332 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename )) != 0), 1)) kw_args--; |
| 7333 | else { |
| 7334 | __Pyx_RaiseArgtupleInvalid("open", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__7334; goto __pyx_L3_error;} |
| 7335 | } |
| 7336 | case 2: |
| 7337 | if (kw_args > 0) { |
| 7338 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); |
| 7339 | if (value) { values[2] = value; kw_args--; } |
| 7340 | } |
| 7341 | } |
| 7342 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 7343 | 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 = 583; __pyx_clineno = __LINE__7343; goto __pyx_L3_error;} |
| 7344 | } |
| 7345 | } else { |
| 7346 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 7347 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 7348 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 7349 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 7350 | break; |
| 7351 | default: goto __pyx_L5_argtuple_error; |
| 7352 | } |
| 7353 | } |
| 7354 | __pyx_v_dir_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[0]); |
| 7355 | __pyx_v_filename = values[1]; |
| 7356 | __pyx_v_flags = values[2]; |
| 7357 | } |
| 7358 | goto __pyx_L4_argument_unpacking_done; |
| 7359 | __pyx_L5_argtuple_error:; |
| 7360 | __Pyx_RaiseArgtupleInvalid("open", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__7360; goto __pyx_L3_error;} |
| 7361 | __pyx_L3_error:; |
| 7362 | __Pyx_AddTraceback("rgw.LibRGWFS.open", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 7363 | __Pyx_RefNannyFinishContext(); |
| 7364 | return NULL((void*)0); |
| 7365 | __pyx_L4_argument_unpacking_done:; |
| 7366 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dir_handler), __pyx_ptype_3rgw_FileHandle, 1, "dir_handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dir_handler ), __pyx_ptype_3rgw_FileHandle, 1, "dir_handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__7366; goto __pyx_L1_error;} |
| 7367 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_34open(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_dir_handler, __pyx_v_filename, __pyx_v_flags); |
| 7368 | |
| 7369 | /* function exit code */ |
| 7370 | goto __pyx_L0; |
| 7371 | __pyx_L1_error:; |
| 7372 | __pyx_r = NULL((void*)0); |
| 7373 | __pyx_L0:; |
| 7374 | __Pyx_RefNannyFinishContext(); |
| 7375 | return __pyx_r; |
| 7376 | } |
| 7377 | |
| 7378 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_34open(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_dir_handler, PyObject *__pyx_v_filename, PyObject *__pyx_v_flags) { |
| 7379 | struct rgw_file_handle *__pyx_v__dir_handler; |
| 7380 | struct rgw_file_handle *__pyx_v__file_handler; |
| 7381 | int __pyx_v__flags; |
| 7382 | char *__pyx_v__filename; |
| 7383 | struct stat __pyx_v_st; |
| 7384 | uint32_t __pyx_v_st_mask; |
| 7385 | int __pyx_v_ret; |
| 7386 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler = NULL((void*)0); |
| 7387 | PyObject *__pyx_r = NULL((void*)0); |
| 7388 | __Pyx_RefNannyDeclarations |
| 7389 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 7390 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 7391 | int __pyx_t_3; |
| 7392 | int __pyx_t_4; |
| 7393 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 7394 | Py_ssize_t __pyx_t_6; |
| 7395 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 7396 | int __pyx_t_8; |
| 7397 | char *__pyx_t_9; |
| 7398 | int __pyx_lineno = 0; |
| 7399 | const char *__pyx_filename = NULL((void*)0); |
| 7400 | int __pyx_clineno = 0; |
| 7401 | __Pyx_RefNannySetupContext("open", 0); |
| 7402 | __Pyx_INCREF(__pyx_v_filename)( ((PyObject*)(__pyx_v_filename))->ob_refcnt++); |
| 7403 | |
| 7404 | /* "rgw.pyx":584 |
| 7405 | * |
| 7406 | * def open(self, FileHandle dir_handler, filename, flags = 0): |
| 7407 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 7408 | * |
| 7409 | * if not isinstance(flags, int): |
| 7410 | */ |
| 7411 | __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 = 584; __pyx_clineno = __LINE__7411; goto __pyx_L1_error;} |
| 7412 | __Pyx_GOTREF(__pyx_t_1); |
| 7413 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__13, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__7413; goto __pyx_L1_error;} |
| 7414 | __Pyx_GOTREF(__pyx_t_2); |
| 7415 | __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; |
| 7416 | __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; |
| 7417 | |
| 7418 | /* "rgw.pyx":586 |
| 7419 | * self.require_state("mounted") |
| 7420 | * |
| 7421 | * if not isinstance(flags, int): # <<<<<<<<<<<<<< |
| 7422 | * raise TypeError("flags must be an integer") |
| 7423 | * |
| 7424 | */ |
| 7425 | __pyx_t_3 = PyInt_Check(__pyx_v_flags)((((__pyx_v_flags)->ob_type)->tp_flags & ((1L<< 23))) != 0); |
| 7426 | __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); |
| 7427 | if (__pyx_t_4) { |
| 7428 | |
| 7429 | /* "rgw.pyx":587 |
| 7430 | * |
| 7431 | * if not isinstance(flags, int): |
| 7432 | * raise TypeError("flags must be an integer") # <<<<<<<<<<<<<< |
| 7433 | * |
| 7434 | * filename = cstr(filename, 'filename') |
| 7435 | */ |
| 7436 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__7436; goto __pyx_L1_error;} |
| 7437 | __Pyx_GOTREF(__pyx_t_2); |
| 7438 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
| 7439 | __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; |
| 7440 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__7440; goto __pyx_L1_error;} |
| 7441 | |
| 7442 | /* "rgw.pyx":586 |
| 7443 | * self.require_state("mounted") |
| 7444 | * |
| 7445 | * if not isinstance(flags, int): # <<<<<<<<<<<<<< |
| 7446 | * raise TypeError("flags must be an integer") |
| 7447 | * |
| 7448 | */ |
| 7449 | } |
| 7450 | |
| 7451 | /* "rgw.pyx":589 |
| 7452 | * raise TypeError("flags must be an integer") |
| 7453 | * |
| 7454 | * filename = cstr(filename, 'filename') # <<<<<<<<<<<<<< |
| 7455 | * |
| 7456 | * cdef: |
| 7457 | */ |
| 7458 | __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 = 589; __pyx_clineno = __LINE__7458; goto __pyx_L1_error;} |
| 7459 | __Pyx_GOTREF(__pyx_t_1); |
| 7460 | __pyx_t_5 = NULL((void*)0); |
| 7461 | __pyx_t_6 = 0; |
| 7462 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type )), 0)) { |
| 7463 | __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self); |
| 7464 | if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) { |
| 7465 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func); |
| 7466 | __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); |
| 7467 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 7468 | __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); |
| 7469 | __pyx_t_6 = 1; |
| 7470 | } |
| 7471 | } |
| 7472 | __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 = 589; __pyx_clineno = __LINE__7472; goto __pyx_L1_error;} |
| 7473 | __Pyx_GOTREF(__pyx_t_7); |
| 7474 | if (__pyx_t_5) { |
| 7475 | __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); |
| 7476 | } |
| 7477 | __Pyx_INCREF(__pyx_v_filename)( ((PyObject*)(__pyx_v_filename))->ob_refcnt++); |
| 7478 | __Pyx_GIVEREF(__pyx_v_filename); |
| 7479 | PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_filename)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+__pyx_t_6] = __pyx_v_filename ); |
| 7480 | __Pyx_INCREF(__pyx_n_s_filename)( ((PyObject*)(__pyx_n_s_filename))->ob_refcnt++); |
| 7481 | __Pyx_GIVEREF(__pyx_n_s_filename); |
| 7482 | PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_s_filename)(((PyTupleObject *)(__pyx_t_7))->ob_item[1+__pyx_t_6] = __pyx_n_s_filename ); |
| 7483 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__7483; goto __pyx_L1_error;} |
| 7484 | __Pyx_GOTREF(__pyx_t_2); |
| 7485 | __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; |
| 7486 | __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; |
| 7487 | __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_filename; __pyx_v_filename = __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); |
| 7488 | __pyx_t_2 = 0; |
| 7489 | |
| 7490 | /* "rgw.pyx":592 |
| 7491 | * |
| 7492 | * cdef: |
| 7493 | * rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler # <<<<<<<<<<<<<< |
| 7494 | * rgw_file_handle *_file_handler |
| 7495 | * int _flags = flags |
| 7496 | */ |
| 7497 | __pyx_v__dir_handler = ((struct rgw_file_handle *)__pyx_v_dir_handler->handler); |
| 7498 | |
| 7499 | /* "rgw.pyx":594 |
| 7500 | * rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler |
| 7501 | * rgw_file_handle *_file_handler |
| 7502 | * int _flags = flags # <<<<<<<<<<<<<< |
| 7503 | * char* _filename = filename |
| 7504 | * stat st |
| 7505 | */ |
| 7506 | __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__7506; goto __pyx_L1_error;} |
| 7507 | __pyx_v__flags = __pyx_t_8; |
| 7508 | |
| 7509 | /* "rgw.pyx":595 |
| 7510 | * rgw_file_handle *_file_handler |
| 7511 | * int _flags = flags |
| 7512 | * char* _filename = filename # <<<<<<<<<<<<<< |
| 7513 | * stat st |
| 7514 | * uint32_t st_mask = 0 |
| 7515 | */ |
| 7516 | __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_9) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_9) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__7516; goto __pyx_L1_error;} |
| 7517 | __pyx_v__filename = __pyx_t_9; |
| 7518 | |
| 7519 | /* "rgw.pyx":597 |
| 7520 | * char* _filename = filename |
| 7521 | * stat st |
| 7522 | * uint32_t st_mask = 0 # <<<<<<<<<<<<<< |
| 7523 | * |
| 7524 | * with nogil: |
| 7525 | */ |
| 7526 | __pyx_v_st_mask = 0; |
| 7527 | |
| 7528 | /* "rgw.pyx":599 |
| 7529 | * uint32_t st_mask = 0 |
| 7530 | * |
| 7531 | * with nogil: # <<<<<<<<<<<<<< |
| 7532 | * ret = rgw_lookup(self.fs, _dir_handler, _filename, |
| 7533 | * &_file_handler, &st, st_mask, _flags) |
| 7534 | */ |
| 7535 | { |
| 7536 | #ifdef WITH_THREAD1 |
| 7537 | PyThreadState *_save; |
| 7538 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 7539 | #endif |
| 7540 | /*try:*/ { |
| 7541 | |
| 7542 | /* "rgw.pyx":600 |
| 7543 | * |
| 7544 | * with nogil: |
| 7545 | * ret = rgw_lookup(self.fs, _dir_handler, _filename, # <<<<<<<<<<<<<< |
| 7546 | * &_file_handler, &st, st_mask, _flags) |
| 7547 | * if ret < 0: |
| 7548 | */ |
| 7549 | __pyx_v_ret = rgw_lookup(__pyx_v_self->fs, __pyx_v__dir_handler, __pyx_v__filename, (&__pyx_v__file_handler), (&__pyx_v_st), __pyx_v_st_mask, __pyx_v__flags); |
| 7550 | } |
| 7551 | |
| 7552 | /* "rgw.pyx":599 |
| 7553 | * uint32_t st_mask = 0 |
| 7554 | * |
| 7555 | * with nogil: # <<<<<<<<<<<<<< |
| 7556 | * ret = rgw_lookup(self.fs, _dir_handler, _filename, |
| 7557 | * &_file_handler, &st, st_mask, _flags) |
| 7558 | */ |
| 7559 | /*finally:*/ { |
| 7560 | /*normal exit:*/{ |
| 7561 | #ifdef WITH_THREAD1 |
| 7562 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 7563 | #endif |
| 7564 | goto __pyx_L6; |
| 7565 | } |
| 7566 | __pyx_L6:; |
| 7567 | } |
| 7568 | } |
| 7569 | |
| 7570 | /* "rgw.pyx":602 |
| 7571 | * ret = rgw_lookup(self.fs, _dir_handler, _filename, |
| 7572 | * &_file_handler, &st, st_mask, _flags) |
| 7573 | * if ret < 0: # <<<<<<<<<<<<<< |
| 7574 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 7575 | * with nogil: |
| 7576 | */ |
| 7577 | __pyx_t_4 = ((__pyx_v_ret < 0) != 0); |
| 7578 | if (__pyx_t_4) { |
| 7579 | |
| 7580 | /* "rgw.pyx":603 |
| 7581 | * &_file_handler, &st, st_mask, _flags) |
| 7582 | * if ret < 0: |
| 7583 | * raise make_ex(ret, "error in open '%s'" % filename) # <<<<<<<<<<<<<< |
| 7584 | * with nogil: |
| 7585 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 7586 | */ |
| 7587 | __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 = 603; __pyx_clineno = __LINE__7587; goto __pyx_L1_error;} |
| 7588 | __Pyx_GOTREF(__pyx_t_2); |
| 7589 | __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_error_in_open_s, __pyx_v_filename)PyString_Format(__pyx_kp_s_error_in_open_s, __pyx_v_filename); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__7589; goto __pyx_L1_error;} |
| 7590 | __Pyx_GOTREF(__pyx_t_1); |
| 7591 | __pyx_t_7 = __pyx_f_3rgw_make_ex(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__7591; goto __pyx_L1_error;} |
| 7592 | __Pyx_GOTREF(__pyx_t_7); |
| 7593 | __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; |
| 7594 | __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; |
| 7595 | __Pyx_Raise(__pyx_t_7, 0, 0, 0); |
| 7596 | __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; |
| 7597 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__7597; goto __pyx_L1_error;} |
| 7598 | |
| 7599 | /* "rgw.pyx":602 |
| 7600 | * ret = rgw_lookup(self.fs, _dir_handler, _filename, |
| 7601 | * &_file_handler, &st, st_mask, _flags) |
| 7602 | * if ret < 0: # <<<<<<<<<<<<<< |
| 7603 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 7604 | * with nogil: |
| 7605 | */ |
| 7606 | } |
| 7607 | |
| 7608 | /* "rgw.pyx":604 |
| 7609 | * if ret < 0: |
| 7610 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 7611 | * with nogil: # <<<<<<<<<<<<<< |
| 7612 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 7613 | * if ret < 0: |
| 7614 | */ |
| 7615 | { |
| 7616 | #ifdef WITH_THREAD1 |
| 7617 | PyThreadState *_save; |
| 7618 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 7619 | #endif |
| 7620 | /*try:*/ { |
| 7621 | |
| 7622 | /* "rgw.pyx":605 |
| 7623 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 7624 | * with nogil: |
| 7625 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) # <<<<<<<<<<<<<< |
| 7626 | * if ret < 0: |
| 7627 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 7628 | */ |
| 7629 | __pyx_v_ret = rgw_open(__pyx_v_self->fs, __pyx_v__file_handler, 0, __pyx_v__flags); |
| 7630 | } |
| 7631 | |
| 7632 | /* "rgw.pyx":604 |
| 7633 | * if ret < 0: |
| 7634 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 7635 | * with nogil: # <<<<<<<<<<<<<< |
| 7636 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 7637 | * if ret < 0: |
| 7638 | */ |
| 7639 | /*finally:*/ { |
| 7640 | /*normal exit:*/{ |
| 7641 | #ifdef WITH_THREAD1 |
| 7642 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 7643 | #endif |
| 7644 | goto __pyx_L10; |
| 7645 | } |
| 7646 | __pyx_L10:; |
| 7647 | } |
| 7648 | } |
| 7649 | |
| 7650 | /* "rgw.pyx":606 |
| 7651 | * with nogil: |
| 7652 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 7653 | * if ret < 0: # <<<<<<<<<<<<<< |
| 7654 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 7655 | * |
| 7656 | */ |
| 7657 | __pyx_t_4 = ((__pyx_v_ret < 0) != 0); |
| 7658 | if (__pyx_t_4) { |
| 7659 | |
| 7660 | /* "rgw.pyx":607 |
| 7661 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 7662 | * if ret < 0: |
| 7663 | * raise make_ex(ret, "error in open '%s'" % filename) # <<<<<<<<<<<<<< |
| 7664 | * |
| 7665 | * file_handler = FileHandle() |
| 7666 | */ |
| 7667 | __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__7667; goto __pyx_L1_error;} |
| 7668 | __Pyx_GOTREF(__pyx_t_7); |
| 7669 | __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_error_in_open_s, __pyx_v_filename)PyString_Format(__pyx_kp_s_error_in_open_s, __pyx_v_filename); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__7669; goto __pyx_L1_error;} |
| 7670 | __Pyx_GOTREF(__pyx_t_1); |
| 7671 | __pyx_t_2 = __pyx_f_3rgw_make_ex(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__7671; goto __pyx_L1_error;} |
| 7672 | __Pyx_GOTREF(__pyx_t_2); |
| 7673 | __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; |
| 7674 | __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; |
| 7675 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
| 7676 | __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; |
| 7677 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__7677; goto __pyx_L1_error;} |
| 7678 | |
| 7679 | /* "rgw.pyx":606 |
| 7680 | * with nogil: |
| 7681 | * ret = rgw_open(self.fs, _file_handler, 0, _flags) |
| 7682 | * if ret < 0: # <<<<<<<<<<<<<< |
| 7683 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 7684 | * |
| 7685 | */ |
| 7686 | } |
| 7687 | |
| 7688 | /* "rgw.pyx":609 |
| 7689 | * raise make_ex(ret, "error in open '%s'" % filename) |
| 7690 | * |
| 7691 | * file_handler = FileHandle() # <<<<<<<<<<<<<< |
| 7692 | * file_handler.handler = _file_handler |
| 7693 | * return file_handler |
| 7694 | */ |
| 7695 | __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rgw_FileHandle), __pyx_empty_tuple, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__7695; goto __pyx_L1_error;} |
| 7696 | __Pyx_GOTREF(__pyx_t_2); |
| 7697 | __pyx_v_file_handler = ((struct __pyx_obj_3rgw_FileHandle *)__pyx_t_2); |
| 7698 | __pyx_t_2 = 0; |
| 7699 | |
| 7700 | /* "rgw.pyx":610 |
| 7701 | * |
| 7702 | * file_handler = FileHandle() |
| 7703 | * file_handler.handler = _file_handler # <<<<<<<<<<<<<< |
| 7704 | * return file_handler |
| 7705 | * |
| 7706 | */ |
| 7707 | __pyx_v_file_handler->handler = __pyx_v__file_handler; |
| 7708 | |
| 7709 | /* "rgw.pyx":611 |
| 7710 | * file_handler = FileHandle() |
| 7711 | * file_handler.handler = _file_handler |
| 7712 | * return file_handler # <<<<<<<<<<<<<< |
| 7713 | * |
| 7714 | * def close(self, FileHandle file_handler, flags = 0): |
| 7715 | */ |
| 7716 | __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); |
| 7717 | __Pyx_INCREF(((PyObject *)__pyx_v_file_handler))( ((PyObject*)(((PyObject *)__pyx_v_file_handler)))->ob_refcnt ++); |
| 7718 | __pyx_r = ((PyObject *)__pyx_v_file_handler); |
| 7719 | goto __pyx_L0; |
| 7720 | |
| 7721 | /* "rgw.pyx":583 |
| 7722 | * return file_handler |
| 7723 | * |
| 7724 | * def open(self, FileHandle dir_handler, filename, flags = 0): # <<<<<<<<<<<<<< |
| 7725 | * self.require_state("mounted") |
| 7726 | * |
| 7727 | */ |
| 7728 | |
| 7729 | /* function exit code */ |
| 7730 | __pyx_L1_error:; |
| 7731 | __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); |
| 7732 | __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); |
| 7733 | __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); |
| 7734 | __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); |
| 7735 | __Pyx_AddTraceback("rgw.LibRGWFS.open", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 7736 | __pyx_r = NULL((void*)0); |
| 7737 | __pyx_L0:; |
| 7738 | __Pyx_XDECREF((PyObject *)__pyx_v_file_handler)do { if (((PyObject *)__pyx_v_file_handler) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_file_handler))-> ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_file_handler)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject *)__pyx_v_file_handler)))); } while (0); } while (0); |
| 7739 | __Pyx_XDECREF(__pyx_v_filename)do { if ((__pyx_v_filename) == ((void*)0)) ; else do { if ( -- ((PyObject*)(__pyx_v_filename))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(__pyx_v_filename)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_filename)))); } while (0); } while (0); |
| 7740 | __Pyx_XGIVEREF(__pyx_r); |
| 7741 | __Pyx_RefNannyFinishContext(); |
| 7742 | return __pyx_r; |
| 7743 | } |
| 7744 | |
| 7745 | /* "rgw.pyx":613 |
| 7746 | * return file_handler |
| 7747 | * |
| 7748 | * def close(self, FileHandle file_handler, flags = 0): # <<<<<<<<<<<<<< |
| 7749 | * self.require_state("mounted") |
| 7750 | * cdef: |
| 7751 | */ |
| 7752 | |
| 7753 | /* Python wrapper */ |
| 7754 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_37close(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 7755 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_37close(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 7756 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler = 0; |
| 7757 | PyObject *__pyx_v_flags = 0; |
| 7758 | int __pyx_lineno = 0; |
| 7759 | const char *__pyx_filename = NULL((void*)0); |
| 7760 | int __pyx_clineno = 0; |
| 7761 | PyObject *__pyx_r = 0; |
| 7762 | __Pyx_RefNannyDeclarations |
| 7763 | __Pyx_RefNannySetupContext("close (wrapper)", 0); |
| 7764 | { |
| 7765 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_file_handler,&__pyx_n_s_flags,0}; |
| 7766 | PyObject* values[2] = {0,0}; |
| 7767 | values[1] = ((PyObject *)__pyx_int_0); |
| 7768 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 7769 | Py_ssize_t kw_args; |
| 7770 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 7771 | switch (pos_args) { |
| 7772 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 7773 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 7774 | case 0: break; |
| 7775 | default: goto __pyx_L5_argtuple_error; |
| 7776 | } |
| 7777 | kw_args = PyDict_Size(__pyx_kwds); |
| 7778 | switch (pos_args) { |
| 7779 | case 0: |
| 7780 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_file_handler)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_file_handler )) != 0), 1)) kw_args--; |
| 7781 | else goto __pyx_L5_argtuple_error; |
| 7782 | case 1: |
| 7783 | if (kw_args > 0) { |
| 7784 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); |
| 7785 | if (value) { values[1] = value; kw_args--; } |
| 7786 | } |
| 7787 | } |
| 7788 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 7789 | if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "close") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames , 0, values, pos_args, "close") < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__7789; goto __pyx_L3_error;} |
| 7790 | } |
| 7791 | } else { |
| 7792 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 7793 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 7794 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 7795 | break; |
| 7796 | default: goto __pyx_L5_argtuple_error; |
| 7797 | } |
| 7798 | } |
| 7799 | __pyx_v_file_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[0]); |
| 7800 | __pyx_v_flags = values[1]; |
| 7801 | } |
| 7802 | goto __pyx_L4_argument_unpacking_done; |
| 7803 | __pyx_L5_argtuple_error:; |
| 7804 | __Pyx_RaiseArgtupleInvalid("close", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__7804; goto __pyx_L3_error;} |
| 7805 | __pyx_L3_error:; |
| 7806 | __Pyx_AddTraceback("rgw.LibRGWFS.close", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 7807 | __Pyx_RefNannyFinishContext(); |
| 7808 | return NULL((void*)0); |
| 7809 | __pyx_L4_argument_unpacking_done:; |
| 7810 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_handler), __pyx_ptype_3rgw_FileHandle, 1, "file_handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_handler ), __pyx_ptype_3rgw_FileHandle, 1, "file_handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__7810; goto __pyx_L1_error;} |
| 7811 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_36close(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_file_handler, __pyx_v_flags); |
| 7812 | |
| 7813 | /* function exit code */ |
| 7814 | goto __pyx_L0; |
| 7815 | __pyx_L1_error:; |
| 7816 | __pyx_r = NULL((void*)0); |
| 7817 | __pyx_L0:; |
| 7818 | __Pyx_RefNannyFinishContext(); |
| 7819 | return __pyx_r; |
| 7820 | } |
| 7821 | |
| 7822 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_36close(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler, PyObject *__pyx_v_flags) { |
| 7823 | struct rgw_file_handle *__pyx_v__file_handler; |
| 7824 | int __pyx_v__flags; |
| 7825 | int __pyx_v_ret; |
| 7826 | PyObject *__pyx_r = NULL((void*)0); |
| 7827 | __Pyx_RefNannyDeclarations |
| 7828 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 7829 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 7830 | int __pyx_t_3; |
| 7831 | int __pyx_t_4; |
| 7832 | int __pyx_lineno = 0; |
| 7833 | const char *__pyx_filename = NULL((void*)0); |
| 7834 | int __pyx_clineno = 0; |
| 7835 | __Pyx_RefNannySetupContext("close", 0); |
| 7836 | |
| 7837 | /* "rgw.pyx":614 |
| 7838 | * |
| 7839 | * def close(self, FileHandle file_handler, flags = 0): |
| 7840 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 7841 | * cdef: |
| 7842 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler |
| 7843 | */ |
| 7844 | __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 = 614; __pyx_clineno = __LINE__7844; goto __pyx_L1_error;} |
| 7845 | __Pyx_GOTREF(__pyx_t_1); |
| 7846 | __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 = 614; __pyx_clineno = __LINE__7846; goto __pyx_L1_error;} |
| 7847 | __Pyx_GOTREF(__pyx_t_2); |
| 7848 | __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; |
| 7849 | __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; |
| 7850 | |
| 7851 | /* "rgw.pyx":616 |
| 7852 | * self.require_state("mounted") |
| 7853 | * cdef: |
| 7854 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler # <<<<<<<<<<<<<< |
| 7855 | * int _flags = flags |
| 7856 | * with nogil: |
| 7857 | */ |
| 7858 | __pyx_v__file_handler = ((struct rgw_file_handle *)__pyx_v_file_handler->handler); |
| 7859 | |
| 7860 | /* "rgw.pyx":617 |
| 7861 | * cdef: |
| 7862 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler |
| 7863 | * int _flags = flags # <<<<<<<<<<<<<< |
| 7864 | * with nogil: |
| 7865 | * ret = rgw_close(self.fs, _file_handler, _flags) |
| 7866 | */ |
| 7867 | __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__7867; goto __pyx_L1_error;} |
| 7868 | __pyx_v__flags = __pyx_t_3; |
| 7869 | |
| 7870 | /* "rgw.pyx":618 |
| 7871 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler |
| 7872 | * int _flags = flags |
| 7873 | * with nogil: # <<<<<<<<<<<<<< |
| 7874 | * ret = rgw_close(self.fs, _file_handler, _flags) |
| 7875 | * if ret < 0: |
| 7876 | */ |
| 7877 | { |
| 7878 | #ifdef WITH_THREAD1 |
| 7879 | PyThreadState *_save; |
| 7880 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 7881 | #endif |
| 7882 | /*try:*/ { |
| 7883 | |
| 7884 | /* "rgw.pyx":619 |
| 7885 | * int _flags = flags |
| 7886 | * with nogil: |
| 7887 | * ret = rgw_close(self.fs, _file_handler, _flags) # <<<<<<<<<<<<<< |
| 7888 | * if ret < 0: |
| 7889 | * raise make_ex(ret, "error in close") |
| 7890 | */ |
| 7891 | __pyx_v_ret = rgw_close(__pyx_v_self->fs, __pyx_v__file_handler, __pyx_v__flags); |
| 7892 | } |
| 7893 | |
| 7894 | /* "rgw.pyx":618 |
| 7895 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler |
| 7896 | * int _flags = flags |
| 7897 | * with nogil: # <<<<<<<<<<<<<< |
| 7898 | * ret = rgw_close(self.fs, _file_handler, _flags) |
| 7899 | * if ret < 0: |
| 7900 | */ |
| 7901 | /*finally:*/ { |
| 7902 | /*normal exit:*/{ |
| 7903 | #ifdef WITH_THREAD1 |
| 7904 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 7905 | #endif |
| 7906 | goto __pyx_L5; |
| 7907 | } |
| 7908 | __pyx_L5:; |
| 7909 | } |
| 7910 | } |
| 7911 | |
| 7912 | /* "rgw.pyx":620 |
| 7913 | * with nogil: |
| 7914 | * ret = rgw_close(self.fs, _file_handler, _flags) |
| 7915 | * if ret < 0: # <<<<<<<<<<<<<< |
| 7916 | * raise make_ex(ret, "error in close") |
| 7917 | * |
| 7918 | */ |
| 7919 | __pyx_t_4 = ((__pyx_v_ret < 0) != 0); |
| 7920 | if (__pyx_t_4) { |
| 7921 | |
| 7922 | /* "rgw.pyx":621 |
| 7923 | * ret = rgw_close(self.fs, _file_handler, _flags) |
| 7924 | * if ret < 0: |
| 7925 | * raise make_ex(ret, "error in close") # <<<<<<<<<<<<<< |
| 7926 | * |
| 7927 | * def read(self, FileHandle file_handler, offset, l, flags = 0): |
| 7928 | */ |
| 7929 | __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 = 621; __pyx_clineno = __LINE__7929; goto __pyx_L1_error;} |
| 7930 | __Pyx_GOTREF(__pyx_t_2); |
| 7931 | __pyx_t_1 = __pyx_f_3rgw_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 = 621; __pyx_clineno = __LINE__7931; goto __pyx_L1_error;} |
| 7932 | __Pyx_GOTREF(__pyx_t_1); |
| 7933 | __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; |
| 7934 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 7935 | __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; |
| 7936 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__7936; goto __pyx_L1_error;} |
| 7937 | |
| 7938 | /* "rgw.pyx":620 |
| 7939 | * with nogil: |
| 7940 | * ret = rgw_close(self.fs, _file_handler, _flags) |
| 7941 | * if ret < 0: # <<<<<<<<<<<<<< |
| 7942 | * raise make_ex(ret, "error in close") |
| 7943 | * |
| 7944 | */ |
| 7945 | } |
| 7946 | |
| 7947 | /* "rgw.pyx":613 |
| 7948 | * return file_handler |
| 7949 | * |
| 7950 | * def close(self, FileHandle file_handler, flags = 0): # <<<<<<<<<<<<<< |
| 7951 | * self.require_state("mounted") |
| 7952 | * cdef: |
| 7953 | */ |
| 7954 | |
| 7955 | /* function exit code */ |
| 7956 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 7957 | goto __pyx_L0; |
| 7958 | __pyx_L1_error:; |
| 7959 | __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); |
| 7960 | __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); |
| 7961 | __Pyx_AddTraceback("rgw.LibRGWFS.close", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 7962 | __pyx_r = NULL((void*)0); |
| 7963 | __pyx_L0:; |
| 7964 | __Pyx_XGIVEREF(__pyx_r); |
| 7965 | __Pyx_RefNannyFinishContext(); |
| 7966 | return __pyx_r; |
| 7967 | } |
| 7968 | |
| 7969 | /* "rgw.pyx":623 |
| 7970 | * raise make_ex(ret, "error in close") |
| 7971 | * |
| 7972 | * def read(self, FileHandle file_handler, offset, l, flags = 0): # <<<<<<<<<<<<<< |
| 7973 | * self.require_state("mounted") |
| 7974 | * if not isinstance(offset, int): |
| 7975 | */ |
| 7976 | |
| 7977 | /* Python wrapper */ |
| 7978 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_39read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 7979 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_39read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 7980 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler = 0; |
| 7981 | PyObject *__pyx_v_offset = 0; |
| 7982 | PyObject *__pyx_v_l = 0; |
| 7983 | PyObject *__pyx_v_flags = 0; |
| 7984 | int __pyx_lineno = 0; |
| 7985 | const char *__pyx_filename = NULL((void*)0); |
| 7986 | int __pyx_clineno = 0; |
| 7987 | PyObject *__pyx_r = 0; |
| 7988 | __Pyx_RefNannyDeclarations |
| 7989 | __Pyx_RefNannySetupContext("read (wrapper)", 0); |
| 7990 | { |
| 7991 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_file_handler,&__pyx_n_s_offset,&__pyx_n_s_l,&__pyx_n_s_flags,0}; |
| 7992 | PyObject* values[4] = {0,0,0,0}; |
| 7993 | values[3] = ((PyObject *)__pyx_int_0); |
| 7994 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 7995 | Py_ssize_t kw_args; |
| 7996 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 7997 | switch (pos_args) { |
| 7998 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 7999 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 8000 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 8001 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 8002 | case 0: break; |
| 8003 | default: goto __pyx_L5_argtuple_error; |
| 8004 | } |
| 8005 | kw_args = PyDict_Size(__pyx_kwds); |
| 8006 | switch (pos_args) { |
| 8007 | case 0: |
| 8008 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_file_handler)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_file_handler )) != 0), 1)) kw_args--; |
| 8009 | else goto __pyx_L5_argtuple_error; |
| 8010 | case 1: |
| 8011 | 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--; |
| 8012 | else { |
| 8013 | __Pyx_RaiseArgtupleInvalid("read", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__8013; goto __pyx_L3_error;} |
| 8014 | } |
| 8015 | case 2: |
| 8016 | 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--; |
| 8017 | else { |
| 8018 | __Pyx_RaiseArgtupleInvalid("read", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__8018; goto __pyx_L3_error;} |
| 8019 | } |
| 8020 | case 3: |
| 8021 | if (kw_args > 0) { |
| 8022 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); |
| 8023 | if (value) { values[3] = value; kw_args--; } |
| 8024 | } |
| 8025 | } |
| 8026 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 8027 | 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 = 623; __pyx_clineno = __LINE__8027; goto __pyx_L3_error;} |
| 8028 | } |
| 8029 | } else { |
| 8030 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 8031 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 8032 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 8033 | values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 8034 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 8035 | break; |
| 8036 | default: goto __pyx_L5_argtuple_error; |
| 8037 | } |
| 8038 | } |
| 8039 | __pyx_v_file_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[0]); |
| 8040 | __pyx_v_offset = values[1]; |
| 8041 | __pyx_v_l = values[2]; |
| 8042 | __pyx_v_flags = values[3]; |
| 8043 | } |
| 8044 | goto __pyx_L4_argument_unpacking_done; |
| 8045 | __pyx_L5_argtuple_error:; |
| 8046 | __Pyx_RaiseArgtupleInvalid("read", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__8046; goto __pyx_L3_error;} |
| 8047 | __pyx_L3_error:; |
| 8048 | __Pyx_AddTraceback("rgw.LibRGWFS.read", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 8049 | __Pyx_RefNannyFinishContext(); |
| 8050 | return NULL((void*)0); |
| 8051 | __pyx_L4_argument_unpacking_done:; |
| 8052 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_handler), __pyx_ptype_3rgw_FileHandle, 1, "file_handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_handler ), __pyx_ptype_3rgw_FileHandle, 1, "file_handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__8052; goto __pyx_L1_error;} |
| 8053 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_38read(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_file_handler, __pyx_v_offset, __pyx_v_l, __pyx_v_flags); |
| 8054 | |
| 8055 | /* function exit code */ |
| 8056 | goto __pyx_L0; |
| 8057 | __pyx_L1_error:; |
| 8058 | __pyx_r = NULL((void*)0); |
| 8059 | __pyx_L0:; |
| 8060 | __Pyx_RefNannyFinishContext(); |
| 8061 | return __pyx_r; |
| 8062 | } |
| 8063 | |
| 8064 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_38read(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler, PyObject *__pyx_v_offset, PyObject *__pyx_v_l, PyObject *__pyx_v_flags) { |
| 8065 | struct rgw_file_handle *__pyx_v__file_handler; |
| 8066 | int64_t __pyx_v__offset; |
| 8067 | size_t __pyx_v__length; |
| 8068 | size_t __pyx_v__got; |
| 8069 | int __pyx_v__flags; |
| 8070 | char *__pyx_v_ret_buf; |
| 8071 | PyObject *__pyx_v_ret_s; |
| 8072 | int __pyx_v_ret; |
| 8073 | PyObject *__pyx_r = NULL((void*)0); |
| 8074 | __Pyx_RefNannyDeclarations |
| 8075 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 8076 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 8077 | int __pyx_t_3; |
| 8078 | int __pyx_t_4; |
| 8079 | int64_t __pyx_t_5; |
| 8080 | size_t __pyx_t_6; |
| 8081 | int __pyx_t_7; |
| 8082 | PyObject *__pyx_t_8; |
| 8083 | char *__pyx_t_9; |
| 8084 | int __pyx_t_10; |
| 8085 | char const *__pyx_t_11; |
| 8086 | PyObject *__pyx_t_12 = NULL((void*)0); |
| 8087 | PyObject *__pyx_t_13 = NULL((void*)0); |
| 8088 | PyObject *__pyx_t_14 = NULL((void*)0); |
| 8089 | PyObject *__pyx_t_15 = NULL((void*)0); |
| 8090 | PyObject *__pyx_t_16 = NULL((void*)0); |
| 8091 | PyObject *__pyx_t_17 = NULL((void*)0); |
| 8092 | int __pyx_lineno = 0; |
| 8093 | const char *__pyx_filename = NULL((void*)0); |
| 8094 | int __pyx_clineno = 0; |
| 8095 | __Pyx_RefNannySetupContext("read", 0); |
| 8096 | |
| 8097 | /* "rgw.pyx":624 |
| 8098 | * |
| 8099 | * def read(self, FileHandle file_handler, offset, l, flags = 0): |
| 8100 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 8101 | * if not isinstance(offset, int): |
| 8102 | * raise TypeError('offset must be an int') |
| 8103 | */ |
| 8104 | __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 = 624; __pyx_clineno = __LINE__8104; goto __pyx_L1_error;} |
| 8105 | __Pyx_GOTREF(__pyx_t_1); |
| 8106 | __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 = 624; __pyx_clineno = __LINE__8106; goto __pyx_L1_error;} |
| 8107 | __Pyx_GOTREF(__pyx_t_2); |
| 8108 | __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; |
| 8109 | __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; |
| 8110 | |
| 8111 | /* "rgw.pyx":625 |
| 8112 | * def read(self, FileHandle file_handler, offset, l, flags = 0): |
| 8113 | * self.require_state("mounted") |
| 8114 | * if not isinstance(offset, int): # <<<<<<<<<<<<<< |
| 8115 | * raise TypeError('offset must be an int') |
| 8116 | * if not isinstance(l, int): |
| 8117 | */ |
| 8118 | __pyx_t_3 = PyInt_Check(__pyx_v_offset)((((__pyx_v_offset)->ob_type)->tp_flags & ((1L<< 23))) != 0); |
| 8119 | __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); |
| 8120 | if (__pyx_t_4) { |
| 8121 | |
| 8122 | /* "rgw.pyx":626 |
| 8123 | * self.require_state("mounted") |
| 8124 | * if not isinstance(offset, int): |
| 8125 | * raise TypeError('offset must be an int') # <<<<<<<<<<<<<< |
| 8126 | * if not isinstance(l, int): |
| 8127 | * raise TypeError('l must be an int') |
| 8128 | */ |
| 8129 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__8129; goto __pyx_L1_error;} |
| 8130 | __Pyx_GOTREF(__pyx_t_2); |
| 8131 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
| 8132 | __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; |
| 8133 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__8133; goto __pyx_L1_error;} |
| 8134 | |
| 8135 | /* "rgw.pyx":625 |
| 8136 | * def read(self, FileHandle file_handler, offset, l, flags = 0): |
| 8137 | * self.require_state("mounted") |
| 8138 | * if not isinstance(offset, int): # <<<<<<<<<<<<<< |
| 8139 | * raise TypeError('offset must be an int') |
| 8140 | * if not isinstance(l, int): |
| 8141 | */ |
| 8142 | } |
| 8143 | |
| 8144 | /* "rgw.pyx":627 |
| 8145 | * if not isinstance(offset, int): |
| 8146 | * raise TypeError('offset must be an int') |
| 8147 | * if not isinstance(l, int): # <<<<<<<<<<<<<< |
| 8148 | * raise TypeError('l must be an int') |
| 8149 | * cdef: |
| 8150 | */ |
| 8151 | __pyx_t_4 = PyInt_Check(__pyx_v_l)((((__pyx_v_l)->ob_type)->tp_flags & ((1L<<23 ))) != 0); |
| 8152 | __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0); |
| 8153 | if (__pyx_t_3) { |
| 8154 | |
| 8155 | /* "rgw.pyx":628 |
| 8156 | * raise TypeError('offset must be an int') |
| 8157 | * if not isinstance(l, int): |
| 8158 | * raise TypeError('l must be an int') # <<<<<<<<<<<<<< |
| 8159 | * cdef: |
| 8160 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler |
| 8161 | */ |
| 8162 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__8162; goto __pyx_L1_error;} |
| 8163 | __Pyx_GOTREF(__pyx_t_2); |
| 8164 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
| 8165 | __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; |
| 8166 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__8166; goto __pyx_L1_error;} |
| 8167 | |
| 8168 | /* "rgw.pyx":627 |
| 8169 | * if not isinstance(offset, int): |
| 8170 | * raise TypeError('offset must be an int') |
| 8171 | * if not isinstance(l, int): # <<<<<<<<<<<<<< |
| 8172 | * raise TypeError('l must be an int') |
| 8173 | * cdef: |
| 8174 | */ |
| 8175 | } |
| 8176 | |
| 8177 | /* "rgw.pyx":630 |
| 8178 | * raise TypeError('l must be an int') |
| 8179 | * cdef: |
| 8180 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler # <<<<<<<<<<<<<< |
| 8181 | * int64_t _offset = offset |
| 8182 | * size_t _length = l |
| 8183 | */ |
| 8184 | __pyx_v__file_handler = ((struct rgw_file_handle *)__pyx_v_file_handler->handler); |
| 8185 | |
| 8186 | /* "rgw.pyx":631 |
| 8187 | * cdef: |
| 8188 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler |
| 8189 | * int64_t _offset = offset # <<<<<<<<<<<<<< |
| 8190 | * size_t _length = l |
| 8191 | * size_t _got |
| 8192 | */ |
| 8193 | __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_5 == (int64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_5 == (int64_t)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__8193; goto __pyx_L1_error;} |
| 8194 | __pyx_v__offset = __pyx_t_5; |
| 8195 | |
| 8196 | /* "rgw.pyx":632 |
| 8197 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler |
| 8198 | * int64_t _offset = offset |
| 8199 | * size_t _length = l # <<<<<<<<<<<<<< |
| 8200 | * size_t _got |
| 8201 | * int _flags = flags |
| 8202 | */ |
| 8203 | __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_v_l); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_6 == (size_t)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__8203; goto __pyx_L1_error;} |
| 8204 | __pyx_v__length = __pyx_t_6; |
| 8205 | |
| 8206 | /* "rgw.pyx":634 |
| 8207 | * size_t _length = l |
| 8208 | * size_t _got |
| 8209 | * int _flags = flags # <<<<<<<<<<<<<< |
| 8210 | * |
| 8211 | * char *ret_buf |
| 8212 | */ |
| 8213 | __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_7 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__8213; goto __pyx_L1_error;} |
| 8214 | __pyx_v__flags = __pyx_t_7; |
| 8215 | |
| 8216 | /* "rgw.pyx":637 |
| 8217 | * |
| 8218 | * char *ret_buf |
| 8219 | * PyObject* ret_s = NULL # <<<<<<<<<<<<<< |
| 8220 | * |
| 8221 | * ret_s = PyBytes_FromStringAndSize(NULL, _length) |
| 8222 | */ |
| 8223 | __pyx_v_ret_s = NULL((void*)0); |
| 8224 | |
| 8225 | /* "rgw.pyx":639 |
| 8226 | * PyObject* ret_s = NULL |
| 8227 | * |
| 8228 | * ret_s = PyBytes_FromStringAndSize(NULL, _length) # <<<<<<<<<<<<<< |
| 8229 | * try: |
| 8230 | * ret_buf = PyBytes_AsString(ret_s) |
| 8231 | */ |
| 8232 | __pyx_t_8 = PyBytes_FromStringAndSizePyString_FromStringAndSize(NULL((void*)0), __pyx_v__length); if (unlikely(__pyx_t_8 == NULL)__builtin_expect(!!(__pyx_t_8 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__8232; goto __pyx_L1_error;} |
| 8233 | __pyx_v_ret_s = __pyx_t_8; |
| 8234 | |
| 8235 | /* "rgw.pyx":640 |
| 8236 | * |
| 8237 | * ret_s = PyBytes_FromStringAndSize(NULL, _length) |
| 8238 | * try: # <<<<<<<<<<<<<< |
| 8239 | * ret_buf = PyBytes_AsString(ret_s) |
| 8240 | * with nogil: |
| 8241 | */ |
| 8242 | /*try:*/ { |
| 8243 | |
| 8244 | /* "rgw.pyx":641 |
| 8245 | * ret_s = PyBytes_FromStringAndSize(NULL, _length) |
| 8246 | * try: |
| 8247 | * ret_buf = PyBytes_AsString(ret_s) # <<<<<<<<<<<<<< |
| 8248 | * with nogil: |
| 8249 | * ret = rgw_read(self.fs, _file_handler, _offset, _length, |
| 8250 | */ |
| 8251 | __pyx_t_9 = PyBytes_AsStringPyString_AsString(__pyx_v_ret_s); if (unlikely(__pyx_t_9 == NULL)__builtin_expect(!!(__pyx_t_9 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__8251; goto __pyx_L6_error;} |
| 8252 | __pyx_v_ret_buf = __pyx_t_9; |
| 8253 | |
| 8254 | /* "rgw.pyx":642 |
| 8255 | * try: |
| 8256 | * ret_buf = PyBytes_AsString(ret_s) |
| 8257 | * with nogil: # <<<<<<<<<<<<<< |
| 8258 | * ret = rgw_read(self.fs, _file_handler, _offset, _length, |
| 8259 | * &_got, ret_buf, _flags) |
| 8260 | */ |
| 8261 | { |
| 8262 | #ifdef WITH_THREAD1 |
| 8263 | PyThreadState *_save; |
| 8264 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 8265 | #endif |
| 8266 | /*try:*/ { |
| 8267 | |
| 8268 | /* "rgw.pyx":643 |
| 8269 | * ret_buf = PyBytes_AsString(ret_s) |
| 8270 | * with nogil: |
| 8271 | * ret = rgw_read(self.fs, _file_handler, _offset, _length, # <<<<<<<<<<<<<< |
| 8272 | * &_got, ret_buf, _flags) |
| 8273 | * if ret < 0: |
| 8274 | */ |
| 8275 | __pyx_v_ret = rgw_read(__pyx_v_self->fs, __pyx_v__file_handler, __pyx_v__offset, __pyx_v__length, (&__pyx_v__got), __pyx_v_ret_buf, __pyx_v__flags); |
| 8276 | } |
| 8277 | |
| 8278 | /* "rgw.pyx":642 |
| 8279 | * try: |
| 8280 | * ret_buf = PyBytes_AsString(ret_s) |
| 8281 | * with nogil: # <<<<<<<<<<<<<< |
| 8282 | * ret = rgw_read(self.fs, _file_handler, _offset, _length, |
| 8283 | * &_got, ret_buf, _flags) |
| 8284 | */ |
| 8285 | /*finally:*/ { |
| 8286 | /*normal exit:*/{ |
| 8287 | #ifdef WITH_THREAD1 |
| 8288 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 8289 | #endif |
| 8290 | goto __pyx_L10; |
| 8291 | } |
| 8292 | __pyx_L10:; |
| 8293 | } |
| 8294 | } |
| 8295 | |
| 8296 | /* "rgw.pyx":645 |
| 8297 | * ret = rgw_read(self.fs, _file_handler, _offset, _length, |
| 8298 | * &_got, ret_buf, _flags) |
| 8299 | * if ret < 0: # <<<<<<<<<<<<<< |
| 8300 | * raise make_ex(ret, "error in read") |
| 8301 | * |
| 8302 | */ |
| 8303 | __pyx_t_3 = ((__pyx_v_ret < 0) != 0); |
| 8304 | if (__pyx_t_3) { |
| 8305 | |
| 8306 | /* "rgw.pyx":646 |
| 8307 | * &_got, ret_buf, _flags) |
| 8308 | * if ret < 0: |
| 8309 | * raise make_ex(ret, "error in read") # <<<<<<<<<<<<<< |
| 8310 | * |
| 8311 | * if _got < _length: |
| 8312 | */ |
| 8313 | __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 = 646; __pyx_clineno = __LINE__8313; goto __pyx_L6_error;} |
| 8314 | __Pyx_GOTREF(__pyx_t_2); |
| 8315 | __pyx_t_1 = __pyx_f_3rgw_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 = 646; __pyx_clineno = __LINE__8315; goto __pyx_L6_error;} |
| 8316 | __Pyx_GOTREF(__pyx_t_1); |
| 8317 | __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; |
| 8318 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 8319 | __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; |
| 8320 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__8320; goto __pyx_L6_error;} |
| 8321 | |
| 8322 | /* "rgw.pyx":645 |
| 8323 | * ret = rgw_read(self.fs, _file_handler, _offset, _length, |
| 8324 | * &_got, ret_buf, _flags) |
| 8325 | * if ret < 0: # <<<<<<<<<<<<<< |
| 8326 | * raise make_ex(ret, "error in read") |
| 8327 | * |
| 8328 | */ |
| 8329 | } |
| 8330 | |
| 8331 | /* "rgw.pyx":648 |
| 8332 | * raise make_ex(ret, "error in read") |
| 8333 | * |
| 8334 | * if _got < _length: # <<<<<<<<<<<<<< |
| 8335 | * _PyBytes_Resize(&ret_s, _got) |
| 8336 | * |
| 8337 | */ |
| 8338 | __pyx_t_3 = ((__pyx_v__got < __pyx_v__length) != 0); |
| 8339 | if (__pyx_t_3) { |
| 8340 | |
| 8341 | /* "rgw.pyx":649 |
| 8342 | * |
| 8343 | * if _got < _length: |
| 8344 | * _PyBytes_Resize(&ret_s, _got) # <<<<<<<<<<<<<< |
| 8345 | * |
| 8346 | * return <object>ret_s |
| 8347 | */ |
| 8348 | __pyx_t_7 = _PyBytes_Resize_PyString_Resize((&__pyx_v_ret_s), __pyx_v__got); if (unlikely(__pyx_t_7 == -1)__builtin_expect(!!(__pyx_t_7 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__8348; goto __pyx_L6_error;} |
| 8349 | |
| 8350 | /* "rgw.pyx":648 |
| 8351 | * raise make_ex(ret, "error in read") |
| 8352 | * |
| 8353 | * if _got < _length: # <<<<<<<<<<<<<< |
| 8354 | * _PyBytes_Resize(&ret_s, _got) |
| 8355 | * |
| 8356 | */ |
| 8357 | } |
| 8358 | |
| 8359 | /* "rgw.pyx":651 |
| 8360 | * _PyBytes_Resize(&ret_s, _got) |
| 8361 | * |
| 8362 | * return <object>ret_s # <<<<<<<<<<<<<< |
| 8363 | * finally: |
| 8364 | * # We DECREF unconditionally: the cast to object above will have |
| 8365 | */ |
| 8366 | __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); |
| 8367 | __Pyx_INCREF(((PyObject *)__pyx_v_ret_s))( ((PyObject*)(((PyObject *)__pyx_v_ret_s)))->ob_refcnt++); |
| 8368 | __pyx_r = ((PyObject *)__pyx_v_ret_s); |
| 8369 | goto __pyx_L5_return; |
| 8370 | } |
| 8371 | |
| 8372 | /* "rgw.pyx":657 |
| 8373 | * # including if _PyString_Resize fails (that will free the string |
| 8374 | * # itself and set ret_s to NULL, hence XDECREF). |
| 8375 | * ref.Py_XDECREF(ret_s) # <<<<<<<<<<<<<< |
| 8376 | * |
| 8377 | * |
| 8378 | */ |
| 8379 | /*finally:*/ { |
| 8380 | /*exception exit:*/{ |
| 8381 | __pyx_L6_error:; |
| 8382 | __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; |
| 8383 | __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; |
| 8384 | __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; |
| 8385 | if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); |
| 8386 | 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); |
| 8387 | __Pyx_XGOTREF(__pyx_t_12); |
| 8388 | __Pyx_XGOTREF(__pyx_t_13); |
| 8389 | __Pyx_XGOTREF(__pyx_t_14); |
| 8390 | __Pyx_XGOTREF(__pyx_t_15); |
| 8391 | __Pyx_XGOTREF(__pyx_t_16); |
| 8392 | __Pyx_XGOTREF(__pyx_t_17); |
| 8393 | __pyx_t_7 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; |
| 8394 | { |
| 8395 | 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); |
| 8396 | } |
| 8397 | if (PY_MAJOR_VERSION2 >= 3) { |
| 8398 | __Pyx_XGIVEREF(__pyx_t_15); |
| 8399 | __Pyx_XGIVEREF(__pyx_t_16); |
| 8400 | __Pyx_XGIVEREF(__pyx_t_17); |
| 8401 | __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); |
| 8402 | } |
| 8403 | __Pyx_XGIVEREF(__pyx_t_12); |
| 8404 | __Pyx_XGIVEREF(__pyx_t_13); |
| 8405 | __Pyx_XGIVEREF(__pyx_t_14); |
| 8406 | __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14); |
| 8407 | __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; |
| 8408 | __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; |
| 8409 | goto __pyx_L1_error; |
| 8410 | } |
| 8411 | __pyx_L5_return: { |
| 8412 | __pyx_t_17 = __pyx_r; |
| 8413 | __pyx_r = 0; |
| 8414 | 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); |
| 8415 | __pyx_r = __pyx_t_17; |
| 8416 | __pyx_t_17 = 0; |
| 8417 | goto __pyx_L0; |
| 8418 | } |
| 8419 | } |
| 8420 | |
| 8421 | /* "rgw.pyx":623 |
| 8422 | * raise make_ex(ret, "error in close") |
| 8423 | * |
| 8424 | * def read(self, FileHandle file_handler, offset, l, flags = 0): # <<<<<<<<<<<<<< |
| 8425 | * self.require_state("mounted") |
| 8426 | * if not isinstance(offset, int): |
| 8427 | */ |
| 8428 | |
| 8429 | /* function exit code */ |
| 8430 | __pyx_L1_error:; |
| 8431 | __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); |
| 8432 | __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); |
| 8433 | __Pyx_AddTraceback("rgw.LibRGWFS.read", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 8434 | __pyx_r = NULL((void*)0); |
| 8435 | __pyx_L0:; |
| 8436 | __Pyx_XGIVEREF(__pyx_r); |
| 8437 | __Pyx_RefNannyFinishContext(); |
| 8438 | return __pyx_r; |
| 8439 | } |
| 8440 | |
| 8441 | /* "rgw.pyx":660 |
| 8442 | * |
| 8443 | * |
| 8444 | * def write(self, FileHandle file_handler, offset, buf, flags = 0): # <<<<<<<<<<<<<< |
| 8445 | * self.require_state("mounted") |
| 8446 | * if not isinstance(buf, bytes): |
| 8447 | */ |
| 8448 | |
| 8449 | /* Python wrapper */ |
| 8450 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_41write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 8451 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_41write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 8452 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler = 0; |
| 8453 | PyObject *__pyx_v_offset = 0; |
| 8454 | PyObject *__pyx_v_buf = 0; |
| 8455 | PyObject *__pyx_v_flags = 0; |
| 8456 | int __pyx_lineno = 0; |
| 8457 | const char *__pyx_filename = NULL((void*)0); |
| 8458 | int __pyx_clineno = 0; |
| 8459 | PyObject *__pyx_r = 0; |
| 8460 | __Pyx_RefNannyDeclarations |
| 8461 | __Pyx_RefNannySetupContext("write (wrapper)", 0); |
| 8462 | { |
| 8463 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_file_handler,&__pyx_n_s_offset,&__pyx_n_s_buf,&__pyx_n_s_flags,0}; |
| 8464 | PyObject* values[4] = {0,0,0,0}; |
| 8465 | values[3] = ((PyObject *)__pyx_int_0); |
| 8466 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 8467 | Py_ssize_t kw_args; |
| 8468 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 8469 | switch (pos_args) { |
| 8470 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 8471 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 8472 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 8473 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 8474 | case 0: break; |
| 8475 | default: goto __pyx_L5_argtuple_error; |
| 8476 | } |
| 8477 | kw_args = PyDict_Size(__pyx_kwds); |
| 8478 | switch (pos_args) { |
| 8479 | case 0: |
| 8480 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_file_handler)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_file_handler )) != 0), 1)) kw_args--; |
| 8481 | else goto __pyx_L5_argtuple_error; |
| 8482 | case 1: |
| 8483 | 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--; |
| 8484 | else { |
| 8485 | __Pyx_RaiseArgtupleInvalid("write", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__8485; goto __pyx_L3_error;} |
| 8486 | } |
| 8487 | case 2: |
| 8488 | if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf )) != 0), 1)) kw_args--; |
| 8489 | else { |
| 8490 | __Pyx_RaiseArgtupleInvalid("write", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__8490; goto __pyx_L3_error;} |
| 8491 | } |
| 8492 | case 3: |
| 8493 | if (kw_args > 0) { |
| 8494 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); |
| 8495 | if (value) { values[3] = value; kw_args--; } |
| 8496 | } |
| 8497 | } |
| 8498 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 8499 | 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 = 660; __pyx_clineno = __LINE__8499; goto __pyx_L3_error;} |
| 8500 | } |
| 8501 | } else { |
| 8502 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 8503 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 8504 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 8505 | values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 8506 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 8507 | break; |
| 8508 | default: goto __pyx_L5_argtuple_error; |
| 8509 | } |
| 8510 | } |
| 8511 | __pyx_v_file_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[0]); |
| 8512 | __pyx_v_offset = values[1]; |
| 8513 | __pyx_v_buf = values[2]; |
| 8514 | __pyx_v_flags = values[3]; |
| 8515 | } |
| 8516 | goto __pyx_L4_argument_unpacking_done; |
| 8517 | __pyx_L5_argtuple_error:; |
| 8518 | __Pyx_RaiseArgtupleInvalid("write", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__8518; goto __pyx_L3_error;} |
| 8519 | __pyx_L3_error:; |
| 8520 | __Pyx_AddTraceback("rgw.LibRGWFS.write", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 8521 | __Pyx_RefNannyFinishContext(); |
| 8522 | return NULL((void*)0); |
| 8523 | __pyx_L4_argument_unpacking_done:; |
| 8524 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_handler), __pyx_ptype_3rgw_FileHandle, 1, "file_handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_handler ), __pyx_ptype_3rgw_FileHandle, 1, "file_handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__8524; goto __pyx_L1_error;} |
| 8525 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_40write(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_file_handler, __pyx_v_offset, __pyx_v_buf, __pyx_v_flags); |
| 8526 | |
| 8527 | /* function exit code */ |
| 8528 | goto __pyx_L0; |
| 8529 | __pyx_L1_error:; |
| 8530 | __pyx_r = NULL((void*)0); |
| 8531 | __pyx_L0:; |
| 8532 | __Pyx_RefNannyFinishContext(); |
| 8533 | return __pyx_r; |
| 8534 | } |
| 8535 | |
| 8536 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_40write(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_file_handler, PyObject *__pyx_v_offset, PyObject *__pyx_v_buf, PyObject *__pyx_v_flags) { |
| 8537 | struct rgw_file_handle *__pyx_v__file_handler; |
| 8538 | char *__pyx_v__data; |
| 8539 | int64_t __pyx_v__offset; |
| 8540 | size_t __pyx_v_length; |
| 8541 | int __pyx_v__flags; |
| 8542 | size_t __pyx_v__written; |
| 8543 | int __pyx_v_ret; |
| 8544 | PyObject *__pyx_r = NULL((void*)0); |
| 8545 | __Pyx_RefNannyDeclarations |
| 8546 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 8547 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 8548 | int __pyx_t_3; |
| 8549 | int __pyx_t_4; |
| 8550 | char *__pyx_t_5; |
| 8551 | int64_t __pyx_t_6; |
| 8552 | Py_ssize_t __pyx_t_7; |
| 8553 | int __pyx_t_8; |
| 8554 | int __pyx_lineno = 0; |
| 8555 | const char *__pyx_filename = NULL((void*)0); |
| 8556 | int __pyx_clineno = 0; |
| 8557 | __Pyx_RefNannySetupContext("write", 0); |
| 8558 | |
| 8559 | /* "rgw.pyx":661 |
| 8560 | * |
| 8561 | * def write(self, FileHandle file_handler, offset, buf, flags = 0): |
| 8562 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 8563 | * if not isinstance(buf, bytes): |
| 8564 | * raise TypeError('buf must be a bytes') |
| 8565 | */ |
| 8566 | __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 = 661; __pyx_clineno = __LINE__8566; goto __pyx_L1_error;} |
| 8567 | __Pyx_GOTREF(__pyx_t_1); |
| 8568 | __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 = 661; __pyx_clineno = __LINE__8568; goto __pyx_L1_error;} |
| 8569 | __Pyx_GOTREF(__pyx_t_2); |
| 8570 | __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; |
| 8571 | __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; |
| 8572 | |
| 8573 | /* "rgw.pyx":662 |
| 8574 | * def write(self, FileHandle file_handler, offset, buf, flags = 0): |
| 8575 | * self.require_state("mounted") |
| 8576 | * if not isinstance(buf, bytes): # <<<<<<<<<<<<<< |
| 8577 | * raise TypeError('buf must be a bytes') |
| 8578 | * if not isinstance(offset, int): |
| 8579 | */ |
| 8580 | __pyx_t_3 = PyBytes_Check(__pyx_v_buf)((((((PyObject*)(__pyx_v_buf))->ob_type))->tp_flags & ((1L<<27))) != 0); |
| 8581 | __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); |
| 8582 | if (__pyx_t_4) { |
| 8583 | |
| 8584 | /* "rgw.pyx":663 |
| 8585 | * self.require_state("mounted") |
| 8586 | * if not isinstance(buf, bytes): |
| 8587 | * raise TypeError('buf must be a bytes') # <<<<<<<<<<<<<< |
| 8588 | * if not isinstance(offset, int): |
| 8589 | * raise TypeError('offset must be an int') |
| 8590 | */ |
| 8591 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__8591; goto __pyx_L1_error;} |
| 8592 | __Pyx_GOTREF(__pyx_t_2); |
| 8593 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
| 8594 | __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; |
| 8595 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__8595; goto __pyx_L1_error;} |
| 8596 | |
| 8597 | /* "rgw.pyx":662 |
| 8598 | * def write(self, FileHandle file_handler, offset, buf, flags = 0): |
| 8599 | * self.require_state("mounted") |
| 8600 | * if not isinstance(buf, bytes): # <<<<<<<<<<<<<< |
| 8601 | * raise TypeError('buf must be a bytes') |
| 8602 | * if not isinstance(offset, int): |
| 8603 | */ |
| 8604 | } |
| 8605 | |
| 8606 | /* "rgw.pyx":664 |
| 8607 | * if not isinstance(buf, bytes): |
| 8608 | * raise TypeError('buf must be a bytes') |
| 8609 | * if not isinstance(offset, int): # <<<<<<<<<<<<<< |
| 8610 | * raise TypeError('offset must be an int') |
| 8611 | * |
| 8612 | */ |
| 8613 | __pyx_t_4 = PyInt_Check(__pyx_v_offset)((((__pyx_v_offset)->ob_type)->tp_flags & ((1L<< 23))) != 0); |
| 8614 | __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0); |
| 8615 | if (__pyx_t_3) { |
| 8616 | |
| 8617 | /* "rgw.pyx":665 |
| 8618 | * raise TypeError('buf must be a bytes') |
| 8619 | * if not isinstance(offset, int): |
| 8620 | * raise TypeError('offset must be an int') # <<<<<<<<<<<<<< |
| 8621 | * |
| 8622 | * cdef: |
| 8623 | */ |
| 8624 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__8624; goto __pyx_L1_error;} |
| 8625 | __Pyx_GOTREF(__pyx_t_2); |
| 8626 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
| 8627 | __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; |
| 8628 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__8628; goto __pyx_L1_error;} |
| 8629 | |
| 8630 | /* "rgw.pyx":664 |
| 8631 | * if not isinstance(buf, bytes): |
| 8632 | * raise TypeError('buf must be a bytes') |
| 8633 | * if not isinstance(offset, int): # <<<<<<<<<<<<<< |
| 8634 | * raise TypeError('offset must be an int') |
| 8635 | * |
| 8636 | */ |
| 8637 | } |
| 8638 | |
| 8639 | /* "rgw.pyx":668 |
| 8640 | * |
| 8641 | * cdef: |
| 8642 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler # <<<<<<<<<<<<<< |
| 8643 | * char *_data = buf |
| 8644 | * int64_t _offset = offset |
| 8645 | */ |
| 8646 | __pyx_v__file_handler = ((struct rgw_file_handle *)__pyx_v_file_handler->handler); |
| 8647 | |
| 8648 | /* "rgw.pyx":669 |
| 8649 | * cdef: |
| 8650 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler |
| 8651 | * char *_data = buf # <<<<<<<<<<<<<< |
| 8652 | * int64_t _offset = offset |
| 8653 | * |
| 8654 | */ |
| 8655 | __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_buf); if (unlikely((!__pyx_t_5) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_5) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__8655; goto __pyx_L1_error;} |
| 8656 | __pyx_v__data = __pyx_t_5; |
| 8657 | |
| 8658 | /* "rgw.pyx":670 |
| 8659 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler |
| 8660 | * char *_data = buf |
| 8661 | * int64_t _offset = offset # <<<<<<<<<<<<<< |
| 8662 | * |
| 8663 | * size_t length = len(buf) |
| 8664 | */ |
| 8665 | __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 = 670; __pyx_clineno = __LINE__8665; goto __pyx_L1_error;} |
| 8666 | __pyx_v__offset = __pyx_t_6; |
| 8667 | |
| 8668 | /* "rgw.pyx":672 |
| 8669 | * int64_t _offset = offset |
| 8670 | * |
| 8671 | * size_t length = len(buf) # <<<<<<<<<<<<<< |
| 8672 | * int _flags = flags |
| 8673 | * size_t _written |
| 8674 | */ |
| 8675 | __pyx_t_7 = PyObject_LengthPyObject_Size(__pyx_v_buf); if (unlikely(__pyx_t_7 == -1)__builtin_expect(!!(__pyx_t_7 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__8675; goto __pyx_L1_error;} |
| 8676 | __pyx_v_length = __pyx_t_7; |
| 8677 | |
| 8678 | /* "rgw.pyx":673 |
| 8679 | * |
| 8680 | * size_t length = len(buf) |
| 8681 | * int _flags = flags # <<<<<<<<<<<<<< |
| 8682 | * size_t _written |
| 8683 | * |
| 8684 | */ |
| 8685 | __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__8685; goto __pyx_L1_error;} |
| 8686 | __pyx_v__flags = __pyx_t_8; |
| 8687 | |
| 8688 | /* "rgw.pyx":676 |
| 8689 | * size_t _written |
| 8690 | * |
| 8691 | * with nogil: # <<<<<<<<<<<<<< |
| 8692 | * ret = rgw_write(self.fs, _file_handler, _offset, length, &_written, |
| 8693 | * _data, _flags) |
| 8694 | */ |
| 8695 | { |
| 8696 | #ifdef WITH_THREAD1 |
| 8697 | PyThreadState *_save; |
| 8698 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 8699 | #endif |
| 8700 | /*try:*/ { |
| 8701 | |
| 8702 | /* "rgw.pyx":677 |
| 8703 | * |
| 8704 | * with nogil: |
| 8705 | * ret = rgw_write(self.fs, _file_handler, _offset, length, &_written, # <<<<<<<<<<<<<< |
| 8706 | * _data, _flags) |
| 8707 | * if ret < 0: |
| 8708 | */ |
| 8709 | __pyx_v_ret = rgw_write(__pyx_v_self->fs, __pyx_v__file_handler, __pyx_v__offset, __pyx_v_length, (&__pyx_v__written), __pyx_v__data, __pyx_v__flags); |
| 8710 | } |
| 8711 | |
| 8712 | /* "rgw.pyx":676 |
| 8713 | * size_t _written |
| 8714 | * |
| 8715 | * with nogil: # <<<<<<<<<<<<<< |
| 8716 | * ret = rgw_write(self.fs, _file_handler, _offset, length, &_written, |
| 8717 | * _data, _flags) |
| 8718 | */ |
| 8719 | /*finally:*/ { |
| 8720 | /*normal exit:*/{ |
| 8721 | #ifdef WITH_THREAD1 |
| 8722 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 8723 | #endif |
| 8724 | goto __pyx_L7; |
| 8725 | } |
| 8726 | __pyx_L7:; |
| 8727 | } |
| 8728 | } |
| 8729 | |
| 8730 | /* "rgw.pyx":679 |
| 8731 | * ret = rgw_write(self.fs, _file_handler, _offset, length, &_written, |
| 8732 | * _data, _flags) |
| 8733 | * if ret < 0: # <<<<<<<<<<<<<< |
| 8734 | * raise make_ex(ret, "error in write") |
| 8735 | * return ret |
| 8736 | */ |
| 8737 | __pyx_t_3 = ((__pyx_v_ret < 0) != 0); |
| 8738 | if (__pyx_t_3) { |
| 8739 | |
| 8740 | /* "rgw.pyx":680 |
| 8741 | * _data, _flags) |
| 8742 | * if ret < 0: |
| 8743 | * raise make_ex(ret, "error in write") # <<<<<<<<<<<<<< |
| 8744 | * return ret |
| 8745 | * |
| 8746 | */ |
| 8747 | __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 = 680; __pyx_clineno = __LINE__8747; goto __pyx_L1_error;} |
| 8748 | __Pyx_GOTREF(__pyx_t_2); |
| 8749 | __pyx_t_1 = __pyx_f_3rgw_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 = 680; __pyx_clineno = __LINE__8749; goto __pyx_L1_error;} |
| 8750 | __Pyx_GOTREF(__pyx_t_1); |
| 8751 | __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; |
| 8752 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 8753 | __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; |
| 8754 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__8754; goto __pyx_L1_error;} |
| 8755 | |
| 8756 | /* "rgw.pyx":679 |
| 8757 | * ret = rgw_write(self.fs, _file_handler, _offset, length, &_written, |
| 8758 | * _data, _flags) |
| 8759 | * if ret < 0: # <<<<<<<<<<<<<< |
| 8760 | * raise make_ex(ret, "error in write") |
| 8761 | * return ret |
| 8762 | */ |
| 8763 | } |
| 8764 | |
| 8765 | /* "rgw.pyx":681 |
| 8766 | * if ret < 0: |
| 8767 | * raise make_ex(ret, "error in write") |
| 8768 | * return ret # <<<<<<<<<<<<<< |
| 8769 | * |
| 8770 | * |
| 8771 | */ |
| 8772 | __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); |
| 8773 | __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 = 681; __pyx_clineno = __LINE__8773; goto __pyx_L1_error;} |
| 8774 | __Pyx_GOTREF(__pyx_t_1); |
| 8775 | __pyx_r = __pyx_t_1; |
| 8776 | __pyx_t_1 = 0; |
| 8777 | goto __pyx_L0; |
| 8778 | |
| 8779 | /* "rgw.pyx":660 |
| 8780 | * |
| 8781 | * |
| 8782 | * def write(self, FileHandle file_handler, offset, buf, flags = 0): # <<<<<<<<<<<<<< |
| 8783 | * self.require_state("mounted") |
| 8784 | * if not isinstance(buf, bytes): |
| 8785 | */ |
| 8786 | |
| 8787 | /* function exit code */ |
| 8788 | __pyx_L1_error:; |
| 8789 | __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); |
| 8790 | __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); |
| 8791 | __Pyx_AddTraceback("rgw.LibRGWFS.write", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 8792 | __pyx_r = NULL((void*)0); |
| 8793 | __pyx_L0:; |
| 8794 | __Pyx_XGIVEREF(__pyx_r); |
| 8795 | __Pyx_RefNannyFinishContext(); |
| 8796 | return __pyx_r; |
| 8797 | } |
| 8798 | |
| 8799 | /* "rgw.pyx":684 |
| 8800 | * |
| 8801 | * |
| 8802 | * def fsync(self, FileHandle handler, flags = 0): # <<<<<<<<<<<<<< |
| 8803 | * self.require_state("mounted") |
| 8804 | * |
| 8805 | */ |
| 8806 | |
| 8807 | /* Python wrapper */ |
| 8808 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_43fsync(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 8809 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_43fsync(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 8810 | struct __pyx_obj_3rgw_FileHandle *__pyx_v_handler = 0; |
| 8811 | PyObject *__pyx_v_flags = 0; |
| 8812 | int __pyx_lineno = 0; |
| 8813 | const char *__pyx_filename = NULL((void*)0); |
| 8814 | int __pyx_clineno = 0; |
| 8815 | PyObject *__pyx_r = 0; |
| 8816 | __Pyx_RefNannyDeclarations |
| 8817 | __Pyx_RefNannySetupContext("fsync (wrapper)", 0); |
| 8818 | { |
| 8819 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handler,&__pyx_n_s_flags,0}; |
| 8820 | PyObject* values[2] = {0,0}; |
| 8821 | values[1] = ((PyObject *)__pyx_int_0); |
| 8822 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 8823 | Py_ssize_t kw_args; |
| 8824 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 8825 | switch (pos_args) { |
| 8826 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 8827 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 8828 | case 0: break; |
| 8829 | default: goto __pyx_L5_argtuple_error; |
| 8830 | } |
| 8831 | kw_args = PyDict_Size(__pyx_kwds); |
| 8832 | switch (pos_args) { |
| 8833 | case 0: |
| 8834 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handler)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handler )) != 0), 1)) kw_args--; |
| 8835 | else goto __pyx_L5_argtuple_error; |
| 8836 | case 1: |
| 8837 | if (kw_args > 0) { |
| 8838 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); |
| 8839 | if (value) { values[1] = value; kw_args--; } |
| 8840 | } |
| 8841 | } |
| 8842 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 8843 | 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 = 684; __pyx_clineno = __LINE__8843; goto __pyx_L3_error;} |
| 8844 | } |
| 8845 | } else { |
| 8846 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 8847 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 8848 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 8849 | break; |
| 8850 | default: goto __pyx_L5_argtuple_error; |
| 8851 | } |
| 8852 | } |
| 8853 | __pyx_v_handler = ((struct __pyx_obj_3rgw_FileHandle *)values[0]); |
| 8854 | __pyx_v_flags = values[1]; |
| 8855 | } |
| 8856 | goto __pyx_L4_argument_unpacking_done; |
| 8857 | __pyx_L5_argtuple_error:; |
| 8858 | __Pyx_RaiseArgtupleInvalid("fsync", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__8858; goto __pyx_L3_error;} |
| 8859 | __pyx_L3_error:; |
| 8860 | __Pyx_AddTraceback("rgw.LibRGWFS.fsync", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 8861 | __Pyx_RefNannyFinishContext(); |
| 8862 | return NULL((void*)0); |
| 8863 | __pyx_L4_argument_unpacking_done:; |
| 8864 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handler), __pyx_ptype_3rgw_FileHandle, 1, "handler", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handler ), __pyx_ptype_3rgw_FileHandle, 1, "handler", 0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__8864; goto __pyx_L1_error;} |
| 8865 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_42fsync(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), __pyx_v_handler, __pyx_v_flags); |
| 8866 | |
| 8867 | /* function exit code */ |
| 8868 | goto __pyx_L0; |
| 8869 | __pyx_L1_error:; |
| 8870 | __pyx_r = NULL((void*)0); |
| 8871 | __pyx_L0:; |
| 8872 | __Pyx_RefNannyFinishContext(); |
| 8873 | return __pyx_r; |
| 8874 | } |
| 8875 | |
| 8876 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_42fsync(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, struct __pyx_obj_3rgw_FileHandle *__pyx_v_handler, PyObject *__pyx_v_flags) { |
| 8877 | struct rgw_file_handle *__pyx_v__file_handler; |
| 8878 | int __pyx_v__flags; |
| 8879 | int __pyx_v_ret; |
| 8880 | PyObject *__pyx_r = NULL((void*)0); |
| 8881 | __Pyx_RefNannyDeclarations |
| 8882 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 8883 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 8884 | int __pyx_t_3; |
| 8885 | int __pyx_t_4; |
| 8886 | int __pyx_lineno = 0; |
| 8887 | const char *__pyx_filename = NULL((void*)0); |
| 8888 | int __pyx_clineno = 0; |
| 8889 | __Pyx_RefNannySetupContext("fsync", 0); |
| 8890 | |
| 8891 | /* "rgw.pyx":685 |
| 8892 | * |
| 8893 | * def fsync(self, FileHandle handler, flags = 0): |
| 8894 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 8895 | * |
| 8896 | * cdef: |
| 8897 | */ |
| 8898 | __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 = 685; __pyx_clineno = __LINE__8898; goto __pyx_L1_error;} |
| 8899 | __Pyx_GOTREF(__pyx_t_1); |
| 8900 | __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 = 685; __pyx_clineno = __LINE__8900; goto __pyx_L1_error;} |
| 8901 | __Pyx_GOTREF(__pyx_t_2); |
| 8902 | __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; |
| 8903 | __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; |
| 8904 | |
| 8905 | /* "rgw.pyx":688 |
| 8906 | * |
| 8907 | * cdef: |
| 8908 | * rgw_file_handle *_file_handler = <rgw_file_handle*>handler.handler # <<<<<<<<<<<<<< |
| 8909 | * int _flags = flags |
| 8910 | * with nogil: |
| 8911 | */ |
| 8912 | __pyx_v__file_handler = ((struct rgw_file_handle *)__pyx_v_handler->handler); |
| 8913 | |
| 8914 | /* "rgw.pyx":689 |
| 8915 | * cdef: |
| 8916 | * rgw_file_handle *_file_handler = <rgw_file_handle*>handler.handler |
| 8917 | * int _flags = flags # <<<<<<<<<<<<<< |
| 8918 | * with nogil: |
| 8919 | * ret = rgw_fsync(self.fs, _file_handler, _flags) |
| 8920 | */ |
| 8921 | __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__8921; goto __pyx_L1_error;} |
| 8922 | __pyx_v__flags = __pyx_t_3; |
| 8923 | |
| 8924 | /* "rgw.pyx":690 |
| 8925 | * rgw_file_handle *_file_handler = <rgw_file_handle*>handler.handler |
| 8926 | * int _flags = flags |
| 8927 | * with nogil: # <<<<<<<<<<<<<< |
| 8928 | * ret = rgw_fsync(self.fs, _file_handler, _flags) |
| 8929 | * |
| 8930 | */ |
| 8931 | { |
| 8932 | #ifdef WITH_THREAD1 |
| 8933 | PyThreadState *_save; |
| 8934 | Py_UNBLOCK_THREADS_save = PyEval_SaveThread(); |
| 8935 | #endif |
| 8936 | /*try:*/ { |
| 8937 | |
| 8938 | /* "rgw.pyx":691 |
| 8939 | * int _flags = flags |
| 8940 | * with nogil: |
| 8941 | * ret = rgw_fsync(self.fs, _file_handler, _flags) # <<<<<<<<<<<<<< |
| 8942 | * |
| 8943 | * if ret < 0: |
| 8944 | */ |
| 8945 | __pyx_v_ret = rgw_fsync(__pyx_v_self->fs, __pyx_v__file_handler, __pyx_v__flags); |
| 8946 | } |
| 8947 | |
| 8948 | /* "rgw.pyx":690 |
| 8949 | * rgw_file_handle *_file_handler = <rgw_file_handle*>handler.handler |
| 8950 | * int _flags = flags |
| 8951 | * with nogil: # <<<<<<<<<<<<<< |
| 8952 | * ret = rgw_fsync(self.fs, _file_handler, _flags) |
| 8953 | * |
| 8954 | */ |
| 8955 | /*finally:*/ { |
| 8956 | /*normal exit:*/{ |
| 8957 | #ifdef WITH_THREAD1 |
| 8958 | Py_BLOCK_THREADSPyEval_RestoreThread(_save); |
| 8959 | #endif |
| 8960 | goto __pyx_L5; |
| 8961 | } |
| 8962 | __pyx_L5:; |
| 8963 | } |
| 8964 | } |
| 8965 | |
| 8966 | /* "rgw.pyx":693 |
| 8967 | * ret = rgw_fsync(self.fs, _file_handler, _flags) |
| 8968 | * |
| 8969 | * if ret < 0: # <<<<<<<<<<<<<< |
| 8970 | * raise make_ex(ret, "fsync failed") |
| 8971 | */ |
| 8972 | __pyx_t_4 = ((__pyx_v_ret < 0) != 0); |
| 8973 | if (__pyx_t_4) { |
| 8974 | |
| 8975 | /* "rgw.pyx":694 |
| 8976 | * |
| 8977 | * if ret < 0: |
| 8978 | * raise make_ex(ret, "fsync failed") # <<<<<<<<<<<<<< |
| 8979 | */ |
| 8980 | __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 = 694; __pyx_clineno = __LINE__8980; goto __pyx_L1_error;} |
| 8981 | __Pyx_GOTREF(__pyx_t_2); |
| 8982 | __pyx_t_1 = __pyx_f_3rgw_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 = 694; __pyx_clineno = __LINE__8982; goto __pyx_L1_error;} |
| 8983 | __Pyx_GOTREF(__pyx_t_1); |
| 8984 | __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; |
| 8985 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 8986 | __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; |
| 8987 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__8987; goto __pyx_L1_error;} |
| 8988 | |
| 8989 | /* "rgw.pyx":693 |
| 8990 | * ret = rgw_fsync(self.fs, _file_handler, _flags) |
| 8991 | * |
| 8992 | * if ret < 0: # <<<<<<<<<<<<<< |
| 8993 | * raise make_ex(ret, "fsync failed") |
| 8994 | */ |
| 8995 | } |
| 8996 | |
| 8997 | /* "rgw.pyx":684 |
| 8998 | * |
| 8999 | * |
| 9000 | * def fsync(self, FileHandle handler, flags = 0): # <<<<<<<<<<<<<< |
| 9001 | * self.require_state("mounted") |
| 9002 | * |
| 9003 | */ |
| 9004 | |
| 9005 | /* function exit code */ |
| 9006 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 9007 | goto __pyx_L0; |
| 9008 | __pyx_L1_error:; |
| 9009 | __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); |
| 9010 | __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); |
| 9011 | __Pyx_AddTraceback("rgw.LibRGWFS.fsync", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 9012 | __pyx_r = NULL((void*)0); |
| 9013 | __pyx_L0:; |
| 9014 | __Pyx_XGIVEREF(__pyx_r); |
| 9015 | __Pyx_RefNannyFinishContext(); |
| 9016 | return __pyx_r; |
| 9017 | } |
| 9018 | |
| 9019 | /* "rgw.pyx":333 |
| 9020 | * """librgwfs python wrapper""" |
| 9021 | * |
| 9022 | * cdef public object state # <<<<<<<<<<<<<< |
| 9023 | * cdef public object uid |
| 9024 | * cdef public object key |
| 9025 | */ |
| 9026 | |
| 9027 | /* Python wrapper */ |
| 9028 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_5state_1__get__(PyObject *__pyx_v_self); /*proto*/ |
| 9029 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_5state_1__get__(PyObject *__pyx_v_self) { |
| 9030 | PyObject *__pyx_r = 0; |
| 9031 | __Pyx_RefNannyDeclarations |
| 9032 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 9033 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_5state___get__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 9034 | |
| 9035 | /* function exit code */ |
| 9036 | __Pyx_RefNannyFinishContext(); |
| 9037 | return __pyx_r; |
| 9038 | } |
| 9039 | |
| 9040 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_5state___get__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 9041 | PyObject *__pyx_r = NULL((void*)0); |
| 9042 | __Pyx_RefNannyDeclarations |
| 9043 | __Pyx_RefNannySetupContext("__get__", 0); |
| 9044 | __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); |
| 9045 | __Pyx_INCREF(__pyx_v_self->state)( ((PyObject*)(__pyx_v_self->state))->ob_refcnt++); |
| 9046 | __pyx_r = __pyx_v_self->state; |
| 9047 | goto __pyx_L0; |
| 9048 | |
| 9049 | /* function exit code */ |
| 9050 | __pyx_L0:; |
| 9051 | __Pyx_XGIVEREF(__pyx_r); |
| 9052 | __Pyx_RefNannyFinishContext(); |
| 9053 | return __pyx_r; |
| 9054 | } |
| 9055 | |
| 9056 | /* Python wrapper */ |
| 9057 | static int __pyx_pw_3rgw_8LibRGWFS_5state_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ |
| 9058 | static int __pyx_pw_3rgw_8LibRGWFS_5state_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { |
| 9059 | int __pyx_r; |
| 9060 | __Pyx_RefNannyDeclarations |
| 9061 | __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); |
| 9062 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_5state_2__set__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), ((PyObject *)__pyx_v_value)); |
| 9063 | |
| 9064 | /* function exit code */ |
| 9065 | __Pyx_RefNannyFinishContext(); |
| 9066 | return __pyx_r; |
| 9067 | } |
| 9068 | |
| 9069 | static int __pyx_pf_3rgw_8LibRGWFS_5state_2__set__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_value) { |
| 9070 | int __pyx_r; |
| 9071 | __Pyx_RefNannyDeclarations |
| 9072 | __Pyx_RefNannySetupContext("__set__", 0); |
| 9073 | __Pyx_INCREF(__pyx_v_value)( ((PyObject*)(__pyx_v_value))->ob_refcnt++); |
| 9074 | __Pyx_GIVEREF(__pyx_v_value); |
| 9075 | __Pyx_GOTREF(__pyx_v_self->state); |
| 9076 | __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); |
| 9077 | __pyx_v_self->state = __pyx_v_value; |
| 9078 | |
| 9079 | /* function exit code */ |
| 9080 | __pyx_r = 0; |
| 9081 | __Pyx_RefNannyFinishContext(); |
| 9082 | return __pyx_r; |
| 9083 | } |
| 9084 | |
| 9085 | /* Python wrapper */ |
| 9086 | static int __pyx_pw_3rgw_8LibRGWFS_5state_5__del__(PyObject *__pyx_v_self); /*proto*/ |
| 9087 | static int __pyx_pw_3rgw_8LibRGWFS_5state_5__del__(PyObject *__pyx_v_self) { |
| 9088 | int __pyx_r; |
| 9089 | __Pyx_RefNannyDeclarations |
| 9090 | __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); |
| 9091 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_5state_4__del__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 9092 | |
| 9093 | /* function exit code */ |
| 9094 | __Pyx_RefNannyFinishContext(); |
| 9095 | return __pyx_r; |
| 9096 | } |
| 9097 | |
| 9098 | static int __pyx_pf_3rgw_8LibRGWFS_5state_4__del__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 9099 | int __pyx_r; |
| 9100 | __Pyx_RefNannyDeclarations |
| 9101 | __Pyx_RefNannySetupContext("__del__", 0); |
| 9102 | __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 9103 | __Pyx_GIVEREF(Py_None); |
| 9104 | __Pyx_GOTREF(__pyx_v_self->state); |
| 9105 | __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); |
| 9106 | __pyx_v_self->state = Py_None(&_Py_NoneStruct); |
| 9107 | |
| 9108 | /* function exit code */ |
| 9109 | __pyx_r = 0; |
| 9110 | __Pyx_RefNannyFinishContext(); |
| 9111 | return __pyx_r; |
| 9112 | } |
| 9113 | |
| 9114 | /* "rgw.pyx":334 |
| 9115 | * |
| 9116 | * cdef public object state |
| 9117 | * cdef public object uid # <<<<<<<<<<<<<< |
| 9118 | * cdef public object key |
| 9119 | * cdef public object secret |
| 9120 | */ |
| 9121 | |
| 9122 | /* Python wrapper */ |
| 9123 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_3uid_1__get__(PyObject *__pyx_v_self); /*proto*/ |
| 9124 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_3uid_1__get__(PyObject *__pyx_v_self) { |
| 9125 | PyObject *__pyx_r = 0; |
| 9126 | __Pyx_RefNannyDeclarations |
| 9127 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 9128 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_3uid___get__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 9129 | |
| 9130 | /* function exit code */ |
| 9131 | __Pyx_RefNannyFinishContext(); |
| 9132 | return __pyx_r; |
| 9133 | } |
| 9134 | |
| 9135 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_3uid___get__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 9136 | PyObject *__pyx_r = NULL((void*)0); |
| 9137 | __Pyx_RefNannyDeclarations |
| 9138 | __Pyx_RefNannySetupContext("__get__", 0); |
| 9139 | __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); |
| 9140 | __Pyx_INCREF(__pyx_v_self->uid)( ((PyObject*)(__pyx_v_self->uid))->ob_refcnt++); |
| 9141 | __pyx_r = __pyx_v_self->uid; |
| 9142 | goto __pyx_L0; |
| 9143 | |
| 9144 | /* function exit code */ |
| 9145 | __pyx_L0:; |
| 9146 | __Pyx_XGIVEREF(__pyx_r); |
| 9147 | __Pyx_RefNannyFinishContext(); |
| 9148 | return __pyx_r; |
| 9149 | } |
| 9150 | |
| 9151 | /* Python wrapper */ |
| 9152 | static int __pyx_pw_3rgw_8LibRGWFS_3uid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ |
| 9153 | static int __pyx_pw_3rgw_8LibRGWFS_3uid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { |
| 9154 | int __pyx_r; |
| 9155 | __Pyx_RefNannyDeclarations |
| 9156 | __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); |
| 9157 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_3uid_2__set__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), ((PyObject *)__pyx_v_value)); |
| 9158 | |
| 9159 | /* function exit code */ |
| 9160 | __Pyx_RefNannyFinishContext(); |
| 9161 | return __pyx_r; |
| 9162 | } |
| 9163 | |
| 9164 | static int __pyx_pf_3rgw_8LibRGWFS_3uid_2__set__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_value) { |
| 9165 | int __pyx_r; |
| 9166 | __Pyx_RefNannyDeclarations |
| 9167 | __Pyx_RefNannySetupContext("__set__", 0); |
| 9168 | __Pyx_INCREF(__pyx_v_value)( ((PyObject*)(__pyx_v_value))->ob_refcnt++); |
| 9169 | __Pyx_GIVEREF(__pyx_v_value); |
| 9170 | __Pyx_GOTREF(__pyx_v_self->uid); |
| 9171 | __Pyx_DECREF(__pyx_v_self->uid)do { if ( --((PyObject*)(__pyx_v_self->uid))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> uid)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_self->uid)))); } while (0); |
| 9172 | __pyx_v_self->uid = __pyx_v_value; |
| 9173 | |
| 9174 | /* function exit code */ |
| 9175 | __pyx_r = 0; |
| 9176 | __Pyx_RefNannyFinishContext(); |
| 9177 | return __pyx_r; |
| 9178 | } |
| 9179 | |
| 9180 | /* Python wrapper */ |
| 9181 | static int __pyx_pw_3rgw_8LibRGWFS_3uid_5__del__(PyObject *__pyx_v_self); /*proto*/ |
| 9182 | static int __pyx_pw_3rgw_8LibRGWFS_3uid_5__del__(PyObject *__pyx_v_self) { |
| 9183 | int __pyx_r; |
| 9184 | __Pyx_RefNannyDeclarations |
| 9185 | __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); |
| 9186 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_3uid_4__del__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 9187 | |
| 9188 | /* function exit code */ |
| 9189 | __Pyx_RefNannyFinishContext(); |
| 9190 | return __pyx_r; |
| 9191 | } |
| 9192 | |
| 9193 | static int __pyx_pf_3rgw_8LibRGWFS_3uid_4__del__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 9194 | int __pyx_r; |
| 9195 | __Pyx_RefNannyDeclarations |
| 9196 | __Pyx_RefNannySetupContext("__del__", 0); |
| 9197 | __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 9198 | __Pyx_GIVEREF(Py_None); |
| 9199 | __Pyx_GOTREF(__pyx_v_self->uid); |
| 9200 | __Pyx_DECREF(__pyx_v_self->uid)do { if ( --((PyObject*)(__pyx_v_self->uid))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> uid)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_self->uid)))); } while (0); |
| 9201 | __pyx_v_self->uid = Py_None(&_Py_NoneStruct); |
| 9202 | |
| 9203 | /* function exit code */ |
| 9204 | __pyx_r = 0; |
| 9205 | __Pyx_RefNannyFinishContext(); |
| 9206 | return __pyx_r; |
| 9207 | } |
| 9208 | |
| 9209 | /* "rgw.pyx":335 |
| 9210 | * cdef public object state |
| 9211 | * cdef public object uid |
| 9212 | * cdef public object key # <<<<<<<<<<<<<< |
| 9213 | * cdef public object secret |
| 9214 | * cdef librgw_t cluster |
| 9215 | */ |
| 9216 | |
| 9217 | /* Python wrapper */ |
| 9218 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_3key_1__get__(PyObject *__pyx_v_self); /*proto*/ |
| 9219 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_3key_1__get__(PyObject *__pyx_v_self) { |
| 9220 | PyObject *__pyx_r = 0; |
| 9221 | __Pyx_RefNannyDeclarations |
| 9222 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 9223 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_3key___get__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 9224 | |
| 9225 | /* function exit code */ |
| 9226 | __Pyx_RefNannyFinishContext(); |
| 9227 | return __pyx_r; |
| 9228 | } |
| 9229 | |
| 9230 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_3key___get__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 9231 | PyObject *__pyx_r = NULL((void*)0); |
| 9232 | __Pyx_RefNannyDeclarations |
| 9233 | __Pyx_RefNannySetupContext("__get__", 0); |
| 9234 | __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); |
| 9235 | __Pyx_INCREF(__pyx_v_self->key)( ((PyObject*)(__pyx_v_self->key))->ob_refcnt++); |
| 9236 | __pyx_r = __pyx_v_self->key; |
| 9237 | goto __pyx_L0; |
| 9238 | |
| 9239 | /* function exit code */ |
| 9240 | __pyx_L0:; |
| 9241 | __Pyx_XGIVEREF(__pyx_r); |
| 9242 | __Pyx_RefNannyFinishContext(); |
| 9243 | return __pyx_r; |
| 9244 | } |
| 9245 | |
| 9246 | /* Python wrapper */ |
| 9247 | static int __pyx_pw_3rgw_8LibRGWFS_3key_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ |
| 9248 | static int __pyx_pw_3rgw_8LibRGWFS_3key_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { |
| 9249 | int __pyx_r; |
| 9250 | __Pyx_RefNannyDeclarations |
| 9251 | __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); |
| 9252 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_3key_2__set__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), ((PyObject *)__pyx_v_value)); |
| 9253 | |
| 9254 | /* function exit code */ |
| 9255 | __Pyx_RefNannyFinishContext(); |
| 9256 | return __pyx_r; |
| 9257 | } |
| 9258 | |
| 9259 | static int __pyx_pf_3rgw_8LibRGWFS_3key_2__set__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_value) { |
| 9260 | int __pyx_r; |
| 9261 | __Pyx_RefNannyDeclarations |
| 9262 | __Pyx_RefNannySetupContext("__set__", 0); |
| 9263 | __Pyx_INCREF(__pyx_v_value)( ((PyObject*)(__pyx_v_value))->ob_refcnt++); |
| 9264 | __Pyx_GIVEREF(__pyx_v_value); |
| 9265 | __Pyx_GOTREF(__pyx_v_self->key); |
| 9266 | __Pyx_DECREF(__pyx_v_self->key)do { if ( --((PyObject*)(__pyx_v_self->key))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> key)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_self->key)))); } while (0); |
| 9267 | __pyx_v_self->key = __pyx_v_value; |
| 9268 | |
| 9269 | /* function exit code */ |
| 9270 | __pyx_r = 0; |
| 9271 | __Pyx_RefNannyFinishContext(); |
| 9272 | return __pyx_r; |
| 9273 | } |
| 9274 | |
| 9275 | /* Python wrapper */ |
| 9276 | static int __pyx_pw_3rgw_8LibRGWFS_3key_5__del__(PyObject *__pyx_v_self); /*proto*/ |
| 9277 | static int __pyx_pw_3rgw_8LibRGWFS_3key_5__del__(PyObject *__pyx_v_self) { |
| 9278 | int __pyx_r; |
| 9279 | __Pyx_RefNannyDeclarations |
| 9280 | __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); |
| 9281 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_3key_4__del__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 9282 | |
| 9283 | /* function exit code */ |
| 9284 | __Pyx_RefNannyFinishContext(); |
| 9285 | return __pyx_r; |
| 9286 | } |
| 9287 | |
| 9288 | static int __pyx_pf_3rgw_8LibRGWFS_3key_4__del__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 9289 | int __pyx_r; |
| 9290 | __Pyx_RefNannyDeclarations |
| 9291 | __Pyx_RefNannySetupContext("__del__", 0); |
| 9292 | __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 9293 | __Pyx_GIVEREF(Py_None); |
| 9294 | __Pyx_GOTREF(__pyx_v_self->key); |
| 9295 | __Pyx_DECREF(__pyx_v_self->key)do { if ( --((PyObject*)(__pyx_v_self->key))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> key)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_self->key)))); } while (0); |
| 9296 | __pyx_v_self->key = Py_None(&_Py_NoneStruct); |
| 9297 | |
| 9298 | /* function exit code */ |
| 9299 | __pyx_r = 0; |
| 9300 | __Pyx_RefNannyFinishContext(); |
| 9301 | return __pyx_r; |
| 9302 | } |
| 9303 | |
| 9304 | /* "rgw.pyx":336 |
| 9305 | * cdef public object uid |
| 9306 | * cdef public object key |
| 9307 | * cdef public object secret # <<<<<<<<<<<<<< |
| 9308 | * cdef librgw_t cluster |
| 9309 | * cdef rgw_fs *fs |
| 9310 | */ |
| 9311 | |
| 9312 | /* Python wrapper */ |
| 9313 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_6secret_1__get__(PyObject *__pyx_v_self); /*proto*/ |
| 9314 | static PyObject *__pyx_pw_3rgw_8LibRGWFS_6secret_1__get__(PyObject *__pyx_v_self) { |
| 9315 | PyObject *__pyx_r = 0; |
| 9316 | __Pyx_RefNannyDeclarations |
| 9317 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 9318 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_6secret___get__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 9319 | |
| 9320 | /* function exit code */ |
| 9321 | __Pyx_RefNannyFinishContext(); |
| 9322 | return __pyx_r; |
| 9323 | } |
| 9324 | |
| 9325 | static PyObject *__pyx_pf_3rgw_8LibRGWFS_6secret___get__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 9326 | PyObject *__pyx_r = NULL((void*)0); |
| 9327 | __Pyx_RefNannyDeclarations |
| 9328 | __Pyx_RefNannySetupContext("__get__", 0); |
| 9329 | __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); |
| 9330 | __Pyx_INCREF(__pyx_v_self->secret)( ((PyObject*)(__pyx_v_self->secret))->ob_refcnt++); |
| 9331 | __pyx_r = __pyx_v_self->secret; |
| 9332 | goto __pyx_L0; |
| 9333 | |
| 9334 | /* function exit code */ |
| 9335 | __pyx_L0:; |
| 9336 | __Pyx_XGIVEREF(__pyx_r); |
| 9337 | __Pyx_RefNannyFinishContext(); |
| 9338 | return __pyx_r; |
| 9339 | } |
| 9340 | |
| 9341 | /* Python wrapper */ |
| 9342 | static int __pyx_pw_3rgw_8LibRGWFS_6secret_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ |
| 9343 | static int __pyx_pw_3rgw_8LibRGWFS_6secret_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { |
| 9344 | int __pyx_r; |
| 9345 | __Pyx_RefNannyDeclarations |
| 9346 | __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); |
| 9347 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_6secret_2__set__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self), ((PyObject *)__pyx_v_value)); |
| 9348 | |
| 9349 | /* function exit code */ |
| 9350 | __Pyx_RefNannyFinishContext(); |
| 9351 | return __pyx_r; |
| 9352 | } |
| 9353 | |
| 9354 | static int __pyx_pf_3rgw_8LibRGWFS_6secret_2__set__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self, PyObject *__pyx_v_value) { |
| 9355 | int __pyx_r; |
| 9356 | __Pyx_RefNannyDeclarations |
| 9357 | __Pyx_RefNannySetupContext("__set__", 0); |
| 9358 | __Pyx_INCREF(__pyx_v_value)( ((PyObject*)(__pyx_v_value))->ob_refcnt++); |
| 9359 | __Pyx_GIVEREF(__pyx_v_value); |
| 9360 | __Pyx_GOTREF(__pyx_v_self->secret); |
| 9361 | __Pyx_DECREF(__pyx_v_self->secret)do { if ( --((PyObject*)(__pyx_v_self->secret))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> secret)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_self->secret)))); } while (0); |
| 9362 | __pyx_v_self->secret = __pyx_v_value; |
| 9363 | |
| 9364 | /* function exit code */ |
| 9365 | __pyx_r = 0; |
| 9366 | __Pyx_RefNannyFinishContext(); |
| 9367 | return __pyx_r; |
| 9368 | } |
| 9369 | |
| 9370 | /* Python wrapper */ |
| 9371 | static int __pyx_pw_3rgw_8LibRGWFS_6secret_5__del__(PyObject *__pyx_v_self); /*proto*/ |
| 9372 | static int __pyx_pw_3rgw_8LibRGWFS_6secret_5__del__(PyObject *__pyx_v_self) { |
| 9373 | int __pyx_r; |
| 9374 | __Pyx_RefNannyDeclarations |
| 9375 | __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); |
| 9376 | __pyx_r = __pyx_pf_3rgw_8LibRGWFS_6secret_4__del__(((struct __pyx_obj_3rgw_LibRGWFS *)__pyx_v_self)); |
| 9377 | |
| 9378 | /* function exit code */ |
| 9379 | __Pyx_RefNannyFinishContext(); |
| 9380 | return __pyx_r; |
| 9381 | } |
| 9382 | |
| 9383 | static int __pyx_pf_3rgw_8LibRGWFS_6secret_4__del__(struct __pyx_obj_3rgw_LibRGWFS *__pyx_v_self) { |
| 9384 | int __pyx_r; |
| 9385 | __Pyx_RefNannyDeclarations |
| 9386 | __Pyx_RefNannySetupContext("__del__", 0); |
| 9387 | __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 9388 | __Pyx_GIVEREF(Py_None); |
| 9389 | __Pyx_GOTREF(__pyx_v_self->secret); |
| 9390 | __Pyx_DECREF(__pyx_v_self->secret)do { if ( --((PyObject*)(__pyx_v_self->secret))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> secret)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_self->secret)))); } while (0); |
| 9391 | __pyx_v_self->secret = Py_None(&_Py_NoneStruct); |
| 9392 | |
| 9393 | /* function exit code */ |
| 9394 | __pyx_r = 0; |
| 9395 | __Pyx_RefNannyFinishContext(); |
| 9396 | return __pyx_r; |
| 9397 | } |
| 9398 | |
| 9399 | /* "array.pxd":91 |
| 9400 | * __data_union data |
| 9401 | * |
| 9402 | * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< |
| 9403 | * # This implementation of getbuffer is geared towards Cython |
| 9404 | * # requirements, and does not yet fullfill the PEP. |
| 9405 | */ |
| 9406 | |
| 9407 | /* Python wrapper */ |
| 9408 | static CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ |
| 9409 | static CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { |
| 9410 | int __pyx_r; |
| 9411 | __Pyx_RefNannyDeclarations |
| 9412 | __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); |
| 9413 | __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); |
| 9414 | |
| 9415 | /* function exit code */ |
| 9416 | __Pyx_RefNannyFinishContext(); |
| 9417 | return __pyx_r; |
| 9418 | } |
| 9419 | |
| 9420 | static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_v_flags) { |
| 9421 | PyObject *__pyx_v_item_count = NULL((void*)0); |
| 9422 | int __pyx_r; |
| 9423 | __Pyx_RefNannyDeclarations |
| 9424 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 9425 | char *__pyx_t_2; |
| 9426 | int __pyx_t_3; |
| 9427 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 9428 | Py_ssize_t __pyx_t_5; |
| 9429 | int __pyx_t_6; |
| 9430 | int __pyx_lineno = 0; |
| 9431 | const char *__pyx_filename = NULL((void*)0); |
| 9432 | int __pyx_clineno = 0; |
| 9433 | __Pyx_RefNannySetupContext("__getbuffer__", 0); |
| 9434 | if (__pyx_v_info != NULL((void*)0)) { |
| 9435 | __pyx_v_info->obj = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 9436 | __Pyx_GIVEREF(__pyx_v_info->obj); |
| 9437 | } |
| 9438 | |
| 9439 | /* "array.pxd":96 |
| 9440 | * # In particular strided access is always provided regardless |
| 9441 | * # of flags |
| 9442 | * item_count = Py_SIZE(self) # <<<<<<<<<<<<<< |
| 9443 | * |
| 9444 | * info.suboffsets = NULL |
| 9445 | */ |
| 9446 | __pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))(((PyVarObject*)(((PyObject *)__pyx_v_self)))->ob_size)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__9446; goto __pyx_L1_error;} |
| 9447 | __Pyx_GOTREF(__pyx_t_1); |
| 9448 | __pyx_v_item_count = __pyx_t_1; |
| 9449 | __pyx_t_1 = 0; |
| 9450 | |
| 9451 | /* "array.pxd":98 |
| 9452 | * item_count = Py_SIZE(self) |
| 9453 | * |
| 9454 | * info.suboffsets = NULL # <<<<<<<<<<<<<< |
| 9455 | * info.buf = self.data.as_chars |
| 9456 | * info.readonly = 0 |
| 9457 | */ |
| 9458 | __pyx_v_info->suboffsets = NULL((void*)0); |
| 9459 | |
| 9460 | /* "array.pxd":99 |
| 9461 | * |
| 9462 | * info.suboffsets = NULL |
| 9463 | * info.buf = self.data.as_chars # <<<<<<<<<<<<<< |
| 9464 | * info.readonly = 0 |
| 9465 | * info.ndim = 1 |
| 9466 | */ |
| 9467 | __pyx_t_2 = __pyx_v_self->data.as_chars; |
| 9468 | __pyx_v_info->buf = __pyx_t_2; |
| 9469 | |
| 9470 | /* "array.pxd":100 |
| 9471 | * info.suboffsets = NULL |
| 9472 | * info.buf = self.data.as_chars |
| 9473 | * info.readonly = 0 # <<<<<<<<<<<<<< |
| 9474 | * info.ndim = 1 |
| 9475 | * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) |
| 9476 | */ |
| 9477 | __pyx_v_info->readonly = 0; |
| 9478 | |
| 9479 | /* "array.pxd":101 |
| 9480 | * info.buf = self.data.as_chars |
| 9481 | * info.readonly = 0 |
| 9482 | * info.ndim = 1 # <<<<<<<<<<<<<< |
| 9483 | * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) |
| 9484 | * info.len = info.itemsize * item_count |
| 9485 | */ |
| 9486 | __pyx_v_info->ndim = 1; |
| 9487 | |
| 9488 | /* "array.pxd":102 |
| 9489 | * info.readonly = 0 |
| 9490 | * info.ndim = 1 |
| 9491 | * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) # <<<<<<<<<<<<<< |
| 9492 | * info.len = info.itemsize * item_count |
| 9493 | * |
| 9494 | */ |
| 9495 | __pyx_t_3 = __pyx_v_self->ob_descr->itemsize; |
| 9496 | __pyx_v_info->itemsize = __pyx_t_3; |
| 9497 | |
| 9498 | /* "array.pxd":103 |
| 9499 | * info.ndim = 1 |
| 9500 | * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) |
| 9501 | * info.len = info.itemsize * item_count # <<<<<<<<<<<<<< |
| 9502 | * |
| 9503 | * info.shape = <Py_ssize_t*> PyMem_Malloc(sizeof(Py_ssize_t) + 2) |
| 9504 | */ |
| 9505 | __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__9505; goto __pyx_L1_error;} |
| 9506 | __Pyx_GOTREF(__pyx_t_1); |
| 9507 | __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__9507; goto __pyx_L1_error;} |
| 9508 | __Pyx_GOTREF(__pyx_t_4); |
| 9509 | __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; |
| 9510 | __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__9510; goto __pyx_L1_error;} |
| 9511 | __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; |
| 9512 | __pyx_v_info->len = __pyx_t_5; |
| 9513 | |
| 9514 | /* "array.pxd":105 |
| 9515 | * info.len = info.itemsize * item_count |
| 9516 | * |
| 9517 | * info.shape = <Py_ssize_t*> PyMem_Malloc(sizeof(Py_ssize_t) + 2) # <<<<<<<<<<<<<< |
| 9518 | * if not info.shape: |
| 9519 | * raise MemoryError() |
| 9520 | */ |
| 9521 | __pyx_v_info->shape = ((Py_ssize_t *)PyMem_Malloc(((sizeof(Py_ssize_t)) + 2))); |
| 9522 | |
| 9523 | /* "array.pxd":106 |
| 9524 | * |
| 9525 | * info.shape = <Py_ssize_t*> PyMem_Malloc(sizeof(Py_ssize_t) + 2) |
| 9526 | * if not info.shape: # <<<<<<<<<<<<<< |
| 9527 | * raise MemoryError() |
| 9528 | * info.shape[0] = item_count # constant regardless of resizing |
| 9529 | */ |
| 9530 | __pyx_t_6 = ((!(__pyx_v_info->shape != 0)) != 0); |
| 9531 | if (__pyx_t_6) { |
| 9532 | |
| 9533 | /* "array.pxd":107 |
| 9534 | * info.shape = <Py_ssize_t*> PyMem_Malloc(sizeof(Py_ssize_t) + 2) |
| 9535 | * if not info.shape: |
| 9536 | * raise MemoryError() # <<<<<<<<<<<<<< |
| 9537 | * info.shape[0] = item_count # constant regardless of resizing |
| 9538 | * info.strides = &info.itemsize |
| 9539 | */ |
| 9540 | PyErr_NoMemory(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__9540; goto __pyx_L1_error;} |
| 9541 | |
| 9542 | /* "array.pxd":106 |
| 9543 | * |
| 9544 | * info.shape = <Py_ssize_t*> PyMem_Malloc(sizeof(Py_ssize_t) + 2) |
| 9545 | * if not info.shape: # <<<<<<<<<<<<<< |
| 9546 | * raise MemoryError() |
| 9547 | * info.shape[0] = item_count # constant regardless of resizing |
| 9548 | */ |
| 9549 | } |
| 9550 | |
| 9551 | /* "array.pxd":108 |
| 9552 | * if not info.shape: |
| 9553 | * raise MemoryError() |
| 9554 | * info.shape[0] = item_count # constant regardless of resizing # <<<<<<<<<<<<<< |
| 9555 | * info.strides = &info.itemsize |
| 9556 | * |
| 9557 | */ |
| 9558 | __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item_count); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__9558; goto __pyx_L1_error;} |
| 9559 | (__pyx_v_info->shape[0]) = __pyx_t_5; |
| 9560 | |
| 9561 | /* "array.pxd":109 |
| 9562 | * raise MemoryError() |
| 9563 | * info.shape[0] = item_count # constant regardless of resizing |
| 9564 | * info.strides = &info.itemsize # <<<<<<<<<<<<<< |
| 9565 | * |
| 9566 | * info.format = <char*> (info.shape + 1) |
| 9567 | */ |
| 9568 | __pyx_v_info->strides = (&__pyx_v_info->itemsize); |
| 9569 | |
| 9570 | /* "array.pxd":111 |
| 9571 | * info.strides = &info.itemsize |
| 9572 | * |
| 9573 | * info.format = <char*> (info.shape + 1) # <<<<<<<<<<<<<< |
| 9574 | * info.format[0] = self.ob_descr.typecode |
| 9575 | * info.format[1] = 0 |
| 9576 | */ |
| 9577 | __pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1)); |
| 9578 | |
| 9579 | /* "array.pxd":112 |
| 9580 | * |
| 9581 | * info.format = <char*> (info.shape + 1) |
| 9582 | * info.format[0] = self.ob_descr.typecode # <<<<<<<<<<<<<< |
| 9583 | * info.format[1] = 0 |
| 9584 | * info.obj = self |
| 9585 | */ |
| 9586 | __pyx_t_3 = __pyx_v_self->ob_descr->typecode; |
| 9587 | (__pyx_v_info->format[0]) = __pyx_t_3; |
| 9588 | |
| 9589 | /* "array.pxd":113 |
| 9590 | * info.format = <char*> (info.shape + 1) |
| 9591 | * info.format[0] = self.ob_descr.typecode |
| 9592 | * info.format[1] = 0 # <<<<<<<<<<<<<< |
| 9593 | * info.obj = self |
| 9594 | * |
| 9595 | */ |
| 9596 | (__pyx_v_info->format[1]) = 0; |
| 9597 | |
| 9598 | /* "array.pxd":114 |
| 9599 | * info.format[0] = self.ob_descr.typecode |
| 9600 | * info.format[1] = 0 |
| 9601 | * info.obj = self # <<<<<<<<<<<<<< |
| 9602 | * |
| 9603 | * def __releasebuffer__(self, Py_buffer* info): |
| 9604 | */ |
| 9605 | __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++); |
| 9606 | __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); |
| 9607 | __Pyx_GOTREF(__pyx_v_info->obj); |
| 9608 | __Pyx_DECREF(__pyx_v_info->obj)do { if ( --((PyObject*)(__pyx_v_info->obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_info-> obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_info->obj)))); } while (0); |
| 9609 | __pyx_v_info->obj = ((PyObject *)__pyx_v_self); |
| 9610 | |
| 9611 | /* "array.pxd":91 |
| 9612 | * __data_union data |
| 9613 | * |
| 9614 | * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< |
| 9615 | * # This implementation of getbuffer is geared towards Cython |
| 9616 | * # requirements, and does not yet fullfill the PEP. |
| 9617 | */ |
| 9618 | |
| 9619 | /* function exit code */ |
| 9620 | __pyx_r = 0; |
| 9621 | goto __pyx_L0; |
| 9622 | __pyx_L1_error:; |
| 9623 | __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); |
| 9624 | __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); |
| 9625 | __Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 9626 | __pyx_r = -1; |
| 9627 | if (__pyx_v_info != NULL((void*)0) && __pyx_v_info->obj != NULL((void*)0)) { |
| 9628 | __Pyx_GOTREF(__pyx_v_info->obj); |
| 9629 | __Pyx_DECREF(__pyx_v_info->obj)do { if ( --((PyObject*)(__pyx_v_info->obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_info-> obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_info->obj)))); } while (0); __pyx_v_info->obj = NULL((void*)0); |
| 9630 | } |
| 9631 | goto __pyx_L2; |
| 9632 | __pyx_L0:; |
| 9633 | if (__pyx_v_info != NULL((void*)0) && __pyx_v_info->obj == Py_None(&_Py_NoneStruct)) { |
| 9634 | __Pyx_GOTREF(Py_None); |
| 9635 | __Pyx_DECREF(Py_None)do { if ( --((PyObject*)((&_Py_NoneStruct)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((&_Py_NoneStruct ))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(( &_Py_NoneStruct))))); } while (0); __pyx_v_info->obj = NULL((void*)0); |
| 9636 | } |
| 9637 | __pyx_L2:; |
| 9638 | __Pyx_XDECREF(__pyx_v_item_count)do { if ((__pyx_v_item_count) == ((void*)0)) ; else do { if ( --((PyObject*)(__pyx_v_item_count))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_item_count)))->ob_type )->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_item_count )))); } while (0); } while (0); |
| 9639 | __Pyx_RefNannyFinishContext(); |
| 9640 | return __pyx_r; |
| 9641 | } |
| 9642 | |
| 9643 | /* "array.pxd":116 |
| 9644 | * info.obj = self |
| 9645 | * |
| 9646 | * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<< |
| 9647 | * PyMem_Free(info.shape) |
| 9648 | * |
| 9649 | */ |
| 9650 | |
| 9651 | /* Python wrapper */ |
| 9652 | static CYTHON_UNUSED__attribute__ ((__unused__)) void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ |
| 9653 | static CYTHON_UNUSED__attribute__ ((__unused__)) void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { |
| 9654 | __Pyx_RefNannyDeclarations |
| 9655 | __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); |
| 9656 | __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); |
| 9657 | |
| 9658 | /* function exit code */ |
| 9659 | __Pyx_RefNannyFinishContext(); |
| 9660 | } |
| 9661 | |
| 9662 | static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED__attribute__ ((__unused__)) arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) { |
| 9663 | __Pyx_RefNannyDeclarations |
| 9664 | __Pyx_RefNannySetupContext("__releasebuffer__", 0); |
| 9665 | |
| 9666 | /* "array.pxd":117 |
| 9667 | * |
| 9668 | * def __releasebuffer__(self, Py_buffer* info): |
| 9669 | * PyMem_Free(info.shape) # <<<<<<<<<<<<<< |
| 9670 | * |
| 9671 | * array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr) |
| 9672 | */ |
| 9673 | PyMem_Free(__pyx_v_info->shape); |
| 9674 | |
| 9675 | /* "array.pxd":116 |
| 9676 | * info.obj = self |
| 9677 | * |
| 9678 | * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<< |
| 9679 | * PyMem_Free(info.shape) |
| 9680 | * |
| 9681 | */ |
| 9682 | |
| 9683 | /* function exit code */ |
| 9684 | __Pyx_RefNannyFinishContext(); |
| 9685 | } |
| 9686 | |
| 9687 | /* "array.pxd":128 |
| 9688 | * |
| 9689 | * |
| 9690 | * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<< |
| 9691 | * """ fast creation of a new array, given a template array. |
| 9692 | * type will be same as template. |
| 9693 | */ |
| 9694 | |
| 9695 | static CYTHON_INLINE__inline__ arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, int __pyx_v_zero) { |
| 9696 | arrayobject *__pyx_v_op = NULL((void*)0); |
| 9697 | arrayobject *__pyx_r = NULL((void*)0); |
| 9698 | __Pyx_RefNannyDeclarations |
| 9699 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 9700 | int __pyx_t_2; |
| 9701 | int __pyx_t_3; |
| 9702 | int __pyx_t_4; |
| 9703 | int __pyx_lineno = 0; |
| 9704 | const char *__pyx_filename = NULL((void*)0); |
| 9705 | int __pyx_clineno = 0; |
| 9706 | __Pyx_RefNannySetupContext("clone", 0); |
| 9707 | |
| 9708 | /* "array.pxd":132 |
| 9709 | * type will be same as template. |
| 9710 | * if zero is true, new array will be initialized with zeroes.""" |
| 9711 | * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) # <<<<<<<<<<<<<< |
| 9712 | * if zero and op is not None: |
| 9713 | * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) |
| 9714 | */ |
| 9715 | __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_template))(((PyObject*)(((PyObject *)__pyx_v_template)))->ob_type), __pyx_v_length, __pyx_v_template->ob_descr)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__9715; goto __pyx_L1_error;} |
| 9716 | __Pyx_GOTREF(__pyx_t_1); |
| 9717 | __pyx_v_op = ((arrayobject *)__pyx_t_1); |
| 9718 | __pyx_t_1 = 0; |
| 9719 | |
| 9720 | /* "array.pxd":133 |
| 9721 | * if zero is true, new array will be initialized with zeroes.""" |
| 9722 | * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) |
| 9723 | * if zero and op is not None: # <<<<<<<<<<<<<< |
| 9724 | * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) |
| 9725 | * return op |
| 9726 | */ |
| 9727 | __pyx_t_3 = (__pyx_v_zero != 0); |
| 9728 | if (__pyx_t_3) { |
| 9729 | } else { |
| 9730 | __pyx_t_2 = __pyx_t_3; |
| 9731 | goto __pyx_L4_bool_binop_done; |
| 9732 | } |
| 9733 | __pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None(&_Py_NoneStruct)); |
| 9734 | __pyx_t_4 = (__pyx_t_3 != 0); |
| 9735 | __pyx_t_2 = __pyx_t_4; |
| 9736 | __pyx_L4_bool_binop_done:; |
| 9737 | if (__pyx_t_2) { |
| 9738 | |
| 9739 | /* "array.pxd":134 |
| 9740 | * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) |
| 9741 | * if zero and op is not None: |
| 9742 | * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) # <<<<<<<<<<<<<< |
| 9743 | * return op |
| 9744 | * |
| 9745 | */ |
| 9746 | memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize)); |
| 9747 | |
| 9748 | /* "array.pxd":133 |
| 9749 | * if zero is true, new array will be initialized with zeroes.""" |
| 9750 | * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) |
| 9751 | * if zero and op is not None: # <<<<<<<<<<<<<< |
| 9752 | * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) |
| 9753 | * return op |
| 9754 | */ |
| 9755 | } |
| 9756 | |
| 9757 | /* "array.pxd":135 |
| 9758 | * if zero and op is not None: |
| 9759 | * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) |
| 9760 | * return op # <<<<<<<<<<<<<< |
| 9761 | * |
| 9762 | * cdef inline array copy(array self): |
| 9763 | */ |
| 9764 | __Pyx_XDECREF(((PyObject *)__pyx_r))do { if ((((PyObject *)__pyx_r)) == ((void*)0)) ; else do { if ( --((PyObject*)(((PyObject *)__pyx_r)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject *)__pyx_r)) ))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(((PyObject *)__pyx_r))))); } while (0); } while (0); |
| 9765 | __Pyx_INCREF(((PyObject *)__pyx_v_op))( ((PyObject*)(((PyObject *)__pyx_v_op)))->ob_refcnt++); |
| 9766 | __pyx_r = __pyx_v_op; |
| 9767 | goto __pyx_L0; |
| 9768 | |
| 9769 | /* "array.pxd":128 |
| 9770 | * |
| 9771 | * |
| 9772 | * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<< |
| 9773 | * """ fast creation of a new array, given a template array. |
| 9774 | * type will be same as template. |
| 9775 | */ |
| 9776 | |
| 9777 | /* function exit code */ |
| 9778 | __pyx_L1_error:; |
| 9779 | __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); |
| 9780 | __Pyx_AddTraceback("cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 9781 | __pyx_r = 0; |
| 9782 | __pyx_L0:; |
| 9783 | __Pyx_XDECREF((PyObject *)__pyx_v_op)do { if (((PyObject *)__pyx_v_op) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_op))->ob_refcnt != 0 ) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_op )))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject *)__pyx_v_op)))); } while (0); } while (0); |
| 9784 | __Pyx_XGIVEREF((PyObject *)__pyx_r); |
| 9785 | __Pyx_RefNannyFinishContext(); |
| 9786 | return __pyx_r; |
| 9787 | } |
| 9788 | |
| 9789 | /* "array.pxd":137 |
| 9790 | * return op |
| 9791 | * |
| 9792 | * cdef inline array copy(array self): # <<<<<<<<<<<<<< |
| 9793 | * """ make a copy of an array. """ |
| 9794 | * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) |
| 9795 | */ |
| 9796 | |
| 9797 | static CYTHON_INLINE__inline__ arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) { |
| 9798 | arrayobject *__pyx_v_op = NULL((void*)0); |
| 9799 | arrayobject *__pyx_r = NULL((void*)0); |
| 9800 | __Pyx_RefNannyDeclarations |
| 9801 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 9802 | int __pyx_lineno = 0; |
| 9803 | const char *__pyx_filename = NULL((void*)0); |
| 9804 | int __pyx_clineno = 0; |
| 9805 | __Pyx_RefNannySetupContext("copy", 0); |
| 9806 | |
| 9807 | /* "array.pxd":139 |
| 9808 | * cdef inline array copy(array self): |
| 9809 | * """ make a copy of an array. """ |
| 9810 | * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) # <<<<<<<<<<<<<< |
| 9811 | * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) |
| 9812 | * return op |
| 9813 | */ |
| 9814 | __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_self))(((PyObject*)(((PyObject *)__pyx_v_self)))->ob_type), Py_SIZE(((PyObject *)__pyx_v_self))(((PyVarObject*)(((PyObject *)__pyx_v_self)))->ob_size), __pyx_v_self->ob_descr)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__9814; goto __pyx_L1_error;} |
| 9815 | __Pyx_GOTREF(__pyx_t_1); |
| 9816 | __pyx_v_op = ((arrayobject *)__pyx_t_1); |
| 9817 | __pyx_t_1 = 0; |
| 9818 | |
| 9819 | /* "array.pxd":140 |
| 9820 | * """ make a copy of an array. """ |
| 9821 | * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) |
| 9822 | * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) # <<<<<<<<<<<<<< |
| 9823 | * return op |
| 9824 | * |
| 9825 | */ |
| 9826 | memcpy(__pyx_v_op->data.as_chars, __pyx_v_self->data.as_chars, (Py_SIZE(((PyObject *)__pyx_v_op))(((PyVarObject*)(((PyObject *)__pyx_v_op)))->ob_size) * __pyx_v_op->ob_descr->itemsize)); |
| 9827 | |
| 9828 | /* "array.pxd":141 |
| 9829 | * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) |
| 9830 | * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) |
| 9831 | * return op # <<<<<<<<<<<<<< |
| 9832 | * |
| 9833 | * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: |
| 9834 | */ |
| 9835 | __Pyx_XDECREF(((PyObject *)__pyx_r))do { if ((((PyObject *)__pyx_r)) == ((void*)0)) ; else do { if ( --((PyObject*)(((PyObject *)__pyx_r)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject *)__pyx_r)) ))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(((PyObject *)__pyx_r))))); } while (0); } while (0); |
| 9836 | __Pyx_INCREF(((PyObject *)__pyx_v_op))( ((PyObject*)(((PyObject *)__pyx_v_op)))->ob_refcnt++); |
| 9837 | __pyx_r = __pyx_v_op; |
| 9838 | goto __pyx_L0; |
| 9839 | |
| 9840 | /* "array.pxd":137 |
| 9841 | * return op |
| 9842 | * |
| 9843 | * cdef inline array copy(array self): # <<<<<<<<<<<<<< |
| 9844 | * """ make a copy of an array. """ |
| 9845 | * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) |
| 9846 | */ |
| 9847 | |
| 9848 | /* function exit code */ |
| 9849 | __pyx_L1_error:; |
| 9850 | __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); |
| 9851 | __Pyx_AddTraceback("cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 9852 | __pyx_r = 0; |
| 9853 | __pyx_L0:; |
| 9854 | __Pyx_XDECREF((PyObject *)__pyx_v_op)do { if (((PyObject *)__pyx_v_op) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_op))->ob_refcnt != 0 ) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_op )))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject *)__pyx_v_op)))); } while (0); } while (0); |
| 9855 | __Pyx_XGIVEREF((PyObject *)__pyx_r); |
| 9856 | __Pyx_RefNannyFinishContext(); |
| 9857 | return __pyx_r; |
| 9858 | } |
| 9859 | |
| 9860 | /* "array.pxd":143 |
| 9861 | * return op |
| 9862 | * |
| 9863 | * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<< |
| 9864 | * """ efficent appending of new stuff of same type |
| 9865 | * (e.g. of same array type) |
| 9866 | */ |
| 9867 | |
| 9868 | static CYTHON_INLINE__inline__ int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) { |
| 9869 | Py_ssize_t __pyx_v_itemsize; |
| 9870 | Py_ssize_t __pyx_v_origsize; |
| 9871 | int __pyx_r; |
| 9872 | __Pyx_RefNannyDeclarations |
| 9873 | int __pyx_t_1; |
| 9874 | int __pyx_lineno = 0; |
| 9875 | const char *__pyx_filename = NULL((void*)0); |
| 9876 | int __pyx_clineno = 0; |
| 9877 | __Pyx_RefNannySetupContext("extend_buffer", 0); |
| 9878 | |
| 9879 | /* "array.pxd":147 |
| 9880 | * (e.g. of same array type) |
| 9881 | * n: number of elements (not number of bytes!) """ |
| 9882 | * cdef Py_ssize_t itemsize = self.ob_descr.itemsize # <<<<<<<<<<<<<< |
| 9883 | * cdef Py_ssize_t origsize = Py_SIZE(self) |
| 9884 | * resize_smart(self, origsize + n) |
| 9885 | */ |
| 9886 | __pyx_t_1 = __pyx_v_self->ob_descr->itemsize; |
| 9887 | __pyx_v_itemsize = __pyx_t_1; |
| 9888 | |
| 9889 | /* "array.pxd":148 |
| 9890 | * n: number of elements (not number of bytes!) """ |
| 9891 | * cdef Py_ssize_t itemsize = self.ob_descr.itemsize |
| 9892 | * cdef Py_ssize_t origsize = Py_SIZE(self) # <<<<<<<<<<<<<< |
| 9893 | * resize_smart(self, origsize + n) |
| 9894 | * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) |
| 9895 | */ |
| 9896 | __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self))(((PyVarObject*)(((PyObject *)__pyx_v_self)))->ob_size); |
| 9897 | |
| 9898 | /* "array.pxd":149 |
| 9899 | * cdef Py_ssize_t itemsize = self.ob_descr.itemsize |
| 9900 | * cdef Py_ssize_t origsize = Py_SIZE(self) |
| 9901 | * resize_smart(self, origsize + n) # <<<<<<<<<<<<<< |
| 9902 | * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) |
| 9903 | * return 0 |
| 9904 | */ |
| 9905 | __pyx_t_1 = resize_smart(__pyx_v_self, (__pyx_v_origsize + __pyx_v_n)); if (unlikely(__pyx_t_1 == -1)__builtin_expect(!!(__pyx_t_1 == -1), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__9905; goto __pyx_L1_error;} |
| 9906 | |
| 9907 | /* "array.pxd":150 |
| 9908 | * cdef Py_ssize_t origsize = Py_SIZE(self) |
| 9909 | * resize_smart(self, origsize + n) |
| 9910 | * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) # <<<<<<<<<<<<<< |
| 9911 | * return 0 |
| 9912 | * |
| 9913 | */ |
| 9914 | memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize)); |
| 9915 | |
| 9916 | /* "array.pxd":151 |
| 9917 | * resize_smart(self, origsize + n) |
| 9918 | * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) |
| 9919 | * return 0 # <<<<<<<<<<<<<< |
| 9920 | * |
| 9921 | * cdef inline int extend(array self, array other) except -1: |
| 9922 | */ |
| 9923 | __pyx_r = 0; |
| 9924 | goto __pyx_L0; |
| 9925 | |
| 9926 | /* "array.pxd":143 |
| 9927 | * return op |
| 9928 | * |
| 9929 | * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<< |
| 9930 | * """ efficent appending of new stuff of same type |
| 9931 | * (e.g. of same array type) |
| 9932 | */ |
| 9933 | |
| 9934 | /* function exit code */ |
| 9935 | __pyx_L1_error:; |
| 9936 | __Pyx_AddTraceback("cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 9937 | __pyx_r = -1; |
| 9938 | __pyx_L0:; |
| 9939 | __Pyx_RefNannyFinishContext(); |
| 9940 | return __pyx_r; |
| 9941 | } |
| 9942 | |
| 9943 | /* "array.pxd":153 |
| 9944 | * return 0 |
| 9945 | * |
| 9946 | * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<< |
| 9947 | * """ extend array with data from another array; types must match. """ |
| 9948 | * if self.ob_descr.typecode != other.ob_descr.typecode: |
| 9949 | */ |
| 9950 | |
| 9951 | static CYTHON_INLINE__inline__ int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) { |
| 9952 | int __pyx_r; |
| 9953 | __Pyx_RefNannyDeclarations |
| 9954 | int __pyx_t_1; |
| 9955 | int __pyx_t_2; |
| 9956 | int __pyx_lineno = 0; |
| 9957 | const char *__pyx_filename = NULL((void*)0); |
| 9958 | int __pyx_clineno = 0; |
| 9959 | __Pyx_RefNannySetupContext("extend", 0); |
| 9960 | |
| 9961 | /* "array.pxd":155 |
| 9962 | * cdef inline int extend(array self, array other) except -1: |
| 9963 | * """ extend array with data from another array; types must match. """ |
| 9964 | * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<< |
| 9965 | * PyErr_BadArgument() |
| 9966 | * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) |
| 9967 | */ |
| 9968 | __pyx_t_1 = ((__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode) != 0); |
| 9969 | if (__pyx_t_1) { |
| 9970 | |
| 9971 | /* "array.pxd":156 |
| 9972 | * """ extend array with data from another array; types must match. """ |
| 9973 | * if self.ob_descr.typecode != other.ob_descr.typecode: |
| 9974 | * PyErr_BadArgument() # <<<<<<<<<<<<<< |
| 9975 | * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) |
| 9976 | * |
| 9977 | */ |
| 9978 | __pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == 0)__builtin_expect(!!(__pyx_t_2 == 0), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__9978; goto __pyx_L1_error;} |
| 9979 | |
| 9980 | /* "array.pxd":155 |
| 9981 | * cdef inline int extend(array self, array other) except -1: |
| 9982 | * """ extend array with data from another array; types must match. """ |
| 9983 | * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<< |
| 9984 | * PyErr_BadArgument() |
| 9985 | * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) |
| 9986 | */ |
| 9987 | } |
| 9988 | |
| 9989 | /* "array.pxd":157 |
| 9990 | * if self.ob_descr.typecode != other.ob_descr.typecode: |
| 9991 | * PyErr_BadArgument() |
| 9992 | * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) # <<<<<<<<<<<<<< |
| 9993 | * |
| 9994 | * cdef inline void zero(array self): |
| 9995 | */ |
| 9996 | __pyx_t_2 = __pyx_f_7cpython_5array_extend_buffer(__pyx_v_self, __pyx_v_other->data.as_chars, Py_SIZE(((PyObject *)__pyx_v_other))(((PyVarObject*)(((PyObject *)__pyx_v_other)))->ob_size)); if (unlikely(__pyx_t_2 == -1)__builtin_expect(!!(__pyx_t_2 == -1), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__9996; goto __pyx_L1_error;} |
| 9997 | __pyx_r = __pyx_t_2; |
| 9998 | goto __pyx_L0; |
| 9999 | |
| 10000 | /* "array.pxd":153 |
| 10001 | * return 0 |
| 10002 | * |
| 10003 | * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<< |
| 10004 | * """ extend array with data from another array; types must match. """ |
| 10005 | * if self.ob_descr.typecode != other.ob_descr.typecode: |
| 10006 | */ |
| 10007 | |
| 10008 | /* function exit code */ |
| 10009 | __pyx_L1_error:; |
| 10010 | __Pyx_AddTraceback("cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 10011 | __pyx_r = -1; |
| 10012 | __pyx_L0:; |
| 10013 | __Pyx_RefNannyFinishContext(); |
| 10014 | return __pyx_r; |
| 10015 | } |
| 10016 | |
| 10017 | /* "array.pxd":159 |
| 10018 | * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) |
| 10019 | * |
| 10020 | * cdef inline void zero(array self): # <<<<<<<<<<<<<< |
| 10021 | * """ set all elements of array to zero. """ |
| 10022 | * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) |
| 10023 | */ |
| 10024 | |
| 10025 | static CYTHON_INLINE__inline__ void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) { |
| 10026 | __Pyx_RefNannyDeclarations |
| 10027 | __Pyx_RefNannySetupContext("zero", 0); |
| 10028 | |
| 10029 | /* "array.pxd":161 |
| 10030 | * cdef inline void zero(array self): |
| 10031 | * """ set all elements of array to zero. """ |
| 10032 | * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) # <<<<<<<<<<<<<< |
| 10033 | */ |
| 10034 | memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self))(((PyVarObject*)(((PyObject *)__pyx_v_self)))->ob_size) * __pyx_v_self->ob_descr->itemsize)); |
| 10035 | |
| 10036 | /* "array.pxd":159 |
| 10037 | * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) |
| 10038 | * |
| 10039 | * cdef inline void zero(array self): # <<<<<<<<<<<<<< |
| 10040 | * """ set all elements of array to zero. """ |
| 10041 | * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) |
| 10042 | */ |
| 10043 | |
| 10044 | /* function exit code */ |
| 10045 | __Pyx_RefNannyFinishContext(); |
| 10046 | } |
| 10047 | |
| 10048 | /* "View.MemoryView":118 |
| 10049 | * cdef bint dtype_is_object |
| 10050 | * |
| 10051 | * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< |
| 10052 | * mode="c", bint allocate_buffer=True): |
| 10053 | * |
| 10054 | */ |
| 10055 | |
| 10056 | /* Python wrapper */ |
| 10057 | static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 10058 | static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 10059 | PyObject *__pyx_v_shape = 0; |
| 10060 | Py_ssize_t __pyx_v_itemsize; |
| 10061 | PyObject *__pyx_v_format = 0; |
| 10062 | PyObject *__pyx_v_mode = 0; |
| 10063 | int __pyx_v_allocate_buffer; |
| 10064 | int __pyx_lineno = 0; |
| 10065 | const char *__pyx_filename = NULL((void*)0); |
| 10066 | int __pyx_clineno = 0; |
| 10067 | int __pyx_r; |
| 10068 | __Pyx_RefNannyDeclarations |
| 10069 | __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); |
| 10070 | { |
| 10071 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0}; |
| 10072 | PyObject* values[5] = {0,0,0,0,0}; |
| 10073 | values[3] = ((PyObject *)__pyx_n_s_c); |
| 10074 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 10075 | Py_ssize_t kw_args; |
| 10076 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 10077 | switch (pos_args) { |
| 10078 | case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]); |
| 10079 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 10080 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 10081 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 10082 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 10083 | case 0: break; |
| 10084 | default: goto __pyx_L5_argtuple_error; |
| 10085 | } |
| 10086 | kw_args = PyDict_Size(__pyx_kwds); |
| 10087 | switch (pos_args) { |
| 10088 | case 0: |
| 10089 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shape)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shape )) != 0), 1)) kw_args--; |
| 10090 | else goto __pyx_L5_argtuple_error; |
| 10091 | case 1: |
| 10092 | if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_itemsize)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_itemsize )) != 0), 1)) kw_args--; |
| 10093 | else { |
| 10094 | __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 118; __pyx_clineno = __LINE__10094; goto __pyx_L3_error;} |
| 10095 | } |
| 10096 | case 2: |
| 10097 | if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format )) != 0), 1)) kw_args--; |
| 10098 | else { |
| 10099 | __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 118; __pyx_clineno = __LINE__10099; goto __pyx_L3_error;} |
| 10100 | } |
| 10101 | case 3: |
| 10102 | if (kw_args > 0) { |
| 10103 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode); |
| 10104 | if (value) { values[3] = value; kw_args--; } |
| 10105 | } |
| 10106 | case 4: |
| 10107 | if (kw_args > 0) { |
| 10108 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_allocate_buffer); |
| 10109 | if (value) { values[4] = value; kw_args--; } |
| 10110 | } |
| 10111 | } |
| 10112 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 10113 | 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[2]; __pyx_lineno = 118; __pyx_clineno = __LINE__10113; goto __pyx_L3_error;} |
| 10114 | } |
| 10115 | } else { |
| 10116 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 10117 | case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]); |
| 10118 | case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]); |
| 10119 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 10120 | values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 10121 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 10122 | break; |
| 10123 | default: goto __pyx_L5_argtuple_error; |
| 10124 | } |
| 10125 | } |
| 10126 | __pyx_v_shape = ((PyObject*)values[0]); |
| 10127 | __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 118; __pyx_clineno = __LINE__10127; goto __pyx_L3_error;} |
| 10128 | __pyx_v_format = values[2]; |
| 10129 | __pyx_v_mode = values[3]; |
| 10130 | if (values[4]) { |
| 10131 | __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__10131; goto __pyx_L3_error;} |
| 10132 | } else { |
| 10133 | |
| 10134 | /* "View.MemoryView":119 |
| 10135 | * |
| 10136 | * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, |
| 10137 | * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<< |
| 10138 | * |
| 10139 | * cdef int idx |
| 10140 | */ |
| 10141 | __pyx_v_allocate_buffer = ((int)1); |
| 10142 | } |
| 10143 | } |
| 10144 | goto __pyx_L4_argument_unpacking_done; |
| 10145 | __pyx_L5_argtuple_error:; |
| 10146 | __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 118; __pyx_clineno = __LINE__10146; goto __pyx_L3_error;} |
| 10147 | __pyx_L3_error:; |
| 10148 | __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 10149 | __Pyx_RefNannyFinishContext(); |
| 10150 | return -1; |
| 10151 | __pyx_L4_argument_unpacking_done:; |
| 10152 | if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape ), (&PyTuple_Type), 1, "shape", 1)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 118; __pyx_clineno = __LINE__10152; goto __pyx_L1_error;} |
| 10153 | if (unlikely(((PyObject *)__pyx_v_format) == Py_None)__builtin_expect(!!(((PyObject *)__pyx_v_format) == (&_Py_NoneStruct )), 0)) { |
| 10154 | PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 118; __pyx_clineno = __LINE__10154; goto __pyx_L1_error;} |
| 10155 | } |
| 10156 | __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer); |
| 10157 | |
| 10158 | /* "View.MemoryView":118 |
| 10159 | * cdef bint dtype_is_object |
| 10160 | * |
| 10161 | * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< |
| 10162 | * mode="c", bint allocate_buffer=True): |
| 10163 | * |
| 10164 | */ |
| 10165 | |
| 10166 | /* function exit code */ |
| 10167 | goto __pyx_L0; |
| 10168 | __pyx_L1_error:; |
| 10169 | __pyx_r = -1; |
| 10170 | __pyx_L0:; |
| 10171 | __Pyx_RefNannyFinishContext(); |
| 10172 | return __pyx_r; |
| 10173 | } |
| 10174 | |
| 10175 | static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) { |
| 10176 | int __pyx_v_idx; |
| 10177 | Py_ssize_t __pyx_v_i; |
| 10178 | Py_ssize_t __pyx_v_dim; |
| 10179 | PyObject **__pyx_v_p; |
| 10180 | char __pyx_v_order; |
| 10181 | int __pyx_r; |
| 10182 | __Pyx_RefNannyDeclarations |
| 10183 | Py_ssize_t __pyx_t_1; |
| 10184 | int __pyx_t_2; |
| 10185 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 10186 | int __pyx_t_4; |
| 10187 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 10188 | char *__pyx_t_6; |
| 10189 | int __pyx_t_7; |
| 10190 | Py_ssize_t __pyx_t_8; |
| 10191 | PyObject *__pyx_t_9 = NULL((void*)0); |
| 10192 | PyObject *__pyx_t_10 = NULL((void*)0); |
| 10193 | int __pyx_lineno = 0; |
| 10194 | const char *__pyx_filename = NULL((void*)0); |
| 10195 | int __pyx_clineno = 0; |
| 10196 | __Pyx_RefNannySetupContext("__cinit__", 0); |
| 10197 | __Pyx_INCREF(__pyx_v_format)( ((PyObject*)(__pyx_v_format))->ob_refcnt++); |
| 10198 | |
| 10199 | /* "View.MemoryView":125 |
| 10200 | * cdef PyObject **p |
| 10201 | * |
| 10202 | * self.ndim = <int> len(shape) # <<<<<<<<<<<<<< |
| 10203 | * self.itemsize = itemsize |
| 10204 | * |
| 10205 | */ |
| 10206 | if (unlikely(__pyx_v_shape == Py_None)__builtin_expect(!!(__pyx_v_shape == (&_Py_NoneStruct)), 0 )) { |
| 10207 | PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); |
| 10208 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 125; __pyx_clineno = __LINE__10208; goto __pyx_L1_error;} |
| 10209 | } |
| 10210 | __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape)(((PyVarObject*)(__pyx_v_shape))->ob_size); if (unlikely(__pyx_t_1 == -1)__builtin_expect(!!(__pyx_t_1 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 125; __pyx_clineno = __LINE__10210; goto __pyx_L1_error;} |
| 10211 | __pyx_v_self->ndim = ((int)__pyx_t_1); |
| 10212 | |
| 10213 | /* "View.MemoryView":126 |
| 10214 | * |
| 10215 | * self.ndim = <int> len(shape) |
| 10216 | * self.itemsize = itemsize # <<<<<<<<<<<<<< |
| 10217 | * |
| 10218 | * if not self.ndim: |
| 10219 | */ |
| 10220 | __pyx_v_self->itemsize = __pyx_v_itemsize; |
| 10221 | |
| 10222 | /* "View.MemoryView":128 |
| 10223 | * self.itemsize = itemsize |
| 10224 | * |
| 10225 | * if not self.ndim: # <<<<<<<<<<<<<< |
| 10226 | * raise ValueError("Empty shape tuple for cython.array") |
| 10227 | * |
| 10228 | */ |
| 10229 | __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0); |
| 10230 | if (__pyx_t_2) { |
| 10231 | |
| 10232 | /* "View.MemoryView":129 |
| 10233 | * |
| 10234 | * if not self.ndim: |
| 10235 | * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<< |
| 10236 | * |
| 10237 | * if itemsize <= 0: |
| 10238 | */ |
| 10239 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 129; __pyx_clineno = __LINE__10239; goto __pyx_L1_error;} |
| 10240 | __Pyx_GOTREF(__pyx_t_3); |
| 10241 | __Pyx_Raise(__pyx_t_3, 0, 0, 0); |
| 10242 | __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; |
| 10243 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 129; __pyx_clineno = __LINE__10243; goto __pyx_L1_error;} |
| 10244 | |
| 10245 | /* "View.MemoryView":128 |
| 10246 | * self.itemsize = itemsize |
| 10247 | * |
| 10248 | * if not self.ndim: # <<<<<<<<<<<<<< |
| 10249 | * raise ValueError("Empty shape tuple for cython.array") |
| 10250 | * |
| 10251 | */ |
| 10252 | } |
| 10253 | |
| 10254 | /* "View.MemoryView":131 |
| 10255 | * raise ValueError("Empty shape tuple for cython.array") |
| 10256 | * |
| 10257 | * if itemsize <= 0: # <<<<<<<<<<<<<< |
| 10258 | * raise ValueError("itemsize <= 0 for cython.array") |
| 10259 | * |
| 10260 | */ |
| 10261 | __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0); |
| 10262 | if (__pyx_t_2) { |
| 10263 | |
| 10264 | /* "View.MemoryView":132 |
| 10265 | * |
| 10266 | * if itemsize <= 0: |
| 10267 | * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<< |
| 10268 | * |
| 10269 | * if not isinstance(format, bytes): |
| 10270 | */ |
| 10271 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 132; __pyx_clineno = __LINE__10271; goto __pyx_L1_error;} |
| 10272 | __Pyx_GOTREF(__pyx_t_3); |
| 10273 | __Pyx_Raise(__pyx_t_3, 0, 0, 0); |
| 10274 | __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; |
| 10275 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 132; __pyx_clineno = __LINE__10275; goto __pyx_L1_error;} |
| 10276 | |
| 10277 | /* "View.MemoryView":131 |
| 10278 | * raise ValueError("Empty shape tuple for cython.array") |
| 10279 | * |
| 10280 | * if itemsize <= 0: # <<<<<<<<<<<<<< |
| 10281 | * raise ValueError("itemsize <= 0 for cython.array") |
| 10282 | * |
| 10283 | */ |
| 10284 | } |
| 10285 | |
| 10286 | /* "View.MemoryView":134 |
| 10287 | * raise ValueError("itemsize <= 0 for cython.array") |
| 10288 | * |
| 10289 | * if not isinstance(format, bytes): # <<<<<<<<<<<<<< |
| 10290 | * format = format.encode('ASCII') |
| 10291 | * self._format = format # keep a reference to the byte string |
| 10292 | */ |
| 10293 | __pyx_t_2 = PyBytes_Check(__pyx_v_format)((((((PyObject*)(__pyx_v_format))->ob_type))->tp_flags & ((1L<<27))) != 0); |
| 10294 | __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0); |
| 10295 | if (__pyx_t_4) { |
| 10296 | |
| 10297 | /* "View.MemoryView":135 |
| 10298 | * |
| 10299 | * if not isinstance(format, bytes): |
| 10300 | * format = format.encode('ASCII') # <<<<<<<<<<<<<< |
| 10301 | * self._format = format # keep a reference to the byte string |
| 10302 | * self.format = self._format |
| 10303 | */ |
| 10304 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__10304; goto __pyx_L1_error;} |
| 10305 | __Pyx_GOTREF(__pyx_t_3); |
| 10306 | __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__25, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__10306; goto __pyx_L1_error;} |
| 10307 | __Pyx_GOTREF(__pyx_t_5); |
| 10308 | __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; |
| 10309 | __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_v_format; __pyx_v_format = __pyx_t_5; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type) ->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while ( 0); } while (0); |
| 10310 | __pyx_t_5 = 0; |
| 10311 | |
| 10312 | /* "View.MemoryView":134 |
| 10313 | * raise ValueError("itemsize <= 0 for cython.array") |
| 10314 | * |
| 10315 | * if not isinstance(format, bytes): # <<<<<<<<<<<<<< |
| 10316 | * format = format.encode('ASCII') |
| 10317 | * self._format = format # keep a reference to the byte string |
| 10318 | */ |
| 10319 | } |
| 10320 | |
| 10321 | /* "View.MemoryView":136 |
| 10322 | * if not isinstance(format, bytes): |
| 10323 | * format = format.encode('ASCII') |
| 10324 | * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<< |
| 10325 | * self.format = self._format |
| 10326 | * |
| 10327 | */ |
| 10328 | if (!(likely(PyBytes_CheckExact(__pyx_v_format))__builtin_expect(!!(((((PyObject*)(__pyx_v_format))->ob_type ) == &PyString_Type)), 1)||((__pyx_v_format) == Py_None(&_Py_NoneStruct))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)(((PyObject*)(__pyx_v_format))->ob_type)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 136; __pyx_clineno = __LINE__10328; goto __pyx_L1_error;} |
| 10329 | __pyx_t_5 = __pyx_v_format; |
| 10330 | __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); |
| 10331 | __Pyx_GIVEREF(__pyx_t_5); |
| 10332 | __Pyx_GOTREF(__pyx_v_self->_format); |
| 10333 | __Pyx_DECREF(__pyx_v_self->_format)do { if ( --((PyObject*)(__pyx_v_self->_format))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> _format)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_self->_format)))); } while (0); |
| 10334 | __pyx_v_self->_format = ((PyObject*)__pyx_t_5); |
| 10335 | __pyx_t_5 = 0; |
| 10336 | |
| 10337 | /* "View.MemoryView":137 |
| 10338 | * format = format.encode('ASCII') |
| 10339 | * self._format = format # keep a reference to the byte string |
| 10340 | * self.format = self._format # <<<<<<<<<<<<<< |
| 10341 | * |
| 10342 | * |
| 10343 | */ |
| 10344 | __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_self->_format); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred()) , 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__10344; goto __pyx_L1_error;} |
| 10345 | __pyx_v_self->format = __pyx_t_6; |
| 10346 | |
| 10347 | /* "View.MemoryView":140 |
| 10348 | * |
| 10349 | * |
| 10350 | * self._shape = <Py_ssize_t *> PyMem_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<< |
| 10351 | * self._strides = self._shape + self.ndim |
| 10352 | * |
| 10353 | */ |
| 10354 | __pyx_v_self->_shape = ((Py_ssize_t *)PyMem_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2))); |
| 10355 | |
| 10356 | /* "View.MemoryView":141 |
| 10357 | * |
| 10358 | * self._shape = <Py_ssize_t *> PyMem_Malloc(sizeof(Py_ssize_t)*self.ndim*2) |
| 10359 | * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<< |
| 10360 | * |
| 10361 | * if not self._shape: |
| 10362 | */ |
| 10363 | __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim); |
| 10364 | |
| 10365 | /* "View.MemoryView":143 |
| 10366 | * self._strides = self._shape + self.ndim |
| 10367 | * |
| 10368 | * if not self._shape: # <<<<<<<<<<<<<< |
| 10369 | * raise MemoryError("unable to allocate shape and strides.") |
| 10370 | * |
| 10371 | */ |
| 10372 | __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0); |
| 10373 | if (__pyx_t_4) { |
| 10374 | |
| 10375 | /* "View.MemoryView":144 |
| 10376 | * |
| 10377 | * if not self._shape: |
| 10378 | * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<< |
| 10379 | * |
| 10380 | * |
| 10381 | */ |
| 10382 | __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__26, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 144; __pyx_clineno = __LINE__10382; goto __pyx_L1_error;} |
| 10383 | __Pyx_GOTREF(__pyx_t_5); |
| 10384 | __Pyx_Raise(__pyx_t_5, 0, 0, 0); |
| 10385 | __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; |
| 10386 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 144; __pyx_clineno = __LINE__10386; goto __pyx_L1_error;} |
| 10387 | |
| 10388 | /* "View.MemoryView":143 |
| 10389 | * self._strides = self._shape + self.ndim |
| 10390 | * |
| 10391 | * if not self._shape: # <<<<<<<<<<<<<< |
| 10392 | * raise MemoryError("unable to allocate shape and strides.") |
| 10393 | * |
| 10394 | */ |
| 10395 | } |
| 10396 | |
| 10397 | /* "View.MemoryView":147 |
| 10398 | * |
| 10399 | * |
| 10400 | * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< |
| 10401 | * if dim <= 0: |
| 10402 | * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) |
| 10403 | */ |
| 10404 | __pyx_t_7 = 0; |
| 10405 | __pyx_t_5 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_1 = 0; |
| 10406 | for (;;) { |
| 10407 | if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_5)(((PyVarObject*)(__pyx_t_5))->ob_size)) break; |
| 10408 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 10409 | __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_1)(((PyTupleObject *)(__pyx_t_5))->ob_item[__pyx_t_1]); __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); __pyx_t_1++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 147; __pyx_clineno = __LINE__10409; goto __pyx_L1_error;} |
| 10410 | #else |
| 10411 | __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_1)( (((PyObject*)(__pyx_t_5))->ob_type)->tp_as_sequence-> sq_item(__pyx_t_5, __pyx_t_1) ); __pyx_t_1++; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 147; __pyx_clineno = __LINE__10411; goto __pyx_L1_error;} |
| 10412 | __Pyx_GOTREF(__pyx_t_3); |
| 10413 | #endif |
| 10414 | __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 147; __pyx_clineno = __LINE__10414; goto __pyx_L1_error;} |
| 10415 | __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; |
| 10416 | __pyx_v_dim = __pyx_t_8; |
| 10417 | __pyx_v_idx = __pyx_t_7; |
| 10418 | __pyx_t_7 = (__pyx_t_7 + 1); |
| 10419 | |
| 10420 | /* "View.MemoryView":148 |
| 10421 | * |
| 10422 | * for idx, dim in enumerate(shape): |
| 10423 | * if dim <= 0: # <<<<<<<<<<<<<< |
| 10424 | * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) |
| 10425 | * self._shape[idx] = dim |
| 10426 | */ |
| 10427 | __pyx_t_4 = ((__pyx_v_dim <= 0) != 0); |
| 10428 | if (__pyx_t_4) { |
| 10429 | |
| 10430 | /* "View.MemoryView":149 |
| 10431 | * for idx, dim in enumerate(shape): |
| 10432 | * if dim <= 0: |
| 10433 | * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<< |
| 10434 | * self._shape[idx] = dim |
| 10435 | * |
| 10436 | */ |
| 10437 | __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__10437; goto __pyx_L1_error;} |
| 10438 | __Pyx_GOTREF(__pyx_t_3); |
| 10439 | __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__10439; goto __pyx_L1_error;} |
| 10440 | __Pyx_GOTREF(__pyx_t_9); |
| 10441 | __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__10441; goto __pyx_L1_error;} |
| 10442 | __Pyx_GOTREF(__pyx_t_10); |
| 10443 | __Pyx_GIVEREF(__pyx_t_3); |
| 10444 | PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_3); |
| 10445 | __Pyx_GIVEREF(__pyx_t_9); |
| 10446 | PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[1] = __pyx_t_9); |
| 10447 | __pyx_t_3 = 0; |
| 10448 | __pyx_t_9 = 0; |
| 10449 | __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10)PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10 ); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__10449; goto __pyx_L1_error;} |
| 10450 | __Pyx_GOTREF(__pyx_t_9); |
| 10451 | __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; |
| 10452 | __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__10452; goto __pyx_L1_error;} |
| 10453 | __Pyx_GOTREF(__pyx_t_10); |
| 10454 | __Pyx_GIVEREF(__pyx_t_9); |
| 10455 | PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_9); |
| 10456 | __pyx_t_9 = 0; |
| 10457 | __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__10457; goto __pyx_L1_error;} |
| 10458 | __Pyx_GOTREF(__pyx_t_9); |
| 10459 | __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; |
| 10460 | __Pyx_Raise(__pyx_t_9, 0, 0, 0); |
| 10461 | __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; |
| 10462 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__10462; goto __pyx_L1_error;} |
| 10463 | |
| 10464 | /* "View.MemoryView":148 |
| 10465 | * |
| 10466 | * for idx, dim in enumerate(shape): |
| 10467 | * if dim <= 0: # <<<<<<<<<<<<<< |
| 10468 | * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) |
| 10469 | * self._shape[idx] = dim |
| 10470 | */ |
| 10471 | } |
| 10472 | |
| 10473 | /* "View.MemoryView":150 |
| 10474 | * if dim <= 0: |
| 10475 | * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) |
| 10476 | * self._shape[idx] = dim # <<<<<<<<<<<<<< |
| 10477 | * |
| 10478 | * cdef char order |
| 10479 | */ |
| 10480 | (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim; |
| 10481 | |
| 10482 | /* "View.MemoryView":147 |
| 10483 | * |
| 10484 | * |
| 10485 | * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< |
| 10486 | * if dim <= 0: |
| 10487 | * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) |
| 10488 | */ |
| 10489 | } |
| 10490 | __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; |
| 10491 | |
| 10492 | /* "View.MemoryView":153 |
| 10493 | * |
| 10494 | * cdef char order |
| 10495 | * if mode == 'fortran': # <<<<<<<<<<<<<< |
| 10496 | * order = b'F' |
| 10497 | * self.mode = u'fortran' |
| 10498 | */ |
| 10499 | __pyx_t_4 = (__Pyx_PyString_Equals__Pyx_PyBytes_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ2)); if (unlikely(__pyx_t_4 < 0)__builtin_expect(!!(__pyx_t_4 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 153; __pyx_clineno = __LINE__10499; goto __pyx_L1_error;} |
| 10500 | if (__pyx_t_4) { |
| 10501 | |
| 10502 | /* "View.MemoryView":154 |
| 10503 | * cdef char order |
| 10504 | * if mode == 'fortran': |
| 10505 | * order = b'F' # <<<<<<<<<<<<<< |
| 10506 | * self.mode = u'fortran' |
| 10507 | * elif mode == 'c': |
| 10508 | */ |
| 10509 | __pyx_v_order = 'F'; |
| 10510 | |
| 10511 | /* "View.MemoryView":155 |
| 10512 | * if mode == 'fortran': |
| 10513 | * order = b'F' |
| 10514 | * self.mode = u'fortran' # <<<<<<<<<<<<<< |
| 10515 | * elif mode == 'c': |
| 10516 | * order = b'C' |
| 10517 | */ |
| 10518 | __Pyx_INCREF(__pyx_n_u_fortran)( ((PyObject*)(__pyx_n_u_fortran))->ob_refcnt++); |
| 10519 | __Pyx_GIVEREF(__pyx_n_u_fortran); |
| 10520 | __Pyx_GOTREF(__pyx_v_self->mode); |
| 10521 | __Pyx_DECREF(__pyx_v_self->mode)do { if ( --((PyObject*)(__pyx_v_self->mode))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> mode)))->ob_type)->tp_dealloc)((PyObject *)((PyObject * )(__pyx_v_self->mode)))); } while (0); |
| 10522 | __pyx_v_self->mode = __pyx_n_u_fortran; |
| 10523 | |
| 10524 | /* "View.MemoryView":153 |
| 10525 | * |
| 10526 | * cdef char order |
| 10527 | * if mode == 'fortran': # <<<<<<<<<<<<<< |
| 10528 | * order = b'F' |
| 10529 | * self.mode = u'fortran' |
| 10530 | */ |
| 10531 | goto __pyx_L10; |
| 10532 | } |
| 10533 | |
| 10534 | /* "View.MemoryView":156 |
| 10535 | * order = b'F' |
| 10536 | * self.mode = u'fortran' |
| 10537 | * elif mode == 'c': # <<<<<<<<<<<<<< |
| 10538 | * order = b'C' |
| 10539 | * self.mode = u'c' |
| 10540 | */ |
| 10541 | __pyx_t_4 = (__Pyx_PyString_Equals__Pyx_PyBytes_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ2)); if (unlikely(__pyx_t_4 < 0)__builtin_expect(!!(__pyx_t_4 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 156; __pyx_clineno = __LINE__10541; goto __pyx_L1_error;} |
| 10542 | if (__pyx_t_4) { |
| 10543 | |
| 10544 | /* "View.MemoryView":157 |
| 10545 | * self.mode = u'fortran' |
| 10546 | * elif mode == 'c': |
| 10547 | * order = b'C' # <<<<<<<<<<<<<< |
| 10548 | * self.mode = u'c' |
| 10549 | * else: |
| 10550 | */ |
| 10551 | __pyx_v_order = 'C'; |
| 10552 | |
| 10553 | /* "View.MemoryView":158 |
| 10554 | * elif mode == 'c': |
| 10555 | * order = b'C' |
| 10556 | * self.mode = u'c' # <<<<<<<<<<<<<< |
| 10557 | * else: |
| 10558 | * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) |
| 10559 | */ |
| 10560 | __Pyx_INCREF(__pyx_n_u_c)( ((PyObject*)(__pyx_n_u_c))->ob_refcnt++); |
| 10561 | __Pyx_GIVEREF(__pyx_n_u_c); |
| 10562 | __Pyx_GOTREF(__pyx_v_self->mode); |
| 10563 | __Pyx_DECREF(__pyx_v_self->mode)do { if ( --((PyObject*)(__pyx_v_self->mode))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> mode)))->ob_type)->tp_dealloc)((PyObject *)((PyObject * )(__pyx_v_self->mode)))); } while (0); |
| 10564 | __pyx_v_self->mode = __pyx_n_u_c; |
| 10565 | |
| 10566 | /* "View.MemoryView":156 |
| 10567 | * order = b'F' |
| 10568 | * self.mode = u'fortran' |
| 10569 | * elif mode == 'c': # <<<<<<<<<<<<<< |
| 10570 | * order = b'C' |
| 10571 | * self.mode = u'c' |
| 10572 | */ |
| 10573 | goto __pyx_L10; |
| 10574 | } |
| 10575 | |
| 10576 | /* "View.MemoryView":160 |
| 10577 | * self.mode = u'c' |
| 10578 | * else: |
| 10579 | * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<< |
| 10580 | * |
| 10581 | * self.len = fill_contig_strides_array(self._shape, self._strides, |
| 10582 | */ |
| 10583 | /*else*/ { |
| 10584 | __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode)PyString_Format(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode ); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__10584; goto __pyx_L1_error;} |
| 10585 | __Pyx_GOTREF(__pyx_t_5); |
| 10586 | __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__10586; goto __pyx_L1_error;} |
| 10587 | __Pyx_GOTREF(__pyx_t_9); |
| 10588 | __Pyx_GIVEREF(__pyx_t_5); |
| 10589 | PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_5); |
| 10590 | __pyx_t_5 = 0; |
| 10591 | __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__10591; goto __pyx_L1_error;} |
| 10592 | __Pyx_GOTREF(__pyx_t_5); |
| 10593 | __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; |
| 10594 | __Pyx_Raise(__pyx_t_5, 0, 0, 0); |
| 10595 | __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; |
| 10596 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__10596; goto __pyx_L1_error;} |
| 10597 | } |
| 10598 | __pyx_L10:; |
| 10599 | |
| 10600 | /* "View.MemoryView":162 |
| 10601 | * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) |
| 10602 | * |
| 10603 | * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<< |
| 10604 | * itemsize, self.ndim, order) |
| 10605 | * |
| 10606 | */ |
| 10607 | __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order); |
| 10608 | |
| 10609 | /* "View.MemoryView":165 |
| 10610 | * itemsize, self.ndim, order) |
| 10611 | * |
| 10612 | * self.free_data = allocate_buffer # <<<<<<<<<<<<<< |
| 10613 | * self.dtype_is_object = format == b'O' |
| 10614 | * if allocate_buffer: |
| 10615 | */ |
| 10616 | __pyx_v_self->free_data = __pyx_v_allocate_buffer; |
| 10617 | |
| 10618 | /* "View.MemoryView":166 |
| 10619 | * |
| 10620 | * self.free_data = allocate_buffer |
| 10621 | * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<< |
| 10622 | * if allocate_buffer: |
| 10623 | * |
| 10624 | */ |
| 10625 | __pyx_t_5 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ2); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 166; __pyx_clineno = __LINE__10625; goto __pyx_L1_error;} |
| 10626 | __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_4 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 166; __pyx_clineno = __LINE__10626; goto __pyx_L1_error;} |
| 10627 | __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; |
| 10628 | __pyx_v_self->dtype_is_object = __pyx_t_4; |
| 10629 | |
| 10630 | /* "View.MemoryView":167 |
| 10631 | * self.free_data = allocate_buffer |
| 10632 | * self.dtype_is_object = format == b'O' |
| 10633 | * if allocate_buffer: # <<<<<<<<<<<<<< |
| 10634 | * |
| 10635 | * |
| 10636 | */ |
| 10637 | __pyx_t_4 = (__pyx_v_allocate_buffer != 0); |
| 10638 | if (__pyx_t_4) { |
| 10639 | |
| 10640 | /* "View.MemoryView":170 |
| 10641 | * |
| 10642 | * |
| 10643 | * self.data = <char *>malloc(self.len) # <<<<<<<<<<<<<< |
| 10644 | * if not self.data: |
| 10645 | * raise MemoryError("unable to allocate array data.") |
| 10646 | */ |
| 10647 | __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len)); |
| 10648 | |
| 10649 | /* "View.MemoryView":171 |
| 10650 | * |
| 10651 | * self.data = <char *>malloc(self.len) |
| 10652 | * if not self.data: # <<<<<<<<<<<<<< |
| 10653 | * raise MemoryError("unable to allocate array data.") |
| 10654 | * |
| 10655 | */ |
| 10656 | __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0); |
| 10657 | if (__pyx_t_4) { |
| 10658 | |
| 10659 | /* "View.MemoryView":172 |
| 10660 | * self.data = <char *>malloc(self.len) |
| 10661 | * if not self.data: |
| 10662 | * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<< |
| 10663 | * |
| 10664 | * if self.dtype_is_object: |
| 10665 | */ |
| 10666 | __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__27, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 172; __pyx_clineno = __LINE__10666; goto __pyx_L1_error;} |
| 10667 | __Pyx_GOTREF(__pyx_t_5); |
| 10668 | __Pyx_Raise(__pyx_t_5, 0, 0, 0); |
| 10669 | __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; |
| 10670 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 172; __pyx_clineno = __LINE__10670; goto __pyx_L1_error;} |
| 10671 | |
| 10672 | /* "View.MemoryView":171 |
| 10673 | * |
| 10674 | * self.data = <char *>malloc(self.len) |
| 10675 | * if not self.data: # <<<<<<<<<<<<<< |
| 10676 | * raise MemoryError("unable to allocate array data.") |
| 10677 | * |
| 10678 | */ |
| 10679 | } |
| 10680 | |
| 10681 | /* "View.MemoryView":174 |
| 10682 | * raise MemoryError("unable to allocate array data.") |
| 10683 | * |
| 10684 | * if self.dtype_is_object: # <<<<<<<<<<<<<< |
| 10685 | * p = <PyObject **> self.data |
| 10686 | * for i in range(self.len / itemsize): |
| 10687 | */ |
| 10688 | __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0); |
| 10689 | if (__pyx_t_4) { |
| 10690 | |
| 10691 | /* "View.MemoryView":175 |
| 10692 | * |
| 10693 | * if self.dtype_is_object: |
| 10694 | * p = <PyObject **> self.data # <<<<<<<<<<<<<< |
| 10695 | * for i in range(self.len / itemsize): |
| 10696 | * p[i] = Py_None |
| 10697 | */ |
| 10698 | __pyx_v_p = ((PyObject **)__pyx_v_self->data); |
| 10699 | |
| 10700 | /* "View.MemoryView":176 |
| 10701 | * if self.dtype_is_object: |
| 10702 | * p = <PyObject **> self.data |
| 10703 | * for i in range(self.len / itemsize): # <<<<<<<<<<<<<< |
| 10704 | * p[i] = Py_None |
| 10705 | * Py_INCREF(Py_None) |
| 10706 | */ |
| 10707 | if (unlikely(__pyx_v_itemsize == 0)__builtin_expect(!!(__pyx_v_itemsize == 0), 0)) { |
| 10708 | PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); |
| 10709 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 176; __pyx_clineno = __LINE__10709; goto __pyx_L1_error;} |
| 10710 | } |
| 10711 | else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)__builtin_expect(!!(__pyx_v_itemsize == (Py_ssize_t)-1), 0) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))__builtin_expect(!!((((__pyx_v_self->len) < 0) & (( unsigned long)(__pyx_v_self->len) == 0-(unsigned long)(__pyx_v_self ->len)))), 0)) { |
| 10712 | PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); |
| 10713 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 176; __pyx_clineno = __LINE__10713; goto __pyx_L1_error;} |
| 10714 | } |
| 10715 | __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize); |
| 10716 | for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { |
| 10717 | __pyx_v_i = __pyx_t_8; |
| 10718 | |
| 10719 | /* "View.MemoryView":177 |
| 10720 | * p = <PyObject **> self.data |
| 10721 | * for i in range(self.len / itemsize): |
| 10722 | * p[i] = Py_None # <<<<<<<<<<<<<< |
| 10723 | * Py_INCREF(Py_None) |
| 10724 | * |
| 10725 | */ |
| 10726 | (__pyx_v_p[__pyx_v_i]) = Py_None(&_Py_NoneStruct); |
| 10727 | |
| 10728 | /* "View.MemoryView":178 |
| 10729 | * for i in range(self.len / itemsize): |
| 10730 | * p[i] = Py_None |
| 10731 | * Py_INCREF(Py_None) # <<<<<<<<<<<<<< |
| 10732 | * |
| 10733 | * @cname('getbuffer') |
| 10734 | */ |
| 10735 | Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 10736 | } |
| 10737 | |
| 10738 | /* "View.MemoryView":174 |
| 10739 | * raise MemoryError("unable to allocate array data.") |
| 10740 | * |
| 10741 | * if self.dtype_is_object: # <<<<<<<<<<<<<< |
| 10742 | * p = <PyObject **> self.data |
| 10743 | * for i in range(self.len / itemsize): |
| 10744 | */ |
| 10745 | } |
| 10746 | |
| 10747 | /* "View.MemoryView":167 |
| 10748 | * self.free_data = allocate_buffer |
| 10749 | * self.dtype_is_object = format == b'O' |
| 10750 | * if allocate_buffer: # <<<<<<<<<<<<<< |
| 10751 | * |
| 10752 | * |
| 10753 | */ |
| 10754 | } |
| 10755 | |
| 10756 | /* "View.MemoryView":118 |
| 10757 | * cdef bint dtype_is_object |
| 10758 | * |
| 10759 | * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< |
| 10760 | * mode="c", bint allocate_buffer=True): |
| 10761 | * |
| 10762 | */ |
| 10763 | |
| 10764 | /* function exit code */ |
| 10765 | __pyx_r = 0; |
| 10766 | goto __pyx_L0; |
| 10767 | __pyx_L1_error:; |
| 10768 | __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); |
| 10769 | __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); |
| 10770 | __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); |
| 10771 | __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); |
| 10772 | __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 10773 | __pyx_r = -1; |
| 10774 | __pyx_L0:; |
| 10775 | __Pyx_XDECREF(__pyx_v_format)do { if ((__pyx_v_format) == ((void*)0)) ; else do { if ( --( (PyObject*)(__pyx_v_format))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(__pyx_v_format)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_format)))); } while (0); } while (0); |
| 10776 | __Pyx_RefNannyFinishContext(); |
| 10777 | return __pyx_r; |
| 10778 | } |
| 10779 | |
| 10780 | /* "View.MemoryView":181 |
| 10781 | * |
| 10782 | * @cname('getbuffer') |
| 10783 | * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< |
| 10784 | * cdef int bufmode = -1 |
| 10785 | * if self.mode == u"c": |
| 10786 | */ |
| 10787 | |
| 10788 | /* Python wrapper */ |
| 10789 | static CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ |
| 10790 | static CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { |
| 10791 | int __pyx_r; |
| 10792 | __Pyx_RefNannyDeclarations |
| 10793 | __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); |
| 10794 | __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); |
| 10795 | |
| 10796 | /* function exit code */ |
| 10797 | __Pyx_RefNannyFinishContext(); |
| 10798 | return __pyx_r; |
| 10799 | } |
| 10800 | |
| 10801 | static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { |
| 10802 | int __pyx_v_bufmode; |
| 10803 | int __pyx_r; |
| 10804 | __Pyx_RefNannyDeclarations |
| 10805 | int __pyx_t_1; |
| 10806 | int __pyx_t_2; |
| 10807 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 10808 | char *__pyx_t_4; |
| 10809 | Py_ssize_t __pyx_t_5; |
| 10810 | int __pyx_t_6; |
| 10811 | Py_ssize_t *__pyx_t_7; |
| 10812 | int __pyx_lineno = 0; |
| 10813 | const char *__pyx_filename = NULL((void*)0); |
| 10814 | int __pyx_clineno = 0; |
| 10815 | __Pyx_RefNannySetupContext("__getbuffer__", 0); |
| 10816 | if (__pyx_v_info != NULL((void*)0)) { |
| 10817 | __pyx_v_info->obj = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 10818 | __Pyx_GIVEREF(__pyx_v_info->obj); |
| 10819 | } |
| 10820 | |
| 10821 | /* "View.MemoryView":182 |
| 10822 | * @cname('getbuffer') |
| 10823 | * def __getbuffer__(self, Py_buffer *info, int flags): |
| 10824 | * cdef int bufmode = -1 # <<<<<<<<<<<<<< |
| 10825 | * if self.mode == u"c": |
| 10826 | * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10827 | */ |
| 10828 | __pyx_v_bufmode = -1; |
| 10829 | |
| 10830 | /* "View.MemoryView":183 |
| 10831 | * def __getbuffer__(self, Py_buffer *info, int flags): |
| 10832 | * cdef int bufmode = -1 |
| 10833 | * if self.mode == u"c": # <<<<<<<<<<<<<< |
| 10834 | * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10835 | * elif self.mode == u"fortran": |
| 10836 | */ |
| 10837 | __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ2)); if (unlikely(__pyx_t_1 < 0)__builtin_expect(!!(__pyx_t_1 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__10837; goto __pyx_L1_error;} |
| 10838 | __pyx_t_2 = (__pyx_t_1 != 0); |
| 10839 | if (__pyx_t_2) { |
| 10840 | |
| 10841 | /* "View.MemoryView":184 |
| 10842 | * cdef int bufmode = -1 |
| 10843 | * if self.mode == u"c": |
| 10844 | * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< |
| 10845 | * elif self.mode == u"fortran": |
| 10846 | * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10847 | */ |
| 10848 | __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS(0x0020 | (0x0010 | 0x0008)) | PyBUF_ANY_CONTIGUOUS(0x0080 | (0x0010 | 0x0008))); |
| 10849 | |
| 10850 | /* "View.MemoryView":183 |
| 10851 | * def __getbuffer__(self, Py_buffer *info, int flags): |
| 10852 | * cdef int bufmode = -1 |
| 10853 | * if self.mode == u"c": # <<<<<<<<<<<<<< |
| 10854 | * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10855 | * elif self.mode == u"fortran": |
| 10856 | */ |
| 10857 | goto __pyx_L3; |
| 10858 | } |
| 10859 | |
| 10860 | /* "View.MemoryView":185 |
| 10861 | * if self.mode == u"c": |
| 10862 | * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10863 | * elif self.mode == u"fortran": # <<<<<<<<<<<<<< |
| 10864 | * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10865 | * if not (flags & bufmode): |
| 10866 | */ |
| 10867 | __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ2)); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__10867; goto __pyx_L1_error;} |
| 10868 | __pyx_t_1 = (__pyx_t_2 != 0); |
| 10869 | if (__pyx_t_1) { |
| 10870 | |
| 10871 | /* "View.MemoryView":186 |
| 10872 | * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10873 | * elif self.mode == u"fortran": |
| 10874 | * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< |
| 10875 | * if not (flags & bufmode): |
| 10876 | * raise ValueError("Can only create a buffer that is contiguous in memory.") |
| 10877 | */ |
| 10878 | __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS(0x0040 | (0x0010 | 0x0008)) | PyBUF_ANY_CONTIGUOUS(0x0080 | (0x0010 | 0x0008))); |
| 10879 | |
| 10880 | /* "View.MemoryView":185 |
| 10881 | * if self.mode == u"c": |
| 10882 | * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10883 | * elif self.mode == u"fortran": # <<<<<<<<<<<<<< |
| 10884 | * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10885 | * if not (flags & bufmode): |
| 10886 | */ |
| 10887 | } |
| 10888 | __pyx_L3:; |
| 10889 | |
| 10890 | /* "View.MemoryView":187 |
| 10891 | * elif self.mode == u"fortran": |
| 10892 | * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10893 | * if not (flags & bufmode): # <<<<<<<<<<<<<< |
| 10894 | * raise ValueError("Can only create a buffer that is contiguous in memory.") |
| 10895 | * info.buf = self.data |
| 10896 | */ |
| 10897 | __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0); |
| 10898 | if (__pyx_t_1) { |
| 10899 | |
| 10900 | /* "View.MemoryView":188 |
| 10901 | * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10902 | * if not (flags & bufmode): |
| 10903 | * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<< |
| 10904 | * info.buf = self.data |
| 10905 | * info.len = self.len |
| 10906 | */ |
| 10907 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 188; __pyx_clineno = __LINE__10907; goto __pyx_L1_error;} |
| 10908 | __Pyx_GOTREF(__pyx_t_3); |
| 10909 | __Pyx_Raise(__pyx_t_3, 0, 0, 0); |
| 10910 | __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; |
| 10911 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 188; __pyx_clineno = __LINE__10911; goto __pyx_L1_error;} |
| 10912 | |
| 10913 | /* "View.MemoryView":187 |
| 10914 | * elif self.mode == u"fortran": |
| 10915 | * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 10916 | * if not (flags & bufmode): # <<<<<<<<<<<<<< |
| 10917 | * raise ValueError("Can only create a buffer that is contiguous in memory.") |
| 10918 | * info.buf = self.data |
| 10919 | */ |
| 10920 | } |
| 10921 | |
| 10922 | /* "View.MemoryView":189 |
| 10923 | * if not (flags & bufmode): |
| 10924 | * raise ValueError("Can only create a buffer that is contiguous in memory.") |
| 10925 | * info.buf = self.data # <<<<<<<<<<<<<< |
| 10926 | * info.len = self.len |
| 10927 | * info.ndim = self.ndim |
| 10928 | */ |
| 10929 | __pyx_t_4 = __pyx_v_self->data; |
| 10930 | __pyx_v_info->buf = __pyx_t_4; |
| 10931 | |
| 10932 | /* "View.MemoryView":190 |
| 10933 | * raise ValueError("Can only create a buffer that is contiguous in memory.") |
| 10934 | * info.buf = self.data |
| 10935 | * info.len = self.len # <<<<<<<<<<<<<< |
| 10936 | * info.ndim = self.ndim |
| 10937 | * info.shape = self._shape |
| 10938 | */ |
| 10939 | __pyx_t_5 = __pyx_v_self->len; |
| 10940 | __pyx_v_info->len = __pyx_t_5; |
| 10941 | |
| 10942 | /* "View.MemoryView":191 |
| 10943 | * info.buf = self.data |
| 10944 | * info.len = self.len |
| 10945 | * info.ndim = self.ndim # <<<<<<<<<<<<<< |
| 10946 | * info.shape = self._shape |
| 10947 | * info.strides = self._strides |
| 10948 | */ |
| 10949 | __pyx_t_6 = __pyx_v_self->ndim; |
| 10950 | __pyx_v_info->ndim = __pyx_t_6; |
| 10951 | |
| 10952 | /* "View.MemoryView":192 |
| 10953 | * info.len = self.len |
| 10954 | * info.ndim = self.ndim |
| 10955 | * info.shape = self._shape # <<<<<<<<<<<<<< |
| 10956 | * info.strides = self._strides |
| 10957 | * info.suboffsets = NULL |
| 10958 | */ |
| 10959 | __pyx_t_7 = __pyx_v_self->_shape; |
| 10960 | __pyx_v_info->shape = __pyx_t_7; |
| 10961 | |
| 10962 | /* "View.MemoryView":193 |
| 10963 | * info.ndim = self.ndim |
| 10964 | * info.shape = self._shape |
| 10965 | * info.strides = self._strides # <<<<<<<<<<<<<< |
| 10966 | * info.suboffsets = NULL |
| 10967 | * info.itemsize = self.itemsize |
| 10968 | */ |
| 10969 | __pyx_t_7 = __pyx_v_self->_strides; |
| 10970 | __pyx_v_info->strides = __pyx_t_7; |
| 10971 | |
| 10972 | /* "View.MemoryView":194 |
| 10973 | * info.shape = self._shape |
| 10974 | * info.strides = self._strides |
| 10975 | * info.suboffsets = NULL # <<<<<<<<<<<<<< |
| 10976 | * info.itemsize = self.itemsize |
| 10977 | * info.readonly = 0 |
| 10978 | */ |
| 10979 | __pyx_v_info->suboffsets = NULL((void*)0); |
| 10980 | |
| 10981 | /* "View.MemoryView":195 |
| 10982 | * info.strides = self._strides |
| 10983 | * info.suboffsets = NULL |
| 10984 | * info.itemsize = self.itemsize # <<<<<<<<<<<<<< |
| 10985 | * info.readonly = 0 |
| 10986 | * |
| 10987 | */ |
| 10988 | __pyx_t_5 = __pyx_v_self->itemsize; |
| 10989 | __pyx_v_info->itemsize = __pyx_t_5; |
| 10990 | |
| 10991 | /* "View.MemoryView":196 |
| 10992 | * info.suboffsets = NULL |
| 10993 | * info.itemsize = self.itemsize |
| 10994 | * info.readonly = 0 # <<<<<<<<<<<<<< |
| 10995 | * |
| 10996 | * if flags & PyBUF_FORMAT: |
| 10997 | */ |
| 10998 | __pyx_v_info->readonly = 0; |
| 10999 | |
| 11000 | /* "View.MemoryView":198 |
| 11001 | * info.readonly = 0 |
| 11002 | * |
| 11003 | * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< |
| 11004 | * info.format = self.format |
| 11005 | * else: |
| 11006 | */ |
| 11007 | __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT0x0004) != 0); |
| 11008 | if (__pyx_t_1) { |
| 11009 | |
| 11010 | /* "View.MemoryView":199 |
| 11011 | * |
| 11012 | * if flags & PyBUF_FORMAT: |
| 11013 | * info.format = self.format # <<<<<<<<<<<<<< |
| 11014 | * else: |
| 11015 | * info.format = NULL |
| 11016 | */ |
| 11017 | __pyx_t_4 = __pyx_v_self->format; |
| 11018 | __pyx_v_info->format = __pyx_t_4; |
| 11019 | |
| 11020 | /* "View.MemoryView":198 |
| 11021 | * info.readonly = 0 |
| 11022 | * |
| 11023 | * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< |
| 11024 | * info.format = self.format |
| 11025 | * else: |
| 11026 | */ |
| 11027 | goto __pyx_L5; |
| 11028 | } |
| 11029 | |
| 11030 | /* "View.MemoryView":201 |
| 11031 | * info.format = self.format |
| 11032 | * else: |
| 11033 | * info.format = NULL # <<<<<<<<<<<<<< |
| 11034 | * |
| 11035 | * info.obj = self |
| 11036 | */ |
| 11037 | /*else*/ { |
| 11038 | __pyx_v_info->format = NULL((void*)0); |
| 11039 | } |
| 11040 | __pyx_L5:; |
| 11041 | |
| 11042 | /* "View.MemoryView":203 |
| 11043 | * info.format = NULL |
| 11044 | * |
| 11045 | * info.obj = self # <<<<<<<<<<<<<< |
| 11046 | * |
| 11047 | * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") |
| 11048 | */ |
| 11049 | __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++); |
| 11050 | __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); |
| 11051 | __Pyx_GOTREF(__pyx_v_info->obj); |
| 11052 | __Pyx_DECREF(__pyx_v_info->obj)do { if ( --((PyObject*)(__pyx_v_info->obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_info-> obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_info->obj)))); } while (0); |
| 11053 | __pyx_v_info->obj = ((PyObject *)__pyx_v_self); |
| 11054 | |
| 11055 | /* "View.MemoryView":181 |
| 11056 | * |
| 11057 | * @cname('getbuffer') |
| 11058 | * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< |
| 11059 | * cdef int bufmode = -1 |
| 11060 | * if self.mode == u"c": |
| 11061 | */ |
| 11062 | |
| 11063 | /* function exit code */ |
| 11064 | __pyx_r = 0; |
| 11065 | goto __pyx_L0; |
| 11066 | __pyx_L1_error:; |
| 11067 | __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); |
| 11068 | __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 11069 | __pyx_r = -1; |
| 11070 | if (__pyx_v_info != NULL((void*)0) && __pyx_v_info->obj != NULL((void*)0)) { |
| 11071 | __Pyx_GOTREF(__pyx_v_info->obj); |
| 11072 | __Pyx_DECREF(__pyx_v_info->obj)do { if ( --((PyObject*)(__pyx_v_info->obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_info-> obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_info->obj)))); } while (0); __pyx_v_info->obj = NULL((void*)0); |
| 11073 | } |
| 11074 | goto __pyx_L2; |
| 11075 | __pyx_L0:; |
| 11076 | if (__pyx_v_info != NULL((void*)0) && __pyx_v_info->obj == Py_None(&_Py_NoneStruct)) { |
| 11077 | __Pyx_GOTREF(Py_None); |
| 11078 | __Pyx_DECREF(Py_None)do { if ( --((PyObject*)((&_Py_NoneStruct)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((&_Py_NoneStruct ))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(( &_Py_NoneStruct))))); } while (0); __pyx_v_info->obj = NULL((void*)0); |
| 11079 | } |
| 11080 | __pyx_L2:; |
| 11081 | __Pyx_RefNannyFinishContext(); |
| 11082 | return __pyx_r; |
| 11083 | } |
| 11084 | |
| 11085 | /* "View.MemoryView":207 |
| 11086 | * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") |
| 11087 | * |
| 11088 | * def __dealloc__(array self): # <<<<<<<<<<<<<< |
| 11089 | * if self.callback_free_data != NULL: |
| 11090 | * self.callback_free_data(self.data) |
| 11091 | */ |
| 11092 | |
| 11093 | /* Python wrapper */ |
| 11094 | static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/ |
| 11095 | static void __pyx_array___dealloc__(PyObject *__pyx_v_self) { |
| 11096 | __Pyx_RefNannyDeclarations |
| 11097 | __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); |
| 11098 | __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self)); |
| 11099 | |
| 11100 | /* function exit code */ |
| 11101 | __Pyx_RefNannyFinishContext(); |
| 11102 | } |
| 11103 | |
| 11104 | static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) { |
| 11105 | __Pyx_RefNannyDeclarations |
| 11106 | int __pyx_t_1; |
| 11107 | __Pyx_RefNannySetupContext("__dealloc__", 0); |
| 11108 | |
| 11109 | /* "View.MemoryView":208 |
| 11110 | * |
| 11111 | * def __dealloc__(array self): |
| 11112 | * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< |
| 11113 | * self.callback_free_data(self.data) |
| 11114 | * elif self.free_data: |
| 11115 | */ |
| 11116 | __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL((void*)0)) != 0); |
| 11117 | if (__pyx_t_1) { |
| 11118 | |
| 11119 | /* "View.MemoryView":209 |
| 11120 | * def __dealloc__(array self): |
| 11121 | * if self.callback_free_data != NULL: |
| 11122 | * self.callback_free_data(self.data) # <<<<<<<<<<<<<< |
| 11123 | * elif self.free_data: |
| 11124 | * if self.dtype_is_object: |
| 11125 | */ |
| 11126 | __pyx_v_self->callback_free_data(__pyx_v_self->data); |
| 11127 | |
| 11128 | /* "View.MemoryView":208 |
| 11129 | * |
| 11130 | * def __dealloc__(array self): |
| 11131 | * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< |
| 11132 | * self.callback_free_data(self.data) |
| 11133 | * elif self.free_data: |
| 11134 | */ |
| 11135 | goto __pyx_L3; |
| 11136 | } |
| 11137 | |
| 11138 | /* "View.MemoryView":210 |
| 11139 | * if self.callback_free_data != NULL: |
| 11140 | * self.callback_free_data(self.data) |
| 11141 | * elif self.free_data: # <<<<<<<<<<<<<< |
| 11142 | * if self.dtype_is_object: |
| 11143 | * refcount_objects_in_slice(self.data, self._shape, |
| 11144 | */ |
| 11145 | __pyx_t_1 = (__pyx_v_self->free_data != 0); |
| 11146 | if (__pyx_t_1) { |
| 11147 | |
| 11148 | /* "View.MemoryView":211 |
| 11149 | * self.callback_free_data(self.data) |
| 11150 | * elif self.free_data: |
| 11151 | * if self.dtype_is_object: # <<<<<<<<<<<<<< |
| 11152 | * refcount_objects_in_slice(self.data, self._shape, |
| 11153 | * self._strides, self.ndim, False) |
| 11154 | */ |
| 11155 | __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0); |
| 11156 | if (__pyx_t_1) { |
| 11157 | |
| 11158 | /* "View.MemoryView":212 |
| 11159 | * elif self.free_data: |
| 11160 | * if self.dtype_is_object: |
| 11161 | * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<< |
| 11162 | * self._strides, self.ndim, False) |
| 11163 | * free(self.data) |
| 11164 | */ |
| 11165 | __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0); |
| 11166 | |
| 11167 | /* "View.MemoryView":211 |
| 11168 | * self.callback_free_data(self.data) |
| 11169 | * elif self.free_data: |
| 11170 | * if self.dtype_is_object: # <<<<<<<<<<<<<< |
| 11171 | * refcount_objects_in_slice(self.data, self._shape, |
| 11172 | * self._strides, self.ndim, False) |
| 11173 | */ |
| 11174 | } |
| 11175 | |
| 11176 | /* "View.MemoryView":214 |
| 11177 | * refcount_objects_in_slice(self.data, self._shape, |
| 11178 | * self._strides, self.ndim, False) |
| 11179 | * free(self.data) # <<<<<<<<<<<<<< |
| 11180 | * PyMem_Free(self._shape) |
| 11181 | * |
| 11182 | */ |
| 11183 | free(__pyx_v_self->data); |
| 11184 | |
| 11185 | /* "View.MemoryView":210 |
| 11186 | * if self.callback_free_data != NULL: |
| 11187 | * self.callback_free_data(self.data) |
| 11188 | * elif self.free_data: # <<<<<<<<<<<<<< |
| 11189 | * if self.dtype_is_object: |
| 11190 | * refcount_objects_in_slice(self.data, self._shape, |
| 11191 | */ |
| 11192 | } |
| 11193 | __pyx_L3:; |
| 11194 | |
| 11195 | /* "View.MemoryView":215 |
| 11196 | * self._strides, self.ndim, False) |
| 11197 | * free(self.data) |
| 11198 | * PyMem_Free(self._shape) # <<<<<<<<<<<<<< |
| 11199 | * |
| 11200 | * property memview: |
| 11201 | */ |
| 11202 | PyMem_Free(__pyx_v_self->_shape); |
| 11203 | |
| 11204 | /* "View.MemoryView":207 |
| 11205 | * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") |
| 11206 | * |
| 11207 | * def __dealloc__(array self): # <<<<<<<<<<<<<< |
| 11208 | * if self.callback_free_data != NULL: |
| 11209 | * self.callback_free_data(self.data) |
| 11210 | */ |
| 11211 | |
| 11212 | /* function exit code */ |
| 11213 | __Pyx_RefNannyFinishContext(); |
| 11214 | } |
| 11215 | |
| 11216 | /* "View.MemoryView":219 |
| 11217 | * property memview: |
| 11218 | * @cname('get_memview') |
| 11219 | * def __get__(self): # <<<<<<<<<<<<<< |
| 11220 | * |
| 11221 | * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE |
| 11222 | */ |
| 11223 | |
| 11224 | /* Python wrapper */ |
| 11225 | static PyObject *get_memview(PyObject *__pyx_v_self); /*proto*/ |
| 11226 | static PyObject *get_memview(PyObject *__pyx_v_self) { |
| 11227 | PyObject *__pyx_r = 0; |
| 11228 | __Pyx_RefNannyDeclarations |
| 11229 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 11230 | __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self)); |
| 11231 | |
| 11232 | /* function exit code */ |
| 11233 | __Pyx_RefNannyFinishContext(); |
| 11234 | return __pyx_r; |
| 11235 | } |
| 11236 | |
| 11237 | static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) { |
| 11238 | int __pyx_v_flags; |
| 11239 | PyObject *__pyx_r = NULL((void*)0); |
| 11240 | __Pyx_RefNannyDeclarations |
| 11241 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 11242 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 11243 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 11244 | int __pyx_lineno = 0; |
| 11245 | const char *__pyx_filename = NULL((void*)0); |
| 11246 | int __pyx_clineno = 0; |
| 11247 | __Pyx_RefNannySetupContext("__get__", 0); |
| 11248 | |
| 11249 | /* "View.MemoryView":221 |
| 11250 | * def __get__(self): |
| 11251 | * |
| 11252 | * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<< |
| 11253 | * return memoryview(self, flags, self.dtype_is_object) |
| 11254 | * |
| 11255 | */ |
| 11256 | __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS(0x0080 | (0x0010 | 0x0008)) | PyBUF_FORMAT0x0004) | PyBUF_WRITABLE0x0001); |
| 11257 | |
| 11258 | /* "View.MemoryView":222 |
| 11259 | * |
| 11260 | * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE |
| 11261 | * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<< |
| 11262 | * |
| 11263 | * |
| 11264 | */ |
| 11265 | __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); |
| 11266 | __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__11266; goto __pyx_L1_error;} |
| 11267 | __Pyx_GOTREF(__pyx_t_1); |
| 11268 | __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object)((__pyx_v_self->dtype_is_object) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct)))->ob_refcnt++), ((PyObject *) & _Py_TrueStruct)) : (( ((PyObject*)(((PyObject *) &_Py_ZeroStruct )))->ob_refcnt++), ((PyObject *) &_Py_ZeroStruct))); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__11268; goto __pyx_L1_error;} |
| 11269 | __Pyx_GOTREF(__pyx_t_2); |
| 11270 | __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__11270; goto __pyx_L1_error;} |
| 11271 | __Pyx_GOTREF(__pyx_t_3); |
| 11272 | __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++); |
| 11273 | __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); |
| 11274 | PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = ((PyObject * )__pyx_v_self)); |
| 11275 | __Pyx_GIVEREF(__pyx_t_1); |
| 11276 | PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_t_1); |
| 11277 | __Pyx_GIVEREF(__pyx_t_2); |
| 11278 | PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[2] = __pyx_t_2); |
| 11279 | __pyx_t_1 = 0; |
| 11280 | __pyx_t_2 = 0; |
| 11281 | __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__11281; goto __pyx_L1_error;} |
| 11282 | __Pyx_GOTREF(__pyx_t_2); |
| 11283 | __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; |
| 11284 | __pyx_r = __pyx_t_2; |
| 11285 | __pyx_t_2 = 0; |
| 11286 | goto __pyx_L0; |
| 11287 | |
| 11288 | /* "View.MemoryView":219 |
| 11289 | * property memview: |
| 11290 | * @cname('get_memview') |
| 11291 | * def __get__(self): # <<<<<<<<<<<<<< |
| 11292 | * |
| 11293 | * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE |
| 11294 | */ |
| 11295 | |
| 11296 | /* function exit code */ |
| 11297 | __pyx_L1_error:; |
| 11298 | __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); |
| 11299 | __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); |
| 11300 | __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); |
| 11301 | __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 11302 | __pyx_r = NULL((void*)0); |
| 11303 | __pyx_L0:; |
| 11304 | __Pyx_XGIVEREF(__pyx_r); |
| 11305 | __Pyx_RefNannyFinishContext(); |
| 11306 | return __pyx_r; |
| 11307 | } |
| 11308 | |
| 11309 | /* "View.MemoryView":225 |
| 11310 | * |
| 11311 | * |
| 11312 | * def __getattr__(self, attr): # <<<<<<<<<<<<<< |
| 11313 | * return getattr(self.memview, attr) |
| 11314 | * |
| 11315 | */ |
| 11316 | |
| 11317 | /* Python wrapper */ |
| 11318 | static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/ |
| 11319 | static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) { |
| 11320 | PyObject *__pyx_r = 0; |
| 11321 | __Pyx_RefNannyDeclarations |
| 11322 | __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); |
| 11323 | __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr)); |
| 11324 | |
| 11325 | /* function exit code */ |
| 11326 | __Pyx_RefNannyFinishContext(); |
| 11327 | return __pyx_r; |
| 11328 | } |
| 11329 | |
| 11330 | static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) { |
| 11331 | PyObject *__pyx_r = NULL((void*)0); |
| 11332 | __Pyx_RefNannyDeclarations |
| 11333 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 11334 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 11335 | int __pyx_lineno = 0; |
| 11336 | const char *__pyx_filename = NULL((void*)0); |
| 11337 | int __pyx_clineno = 0; |
| 11338 | __Pyx_RefNannySetupContext("__getattr__", 0); |
| 11339 | |
| 11340 | /* "View.MemoryView":226 |
| 11341 | * |
| 11342 | * def __getattr__(self, attr): |
| 11343 | * return getattr(self.memview, attr) # <<<<<<<<<<<<<< |
| 11344 | * |
| 11345 | * def __getitem__(self, item): |
| 11346 | */ |
| 11347 | __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); |
| 11348 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 226; __pyx_clineno = __LINE__11348; goto __pyx_L1_error;} |
| 11349 | __Pyx_GOTREF(__pyx_t_1); |
| 11350 | __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 226; __pyx_clineno = __LINE__11350; goto __pyx_L1_error;} |
| 11351 | __Pyx_GOTREF(__pyx_t_2); |
| 11352 | __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; |
| 11353 | __pyx_r = __pyx_t_2; |
| 11354 | __pyx_t_2 = 0; |
| 11355 | goto __pyx_L0; |
| 11356 | |
| 11357 | /* "View.MemoryView":225 |
| 11358 | * |
| 11359 | * |
| 11360 | * def __getattr__(self, attr): # <<<<<<<<<<<<<< |
| 11361 | * return getattr(self.memview, attr) |
| 11362 | * |
| 11363 | */ |
| 11364 | |
| 11365 | /* function exit code */ |
| 11366 | __pyx_L1_error:; |
| 11367 | __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); |
| 11368 | __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); |
| 11369 | __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 11370 | __pyx_r = NULL((void*)0); |
| 11371 | __pyx_L0:; |
| 11372 | __Pyx_XGIVEREF(__pyx_r); |
| 11373 | __Pyx_RefNannyFinishContext(); |
| 11374 | return __pyx_r; |
| 11375 | } |
| 11376 | |
| 11377 | /* "View.MemoryView":228 |
| 11378 | * return getattr(self.memview, attr) |
| 11379 | * |
| 11380 | * def __getitem__(self, item): # <<<<<<<<<<<<<< |
| 11381 | * return self.memview[item] |
| 11382 | * |
| 11383 | */ |
| 11384 | |
| 11385 | /* Python wrapper */ |
| 11386 | static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ |
| 11387 | static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { |
| 11388 | PyObject *__pyx_r = 0; |
| 11389 | __Pyx_RefNannyDeclarations |
| 11390 | __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); |
| 11391 | __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item)); |
| 11392 | |
| 11393 | /* function exit code */ |
| 11394 | __Pyx_RefNannyFinishContext(); |
| 11395 | return __pyx_r; |
| 11396 | } |
| 11397 | |
| 11398 | static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) { |
| 11399 | PyObject *__pyx_r = NULL((void*)0); |
| 11400 | __Pyx_RefNannyDeclarations |
| 11401 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 11402 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 11403 | int __pyx_lineno = 0; |
| 11404 | const char *__pyx_filename = NULL((void*)0); |
| 11405 | int __pyx_clineno = 0; |
| 11406 | __Pyx_RefNannySetupContext("__getitem__", 0); |
| 11407 | |
| 11408 | /* "View.MemoryView":229 |
| 11409 | * |
| 11410 | * def __getitem__(self, item): |
| 11411 | * return self.memview[item] # <<<<<<<<<<<<<< |
| 11412 | * |
| 11413 | * def __setitem__(self, item, value): |
| 11414 | */ |
| 11415 | __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); |
| 11416 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__11416; goto __pyx_L1_error;} |
| 11417 | __Pyx_GOTREF(__pyx_t_1); |
| 11418 | __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__11418; goto __pyx_L1_error;}; |
| 11419 | __Pyx_GOTREF(__pyx_t_2); |
| 11420 | __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; |
| 11421 | __pyx_r = __pyx_t_2; |
| 11422 | __pyx_t_2 = 0; |
| 11423 | goto __pyx_L0; |
| 11424 | |
| 11425 | /* "View.MemoryView":228 |
| 11426 | * return getattr(self.memview, attr) |
| 11427 | * |
| 11428 | * def __getitem__(self, item): # <<<<<<<<<<<<<< |
| 11429 | * return self.memview[item] |
| 11430 | * |
| 11431 | */ |
| 11432 | |
| 11433 | /* function exit code */ |
| 11434 | __pyx_L1_error:; |
| 11435 | __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); |
| 11436 | __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); |
| 11437 | __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 11438 | __pyx_r = NULL((void*)0); |
| 11439 | __pyx_L0:; |
| 11440 | __Pyx_XGIVEREF(__pyx_r); |
| 11441 | __Pyx_RefNannyFinishContext(); |
| 11442 | return __pyx_r; |
| 11443 | } |
| 11444 | |
| 11445 | /* "View.MemoryView":231 |
| 11446 | * return self.memview[item] |
| 11447 | * |
| 11448 | * def __setitem__(self, item, value): # <<<<<<<<<<<<<< |
| 11449 | * self.memview[item] = value |
| 11450 | * |
| 11451 | */ |
| 11452 | |
| 11453 | /* Python wrapper */ |
| 11454 | static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/ |
| 11455 | static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { |
| 11456 | int __pyx_r; |
| 11457 | __Pyx_RefNannyDeclarations |
| 11458 | __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); |
| 11459 | __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value)); |
| 11460 | |
| 11461 | /* function exit code */ |
| 11462 | __Pyx_RefNannyFinishContext(); |
| 11463 | return __pyx_r; |
| 11464 | } |
| 11465 | |
| 11466 | static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { |
| 11467 | int __pyx_r; |
| 11468 | __Pyx_RefNannyDeclarations |
| 11469 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 11470 | int __pyx_lineno = 0; |
| 11471 | const char *__pyx_filename = NULL((void*)0); |
| 11472 | int __pyx_clineno = 0; |
| 11473 | __Pyx_RefNannySetupContext("__setitem__", 0); |
| 11474 | |
| 11475 | /* "View.MemoryView":232 |
| 11476 | * |
| 11477 | * def __setitem__(self, item, value): |
| 11478 | * self.memview[item] = value # <<<<<<<<<<<<<< |
| 11479 | * |
| 11480 | * |
| 11481 | */ |
| 11482 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __pyx_clineno = __LINE__11482; goto __pyx_L1_error;} |
| 11483 | __Pyx_GOTREF(__pyx_t_1); |
| 11484 | if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)__builtin_expect(!!(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __pyx_clineno = __LINE__11484; goto __pyx_L1_error;} |
| 11485 | __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; |
| 11486 | |
| 11487 | /* "View.MemoryView":231 |
| 11488 | * return self.memview[item] |
| 11489 | * |
| 11490 | * def __setitem__(self, item, value): # <<<<<<<<<<<<<< |
| 11491 | * self.memview[item] = value |
| 11492 | * |
| 11493 | */ |
| 11494 | |
| 11495 | /* function exit code */ |
| 11496 | __pyx_r = 0; |
| 11497 | goto __pyx_L0; |
| 11498 | __pyx_L1_error:; |
| 11499 | __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); |
| 11500 | __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 11501 | __pyx_r = -1; |
| 11502 | __pyx_L0:; |
| 11503 | __Pyx_RefNannyFinishContext(); |
| 11504 | return __pyx_r; |
| 11505 | } |
| 11506 | |
| 11507 | /* "View.MemoryView":236 |
| 11508 | * |
| 11509 | * @cname("__pyx_array_new") |
| 11510 | * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<< |
| 11511 | * char *mode, char *buf): |
| 11512 | * cdef array result |
| 11513 | */ |
| 11514 | |
| 11515 | static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) { |
| 11516 | struct __pyx_array_obj *__pyx_v_result = 0; |
| 11517 | struct __pyx_array_obj *__pyx_r = NULL((void*)0); |
| 11518 | __Pyx_RefNannyDeclarations |
| 11519 | int __pyx_t_1; |
| 11520 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 11521 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 11522 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 11523 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 11524 | int __pyx_lineno = 0; |
| 11525 | const char *__pyx_filename = NULL((void*)0); |
| 11526 | int __pyx_clineno = 0; |
| 11527 | __Pyx_RefNannySetupContext("array_cwrapper", 0); |
| 11528 | |
| 11529 | /* "View.MemoryView":240 |
| 11530 | * cdef array result |
| 11531 | * |
| 11532 | * if buf == NULL: # <<<<<<<<<<<<<< |
| 11533 | * result = array(shape, itemsize, format, mode.decode('ASCII')) |
| 11534 | * else: |
| 11535 | */ |
| 11536 | __pyx_t_1 = ((__pyx_v_buf == NULL((void*)0)) != 0); |
| 11537 | if (__pyx_t_1) { |
| 11538 | |
| 11539 | /* "View.MemoryView":241 |
| 11540 | * |
| 11541 | * if buf == NULL: |
| 11542 | * result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<< |
| 11543 | * else: |
| 11544 | * result = array(shape, itemsize, format, mode.decode('ASCII'), |
| 11545 | */ |
| 11546 | __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__11546; goto __pyx_L1_error;} |
| 11547 | __Pyx_GOTREF(__pyx_t_2); |
| 11548 | __pyx_t_3 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__11548; goto __pyx_L1_error;} |
| 11549 | __Pyx_GOTREF(__pyx_t_3); |
| 11550 | __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL((void*)0), NULL((void*)0), PyUnicode_DecodeASCIIPyUnicodeUCS4_DecodeASCII); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__11550; goto __pyx_L1_error;} |
| 11551 | __Pyx_GOTREF(__pyx_t_4); |
| 11552 | __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__11552; goto __pyx_L1_error;} |
| 11553 | __Pyx_GOTREF(__pyx_t_5); |
| 11554 | __Pyx_INCREF(__pyx_v_shape)( ((PyObject*)(__pyx_v_shape))->ob_refcnt++); |
| 11555 | __Pyx_GIVEREF(__pyx_v_shape); |
| 11556 | PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_v_shape ); |
| 11557 | __Pyx_GIVEREF(__pyx_t_2); |
| 11558 | PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_5))->ob_item[1] = __pyx_t_2); |
| 11559 | __Pyx_GIVEREF(__pyx_t_3); |
| 11560 | PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[2] = __pyx_t_3); |
| 11561 | __Pyx_GIVEREF(__pyx_t_4); |
| 11562 | PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4)(((PyTupleObject *)(__pyx_t_5))->ob_item[3] = __pyx_t_4); |
| 11563 | __pyx_t_2 = 0; |
| 11564 | __pyx_t_3 = 0; |
| 11565 | __pyx_t_4 = 0; |
| 11566 | __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__11566; goto __pyx_L1_error;} |
| 11567 | __Pyx_GOTREF(__pyx_t_4); |
| 11568 | __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; |
| 11569 | __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4); |
| 11570 | __pyx_t_4 = 0; |
| 11571 | |
| 11572 | /* "View.MemoryView":240 |
| 11573 | * cdef array result |
| 11574 | * |
| 11575 | * if buf == NULL: # <<<<<<<<<<<<<< |
| 11576 | * result = array(shape, itemsize, format, mode.decode('ASCII')) |
| 11577 | * else: |
| 11578 | */ |
| 11579 | goto __pyx_L3; |
| 11580 | } |
| 11581 | |
| 11582 | /* "View.MemoryView":243 |
| 11583 | * result = array(shape, itemsize, format, mode.decode('ASCII')) |
| 11584 | * else: |
| 11585 | * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<< |
| 11586 | * allocate_buffer=False) |
| 11587 | * result.data = buf |
| 11588 | */ |
| 11589 | /*else*/ { |
| 11590 | __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__11590; goto __pyx_L1_error;} |
| 11591 | __Pyx_GOTREF(__pyx_t_4); |
| 11592 | __pyx_t_5 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__11592; goto __pyx_L1_error;} |
| 11593 | __Pyx_GOTREF(__pyx_t_5); |
| 11594 | __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL((void*)0), NULL((void*)0), PyUnicode_DecodeASCIIPyUnicodeUCS4_DecodeASCII); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__11594; goto __pyx_L1_error;} |
| 11595 | __Pyx_GOTREF(__pyx_t_3); |
| 11596 | __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__11596; goto __pyx_L1_error;} |
| 11597 | __Pyx_GOTREF(__pyx_t_2); |
| 11598 | __Pyx_INCREF(__pyx_v_shape)( ((PyObject*)(__pyx_v_shape))->ob_refcnt++); |
| 11599 | __Pyx_GIVEREF(__pyx_v_shape); |
| 11600 | PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_shape ); |
| 11601 | __Pyx_GIVEREF(__pyx_t_4); |
| 11602 | PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_t_4); |
| 11603 | __Pyx_GIVEREF(__pyx_t_5); |
| 11604 | PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5)(((PyTupleObject *)(__pyx_t_2))->ob_item[2] = __pyx_t_5); |
| 11605 | __Pyx_GIVEREF(__pyx_t_3); |
| 11606 | PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3)(((PyTupleObject *)(__pyx_t_2))->ob_item[3] = __pyx_t_3); |
| 11607 | __pyx_t_4 = 0; |
| 11608 | __pyx_t_5 = 0; |
| 11609 | __pyx_t_3 = 0; |
| 11610 | |
| 11611 | /* "View.MemoryView":244 |
| 11612 | * else: |
| 11613 | * result = array(shape, itemsize, format, mode.decode('ASCII'), |
| 11614 | * allocate_buffer=False) # <<<<<<<<<<<<<< |
| 11615 | * result.data = buf |
| 11616 | * |
| 11617 | */ |
| 11618 | __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 244; __pyx_clineno = __LINE__11618; goto __pyx_L1_error;} |
| 11619 | __Pyx_GOTREF(__pyx_t_3); |
| 11620 | if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False((PyObject *) &_Py_ZeroStruct)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 244; __pyx_clineno = __LINE__11620; goto __pyx_L1_error;} |
| 11621 | |
| 11622 | /* "View.MemoryView":243 |
| 11623 | * result = array(shape, itemsize, format, mode.decode('ASCII')) |
| 11624 | * else: |
| 11625 | * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<< |
| 11626 | * allocate_buffer=False) |
| 11627 | * result.data = buf |
| 11628 | */ |
| 11629 | __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__11629; goto __pyx_L1_error;} |
| 11630 | __Pyx_GOTREF(__pyx_t_5); |
| 11631 | __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; |
| 11632 | __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; |
| 11633 | __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5); |
| 11634 | __pyx_t_5 = 0; |
| 11635 | |
| 11636 | /* "View.MemoryView":245 |
| 11637 | * result = array(shape, itemsize, format, mode.decode('ASCII'), |
| 11638 | * allocate_buffer=False) |
| 11639 | * result.data = buf # <<<<<<<<<<<<<< |
| 11640 | * |
| 11641 | * return result |
| 11642 | */ |
| 11643 | __pyx_v_result->data = __pyx_v_buf; |
| 11644 | } |
| 11645 | __pyx_L3:; |
| 11646 | |
| 11647 | /* "View.MemoryView":247 |
| 11648 | * result.data = buf |
| 11649 | * |
| 11650 | * return result # <<<<<<<<<<<<<< |
| 11651 | * |
| 11652 | * |
| 11653 | */ |
| 11654 | __Pyx_XDECREF(((PyObject *)__pyx_r))do { if ((((PyObject *)__pyx_r)) == ((void*)0)) ; else do { if ( --((PyObject*)(((PyObject *)__pyx_r)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject *)__pyx_r)) ))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(((PyObject *)__pyx_r))))); } while (0); } while (0); |
| 11655 | __Pyx_INCREF(((PyObject *)__pyx_v_result))( ((PyObject*)(((PyObject *)__pyx_v_result)))->ob_refcnt++ ); |
| 11656 | __pyx_r = __pyx_v_result; |
| 11657 | goto __pyx_L0; |
| 11658 | |
| 11659 | /* "View.MemoryView":236 |
| 11660 | * |
| 11661 | * @cname("__pyx_array_new") |
| 11662 | * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<< |
| 11663 | * char *mode, char *buf): |
| 11664 | * cdef array result |
| 11665 | */ |
| 11666 | |
| 11667 | /* function exit code */ |
| 11668 | __pyx_L1_error:; |
| 11669 | __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); |
| 11670 | __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); |
| 11671 | __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); |
| 11672 | __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); |
| 11673 | __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 11674 | __pyx_r = 0; |
| 11675 | __pyx_L0:; |
| 11676 | __Pyx_XDECREF((PyObject *)__pyx_v_result)do { if (((PyObject *)__pyx_v_result) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_result )))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject *)__pyx_v_result)))); } while (0); } while (0); |
| 11677 | __Pyx_XGIVEREF((PyObject *)__pyx_r); |
| 11678 | __Pyx_RefNannyFinishContext(); |
| 11679 | return __pyx_r; |
| 11680 | } |
| 11681 | |
| 11682 | /* "View.MemoryView":273 |
| 11683 | * cdef class Enum(object): |
| 11684 | * cdef object name |
| 11685 | * def __init__(self, name): # <<<<<<<<<<<<<< |
| 11686 | * self.name = name |
| 11687 | * def __repr__(self): |
| 11688 | */ |
| 11689 | |
| 11690 | /* Python wrapper */ |
| 11691 | static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 11692 | static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 11693 | PyObject *__pyx_v_name = 0; |
| 11694 | int __pyx_lineno = 0; |
| 11695 | const char *__pyx_filename = NULL((void*)0); |
| 11696 | int __pyx_clineno = 0; |
| 11697 | int __pyx_r; |
| 11698 | __Pyx_RefNannyDeclarations |
| 11699 | __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); |
| 11700 | { |
| 11701 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0}; |
| 11702 | PyObject* values[1] = {0}; |
| 11703 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 11704 | Py_ssize_t kw_args; |
| 11705 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 11706 | switch (pos_args) { |
| 11707 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 11708 | case 0: break; |
| 11709 | default: goto __pyx_L5_argtuple_error; |
| 11710 | } |
| 11711 | kw_args = PyDict_Size(__pyx_kwds); |
| 11712 | switch (pos_args) { |
| 11713 | case 0: |
| 11714 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name )) != 0), 1)) kw_args--; |
| 11715 | else goto __pyx_L5_argtuple_error; |
| 11716 | } |
| 11717 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 11718 | 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[2]; __pyx_lineno = 273; __pyx_clineno = __LINE__11718; goto __pyx_L3_error;} |
| 11719 | } |
| 11720 | } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) { |
| 11721 | goto __pyx_L5_argtuple_error; |
| 11722 | } else { |
| 11723 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 11724 | } |
| 11725 | __pyx_v_name = values[0]; |
| 11726 | } |
| 11727 | goto __pyx_L4_argument_unpacking_done; |
| 11728 | __pyx_L5_argtuple_error:; |
| 11729 | __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 273; __pyx_clineno = __LINE__11729; goto __pyx_L3_error;} |
| 11730 | __pyx_L3_error:; |
| 11731 | __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 11732 | __Pyx_RefNannyFinishContext(); |
| 11733 | return -1; |
| 11734 | __pyx_L4_argument_unpacking_done:; |
| 11735 | __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name); |
| 11736 | |
| 11737 | /* function exit code */ |
| 11738 | __Pyx_RefNannyFinishContext(); |
| 11739 | return __pyx_r; |
| 11740 | } |
| 11741 | |
| 11742 | static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) { |
| 11743 | int __pyx_r; |
| 11744 | __Pyx_RefNannyDeclarations |
| 11745 | __Pyx_RefNannySetupContext("__init__", 0); |
| 11746 | |
| 11747 | /* "View.MemoryView":274 |
| 11748 | * cdef object name |
| 11749 | * def __init__(self, name): |
| 11750 | * self.name = name # <<<<<<<<<<<<<< |
| 11751 | * def __repr__(self): |
| 11752 | * return self.name |
| 11753 | */ |
| 11754 | __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++); |
| 11755 | __Pyx_GIVEREF(__pyx_v_name); |
| 11756 | __Pyx_GOTREF(__pyx_v_self->name); |
| 11757 | __Pyx_DECREF(__pyx_v_self->name)do { if ( --((PyObject*)(__pyx_v_self->name))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> name)))->ob_type)->tp_dealloc)((PyObject *)((PyObject * )(__pyx_v_self->name)))); } while (0); |
| 11758 | __pyx_v_self->name = __pyx_v_name; |
| 11759 | |
| 11760 | /* "View.MemoryView":273 |
| 11761 | * cdef class Enum(object): |
| 11762 | * cdef object name |
| 11763 | * def __init__(self, name): # <<<<<<<<<<<<<< |
| 11764 | * self.name = name |
| 11765 | * def __repr__(self): |
| 11766 | */ |
| 11767 | |
| 11768 | /* function exit code */ |
| 11769 | __pyx_r = 0; |
| 11770 | __Pyx_RefNannyFinishContext(); |
| 11771 | return __pyx_r; |
| 11772 | } |
| 11773 | |
| 11774 | /* "View.MemoryView":275 |
| 11775 | * def __init__(self, name): |
| 11776 | * self.name = name |
| 11777 | * def __repr__(self): # <<<<<<<<<<<<<< |
| 11778 | * return self.name |
| 11779 | * |
| 11780 | */ |
| 11781 | |
| 11782 | /* Python wrapper */ |
| 11783 | static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/ |
| 11784 | static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) { |
| 11785 | PyObject *__pyx_r = 0; |
| 11786 | __Pyx_RefNannyDeclarations |
| 11787 | __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); |
| 11788 | __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); |
| 11789 | |
| 11790 | /* function exit code */ |
| 11791 | __Pyx_RefNannyFinishContext(); |
| 11792 | return __pyx_r; |
| 11793 | } |
| 11794 | |
| 11795 | static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { |
| 11796 | PyObject *__pyx_r = NULL((void*)0); |
| 11797 | __Pyx_RefNannyDeclarations |
| 11798 | __Pyx_RefNannySetupContext("__repr__", 0); |
| 11799 | |
| 11800 | /* "View.MemoryView":276 |
| 11801 | * self.name = name |
| 11802 | * def __repr__(self): |
| 11803 | * return self.name # <<<<<<<<<<<<<< |
| 11804 | * |
| 11805 | * cdef generic = Enum("<strided and direct or indirect>") |
| 11806 | */ |
| 11807 | __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); |
| 11808 | __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++); |
| 11809 | __pyx_r = __pyx_v_self->name; |
| 11810 | goto __pyx_L0; |
| 11811 | |
| 11812 | /* "View.MemoryView":275 |
| 11813 | * def __init__(self, name): |
| 11814 | * self.name = name |
| 11815 | * def __repr__(self): # <<<<<<<<<<<<<< |
| 11816 | * return self.name |
| 11817 | * |
| 11818 | */ |
| 11819 | |
| 11820 | /* function exit code */ |
| 11821 | __pyx_L0:; |
| 11822 | __Pyx_XGIVEREF(__pyx_r); |
| 11823 | __Pyx_RefNannyFinishContext(); |
| 11824 | return __pyx_r; |
| 11825 | } |
| 11826 | |
| 11827 | /* "View.MemoryView":290 |
| 11828 | * |
| 11829 | * @cname('__pyx_align_pointer') |
| 11830 | * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<< |
| 11831 | * "Align pointer memory on a given boundary" |
| 11832 | * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory |
| 11833 | */ |
| 11834 | |
| 11835 | static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) { |
| 11836 | Py_intptr_t __pyx_v_aligned_p; |
| 11837 | size_t __pyx_v_offset; |
| 11838 | void *__pyx_r; |
| 11839 | int __pyx_t_1; |
| 11840 | |
| 11841 | /* "View.MemoryView":292 |
| 11842 | * cdef void *align_pointer(void *memory, size_t alignment) nogil: |
| 11843 | * "Align pointer memory on a given boundary" |
| 11844 | * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory # <<<<<<<<<<<<<< |
| 11845 | * cdef size_t offset |
| 11846 | * |
| 11847 | */ |
| 11848 | __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory); |
| 11849 | |
| 11850 | /* "View.MemoryView":296 |
| 11851 | * |
| 11852 | * with cython.cdivision(True): |
| 11853 | * offset = aligned_p % alignment # <<<<<<<<<<<<<< |
| 11854 | * |
| 11855 | * if offset > 0: |
| 11856 | */ |
| 11857 | __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment); |
| 11858 | |
| 11859 | /* "View.MemoryView":298 |
| 11860 | * offset = aligned_p % alignment |
| 11861 | * |
| 11862 | * if offset > 0: # <<<<<<<<<<<<<< |
| 11863 | * aligned_p += alignment - offset |
| 11864 | * |
| 11865 | */ |
| 11866 | __pyx_t_1 = ((__pyx_v_offset > 0) != 0); |
| 11867 | if (__pyx_t_1) { |
| 11868 | |
| 11869 | /* "View.MemoryView":299 |
| 11870 | * |
| 11871 | * if offset > 0: |
| 11872 | * aligned_p += alignment - offset # <<<<<<<<<<<<<< |
| 11873 | * |
| 11874 | * return <void *> aligned_p |
| 11875 | */ |
| 11876 | __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset)); |
| 11877 | |
| 11878 | /* "View.MemoryView":298 |
| 11879 | * offset = aligned_p % alignment |
| 11880 | * |
| 11881 | * if offset > 0: # <<<<<<<<<<<<<< |
| 11882 | * aligned_p += alignment - offset |
| 11883 | * |
| 11884 | */ |
| 11885 | } |
| 11886 | |
| 11887 | /* "View.MemoryView":301 |
| 11888 | * aligned_p += alignment - offset |
| 11889 | * |
| 11890 | * return <void *> aligned_p # <<<<<<<<<<<<<< |
| 11891 | * |
| 11892 | * @cname('__pyx_memoryview') |
| 11893 | */ |
| 11894 | __pyx_r = ((void *)__pyx_v_aligned_p); |
| 11895 | goto __pyx_L0; |
| 11896 | |
| 11897 | /* "View.MemoryView":290 |
| 11898 | * |
| 11899 | * @cname('__pyx_align_pointer') |
| 11900 | * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<< |
| 11901 | * "Align pointer memory on a given boundary" |
| 11902 | * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory |
| 11903 | */ |
| 11904 | |
| 11905 | /* function exit code */ |
| 11906 | __pyx_L0:; |
| 11907 | return __pyx_r; |
| 11908 | } |
| 11909 | |
| 11910 | /* "View.MemoryView":319 |
| 11911 | * cdef __Pyx_TypeInfo *typeinfo |
| 11912 | * |
| 11913 | * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< |
| 11914 | * self.obj = obj |
| 11915 | * self.flags = flags |
| 11916 | */ |
| 11917 | |
| 11918 | /* Python wrapper */ |
| 11919 | static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| 11920 | static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| 11921 | PyObject *__pyx_v_obj = 0; |
| 11922 | int __pyx_v_flags; |
| 11923 | int __pyx_v_dtype_is_object; |
| 11924 | int __pyx_lineno = 0; |
| 11925 | const char *__pyx_filename = NULL((void*)0); |
| 11926 | int __pyx_clineno = 0; |
| 11927 | int __pyx_r; |
| 11928 | __Pyx_RefNannyDeclarations |
| 11929 | __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); |
| 11930 | { |
| 11931 | static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0}; |
| 11932 | PyObject* values[3] = {0,0,0}; |
| 11933 | if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) { |
| 11934 | Py_ssize_t kw_args; |
| 11935 | const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size); |
| 11936 | switch (pos_args) { |
| 11937 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 11938 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 11939 | case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 11940 | case 0: break; |
| 11941 | default: goto __pyx_L5_argtuple_error; |
| 11942 | } |
| 11943 | kw_args = PyDict_Size(__pyx_kwds); |
| 11944 | switch (pos_args) { |
| 11945 | case 0: |
| 11946 | if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj )) != 0), 1)) kw_args--; |
| 11947 | else goto __pyx_L5_argtuple_error; |
| 11948 | case 1: |
| 11949 | 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--; |
| 11950 | else { |
| 11951 | __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 319; __pyx_clineno = __LINE__11951; goto __pyx_L3_error;} |
| 11952 | } |
| 11953 | case 2: |
| 11954 | if (kw_args > 0) { |
| 11955 | PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype_is_object); |
| 11956 | if (value) { values[2] = value; kw_args--; } |
| 11957 | } |
| 11958 | } |
| 11959 | if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) { |
| 11960 | 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[2]; __pyx_lineno = 319; __pyx_clineno = __LINE__11960; goto __pyx_L3_error;} |
| 11961 | } |
| 11962 | } else { |
| 11963 | switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) { |
| 11964 | case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]); |
| 11965 | case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]); |
| 11966 | values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]); |
| 11967 | break; |
| 11968 | default: goto __pyx_L5_argtuple_error; |
| 11969 | } |
| 11970 | } |
| 11971 | __pyx_v_obj = values[0]; |
| 11972 | __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_v_flags == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 319; __pyx_clineno = __LINE__11972; goto __pyx_L3_error;} |
| 11973 | if (values[2]) { |
| 11974 | __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 319; __pyx_clineno = __LINE__11974; goto __pyx_L3_error;} |
| 11975 | } else { |
| 11976 | __pyx_v_dtype_is_object = ((int)0); |
| 11977 | } |
| 11978 | } |
| 11979 | goto __pyx_L4_argument_unpacking_done; |
| 11980 | __pyx_L5_argtuple_error:; |
| 11981 | __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 319; __pyx_clineno = __LINE__11981; goto __pyx_L3_error;} |
| 11982 | __pyx_L3_error:; |
| 11983 | __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 11984 | __Pyx_RefNannyFinishContext(); |
| 11985 | return -1; |
| 11986 | __pyx_L4_argument_unpacking_done:; |
| 11987 | __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object); |
| 11988 | |
| 11989 | /* function exit code */ |
| 11990 | __Pyx_RefNannyFinishContext(); |
| 11991 | return __pyx_r; |
| 11992 | } |
| 11993 | |
| 11994 | static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) { |
| 11995 | int __pyx_r; |
| 11996 | __Pyx_RefNannyDeclarations |
| 11997 | int __pyx_t_1; |
| 11998 | int __pyx_t_2; |
| 11999 | int __pyx_t_3; |
| 12000 | int __pyx_t_4; |
| 12001 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 12002 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 12003 | int __pyx_lineno = 0; |
| 12004 | const char *__pyx_filename = NULL((void*)0); |
| 12005 | int __pyx_clineno = 0; |
| 12006 | __Pyx_RefNannySetupContext("__cinit__", 0); |
| 12007 | |
| 12008 | /* "View.MemoryView":320 |
| 12009 | * |
| 12010 | * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): |
| 12011 | * self.obj = obj # <<<<<<<<<<<<<< |
| 12012 | * self.flags = flags |
| 12013 | * if type(self) is memoryview or obj is not None: |
| 12014 | */ |
| 12015 | __Pyx_INCREF(__pyx_v_obj)( ((PyObject*)(__pyx_v_obj))->ob_refcnt++); |
| 12016 | __Pyx_GIVEREF(__pyx_v_obj); |
| 12017 | __Pyx_GOTREF(__pyx_v_self->obj); |
| 12018 | __Pyx_DECREF(__pyx_v_self->obj)do { if ( --((PyObject*)(__pyx_v_self->obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_self->obj)))); } while (0); |
| 12019 | __pyx_v_self->obj = __pyx_v_obj; |
| 12020 | |
| 12021 | /* "View.MemoryView":321 |
| 12022 | * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): |
| 12023 | * self.obj = obj |
| 12024 | * self.flags = flags # <<<<<<<<<<<<<< |
| 12025 | * if type(self) is memoryview or obj is not None: |
| 12026 | * __Pyx_GetBuffer(obj, &self.view, flags) |
| 12027 | */ |
| 12028 | __pyx_v_self->flags = __pyx_v_flags; |
| 12029 | |
| 12030 | /* "View.MemoryView":322 |
| 12031 | * self.obj = obj |
| 12032 | * self.flags = flags |
| 12033 | * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< |
| 12034 | * __Pyx_GetBuffer(obj, &self.view, flags) |
| 12035 | * if <PyObject *> self.view.obj == NULL: |
| 12036 | */ |
| 12037 | __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))(((PyObject*)(((PyObject *)__pyx_v_self)))->ob_type)) == ((PyObject *)__pyx_memoryview_type)); |
| 12038 | __pyx_t_3 = (__pyx_t_2 != 0); |
| 12039 | if (!__pyx_t_3) { |
| 12040 | } else { |
| 12041 | __pyx_t_1 = __pyx_t_3; |
| 12042 | goto __pyx_L4_bool_binop_done; |
| 12043 | } |
| 12044 | __pyx_t_3 = (__pyx_v_obj != Py_None(&_Py_NoneStruct)); |
| 12045 | __pyx_t_2 = (__pyx_t_3 != 0); |
| 12046 | __pyx_t_1 = __pyx_t_2; |
| 12047 | __pyx_L4_bool_binop_done:; |
| 12048 | if (__pyx_t_1) { |
| 12049 | |
| 12050 | /* "View.MemoryView":323 |
| 12051 | * self.flags = flags |
| 12052 | * if type(self) is memoryview or obj is not None: |
| 12053 | * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<< |
| 12054 | * if <PyObject *> self.view.obj == NULL: |
| 12055 | * (<__pyx_buffer *> &self.view).obj = Py_None |
| 12056 | */ |
| 12057 | __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == -1)__builtin_expect(!!(__pyx_t_4 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 323; __pyx_clineno = __LINE__12057; goto __pyx_L1_error;} |
| 12058 | |
| 12059 | /* "View.MemoryView":324 |
| 12060 | * if type(self) is memoryview or obj is not None: |
| 12061 | * __Pyx_GetBuffer(obj, &self.view, flags) |
| 12062 | * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<< |
| 12063 | * (<__pyx_buffer *> &self.view).obj = Py_None |
| 12064 | * Py_INCREF(Py_None) |
| 12065 | */ |
| 12066 | __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL((void*)0)) != 0); |
| 12067 | if (__pyx_t_1) { |
| 12068 | |
| 12069 | /* "View.MemoryView":325 |
| 12070 | * __Pyx_GetBuffer(obj, &self.view, flags) |
| 12071 | * if <PyObject *> self.view.obj == NULL: |
| 12072 | * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<< |
| 12073 | * Py_INCREF(Py_None) |
| 12074 | * |
| 12075 | */ |
| 12076 | ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None(&_Py_NoneStruct); |
| 12077 | |
| 12078 | /* "View.MemoryView":326 |
| 12079 | * if <PyObject *> self.view.obj == NULL: |
| 12080 | * (<__pyx_buffer *> &self.view).obj = Py_None |
| 12081 | * Py_INCREF(Py_None) # <<<<<<<<<<<<<< |
| 12082 | * |
| 12083 | * self.lock = PyThread_allocate_lock() |
| 12084 | */ |
| 12085 | Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 12086 | |
| 12087 | /* "View.MemoryView":324 |
| 12088 | * if type(self) is memoryview or obj is not None: |
| 12089 | * __Pyx_GetBuffer(obj, &self.view, flags) |
| 12090 | * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<< |
| 12091 | * (<__pyx_buffer *> &self.view).obj = Py_None |
| 12092 | * Py_INCREF(Py_None) |
| 12093 | */ |
| 12094 | } |
| 12095 | |
| 12096 | /* "View.MemoryView":322 |
| 12097 | * self.obj = obj |
| 12098 | * self.flags = flags |
| 12099 | * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< |
| 12100 | * __Pyx_GetBuffer(obj, &self.view, flags) |
| 12101 | * if <PyObject *> self.view.obj == NULL: |
| 12102 | */ |
| 12103 | } |
| 12104 | |
| 12105 | /* "View.MemoryView":328 |
| 12106 | * Py_INCREF(Py_None) |
| 12107 | * |
| 12108 | * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<< |
| 12109 | * if self.lock == NULL: |
| 12110 | * raise MemoryError |
| 12111 | */ |
| 12112 | __pyx_v_self->lock = PyThread_allocate_lock(); |
| 12113 | |
| 12114 | /* "View.MemoryView":329 |
| 12115 | * |
| 12116 | * self.lock = PyThread_allocate_lock() |
| 12117 | * if self.lock == NULL: # <<<<<<<<<<<<<< |
| 12118 | * raise MemoryError |
| 12119 | * |
| 12120 | */ |
| 12121 | __pyx_t_1 = ((__pyx_v_self->lock == NULL((void*)0)) != 0); |
| 12122 | if (__pyx_t_1) { |
| 12123 | |
| 12124 | /* "View.MemoryView":330 |
| 12125 | * self.lock = PyThread_allocate_lock() |
| 12126 | * if self.lock == NULL: |
| 12127 | * raise MemoryError # <<<<<<<<<<<<<< |
| 12128 | * |
| 12129 | * if flags & PyBUF_FORMAT: |
| 12130 | */ |
| 12131 | PyErr_NoMemory(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 330; __pyx_clineno = __LINE__12131; goto __pyx_L1_error;} |
| 12132 | |
| 12133 | /* "View.MemoryView":329 |
| 12134 | * |
| 12135 | * self.lock = PyThread_allocate_lock() |
| 12136 | * if self.lock == NULL: # <<<<<<<<<<<<<< |
| 12137 | * raise MemoryError |
| 12138 | * |
| 12139 | */ |
| 12140 | } |
| 12141 | |
| 12142 | /* "View.MemoryView":332 |
| 12143 | * raise MemoryError |
| 12144 | * |
| 12145 | * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< |
| 12146 | * self.dtype_is_object = self.view.format == b'O' |
| 12147 | * else: |
| 12148 | */ |
| 12149 | __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT0x0004) != 0); |
| 12150 | if (__pyx_t_1) { |
| 12151 | |
| 12152 | /* "View.MemoryView":333 |
| 12153 | * |
| 12154 | * if flags & PyBUF_FORMAT: |
| 12155 | * self.dtype_is_object = self.view.format == b'O' # <<<<<<<<<<<<<< |
| 12156 | * else: |
| 12157 | * self.dtype_is_object = dtype_is_object |
| 12158 | */ |
| 12159 | __pyx_t_5 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 333; __pyx_clineno = __LINE__12159; goto __pyx_L1_error;} |
| 12160 | __Pyx_GOTREF(__pyx_t_5); |
| 12161 | __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_n_b_O, Py_EQ2); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 333; __pyx_clineno = __LINE__12161; goto __pyx_L1_error;} |
| 12162 | __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; |
| 12163 | __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 333; __pyx_clineno = __LINE__12163; goto __pyx_L1_error;} |
| 12164 | __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; |
| 12165 | __pyx_v_self->dtype_is_object = __pyx_t_1; |
| 12166 | |
| 12167 | /* "View.MemoryView":332 |
| 12168 | * raise MemoryError |
| 12169 | * |
| 12170 | * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< |
| 12171 | * self.dtype_is_object = self.view.format == b'O' |
| 12172 | * else: |
| 12173 | */ |
| 12174 | goto __pyx_L8; |
| 12175 | } |
| 12176 | |
| 12177 | /* "View.MemoryView":335 |
| 12178 | * self.dtype_is_object = self.view.format == b'O' |
| 12179 | * else: |
| 12180 | * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<< |
| 12181 | * |
| 12182 | * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( |
| 12183 | */ |
| 12184 | /*else*/ { |
| 12185 | __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object; |
| 12186 | } |
| 12187 | __pyx_L8:; |
| 12188 | |
| 12189 | /* "View.MemoryView":337 |
| 12190 | * self.dtype_is_object = dtype_is_object |
| 12191 | * |
| 12192 | * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<< |
| 12193 | * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int)) |
| 12194 | * self.typeinfo = NULL |
| 12195 | */ |
| 12196 | __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int)))); |
| 12197 | |
| 12198 | /* "View.MemoryView":339 |
| 12199 | * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( |
| 12200 | * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int)) |
| 12201 | * self.typeinfo = NULL # <<<<<<<<<<<<<< |
| 12202 | * |
| 12203 | * def __dealloc__(memoryview self): |
| 12204 | */ |
| 12205 | __pyx_v_self->typeinfo = NULL((void*)0); |
| 12206 | |
| 12207 | /* "View.MemoryView":319 |
| 12208 | * cdef __Pyx_TypeInfo *typeinfo |
| 12209 | * |
| 12210 | * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< |
| 12211 | * self.obj = obj |
| 12212 | * self.flags = flags |
| 12213 | */ |
| 12214 | |
| 12215 | /* function exit code */ |
| 12216 | __pyx_r = 0; |
| 12217 | goto __pyx_L0; |
| 12218 | __pyx_L1_error:; |
| 12219 | __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); |
| 12220 | __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); |
| 12221 | __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 12222 | __pyx_r = -1; |
| 12223 | __pyx_L0:; |
| 12224 | __Pyx_RefNannyFinishContext(); |
| 12225 | return __pyx_r; |
| 12226 | } |
| 12227 | |
| 12228 | /* "View.MemoryView":341 |
| 12229 | * self.typeinfo = NULL |
| 12230 | * |
| 12231 | * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< |
| 12232 | * if self.obj is not None: |
| 12233 | * __Pyx_ReleaseBuffer(&self.view) |
| 12234 | */ |
| 12235 | |
| 12236 | /* Python wrapper */ |
| 12237 | static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/ |
| 12238 | static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) { |
| 12239 | __Pyx_RefNannyDeclarations |
| 12240 | __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); |
| 12241 | __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 12242 | |
| 12243 | /* function exit code */ |
| 12244 | __Pyx_RefNannyFinishContext(); |
| 12245 | } |
| 12246 | |
| 12247 | static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 12248 | __Pyx_RefNannyDeclarations |
| 12249 | int __pyx_t_1; |
| 12250 | int __pyx_t_2; |
| 12251 | __Pyx_RefNannySetupContext("__dealloc__", 0); |
| 12252 | |
| 12253 | /* "View.MemoryView":342 |
| 12254 | * |
| 12255 | * def __dealloc__(memoryview self): |
| 12256 | * if self.obj is not None: # <<<<<<<<<<<<<< |
| 12257 | * __Pyx_ReleaseBuffer(&self.view) |
| 12258 | * |
| 12259 | */ |
| 12260 | __pyx_t_1 = (__pyx_v_self->obj != Py_None(&_Py_NoneStruct)); |
| 12261 | __pyx_t_2 = (__pyx_t_1 != 0); |
| 12262 | if (__pyx_t_2) { |
| 12263 | |
| 12264 | /* "View.MemoryView":343 |
| 12265 | * def __dealloc__(memoryview self): |
| 12266 | * if self.obj is not None: |
| 12267 | * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<< |
| 12268 | * |
| 12269 | * if self.lock != NULL: |
| 12270 | */ |
| 12271 | __Pyx_ReleaseBuffer((&__pyx_v_self->view)); |
| 12272 | |
| 12273 | /* "View.MemoryView":342 |
| 12274 | * |
| 12275 | * def __dealloc__(memoryview self): |
| 12276 | * if self.obj is not None: # <<<<<<<<<<<<<< |
| 12277 | * __Pyx_ReleaseBuffer(&self.view) |
| 12278 | * |
| 12279 | */ |
| 12280 | } |
| 12281 | |
| 12282 | /* "View.MemoryView":345 |
| 12283 | * __Pyx_ReleaseBuffer(&self.view) |
| 12284 | * |
| 12285 | * if self.lock != NULL: # <<<<<<<<<<<<<< |
| 12286 | * PyThread_free_lock(self.lock) |
| 12287 | * |
| 12288 | */ |
| 12289 | __pyx_t_2 = ((__pyx_v_self->lock != NULL((void*)0)) != 0); |
| 12290 | if (__pyx_t_2) { |
| 12291 | |
| 12292 | /* "View.MemoryView":346 |
| 12293 | * |
| 12294 | * if self.lock != NULL: |
| 12295 | * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<< |
| 12296 | * |
| 12297 | * cdef char *get_item_pointer(memoryview self, object index) except NULL: |
| 12298 | */ |
| 12299 | PyThread_free_lock(__pyx_v_self->lock); |
| 12300 | |
| 12301 | /* "View.MemoryView":345 |
| 12302 | * __Pyx_ReleaseBuffer(&self.view) |
| 12303 | * |
| 12304 | * if self.lock != NULL: # <<<<<<<<<<<<<< |
| 12305 | * PyThread_free_lock(self.lock) |
| 12306 | * |
| 12307 | */ |
| 12308 | } |
| 12309 | |
| 12310 | /* "View.MemoryView":341 |
| 12311 | * self.typeinfo = NULL |
| 12312 | * |
| 12313 | * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< |
| 12314 | * if self.obj is not None: |
| 12315 | * __Pyx_ReleaseBuffer(&self.view) |
| 12316 | */ |
| 12317 | |
| 12318 | /* function exit code */ |
| 12319 | __Pyx_RefNannyFinishContext(); |
| 12320 | } |
| 12321 | |
| 12322 | /* "View.MemoryView":348 |
| 12323 | * PyThread_free_lock(self.lock) |
| 12324 | * |
| 12325 | * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< |
| 12326 | * cdef Py_ssize_t dim |
| 12327 | * cdef char *itemp = <char *> self.view.buf |
| 12328 | */ |
| 12329 | |
| 12330 | static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { |
| 12331 | Py_ssize_t __pyx_v_dim; |
| 12332 | char *__pyx_v_itemp; |
| 12333 | PyObject *__pyx_v_idx = NULL((void*)0); |
| 12334 | char *__pyx_r; |
| 12335 | __Pyx_RefNannyDeclarations |
| 12336 | Py_ssize_t __pyx_t_1; |
| 12337 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 12338 | Py_ssize_t __pyx_t_3; |
| 12339 | PyObject *(*__pyx_t_4)(PyObject *); |
| 12340 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 12341 | Py_ssize_t __pyx_t_6; |
| 12342 | char *__pyx_t_7; |
| 12343 | int __pyx_lineno = 0; |
| 12344 | const char *__pyx_filename = NULL((void*)0); |
| 12345 | int __pyx_clineno = 0; |
| 12346 | __Pyx_RefNannySetupContext("get_item_pointer", 0); |
| 12347 | |
| 12348 | /* "View.MemoryView":350 |
| 12349 | * cdef char *get_item_pointer(memoryview self, object index) except NULL: |
| 12350 | * cdef Py_ssize_t dim |
| 12351 | * cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<< |
| 12352 | * |
| 12353 | * for dim, idx in enumerate(index): |
| 12354 | */ |
| 12355 | __pyx_v_itemp = ((char *)__pyx_v_self->view.buf); |
| 12356 | |
| 12357 | /* "View.MemoryView":352 |
| 12358 | * cdef char *itemp = <char *> self.view.buf |
| 12359 | * |
| 12360 | * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< |
| 12361 | * itemp = pybuffer_index(&self.view, itemp, idx, dim) |
| 12362 | * |
| 12363 | */ |
| 12364 | __pyx_t_1 = 0; |
| 12365 | if (likely(PyList_CheckExact(__pyx_v_index))__builtin_expect(!!(((((PyObject*)(__pyx_v_index))->ob_type ) == &PyList_Type)), 1) || PyTuple_CheckExact(__pyx_v_index)((((PyObject*)(__pyx_v_index))->ob_type) == &PyTuple_Type )) { |
| 12366 | __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++); __pyx_t_3 = 0; |
| 12367 | __pyx_t_4 = NULL((void*)0); |
| 12368 | } else { |
| 12369 | __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 352; __pyx_clineno = __LINE__12369; goto __pyx_L1_error;} |
| 12370 | __Pyx_GOTREF(__pyx_t_2); |
| 12371 | __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[2]; __pyx_lineno = 352; __pyx_clineno = __LINE__12371; goto __pyx_L1_error;} |
| 12372 | } |
| 12373 | for (;;) { |
| 12374 | if (likely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 1)) { |
| 12375 | if (likely(PyList_CheckExact(__pyx_t_2))__builtin_expect(!!(((((PyObject*)(__pyx_t_2))->ob_type) == &PyList_Type)), 1)) { |
| 12376 | if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)(((PyVarObject*)(__pyx_t_2))->ob_size)) break; |
| 12377 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 12378 | __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[2]; __pyx_lineno = 352; __pyx_clineno = __LINE__12378; goto __pyx_L1_error;} |
| 12379 | #else |
| 12380 | __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[2]; __pyx_lineno = 352; __pyx_clineno = __LINE__12380; goto __pyx_L1_error;} |
| 12381 | __Pyx_GOTREF(__pyx_t_5); |
| 12382 | #endif |
| 12383 | } else { |
| 12384 | if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)(((PyVarObject*)(__pyx_t_2))->ob_size)) break; |
| 12385 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 12386 | __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[2]; __pyx_lineno = 352; __pyx_clineno = __LINE__12386; goto __pyx_L1_error;} |
| 12387 | #else |
| 12388 | __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[2]; __pyx_lineno = 352; __pyx_clineno = __LINE__12388; goto __pyx_L1_error;} |
| 12389 | __Pyx_GOTREF(__pyx_t_5); |
| 12390 | #endif |
| 12391 | } |
| 12392 | } else { |
| 12393 | __pyx_t_5 = __pyx_t_4(__pyx_t_2); |
| 12394 | if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) { |
| 12395 | PyObject* exc_type = PyErr_Occurred(); |
| 12396 | if (exc_type) { |
| 12397 | 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(); |
| 12398 | else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 352; __pyx_clineno = __LINE__12398; goto __pyx_L1_error;} |
| 12399 | } |
| 12400 | break; |
| 12401 | } |
| 12402 | __Pyx_GOTREF(__pyx_t_5); |
| 12403 | } |
| 12404 | __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_v_idx; __pyx_v_idx = __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); |
| 12405 | __pyx_t_5 = 0; |
| 12406 | __pyx_v_dim = __pyx_t_1; |
| 12407 | __pyx_t_1 = (__pyx_t_1 + 1); |
| 12408 | |
| 12409 | /* "View.MemoryView":353 |
| 12410 | * |
| 12411 | * for dim, idx in enumerate(index): |
| 12412 | * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<< |
| 12413 | * |
| 12414 | * return itemp |
| 12415 | */ |
| 12416 | __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 353; __pyx_clineno = __LINE__12416; goto __pyx_L1_error;} |
| 12417 | __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == NULL)__builtin_expect(!!(__pyx_t_7 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 353; __pyx_clineno = __LINE__12417; goto __pyx_L1_error;} |
| 12418 | __pyx_v_itemp = __pyx_t_7; |
| 12419 | |
| 12420 | /* "View.MemoryView":352 |
| 12421 | * cdef char *itemp = <char *> self.view.buf |
| 12422 | * |
| 12423 | * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< |
| 12424 | * itemp = pybuffer_index(&self.view, itemp, idx, dim) |
| 12425 | * |
| 12426 | */ |
| 12427 | } |
| 12428 | __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; |
| 12429 | |
| 12430 | /* "View.MemoryView":355 |
| 12431 | * itemp = pybuffer_index(&self.view, itemp, idx, dim) |
| 12432 | * |
| 12433 | * return itemp # <<<<<<<<<<<<<< |
| 12434 | * |
| 12435 | * |
| 12436 | */ |
| 12437 | __pyx_r = __pyx_v_itemp; |
| 12438 | goto __pyx_L0; |
| 12439 | |
| 12440 | /* "View.MemoryView":348 |
| 12441 | * PyThread_free_lock(self.lock) |
| 12442 | * |
| 12443 | * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< |
| 12444 | * cdef Py_ssize_t dim |
| 12445 | * cdef char *itemp = <char *> self.view.buf |
| 12446 | */ |
| 12447 | |
| 12448 | /* function exit code */ |
| 12449 | __pyx_L1_error:; |
| 12450 | __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); |
| 12451 | __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); |
| 12452 | __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 12453 | __pyx_r = NULL((void*)0); |
| 12454 | __pyx_L0:; |
| 12455 | __Pyx_XDECREF(__pyx_v_idx)do { if ((__pyx_v_idx) == ((void*)0)) ; else do { if ( --((PyObject *)(__pyx_v_idx))->ob_refcnt != 0) ; else ( (*(((PyObject*) ((PyObject *)(__pyx_v_idx)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_idx)))); } while (0); } while (0); |
| 12456 | __Pyx_RefNannyFinishContext(); |
| 12457 | return __pyx_r; |
| 12458 | } |
| 12459 | |
| 12460 | /* "View.MemoryView":358 |
| 12461 | * |
| 12462 | * |
| 12463 | * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< |
| 12464 | * if index is Ellipsis: |
| 12465 | * return self |
| 12466 | */ |
| 12467 | |
| 12468 | /* Python wrapper */ |
| 12469 | static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/ |
| 12470 | static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) { |
| 12471 | PyObject *__pyx_r = 0; |
| 12472 | __Pyx_RefNannyDeclarations |
| 12473 | __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); |
| 12474 | __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index)); |
| 12475 | |
| 12476 | /* function exit code */ |
| 12477 | __Pyx_RefNannyFinishContext(); |
| 12478 | return __pyx_r; |
| 12479 | } |
| 12480 | |
| 12481 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { |
| 12482 | PyObject *__pyx_v_have_slices = NULL((void*)0); |
| 12483 | PyObject *__pyx_v_indices = NULL((void*)0); |
| 12484 | char *__pyx_v_itemp; |
| 12485 | PyObject *__pyx_r = NULL((void*)0); |
| 12486 | __Pyx_RefNannyDeclarations |
| 12487 | int __pyx_t_1; |
| 12488 | int __pyx_t_2; |
| 12489 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 12490 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 12491 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 12492 | char *__pyx_t_6; |
| 12493 | int __pyx_lineno = 0; |
| 12494 | const char *__pyx_filename = NULL((void*)0); |
| 12495 | int __pyx_clineno = 0; |
| 12496 | __Pyx_RefNannySetupContext("__getitem__", 0); |
| 12497 | |
| 12498 | /* "View.MemoryView":359 |
| 12499 | * |
| 12500 | * def __getitem__(memoryview self, object index): |
| 12501 | * if index is Ellipsis: # <<<<<<<<<<<<<< |
| 12502 | * return self |
| 12503 | * |
| 12504 | */ |
| 12505 | __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis); |
| 12506 | __pyx_t_2 = (__pyx_t_1 != 0); |
| 12507 | if (__pyx_t_2) { |
| 12508 | |
| 12509 | /* "View.MemoryView":360 |
| 12510 | * def __getitem__(memoryview self, object index): |
| 12511 | * if index is Ellipsis: |
| 12512 | * return self # <<<<<<<<<<<<<< |
| 12513 | * |
| 12514 | * have_slices, indices = _unellipsify(index, self.view.ndim) |
| 12515 | */ |
| 12516 | __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); |
| 12517 | __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++); |
| 12518 | __pyx_r = ((PyObject *)__pyx_v_self); |
| 12519 | goto __pyx_L0; |
| 12520 | |
| 12521 | /* "View.MemoryView":359 |
| 12522 | * |
| 12523 | * def __getitem__(memoryview self, object index): |
| 12524 | * if index is Ellipsis: # <<<<<<<<<<<<<< |
| 12525 | * return self |
| 12526 | * |
| 12527 | */ |
| 12528 | } |
| 12529 | |
| 12530 | /* "View.MemoryView":362 |
| 12531 | * return self |
| 12532 | * |
| 12533 | * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< |
| 12534 | * |
| 12535 | * cdef char *itemp |
| 12536 | */ |
| 12537 | __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 362; __pyx_clineno = __LINE__12537; goto __pyx_L1_error;} |
| 12538 | __Pyx_GOTREF(__pyx_t_3); |
| 12539 | if (likely(__pyx_t_3 != Py_None)__builtin_expect(!!(__pyx_t_3 != (&_Py_NoneStruct)), 1)) { |
| 12540 | PyObject* sequence = __pyx_t_3; |
| 12541 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 12542 | Py_ssize_t size = Py_SIZE(sequence)(((PyVarObject*)(sequence))->ob_size); |
| 12543 | #else |
| 12544 | Py_ssize_t size = PySequence_Size(sequence); |
| 12545 | #endif |
| 12546 | if (unlikely(size != 2)__builtin_expect(!!(size != 2), 0)) { |
| 12547 | if (size > 2) __Pyx_RaiseTooManyValuesError(2); |
| 12548 | else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); |
| 12549 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 362; __pyx_clineno = __LINE__12549; goto __pyx_L1_error;} |
| 12550 | } |
| 12551 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 12552 | __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0)(((PyTupleObject *)(sequence))->ob_item[0]); |
| 12553 | __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1)(((PyTupleObject *)(sequence))->ob_item[1]); |
| 12554 | __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); |
| 12555 | __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); |
| 12556 | #else |
| 12557 | __pyx_t_4 = PySequence_ITEM(sequence, 0)( (((PyObject*)(sequence))->ob_type)->tp_as_sequence-> sq_item(sequence, 0) ); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 362; __pyx_clineno = __LINE__12557; goto __pyx_L1_error;} |
| 12558 | __Pyx_GOTREF(__pyx_t_4); |
| 12559 | __pyx_t_5 = PySequence_ITEM(sequence, 1)( (((PyObject*)(sequence))->ob_type)->tp_as_sequence-> sq_item(sequence, 1) ); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 362; __pyx_clineno = __LINE__12559; goto __pyx_L1_error;} |
| 12560 | __Pyx_GOTREF(__pyx_t_5); |
| 12561 | #endif |
| 12562 | __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; |
| 12563 | } else { |
| 12564 | __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 362; __pyx_clineno = __LINE__12564; goto __pyx_L1_error;} |
| 12565 | } |
| 12566 | __pyx_v_have_slices = __pyx_t_4; |
| 12567 | __pyx_t_4 = 0; |
| 12568 | __pyx_v_indices = __pyx_t_5; |
| 12569 | __pyx_t_5 = 0; |
| 12570 | |
| 12571 | /* "View.MemoryView":365 |
| 12572 | * |
| 12573 | * cdef char *itemp |
| 12574 | * if have_slices: # <<<<<<<<<<<<<< |
| 12575 | * return memview_slice(self, indices) |
| 12576 | * else: |
| 12577 | */ |
| 12578 | __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 365; __pyx_clineno = __LINE__12578; goto __pyx_L1_error;} |
| 12579 | if (__pyx_t_2) { |
| 12580 | |
| 12581 | /* "View.MemoryView":366 |
| 12582 | * cdef char *itemp |
| 12583 | * if have_slices: |
| 12584 | * return memview_slice(self, indices) # <<<<<<<<<<<<<< |
| 12585 | * else: |
| 12586 | * itemp = self.get_item_pointer(indices) |
| 12587 | */ |
| 12588 | __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); |
| 12589 | __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 366; __pyx_clineno = __LINE__12589; goto __pyx_L1_error;} |
| 12590 | __Pyx_GOTREF(__pyx_t_3); |
| 12591 | __pyx_r = __pyx_t_3; |
| 12592 | __pyx_t_3 = 0; |
| 12593 | goto __pyx_L0; |
| 12594 | |
| 12595 | /* "View.MemoryView":365 |
| 12596 | * |
| 12597 | * cdef char *itemp |
| 12598 | * if have_slices: # <<<<<<<<<<<<<< |
| 12599 | * return memview_slice(self, indices) |
| 12600 | * else: |
| 12601 | */ |
| 12602 | } |
| 12603 | |
| 12604 | /* "View.MemoryView":368 |
| 12605 | * return memview_slice(self, indices) |
| 12606 | * else: |
| 12607 | * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<< |
| 12608 | * return self.convert_item_to_object(itemp) |
| 12609 | * |
| 12610 | */ |
| 12611 | /*else*/ { |
| 12612 | __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == NULL)__builtin_expect(!!(__pyx_t_6 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 368; __pyx_clineno = __LINE__12612; goto __pyx_L1_error;} |
| 12613 | __pyx_v_itemp = __pyx_t_6; |
| 12614 | |
| 12615 | /* "View.MemoryView":369 |
| 12616 | * else: |
| 12617 | * itemp = self.get_item_pointer(indices) |
| 12618 | * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<< |
| 12619 | * |
| 12620 | * def __setitem__(memoryview self, object index, object value): |
| 12621 | */ |
| 12622 | __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); |
| 12623 | __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 369; __pyx_clineno = __LINE__12623; goto __pyx_L1_error;} |
| 12624 | __Pyx_GOTREF(__pyx_t_3); |
| 12625 | __pyx_r = __pyx_t_3; |
| 12626 | __pyx_t_3 = 0; |
| 12627 | goto __pyx_L0; |
| 12628 | } |
| 12629 | |
| 12630 | /* "View.MemoryView":358 |
| 12631 | * |
| 12632 | * |
| 12633 | * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< |
| 12634 | * if index is Ellipsis: |
| 12635 | * return self |
| 12636 | */ |
| 12637 | |
| 12638 | /* function exit code */ |
| 12639 | __pyx_L1_error:; |
| 12640 | __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); |
| 12641 | __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); |
| 12642 | __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); |
| 12643 | __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 12644 | __pyx_r = NULL((void*)0); |
| 12645 | __pyx_L0:; |
| 12646 | __Pyx_XDECREF(__pyx_v_have_slices)do { if ((__pyx_v_have_slices) == ((void*)0)) ; else do { if ( --((PyObject*)(__pyx_v_have_slices))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_have_slices)))->ob_type )->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_have_slices )))); } while (0); } while (0); |
| 12647 | __Pyx_XDECREF(__pyx_v_indices)do { if ((__pyx_v_indices) == ((void*)0)) ; else do { if ( -- ((PyObject*)(__pyx_v_indices))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(__pyx_v_indices)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_indices)))); } while (0); } while (0); |
| 12648 | __Pyx_XGIVEREF(__pyx_r); |
| 12649 | __Pyx_RefNannyFinishContext(); |
| 12650 | return __pyx_r; |
| 12651 | } |
| 12652 | |
| 12653 | /* "View.MemoryView":371 |
| 12654 | * return self.convert_item_to_object(itemp) |
| 12655 | * |
| 12656 | * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< |
| 12657 | * have_slices, index = _unellipsify(index, self.view.ndim) |
| 12658 | * |
| 12659 | */ |
| 12660 | |
| 12661 | /* Python wrapper */ |
| 12662 | static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/ |
| 12663 | static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { |
| 12664 | int __pyx_r; |
| 12665 | __Pyx_RefNannyDeclarations |
| 12666 | __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); |
| 12667 | __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value)); |
| 12668 | |
| 12669 | /* function exit code */ |
| 12670 | __Pyx_RefNannyFinishContext(); |
| 12671 | return __pyx_r; |
| 12672 | } |
| 12673 | |
| 12674 | static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { |
| 12675 | PyObject *__pyx_v_have_slices = NULL((void*)0); |
| 12676 | PyObject *__pyx_v_obj = NULL((void*)0); |
| 12677 | int __pyx_r; |
| 12678 | __Pyx_RefNannyDeclarations |
| 12679 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 12680 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 12681 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 12682 | int __pyx_t_4; |
| 12683 | int __pyx_lineno = 0; |
| 12684 | const char *__pyx_filename = NULL((void*)0); |
| 12685 | int __pyx_clineno = 0; |
| 12686 | __Pyx_RefNannySetupContext("__setitem__", 0); |
| 12687 | __Pyx_INCREF(__pyx_v_index)( ((PyObject*)(__pyx_v_index))->ob_refcnt++); |
| 12688 | |
| 12689 | /* "View.MemoryView":372 |
| 12690 | * |
| 12691 | * def __setitem__(memoryview self, object index, object value): |
| 12692 | * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< |
| 12693 | * |
| 12694 | * if have_slices: |
| 12695 | */ |
| 12696 | __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__12696; goto __pyx_L1_error;} |
| 12697 | __Pyx_GOTREF(__pyx_t_1); |
| 12698 | if (likely(__pyx_t_1 != Py_None)__builtin_expect(!!(__pyx_t_1 != (&_Py_NoneStruct)), 1)) { |
| 12699 | PyObject* sequence = __pyx_t_1; |
| 12700 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 12701 | Py_ssize_t size = Py_SIZE(sequence)(((PyVarObject*)(sequence))->ob_size); |
| 12702 | #else |
| 12703 | Py_ssize_t size = PySequence_Size(sequence); |
| 12704 | #endif |
| 12705 | if (unlikely(size != 2)__builtin_expect(!!(size != 2), 0)) { |
| 12706 | if (size > 2) __Pyx_RaiseTooManyValuesError(2); |
| 12707 | else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); |
| 12708 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__12708; goto __pyx_L1_error;} |
| 12709 | } |
| 12710 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 12711 | __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0)(((PyTupleObject *)(sequence))->ob_item[0]); |
| 12712 | __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1)(((PyTupleObject *)(sequence))->ob_item[1]); |
| 12713 | __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++); |
| 12714 | __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); |
| 12715 | #else |
| 12716 | __pyx_t_2 = PySequence_ITEM(sequence, 0)( (((PyObject*)(sequence))->ob_type)->tp_as_sequence-> sq_item(sequence, 0) ); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__12716; goto __pyx_L1_error;} |
| 12717 | __Pyx_GOTREF(__pyx_t_2); |
| 12718 | __pyx_t_3 = PySequence_ITEM(sequence, 1)( (((PyObject*)(sequence))->ob_type)->tp_as_sequence-> sq_item(sequence, 1) ); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__12718; goto __pyx_L1_error;} |
| 12719 | __Pyx_GOTREF(__pyx_t_3); |
| 12720 | #endif |
| 12721 | __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; |
| 12722 | } else { |
| 12723 | __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__12723; goto __pyx_L1_error;} |
| 12724 | } |
| 12725 | __pyx_v_have_slices = __pyx_t_2; |
| 12726 | __pyx_t_2 = 0; |
| 12727 | __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3)do { PyObject *tmp = (PyObject *) __pyx_v_index; __pyx_v_index = __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); |
| 12728 | __pyx_t_3 = 0; |
| 12729 | |
| 12730 | /* "View.MemoryView":374 |
| 12731 | * have_slices, index = _unellipsify(index, self.view.ndim) |
| 12732 | * |
| 12733 | * if have_slices: # <<<<<<<<<<<<<< |
| 12734 | * obj = self.is_slice(value) |
| 12735 | * if obj: |
| 12736 | */ |
| 12737 | __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_4 < 0)__builtin_expect(!!(__pyx_t_4 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 374; __pyx_clineno = __LINE__12737; goto __pyx_L1_error;} |
| 12738 | if (__pyx_t_4) { |
| 12739 | |
| 12740 | /* "View.MemoryView":375 |
| 12741 | * |
| 12742 | * if have_slices: |
| 12743 | * obj = self.is_slice(value) # <<<<<<<<<<<<<< |
| 12744 | * if obj: |
| 12745 | * self.setitem_slice_assignment(self[index], obj) |
| 12746 | */ |
| 12747 | __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 375; __pyx_clineno = __LINE__12747; goto __pyx_L1_error;} |
| 12748 | __Pyx_GOTREF(__pyx_t_1); |
| 12749 | __pyx_v_obj = __pyx_t_1; |
| 12750 | __pyx_t_1 = 0; |
| 12751 | |
| 12752 | /* "View.MemoryView":376 |
| 12753 | * if have_slices: |
| 12754 | * obj = self.is_slice(value) |
| 12755 | * if obj: # <<<<<<<<<<<<<< |
| 12756 | * self.setitem_slice_assignment(self[index], obj) |
| 12757 | * else: |
| 12758 | */ |
| 12759 | __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_4 < 0)__builtin_expect(!!(__pyx_t_4 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 376; __pyx_clineno = __LINE__12759; goto __pyx_L1_error;} |
| 12760 | if (__pyx_t_4) { |
| 12761 | |
| 12762 | /* "View.MemoryView":377 |
| 12763 | * obj = self.is_slice(value) |
| 12764 | * if obj: |
| 12765 | * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<< |
| 12766 | * else: |
| 12767 | * self.setitem_slice_assign_scalar(self[index], value) |
| 12768 | */ |
| 12769 | __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 377; __pyx_clineno = __LINE__12769; goto __pyx_L1_error;}; |
| 12770 | __Pyx_GOTREF(__pyx_t_1); |
| 12771 | __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 377; __pyx_clineno = __LINE__12771; goto __pyx_L1_error;} |
| 12772 | __Pyx_GOTREF(__pyx_t_3); |
| 12773 | __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; |
| 12774 | __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; |
| 12775 | |
| 12776 | /* "View.MemoryView":376 |
| 12777 | * if have_slices: |
| 12778 | * obj = self.is_slice(value) |
| 12779 | * if obj: # <<<<<<<<<<<<<< |
| 12780 | * self.setitem_slice_assignment(self[index], obj) |
| 12781 | * else: |
| 12782 | */ |
| 12783 | goto __pyx_L4; |
| 12784 | } |
| 12785 | |
| 12786 | /* "View.MemoryView":379 |
| 12787 | * self.setitem_slice_assignment(self[index], obj) |
| 12788 | * else: |
| 12789 | * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<< |
| 12790 | * else: |
| 12791 | * self.setitem_indexed(index, value) |
| 12792 | */ |
| 12793 | /*else*/ { |
| 12794 | __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(__pyx_t_3 == NULL)__builtin_expect(!!(__pyx_t_3 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__12794; goto __pyx_L1_error;}; |
| 12795 | __Pyx_GOTREF(__pyx_t_3); |
| 12796 | if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type)))__builtin_expect(!!(((__pyx_t_3) == (&_Py_NoneStruct)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type )), 1)), 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__12796; goto __pyx_L1_error;} |
| 12797 | __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__12797; goto __pyx_L1_error;} |
| 12798 | __Pyx_GOTREF(__pyx_t_1); |
| 12799 | __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; |
| 12800 | __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; |
| 12801 | } |
| 12802 | __pyx_L4:; |
| 12803 | |
| 12804 | /* "View.MemoryView":374 |
| 12805 | * have_slices, index = _unellipsify(index, self.view.ndim) |
| 12806 | * |
| 12807 | * if have_slices: # <<<<<<<<<<<<<< |
| 12808 | * obj = self.is_slice(value) |
| 12809 | * if obj: |
| 12810 | */ |
| 12811 | goto __pyx_L3; |
| 12812 | } |
| 12813 | |
| 12814 | /* "View.MemoryView":381 |
| 12815 | * self.setitem_slice_assign_scalar(self[index], value) |
| 12816 | * else: |
| 12817 | * self.setitem_indexed(index, value) # <<<<<<<<<<<<<< |
| 12818 | * |
| 12819 | * cdef is_slice(self, obj): |
| 12820 | */ |
| 12821 | /*else*/ { |
| 12822 | __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 381; __pyx_clineno = __LINE__12822; goto __pyx_L1_error;} |
| 12823 | __Pyx_GOTREF(__pyx_t_1); |
| 12824 | __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; |
| 12825 | } |
| 12826 | __pyx_L3:; |
| 12827 | |
| 12828 | /* "View.MemoryView":371 |
| 12829 | * return self.convert_item_to_object(itemp) |
| 12830 | * |
| 12831 | * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< |
| 12832 | * have_slices, index = _unellipsify(index, self.view.ndim) |
| 12833 | * |
| 12834 | */ |
| 12835 | |
| 12836 | /* function exit code */ |
| 12837 | __pyx_r = 0; |
| 12838 | goto __pyx_L0; |
| 12839 | __pyx_L1_error:; |
| 12840 | __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); |
| 12841 | __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); |
| 12842 | __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); |
| 12843 | __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 12844 | __pyx_r = -1; |
| 12845 | __pyx_L0:; |
| 12846 | __Pyx_XDECREF(__pyx_v_have_slices)do { if ((__pyx_v_have_slices) == ((void*)0)) ; else do { if ( --((PyObject*)(__pyx_v_have_slices))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_have_slices)))->ob_type )->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_have_slices )))); } while (0); } while (0); |
| 12847 | __Pyx_XDECREF(__pyx_v_obj)do { if ((__pyx_v_obj) == ((void*)0)) ; else do { if ( --((PyObject *)(__pyx_v_obj))->ob_refcnt != 0) ; else ( (*(((PyObject*) ((PyObject *)(__pyx_v_obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_obj)))); } while (0); } while (0); |
| 12848 | __Pyx_XDECREF(__pyx_v_index)do { if ((__pyx_v_index) == ((void*)0)) ; else do { if ( --(( PyObject*)(__pyx_v_index))->ob_refcnt != 0) ; else ( (*((( PyObject*)((PyObject *)(__pyx_v_index)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(__pyx_v_index)))); } while (0); } while (0); |
| 12849 | __Pyx_RefNannyFinishContext(); |
| 12850 | return __pyx_r; |
| 12851 | } |
| 12852 | |
| 12853 | /* "View.MemoryView":383 |
| 12854 | * self.setitem_indexed(index, value) |
| 12855 | * |
| 12856 | * cdef is_slice(self, obj): # <<<<<<<<<<<<<< |
| 12857 | * if not isinstance(obj, memoryview): |
| 12858 | * try: |
| 12859 | */ |
| 12860 | |
| 12861 | static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) { |
| 12862 | PyObject *__pyx_r = NULL((void*)0); |
| 12863 | __Pyx_RefNannyDeclarations |
| 12864 | int __pyx_t_1; |
| 12865 | int __pyx_t_2; |
| 12866 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 12867 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 12868 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 12869 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 12870 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 12871 | PyObject *__pyx_t_8 = NULL((void*)0); |
| 12872 | int __pyx_t_9; |
| 12873 | int __pyx_lineno = 0; |
| 12874 | const char *__pyx_filename = NULL((void*)0); |
| 12875 | int __pyx_clineno = 0; |
| 12876 | __Pyx_RefNannySetupContext("is_slice", 0); |
| 12877 | __Pyx_INCREF(__pyx_v_obj)( ((PyObject*)(__pyx_v_obj))->ob_refcnt++); |
| 12878 | |
| 12879 | /* "View.MemoryView":384 |
| 12880 | * |
| 12881 | * cdef is_slice(self, obj): |
| 12882 | * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< |
| 12883 | * try: |
| 12884 | * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, |
| 12885 | */ |
| 12886 | __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type)((((PyObject*)(__pyx_v_obj))->ob_type) == ((PyTypeObject * )__pyx_memoryview_type) || PyType_IsSubtype((((PyObject*)(__pyx_v_obj ))->ob_type), ((PyTypeObject *)__pyx_memoryview_type))); |
| 12887 | __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); |
| 12888 | if (__pyx_t_2) { |
| 12889 | |
| 12890 | /* "View.MemoryView":385 |
| 12891 | * cdef is_slice(self, obj): |
| 12892 | * if not isinstance(obj, memoryview): |
| 12893 | * try: # <<<<<<<<<<<<<< |
| 12894 | * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, |
| 12895 | * self.dtype_is_object) |
| 12896 | */ |
| 12897 | { |
| 12898 | __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); |
| 12899 | __Pyx_XGOTREF(__pyx_t_3); |
| 12900 | __Pyx_XGOTREF(__pyx_t_4); |
| 12901 | __Pyx_XGOTREF(__pyx_t_5); |
| 12902 | /*try:*/ { |
| 12903 | |
| 12904 | /* "View.MemoryView":386 |
| 12905 | * if not isinstance(obj, memoryview): |
| 12906 | * try: |
| 12907 | * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< |
| 12908 | * self.dtype_is_object) |
| 12909 | * except TypeError: |
| 12910 | */ |
| 12911 | __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_self->flags | PyBUF_ANY_CONTIGUOUS(0x0080 | (0x0010 | 0x0008)))); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 386; __pyx_clineno = __LINE__12911; goto __pyx_L4_error;} |
| 12912 | __Pyx_GOTREF(__pyx_t_6); |
| 12913 | |
| 12914 | /* "View.MemoryView":387 |
| 12915 | * try: |
| 12916 | * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, |
| 12917 | * self.dtype_is_object) # <<<<<<<<<<<<<< |
| 12918 | * except TypeError: |
| 12919 | * return None |
| 12920 | */ |
| 12921 | __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object)((__pyx_v_self->dtype_is_object) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct)))->ob_refcnt++), ((PyObject *) & _Py_TrueStruct)) : (( ((PyObject*)(((PyObject *) &_Py_ZeroStruct )))->ob_refcnt++), ((PyObject *) &_Py_ZeroStruct))); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 387; __pyx_clineno = __LINE__12921; goto __pyx_L4_error;} |
| 12922 | __Pyx_GOTREF(__pyx_t_7); |
| 12923 | |
| 12924 | /* "View.MemoryView":386 |
| 12925 | * if not isinstance(obj, memoryview): |
| 12926 | * try: |
| 12927 | * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< |
| 12928 | * self.dtype_is_object) |
| 12929 | * except TypeError: |
| 12930 | */ |
| 12931 | __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 386; __pyx_clineno = __LINE__12931; goto __pyx_L4_error;} |
| 12932 | __Pyx_GOTREF(__pyx_t_8); |
| 12933 | __Pyx_INCREF(__pyx_v_obj)( ((PyObject*)(__pyx_v_obj))->ob_refcnt++); |
| 12934 | __Pyx_GIVEREF(__pyx_v_obj); |
| 12935 | PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_v_obj); |
| 12936 | __Pyx_GIVEREF(__pyx_t_6); |
| 12937 | PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[1] = __pyx_t_6); |
| 12938 | __Pyx_GIVEREF(__pyx_t_7); |
| 12939 | PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[2] = __pyx_t_7); |
| 12940 | __pyx_t_6 = 0; |
| 12941 | __pyx_t_7 = 0; |
| 12942 | __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 386; __pyx_clineno = __LINE__12942; goto __pyx_L4_error;} |
| 12943 | __Pyx_GOTREF(__pyx_t_7); |
| 12944 | __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; |
| 12945 | __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7)do { PyObject *tmp = (PyObject *) __pyx_v_obj; __pyx_v_obj = __pyx_t_7 ; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0); |
| 12946 | __pyx_t_7 = 0; |
| 12947 | |
| 12948 | /* "View.MemoryView":385 |
| 12949 | * cdef is_slice(self, obj): |
| 12950 | * if not isinstance(obj, memoryview): |
| 12951 | * try: # <<<<<<<<<<<<<< |
| 12952 | * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, |
| 12953 | * self.dtype_is_object) |
| 12954 | */ |
| 12955 | } |
| 12956 | __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; |
| 12957 | __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; |
| 12958 | __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; |
| 12959 | goto __pyx_L11_try_end; |
| 12960 | __pyx_L4_error:; |
| 12961 | __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; |
| 12962 | __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; |
| 12963 | __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; |
| 12964 | |
| 12965 | /* "View.MemoryView":388 |
| 12966 | * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, |
| 12967 | * self.dtype_is_object) |
| 12968 | * except TypeError: # <<<<<<<<<<<<<< |
| 12969 | * return None |
| 12970 | * |
| 12971 | */ |
| 12972 | __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); |
| 12973 | if (__pyx_t_9) { |
| 12974 | __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 12975 | if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__12975; goto __pyx_L6_except_error;} |
| 12976 | __Pyx_GOTREF(__pyx_t_7); |
| 12977 | __Pyx_GOTREF(__pyx_t_8); |
| 12978 | __Pyx_GOTREF(__pyx_t_6); |
| 12979 | |
| 12980 | /* "View.MemoryView":389 |
| 12981 | * self.dtype_is_object) |
| 12982 | * except TypeError: |
| 12983 | * return None # <<<<<<<<<<<<<< |
| 12984 | * |
| 12985 | * return obj |
| 12986 | */ |
| 12987 | __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); |
| 12988 | __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 12989 | __pyx_r = Py_None(&_Py_NoneStruct); |
| 12990 | __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; |
| 12991 | __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; |
| 12992 | __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; |
| 12993 | goto __pyx_L7_except_return; |
| 12994 | } |
| 12995 | goto __pyx_L6_except_error; |
| 12996 | __pyx_L6_except_error:; |
| 12997 | |
| 12998 | /* "View.MemoryView":385 |
| 12999 | * cdef is_slice(self, obj): |
| 13000 | * if not isinstance(obj, memoryview): |
| 13001 | * try: # <<<<<<<<<<<<<< |
| 13002 | * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, |
| 13003 | * self.dtype_is_object) |
| 13004 | */ |
| 13005 | __Pyx_XGIVEREF(__pyx_t_3); |
| 13006 | __Pyx_XGIVEREF(__pyx_t_4); |
| 13007 | __Pyx_XGIVEREF(__pyx_t_5); |
| 13008 | __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); |
| 13009 | goto __pyx_L1_error; |
| 13010 | __pyx_L7_except_return:; |
| 13011 | __Pyx_XGIVEREF(__pyx_t_3); |
| 13012 | __Pyx_XGIVEREF(__pyx_t_4); |
| 13013 | __Pyx_XGIVEREF(__pyx_t_5); |
| 13014 | __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); |
| 13015 | goto __pyx_L0; |
| 13016 | __pyx_L11_try_end:; |
| 13017 | } |
| 13018 | |
| 13019 | /* "View.MemoryView":384 |
| 13020 | * |
| 13021 | * cdef is_slice(self, obj): |
| 13022 | * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< |
| 13023 | * try: |
| 13024 | * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, |
| 13025 | */ |
| 13026 | } |
| 13027 | |
| 13028 | /* "View.MemoryView":391 |
| 13029 | * return None |
| 13030 | * |
| 13031 | * return obj # <<<<<<<<<<<<<< |
| 13032 | * |
| 13033 | * cdef setitem_slice_assignment(self, dst, src): |
| 13034 | */ |
| 13035 | __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); |
| 13036 | __Pyx_INCREF(__pyx_v_obj)( ((PyObject*)(__pyx_v_obj))->ob_refcnt++); |
| 13037 | __pyx_r = __pyx_v_obj; |
| 13038 | goto __pyx_L0; |
| 13039 | |
| 13040 | /* "View.MemoryView":383 |
| 13041 | * self.setitem_indexed(index, value) |
| 13042 | * |
| 13043 | * cdef is_slice(self, obj): # <<<<<<<<<<<<<< |
| 13044 | * if not isinstance(obj, memoryview): |
| 13045 | * try: |
| 13046 | */ |
| 13047 | |
| 13048 | /* function exit code */ |
| 13049 | __pyx_L1_error:; |
| 13050 | __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); |
| 13051 | __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); |
| 13052 | __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); |
| 13053 | __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 13054 | __pyx_r = 0; |
| 13055 | __pyx_L0:; |
| 13056 | __Pyx_XDECREF(__pyx_v_obj)do { if ((__pyx_v_obj) == ((void*)0)) ; else do { if ( --((PyObject *)(__pyx_v_obj))->ob_refcnt != 0) ; else ( (*(((PyObject*) ((PyObject *)(__pyx_v_obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_obj)))); } while (0); } while (0); |
| 13057 | __Pyx_XGIVEREF(__pyx_r); |
| 13058 | __Pyx_RefNannyFinishContext(); |
| 13059 | return __pyx_r; |
| 13060 | } |
| 13061 | |
| 13062 | /* "View.MemoryView":393 |
| 13063 | * return obj |
| 13064 | * |
| 13065 | * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< |
| 13066 | * cdef __Pyx_memviewslice dst_slice |
| 13067 | * cdef __Pyx_memviewslice src_slice |
| 13068 | */ |
| 13069 | |
| 13070 | static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) { |
| 13071 | __Pyx_memviewslice __pyx_v_dst_slice; |
| 13072 | __Pyx_memviewslice __pyx_v_src_slice; |
| 13073 | PyObject *__pyx_r = NULL((void*)0); |
| 13074 | __Pyx_RefNannyDeclarations |
| 13075 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 13076 | int __pyx_t_2; |
| 13077 | int __pyx_t_3; |
| 13078 | int __pyx_t_4; |
| 13079 | int __pyx_lineno = 0; |
| 13080 | const char *__pyx_filename = NULL((void*)0); |
| 13081 | int __pyx_clineno = 0; |
| 13082 | __Pyx_RefNannySetupContext("setitem_slice_assignment", 0); |
| 13083 | |
| 13084 | /* "View.MemoryView":397 |
| 13085 | * cdef __Pyx_memviewslice src_slice |
| 13086 | * |
| 13087 | * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<< |
| 13088 | * get_slice_from_memview(dst, &dst_slice)[0], |
| 13089 | * src.ndim, dst.ndim, self.dtype_is_object) |
| 13090 | */ |
| 13091 | if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type)))__builtin_expect(!!(((__pyx_v_src) == (&_Py_NoneStruct)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type )), 1)), 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__13091; goto __pyx_L1_error;} |
| 13092 | |
| 13093 | /* "View.MemoryView":398 |
| 13094 | * |
| 13095 | * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], |
| 13096 | * get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<< |
| 13097 | * src.ndim, dst.ndim, self.dtype_is_object) |
| 13098 | * |
| 13099 | */ |
| 13100 | if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type)))__builtin_expect(!!(((__pyx_v_dst) == (&_Py_NoneStruct)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type )), 1)), 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 398; __pyx_clineno = __LINE__13100; goto __pyx_L1_error;} |
| 13101 | |
| 13102 | /* "View.MemoryView":399 |
| 13103 | * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], |
| 13104 | * get_slice_from_memview(dst, &dst_slice)[0], |
| 13105 | * src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<< |
| 13106 | * |
| 13107 | * cdef setitem_slice_assign_scalar(self, memoryview dst, value): |
| 13108 | */ |
| 13109 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 399; __pyx_clineno = __LINE__13109; goto __pyx_L1_error;} |
| 13110 | __Pyx_GOTREF(__pyx_t_1); |
| 13111 | __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_2 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 399; __pyx_clineno = __LINE__13111; goto __pyx_L1_error;} |
| 13112 | __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; |
| 13113 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 399; __pyx_clineno = __LINE__13113; goto __pyx_L1_error;} |
| 13114 | __Pyx_GOTREF(__pyx_t_1); |
| 13115 | __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 399; __pyx_clineno = __LINE__13115; goto __pyx_L1_error;} |
| 13116 | __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; |
| 13117 | |
| 13118 | /* "View.MemoryView":397 |
| 13119 | * cdef __Pyx_memviewslice src_slice |
| 13120 | * |
| 13121 | * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<< |
| 13122 | * get_slice_from_memview(dst, &dst_slice)[0], |
| 13123 | * src.ndim, dst.ndim, self.dtype_is_object) |
| 13124 | */ |
| 13125 | __pyx_t_4 = __pyx_memoryview_copy_contents((__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice))[0]), (__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice))[0]), __pyx_t_2, __pyx_t_3, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_4 == -1)__builtin_expect(!!(__pyx_t_4 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__13125; goto __pyx_L1_error;} |
| 13126 | |
| 13127 | /* "View.MemoryView":393 |
| 13128 | * return obj |
| 13129 | * |
| 13130 | * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< |
| 13131 | * cdef __Pyx_memviewslice dst_slice |
| 13132 | * cdef __Pyx_memviewslice src_slice |
| 13133 | */ |
| 13134 | |
| 13135 | /* function exit code */ |
| 13136 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 13137 | goto __pyx_L0; |
| 13138 | __pyx_L1_error:; |
| 13139 | __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); |
| 13140 | __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 13141 | __pyx_r = 0; |
| 13142 | __pyx_L0:; |
| 13143 | __Pyx_XGIVEREF(__pyx_r); |
| 13144 | __Pyx_RefNannyFinishContext(); |
| 13145 | return __pyx_r; |
| 13146 | } |
| 13147 | |
| 13148 | /* "View.MemoryView":401 |
| 13149 | * src.ndim, dst.ndim, self.dtype_is_object) |
| 13150 | * |
| 13151 | * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< |
| 13152 | * cdef int array[128] |
| 13153 | * cdef void *tmp = NULL |
| 13154 | */ |
| 13155 | |
| 13156 | static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) { |
| 13157 | int __pyx_v_array[0x80]; |
| 13158 | void *__pyx_v_tmp; |
| 13159 | void *__pyx_v_item; |
| 13160 | __Pyx_memviewslice *__pyx_v_dst_slice; |
| 13161 | __Pyx_memviewslice __pyx_v_tmp_slice; |
| 13162 | PyObject *__pyx_r = NULL((void*)0); |
| 13163 | __Pyx_RefNannyDeclarations |
| 13164 | int __pyx_t_1; |
| 13165 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 13166 | int __pyx_t_3; |
| 13167 | int __pyx_t_4; |
| 13168 | char const *__pyx_t_5; |
| 13169 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 13170 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 13171 | PyObject *__pyx_t_8 = NULL((void*)0); |
| 13172 | PyObject *__pyx_t_9 = NULL((void*)0); |
| 13173 | PyObject *__pyx_t_10 = NULL((void*)0); |
| 13174 | PyObject *__pyx_t_11 = NULL((void*)0); |
| 13175 | int __pyx_lineno = 0; |
| 13176 | const char *__pyx_filename = NULL((void*)0); |
| 13177 | int __pyx_clineno = 0; |
| 13178 | __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0); |
| 13179 | |
| 13180 | /* "View.MemoryView":403 |
| 13181 | * cdef setitem_slice_assign_scalar(self, memoryview dst, value): |
| 13182 | * cdef int array[128] |
| 13183 | * cdef void *tmp = NULL # <<<<<<<<<<<<<< |
| 13184 | * cdef void *item |
| 13185 | * |
| 13186 | */ |
| 13187 | __pyx_v_tmp = NULL((void*)0); |
| 13188 | |
| 13189 | /* "View.MemoryView":408 |
| 13190 | * cdef __Pyx_memviewslice *dst_slice |
| 13191 | * cdef __Pyx_memviewslice tmp_slice |
| 13192 | * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<< |
| 13193 | * |
| 13194 | * if <size_t>self.view.itemsize > sizeof(array): |
| 13195 | */ |
| 13196 | __pyx_v_dst_slice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); |
| 13197 | |
| 13198 | /* "View.MemoryView":410 |
| 13199 | * dst_slice = get_slice_from_memview(dst, &tmp_slice) |
| 13200 | * |
| 13201 | * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< |
| 13202 | * tmp = PyMem_Malloc(self.view.itemsize) |
| 13203 | * if tmp == NULL: |
| 13204 | */ |
| 13205 | __pyx_t_1 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0); |
| 13206 | if (__pyx_t_1) { |
| 13207 | |
| 13208 | /* "View.MemoryView":411 |
| 13209 | * |
| 13210 | * if <size_t>self.view.itemsize > sizeof(array): |
| 13211 | * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<< |
| 13212 | * if tmp == NULL: |
| 13213 | * raise MemoryError |
| 13214 | */ |
| 13215 | __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize); |
| 13216 | |
| 13217 | /* "View.MemoryView":412 |
| 13218 | * if <size_t>self.view.itemsize > sizeof(array): |
| 13219 | * tmp = PyMem_Malloc(self.view.itemsize) |
| 13220 | * if tmp == NULL: # <<<<<<<<<<<<<< |
| 13221 | * raise MemoryError |
| 13222 | * item = tmp |
| 13223 | */ |
| 13224 | __pyx_t_1 = ((__pyx_v_tmp == NULL((void*)0)) != 0); |
| 13225 | if (__pyx_t_1) { |
| 13226 | |
| 13227 | /* "View.MemoryView":413 |
| 13228 | * tmp = PyMem_Malloc(self.view.itemsize) |
| 13229 | * if tmp == NULL: |
| 13230 | * raise MemoryError # <<<<<<<<<<<<<< |
| 13231 | * item = tmp |
| 13232 | * else: |
| 13233 | */ |
| 13234 | PyErr_NoMemory(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 413; __pyx_clineno = __LINE__13234; goto __pyx_L1_error;} |
| 13235 | |
| 13236 | /* "View.MemoryView":412 |
| 13237 | * if <size_t>self.view.itemsize > sizeof(array): |
| 13238 | * tmp = PyMem_Malloc(self.view.itemsize) |
| 13239 | * if tmp == NULL: # <<<<<<<<<<<<<< |
| 13240 | * raise MemoryError |
| 13241 | * item = tmp |
| 13242 | */ |
| 13243 | } |
| 13244 | |
| 13245 | /* "View.MemoryView":414 |
| 13246 | * if tmp == NULL: |
| 13247 | * raise MemoryError |
| 13248 | * item = tmp # <<<<<<<<<<<<<< |
| 13249 | * else: |
| 13250 | * item = <void *> array |
| 13251 | */ |
| 13252 | __pyx_v_item = __pyx_v_tmp; |
| 13253 | |
| 13254 | /* "View.MemoryView":410 |
| 13255 | * dst_slice = get_slice_from_memview(dst, &tmp_slice) |
| 13256 | * |
| 13257 | * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< |
| 13258 | * tmp = PyMem_Malloc(self.view.itemsize) |
| 13259 | * if tmp == NULL: |
| 13260 | */ |
| 13261 | goto __pyx_L3; |
| 13262 | } |
| 13263 | |
| 13264 | /* "View.MemoryView":416 |
| 13265 | * item = tmp |
| 13266 | * else: |
| 13267 | * item = <void *> array # <<<<<<<<<<<<<< |
| 13268 | * |
| 13269 | * try: |
| 13270 | */ |
| 13271 | /*else*/ { |
| 13272 | __pyx_v_item = ((void *)__pyx_v_array); |
| 13273 | } |
| 13274 | __pyx_L3:; |
| 13275 | |
| 13276 | /* "View.MemoryView":418 |
| 13277 | * item = <void *> array |
| 13278 | * |
| 13279 | * try: # <<<<<<<<<<<<<< |
| 13280 | * if self.dtype_is_object: |
| 13281 | * (<PyObject **> item)[0] = <PyObject *> value |
| 13282 | */ |
| 13283 | /*try:*/ { |
| 13284 | |
| 13285 | /* "View.MemoryView":419 |
| 13286 | * |
| 13287 | * try: |
| 13288 | * if self.dtype_is_object: # <<<<<<<<<<<<<< |
| 13289 | * (<PyObject **> item)[0] = <PyObject *> value |
| 13290 | * else: |
| 13291 | */ |
| 13292 | __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0); |
| 13293 | if (__pyx_t_1) { |
| 13294 | |
| 13295 | /* "View.MemoryView":420 |
| 13296 | * try: |
| 13297 | * if self.dtype_is_object: |
| 13298 | * (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<< |
| 13299 | * else: |
| 13300 | * self.assign_item_from_object(<char *> item, value) |
| 13301 | */ |
| 13302 | (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value); |
| 13303 | |
| 13304 | /* "View.MemoryView":419 |
| 13305 | * |
| 13306 | * try: |
| 13307 | * if self.dtype_is_object: # <<<<<<<<<<<<<< |
| 13308 | * (<PyObject **> item)[0] = <PyObject *> value |
| 13309 | * else: |
| 13310 | */ |
| 13311 | goto __pyx_L8; |
| 13312 | } |
| 13313 | |
| 13314 | /* "View.MemoryView":422 |
| 13315 | * (<PyObject **> item)[0] = <PyObject *> value |
| 13316 | * else: |
| 13317 | * self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<< |
| 13318 | * |
| 13319 | * |
| 13320 | */ |
| 13321 | /*else*/ { |
| 13322 | __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 422; __pyx_clineno = __LINE__13322; goto __pyx_L6_error;} |
| 13323 | __Pyx_GOTREF(__pyx_t_2); |
| 13324 | __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; |
| 13325 | } |
| 13326 | __pyx_L8:; |
| 13327 | |
| 13328 | /* "View.MemoryView":426 |
| 13329 | * |
| 13330 | * |
| 13331 | * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< |
| 13332 | * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) |
| 13333 | * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, |
| 13334 | */ |
| 13335 | __pyx_t_1 = ((__pyx_v_self->view.suboffsets != NULL((void*)0)) != 0); |
| 13336 | if (__pyx_t_1) { |
| 13337 | |
| 13338 | /* "View.MemoryView":427 |
| 13339 | * |
| 13340 | * if self.view.suboffsets != NULL: |
| 13341 | * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<< |
| 13342 | * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, |
| 13343 | * item, self.dtype_is_object) |
| 13344 | */ |
| 13345 | __pyx_t_2 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 427; __pyx_clineno = __LINE__13345; goto __pyx_L6_error;} |
| 13346 | __Pyx_GOTREF(__pyx_t_2); |
| 13347 | __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; |
| 13348 | |
| 13349 | /* "View.MemoryView":426 |
| 13350 | * |
| 13351 | * |
| 13352 | * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< |
| 13353 | * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) |
| 13354 | * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, |
| 13355 | */ |
| 13356 | } |
| 13357 | |
| 13358 | /* "View.MemoryView":428 |
| 13359 | * if self.view.suboffsets != NULL: |
| 13360 | * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) |
| 13361 | * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<< |
| 13362 | * item, self.dtype_is_object) |
| 13363 | * finally: |
| 13364 | */ |
| 13365 | __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object); |
| 13366 | } |
| 13367 | |
| 13368 | /* "View.MemoryView":431 |
| 13369 | * item, self.dtype_is_object) |
| 13370 | * finally: |
| 13371 | * PyMem_Free(tmp) # <<<<<<<<<<<<<< |
| 13372 | * |
| 13373 | * cdef setitem_indexed(self, index, value): |
| 13374 | */ |
| 13375 | /*finally:*/ { |
| 13376 | /*normal exit:*/{ |
| 13377 | PyMem_Free(__pyx_v_tmp); |
| 13378 | goto __pyx_L7; |
| 13379 | } |
| 13380 | /*exception exit:*/{ |
| 13381 | __pyx_L6_error:; |
| 13382 | __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; |
| 13383 | __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; |
| 13384 | if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); |
| 13385 | if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7 , &__pyx_t_8) < 0), 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); |
| 13386 | __Pyx_XGOTREF(__pyx_t_6); |
| 13387 | __Pyx_XGOTREF(__pyx_t_7); |
| 13388 | __Pyx_XGOTREF(__pyx_t_8); |
| 13389 | __Pyx_XGOTREF(__pyx_t_9); |
| 13390 | __Pyx_XGOTREF(__pyx_t_10); |
| 13391 | __Pyx_XGOTREF(__pyx_t_11); |
| 13392 | __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename; |
| 13393 | { |
| 13394 | PyMem_Free(__pyx_v_tmp); |
| 13395 | } |
| 13396 | if (PY_MAJOR_VERSION2 >= 3) { |
| 13397 | __Pyx_XGIVEREF(__pyx_t_9); |
| 13398 | __Pyx_XGIVEREF(__pyx_t_10); |
| 13399 | __Pyx_XGIVEREF(__pyx_t_11); |
| 13400 | __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); |
| 13401 | } |
| 13402 | __Pyx_XGIVEREF(__pyx_t_6); |
| 13403 | __Pyx_XGIVEREF(__pyx_t_7); |
| 13404 | __Pyx_XGIVEREF(__pyx_t_8); |
| 13405 | __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8); |
| 13406 | __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; |
| 13407 | __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5; |
| 13408 | goto __pyx_L1_error; |
| 13409 | } |
| 13410 | __pyx_L7:; |
| 13411 | } |
| 13412 | |
| 13413 | /* "View.MemoryView":401 |
| 13414 | * src.ndim, dst.ndim, self.dtype_is_object) |
| 13415 | * |
| 13416 | * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< |
| 13417 | * cdef int array[128] |
| 13418 | * cdef void *tmp = NULL |
| 13419 | */ |
| 13420 | |
| 13421 | /* function exit code */ |
| 13422 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 13423 | goto __pyx_L0; |
| 13424 | __pyx_L1_error:; |
| 13425 | __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); |
| 13426 | __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 13427 | __pyx_r = 0; |
| 13428 | __pyx_L0:; |
| 13429 | __Pyx_XGIVEREF(__pyx_r); |
| 13430 | __Pyx_RefNannyFinishContext(); |
| 13431 | return __pyx_r; |
| 13432 | } |
| 13433 | |
| 13434 | /* "View.MemoryView":433 |
| 13435 | * PyMem_Free(tmp) |
| 13436 | * |
| 13437 | * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< |
| 13438 | * cdef char *itemp = self.get_item_pointer(index) |
| 13439 | * self.assign_item_from_object(itemp, value) |
| 13440 | */ |
| 13441 | |
| 13442 | static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { |
| 13443 | char *__pyx_v_itemp; |
| 13444 | PyObject *__pyx_r = NULL((void*)0); |
| 13445 | __Pyx_RefNannyDeclarations |
| 13446 | char *__pyx_t_1; |
| 13447 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 13448 | int __pyx_lineno = 0; |
| 13449 | const char *__pyx_filename = NULL((void*)0); |
| 13450 | int __pyx_clineno = 0; |
| 13451 | __Pyx_RefNannySetupContext("setitem_indexed", 0); |
| 13452 | |
| 13453 | /* "View.MemoryView":434 |
| 13454 | * |
| 13455 | * cdef setitem_indexed(self, index, value): |
| 13456 | * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<< |
| 13457 | * self.assign_item_from_object(itemp, value) |
| 13458 | * |
| 13459 | */ |
| 13460 | __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 434; __pyx_clineno = __LINE__13460; goto __pyx_L1_error;} |
| 13461 | __pyx_v_itemp = __pyx_t_1; |
| 13462 | |
| 13463 | /* "View.MemoryView":435 |
| 13464 | * cdef setitem_indexed(self, index, value): |
| 13465 | * cdef char *itemp = self.get_item_pointer(index) |
| 13466 | * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<< |
| 13467 | * |
| 13468 | * cdef convert_item_to_object(self, char *itemp): |
| 13469 | */ |
| 13470 | __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 435; __pyx_clineno = __LINE__13470; goto __pyx_L1_error;} |
| 13471 | __Pyx_GOTREF(__pyx_t_2); |
| 13472 | __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; |
| 13473 | |
| 13474 | /* "View.MemoryView":433 |
| 13475 | * PyMem_Free(tmp) |
| 13476 | * |
| 13477 | * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< |
| 13478 | * cdef char *itemp = self.get_item_pointer(index) |
| 13479 | * self.assign_item_from_object(itemp, value) |
| 13480 | */ |
| 13481 | |
| 13482 | /* function exit code */ |
| 13483 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 13484 | goto __pyx_L0; |
| 13485 | __pyx_L1_error:; |
| 13486 | __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); |
| 13487 | __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 13488 | __pyx_r = 0; |
| 13489 | __pyx_L0:; |
| 13490 | __Pyx_XGIVEREF(__pyx_r); |
| 13491 | __Pyx_RefNannyFinishContext(); |
| 13492 | return __pyx_r; |
| 13493 | } |
| 13494 | |
| 13495 | /* "View.MemoryView":437 |
| 13496 | * self.assign_item_from_object(itemp, value) |
| 13497 | * |
| 13498 | * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< |
| 13499 | * """Only used if instantiated manually by the user, or if Cython doesn't |
| 13500 | * know how to convert the type""" |
| 13501 | */ |
| 13502 | |
| 13503 | static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) { |
| 13504 | PyObject *__pyx_v_struct = NULL((void*)0); |
| 13505 | PyObject *__pyx_v_bytesitem = 0; |
| 13506 | PyObject *__pyx_v_result = NULL((void*)0); |
| 13507 | PyObject *__pyx_r = NULL((void*)0); |
| 13508 | __Pyx_RefNannyDeclarations |
| 13509 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 13510 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 13511 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 13512 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 13513 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 13514 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 13515 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 13516 | Py_ssize_t __pyx_t_8; |
| 13517 | PyObject *__pyx_t_9 = NULL((void*)0); |
| 13518 | size_t __pyx_t_10; |
| 13519 | int __pyx_t_11; |
| 13520 | int __pyx_t_12; |
| 13521 | int __pyx_lineno = 0; |
| 13522 | const char *__pyx_filename = NULL((void*)0); |
| 13523 | int __pyx_clineno = 0; |
| 13524 | __Pyx_RefNannySetupContext("convert_item_to_object", 0); |
| 13525 | |
| 13526 | /* "View.MemoryView":440 |
| 13527 | * """Only used if instantiated manually by the user, or if Cython doesn't |
| 13528 | * know how to convert the type""" |
| 13529 | * import struct # <<<<<<<<<<<<<< |
| 13530 | * cdef bytes bytesitem |
| 13531 | * |
| 13532 | */ |
| 13533 | __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__13533; goto __pyx_L1_error;} |
| 13534 | __Pyx_GOTREF(__pyx_t_1); |
| 13535 | __pyx_v_struct = __pyx_t_1; |
| 13536 | __pyx_t_1 = 0; |
| 13537 | |
| 13538 | /* "View.MemoryView":443 |
| 13539 | * cdef bytes bytesitem |
| 13540 | * |
| 13541 | * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<< |
| 13542 | * try: |
| 13543 | * result = struct.unpack(self.view.format, bytesitem) |
| 13544 | */ |
| 13545 | __pyx_t_1 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 443; __pyx_clineno = __LINE__13545; goto __pyx_L1_error;} |
| 13546 | __Pyx_GOTREF(__pyx_t_1); |
| 13547 | __pyx_v_bytesitem = ((PyObject*)__pyx_t_1); |
| 13548 | __pyx_t_1 = 0; |
| 13549 | |
| 13550 | /* "View.MemoryView":444 |
| 13551 | * |
| 13552 | * bytesitem = itemp[:self.view.itemsize] |
| 13553 | * try: # <<<<<<<<<<<<<< |
| 13554 | * result = struct.unpack(self.view.format, bytesitem) |
| 13555 | * except struct.error: |
| 13556 | */ |
| 13557 | { |
| 13558 | __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); |
| 13559 | __Pyx_XGOTREF(__pyx_t_2); |
| 13560 | __Pyx_XGOTREF(__pyx_t_3); |
| 13561 | __Pyx_XGOTREF(__pyx_t_4); |
| 13562 | /*try:*/ { |
| 13563 | |
| 13564 | /* "View.MemoryView":445 |
| 13565 | * bytesitem = itemp[:self.view.itemsize] |
| 13566 | * try: |
| 13567 | * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<< |
| 13568 | * except struct.error: |
| 13569 | * raise ValueError("Unable to convert item to object") |
| 13570 | */ |
| 13571 | __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 445; __pyx_clineno = __LINE__13571; goto __pyx_L3_error;} |
| 13572 | __Pyx_GOTREF(__pyx_t_5); |
| 13573 | __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 445; __pyx_clineno = __LINE__13573; goto __pyx_L3_error;} |
| 13574 | __Pyx_GOTREF(__pyx_t_6); |
| 13575 | __pyx_t_7 = NULL((void*)0); |
| 13576 | __pyx_t_8 = 0; |
| 13577 | if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type )), 1)) { |
| 13578 | __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self); |
| 13579 | if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) { |
| 13580 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func); |
| 13581 | __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++); |
| 13582 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 13583 | __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); |
| 13584 | __pyx_t_8 = 1; |
| 13585 | } |
| 13586 | } |
| 13587 | __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 445; __pyx_clineno = __LINE__13587; goto __pyx_L3_error;} |
| 13588 | __Pyx_GOTREF(__pyx_t_9); |
| 13589 | if (__pyx_t_7) { |
| 13590 | __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); |
| 13591 | } |
| 13592 | __Pyx_GIVEREF(__pyx_t_6); |
| 13593 | PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+__pyx_t_8] = __pyx_t_6 ); |
| 13594 | __Pyx_INCREF(__pyx_v_bytesitem)( ((PyObject*)(__pyx_v_bytesitem))->ob_refcnt++); |
| 13595 | __Pyx_GIVEREF(__pyx_v_bytesitem); |
| 13596 | PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem)(((PyTupleObject *)(__pyx_t_9))->ob_item[1+__pyx_t_8] = __pyx_v_bytesitem ); |
| 13597 | __pyx_t_6 = 0; |
| 13598 | __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[2]; __pyx_lineno = 445; __pyx_clineno = __LINE__13598; goto __pyx_L3_error;} |
| 13599 | __Pyx_GOTREF(__pyx_t_1); |
| 13600 | __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; |
| 13601 | __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; |
| 13602 | __pyx_v_result = __pyx_t_1; |
| 13603 | __pyx_t_1 = 0; |
| 13604 | |
| 13605 | /* "View.MemoryView":444 |
| 13606 | * |
| 13607 | * bytesitem = itemp[:self.view.itemsize] |
| 13608 | * try: # <<<<<<<<<<<<<< |
| 13609 | * result = struct.unpack(self.view.format, bytesitem) |
| 13610 | * except struct.error: |
| 13611 | */ |
| 13612 | } |
| 13613 | |
| 13614 | /* "View.MemoryView":449 |
| 13615 | * raise ValueError("Unable to convert item to object") |
| 13616 | * else: |
| 13617 | * if len(self.view.format) == 1: # <<<<<<<<<<<<<< |
| 13618 | * return result[0] |
| 13619 | * return result |
| 13620 | */ |
| 13621 | /*else:*/ { |
| 13622 | __pyx_t_10 = strlen(__pyx_v_self->view.format); |
| 13623 | __pyx_t_11 = ((__pyx_t_10 == 1) != 0); |
| 13624 | if (__pyx_t_11) { |
| 13625 | |
| 13626 | /* "View.MemoryView":450 |
| 13627 | * else: |
| 13628 | * if len(self.view.format) == 1: |
| 13629 | * return result[0] # <<<<<<<<<<<<<< |
| 13630 | * return result |
| 13631 | * |
| 13632 | */ |
| 13633 | __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); |
| 13634 | __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 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_v_result, (Py_ssize_t)0, 0, 0, 1) : (0 ? (PyErr_SetString (PyExc_IndexError, "list index out of range"), (PyObject*)((void *)0)) : __Pyx_GetItemInt_Generic(__pyx_v_result, __Pyx_PyInt_From_long (0)))); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 450; __pyx_clineno = __LINE__13634; goto __pyx_L5_except_error;}; |
| 13635 | __Pyx_GOTREF(__pyx_t_1); |
| 13636 | __pyx_r = __pyx_t_1; |
| 13637 | __pyx_t_1 = 0; |
| 13638 | goto __pyx_L6_except_return; |
| 13639 | |
| 13640 | /* "View.MemoryView":449 |
| 13641 | * raise ValueError("Unable to convert item to object") |
| 13642 | * else: |
| 13643 | * if len(self.view.format) == 1: # <<<<<<<<<<<<<< |
| 13644 | * return result[0] |
| 13645 | * return result |
| 13646 | */ |
| 13647 | } |
| 13648 | |
| 13649 | /* "View.MemoryView":451 |
| 13650 | * if len(self.view.format) == 1: |
| 13651 | * return result[0] |
| 13652 | * return result # <<<<<<<<<<<<<< |
| 13653 | * |
| 13654 | * cdef assign_item_from_object(self, char *itemp, object value): |
| 13655 | */ |
| 13656 | __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); |
| 13657 | __Pyx_INCREF(__pyx_v_result)( ((PyObject*)(__pyx_v_result))->ob_refcnt++); |
| 13658 | __pyx_r = __pyx_v_result; |
| 13659 | goto __pyx_L6_except_return; |
| 13660 | } |
| 13661 | __pyx_L3_error:; |
| 13662 | __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; |
| 13663 | __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; |
| 13664 | __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; |
| 13665 | __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; |
| 13666 | __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; |
| 13667 | |
| 13668 | /* "View.MemoryView":446 |
| 13669 | * try: |
| 13670 | * result = struct.unpack(self.view.format, bytesitem) |
| 13671 | * except struct.error: # <<<<<<<<<<<<<< |
| 13672 | * raise ValueError("Unable to convert item to object") |
| 13673 | * else: |
| 13674 | */ |
| 13675 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 446; __pyx_clineno = __LINE__13675; goto __pyx_L5_except_error;} |
| 13676 | __Pyx_GOTREF(__pyx_t_1); |
| 13677 | __pyx_t_12 = PyErr_ExceptionMatches(__pyx_t_1); |
| 13678 | __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; |
| 13679 | if (__pyx_t_12) { |
| 13680 | __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 13681 | if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 446; __pyx_clineno = __LINE__13681; goto __pyx_L5_except_error;} |
| 13682 | __Pyx_GOTREF(__pyx_t_1); |
| 13683 | __Pyx_GOTREF(__pyx_t_5); |
| 13684 | __Pyx_GOTREF(__pyx_t_9); |
| 13685 | |
| 13686 | /* "View.MemoryView":447 |
| 13687 | * result = struct.unpack(self.view.format, bytesitem) |
| 13688 | * except struct.error: |
| 13689 | * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<< |
| 13690 | * else: |
| 13691 | * if len(self.view.format) == 1: |
| 13692 | */ |
| 13693 | __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__29, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 447; __pyx_clineno = __LINE__13693; goto __pyx_L5_except_error;} |
| 13694 | __Pyx_GOTREF(__pyx_t_6); |
| 13695 | __Pyx_Raise(__pyx_t_6, 0, 0, 0); |
| 13696 | __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; |
| 13697 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 447; __pyx_clineno = __LINE__13697; goto __pyx_L5_except_error;} |
| 13698 | } |
| 13699 | goto __pyx_L5_except_error; |
| 13700 | __pyx_L5_except_error:; |
| 13701 | |
| 13702 | /* "View.MemoryView":444 |
| 13703 | * |
| 13704 | * bytesitem = itemp[:self.view.itemsize] |
| 13705 | * try: # <<<<<<<<<<<<<< |
| 13706 | * result = struct.unpack(self.view.format, bytesitem) |
| 13707 | * except struct.error: |
| 13708 | */ |
| 13709 | __Pyx_XGIVEREF(__pyx_t_2); |
| 13710 | __Pyx_XGIVEREF(__pyx_t_3); |
| 13711 | __Pyx_XGIVEREF(__pyx_t_4); |
| 13712 | __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); |
| 13713 | goto __pyx_L1_error; |
| 13714 | __pyx_L6_except_return:; |
| 13715 | __Pyx_XGIVEREF(__pyx_t_2); |
| 13716 | __Pyx_XGIVEREF(__pyx_t_3); |
| 13717 | __Pyx_XGIVEREF(__pyx_t_4); |
| 13718 | __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); |
| 13719 | goto __pyx_L0; |
| 13720 | } |
| 13721 | |
| 13722 | /* "View.MemoryView":437 |
| 13723 | * self.assign_item_from_object(itemp, value) |
| 13724 | * |
| 13725 | * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< |
| 13726 | * """Only used if instantiated manually by the user, or if Cython doesn't |
| 13727 | * know how to convert the type""" |
| 13728 | */ |
| 13729 | |
| 13730 | /* function exit code */ |
| 13731 | __pyx_L1_error:; |
| 13732 | __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); |
| 13733 | __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); |
| 13734 | __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); |
| 13735 | __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); |
| 13736 | __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); |
| 13737 | __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 13738 | __pyx_r = 0; |
| 13739 | __pyx_L0:; |
| 13740 | __Pyx_XDECREF(__pyx_v_struct)do { if ((__pyx_v_struct) == ((void*)0)) ; else do { if ( --( (PyObject*)(__pyx_v_struct))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(__pyx_v_struct)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_struct)))); } while (0); } while (0); |
| 13741 | __Pyx_XDECREF(__pyx_v_bytesitem)do { if ((__pyx_v_bytesitem) == ((void*)0)) ; else do { if ( -- ((PyObject*)(__pyx_v_bytesitem))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_bytesitem)))->ob_type )->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_bytesitem )))); } while (0); } while (0); |
| 13742 | __Pyx_XDECREF(__pyx_v_result)do { if ((__pyx_v_result) == ((void*)0)) ; else do { if ( --( (PyObject*)(__pyx_v_result))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(__pyx_v_result)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_result)))); } while (0); } while (0); |
| 13743 | __Pyx_XGIVEREF(__pyx_r); |
| 13744 | __Pyx_RefNannyFinishContext(); |
| 13745 | return __pyx_r; |
| 13746 | } |
| 13747 | |
| 13748 | /* "View.MemoryView":453 |
| 13749 | * return result |
| 13750 | * |
| 13751 | * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< |
| 13752 | * """Only used if instantiated manually by the user, or if Cython doesn't |
| 13753 | * know how to convert the type""" |
| 13754 | */ |
| 13755 | |
| 13756 | static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { |
| 13757 | PyObject *__pyx_v_struct = NULL((void*)0); |
| 13758 | char __pyx_v_c; |
| 13759 | PyObject *__pyx_v_bytesvalue = 0; |
| 13760 | Py_ssize_t __pyx_v_i; |
| 13761 | PyObject *__pyx_r = NULL((void*)0); |
| 13762 | __Pyx_RefNannyDeclarations |
| 13763 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 13764 | int __pyx_t_2; |
| 13765 | int __pyx_t_3; |
| 13766 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 13767 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 13768 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 13769 | Py_ssize_t __pyx_t_7; |
| 13770 | PyObject *__pyx_t_8 = NULL((void*)0); |
| 13771 | PyObject *__pyx_t_9 = NULL((void*)0); |
| 13772 | char *__pyx_t_10; |
| 13773 | char *__pyx_t_11; |
| 13774 | char *__pyx_t_12; |
| 13775 | char *__pyx_t_13; |
| 13776 | int __pyx_lineno = 0; |
| 13777 | const char *__pyx_filename = NULL((void*)0); |
| 13778 | int __pyx_clineno = 0; |
| 13779 | __Pyx_RefNannySetupContext("assign_item_from_object", 0); |
| 13780 | |
| 13781 | /* "View.MemoryView":456 |
| 13782 | * """Only used if instantiated manually by the user, or if Cython doesn't |
| 13783 | * know how to convert the type""" |
| 13784 | * import struct # <<<<<<<<<<<<<< |
| 13785 | * cdef char c |
| 13786 | * cdef bytes bytesvalue |
| 13787 | */ |
| 13788 | __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 456; __pyx_clineno = __LINE__13788; goto __pyx_L1_error;} |
| 13789 | __Pyx_GOTREF(__pyx_t_1); |
| 13790 | __pyx_v_struct = __pyx_t_1; |
| 13791 | __pyx_t_1 = 0; |
| 13792 | |
| 13793 | /* "View.MemoryView":461 |
| 13794 | * cdef Py_ssize_t i |
| 13795 | * |
| 13796 | * if isinstance(value, tuple): # <<<<<<<<<<<<<< |
| 13797 | * bytesvalue = struct.pack(self.view.format, *value) |
| 13798 | * else: |
| 13799 | */ |
| 13800 | __pyx_t_2 = PyTuple_Check(__pyx_v_value)((((((PyObject*)(__pyx_v_value))->ob_type))->tp_flags & ((1L<<26))) != 0); |
| 13801 | __pyx_t_3 = (__pyx_t_2 != 0); |
| 13802 | if (__pyx_t_3) { |
| 13803 | |
| 13804 | /* "View.MemoryView":462 |
| 13805 | * |
| 13806 | * if isinstance(value, tuple): |
| 13807 | * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<< |
| 13808 | * else: |
| 13809 | * bytesvalue = struct.pack(self.view.format, value) |
| 13810 | */ |
| 13811 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 462; __pyx_clineno = __LINE__13811; goto __pyx_L1_error;} |
| 13812 | __Pyx_GOTREF(__pyx_t_1); |
| 13813 | __pyx_t_4 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 462; __pyx_clineno = __LINE__13813; goto __pyx_L1_error;} |
| 13814 | __Pyx_GOTREF(__pyx_t_4); |
| 13815 | __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 462; __pyx_clineno = __LINE__13815; goto __pyx_L1_error;} |
| 13816 | __Pyx_GOTREF(__pyx_t_5); |
| 13817 | __Pyx_GIVEREF(__pyx_t_4); |
| 13818 | PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_4); |
| 13819 | __pyx_t_4 = 0; |
| 13820 | __pyx_t_4 = PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 462; __pyx_clineno = __LINE__13820; goto __pyx_L1_error;} |
| 13821 | __Pyx_GOTREF(__pyx_t_4); |
| 13822 | __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 462; __pyx_clineno = __LINE__13822; goto __pyx_L1_error;} |
| 13823 | __Pyx_GOTREF(__pyx_t_6); |
| 13824 | __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; |
| 13825 | __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; |
| 13826 | __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 462; __pyx_clineno = __LINE__13826; goto __pyx_L1_error;} |
| 13827 | __Pyx_GOTREF(__pyx_t_4); |
| 13828 | __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; |
| 13829 | __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; |
| 13830 | if (!(likely(PyBytes_CheckExact(__pyx_t_4))__builtin_expect(!!(((((PyObject*)(__pyx_t_4))->ob_type) == &PyString_Type)), 1)||((__pyx_t_4) == Py_None(&_Py_NoneStruct))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)(((PyObject*)(__pyx_t_4))->ob_type)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 462; __pyx_clineno = __LINE__13830; goto __pyx_L1_error;} |
| 13831 | __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); |
| 13832 | __pyx_t_4 = 0; |
| 13833 | |
| 13834 | /* "View.MemoryView":461 |
| 13835 | * cdef Py_ssize_t i |
| 13836 | * |
| 13837 | * if isinstance(value, tuple): # <<<<<<<<<<<<<< |
| 13838 | * bytesvalue = struct.pack(self.view.format, *value) |
| 13839 | * else: |
| 13840 | */ |
| 13841 | goto __pyx_L3; |
| 13842 | } |
| 13843 | |
| 13844 | /* "View.MemoryView":464 |
| 13845 | * bytesvalue = struct.pack(self.view.format, *value) |
| 13846 | * else: |
| 13847 | * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<< |
| 13848 | * |
| 13849 | * for i, c in enumerate(bytesvalue): |
| 13850 | */ |
| 13851 | /*else*/ { |
| 13852 | __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 464; __pyx_clineno = __LINE__13852; goto __pyx_L1_error;} |
| 13853 | __Pyx_GOTREF(__pyx_t_6); |
| 13854 | __pyx_t_1 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 464; __pyx_clineno = __LINE__13854; goto __pyx_L1_error;} |
| 13855 | __Pyx_GOTREF(__pyx_t_1); |
| 13856 | __pyx_t_5 = NULL((void*)0); |
| 13857 | __pyx_t_7 = 0; |
| 13858 | if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type )), 1)) { |
| 13859 | __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self); |
| 13860 | if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) { |
| 13861 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func); |
| 13862 | __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); |
| 13863 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 13864 | __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); |
| 13865 | __pyx_t_7 = 1; |
| 13866 | } |
| 13867 | } |
| 13868 | __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 464; __pyx_clineno = __LINE__13868; goto __pyx_L1_error;} |
| 13869 | __Pyx_GOTREF(__pyx_t_8); |
| 13870 | if (__pyx_t_5) { |
| 13871 | __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0); |
| 13872 | } |
| 13873 | __Pyx_GIVEREF(__pyx_t_1); |
| 13874 | PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+__pyx_t_7] = __pyx_t_1 ); |
| 13875 | __Pyx_INCREF(__pyx_v_value)( ((PyObject*)(__pyx_v_value))->ob_refcnt++); |
| 13876 | __Pyx_GIVEREF(__pyx_v_value); |
| 13877 | PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value)(((PyTupleObject *)(__pyx_t_8))->ob_item[1+__pyx_t_7] = __pyx_v_value ); |
| 13878 | __pyx_t_1 = 0; |
| 13879 | __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[2]; __pyx_lineno = 464; __pyx_clineno = __LINE__13879; goto __pyx_L1_error;} |
| 13880 | __Pyx_GOTREF(__pyx_t_4); |
| 13881 | __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; |
| 13882 | __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; |
| 13883 | if (!(likely(PyBytes_CheckExact(__pyx_t_4))__builtin_expect(!!(((((PyObject*)(__pyx_t_4))->ob_type) == &PyString_Type)), 1)||((__pyx_t_4) == Py_None(&_Py_NoneStruct))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)(((PyObject*)(__pyx_t_4))->ob_type)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 464; __pyx_clineno = __LINE__13883; goto __pyx_L1_error;} |
| 13884 | __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); |
| 13885 | __pyx_t_4 = 0; |
| 13886 | } |
| 13887 | __pyx_L3:; |
| 13888 | |
| 13889 | /* "View.MemoryView":466 |
| 13890 | * bytesvalue = struct.pack(self.view.format, value) |
| 13891 | * |
| 13892 | * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< |
| 13893 | * itemp[i] = c |
| 13894 | * |
| 13895 | */ |
| 13896 | __pyx_t_7 = 0; |
| 13897 | if (unlikely(__pyx_v_bytesvalue == Py_None)__builtin_expect(!!(__pyx_v_bytesvalue == (&_Py_NoneStruct )), 0)) { |
| 13898 | PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); |
| 13899 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 466; __pyx_clineno = __LINE__13899; goto __pyx_L1_error;} |
| 13900 | } |
| 13901 | __Pyx_INCREF(__pyx_v_bytesvalue)( ((PyObject*)(__pyx_v_bytesvalue))->ob_refcnt++); |
| 13902 | __pyx_t_9 = __pyx_v_bytesvalue; |
| 13903 | __pyx_t_11 = PyBytes_AS_STRING(__pyx_t_9)(((PyStringObject *)(__pyx_t_9))->ob_sval); |
| 13904 | __pyx_t_12 = (__pyx_t_11 + PyBytes_GET_SIZE(__pyx_t_9)(((PyVarObject*)(__pyx_t_9))->ob_size)); |
| 13905 | for (__pyx_t_13 = __pyx_t_11; __pyx_t_13 < __pyx_t_12; __pyx_t_13++) { |
| 13906 | __pyx_t_10 = __pyx_t_13; |
| 13907 | __pyx_v_c = (__pyx_t_10[0]); |
| 13908 | |
| 13909 | /* "View.MemoryView":467 |
| 13910 | * |
| 13911 | * for i, c in enumerate(bytesvalue): |
| 13912 | * itemp[i] = c # <<<<<<<<<<<<<< |
| 13913 | * |
| 13914 | * @cname('getbuffer') |
| 13915 | */ |
| 13916 | __pyx_v_i = __pyx_t_7; |
| 13917 | |
| 13918 | /* "View.MemoryView":466 |
| 13919 | * bytesvalue = struct.pack(self.view.format, value) |
| 13920 | * |
| 13921 | * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< |
| 13922 | * itemp[i] = c |
| 13923 | * |
| 13924 | */ |
| 13925 | __pyx_t_7 = (__pyx_t_7 + 1); |
| 13926 | |
| 13927 | /* "View.MemoryView":467 |
| 13928 | * |
| 13929 | * for i, c in enumerate(bytesvalue): |
| 13930 | * itemp[i] = c # <<<<<<<<<<<<<< |
| 13931 | * |
| 13932 | * @cname('getbuffer') |
| 13933 | */ |
| 13934 | (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c; |
| 13935 | } |
| 13936 | __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; |
| 13937 | |
| 13938 | /* "View.MemoryView":453 |
| 13939 | * return result |
| 13940 | * |
| 13941 | * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< |
| 13942 | * """Only used if instantiated manually by the user, or if Cython doesn't |
| 13943 | * know how to convert the type""" |
| 13944 | */ |
| 13945 | |
| 13946 | /* function exit code */ |
| 13947 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 13948 | goto __pyx_L0; |
| 13949 | __pyx_L1_error:; |
| 13950 | __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); |
| 13951 | __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); |
| 13952 | __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); |
| 13953 | __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); |
| 13954 | __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); |
| 13955 | __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); |
| 13956 | __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 13957 | __pyx_r = 0; |
| 13958 | __pyx_L0:; |
| 13959 | __Pyx_XDECREF(__pyx_v_struct)do { if ((__pyx_v_struct) == ((void*)0)) ; else do { if ( --( (PyObject*)(__pyx_v_struct))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(__pyx_v_struct)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_struct)))); } while (0); } while (0); |
| 13960 | __Pyx_XDECREF(__pyx_v_bytesvalue)do { if ((__pyx_v_bytesvalue) == ((void*)0)) ; else do { if ( --((PyObject*)(__pyx_v_bytesvalue))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_bytesvalue)))->ob_type )->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_bytesvalue )))); } while (0); } while (0); |
| 13961 | __Pyx_XGIVEREF(__pyx_r); |
| 13962 | __Pyx_RefNannyFinishContext(); |
| 13963 | return __pyx_r; |
| 13964 | } |
| 13965 | |
| 13966 | /* "View.MemoryView":470 |
| 13967 | * |
| 13968 | * @cname('getbuffer') |
| 13969 | * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< |
| 13970 | * if flags & PyBUF_STRIDES: |
| 13971 | * info.shape = self.view.shape |
| 13972 | */ |
| 13973 | |
| 13974 | /* Python wrapper */ |
| 13975 | static CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ |
| 13976 | static CYTHON_UNUSED__attribute__ ((__unused__)) int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { |
| 13977 | int __pyx_r; |
| 13978 | __Pyx_RefNannyDeclarations |
| 13979 | __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); |
| 13980 | __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); |
| 13981 | |
| 13982 | /* function exit code */ |
| 13983 | __Pyx_RefNannyFinishContext(); |
| 13984 | return __pyx_r; |
| 13985 | } |
| 13986 | |
| 13987 | static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { |
| 13988 | int __pyx_r; |
| 13989 | __Pyx_RefNannyDeclarations |
| 13990 | int __pyx_t_1; |
| 13991 | Py_ssize_t *__pyx_t_2; |
| 13992 | char *__pyx_t_3; |
| 13993 | void *__pyx_t_4; |
| 13994 | int __pyx_t_5; |
| 13995 | Py_ssize_t __pyx_t_6; |
| 13996 | __Pyx_RefNannySetupContext("__getbuffer__", 0); |
| 13997 | if (__pyx_v_info != NULL((void*)0)) { |
| 13998 | __pyx_v_info->obj = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 13999 | __Pyx_GIVEREF(__pyx_v_info->obj); |
| 14000 | } |
| 14001 | |
| 14002 | /* "View.MemoryView":471 |
| 14003 | * @cname('getbuffer') |
| 14004 | * def __getbuffer__(self, Py_buffer *info, int flags): |
| 14005 | * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< |
| 14006 | * info.shape = self.view.shape |
| 14007 | * else: |
| 14008 | */ |
| 14009 | __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES(0x0010 | 0x0008)) != 0); |
| 14010 | if (__pyx_t_1) { |
| 14011 | |
| 14012 | /* "View.MemoryView":472 |
| 14013 | * def __getbuffer__(self, Py_buffer *info, int flags): |
| 14014 | * if flags & PyBUF_STRIDES: |
| 14015 | * info.shape = self.view.shape # <<<<<<<<<<<<<< |
| 14016 | * else: |
| 14017 | * info.shape = NULL |
| 14018 | */ |
| 14019 | __pyx_t_2 = __pyx_v_self->view.shape; |
| 14020 | __pyx_v_info->shape = __pyx_t_2; |
| 14021 | |
| 14022 | /* "View.MemoryView":471 |
| 14023 | * @cname('getbuffer') |
| 14024 | * def __getbuffer__(self, Py_buffer *info, int flags): |
| 14025 | * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< |
| 14026 | * info.shape = self.view.shape |
| 14027 | * else: |
| 14028 | */ |
| 14029 | goto __pyx_L3; |
| 14030 | } |
| 14031 | |
| 14032 | /* "View.MemoryView":474 |
| 14033 | * info.shape = self.view.shape |
| 14034 | * else: |
| 14035 | * info.shape = NULL # <<<<<<<<<<<<<< |
| 14036 | * |
| 14037 | * if flags & PyBUF_STRIDES: |
| 14038 | */ |
| 14039 | /*else*/ { |
| 14040 | __pyx_v_info->shape = NULL((void*)0); |
| 14041 | } |
| 14042 | __pyx_L3:; |
| 14043 | |
| 14044 | /* "View.MemoryView":476 |
| 14045 | * info.shape = NULL |
| 14046 | * |
| 14047 | * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< |
| 14048 | * info.strides = self.view.strides |
| 14049 | * else: |
| 14050 | */ |
| 14051 | __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES(0x0010 | 0x0008)) != 0); |
| 14052 | if (__pyx_t_1) { |
| 14053 | |
| 14054 | /* "View.MemoryView":477 |
| 14055 | * |
| 14056 | * if flags & PyBUF_STRIDES: |
| 14057 | * info.strides = self.view.strides # <<<<<<<<<<<<<< |
| 14058 | * else: |
| 14059 | * info.strides = NULL |
| 14060 | */ |
| 14061 | __pyx_t_2 = __pyx_v_self->view.strides; |
| 14062 | __pyx_v_info->strides = __pyx_t_2; |
| 14063 | |
| 14064 | /* "View.MemoryView":476 |
| 14065 | * info.shape = NULL |
| 14066 | * |
| 14067 | * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< |
| 14068 | * info.strides = self.view.strides |
| 14069 | * else: |
| 14070 | */ |
| 14071 | goto __pyx_L4; |
| 14072 | } |
| 14073 | |
| 14074 | /* "View.MemoryView":479 |
| 14075 | * info.strides = self.view.strides |
| 14076 | * else: |
| 14077 | * info.strides = NULL # <<<<<<<<<<<<<< |
| 14078 | * |
| 14079 | * if flags & PyBUF_INDIRECT: |
| 14080 | */ |
| 14081 | /*else*/ { |
| 14082 | __pyx_v_info->strides = NULL((void*)0); |
| 14083 | } |
| 14084 | __pyx_L4:; |
| 14085 | |
| 14086 | /* "View.MemoryView":481 |
| 14087 | * info.strides = NULL |
| 14088 | * |
| 14089 | * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< |
| 14090 | * info.suboffsets = self.view.suboffsets |
| 14091 | * else: |
| 14092 | */ |
| 14093 | __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT(0x0100 | (0x0010 | 0x0008))) != 0); |
| 14094 | if (__pyx_t_1) { |
| 14095 | |
| 14096 | /* "View.MemoryView":482 |
| 14097 | * |
| 14098 | * if flags & PyBUF_INDIRECT: |
| 14099 | * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<< |
| 14100 | * else: |
| 14101 | * info.suboffsets = NULL |
| 14102 | */ |
| 14103 | __pyx_t_2 = __pyx_v_self->view.suboffsets; |
| 14104 | __pyx_v_info->suboffsets = __pyx_t_2; |
| 14105 | |
| 14106 | /* "View.MemoryView":481 |
| 14107 | * info.strides = NULL |
| 14108 | * |
| 14109 | * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< |
| 14110 | * info.suboffsets = self.view.suboffsets |
| 14111 | * else: |
| 14112 | */ |
| 14113 | goto __pyx_L5; |
| 14114 | } |
| 14115 | |
| 14116 | /* "View.MemoryView":484 |
| 14117 | * info.suboffsets = self.view.suboffsets |
| 14118 | * else: |
| 14119 | * info.suboffsets = NULL # <<<<<<<<<<<<<< |
| 14120 | * |
| 14121 | * if flags & PyBUF_FORMAT: |
| 14122 | */ |
| 14123 | /*else*/ { |
| 14124 | __pyx_v_info->suboffsets = NULL((void*)0); |
| 14125 | } |
| 14126 | __pyx_L5:; |
| 14127 | |
| 14128 | /* "View.MemoryView":486 |
| 14129 | * info.suboffsets = NULL |
| 14130 | * |
| 14131 | * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< |
| 14132 | * info.format = self.view.format |
| 14133 | * else: |
| 14134 | */ |
| 14135 | __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT0x0004) != 0); |
| 14136 | if (__pyx_t_1) { |
| 14137 | |
| 14138 | /* "View.MemoryView":487 |
| 14139 | * |
| 14140 | * if flags & PyBUF_FORMAT: |
| 14141 | * info.format = self.view.format # <<<<<<<<<<<<<< |
| 14142 | * else: |
| 14143 | * info.format = NULL |
| 14144 | */ |
| 14145 | __pyx_t_3 = __pyx_v_self->view.format; |
| 14146 | __pyx_v_info->format = __pyx_t_3; |
| 14147 | |
| 14148 | /* "View.MemoryView":486 |
| 14149 | * info.suboffsets = NULL |
| 14150 | * |
| 14151 | * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< |
| 14152 | * info.format = self.view.format |
| 14153 | * else: |
| 14154 | */ |
| 14155 | goto __pyx_L6; |
| 14156 | } |
| 14157 | |
| 14158 | /* "View.MemoryView":489 |
| 14159 | * info.format = self.view.format |
| 14160 | * else: |
| 14161 | * info.format = NULL # <<<<<<<<<<<<<< |
| 14162 | * |
| 14163 | * info.buf = self.view.buf |
| 14164 | */ |
| 14165 | /*else*/ { |
| 14166 | __pyx_v_info->format = NULL((void*)0); |
| 14167 | } |
| 14168 | __pyx_L6:; |
| 14169 | |
| 14170 | /* "View.MemoryView":491 |
| 14171 | * info.format = NULL |
| 14172 | * |
| 14173 | * info.buf = self.view.buf # <<<<<<<<<<<<<< |
| 14174 | * info.ndim = self.view.ndim |
| 14175 | * info.itemsize = self.view.itemsize |
| 14176 | */ |
| 14177 | __pyx_t_4 = __pyx_v_self->view.buf; |
| 14178 | __pyx_v_info->buf = __pyx_t_4; |
| 14179 | |
| 14180 | /* "View.MemoryView":492 |
| 14181 | * |
| 14182 | * info.buf = self.view.buf |
| 14183 | * info.ndim = self.view.ndim # <<<<<<<<<<<<<< |
| 14184 | * info.itemsize = self.view.itemsize |
| 14185 | * info.len = self.view.len |
| 14186 | */ |
| 14187 | __pyx_t_5 = __pyx_v_self->view.ndim; |
| 14188 | __pyx_v_info->ndim = __pyx_t_5; |
| 14189 | |
| 14190 | /* "View.MemoryView":493 |
| 14191 | * info.buf = self.view.buf |
| 14192 | * info.ndim = self.view.ndim |
| 14193 | * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<< |
| 14194 | * info.len = self.view.len |
| 14195 | * info.readonly = 0 |
| 14196 | */ |
| 14197 | __pyx_t_6 = __pyx_v_self->view.itemsize; |
| 14198 | __pyx_v_info->itemsize = __pyx_t_6; |
| 14199 | |
| 14200 | /* "View.MemoryView":494 |
| 14201 | * info.ndim = self.view.ndim |
| 14202 | * info.itemsize = self.view.itemsize |
| 14203 | * info.len = self.view.len # <<<<<<<<<<<<<< |
| 14204 | * info.readonly = 0 |
| 14205 | * info.obj = self |
| 14206 | */ |
| 14207 | __pyx_t_6 = __pyx_v_self->view.len; |
| 14208 | __pyx_v_info->len = __pyx_t_6; |
| 14209 | |
| 14210 | /* "View.MemoryView":495 |
| 14211 | * info.itemsize = self.view.itemsize |
| 14212 | * info.len = self.view.len |
| 14213 | * info.readonly = 0 # <<<<<<<<<<<<<< |
| 14214 | * info.obj = self |
| 14215 | * |
| 14216 | */ |
| 14217 | __pyx_v_info->readonly = 0; |
| 14218 | |
| 14219 | /* "View.MemoryView":496 |
| 14220 | * info.len = self.view.len |
| 14221 | * info.readonly = 0 |
| 14222 | * info.obj = self # <<<<<<<<<<<<<< |
| 14223 | * |
| 14224 | * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") |
| 14225 | */ |
| 14226 | __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++); |
| 14227 | __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); |
| 14228 | __Pyx_GOTREF(__pyx_v_info->obj); |
| 14229 | __Pyx_DECREF(__pyx_v_info->obj)do { if ( --((PyObject*)(__pyx_v_info->obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_info-> obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *) (__pyx_v_info->obj)))); } while (0); |
| 14230 | __pyx_v_info->obj = ((PyObject *)__pyx_v_self); |
| 14231 | |
| 14232 | /* "View.MemoryView":470 |
| 14233 | * |
| 14234 | * @cname('getbuffer') |
| 14235 | * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< |
| 14236 | * if flags & PyBUF_STRIDES: |
| 14237 | * info.shape = self.view.shape |
| 14238 | */ |
| 14239 | |
| 14240 | /* function exit code */ |
| 14241 | __pyx_r = 0; |
| 14242 | if (__pyx_v_info != NULL((void*)0) && __pyx_v_info->obj == Py_None(&_Py_NoneStruct)) { |
| 14243 | __Pyx_GOTREF(Py_None); |
| 14244 | __Pyx_DECREF(Py_None)do { if ( --((PyObject*)((&_Py_NoneStruct)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((&_Py_NoneStruct ))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(( &_Py_NoneStruct))))); } while (0); __pyx_v_info->obj = NULL((void*)0); |
| 14245 | } |
| 14246 | __Pyx_RefNannyFinishContext(); |
| 14247 | return __pyx_r; |
| 14248 | } |
| 14249 | |
| 14250 | /* "View.MemoryView":503 |
| 14251 | * property T: |
| 14252 | * @cname('__pyx_memoryview_transpose') |
| 14253 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14254 | * cdef _memoryviewslice result = memoryview_copy(self) |
| 14255 | * transpose_memslice(&result.from_slice) |
| 14256 | */ |
| 14257 | |
| 14258 | /* Python wrapper */ |
| 14259 | static PyObject *__pyx_memoryview_transpose(PyObject *__pyx_v_self); /*proto*/ |
| 14260 | static PyObject *__pyx_memoryview_transpose(PyObject *__pyx_v_self) { |
| 14261 | PyObject *__pyx_r = 0; |
| 14262 | __Pyx_RefNannyDeclarations |
| 14263 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 14264 | __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 14265 | |
| 14266 | /* function exit code */ |
| 14267 | __Pyx_RefNannyFinishContext(); |
| 14268 | return __pyx_r; |
| 14269 | } |
| 14270 | |
| 14271 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 14272 | struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; |
| 14273 | PyObject *__pyx_r = NULL((void*)0); |
| 14274 | __Pyx_RefNannyDeclarations |
| 14275 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 14276 | int __pyx_t_2; |
| 14277 | int __pyx_lineno = 0; |
| 14278 | const char *__pyx_filename = NULL((void*)0); |
| 14279 | int __pyx_clineno = 0; |
| 14280 | __Pyx_RefNannySetupContext("__get__", 0); |
| 14281 | |
| 14282 | /* "View.MemoryView":504 |
| 14283 | * @cname('__pyx_memoryview_transpose') |
| 14284 | * def __get__(self): |
| 14285 | * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<< |
| 14286 | * transpose_memslice(&result.from_slice) |
| 14287 | * return result |
| 14288 | */ |
| 14289 | __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 504; __pyx_clineno = __LINE__14289; goto __pyx_L1_error;} |
| 14290 | __Pyx_GOTREF(__pyx_t_1); |
| 14291 | if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type)))__builtin_expect(!!(((__pyx_t_1) == (&_Py_NoneStruct)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type )), 1)), 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 504; __pyx_clineno = __LINE__14291; goto __pyx_L1_error;} |
| 14292 | __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1); |
| 14293 | __pyx_t_1 = 0; |
| 14294 | |
| 14295 | /* "View.MemoryView":505 |
| 14296 | * def __get__(self): |
| 14297 | * cdef _memoryviewslice result = memoryview_copy(self) |
| 14298 | * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<< |
| 14299 | * return result |
| 14300 | * |
| 14301 | */ |
| 14302 | __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == 0)__builtin_expect(!!(__pyx_t_2 == 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__14302; goto __pyx_L1_error;} |
| 14303 | |
| 14304 | /* "View.MemoryView":506 |
| 14305 | * cdef _memoryviewslice result = memoryview_copy(self) |
| 14306 | * transpose_memslice(&result.from_slice) |
| 14307 | * return result # <<<<<<<<<<<<<< |
| 14308 | * |
| 14309 | * property base: |
| 14310 | */ |
| 14311 | __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); |
| 14312 | __Pyx_INCREF(((PyObject *)__pyx_v_result))( ((PyObject*)(((PyObject *)__pyx_v_result)))->ob_refcnt++ ); |
| 14313 | __pyx_r = ((PyObject *)__pyx_v_result); |
| 14314 | goto __pyx_L0; |
| 14315 | |
| 14316 | /* "View.MemoryView":503 |
| 14317 | * property T: |
| 14318 | * @cname('__pyx_memoryview_transpose') |
| 14319 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14320 | * cdef _memoryviewslice result = memoryview_copy(self) |
| 14321 | * transpose_memslice(&result.from_slice) |
| 14322 | */ |
| 14323 | |
| 14324 | /* function exit code */ |
| 14325 | __pyx_L1_error:; |
| 14326 | __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); |
| 14327 | __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 14328 | __pyx_r = NULL((void*)0); |
| 14329 | __pyx_L0:; |
| 14330 | __Pyx_XDECREF((PyObject *)__pyx_v_result)do { if (((PyObject *)__pyx_v_result) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_result )))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject *)__pyx_v_result)))); } while (0); } while (0); |
| 14331 | __Pyx_XGIVEREF(__pyx_r); |
| 14332 | __Pyx_RefNannyFinishContext(); |
| 14333 | return __pyx_r; |
| 14334 | } |
| 14335 | |
| 14336 | /* "View.MemoryView":510 |
| 14337 | * property base: |
| 14338 | * @cname('__pyx_memoryview__get__base') |
| 14339 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14340 | * return self.obj |
| 14341 | * |
| 14342 | */ |
| 14343 | |
| 14344 | /* Python wrapper */ |
| 14345 | static PyObject *__pyx_memoryview__get__base(PyObject *__pyx_v_self); /*proto*/ |
| 14346 | static PyObject *__pyx_memoryview__get__base(PyObject *__pyx_v_self) { |
| 14347 | PyObject *__pyx_r = 0; |
| 14348 | __Pyx_RefNannyDeclarations |
| 14349 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 14350 | __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 14351 | |
| 14352 | /* function exit code */ |
| 14353 | __Pyx_RefNannyFinishContext(); |
| 14354 | return __pyx_r; |
| 14355 | } |
| 14356 | |
| 14357 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 14358 | PyObject *__pyx_r = NULL((void*)0); |
| 14359 | __Pyx_RefNannyDeclarations |
| 14360 | __Pyx_RefNannySetupContext("__get__", 0); |
| 14361 | |
| 14362 | /* "View.MemoryView":511 |
| 14363 | * @cname('__pyx_memoryview__get__base') |
| 14364 | * def __get__(self): |
| 14365 | * return self.obj # <<<<<<<<<<<<<< |
| 14366 | * |
| 14367 | * property shape: |
| 14368 | */ |
| 14369 | __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); |
| 14370 | __Pyx_INCREF(__pyx_v_self->obj)( ((PyObject*)(__pyx_v_self->obj))->ob_refcnt++); |
| 14371 | __pyx_r = __pyx_v_self->obj; |
| 14372 | goto __pyx_L0; |
| 14373 | |
| 14374 | /* "View.MemoryView":510 |
| 14375 | * property base: |
| 14376 | * @cname('__pyx_memoryview__get__base') |
| 14377 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14378 | * return self.obj |
| 14379 | * |
| 14380 | */ |
| 14381 | |
| 14382 | /* function exit code */ |
| 14383 | __pyx_L0:; |
| 14384 | __Pyx_XGIVEREF(__pyx_r); |
| 14385 | __Pyx_RefNannyFinishContext(); |
| 14386 | return __pyx_r; |
| 14387 | } |
| 14388 | |
| 14389 | /* "View.MemoryView":515 |
| 14390 | * property shape: |
| 14391 | * @cname('__pyx_memoryview_get_shape') |
| 14392 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14393 | * return tuple([length for length in self.view.shape[:self.view.ndim]]) |
| 14394 | * |
| 14395 | */ |
| 14396 | |
| 14397 | /* Python wrapper */ |
| 14398 | static PyObject *__pyx_memoryview_get_shape(PyObject *__pyx_v_self); /*proto*/ |
| 14399 | static PyObject *__pyx_memoryview_get_shape(PyObject *__pyx_v_self) { |
| 14400 | PyObject *__pyx_r = 0; |
| 14401 | __Pyx_RefNannyDeclarations |
| 14402 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 14403 | __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 14404 | |
| 14405 | /* function exit code */ |
| 14406 | __Pyx_RefNannyFinishContext(); |
| 14407 | return __pyx_r; |
| 14408 | } |
| 14409 | |
| 14410 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 14411 | Py_ssize_t __pyx_v_length; |
| 14412 | PyObject *__pyx_r = NULL((void*)0); |
| 14413 | __Pyx_RefNannyDeclarations |
| 14414 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 14415 | Py_ssize_t *__pyx_t_2; |
| 14416 | Py_ssize_t *__pyx_t_3; |
| 14417 | Py_ssize_t *__pyx_t_4; |
| 14418 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 14419 | int __pyx_lineno = 0; |
| 14420 | const char *__pyx_filename = NULL((void*)0); |
| 14421 | int __pyx_clineno = 0; |
| 14422 | __Pyx_RefNannySetupContext("__get__", 0); |
| 14423 | |
| 14424 | /* "View.MemoryView":516 |
| 14425 | * @cname('__pyx_memoryview_get_shape') |
| 14426 | * def __get__(self): |
| 14427 | * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<< |
| 14428 | * |
| 14429 | * property strides: |
| 14430 | */ |
| 14431 | __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); |
| 14432 | __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 516; __pyx_clineno = __LINE__14432; goto __pyx_L1_error;} |
| 14433 | __Pyx_GOTREF(__pyx_t_1); |
| 14434 | __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); |
| 14435 | for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { |
| 14436 | __pyx_t_2 = __pyx_t_4; |
| 14437 | __pyx_v_length = (__pyx_t_2[0]); |
| 14438 | __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 516; __pyx_clineno = __LINE__14438; goto __pyx_L1_error;} |
| 14439 | __Pyx_GOTREF(__pyx_t_5); |
| 14440 | 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[2]; __pyx_lineno = 516; __pyx_clineno = __LINE__14440; goto __pyx_L1_error;} |
| 14441 | __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; |
| 14442 | } |
| 14443 | __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 516; __pyx_clineno = __LINE__14443; goto __pyx_L1_error;} |
| 14444 | __Pyx_GOTREF(__pyx_t_5); |
| 14445 | __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; |
| 14446 | __pyx_r = __pyx_t_5; |
| 14447 | __pyx_t_5 = 0; |
| 14448 | goto __pyx_L0; |
| 14449 | |
| 14450 | /* "View.MemoryView":515 |
| 14451 | * property shape: |
| 14452 | * @cname('__pyx_memoryview_get_shape') |
| 14453 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14454 | * return tuple([length for length in self.view.shape[:self.view.ndim]]) |
| 14455 | * |
| 14456 | */ |
| 14457 | |
| 14458 | /* function exit code */ |
| 14459 | __pyx_L1_error:; |
| 14460 | __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); |
| 14461 | __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); |
| 14462 | __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 14463 | __pyx_r = NULL((void*)0); |
| 14464 | __pyx_L0:; |
| 14465 | __Pyx_XGIVEREF(__pyx_r); |
| 14466 | __Pyx_RefNannyFinishContext(); |
| 14467 | return __pyx_r; |
| 14468 | } |
| 14469 | |
| 14470 | /* "View.MemoryView":520 |
| 14471 | * property strides: |
| 14472 | * @cname('__pyx_memoryview_get_strides') |
| 14473 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14474 | * if self.view.strides == NULL: |
| 14475 | * |
| 14476 | */ |
| 14477 | |
| 14478 | /* Python wrapper */ |
| 14479 | static PyObject *__pyx_memoryview_get_strides(PyObject *__pyx_v_self); /*proto*/ |
| 14480 | static PyObject *__pyx_memoryview_get_strides(PyObject *__pyx_v_self) { |
| 14481 | PyObject *__pyx_r = 0; |
| 14482 | __Pyx_RefNannyDeclarations |
| 14483 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 14484 | __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 14485 | |
| 14486 | /* function exit code */ |
| 14487 | __Pyx_RefNannyFinishContext(); |
| 14488 | return __pyx_r; |
| 14489 | } |
| 14490 | |
| 14491 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 14492 | Py_ssize_t __pyx_v_stride; |
| 14493 | PyObject *__pyx_r = NULL((void*)0); |
| 14494 | __Pyx_RefNannyDeclarations |
| 14495 | int __pyx_t_1; |
| 14496 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 14497 | Py_ssize_t *__pyx_t_3; |
| 14498 | Py_ssize_t *__pyx_t_4; |
| 14499 | Py_ssize_t *__pyx_t_5; |
| 14500 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 14501 | int __pyx_lineno = 0; |
| 14502 | const char *__pyx_filename = NULL((void*)0); |
| 14503 | int __pyx_clineno = 0; |
| 14504 | __Pyx_RefNannySetupContext("__get__", 0); |
| 14505 | |
| 14506 | /* "View.MemoryView":521 |
| 14507 | * @cname('__pyx_memoryview_get_strides') |
| 14508 | * def __get__(self): |
| 14509 | * if self.view.strides == NULL: # <<<<<<<<<<<<<< |
| 14510 | * |
| 14511 | * raise ValueError("Buffer view does not expose strides") |
| 14512 | */ |
| 14513 | __pyx_t_1 = ((__pyx_v_self->view.strides == NULL((void*)0)) != 0); |
| 14514 | if (__pyx_t_1) { |
| 14515 | |
| 14516 | /* "View.MemoryView":523 |
| 14517 | * if self.view.strides == NULL: |
| 14518 | * |
| 14519 | * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<< |
| 14520 | * |
| 14521 | * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) |
| 14522 | */ |
| 14523 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 523; __pyx_clineno = __LINE__14523; goto __pyx_L1_error;} |
| 14524 | __Pyx_GOTREF(__pyx_t_2); |
| 14525 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
| 14526 | __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; |
| 14527 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 523; __pyx_clineno = __LINE__14527; goto __pyx_L1_error;} |
| 14528 | |
| 14529 | /* "View.MemoryView":521 |
| 14530 | * @cname('__pyx_memoryview_get_strides') |
| 14531 | * def __get__(self): |
| 14532 | * if self.view.strides == NULL: # <<<<<<<<<<<<<< |
| 14533 | * |
| 14534 | * raise ValueError("Buffer view does not expose strides") |
| 14535 | */ |
| 14536 | } |
| 14537 | |
| 14538 | /* "View.MemoryView":525 |
| 14539 | * raise ValueError("Buffer view does not expose strides") |
| 14540 | * |
| 14541 | * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<< |
| 14542 | * |
| 14543 | * property suboffsets: |
| 14544 | */ |
| 14545 | __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); |
| 14546 | __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 525; __pyx_clineno = __LINE__14546; goto __pyx_L1_error;} |
| 14547 | __Pyx_GOTREF(__pyx_t_2); |
| 14548 | __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim); |
| 14549 | for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { |
| 14550 | __pyx_t_3 = __pyx_t_5; |
| 14551 | __pyx_v_stride = (__pyx_t_3[0]); |
| 14552 | __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 525; __pyx_clineno = __LINE__14552; goto __pyx_L1_error;} |
| 14553 | __Pyx_GOTREF(__pyx_t_6); |
| 14554 | if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_2, (PyObject *)__pyx_t_6)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 525; __pyx_clineno = __LINE__14554; goto __pyx_L1_error;} |
| 14555 | __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; |
| 14556 | } |
| 14557 | __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 525; __pyx_clineno = __LINE__14557; goto __pyx_L1_error;} |
| 14558 | __Pyx_GOTREF(__pyx_t_6); |
| 14559 | __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; |
| 14560 | __pyx_r = __pyx_t_6; |
| 14561 | __pyx_t_6 = 0; |
| 14562 | goto __pyx_L0; |
| 14563 | |
| 14564 | /* "View.MemoryView":520 |
| 14565 | * property strides: |
| 14566 | * @cname('__pyx_memoryview_get_strides') |
| 14567 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14568 | * if self.view.strides == NULL: |
| 14569 | * |
| 14570 | */ |
| 14571 | |
| 14572 | /* function exit code */ |
| 14573 | __pyx_L1_error:; |
| 14574 | __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); |
| 14575 | __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); |
| 14576 | __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 14577 | __pyx_r = NULL((void*)0); |
| 14578 | __pyx_L0:; |
| 14579 | __Pyx_XGIVEREF(__pyx_r); |
| 14580 | __Pyx_RefNannyFinishContext(); |
| 14581 | return __pyx_r; |
| 14582 | } |
| 14583 | |
| 14584 | /* "View.MemoryView":529 |
| 14585 | * property suboffsets: |
| 14586 | * @cname('__pyx_memoryview_get_suboffsets') |
| 14587 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14588 | * if self.view.suboffsets == NULL: |
| 14589 | * return (-1,) * self.view.ndim |
| 14590 | */ |
| 14591 | |
| 14592 | /* Python wrapper */ |
| 14593 | static PyObject *__pyx_memoryview_get_suboffsets(PyObject *__pyx_v_self); /*proto*/ |
| 14594 | static PyObject *__pyx_memoryview_get_suboffsets(PyObject *__pyx_v_self) { |
| 14595 | PyObject *__pyx_r = 0; |
| 14596 | __Pyx_RefNannyDeclarations |
| 14597 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 14598 | __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 14599 | |
| 14600 | /* function exit code */ |
| 14601 | __Pyx_RefNannyFinishContext(); |
| 14602 | return __pyx_r; |
| 14603 | } |
| 14604 | |
| 14605 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 14606 | Py_ssize_t __pyx_v_suboffset; |
| 14607 | PyObject *__pyx_r = NULL((void*)0); |
| 14608 | __Pyx_RefNannyDeclarations |
| 14609 | int __pyx_t_1; |
| 14610 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 14611 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 14612 | Py_ssize_t *__pyx_t_4; |
| 14613 | Py_ssize_t *__pyx_t_5; |
| 14614 | Py_ssize_t *__pyx_t_6; |
| 14615 | int __pyx_lineno = 0; |
| 14616 | const char *__pyx_filename = NULL((void*)0); |
| 14617 | int __pyx_clineno = 0; |
| 14618 | __Pyx_RefNannySetupContext("__get__", 0); |
| 14619 | |
| 14620 | /* "View.MemoryView":530 |
| 14621 | * @cname('__pyx_memoryview_get_suboffsets') |
| 14622 | * def __get__(self): |
| 14623 | * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< |
| 14624 | * return (-1,) * self.view.ndim |
| 14625 | * |
| 14626 | */ |
| 14627 | __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL((void*)0)) != 0); |
| 14628 | if (__pyx_t_1) { |
| 14629 | |
| 14630 | /* "View.MemoryView":531 |
| 14631 | * def __get__(self): |
| 14632 | * if self.view.suboffsets == NULL: |
| 14633 | * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< |
| 14634 | * |
| 14635 | * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) |
| 14636 | */ |
| 14637 | __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); |
| 14638 | __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 531; __pyx_clineno = __LINE__14638; goto __pyx_L1_error;} |
| 14639 | __Pyx_GOTREF(__pyx_t_2); |
| 14640 | __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__31, __pyx_t_2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 531; __pyx_clineno = __LINE__14640; goto __pyx_L1_error;} |
| 14641 | __Pyx_GOTREF(__pyx_t_3); |
| 14642 | __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; |
| 14643 | __pyx_r = __pyx_t_3; |
| 14644 | __pyx_t_3 = 0; |
| 14645 | goto __pyx_L0; |
| 14646 | |
| 14647 | /* "View.MemoryView":530 |
| 14648 | * @cname('__pyx_memoryview_get_suboffsets') |
| 14649 | * def __get__(self): |
| 14650 | * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< |
| 14651 | * return (-1,) * self.view.ndim |
| 14652 | * |
| 14653 | */ |
| 14654 | } |
| 14655 | |
| 14656 | /* "View.MemoryView":533 |
| 14657 | * return (-1,) * self.view.ndim |
| 14658 | * |
| 14659 | * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<< |
| 14660 | * |
| 14661 | * property ndim: |
| 14662 | */ |
| 14663 | __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); |
| 14664 | __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 533; __pyx_clineno = __LINE__14664; goto __pyx_L1_error;} |
| 14665 | __Pyx_GOTREF(__pyx_t_3); |
| 14666 | __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim); |
| 14667 | for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) { |
| 14668 | __pyx_t_4 = __pyx_t_6; |
| 14669 | __pyx_v_suboffset = (__pyx_t_4[0]); |
| 14670 | __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 533; __pyx_clineno = __LINE__14670; goto __pyx_L1_error;} |
| 14671 | __Pyx_GOTREF(__pyx_t_2); |
| 14672 | if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_3, (PyObject *)__pyx_t_2)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 533; __pyx_clineno = __LINE__14672; goto __pyx_L1_error;} |
| 14673 | __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; |
| 14674 | } |
| 14675 | __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 533; __pyx_clineno = __LINE__14675; goto __pyx_L1_error;} |
| 14676 | __Pyx_GOTREF(__pyx_t_2); |
| 14677 | __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; |
| 14678 | __pyx_r = __pyx_t_2; |
| 14679 | __pyx_t_2 = 0; |
| 14680 | goto __pyx_L0; |
| 14681 | |
| 14682 | /* "View.MemoryView":529 |
| 14683 | * property suboffsets: |
| 14684 | * @cname('__pyx_memoryview_get_suboffsets') |
| 14685 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14686 | * if self.view.suboffsets == NULL: |
| 14687 | * return (-1,) * self.view.ndim |
| 14688 | */ |
| 14689 | |
| 14690 | /* function exit code */ |
| 14691 | __pyx_L1_error:; |
| 14692 | __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); |
| 14693 | __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); |
| 14694 | __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 14695 | __pyx_r = NULL((void*)0); |
| 14696 | __pyx_L0:; |
| 14697 | __Pyx_XGIVEREF(__pyx_r); |
| 14698 | __Pyx_RefNannyFinishContext(); |
| 14699 | return __pyx_r; |
| 14700 | } |
| 14701 | |
| 14702 | /* "View.MemoryView":537 |
| 14703 | * property ndim: |
| 14704 | * @cname('__pyx_memoryview_get_ndim') |
| 14705 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14706 | * return self.view.ndim |
| 14707 | * |
| 14708 | */ |
| 14709 | |
| 14710 | /* Python wrapper */ |
| 14711 | static PyObject *__pyx_memoryview_get_ndim(PyObject *__pyx_v_self); /*proto*/ |
| 14712 | static PyObject *__pyx_memoryview_get_ndim(PyObject *__pyx_v_self) { |
| 14713 | PyObject *__pyx_r = 0; |
| 14714 | __Pyx_RefNannyDeclarations |
| 14715 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 14716 | __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 14717 | |
| 14718 | /* function exit code */ |
| 14719 | __Pyx_RefNannyFinishContext(); |
| 14720 | return __pyx_r; |
| 14721 | } |
| 14722 | |
| 14723 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 14724 | PyObject *__pyx_r = NULL((void*)0); |
| 14725 | __Pyx_RefNannyDeclarations |
| 14726 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 14727 | int __pyx_lineno = 0; |
| 14728 | const char *__pyx_filename = NULL((void*)0); |
| 14729 | int __pyx_clineno = 0; |
| 14730 | __Pyx_RefNannySetupContext("__get__", 0); |
| 14731 | |
| 14732 | /* "View.MemoryView":538 |
| 14733 | * @cname('__pyx_memoryview_get_ndim') |
| 14734 | * def __get__(self): |
| 14735 | * return self.view.ndim # <<<<<<<<<<<<<< |
| 14736 | * |
| 14737 | * property itemsize: |
| 14738 | */ |
| 14739 | __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); |
| 14740 | __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__14740; goto __pyx_L1_error;} |
| 14741 | __Pyx_GOTREF(__pyx_t_1); |
| 14742 | __pyx_r = __pyx_t_1; |
| 14743 | __pyx_t_1 = 0; |
| 14744 | goto __pyx_L0; |
| 14745 | |
| 14746 | /* "View.MemoryView":537 |
| 14747 | * property ndim: |
| 14748 | * @cname('__pyx_memoryview_get_ndim') |
| 14749 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14750 | * return self.view.ndim |
| 14751 | * |
| 14752 | */ |
| 14753 | |
| 14754 | /* function exit code */ |
| 14755 | __pyx_L1_error:; |
| 14756 | __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); |
| 14757 | __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 14758 | __pyx_r = NULL((void*)0); |
| 14759 | __pyx_L0:; |
| 14760 | __Pyx_XGIVEREF(__pyx_r); |
| 14761 | __Pyx_RefNannyFinishContext(); |
| 14762 | return __pyx_r; |
| 14763 | } |
| 14764 | |
| 14765 | /* "View.MemoryView":542 |
| 14766 | * property itemsize: |
| 14767 | * @cname('__pyx_memoryview_get_itemsize') |
| 14768 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14769 | * return self.view.itemsize |
| 14770 | * |
| 14771 | */ |
| 14772 | |
| 14773 | /* Python wrapper */ |
| 14774 | static PyObject *__pyx_memoryview_get_itemsize(PyObject *__pyx_v_self); /*proto*/ |
| 14775 | static PyObject *__pyx_memoryview_get_itemsize(PyObject *__pyx_v_self) { |
| 14776 | PyObject *__pyx_r = 0; |
| 14777 | __Pyx_RefNannyDeclarations |
| 14778 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 14779 | __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 14780 | |
| 14781 | /* function exit code */ |
| 14782 | __Pyx_RefNannyFinishContext(); |
| 14783 | return __pyx_r; |
| 14784 | } |
| 14785 | |
| 14786 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 14787 | PyObject *__pyx_r = NULL((void*)0); |
| 14788 | __Pyx_RefNannyDeclarations |
| 14789 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 14790 | int __pyx_lineno = 0; |
| 14791 | const char *__pyx_filename = NULL((void*)0); |
| 14792 | int __pyx_clineno = 0; |
| 14793 | __Pyx_RefNannySetupContext("__get__", 0); |
| 14794 | |
| 14795 | /* "View.MemoryView":543 |
| 14796 | * @cname('__pyx_memoryview_get_itemsize') |
| 14797 | * def __get__(self): |
| 14798 | * return self.view.itemsize # <<<<<<<<<<<<<< |
| 14799 | * |
| 14800 | * property nbytes: |
| 14801 | */ |
| 14802 | __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); |
| 14803 | __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__14803; goto __pyx_L1_error;} |
| 14804 | __Pyx_GOTREF(__pyx_t_1); |
| 14805 | __pyx_r = __pyx_t_1; |
| 14806 | __pyx_t_1 = 0; |
| 14807 | goto __pyx_L0; |
| 14808 | |
| 14809 | /* "View.MemoryView":542 |
| 14810 | * property itemsize: |
| 14811 | * @cname('__pyx_memoryview_get_itemsize') |
| 14812 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14813 | * return self.view.itemsize |
| 14814 | * |
| 14815 | */ |
| 14816 | |
| 14817 | /* function exit code */ |
| 14818 | __pyx_L1_error:; |
| 14819 | __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); |
| 14820 | __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 14821 | __pyx_r = NULL((void*)0); |
| 14822 | __pyx_L0:; |
| 14823 | __Pyx_XGIVEREF(__pyx_r); |
| 14824 | __Pyx_RefNannyFinishContext(); |
| 14825 | return __pyx_r; |
| 14826 | } |
| 14827 | |
| 14828 | /* "View.MemoryView":547 |
| 14829 | * property nbytes: |
| 14830 | * @cname('__pyx_memoryview_get_nbytes') |
| 14831 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14832 | * return self.size * self.view.itemsize |
| 14833 | * |
| 14834 | */ |
| 14835 | |
| 14836 | /* Python wrapper */ |
| 14837 | static PyObject *__pyx_memoryview_get_nbytes(PyObject *__pyx_v_self); /*proto*/ |
| 14838 | static PyObject *__pyx_memoryview_get_nbytes(PyObject *__pyx_v_self) { |
| 14839 | PyObject *__pyx_r = 0; |
| 14840 | __Pyx_RefNannyDeclarations |
| 14841 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 14842 | __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 14843 | |
| 14844 | /* function exit code */ |
| 14845 | __Pyx_RefNannyFinishContext(); |
| 14846 | return __pyx_r; |
| 14847 | } |
| 14848 | |
| 14849 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 14850 | PyObject *__pyx_r = NULL((void*)0); |
| 14851 | __Pyx_RefNannyDeclarations |
| 14852 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 14853 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 14854 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 14855 | int __pyx_lineno = 0; |
| 14856 | const char *__pyx_filename = NULL((void*)0); |
| 14857 | int __pyx_clineno = 0; |
| 14858 | __Pyx_RefNannySetupContext("__get__", 0); |
| 14859 | |
| 14860 | /* "View.MemoryView":548 |
| 14861 | * @cname('__pyx_memoryview_get_nbytes') |
| 14862 | * def __get__(self): |
| 14863 | * return self.size * self.view.itemsize # <<<<<<<<<<<<<< |
| 14864 | * |
| 14865 | * property size: |
| 14866 | */ |
| 14867 | __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); |
| 14868 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 548; __pyx_clineno = __LINE__14868; goto __pyx_L1_error;} |
| 14869 | __Pyx_GOTREF(__pyx_t_1); |
| 14870 | __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 548; __pyx_clineno = __LINE__14870; goto __pyx_L1_error;} |
| 14871 | __Pyx_GOTREF(__pyx_t_2); |
| 14872 | __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 548; __pyx_clineno = __LINE__14872; goto __pyx_L1_error;} |
| 14873 | __Pyx_GOTREF(__pyx_t_3); |
| 14874 | __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; |
| 14875 | __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; |
| 14876 | __pyx_r = __pyx_t_3; |
| 14877 | __pyx_t_3 = 0; |
| 14878 | goto __pyx_L0; |
| 14879 | |
| 14880 | /* "View.MemoryView":547 |
| 14881 | * property nbytes: |
| 14882 | * @cname('__pyx_memoryview_get_nbytes') |
| 14883 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14884 | * return self.size * self.view.itemsize |
| 14885 | * |
| 14886 | */ |
| 14887 | |
| 14888 | /* function exit code */ |
| 14889 | __pyx_L1_error:; |
| 14890 | __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); |
| 14891 | __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); |
| 14892 | __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); |
| 14893 | __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 14894 | __pyx_r = NULL((void*)0); |
| 14895 | __pyx_L0:; |
| 14896 | __Pyx_XGIVEREF(__pyx_r); |
| 14897 | __Pyx_RefNannyFinishContext(); |
| 14898 | return __pyx_r; |
| 14899 | } |
| 14900 | |
| 14901 | /* "View.MemoryView":552 |
| 14902 | * property size: |
| 14903 | * @cname('__pyx_memoryview_get_size') |
| 14904 | * def __get__(self): # <<<<<<<<<<<<<< |
| 14905 | * if self._size is None: |
| 14906 | * result = 1 |
| 14907 | */ |
| 14908 | |
| 14909 | /* Python wrapper */ |
| 14910 | static PyObject *__pyx_memoryview_get_size(PyObject *__pyx_v_self); /*proto*/ |
| 14911 | static PyObject *__pyx_memoryview_get_size(PyObject *__pyx_v_self) { |
| 14912 | PyObject *__pyx_r = 0; |
| 14913 | __Pyx_RefNannyDeclarations |
| 14914 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 14915 | __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 14916 | |
| 14917 | /* function exit code */ |
| 14918 | __Pyx_RefNannyFinishContext(); |
| 14919 | return __pyx_r; |
| 14920 | } |
| 14921 | |
| 14922 | static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 14923 | PyObject *__pyx_v_result = NULL((void*)0); |
| 14924 | PyObject *__pyx_v_length = NULL((void*)0); |
| 14925 | PyObject *__pyx_r = NULL((void*)0); |
| 14926 | __Pyx_RefNannyDeclarations |
| 14927 | int __pyx_t_1; |
| 14928 | int __pyx_t_2; |
| 14929 | Py_ssize_t *__pyx_t_3; |
| 14930 | Py_ssize_t *__pyx_t_4; |
| 14931 | Py_ssize_t *__pyx_t_5; |
| 14932 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 14933 | int __pyx_lineno = 0; |
| 14934 | const char *__pyx_filename = NULL((void*)0); |
| 14935 | int __pyx_clineno = 0; |
| 14936 | __Pyx_RefNannySetupContext("__get__", 0); |
| 14937 | |
| 14938 | /* "View.MemoryView":553 |
| 14939 | * @cname('__pyx_memoryview_get_size') |
| 14940 | * def __get__(self): |
| 14941 | * if self._size is None: # <<<<<<<<<<<<<< |
| 14942 | * result = 1 |
| 14943 | * |
| 14944 | */ |
| 14945 | __pyx_t_1 = (__pyx_v_self->_size == Py_None(&_Py_NoneStruct)); |
| 14946 | __pyx_t_2 = (__pyx_t_1 != 0); |
| 14947 | if (__pyx_t_2) { |
| 14948 | |
| 14949 | /* "View.MemoryView":554 |
| 14950 | * def __get__(self): |
| 14951 | * if self._size is None: |
| 14952 | * result = 1 # <<<<<<<<<<<<<< |
| 14953 | * |
| 14954 | * for length in self.view.shape[:self.view.ndim]: |
| 14955 | */ |
| 14956 | __Pyx_INCREF(__pyx_int_1)( ((PyObject*)(__pyx_int_1))->ob_refcnt++); |
| 14957 | __pyx_v_result = __pyx_int_1; |
| 14958 | |
| 14959 | /* "View.MemoryView":556 |
| 14960 | * result = 1 |
| 14961 | * |
| 14962 | * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<< |
| 14963 | * result *= length |
| 14964 | * |
| 14965 | */ |
| 14966 | __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); |
| 14967 | for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { |
| 14968 | __pyx_t_3 = __pyx_t_5; |
| 14969 | __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__14969; goto __pyx_L1_error;} |
| 14970 | __Pyx_GOTREF(__pyx_t_6); |
| 14971 | __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6)do { PyObject *tmp = (PyObject *) __pyx_v_length; __pyx_v_length = __pyx_t_6; 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); |
| 14972 | __pyx_t_6 = 0; |
| 14973 | |
| 14974 | /* "View.MemoryView":557 |
| 14975 | * |
| 14976 | * for length in self.view.shape[:self.view.ndim]: |
| 14977 | * result *= length # <<<<<<<<<<<<<< |
| 14978 | * |
| 14979 | * self._size = result |
| 14980 | */ |
| 14981 | __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 557; __pyx_clineno = __LINE__14981; goto __pyx_L1_error;} |
| 14982 | __Pyx_GOTREF(__pyx_t_6); |
| 14983 | __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6)do { PyObject *tmp = (PyObject *) __pyx_v_result; __pyx_v_result = __pyx_t_6; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type) ->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while ( 0); } while (0); |
| 14984 | __pyx_t_6 = 0; |
| 14985 | } |
| 14986 | |
| 14987 | /* "View.MemoryView":559 |
| 14988 | * result *= length |
| 14989 | * |
| 14990 | * self._size = result # <<<<<<<<<<<<<< |
| 14991 | * |
| 14992 | * return self._size |
| 14993 | */ |
| 14994 | __Pyx_INCREF(__pyx_v_result)( ((PyObject*)(__pyx_v_result))->ob_refcnt++); |
| 14995 | __Pyx_GIVEREF(__pyx_v_result); |
| 14996 | __Pyx_GOTREF(__pyx_v_self->_size); |
| 14997 | __Pyx_DECREF(__pyx_v_self->_size)do { if ( --((PyObject*)(__pyx_v_self->_size))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self-> _size)))->ob_type)->tp_dealloc)((PyObject *)((PyObject * )(__pyx_v_self->_size)))); } while (0); |
| 14998 | __pyx_v_self->_size = __pyx_v_result; |
| 14999 | |
| 15000 | /* "View.MemoryView":553 |
| 15001 | * @cname('__pyx_memoryview_get_size') |
| 15002 | * def __get__(self): |
| 15003 | * if self._size is None: # <<<<<<<<<<<<<< |
| 15004 | * result = 1 |
| 15005 | * |
| 15006 | */ |
| 15007 | } |
| 15008 | |
| 15009 | /* "View.MemoryView":561 |
| 15010 | * self._size = result |
| 15011 | * |
| 15012 | * return self._size # <<<<<<<<<<<<<< |
| 15013 | * |
| 15014 | * def __len__(self): |
| 15015 | */ |
| 15016 | __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); |
| 15017 | __Pyx_INCREF(__pyx_v_self->_size)( ((PyObject*)(__pyx_v_self->_size))->ob_refcnt++); |
| 15018 | __pyx_r = __pyx_v_self->_size; |
| 15019 | goto __pyx_L0; |
| 15020 | |
| 15021 | /* "View.MemoryView":552 |
| 15022 | * property size: |
| 15023 | * @cname('__pyx_memoryview_get_size') |
| 15024 | * def __get__(self): # <<<<<<<<<<<<<< |
| 15025 | * if self._size is None: |
| 15026 | * result = 1 |
| 15027 | */ |
| 15028 | |
| 15029 | /* function exit code */ |
| 15030 | __pyx_L1_error:; |
| 15031 | __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); |
| 15032 | __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 15033 | __pyx_r = NULL((void*)0); |
| 15034 | __pyx_L0:; |
| 15035 | __Pyx_XDECREF(__pyx_v_result)do { if ((__pyx_v_result) == ((void*)0)) ; else do { if ( --( (PyObject*)(__pyx_v_result))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(__pyx_v_result)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_result)))); } while (0); } while (0); |
| 15036 | __Pyx_XDECREF(__pyx_v_length)do { if ((__pyx_v_length) == ((void*)0)) ; else do { if ( --( (PyObject*)(__pyx_v_length))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(__pyx_v_length)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_length)))); } while (0); } while (0); |
| 15037 | __Pyx_XGIVEREF(__pyx_r); |
| 15038 | __Pyx_RefNannyFinishContext(); |
| 15039 | return __pyx_r; |
| 15040 | } |
| 15041 | |
| 15042 | /* "View.MemoryView":563 |
| 15043 | * return self._size |
| 15044 | * |
| 15045 | * def __len__(self): # <<<<<<<<<<<<<< |
| 15046 | * if self.view.ndim >= 1: |
| 15047 | * return self.view.shape[0] |
| 15048 | */ |
| 15049 | |
| 15050 | /* Python wrapper */ |
| 15051 | static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/ |
| 15052 | static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) { |
| 15053 | Py_ssize_t __pyx_r; |
| 15054 | __Pyx_RefNannyDeclarations |
| 15055 | __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); |
| 15056 | __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 15057 | |
| 15058 | /* function exit code */ |
| 15059 | __Pyx_RefNannyFinishContext(); |
| 15060 | return __pyx_r; |
| 15061 | } |
| 15062 | |
| 15063 | static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 15064 | Py_ssize_t __pyx_r; |
| 15065 | __Pyx_RefNannyDeclarations |
| 15066 | int __pyx_t_1; |
| 15067 | __Pyx_RefNannySetupContext("__len__", 0); |
| 15068 | |
| 15069 | /* "View.MemoryView":564 |
| 15070 | * |
| 15071 | * def __len__(self): |
| 15072 | * if self.view.ndim >= 1: # <<<<<<<<<<<<<< |
| 15073 | * return self.view.shape[0] |
| 15074 | * |
| 15075 | */ |
| 15076 | __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0); |
| 15077 | if (__pyx_t_1) { |
| 15078 | |
| 15079 | /* "View.MemoryView":565 |
| 15080 | * def __len__(self): |
| 15081 | * if self.view.ndim >= 1: |
| 15082 | * return self.view.shape[0] # <<<<<<<<<<<<<< |
| 15083 | * |
| 15084 | * return 0 |
| 15085 | */ |
| 15086 | __pyx_r = (__pyx_v_self->view.shape[0]); |
| 15087 | goto __pyx_L0; |
| 15088 | |
| 15089 | /* "View.MemoryView":564 |
| 15090 | * |
| 15091 | * def __len__(self): |
| 15092 | * if self.view.ndim >= 1: # <<<<<<<<<<<<<< |
| 15093 | * return self.view.shape[0] |
| 15094 | * |
| 15095 | */ |
| 15096 | } |
| 15097 | |
| 15098 | /* "View.MemoryView":567 |
| 15099 | * return self.view.shape[0] |
| 15100 | * |
| 15101 | * return 0 # <<<<<<<<<<<<<< |
| 15102 | * |
| 15103 | * def __repr__(self): |
| 15104 | */ |
| 15105 | __pyx_r = 0; |
| 15106 | goto __pyx_L0; |
| 15107 | |
| 15108 | /* "View.MemoryView":563 |
| 15109 | * return self._size |
| 15110 | * |
| 15111 | * def __len__(self): # <<<<<<<<<<<<<< |
| 15112 | * if self.view.ndim >= 1: |
| 15113 | * return self.view.shape[0] |
| 15114 | */ |
| 15115 | |
| 15116 | /* function exit code */ |
| 15117 | __pyx_L0:; |
| 15118 | __Pyx_RefNannyFinishContext(); |
| 15119 | return __pyx_r; |
| 15120 | } |
| 15121 | |
| 15122 | /* "View.MemoryView":569 |
| 15123 | * return 0 |
| 15124 | * |
| 15125 | * def __repr__(self): # <<<<<<<<<<<<<< |
| 15126 | * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, |
| 15127 | * id(self)) |
| 15128 | */ |
| 15129 | |
| 15130 | /* Python wrapper */ |
| 15131 | static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/ |
| 15132 | static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) { |
| 15133 | PyObject *__pyx_r = 0; |
| 15134 | __Pyx_RefNannyDeclarations |
| 15135 | __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); |
| 15136 | __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 15137 | |
| 15138 | /* function exit code */ |
| 15139 | __Pyx_RefNannyFinishContext(); |
| 15140 | return __pyx_r; |
| 15141 | } |
| 15142 | |
| 15143 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 15144 | PyObject *__pyx_r = NULL((void*)0); |
| 15145 | __Pyx_RefNannyDeclarations |
| 15146 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 15147 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 15148 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 15149 | int __pyx_lineno = 0; |
| 15150 | const char *__pyx_filename = NULL((void*)0); |
| 15151 | int __pyx_clineno = 0; |
| 15152 | __Pyx_RefNannySetupContext("__repr__", 0); |
| 15153 | |
| 15154 | /* "View.MemoryView":570 |
| 15155 | * |
| 15156 | * def __repr__(self): |
| 15157 | * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< |
| 15158 | * id(self)) |
| 15159 | * |
| 15160 | */ |
| 15161 | __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); |
| 15162 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 570; __pyx_clineno = __LINE__15162; goto __pyx_L1_error;} |
| 15163 | __Pyx_GOTREF(__pyx_t_1); |
| 15164 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 570; __pyx_clineno = __LINE__15164; goto __pyx_L1_error;} |
| 15165 | __Pyx_GOTREF(__pyx_t_2); |
| 15166 | __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; |
| 15167 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 570; __pyx_clineno = __LINE__15167; goto __pyx_L1_error;} |
| 15168 | __Pyx_GOTREF(__pyx_t_1); |
| 15169 | __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; |
| 15170 | |
| 15171 | /* "View.MemoryView":571 |
| 15172 | * def __repr__(self): |
| 15173 | * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, |
| 15174 | * id(self)) # <<<<<<<<<<<<<< |
| 15175 | * |
| 15176 | * def __str__(self): |
| 15177 | */ |
| 15178 | __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__15178; goto __pyx_L1_error;} |
| 15179 | __Pyx_GOTREF(__pyx_t_2); |
| 15180 | __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++); |
| 15181 | __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); |
| 15182 | PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = ((PyObject * )__pyx_v_self)); |
| 15183 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__15183; goto __pyx_L1_error;} |
| 15184 | __Pyx_GOTREF(__pyx_t_3); |
| 15185 | __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; |
| 15186 | |
| 15187 | /* "View.MemoryView":570 |
| 15188 | * |
| 15189 | * def __repr__(self): |
| 15190 | * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< |
| 15191 | * id(self)) |
| 15192 | * |
| 15193 | */ |
| 15194 | __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 570; __pyx_clineno = __LINE__15194; goto __pyx_L1_error;} |
| 15195 | __Pyx_GOTREF(__pyx_t_2); |
| 15196 | __Pyx_GIVEREF(__pyx_t_1); |
| 15197 | PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1); |
| 15198 | __Pyx_GIVEREF(__pyx_t_3); |
| 15199 | PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_t_3); |
| 15200 | __pyx_t_1 = 0; |
| 15201 | __pyx_t_3 = 0; |
| 15202 | __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_2)PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_2 ); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 570; __pyx_clineno = __LINE__15202; goto __pyx_L1_error;} |
| 15203 | __Pyx_GOTREF(__pyx_t_3); |
| 15204 | __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; |
| 15205 | __pyx_r = __pyx_t_3; |
| 15206 | __pyx_t_3 = 0; |
| 15207 | goto __pyx_L0; |
| 15208 | |
| 15209 | /* "View.MemoryView":569 |
| 15210 | * return 0 |
| 15211 | * |
| 15212 | * def __repr__(self): # <<<<<<<<<<<<<< |
| 15213 | * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, |
| 15214 | * id(self)) |
| 15215 | */ |
| 15216 | |
| 15217 | /* function exit code */ |
| 15218 | __pyx_L1_error:; |
| 15219 | __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); |
| 15220 | __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); |
| 15221 | __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); |
| 15222 | __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 15223 | __pyx_r = NULL((void*)0); |
| 15224 | __pyx_L0:; |
| 15225 | __Pyx_XGIVEREF(__pyx_r); |
| 15226 | __Pyx_RefNannyFinishContext(); |
| 15227 | return __pyx_r; |
| 15228 | } |
| 15229 | |
| 15230 | /* "View.MemoryView":573 |
| 15231 | * id(self)) |
| 15232 | * |
| 15233 | * def __str__(self): # <<<<<<<<<<<<<< |
| 15234 | * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) |
| 15235 | * |
| 15236 | */ |
| 15237 | |
| 15238 | /* Python wrapper */ |
| 15239 | static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/ |
| 15240 | static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) { |
| 15241 | PyObject *__pyx_r = 0; |
| 15242 | __Pyx_RefNannyDeclarations |
| 15243 | __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); |
| 15244 | __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 15245 | |
| 15246 | /* function exit code */ |
| 15247 | __Pyx_RefNannyFinishContext(); |
| 15248 | return __pyx_r; |
| 15249 | } |
| 15250 | |
| 15251 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 15252 | PyObject *__pyx_r = NULL((void*)0); |
| 15253 | __Pyx_RefNannyDeclarations |
| 15254 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 15255 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 15256 | int __pyx_lineno = 0; |
| 15257 | const char *__pyx_filename = NULL((void*)0); |
| 15258 | int __pyx_clineno = 0; |
| 15259 | __Pyx_RefNannySetupContext("__str__", 0); |
| 15260 | |
| 15261 | /* "View.MemoryView":574 |
| 15262 | * |
| 15263 | * def __str__(self): |
| 15264 | * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<< |
| 15265 | * |
| 15266 | * |
| 15267 | */ |
| 15268 | __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); |
| 15269 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 574; __pyx_clineno = __LINE__15269; goto __pyx_L1_error;} |
| 15270 | __Pyx_GOTREF(__pyx_t_1); |
| 15271 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 574; __pyx_clineno = __LINE__15271; goto __pyx_L1_error;} |
| 15272 | __Pyx_GOTREF(__pyx_t_2); |
| 15273 | __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; |
| 15274 | __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 574; __pyx_clineno = __LINE__15274; goto __pyx_L1_error;} |
| 15275 | __Pyx_GOTREF(__pyx_t_1); |
| 15276 | __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; |
| 15277 | __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 574; __pyx_clineno = __LINE__15277; goto __pyx_L1_error;} |
| 15278 | __Pyx_GOTREF(__pyx_t_2); |
| 15279 | __Pyx_GIVEREF(__pyx_t_1); |
| 15280 | PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1); |
| 15281 | __pyx_t_1 = 0; |
| 15282 | __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2)PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 574; __pyx_clineno = __LINE__15282; goto __pyx_L1_error;} |
| 15283 | __Pyx_GOTREF(__pyx_t_1); |
| 15284 | __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; |
| 15285 | __pyx_r = __pyx_t_1; |
| 15286 | __pyx_t_1 = 0; |
| 15287 | goto __pyx_L0; |
| 15288 | |
| 15289 | /* "View.MemoryView":573 |
| 15290 | * id(self)) |
| 15291 | * |
| 15292 | * def __str__(self): # <<<<<<<<<<<<<< |
| 15293 | * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) |
| 15294 | * |
| 15295 | */ |
| 15296 | |
| 15297 | /* function exit code */ |
| 15298 | __pyx_L1_error:; |
| 15299 | __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); |
| 15300 | __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); |
| 15301 | __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 15302 | __pyx_r = NULL((void*)0); |
| 15303 | __pyx_L0:; |
| 15304 | __Pyx_XGIVEREF(__pyx_r); |
| 15305 | __Pyx_RefNannyFinishContext(); |
| 15306 | return __pyx_r; |
| 15307 | } |
| 15308 | |
| 15309 | /* "View.MemoryView":577 |
| 15310 | * |
| 15311 | * |
| 15312 | * def is_c_contig(self): # <<<<<<<<<<<<<< |
| 15313 | * cdef __Pyx_memviewslice *mslice |
| 15314 | * cdef __Pyx_memviewslice tmp |
| 15315 | */ |
| 15316 | |
| 15317 | /* Python wrapper */ |
| 15318 | static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/ |
| 15319 | static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) { |
| 15320 | PyObject *__pyx_r = 0; |
| 15321 | __Pyx_RefNannyDeclarations |
| 15322 | __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0); |
| 15323 | __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 15324 | |
| 15325 | /* function exit code */ |
| 15326 | __Pyx_RefNannyFinishContext(); |
| 15327 | return __pyx_r; |
| 15328 | } |
| 15329 | |
| 15330 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 15331 | __Pyx_memviewslice *__pyx_v_mslice; |
| 15332 | __Pyx_memviewslice __pyx_v_tmp; |
| 15333 | PyObject *__pyx_r = NULL((void*)0); |
| 15334 | __Pyx_RefNannyDeclarations |
| 15335 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 15336 | int __pyx_lineno = 0; |
| 15337 | const char *__pyx_filename = NULL((void*)0); |
| 15338 | int __pyx_clineno = 0; |
| 15339 | __Pyx_RefNannySetupContext("is_c_contig", 0); |
| 15340 | |
| 15341 | /* "View.MemoryView":580 |
| 15342 | * cdef __Pyx_memviewslice *mslice |
| 15343 | * cdef __Pyx_memviewslice tmp |
| 15344 | * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< |
| 15345 | * return slice_is_contig(mslice, 'C', self.view.ndim) |
| 15346 | * |
| 15347 | */ |
| 15348 | __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); |
| 15349 | |
| 15350 | /* "View.MemoryView":581 |
| 15351 | * cdef __Pyx_memviewslice tmp |
| 15352 | * mslice = get_slice_from_memview(self, &tmp) |
| 15353 | * return slice_is_contig(mslice, 'C', self.view.ndim) # <<<<<<<<<<<<<< |
| 15354 | * |
| 15355 | * def is_f_contig(self): |
| 15356 | */ |
| 15357 | __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); |
| 15358 | __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig(__pyx_v_mslice, 'C', __pyx_v_self->view.ndim))((__pyx_memviewslice_is_contig(__pyx_v_mslice, 'C', __pyx_v_self ->view.ndim)) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct )))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : ( ( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt ++), ((PyObject *) &_Py_ZeroStruct))); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 581; __pyx_clineno = __LINE__15358; goto __pyx_L1_error;} |
| 15359 | __Pyx_GOTREF(__pyx_t_1); |
| 15360 | __pyx_r = __pyx_t_1; |
| 15361 | __pyx_t_1 = 0; |
| 15362 | goto __pyx_L0; |
| 15363 | |
| 15364 | /* "View.MemoryView":577 |
| 15365 | * |
| 15366 | * |
| 15367 | * def is_c_contig(self): # <<<<<<<<<<<<<< |
| 15368 | * cdef __Pyx_memviewslice *mslice |
| 15369 | * cdef __Pyx_memviewslice tmp |
| 15370 | */ |
| 15371 | |
| 15372 | /* function exit code */ |
| 15373 | __pyx_L1_error:; |
| 15374 | __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); |
| 15375 | __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 15376 | __pyx_r = NULL((void*)0); |
| 15377 | __pyx_L0:; |
| 15378 | __Pyx_XGIVEREF(__pyx_r); |
| 15379 | __Pyx_RefNannyFinishContext(); |
| 15380 | return __pyx_r; |
| 15381 | } |
| 15382 | |
| 15383 | /* "View.MemoryView":583 |
| 15384 | * return slice_is_contig(mslice, 'C', self.view.ndim) |
| 15385 | * |
| 15386 | * def is_f_contig(self): # <<<<<<<<<<<<<< |
| 15387 | * cdef __Pyx_memviewslice *mslice |
| 15388 | * cdef __Pyx_memviewslice tmp |
| 15389 | */ |
| 15390 | |
| 15391 | /* Python wrapper */ |
| 15392 | static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/ |
| 15393 | static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) { |
| 15394 | PyObject *__pyx_r = 0; |
| 15395 | __Pyx_RefNannyDeclarations |
| 15396 | __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0); |
| 15397 | __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 15398 | |
| 15399 | /* function exit code */ |
| 15400 | __Pyx_RefNannyFinishContext(); |
| 15401 | return __pyx_r; |
| 15402 | } |
| 15403 | |
| 15404 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 15405 | __Pyx_memviewslice *__pyx_v_mslice; |
| 15406 | __Pyx_memviewslice __pyx_v_tmp; |
| 15407 | PyObject *__pyx_r = NULL((void*)0); |
| 15408 | __Pyx_RefNannyDeclarations |
| 15409 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 15410 | int __pyx_lineno = 0; |
| 15411 | const char *__pyx_filename = NULL((void*)0); |
| 15412 | int __pyx_clineno = 0; |
| 15413 | __Pyx_RefNannySetupContext("is_f_contig", 0); |
| 15414 | |
| 15415 | /* "View.MemoryView":586 |
| 15416 | * cdef __Pyx_memviewslice *mslice |
| 15417 | * cdef __Pyx_memviewslice tmp |
| 15418 | * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< |
| 15419 | * return slice_is_contig(mslice, 'F', self.view.ndim) |
| 15420 | * |
| 15421 | */ |
| 15422 | __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); |
| 15423 | |
| 15424 | /* "View.MemoryView":587 |
| 15425 | * cdef __Pyx_memviewslice tmp |
| 15426 | * mslice = get_slice_from_memview(self, &tmp) |
| 15427 | * return slice_is_contig(mslice, 'F', self.view.ndim) # <<<<<<<<<<<<<< |
| 15428 | * |
| 15429 | * def copy(self): |
| 15430 | */ |
| 15431 | __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); |
| 15432 | __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig(__pyx_v_mslice, 'F', __pyx_v_self->view.ndim))((__pyx_memviewslice_is_contig(__pyx_v_mslice, 'F', __pyx_v_self ->view.ndim)) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct )))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : ( ( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt ++), ((PyObject *) &_Py_ZeroStruct))); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 587; __pyx_clineno = __LINE__15432; goto __pyx_L1_error;} |
| 15433 | __Pyx_GOTREF(__pyx_t_1); |
| 15434 | __pyx_r = __pyx_t_1; |
| 15435 | __pyx_t_1 = 0; |
| 15436 | goto __pyx_L0; |
| 15437 | |
| 15438 | /* "View.MemoryView":583 |
| 15439 | * return slice_is_contig(mslice, 'C', self.view.ndim) |
| 15440 | * |
| 15441 | * def is_f_contig(self): # <<<<<<<<<<<<<< |
| 15442 | * cdef __Pyx_memviewslice *mslice |
| 15443 | * cdef __Pyx_memviewslice tmp |
| 15444 | */ |
| 15445 | |
| 15446 | /* function exit code */ |
| 15447 | __pyx_L1_error:; |
| 15448 | __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); |
| 15449 | __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 15450 | __pyx_r = NULL((void*)0); |
| 15451 | __pyx_L0:; |
| 15452 | __Pyx_XGIVEREF(__pyx_r); |
| 15453 | __Pyx_RefNannyFinishContext(); |
| 15454 | return __pyx_r; |
| 15455 | } |
| 15456 | |
| 15457 | /* "View.MemoryView":589 |
| 15458 | * return slice_is_contig(mslice, 'F', self.view.ndim) |
| 15459 | * |
| 15460 | * def copy(self): # <<<<<<<<<<<<<< |
| 15461 | * cdef __Pyx_memviewslice mslice |
| 15462 | * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS |
| 15463 | */ |
| 15464 | |
| 15465 | /* Python wrapper */ |
| 15466 | static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/ |
| 15467 | static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) { |
| 15468 | PyObject *__pyx_r = 0; |
| 15469 | __Pyx_RefNannyDeclarations |
| 15470 | __Pyx_RefNannySetupContext("copy (wrapper)", 0); |
| 15471 | __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 15472 | |
| 15473 | /* function exit code */ |
| 15474 | __Pyx_RefNannyFinishContext(); |
| 15475 | return __pyx_r; |
| 15476 | } |
| 15477 | |
| 15478 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 15479 | __Pyx_memviewslice __pyx_v_mslice; |
| 15480 | int __pyx_v_flags; |
| 15481 | PyObject *__pyx_r = NULL((void*)0); |
| 15482 | __Pyx_RefNannyDeclarations |
| 15483 | __Pyx_memviewslice __pyx_t_1; |
| 15484 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 15485 | int __pyx_lineno = 0; |
| 15486 | const char *__pyx_filename = NULL((void*)0); |
| 15487 | int __pyx_clineno = 0; |
| 15488 | __Pyx_RefNannySetupContext("copy", 0); |
| 15489 | |
| 15490 | /* "View.MemoryView":591 |
| 15491 | * def copy(self): |
| 15492 | * cdef __Pyx_memviewslice mslice |
| 15493 | * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<< |
| 15494 | * |
| 15495 | * slice_copy(self, &mslice) |
| 15496 | */ |
| 15497 | __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS(0x0040 | (0x0010 | 0x0008)))); |
| 15498 | |
| 15499 | /* "View.MemoryView":593 |
| 15500 | * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS |
| 15501 | * |
| 15502 | * slice_copy(self, &mslice) # <<<<<<<<<<<<<< |
| 15503 | * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, |
| 15504 | * self.view.itemsize, |
| 15505 | */ |
| 15506 | __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice)); |
| 15507 | |
| 15508 | /* "View.MemoryView":594 |
| 15509 | * |
| 15510 | * slice_copy(self, &mslice) |
| 15511 | * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<< |
| 15512 | * self.view.itemsize, |
| 15513 | * flags|PyBUF_C_CONTIGUOUS, |
| 15514 | */ |
| 15515 | __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), __pyx_k_c, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS(0x0020 | (0x0010 | 0x0008))), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__15515; goto __pyx_L1_error;} |
| 15516 | __pyx_v_mslice = __pyx_t_1; |
| 15517 | |
| 15518 | /* "View.MemoryView":599 |
| 15519 | * self.dtype_is_object) |
| 15520 | * |
| 15521 | * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<< |
| 15522 | * |
| 15523 | * def copy_fortran(self): |
| 15524 | */ |
| 15525 | __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); |
| 15526 | __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 599; __pyx_clineno = __LINE__15526; goto __pyx_L1_error;} |
| 15527 | __Pyx_GOTREF(__pyx_t_2); |
| 15528 | __pyx_r = __pyx_t_2; |
| 15529 | __pyx_t_2 = 0; |
| 15530 | goto __pyx_L0; |
| 15531 | |
| 15532 | /* "View.MemoryView":589 |
| 15533 | * return slice_is_contig(mslice, 'F', self.view.ndim) |
| 15534 | * |
| 15535 | * def copy(self): # <<<<<<<<<<<<<< |
| 15536 | * cdef __Pyx_memviewslice mslice |
| 15537 | * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS |
| 15538 | */ |
| 15539 | |
| 15540 | /* function exit code */ |
| 15541 | __pyx_L1_error:; |
| 15542 | __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); |
| 15543 | __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 15544 | __pyx_r = NULL((void*)0); |
| 15545 | __pyx_L0:; |
| 15546 | __Pyx_XGIVEREF(__pyx_r); |
| 15547 | __Pyx_RefNannyFinishContext(); |
| 15548 | return __pyx_r; |
| 15549 | } |
| 15550 | |
| 15551 | /* "View.MemoryView":601 |
| 15552 | * return memoryview_copy_from_slice(self, &mslice) |
| 15553 | * |
| 15554 | * def copy_fortran(self): # <<<<<<<<<<<<<< |
| 15555 | * cdef __Pyx_memviewslice src, dst |
| 15556 | * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS |
| 15557 | */ |
| 15558 | |
| 15559 | /* Python wrapper */ |
| 15560 | static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/ |
| 15561 | static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) { |
| 15562 | PyObject *__pyx_r = 0; |
| 15563 | __Pyx_RefNannyDeclarations |
| 15564 | __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0); |
| 15565 | __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self)); |
| 15566 | |
| 15567 | /* function exit code */ |
| 15568 | __Pyx_RefNannyFinishContext(); |
| 15569 | return __pyx_r; |
| 15570 | } |
| 15571 | |
| 15572 | static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) { |
| 15573 | __Pyx_memviewslice __pyx_v_src; |
| 15574 | __Pyx_memviewslice __pyx_v_dst; |
| 15575 | int __pyx_v_flags; |
| 15576 | PyObject *__pyx_r = NULL((void*)0); |
| 15577 | __Pyx_RefNannyDeclarations |
| 15578 | __Pyx_memviewslice __pyx_t_1; |
| 15579 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 15580 | int __pyx_lineno = 0; |
| 15581 | const char *__pyx_filename = NULL((void*)0); |
| 15582 | int __pyx_clineno = 0; |
| 15583 | __Pyx_RefNannySetupContext("copy_fortran", 0); |
| 15584 | |
| 15585 | /* "View.MemoryView":603 |
| 15586 | * def copy_fortran(self): |
| 15587 | * cdef __Pyx_memviewslice src, dst |
| 15588 | * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<< |
| 15589 | * |
| 15590 | * slice_copy(self, &src) |
| 15591 | */ |
| 15592 | __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS(0x0020 | (0x0010 | 0x0008)))); |
| 15593 | |
| 15594 | /* "View.MemoryView":605 |
| 15595 | * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS |
| 15596 | * |
| 15597 | * slice_copy(self, &src) # <<<<<<<<<<<<<< |
| 15598 | * dst = slice_copy_contig(&src, "fortran", self.view.ndim, |
| 15599 | * self.view.itemsize, |
| 15600 | */ |
| 15601 | __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src)); |
| 15602 | |
| 15603 | /* "View.MemoryView":606 |
| 15604 | * |
| 15605 | * slice_copy(self, &src) |
| 15606 | * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<< |
| 15607 | * self.view.itemsize, |
| 15608 | * flags|PyBUF_F_CONTIGUOUS, |
| 15609 | */ |
| 15610 | __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), __pyx_k_fortran, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS(0x0040 | (0x0010 | 0x0008))), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 606; __pyx_clineno = __LINE__15610; goto __pyx_L1_error;} |
| 15611 | __pyx_v_dst = __pyx_t_1; |
| 15612 | |
| 15613 | /* "View.MemoryView":611 |
| 15614 | * self.dtype_is_object) |
| 15615 | * |
| 15616 | * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<< |
| 15617 | * |
| 15618 | * |
| 15619 | */ |
| 15620 | __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); |
| 15621 | __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 611; __pyx_clineno = __LINE__15621; goto __pyx_L1_error;} |
| 15622 | __Pyx_GOTREF(__pyx_t_2); |
| 15623 | __pyx_r = __pyx_t_2; |
| 15624 | __pyx_t_2 = 0; |
| 15625 | goto __pyx_L0; |
| 15626 | |
| 15627 | /* "View.MemoryView":601 |
| 15628 | * return memoryview_copy_from_slice(self, &mslice) |
| 15629 | * |
| 15630 | * def copy_fortran(self): # <<<<<<<<<<<<<< |
| 15631 | * cdef __Pyx_memviewslice src, dst |
| 15632 | * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS |
| 15633 | */ |
| 15634 | |
| 15635 | /* function exit code */ |
| 15636 | __pyx_L1_error:; |
| 15637 | __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); |
| 15638 | __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 15639 | __pyx_r = NULL((void*)0); |
| 15640 | __pyx_L0:; |
| 15641 | __Pyx_XGIVEREF(__pyx_r); |
| 15642 | __Pyx_RefNannyFinishContext(); |
| 15643 | return __pyx_r; |
| 15644 | } |
| 15645 | |
| 15646 | /* "View.MemoryView":615 |
| 15647 | * |
| 15648 | * @cname('__pyx_memoryview_new') |
| 15649 | * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<< |
| 15650 | * cdef memoryview result = memoryview(o, flags, dtype_is_object) |
| 15651 | * result.typeinfo = typeinfo |
| 15652 | */ |
| 15653 | |
| 15654 | static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) { |
| 15655 | struct __pyx_memoryview_obj *__pyx_v_result = 0; |
| 15656 | PyObject *__pyx_r = NULL((void*)0); |
| 15657 | __Pyx_RefNannyDeclarations |
| 15658 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 15659 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 15660 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 15661 | int __pyx_lineno = 0; |
| 15662 | const char *__pyx_filename = NULL((void*)0); |
| 15663 | int __pyx_clineno = 0; |
| 15664 | __Pyx_RefNannySetupContext("memoryview_cwrapper", 0); |
| 15665 | |
| 15666 | /* "View.MemoryView":616 |
| 15667 | * @cname('__pyx_memoryview_new') |
| 15668 | * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): |
| 15669 | * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<< |
| 15670 | * result.typeinfo = typeinfo |
| 15671 | * return result |
| 15672 | */ |
| 15673 | __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__15673; goto __pyx_L1_error;} |
| 15674 | __Pyx_GOTREF(__pyx_t_1); |
| 15675 | __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object)((__pyx_v_dtype_is_object) ? (( ((PyObject*)(((PyObject *) & _Py_TrueStruct)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct )) : (( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))-> ob_refcnt++), ((PyObject *) &_Py_ZeroStruct))); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__15675; goto __pyx_L1_error;} |
| 15676 | __Pyx_GOTREF(__pyx_t_2); |
| 15677 | __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__15677; goto __pyx_L1_error;} |
| 15678 | __Pyx_GOTREF(__pyx_t_3); |
| 15679 | __Pyx_INCREF(__pyx_v_o)( ((PyObject*)(__pyx_v_o))->ob_refcnt++); |
| 15680 | __Pyx_GIVEREF(__pyx_v_o); |
| 15681 | PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_v_o); |
| 15682 | __Pyx_GIVEREF(__pyx_t_1); |
| 15683 | PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_t_1); |
| 15684 | __Pyx_GIVEREF(__pyx_t_2); |
| 15685 | PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[2] = __pyx_t_2); |
| 15686 | __pyx_t_1 = 0; |
| 15687 | __pyx_t_2 = 0; |
| 15688 | __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__15688; goto __pyx_L1_error;} |
| 15689 | __Pyx_GOTREF(__pyx_t_2); |
| 15690 | __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; |
| 15691 | __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2); |
| 15692 | __pyx_t_2 = 0; |
| 15693 | |
| 15694 | /* "View.MemoryView":617 |
| 15695 | * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): |
| 15696 | * cdef memoryview result = memoryview(o, flags, dtype_is_object) |
| 15697 | * result.typeinfo = typeinfo # <<<<<<<<<<<<<< |
| 15698 | * return result |
| 15699 | * |
| 15700 | */ |
| 15701 | __pyx_v_result->typeinfo = __pyx_v_typeinfo; |
| 15702 | |
| 15703 | /* "View.MemoryView":618 |
| 15704 | * cdef memoryview result = memoryview(o, flags, dtype_is_object) |
| 15705 | * result.typeinfo = typeinfo |
| 15706 | * return result # <<<<<<<<<<<<<< |
| 15707 | * |
| 15708 | * @cname('__pyx_memoryview_check') |
| 15709 | */ |
| 15710 | __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); |
| 15711 | __Pyx_INCREF(((PyObject *)__pyx_v_result))( ((PyObject*)(((PyObject *)__pyx_v_result)))->ob_refcnt++ ); |
| 15712 | __pyx_r = ((PyObject *)__pyx_v_result); |
| 15713 | goto __pyx_L0; |
| 15714 | |
| 15715 | /* "View.MemoryView":615 |
| 15716 | * |
| 15717 | * @cname('__pyx_memoryview_new') |
| 15718 | * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<< |
| 15719 | * cdef memoryview result = memoryview(o, flags, dtype_is_object) |
| 15720 | * result.typeinfo = typeinfo |
| 15721 | */ |
| 15722 | |
| 15723 | /* function exit code */ |
| 15724 | __pyx_L1_error:; |
| 15725 | __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); |
| 15726 | __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); |
| 15727 | __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); |
| 15728 | __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 15729 | __pyx_r = 0; |
| 15730 | __pyx_L0:; |
| 15731 | __Pyx_XDECREF((PyObject *)__pyx_v_result)do { if (((PyObject *)__pyx_v_result) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_result )))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject *)__pyx_v_result)))); } while (0); } while (0); |
| 15732 | __Pyx_XGIVEREF(__pyx_r); |
| 15733 | __Pyx_RefNannyFinishContext(); |
| 15734 | return __pyx_r; |
| 15735 | } |
| 15736 | |
| 15737 | /* "View.MemoryView":621 |
| 15738 | * |
| 15739 | * @cname('__pyx_memoryview_check') |
| 15740 | * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<< |
| 15741 | * return isinstance(o, memoryview) |
| 15742 | * |
| 15743 | */ |
| 15744 | |
| 15745 | static CYTHON_INLINE__inline__ int __pyx_memoryview_check(PyObject *__pyx_v_o) { |
| 15746 | int __pyx_r; |
| 15747 | __Pyx_RefNannyDeclarations |
| 15748 | int __pyx_t_1; |
| 15749 | __Pyx_RefNannySetupContext("memoryview_check", 0); |
| 15750 | |
| 15751 | /* "View.MemoryView":622 |
| 15752 | * @cname('__pyx_memoryview_check') |
| 15753 | * cdef inline bint memoryview_check(object o): |
| 15754 | * return isinstance(o, memoryview) # <<<<<<<<<<<<<< |
| 15755 | * |
| 15756 | * cdef tuple _unellipsify(object index, int ndim): |
| 15757 | */ |
| 15758 | __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type)((((PyObject*)(__pyx_v_o))->ob_type) == ((PyTypeObject *)__pyx_memoryview_type ) || PyType_IsSubtype((((PyObject*)(__pyx_v_o))->ob_type), ((PyTypeObject *)__pyx_memoryview_type))); |
| 15759 | __pyx_r = __pyx_t_1; |
| 15760 | goto __pyx_L0; |
| 15761 | |
| 15762 | /* "View.MemoryView":621 |
| 15763 | * |
| 15764 | * @cname('__pyx_memoryview_check') |
| 15765 | * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<< |
| 15766 | * return isinstance(o, memoryview) |
| 15767 | * |
| 15768 | */ |
| 15769 | |
| 15770 | /* function exit code */ |
| 15771 | __pyx_L0:; |
| 15772 | __Pyx_RefNannyFinishContext(); |
| 15773 | return __pyx_r; |
| 15774 | } |
| 15775 | |
| 15776 | /* "View.MemoryView":624 |
| 15777 | * return isinstance(o, memoryview) |
| 15778 | * |
| 15779 | * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< |
| 15780 | * """ |
| 15781 | * Replace all ellipses with full slices and fill incomplete indices with |
| 15782 | */ |
| 15783 | |
| 15784 | static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) { |
| 15785 | PyObject *__pyx_v_tup = NULL((void*)0); |
| 15786 | PyObject *__pyx_v_result = NULL((void*)0); |
| 15787 | int __pyx_v_have_slices; |
| 15788 | int __pyx_v_seen_ellipsis; |
| 15789 | CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_idx = NULL((void*)0); |
| 15790 | PyObject *__pyx_v_item = NULL((void*)0); |
| 15791 | Py_ssize_t __pyx_v_nslices; |
| 15792 | PyObject *__pyx_r = NULL((void*)0); |
| 15793 | __Pyx_RefNannyDeclarations |
| 15794 | int __pyx_t_1; |
| 15795 | int __pyx_t_2; |
| 15796 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 15797 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 15798 | Py_ssize_t __pyx_t_5; |
| 15799 | PyObject *(*__pyx_t_6)(PyObject *); |
| 15800 | PyObject *__pyx_t_7 = NULL((void*)0); |
| 15801 | Py_ssize_t __pyx_t_8; |
| 15802 | int __pyx_t_9; |
| 15803 | int __pyx_t_10; |
| 15804 | PyObject *__pyx_t_11 = NULL((void*)0); |
| 15805 | int __pyx_lineno = 0; |
| 15806 | const char *__pyx_filename = NULL((void*)0); |
| 15807 | int __pyx_clineno = 0; |
| 15808 | __Pyx_RefNannySetupContext("_unellipsify", 0); |
| 15809 | |
| 15810 | /* "View.MemoryView":629 |
| 15811 | * full slices. |
| 15812 | * """ |
| 15813 | * if not isinstance(index, tuple): # <<<<<<<<<<<<<< |
| 15814 | * tup = (index,) |
| 15815 | * else: |
| 15816 | */ |
| 15817 | __pyx_t_1 = PyTuple_Check(__pyx_v_index)((((((PyObject*)(__pyx_v_index))->ob_type))->tp_flags & ((1L<<26))) != 0); |
| 15818 | __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); |
| 15819 | if (__pyx_t_2) { |
| 15820 | |
| 15821 | /* "View.MemoryView":630 |
| 15822 | * """ |
| 15823 | * if not isinstance(index, tuple): |
| 15824 | * tup = (index,) # <<<<<<<<<<<<<< |
| 15825 | * else: |
| 15826 | * tup = index |
| 15827 | */ |
| 15828 | __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 630; __pyx_clineno = __LINE__15828; goto __pyx_L1_error;} |
| 15829 | __Pyx_GOTREF(__pyx_t_3); |
| 15830 | __Pyx_INCREF(__pyx_v_index)( ((PyObject*)(__pyx_v_index))->ob_refcnt++); |
| 15831 | __Pyx_GIVEREF(__pyx_v_index); |
| 15832 | PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_v_index ); |
| 15833 | __pyx_v_tup = __pyx_t_3; |
| 15834 | __pyx_t_3 = 0; |
| 15835 | |
| 15836 | /* "View.MemoryView":629 |
| 15837 | * full slices. |
| 15838 | * """ |
| 15839 | * if not isinstance(index, tuple): # <<<<<<<<<<<<<< |
| 15840 | * tup = (index,) |
| 15841 | * else: |
| 15842 | */ |
| 15843 | goto __pyx_L3; |
| 15844 | } |
| 15845 | |
| 15846 | /* "View.MemoryView":632 |
| 15847 | * tup = (index,) |
| 15848 | * else: |
| 15849 | * tup = index # <<<<<<<<<<<<<< |
| 15850 | * |
| 15851 | * result = [] |
| 15852 | */ |
| 15853 | /*else*/ { |
| 15854 | __Pyx_INCREF(__pyx_v_index)( ((PyObject*)(__pyx_v_index))->ob_refcnt++); |
| 15855 | __pyx_v_tup = __pyx_v_index; |
| 15856 | } |
| 15857 | __pyx_L3:; |
| 15858 | |
| 15859 | /* "View.MemoryView":634 |
| 15860 | * tup = index |
| 15861 | * |
| 15862 | * result = [] # <<<<<<<<<<<<<< |
| 15863 | * have_slices = False |
| 15864 | * seen_ellipsis = False |
| 15865 | */ |
| 15866 | __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 634; __pyx_clineno = __LINE__15866; goto __pyx_L1_error;} |
| 15867 | __Pyx_GOTREF(__pyx_t_3); |
| 15868 | __pyx_v_result = ((PyObject*)__pyx_t_3); |
| 15869 | __pyx_t_3 = 0; |
| 15870 | |
| 15871 | /* "View.MemoryView":635 |
| 15872 | * |
| 15873 | * result = [] |
| 15874 | * have_slices = False # <<<<<<<<<<<<<< |
| 15875 | * seen_ellipsis = False |
| 15876 | * for idx, item in enumerate(tup): |
| 15877 | */ |
| 15878 | __pyx_v_have_slices = 0; |
| 15879 | |
| 15880 | /* "View.MemoryView":636 |
| 15881 | * result = [] |
| 15882 | * have_slices = False |
| 15883 | * seen_ellipsis = False # <<<<<<<<<<<<<< |
| 15884 | * for idx, item in enumerate(tup): |
| 15885 | * if item is Ellipsis: |
| 15886 | */ |
| 15887 | __pyx_v_seen_ellipsis = 0; |
| 15888 | |
| 15889 | /* "View.MemoryView":637 |
| 15890 | * have_slices = False |
| 15891 | * seen_ellipsis = False |
| 15892 | * for idx, item in enumerate(tup): # <<<<<<<<<<<<<< |
| 15893 | * if item is Ellipsis: |
| 15894 | * if not seen_ellipsis: |
| 15895 | */ |
| 15896 | __Pyx_INCREF(__pyx_int_0)( ((PyObject*)(__pyx_int_0))->ob_refcnt++); |
| 15897 | __pyx_t_3 = __pyx_int_0; |
| 15898 | if (likely(PyList_CheckExact(__pyx_v_tup))__builtin_expect(!!(((((PyObject*)(__pyx_v_tup))->ob_type) == &PyList_Type)), 1) || PyTuple_CheckExact(__pyx_v_tup)((((PyObject*)(__pyx_v_tup))->ob_type) == &PyTuple_Type )) { |
| 15899 | __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); __pyx_t_5 = 0; |
| 15900 | __pyx_t_6 = NULL((void*)0); |
| 15901 | } else { |
| 15902 | __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 637; __pyx_clineno = __LINE__15902; goto __pyx_L1_error;} |
| 15903 | __Pyx_GOTREF(__pyx_t_4); |
| 15904 | __pyx_t_6 = Py_TYPE(__pyx_t_4)(((PyObject*)(__pyx_t_4))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 637; __pyx_clineno = __LINE__15904; goto __pyx_L1_error;} |
| 15905 | } |
| 15906 | for (;;) { |
| 15907 | if (likely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 1)) { |
| 15908 | if (likely(PyList_CheckExact(__pyx_t_4))__builtin_expect(!!(((((PyObject*)(__pyx_t_4))->ob_type) == &PyList_Type)), 1)) { |
| 15909 | if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)(((PyVarObject*)(__pyx_t_4))->ob_size)) break; |
| 15910 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 15911 | __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5)(((PyListObject *)(__pyx_t_4))->ob_item[__pyx_t_5]); __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++); __pyx_t_5++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 637; __pyx_clineno = __LINE__15911; goto __pyx_L1_error;} |
| 15912 | #else |
| 15913 | __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5)( (((PyObject*)(__pyx_t_4))->ob_type)->tp_as_sequence-> sq_item(__pyx_t_4, __pyx_t_5) ); __pyx_t_5++; if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 637; __pyx_clineno = __LINE__15913; goto __pyx_L1_error;} |
| 15914 | __Pyx_GOTREF(__pyx_t_7); |
| 15915 | #endif |
| 15916 | } else { |
| 15917 | if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)(((PyVarObject*)(__pyx_t_4))->ob_size)) break; |
| 15918 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 15919 | __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5)(((PyTupleObject *)(__pyx_t_4))->ob_item[__pyx_t_5]); __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++); __pyx_t_5++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 637; __pyx_clineno = __LINE__15919; goto __pyx_L1_error;} |
| 15920 | #else |
| 15921 | __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5)( (((PyObject*)(__pyx_t_4))->ob_type)->tp_as_sequence-> sq_item(__pyx_t_4, __pyx_t_5) ); __pyx_t_5++; if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 637; __pyx_clineno = __LINE__15921; goto __pyx_L1_error;} |
| 15922 | __Pyx_GOTREF(__pyx_t_7); |
| 15923 | #endif |
| 15924 | } |
| 15925 | } else { |
| 15926 | __pyx_t_7 = __pyx_t_6(__pyx_t_4); |
| 15927 | if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) { |
| 15928 | PyObject* exc_type = PyErr_Occurred(); |
| 15929 | if (exc_type) { |
| 15930 | 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(); |
| 15931 | else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 637; __pyx_clineno = __LINE__15931; goto __pyx_L1_error;} |
| 15932 | } |
| 15933 | break; |
| 15934 | } |
| 15935 | __Pyx_GOTREF(__pyx_t_7); |
| 15936 | } |
| 15937 | __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7)do { PyObject *tmp = (PyObject *) __pyx_v_item; __pyx_v_item = __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); |
| 15938 | __pyx_t_7 = 0; |
| 15939 | __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); |
| 15940 | __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3)do { PyObject *tmp = (PyObject *) __pyx_v_idx; __pyx_v_idx = __pyx_t_3 ; 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); |
| 15941 | __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 637; __pyx_clineno = __LINE__15941; goto __pyx_L1_error;} |
| 15942 | __Pyx_GOTREF(__pyx_t_7); |
| 15943 | __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); |
| 15944 | __pyx_t_3 = __pyx_t_7; |
| 15945 | __pyx_t_7 = 0; |
| 15946 | |
| 15947 | /* "View.MemoryView":638 |
| 15948 | * seen_ellipsis = False |
| 15949 | * for idx, item in enumerate(tup): |
| 15950 | * if item is Ellipsis: # <<<<<<<<<<<<<< |
| 15951 | * if not seen_ellipsis: |
| 15952 | * result.extend([slice(None)] * (ndim - len(tup) + 1)) |
| 15953 | */ |
| 15954 | __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis); |
| 15955 | __pyx_t_1 = (__pyx_t_2 != 0); |
| 15956 | if (__pyx_t_1) { |
| 15957 | |
| 15958 | /* "View.MemoryView":639 |
| 15959 | * for idx, item in enumerate(tup): |
| 15960 | * if item is Ellipsis: |
| 15961 | * if not seen_ellipsis: # <<<<<<<<<<<<<< |
| 15962 | * result.extend([slice(None)] * (ndim - len(tup) + 1)) |
| 15963 | * seen_ellipsis = True |
| 15964 | */ |
| 15965 | __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0); |
| 15966 | if (__pyx_t_1) { |
| 15967 | |
| 15968 | /* "View.MemoryView":640 |
| 15969 | * if item is Ellipsis: |
| 15970 | * if not seen_ellipsis: |
| 15971 | * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<< |
| 15972 | * seen_ellipsis = True |
| 15973 | * else: |
| 15974 | */ |
| 15975 | __pyx_t_8 = PyObject_LengthPyObject_Size(__pyx_v_tup); if (unlikely(__pyx_t_8 == -1)__builtin_expect(!!(__pyx_t_8 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__15975; goto __pyx_L1_error;} |
| 15976 | __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__15976; goto __pyx_L1_error;} |
| 15977 | __Pyx_GOTREF(__pyx_t_7); |
| 15978 | { Py_ssize_t __pyx_temp; |
| 15979 | for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) { |
| 15980 | __Pyx_INCREF(__pyx_slice__32)( ((PyObject*)(__pyx_slice__32))->ob_refcnt++); |
| 15981 | __Pyx_GIVEREF(__pyx_slice__32); |
| 15982 | PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__32)(((PyListObject *)(__pyx_t_7))->ob_item[__pyx_temp] = (__pyx_slice__32 )); |
| 15983 | } |
| 15984 | } |
| 15985 | __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == -1)__builtin_expect(!!(__pyx_t_9 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__15985; goto __pyx_L1_error;} |
| 15986 | __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; |
| 15987 | |
| 15988 | /* "View.MemoryView":641 |
| 15989 | * if not seen_ellipsis: |
| 15990 | * result.extend([slice(None)] * (ndim - len(tup) + 1)) |
| 15991 | * seen_ellipsis = True # <<<<<<<<<<<<<< |
| 15992 | * else: |
| 15993 | * result.append(slice(None)) |
| 15994 | */ |
| 15995 | __pyx_v_seen_ellipsis = 1; |
| 15996 | |
| 15997 | /* "View.MemoryView":639 |
| 15998 | * for idx, item in enumerate(tup): |
| 15999 | * if item is Ellipsis: |
| 16000 | * if not seen_ellipsis: # <<<<<<<<<<<<<< |
| 16001 | * result.extend([slice(None)] * (ndim - len(tup) + 1)) |
| 16002 | * seen_ellipsis = True |
| 16003 | */ |
| 16004 | goto __pyx_L7; |
| 16005 | } |
| 16006 | |
| 16007 | /* "View.MemoryView":643 |
| 16008 | * seen_ellipsis = True |
| 16009 | * else: |
| 16010 | * result.append(slice(None)) # <<<<<<<<<<<<<< |
| 16011 | * have_slices = True |
| 16012 | * else: |
| 16013 | */ |
| 16014 | /*else*/ { |
| 16015 | __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__33); if (unlikely(__pyx_t_9 == -1)__builtin_expect(!!(__pyx_t_9 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__16015; goto __pyx_L1_error;} |
| 16016 | } |
| 16017 | __pyx_L7:; |
| 16018 | |
| 16019 | /* "View.MemoryView":644 |
| 16020 | * else: |
| 16021 | * result.append(slice(None)) |
| 16022 | * have_slices = True # <<<<<<<<<<<<<< |
| 16023 | * else: |
| 16024 | * if not isinstance(item, slice) and not PyIndex_Check(item): |
| 16025 | */ |
| 16026 | __pyx_v_have_slices = 1; |
| 16027 | |
| 16028 | /* "View.MemoryView":638 |
| 16029 | * seen_ellipsis = False |
| 16030 | * for idx, item in enumerate(tup): |
| 16031 | * if item is Ellipsis: # <<<<<<<<<<<<<< |
| 16032 | * if not seen_ellipsis: |
| 16033 | * result.extend([slice(None)] * (ndim - len(tup) + 1)) |
| 16034 | */ |
| 16035 | goto __pyx_L6; |
| 16036 | } |
| 16037 | |
| 16038 | /* "View.MemoryView":646 |
| 16039 | * have_slices = True |
| 16040 | * else: |
| 16041 | * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<< |
| 16042 | * raise TypeError("Cannot index with type '%s'" % type(item)) |
| 16043 | * |
| 16044 | */ |
| 16045 | /*else*/ { |
| 16046 | __pyx_t_2 = PySlice_Check(__pyx_v_item)((((PyObject*)(__pyx_v_item))->ob_type) == &PySlice_Type ); |
| 16047 | __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0); |
| 16048 | if (__pyx_t_10) { |
| 16049 | } else { |
| 16050 | __pyx_t_1 = __pyx_t_10; |
| 16051 | goto __pyx_L9_bool_binop_done; |
| 16052 | } |
| 16053 | __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item)((__pyx_v_item)->ob_type->tp_as_number != ((void*)0) && ((((__pyx_v_item)->ob_type)->tp_flags & ((1L<< 17))) != 0) && (__pyx_v_item)->ob_type->tp_as_number ->nb_index != ((void*)0)) != 0)) != 0); |
| 16054 | __pyx_t_1 = __pyx_t_10; |
| 16055 | __pyx_L9_bool_binop_done:; |
| 16056 | if (__pyx_t_1) { |
| 16057 | |
| 16058 | /* "View.MemoryView":647 |
| 16059 | * else: |
| 16060 | * if not isinstance(item, slice) and not PyIndex_Check(item): |
| 16061 | * raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<< |
| 16062 | * |
| 16063 | * have_slices = have_slices or isinstance(item, slice) |
| 16064 | */ |
| 16065 | __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item)))PyString_Format(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)(((PyObject*)(__pyx_v_item))->ob_type))); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 647; __pyx_clineno = __LINE__16065; goto __pyx_L1_error;} |
| 16066 | __Pyx_GOTREF(__pyx_t_7); |
| 16067 | __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 647; __pyx_clineno = __LINE__16067; goto __pyx_L1_error;} |
| 16068 | __Pyx_GOTREF(__pyx_t_11); |
| 16069 | __Pyx_GIVEREF(__pyx_t_7); |
| 16070 | PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_7); |
| 16071 | __pyx_t_7 = 0; |
| 16072 | __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 647; __pyx_clineno = __LINE__16072; goto __pyx_L1_error;} |
| 16073 | __Pyx_GOTREF(__pyx_t_7); |
| 16074 | __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; |
| 16075 | __Pyx_Raise(__pyx_t_7, 0, 0, 0); |
| 16076 | __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; |
| 16077 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 647; __pyx_clineno = __LINE__16077; goto __pyx_L1_error;} |
| 16078 | |
| 16079 | /* "View.MemoryView":646 |
| 16080 | * have_slices = True |
| 16081 | * else: |
| 16082 | * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<< |
| 16083 | * raise TypeError("Cannot index with type '%s'" % type(item)) |
| 16084 | * |
| 16085 | */ |
| 16086 | } |
| 16087 | |
| 16088 | /* "View.MemoryView":649 |
| 16089 | * raise TypeError("Cannot index with type '%s'" % type(item)) |
| 16090 | * |
| 16091 | * have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<< |
| 16092 | * result.append(item) |
| 16093 | * |
| 16094 | */ |
| 16095 | __pyx_t_10 = (__pyx_v_have_slices != 0); |
| 16096 | if (!__pyx_t_10) { |
| 16097 | } else { |
| 16098 | __pyx_t_1 = __pyx_t_10; |
| 16099 | goto __pyx_L11_bool_binop_done; |
| 16100 | } |
| 16101 | __pyx_t_10 = PySlice_Check(__pyx_v_item)((((PyObject*)(__pyx_v_item))->ob_type) == &PySlice_Type ); |
| 16102 | __pyx_t_2 = (__pyx_t_10 != 0); |
| 16103 | __pyx_t_1 = __pyx_t_2; |
| 16104 | __pyx_L11_bool_binop_done:; |
| 16105 | __pyx_v_have_slices = __pyx_t_1; |
| 16106 | |
| 16107 | /* "View.MemoryView":650 |
| 16108 | * |
| 16109 | * have_slices = have_slices or isinstance(item, slice) |
| 16110 | * result.append(item) # <<<<<<<<<<<<<< |
| 16111 | * |
| 16112 | * nslices = ndim - len(result) |
| 16113 | */ |
| 16114 | __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == -1)__builtin_expect(!!(__pyx_t_9 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__16114; goto __pyx_L1_error;} |
| 16115 | } |
| 16116 | __pyx_L6:; |
| 16117 | |
| 16118 | /* "View.MemoryView":637 |
| 16119 | * have_slices = False |
| 16120 | * seen_ellipsis = False |
| 16121 | * for idx, item in enumerate(tup): # <<<<<<<<<<<<<< |
| 16122 | * if item is Ellipsis: |
| 16123 | * if not seen_ellipsis: |
| 16124 | */ |
| 16125 | } |
| 16126 | __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; |
| 16127 | __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; |
| 16128 | |
| 16129 | /* "View.MemoryView":652 |
| 16130 | * result.append(item) |
| 16131 | * |
| 16132 | * nslices = ndim - len(result) # <<<<<<<<<<<<<< |
| 16133 | * if nslices: |
| 16134 | * result.extend([slice(None)] * nslices) |
| 16135 | */ |
| 16136 | __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result)(((PyVarObject*)(__pyx_v_result))->ob_size); if (unlikely(__pyx_t_5 == -1)__builtin_expect(!!(__pyx_t_5 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 652; __pyx_clineno = __LINE__16136; goto __pyx_L1_error;} |
| 16137 | __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5); |
| 16138 | |
| 16139 | /* "View.MemoryView":653 |
| 16140 | * |
| 16141 | * nslices = ndim - len(result) |
| 16142 | * if nslices: # <<<<<<<<<<<<<< |
| 16143 | * result.extend([slice(None)] * nslices) |
| 16144 | * |
| 16145 | */ |
| 16146 | __pyx_t_1 = (__pyx_v_nslices != 0); |
| 16147 | if (__pyx_t_1) { |
| 16148 | |
| 16149 | /* "View.MemoryView":654 |
| 16150 | * nslices = ndim - len(result) |
| 16151 | * if nslices: |
| 16152 | * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<< |
| 16153 | * |
| 16154 | * return have_slices or nslices, tuple(result) |
| 16155 | */ |
| 16156 | __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 654; __pyx_clineno = __LINE__16156; goto __pyx_L1_error;} |
| 16157 | __Pyx_GOTREF(__pyx_t_3); |
| 16158 | { Py_ssize_t __pyx_temp; |
| 16159 | for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) { |
| 16160 | __Pyx_INCREF(__pyx_slice__34)( ((PyObject*)(__pyx_slice__34))->ob_refcnt++); |
| 16161 | __Pyx_GIVEREF(__pyx_slice__34); |
| 16162 | PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__34)(((PyListObject *)(__pyx_t_3))->ob_item[__pyx_temp] = (__pyx_slice__34 )); |
| 16163 | } |
| 16164 | } |
| 16165 | __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == -1)__builtin_expect(!!(__pyx_t_9 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 654; __pyx_clineno = __LINE__16165; goto __pyx_L1_error;} |
| 16166 | __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; |
| 16167 | |
| 16168 | /* "View.MemoryView":653 |
| 16169 | * |
| 16170 | * nslices = ndim - len(result) |
| 16171 | * if nslices: # <<<<<<<<<<<<<< |
| 16172 | * result.extend([slice(None)] * nslices) |
| 16173 | * |
| 16174 | */ |
| 16175 | } |
| 16176 | |
| 16177 | /* "View.MemoryView":656 |
| 16178 | * result.extend([slice(None)] * nslices) |
| 16179 | * |
| 16180 | * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<< |
| 16181 | * |
| 16182 | * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): |
| 16183 | */ |
| 16184 | __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); |
| 16185 | if (!__pyx_v_have_slices) { |
| 16186 | } else { |
| 16187 | __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices)((__pyx_v_have_slices) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct )))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : ( ( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt ++), ((PyObject *) &_Py_ZeroStruct))); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 656; __pyx_clineno = __LINE__16187; goto __pyx_L1_error;} |
| 16188 | __Pyx_GOTREF(__pyx_t_4); |
| 16189 | __pyx_t_3 = __pyx_t_4; |
| 16190 | __pyx_t_4 = 0; |
| 16191 | goto __pyx_L14_bool_binop_done; |
| 16192 | } |
| 16193 | __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 656; __pyx_clineno = __LINE__16193; goto __pyx_L1_error;} |
| 16194 | __Pyx_GOTREF(__pyx_t_4); |
| 16195 | __pyx_t_3 = __pyx_t_4; |
| 16196 | __pyx_t_4 = 0; |
| 16197 | __pyx_L14_bool_binop_done:; |
| 16198 | __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 656; __pyx_clineno = __LINE__16198; goto __pyx_L1_error;} |
| 16199 | __Pyx_GOTREF(__pyx_t_4); |
| 16200 | __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 656; __pyx_clineno = __LINE__16200; goto __pyx_L1_error;} |
| 16201 | __Pyx_GOTREF(__pyx_t_7); |
| 16202 | __Pyx_GIVEREF(__pyx_t_3); |
| 16203 | PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_3); |
| 16204 | __Pyx_GIVEREF(__pyx_t_4); |
| 16205 | PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_7))->ob_item[1] = __pyx_t_4); |
| 16206 | __pyx_t_3 = 0; |
| 16207 | __pyx_t_4 = 0; |
| 16208 | __pyx_r = ((PyObject*)__pyx_t_7); |
| 16209 | __pyx_t_7 = 0; |
| 16210 | goto __pyx_L0; |
| 16211 | |
| 16212 | /* "View.MemoryView":624 |
| 16213 | * return isinstance(o, memoryview) |
| 16214 | * |
| 16215 | * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< |
| 16216 | * """ |
| 16217 | * Replace all ellipses with full slices and fill incomplete indices with |
| 16218 | */ |
| 16219 | |
| 16220 | /* function exit code */ |
| 16221 | __pyx_L1_error:; |
| 16222 | __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); |
| 16223 | __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); |
| 16224 | __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); |
| 16225 | __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); |
| 16226 | __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 16227 | __pyx_r = 0; |
| 16228 | __pyx_L0:; |
| 16229 | __Pyx_XDECREF(__pyx_v_tup)do { if ((__pyx_v_tup) == ((void*)0)) ; else do { if ( --((PyObject *)(__pyx_v_tup))->ob_refcnt != 0) ; else ( (*(((PyObject*) ((PyObject *)(__pyx_v_tup)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_tup)))); } while (0); } while (0); |
| 16230 | __Pyx_XDECREF(__pyx_v_result)do { if ((__pyx_v_result) == ((void*)0)) ; else do { if ( --( (PyObject*)(__pyx_v_result))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(__pyx_v_result)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_result)))); } while (0); } while (0); |
| 16231 | __Pyx_XDECREF(__pyx_v_idx)do { if ((__pyx_v_idx) == ((void*)0)) ; else do { if ( --((PyObject *)(__pyx_v_idx))->ob_refcnt != 0) ; else ( (*(((PyObject*) ((PyObject *)(__pyx_v_idx)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_idx)))); } while (0); } while (0); |
| 16232 | __Pyx_XDECREF(__pyx_v_item)do { if ((__pyx_v_item) == ((void*)0)) ; else do { if ( --((PyObject *)(__pyx_v_item))->ob_refcnt != 0) ; else ( (*(((PyObject* )((PyObject *)(__pyx_v_item)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(__pyx_v_item)))); } while (0); } while (0); |
| 16233 | __Pyx_XGIVEREF(__pyx_r); |
| 16234 | __Pyx_RefNannyFinishContext(); |
| 16235 | return __pyx_r; |
| 16236 | } |
| 16237 | |
| 16238 | /* "View.MemoryView":658 |
| 16239 | * return have_slices or nslices, tuple(result) |
| 16240 | * |
| 16241 | * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<< |
| 16242 | * for suboffset in suboffsets[:ndim]: |
| 16243 | * if suboffset >= 0: |
| 16244 | */ |
| 16245 | |
| 16246 | static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) { |
| 16247 | Py_ssize_t __pyx_v_suboffset; |
| 16248 | PyObject *__pyx_r = NULL((void*)0); |
| 16249 | __Pyx_RefNannyDeclarations |
| 16250 | Py_ssize_t *__pyx_t_1; |
| 16251 | Py_ssize_t *__pyx_t_2; |
| 16252 | Py_ssize_t *__pyx_t_3; |
| 16253 | int __pyx_t_4; |
| 16254 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 16255 | int __pyx_lineno = 0; |
| 16256 | const char *__pyx_filename = NULL((void*)0); |
| 16257 | int __pyx_clineno = 0; |
| 16258 | __Pyx_RefNannySetupContext("assert_direct_dimensions", 0); |
| 16259 | |
| 16260 | /* "View.MemoryView":659 |
| 16261 | * |
| 16262 | * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): |
| 16263 | * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<< |
| 16264 | * if suboffset >= 0: |
| 16265 | * raise ValueError("Indirect dimensions not supported") |
| 16266 | */ |
| 16267 | __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim); |
| 16268 | for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) { |
| 16269 | __pyx_t_1 = __pyx_t_3; |
| 16270 | __pyx_v_suboffset = (__pyx_t_1[0]); |
| 16271 | |
| 16272 | /* "View.MemoryView":660 |
| 16273 | * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): |
| 16274 | * for suboffset in suboffsets[:ndim]: |
| 16275 | * if suboffset >= 0: # <<<<<<<<<<<<<< |
| 16276 | * raise ValueError("Indirect dimensions not supported") |
| 16277 | * |
| 16278 | */ |
| 16279 | __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0); |
| 16280 | if (__pyx_t_4) { |
| 16281 | |
| 16282 | /* "View.MemoryView":661 |
| 16283 | * for suboffset in suboffsets[:ndim]: |
| 16284 | * if suboffset >= 0: |
| 16285 | * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<< |
| 16286 | * |
| 16287 | * |
| 16288 | */ |
| 16289 | __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 661; __pyx_clineno = __LINE__16289; goto __pyx_L1_error;} |
| 16290 | __Pyx_GOTREF(__pyx_t_5); |
| 16291 | __Pyx_Raise(__pyx_t_5, 0, 0, 0); |
| 16292 | __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; |
| 16293 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 661; __pyx_clineno = __LINE__16293; goto __pyx_L1_error;} |
| 16294 | |
| 16295 | /* "View.MemoryView":660 |
| 16296 | * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): |
| 16297 | * for suboffset in suboffsets[:ndim]: |
| 16298 | * if suboffset >= 0: # <<<<<<<<<<<<<< |
| 16299 | * raise ValueError("Indirect dimensions not supported") |
| 16300 | * |
| 16301 | */ |
| 16302 | } |
| 16303 | } |
| 16304 | |
| 16305 | /* "View.MemoryView":658 |
| 16306 | * return have_slices or nslices, tuple(result) |
| 16307 | * |
| 16308 | * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<< |
| 16309 | * for suboffset in suboffsets[:ndim]: |
| 16310 | * if suboffset >= 0: |
| 16311 | */ |
| 16312 | |
| 16313 | /* function exit code */ |
| 16314 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 16315 | goto __pyx_L0; |
| 16316 | __pyx_L1_error:; |
| 16317 | __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); |
| 16318 | __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 16319 | __pyx_r = 0; |
| 16320 | __pyx_L0:; |
| 16321 | __Pyx_XGIVEREF(__pyx_r); |
| 16322 | __Pyx_RefNannyFinishContext(); |
| 16323 | return __pyx_r; |
| 16324 | } |
| 16325 | |
| 16326 | /* "View.MemoryView":668 |
| 16327 | * |
| 16328 | * @cname('__pyx_memview_slice') |
| 16329 | * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<< |
| 16330 | * cdef int new_ndim = 0, suboffset_dim = -1, dim |
| 16331 | * cdef bint negative_step |
| 16332 | */ |
| 16333 | |
| 16334 | static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) { |
| 16335 | int __pyx_v_new_ndim; |
| 16336 | int __pyx_v_suboffset_dim; |
| 16337 | int __pyx_v_dim; |
| 16338 | __Pyx_memviewslice __pyx_v_src; |
| 16339 | __Pyx_memviewslice __pyx_v_dst; |
| 16340 | __Pyx_memviewslice *__pyx_v_p_src; |
| 16341 | struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0; |
| 16342 | __Pyx_memviewslice *__pyx_v_p_dst; |
| 16343 | int *__pyx_v_p_suboffset_dim; |
| 16344 | Py_ssize_t __pyx_v_start; |
| 16345 | Py_ssize_t __pyx_v_stop; |
| 16346 | Py_ssize_t __pyx_v_step; |
| 16347 | int __pyx_v_have_start; |
| 16348 | int __pyx_v_have_stop; |
| 16349 | int __pyx_v_have_step; |
| 16350 | PyObject *__pyx_v_index = NULL((void*)0); |
| 16351 | struct __pyx_memoryview_obj *__pyx_r = NULL((void*)0); |
| 16352 | __Pyx_RefNannyDeclarations |
| 16353 | int __pyx_t_1; |
| 16354 | int __pyx_t_2; |
| 16355 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 16356 | struct __pyx_memoryview_obj *__pyx_t_4; |
| 16357 | char *__pyx_t_5; |
| 16358 | int __pyx_t_6; |
| 16359 | Py_ssize_t __pyx_t_7; |
| 16360 | PyObject *(*__pyx_t_8)(PyObject *); |
| 16361 | PyObject *__pyx_t_9 = NULL((void*)0); |
| 16362 | Py_ssize_t __pyx_t_10; |
| 16363 | int __pyx_t_11; |
| 16364 | Py_ssize_t __pyx_t_12; |
| 16365 | int __pyx_lineno = 0; |
| 16366 | const char *__pyx_filename = NULL((void*)0); |
| 16367 | int __pyx_clineno = 0; |
| 16368 | __Pyx_RefNannySetupContext("memview_slice", 0); |
| 16369 | |
| 16370 | /* "View.MemoryView":669 |
| 16371 | * @cname('__pyx_memview_slice') |
| 16372 | * cdef memoryview memview_slice(memoryview memview, object indices): |
| 16373 | * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<< |
| 16374 | * cdef bint negative_step |
| 16375 | * cdef __Pyx_memviewslice src, dst |
| 16376 | */ |
| 16377 | __pyx_v_new_ndim = 0; |
| 16378 | __pyx_v_suboffset_dim = -1; |
| 16379 | |
| 16380 | /* "View.MemoryView":676 |
| 16381 | * |
| 16382 | * |
| 16383 | * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<< |
| 16384 | * |
| 16385 | * cdef _memoryviewslice memviewsliceobj |
| 16386 | */ |
| 16387 | memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))); |
| 16388 | |
| 16389 | /* "View.MemoryView":680 |
| 16390 | * cdef _memoryviewslice memviewsliceobj |
| 16391 | * |
| 16392 | * assert memview.view.ndim > 0 # <<<<<<<<<<<<<< |
| 16393 | * |
| 16394 | * if isinstance(memview, _memoryviewslice): |
| 16395 | */ |
| 16396 | #ifndef CYTHON_WITHOUT_ASSERTIONS |
| 16397 | if (unlikely(!Py_OptimizeFlag)__builtin_expect(!!(!Py_OptimizeFlag), 0)) { |
| 16398 | if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))__builtin_expect(!!(!((__pyx_v_memview->view.ndim > 0) != 0)), 0)) { |
| 16399 | PyErr_SetNone(PyExc_AssertionError); |
| 16400 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__16400; goto __pyx_L1_error;} |
| 16401 | } |
| 16402 | } |
| 16403 | #endif |
| 16404 | |
| 16405 | /* "View.MemoryView":682 |
| 16406 | * assert memview.view.ndim > 0 |
| 16407 | * |
| 16408 | * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< |
| 16409 | * memviewsliceobj = memview |
| 16410 | * p_src = &memviewsliceobj.from_slice |
| 16411 | */ |
| 16412 | __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type)((((PyObject*)(((PyObject *)__pyx_v_memview)))->ob_type) == ((PyTypeObject *)__pyx_memoryviewslice_type) || PyType_IsSubtype ((((PyObject*)(((PyObject *)__pyx_v_memview)))->ob_type), ( (PyTypeObject *)__pyx_memoryviewslice_type))); |
| 16413 | __pyx_t_2 = (__pyx_t_1 != 0); |
| 16414 | if (__pyx_t_2) { |
| 16415 | |
| 16416 | /* "View.MemoryView":683 |
| 16417 | * |
| 16418 | * if isinstance(memview, _memoryviewslice): |
| 16419 | * memviewsliceobj = memview # <<<<<<<<<<<<<< |
| 16420 | * p_src = &memviewsliceobj.from_slice |
| 16421 | * else: |
| 16422 | */ |
| 16423 | if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type)))__builtin_expect(!!(((((PyObject *)__pyx_v_memview)) == (& _Py_NoneStruct)) || __builtin_expect(!!(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type)), 1)), 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 683; __pyx_clineno = __LINE__16423; goto __pyx_L1_error;} |
| 16424 | __pyx_t_3 = ((PyObject *)__pyx_v_memview); |
| 16425 | __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); |
| 16426 | __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3); |
| 16427 | __pyx_t_3 = 0; |
| 16428 | |
| 16429 | /* "View.MemoryView":684 |
| 16430 | * if isinstance(memview, _memoryviewslice): |
| 16431 | * memviewsliceobj = memview |
| 16432 | * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<< |
| 16433 | * else: |
| 16434 | * slice_copy(memview, &src) |
| 16435 | */ |
| 16436 | __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice); |
| 16437 | |
| 16438 | /* "View.MemoryView":682 |
| 16439 | * assert memview.view.ndim > 0 |
| 16440 | * |
| 16441 | * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< |
| 16442 | * memviewsliceobj = memview |
| 16443 | * p_src = &memviewsliceobj.from_slice |
| 16444 | */ |
| 16445 | goto __pyx_L3; |
| 16446 | } |
| 16447 | |
| 16448 | /* "View.MemoryView":686 |
| 16449 | * p_src = &memviewsliceobj.from_slice |
| 16450 | * else: |
| 16451 | * slice_copy(memview, &src) # <<<<<<<<<<<<<< |
| 16452 | * p_src = &src |
| 16453 | * |
| 16454 | */ |
| 16455 | /*else*/ { |
| 16456 | __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src)); |
| 16457 | |
| 16458 | /* "View.MemoryView":687 |
| 16459 | * else: |
| 16460 | * slice_copy(memview, &src) |
| 16461 | * p_src = &src # <<<<<<<<<<<<<< |
| 16462 | * |
| 16463 | * |
| 16464 | */ |
| 16465 | __pyx_v_p_src = (&__pyx_v_src); |
| 16466 | } |
| 16467 | __pyx_L3:; |
| 16468 | |
| 16469 | /* "View.MemoryView":693 |
| 16470 | * |
| 16471 | * |
| 16472 | * dst.memview = p_src.memview # <<<<<<<<<<<<<< |
| 16473 | * dst.data = p_src.data |
| 16474 | * |
| 16475 | */ |
| 16476 | __pyx_t_4 = __pyx_v_p_src->memview; |
| 16477 | __pyx_v_dst.memview = __pyx_t_4; |
| 16478 | |
| 16479 | /* "View.MemoryView":694 |
| 16480 | * |
| 16481 | * dst.memview = p_src.memview |
| 16482 | * dst.data = p_src.data # <<<<<<<<<<<<<< |
| 16483 | * |
| 16484 | * |
| 16485 | */ |
| 16486 | __pyx_t_5 = __pyx_v_p_src->data; |
| 16487 | __pyx_v_dst.data = __pyx_t_5; |
| 16488 | |
| 16489 | /* "View.MemoryView":699 |
| 16490 | * |
| 16491 | * |
| 16492 | * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<< |
| 16493 | * cdef int *p_suboffset_dim = &suboffset_dim |
| 16494 | * cdef Py_ssize_t start, stop, step |
| 16495 | */ |
| 16496 | __pyx_v_p_dst = (&__pyx_v_dst); |
| 16497 | |
| 16498 | /* "View.MemoryView":700 |
| 16499 | * |
| 16500 | * cdef __Pyx_memviewslice *p_dst = &dst |
| 16501 | * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<< |
| 16502 | * cdef Py_ssize_t start, stop, step |
| 16503 | * cdef bint have_start, have_stop, have_step |
| 16504 | */ |
| 16505 | __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim); |
| 16506 | |
| 16507 | /* "View.MemoryView":704 |
| 16508 | * cdef bint have_start, have_stop, have_step |
| 16509 | * |
| 16510 | * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< |
| 16511 | * if PyIndex_Check(index): |
| 16512 | * slice_memviewslice( |
| 16513 | */ |
| 16514 | __pyx_t_6 = 0; |
| 16515 | if (likely(PyList_CheckExact(__pyx_v_indices))__builtin_expect(!!(((((PyObject*)(__pyx_v_indices))->ob_type ) == &PyList_Type)), 1) || PyTuple_CheckExact(__pyx_v_indices)((((PyObject*)(__pyx_v_indices))->ob_type) == &PyTuple_Type )) { |
| 16516 | __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); __pyx_t_7 = 0; |
| 16517 | __pyx_t_8 = NULL((void*)0); |
| 16518 | } else { |
| 16519 | __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 704; __pyx_clineno = __LINE__16519; goto __pyx_L1_error;} |
| 16520 | __Pyx_GOTREF(__pyx_t_3); |
| 16521 | __pyx_t_8 = Py_TYPE(__pyx_t_3)(((PyObject*)(__pyx_t_3))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 704; __pyx_clineno = __LINE__16521; goto __pyx_L1_error;} |
| 16522 | } |
| 16523 | for (;;) { |
| 16524 | if (likely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 1)) { |
| 16525 | if (likely(PyList_CheckExact(__pyx_t_3))__builtin_expect(!!(((((PyObject*)(__pyx_t_3))->ob_type) == &PyList_Type)), 1)) { |
| 16526 | if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)(((PyVarObject*)(__pyx_t_3))->ob_size)) break; |
| 16527 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 16528 | __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7)(((PyListObject *)(__pyx_t_3))->ob_item[__pyx_t_7]); __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++); __pyx_t_7++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 704; __pyx_clineno = __LINE__16528; goto __pyx_L1_error;} |
| 16529 | #else |
| 16530 | __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7)( (((PyObject*)(__pyx_t_3))->ob_type)->tp_as_sequence-> sq_item(__pyx_t_3, __pyx_t_7) ); __pyx_t_7++; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 704; __pyx_clineno = __LINE__16530; goto __pyx_L1_error;} |
| 16531 | __Pyx_GOTREF(__pyx_t_9); |
| 16532 | #endif |
| 16533 | } else { |
| 16534 | if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)(((PyVarObject*)(__pyx_t_3))->ob_size)) break; |
| 16535 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 16536 | __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7)(((PyTupleObject *)(__pyx_t_3))->ob_item[__pyx_t_7]); __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++); __pyx_t_7++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 704; __pyx_clineno = __LINE__16536; goto __pyx_L1_error;} |
| 16537 | #else |
| 16538 | __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7)( (((PyObject*)(__pyx_t_3))->ob_type)->tp_as_sequence-> sq_item(__pyx_t_3, __pyx_t_7) ); __pyx_t_7++; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 704; __pyx_clineno = __LINE__16538; goto __pyx_L1_error;} |
| 16539 | __Pyx_GOTREF(__pyx_t_9); |
| 16540 | #endif |
| 16541 | } |
| 16542 | } else { |
| 16543 | __pyx_t_9 = __pyx_t_8(__pyx_t_3); |
| 16544 | if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) { |
| 16545 | PyObject* exc_type = PyErr_Occurred(); |
| 16546 | if (exc_type) { |
| 16547 | 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(); |
| 16548 | else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 704; __pyx_clineno = __LINE__16548; goto __pyx_L1_error;} |
| 16549 | } |
| 16550 | break; |
| 16551 | } |
| 16552 | __Pyx_GOTREF(__pyx_t_9); |
| 16553 | } |
| 16554 | __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9)do { PyObject *tmp = (PyObject *) __pyx_v_index; __pyx_v_index = __pyx_t_9; 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); |
| 16555 | __pyx_t_9 = 0; |
| 16556 | __pyx_v_dim = __pyx_t_6; |
| 16557 | __pyx_t_6 = (__pyx_t_6 + 1); |
| 16558 | |
| 16559 | /* "View.MemoryView":705 |
| 16560 | * |
| 16561 | * for dim, index in enumerate(indices): |
| 16562 | * if PyIndex_Check(index): # <<<<<<<<<<<<<< |
| 16563 | * slice_memviewslice( |
| 16564 | * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], |
| 16565 | */ |
| 16566 | __pyx_t_2 = (PyIndex_Check(__pyx_v_index)((__pyx_v_index)->ob_type->tp_as_number != ((void*)0) && ((((__pyx_v_index)->ob_type)->tp_flags & ((1L<< 17))) != 0) && (__pyx_v_index)->ob_type->tp_as_number ->nb_index != ((void*)0)) != 0); |
| 16567 | if (__pyx_t_2) { |
| 16568 | |
| 16569 | /* "View.MemoryView":709 |
| 16570 | * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], |
| 16571 | * dim, new_ndim, p_suboffset_dim, |
| 16572 | * index, 0, 0, # start, stop, step # <<<<<<<<<<<<<< |
| 16573 | * 0, 0, 0, # have_{start,stop,step} |
| 16574 | * False) |
| 16575 | */ |
| 16576 | __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 709; __pyx_clineno = __LINE__16576; goto __pyx_L1_error;} |
| 16577 | |
| 16578 | /* "View.MemoryView":706 |
| 16579 | * for dim, index in enumerate(indices): |
| 16580 | * if PyIndex_Check(index): |
| 16581 | * slice_memviewslice( # <<<<<<<<<<<<<< |
| 16582 | * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], |
| 16583 | * dim, new_ndim, p_suboffset_dim, |
| 16584 | */ |
| 16585 | __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == -1)__builtin_expect(!!(__pyx_t_11 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 706; __pyx_clineno = __LINE__16585; goto __pyx_L1_error;} |
| 16586 | |
| 16587 | /* "View.MemoryView":705 |
| 16588 | * |
| 16589 | * for dim, index in enumerate(indices): |
| 16590 | * if PyIndex_Check(index): # <<<<<<<<<<<<<< |
| 16591 | * slice_memviewslice( |
| 16592 | * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], |
| 16593 | */ |
| 16594 | goto __pyx_L6; |
| 16595 | } |
| 16596 | |
| 16597 | /* "View.MemoryView":712 |
| 16598 | * 0, 0, 0, # have_{start,stop,step} |
| 16599 | * False) |
| 16600 | * elif index is None: # <<<<<<<<<<<<<< |
| 16601 | * p_dst.shape[new_ndim] = 1 |
| 16602 | * p_dst.strides[new_ndim] = 0 |
| 16603 | */ |
| 16604 | __pyx_t_2 = (__pyx_v_index == Py_None(&_Py_NoneStruct)); |
| 16605 | __pyx_t_1 = (__pyx_t_2 != 0); |
| 16606 | if (__pyx_t_1) { |
| 16607 | |
| 16608 | /* "View.MemoryView":713 |
| 16609 | * False) |
| 16610 | * elif index is None: |
| 16611 | * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<< |
| 16612 | * p_dst.strides[new_ndim] = 0 |
| 16613 | * p_dst.suboffsets[new_ndim] = -1 |
| 16614 | */ |
| 16615 | (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1; |
| 16616 | |
| 16617 | /* "View.MemoryView":714 |
| 16618 | * elif index is None: |
| 16619 | * p_dst.shape[new_ndim] = 1 |
| 16620 | * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<< |
| 16621 | * p_dst.suboffsets[new_ndim] = -1 |
| 16622 | * new_ndim += 1 |
| 16623 | */ |
| 16624 | (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0; |
| 16625 | |
| 16626 | /* "View.MemoryView":715 |
| 16627 | * p_dst.shape[new_ndim] = 1 |
| 16628 | * p_dst.strides[new_ndim] = 0 |
| 16629 | * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<< |
| 16630 | * new_ndim += 1 |
| 16631 | * else: |
| 16632 | */ |
| 16633 | (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L; |
| 16634 | |
| 16635 | /* "View.MemoryView":716 |
| 16636 | * p_dst.strides[new_ndim] = 0 |
| 16637 | * p_dst.suboffsets[new_ndim] = -1 |
| 16638 | * new_ndim += 1 # <<<<<<<<<<<<<< |
| 16639 | * else: |
| 16640 | * start = index.start or 0 |
| 16641 | */ |
| 16642 | __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); |
| 16643 | |
| 16644 | /* "View.MemoryView":712 |
| 16645 | * 0, 0, 0, # have_{start,stop,step} |
| 16646 | * False) |
| 16647 | * elif index is None: # <<<<<<<<<<<<<< |
| 16648 | * p_dst.shape[new_ndim] = 1 |
| 16649 | * p_dst.strides[new_ndim] = 0 |
| 16650 | */ |
| 16651 | goto __pyx_L6; |
| 16652 | } |
| 16653 | |
| 16654 | /* "View.MemoryView":718 |
| 16655 | * new_ndim += 1 |
| 16656 | * else: |
| 16657 | * start = index.start or 0 # <<<<<<<<<<<<<< |
| 16658 | * stop = index.stop or 0 |
| 16659 | * step = index.step or 0 |
| 16660 | */ |
| 16661 | /*else*/ { |
| 16662 | __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 718; __pyx_clineno = __LINE__16662; goto __pyx_L1_error;} |
| 16663 | __Pyx_GOTREF(__pyx_t_9); |
| 16664 | __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)__builtin_expect(!!(__pyx_t_1 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 718; __pyx_clineno = __LINE__16664; goto __pyx_L1_error;} |
| 16665 | if (!__pyx_t_1) { |
| 16666 | __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; |
| 16667 | } else { |
| 16668 | __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 718; __pyx_clineno = __LINE__16668; goto __pyx_L1_error;} |
| 16669 | __pyx_t_10 = __pyx_t_12; |
| 16670 | __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; |
| 16671 | goto __pyx_L7_bool_binop_done; |
| 16672 | } |
| 16673 | __pyx_t_10 = 0; |
| 16674 | __pyx_L7_bool_binop_done:; |
| 16675 | __pyx_v_start = __pyx_t_10; |
| 16676 | |
| 16677 | /* "View.MemoryView":719 |
| 16678 | * else: |
| 16679 | * start = index.start or 0 |
| 16680 | * stop = index.stop or 0 # <<<<<<<<<<<<<< |
| 16681 | * step = index.step or 0 |
| 16682 | * |
| 16683 | */ |
| 16684 | __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 719; __pyx_clineno = __LINE__16684; goto __pyx_L1_error;} |
| 16685 | __Pyx_GOTREF(__pyx_t_9); |
| 16686 | __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)__builtin_expect(!!(__pyx_t_1 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 719; __pyx_clineno = __LINE__16686; goto __pyx_L1_error;} |
| 16687 | if (!__pyx_t_1) { |
| 16688 | __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; |
| 16689 | } else { |
| 16690 | __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 719; __pyx_clineno = __LINE__16690; goto __pyx_L1_error;} |
| 16691 | __pyx_t_10 = __pyx_t_12; |
| 16692 | __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; |
| 16693 | goto __pyx_L9_bool_binop_done; |
| 16694 | } |
| 16695 | __pyx_t_10 = 0; |
| 16696 | __pyx_L9_bool_binop_done:; |
| 16697 | __pyx_v_stop = __pyx_t_10; |
| 16698 | |
| 16699 | /* "View.MemoryView":720 |
| 16700 | * start = index.start or 0 |
| 16701 | * stop = index.stop or 0 |
| 16702 | * step = index.step or 0 # <<<<<<<<<<<<<< |
| 16703 | * |
| 16704 | * have_start = index.start is not None |
| 16705 | */ |
| 16706 | __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 720; __pyx_clineno = __LINE__16706; goto __pyx_L1_error;} |
| 16707 | __Pyx_GOTREF(__pyx_t_9); |
| 16708 | __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)__builtin_expect(!!(__pyx_t_1 < 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 720; __pyx_clineno = __LINE__16708; goto __pyx_L1_error;} |
| 16709 | if (!__pyx_t_1) { |
| 16710 | __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; |
| 16711 | } else { |
| 16712 | __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 720; __pyx_clineno = __LINE__16712; goto __pyx_L1_error;} |
| 16713 | __pyx_t_10 = __pyx_t_12; |
| 16714 | __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; |
| 16715 | goto __pyx_L11_bool_binop_done; |
| 16716 | } |
| 16717 | __pyx_t_10 = 0; |
| 16718 | __pyx_L11_bool_binop_done:; |
| 16719 | __pyx_v_step = __pyx_t_10; |
| 16720 | |
| 16721 | /* "View.MemoryView":722 |
| 16722 | * step = index.step or 0 |
| 16723 | * |
| 16724 | * have_start = index.start is not None # <<<<<<<<<<<<<< |
| 16725 | * have_stop = index.stop is not None |
| 16726 | * have_step = index.step is not None |
| 16727 | */ |
| 16728 | __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 722; __pyx_clineno = __LINE__16728; goto __pyx_L1_error;} |
| 16729 | __Pyx_GOTREF(__pyx_t_9); |
| 16730 | __pyx_t_1 = (__pyx_t_9 != Py_None(&_Py_NoneStruct)); |
| 16731 | __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; |
| 16732 | __pyx_v_have_start = __pyx_t_1; |
| 16733 | |
| 16734 | /* "View.MemoryView":723 |
| 16735 | * |
| 16736 | * have_start = index.start is not None |
| 16737 | * have_stop = index.stop is not None # <<<<<<<<<<<<<< |
| 16738 | * have_step = index.step is not None |
| 16739 | * |
| 16740 | */ |
| 16741 | __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 723; __pyx_clineno = __LINE__16741; goto __pyx_L1_error;} |
| 16742 | __Pyx_GOTREF(__pyx_t_9); |
| 16743 | __pyx_t_1 = (__pyx_t_9 != Py_None(&_Py_NoneStruct)); |
| 16744 | __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; |
| 16745 | __pyx_v_have_stop = __pyx_t_1; |
| 16746 | |
| 16747 | /* "View.MemoryView":724 |
| 16748 | * have_start = index.start is not None |
| 16749 | * have_stop = index.stop is not None |
| 16750 | * have_step = index.step is not None # <<<<<<<<<<<<<< |
| 16751 | * |
| 16752 | * slice_memviewslice( |
| 16753 | */ |
| 16754 | __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 724; __pyx_clineno = __LINE__16754; goto __pyx_L1_error;} |
| 16755 | __Pyx_GOTREF(__pyx_t_9); |
| 16756 | __pyx_t_1 = (__pyx_t_9 != Py_None(&_Py_NoneStruct)); |
| 16757 | __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; |
| 16758 | __pyx_v_have_step = __pyx_t_1; |
| 16759 | |
| 16760 | /* "View.MemoryView":726 |
| 16761 | * have_step = index.step is not None |
| 16762 | * |
| 16763 | * slice_memviewslice( # <<<<<<<<<<<<<< |
| 16764 | * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], |
| 16765 | * dim, new_ndim, p_suboffset_dim, |
| 16766 | */ |
| 16767 | __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == -1)__builtin_expect(!!(__pyx_t_11 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 726; __pyx_clineno = __LINE__16767; goto __pyx_L1_error;} |
| 16768 | |
| 16769 | /* "View.MemoryView":732 |
| 16770 | * have_start, have_stop, have_step, |
| 16771 | * True) |
| 16772 | * new_ndim += 1 # <<<<<<<<<<<<<< |
| 16773 | * |
| 16774 | * if isinstance(memview, _memoryviewslice): |
| 16775 | */ |
| 16776 | __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); |
| 16777 | } |
| 16778 | __pyx_L6:; |
| 16779 | |
| 16780 | /* "View.MemoryView":704 |
| 16781 | * cdef bint have_start, have_stop, have_step |
| 16782 | * |
| 16783 | * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< |
| 16784 | * if PyIndex_Check(index): |
| 16785 | * slice_memviewslice( |
| 16786 | */ |
| 16787 | } |
| 16788 | __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; |
| 16789 | |
| 16790 | /* "View.MemoryView":734 |
| 16791 | * new_ndim += 1 |
| 16792 | * |
| 16793 | * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< |
| 16794 | * return memoryview_fromslice(dst, new_ndim, |
| 16795 | * memviewsliceobj.to_object_func, |
| 16796 | */ |
| 16797 | __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type)((((PyObject*)(((PyObject *)__pyx_v_memview)))->ob_type) == ((PyTypeObject *)__pyx_memoryviewslice_type) || PyType_IsSubtype ((((PyObject*)(((PyObject *)__pyx_v_memview)))->ob_type), ( (PyTypeObject *)__pyx_memoryviewslice_type))); |
| 16798 | __pyx_t_2 = (__pyx_t_1 != 0); |
| 16799 | if (__pyx_t_2) { |
| 16800 | |
| 16801 | /* "View.MemoryView":735 |
| 16802 | * |
| 16803 | * if isinstance(memview, _memoryviewslice): |
| 16804 | * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< |
| 16805 | * memviewsliceobj.to_object_func, |
| 16806 | * memviewsliceobj.to_dtype_func, |
| 16807 | */ |
| 16808 | __Pyx_XDECREF(((PyObject *)__pyx_r))do { if ((((PyObject *)__pyx_r)) == ((void*)0)) ; else do { if ( --((PyObject*)(((PyObject *)__pyx_r)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject *)__pyx_r)) ))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(((PyObject *)__pyx_r))))); } while (0); } while (0); |
| 16809 | |
| 16810 | /* "View.MemoryView":736 |
| 16811 | * if isinstance(memview, _memoryviewslice): |
| 16812 | * return memoryview_fromslice(dst, new_ndim, |
| 16813 | * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<< |
| 16814 | * memviewsliceobj.to_dtype_func, |
| 16815 | * memview.dtype_is_object) |
| 16816 | */ |
| 16817 | if (unlikely(!__pyx_v_memviewsliceobj)__builtin_expect(!!(!__pyx_v_memviewsliceobj), 0)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 736; __pyx_clineno = __LINE__16817; goto __pyx_L1_error;} } |
| 16818 | |
| 16819 | /* "View.MemoryView":737 |
| 16820 | * return memoryview_fromslice(dst, new_ndim, |
| 16821 | * memviewsliceobj.to_object_func, |
| 16822 | * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<< |
| 16823 | * memview.dtype_is_object) |
| 16824 | * else: |
| 16825 | */ |
| 16826 | if (unlikely(!__pyx_v_memviewsliceobj)__builtin_expect(!!(!__pyx_v_memviewsliceobj), 0)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 737; __pyx_clineno = __LINE__16826; goto __pyx_L1_error;} } |
| 16827 | |
| 16828 | /* "View.MemoryView":735 |
| 16829 | * |
| 16830 | * if isinstance(memview, _memoryviewslice): |
| 16831 | * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< |
| 16832 | * memviewsliceobj.to_object_func, |
| 16833 | * memviewsliceobj.to_dtype_func, |
| 16834 | */ |
| 16835 | __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 735; __pyx_clineno = __LINE__16835; goto __pyx_L1_error;} |
| 16836 | __Pyx_GOTREF(__pyx_t_3); |
| 16837 | if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type)))__builtin_expect(!!(((__pyx_t_3) == (&_Py_NoneStruct)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type )), 1)), 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 735; __pyx_clineno = __LINE__16837; goto __pyx_L1_error;} |
| 16838 | __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3); |
| 16839 | __pyx_t_3 = 0; |
| 16840 | goto __pyx_L0; |
| 16841 | |
| 16842 | /* "View.MemoryView":734 |
| 16843 | * new_ndim += 1 |
| 16844 | * |
| 16845 | * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< |
| 16846 | * return memoryview_fromslice(dst, new_ndim, |
| 16847 | * memviewsliceobj.to_object_func, |
| 16848 | */ |
| 16849 | } |
| 16850 | |
| 16851 | /* "View.MemoryView":740 |
| 16852 | * memview.dtype_is_object) |
| 16853 | * else: |
| 16854 | * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< |
| 16855 | * memview.dtype_is_object) |
| 16856 | * |
| 16857 | */ |
| 16858 | /*else*/ { |
| 16859 | __Pyx_XDECREF(((PyObject *)__pyx_r))do { if ((((PyObject *)__pyx_r)) == ((void*)0)) ; else do { if ( --((PyObject*)(((PyObject *)__pyx_r)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject *)__pyx_r)) ))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(((PyObject *)__pyx_r))))); } while (0); } while (0); |
| 16860 | |
| 16861 | /* "View.MemoryView":741 |
| 16862 | * else: |
| 16863 | * return memoryview_fromslice(dst, new_ndim, NULL, NULL, |
| 16864 | * memview.dtype_is_object) # <<<<<<<<<<<<<< |
| 16865 | * |
| 16866 | * |
| 16867 | */ |
| 16868 | __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL((void*)0), NULL((void*)0), __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__16868; goto __pyx_L1_error;} |
| 16869 | __Pyx_GOTREF(__pyx_t_3); |
| 16870 | |
| 16871 | /* "View.MemoryView":740 |
| 16872 | * memview.dtype_is_object) |
| 16873 | * else: |
| 16874 | * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< |
| 16875 | * memview.dtype_is_object) |
| 16876 | * |
| 16877 | */ |
| 16878 | if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type)))__builtin_expect(!!(((__pyx_t_3) == (&_Py_NoneStruct)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type )), 1)), 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__16878; goto __pyx_L1_error;} |
| 16879 | __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3); |
| 16880 | __pyx_t_3 = 0; |
| 16881 | goto __pyx_L0; |
| 16882 | } |
| 16883 | |
| 16884 | /* "View.MemoryView":668 |
| 16885 | * |
| 16886 | * @cname('__pyx_memview_slice') |
| 16887 | * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<< |
| 16888 | * cdef int new_ndim = 0, suboffset_dim = -1, dim |
| 16889 | * cdef bint negative_step |
| 16890 | */ |
| 16891 | |
| 16892 | /* function exit code */ |
| 16893 | __pyx_L1_error:; |
| 16894 | __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); |
| 16895 | __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); |
| 16896 | __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 16897 | __pyx_r = 0; |
| 16898 | __pyx_L0:; |
| 16899 | __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj)do { if (((PyObject *)__pyx_v_memviewsliceobj) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_memviewsliceobj ))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)( (PyObject *)__pyx_v_memviewsliceobj)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)((PyObject *)__pyx_v_memviewsliceobj )))); } while (0); } while (0); |
| 16900 | __Pyx_XDECREF(__pyx_v_index)do { if ((__pyx_v_index) == ((void*)0)) ; else do { if ( --(( PyObject*)(__pyx_v_index))->ob_refcnt != 0) ; else ( (*((( PyObject*)((PyObject *)(__pyx_v_index)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(__pyx_v_index)))); } while (0); } while (0); |
| 16901 | __Pyx_XGIVEREF((PyObject *)__pyx_r); |
| 16902 | __Pyx_RefNannyFinishContext(); |
| 16903 | return __pyx_r; |
| 16904 | } |
| 16905 | |
| 16906 | /* "View.MemoryView":765 |
| 16907 | * |
| 16908 | * @cname('__pyx_memoryview_slice_memviewslice') |
| 16909 | * cdef int slice_memviewslice( # <<<<<<<<<<<<<< |
| 16910 | * __Pyx_memviewslice *dst, |
| 16911 | * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, |
| 16912 | */ |
| 16913 | |
| 16914 | static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) { |
| 16915 | Py_ssize_t __pyx_v_new_shape; |
| 16916 | int __pyx_v_negative_step; |
| 16917 | int __pyx_r; |
| 16918 | int __pyx_t_1; |
| 16919 | int __pyx_t_2; |
| 16920 | int __pyx_t_3; |
| 16921 | int __pyx_lineno = 0; |
| 16922 | const char *__pyx_filename = NULL((void*)0); |
| 16923 | int __pyx_clineno = 0; |
| 16924 | |
| 16925 | /* "View.MemoryView":785 |
| 16926 | * cdef bint negative_step |
| 16927 | * |
| 16928 | * if not is_slice: # <<<<<<<<<<<<<< |
| 16929 | * |
| 16930 | * if start < 0: |
| 16931 | */ |
| 16932 | __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0); |
| 16933 | if (__pyx_t_1) { |
| 16934 | |
| 16935 | /* "View.MemoryView":787 |
| 16936 | * if not is_slice: |
| 16937 | * |
| 16938 | * if start < 0: # <<<<<<<<<<<<<< |
| 16939 | * start += shape |
| 16940 | * if not 0 <= start < shape: |
| 16941 | */ |
| 16942 | __pyx_t_1 = ((__pyx_v_start < 0) != 0); |
| 16943 | if (__pyx_t_1) { |
| 16944 | |
| 16945 | /* "View.MemoryView":788 |
| 16946 | * |
| 16947 | * if start < 0: |
| 16948 | * start += shape # <<<<<<<<<<<<<< |
| 16949 | * if not 0 <= start < shape: |
| 16950 | * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) |
| 16951 | */ |
| 16952 | __pyx_v_start = (__pyx_v_start + __pyx_v_shape); |
| 16953 | |
| 16954 | /* "View.MemoryView":787 |
| 16955 | * if not is_slice: |
| 16956 | * |
| 16957 | * if start < 0: # <<<<<<<<<<<<<< |
| 16958 | * start += shape |
| 16959 | * if not 0 <= start < shape: |
| 16960 | */ |
| 16961 | } |
| 16962 | |
| 16963 | /* "View.MemoryView":789 |
| 16964 | * if start < 0: |
| 16965 | * start += shape |
| 16966 | * if not 0 <= start < shape: # <<<<<<<<<<<<<< |
| 16967 | * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) |
| 16968 | * else: |
| 16969 | */ |
| 16970 | __pyx_t_1 = (0 <= __pyx_v_start); |
| 16971 | if (__pyx_t_1) { |
| 16972 | __pyx_t_1 = (__pyx_v_start < __pyx_v_shape); |
| 16973 | } |
| 16974 | __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); |
| 16975 | if (__pyx_t_2) { |
| 16976 | |
| 16977 | /* "View.MemoryView":790 |
| 16978 | * start += shape |
| 16979 | * if not 0 <= start < shape: |
| 16980 | * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<< |
| 16981 | * else: |
| 16982 | * |
| 16983 | */ |
| 16984 | __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, __pyx_k_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == -1)__builtin_expect(!!(__pyx_t_3 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 790; __pyx_clineno = __LINE__16984; goto __pyx_L1_error;} |
| 16985 | |
| 16986 | /* "View.MemoryView":789 |
| 16987 | * if start < 0: |
| 16988 | * start += shape |
| 16989 | * if not 0 <= start < shape: # <<<<<<<<<<<<<< |
| 16990 | * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) |
| 16991 | * else: |
| 16992 | */ |
| 16993 | } |
| 16994 | |
| 16995 | /* "View.MemoryView":785 |
| 16996 | * cdef bint negative_step |
| 16997 | * |
| 16998 | * if not is_slice: # <<<<<<<<<<<<<< |
| 16999 | * |
| 17000 | * if start < 0: |
| 17001 | */ |
| 17002 | goto __pyx_L3; |
| 17003 | } |
| 17004 | |
| 17005 | /* "View.MemoryView":793 |
| 17006 | * else: |
| 17007 | * |
| 17008 | * negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<< |
| 17009 | * |
| 17010 | * if have_step and step == 0: |
| 17011 | */ |
| 17012 | /*else*/ { |
| 17013 | __pyx_t_1 = ((__pyx_v_have_step != 0) != 0); |
| 17014 | if (__pyx_t_1) { |
| 17015 | } else { |
| 17016 | __pyx_t_2 = __pyx_t_1; |
| 17017 | goto __pyx_L6_bool_binop_done; |
| 17018 | } |
| 17019 | __pyx_t_1 = ((__pyx_v_step < 0) != 0); |
| 17020 | __pyx_t_2 = __pyx_t_1; |
| 17021 | __pyx_L6_bool_binop_done:; |
| 17022 | __pyx_v_negative_step = __pyx_t_2; |
| 17023 | |
| 17024 | /* "View.MemoryView":795 |
| 17025 | * negative_step = have_step != 0 and step < 0 |
| 17026 | * |
| 17027 | * if have_step and step == 0: # <<<<<<<<<<<<<< |
| 17028 | * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) |
| 17029 | * |
| 17030 | */ |
| 17031 | __pyx_t_1 = (__pyx_v_have_step != 0); |
| 17032 | if (__pyx_t_1) { |
| 17033 | } else { |
| 17034 | __pyx_t_2 = __pyx_t_1; |
| 17035 | goto __pyx_L9_bool_binop_done; |
| 17036 | } |
| 17037 | __pyx_t_1 = ((__pyx_v_step == 0) != 0); |
| 17038 | __pyx_t_2 = __pyx_t_1; |
| 17039 | __pyx_L9_bool_binop_done:; |
| 17040 | if (__pyx_t_2) { |
| 17041 | |
| 17042 | /* "View.MemoryView":796 |
| 17043 | * |
| 17044 | * if have_step and step == 0: |
| 17045 | * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<< |
| 17046 | * |
| 17047 | * |
| 17048 | */ |
| 17049 | __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, __pyx_k_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == -1)__builtin_expect(!!(__pyx_t_3 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__17049; goto __pyx_L1_error;} |
| 17050 | |
| 17051 | /* "View.MemoryView":795 |
| 17052 | * negative_step = have_step != 0 and step < 0 |
| 17053 | * |
| 17054 | * if have_step and step == 0: # <<<<<<<<<<<<<< |
| 17055 | * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) |
| 17056 | * |
| 17057 | */ |
| 17058 | } |
| 17059 | |
| 17060 | /* "View.MemoryView":799 |
| 17061 | * |
| 17062 | * |
| 17063 | * if have_start: # <<<<<<<<<<<<<< |
| 17064 | * if start < 0: |
| 17065 | * start += shape |
| 17066 | */ |
| 17067 | __pyx_t_2 = (__pyx_v_have_start != 0); |
| 17068 | if (__pyx_t_2) { |
| 17069 | |
| 17070 | /* "View.MemoryView":800 |
| 17071 | * |
| 17072 | * if have_start: |
| 17073 | * if start < 0: # <<<<<<<<<<<<<< |
| 17074 | * start += shape |
| 17075 | * if start < 0: |
| 17076 | */ |
| 17077 | __pyx_t_2 = ((__pyx_v_start < 0) != 0); |
| 17078 | if (__pyx_t_2) { |
| 17079 | |
| 17080 | /* "View.MemoryView":801 |
| 17081 | * if have_start: |
| 17082 | * if start < 0: |
| 17083 | * start += shape # <<<<<<<<<<<<<< |
| 17084 | * if start < 0: |
| 17085 | * start = 0 |
| 17086 | */ |
| 17087 | __pyx_v_start = (__pyx_v_start + __pyx_v_shape); |
| 17088 | |
| 17089 | /* "View.MemoryView":802 |
| 17090 | * if start < 0: |
| 17091 | * start += shape |
| 17092 | * if start < 0: # <<<<<<<<<<<<<< |
| 17093 | * start = 0 |
| 17094 | * elif start >= shape: |
| 17095 | */ |
| 17096 | __pyx_t_2 = ((__pyx_v_start < 0) != 0); |
| 17097 | if (__pyx_t_2) { |
| 17098 | |
| 17099 | /* "View.MemoryView":803 |
| 17100 | * start += shape |
| 17101 | * if start < 0: |
| 17102 | * start = 0 # <<<<<<<<<<<<<< |
| 17103 | * elif start >= shape: |
| 17104 | * if negative_step: |
| 17105 | */ |
| 17106 | __pyx_v_start = 0; |
| 17107 | |
| 17108 | /* "View.MemoryView":802 |
| 17109 | * if start < 0: |
| 17110 | * start += shape |
| 17111 | * if start < 0: # <<<<<<<<<<<<<< |
| 17112 | * start = 0 |
| 17113 | * elif start >= shape: |
| 17114 | */ |
| 17115 | } |
| 17116 | |
| 17117 | /* "View.MemoryView":800 |
| 17118 | * |
| 17119 | * if have_start: |
| 17120 | * if start < 0: # <<<<<<<<<<<<<< |
| 17121 | * start += shape |
| 17122 | * if start < 0: |
| 17123 | */ |
| 17124 | goto __pyx_L12; |
| 17125 | } |
| 17126 | |
| 17127 | /* "View.MemoryView":804 |
| 17128 | * if start < 0: |
| 17129 | * start = 0 |
| 17130 | * elif start >= shape: # <<<<<<<<<<<<<< |
| 17131 | * if negative_step: |
| 17132 | * start = shape - 1 |
| 17133 | */ |
| 17134 | __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0); |
| 17135 | if (__pyx_t_2) { |
| 17136 | |
| 17137 | /* "View.MemoryView":805 |
| 17138 | * start = 0 |
| 17139 | * elif start >= shape: |
| 17140 | * if negative_step: # <<<<<<<<<<<<<< |
| 17141 | * start = shape - 1 |
| 17142 | * else: |
| 17143 | */ |
| 17144 | __pyx_t_2 = (__pyx_v_negative_step != 0); |
| 17145 | if (__pyx_t_2) { |
| 17146 | |
| 17147 | /* "View.MemoryView":806 |
| 17148 | * elif start >= shape: |
| 17149 | * if negative_step: |
| 17150 | * start = shape - 1 # <<<<<<<<<<<<<< |
| 17151 | * else: |
| 17152 | * start = shape |
| 17153 | */ |
| 17154 | __pyx_v_start = (__pyx_v_shape - 1); |
| 17155 | |
| 17156 | /* "View.MemoryView":805 |
| 17157 | * start = 0 |
| 17158 | * elif start >= shape: |
| 17159 | * if negative_step: # <<<<<<<<<<<<<< |
| 17160 | * start = shape - 1 |
| 17161 | * else: |
| 17162 | */ |
| 17163 | goto __pyx_L14; |
| 17164 | } |
| 17165 | |
| 17166 | /* "View.MemoryView":808 |
| 17167 | * start = shape - 1 |
| 17168 | * else: |
| 17169 | * start = shape # <<<<<<<<<<<<<< |
| 17170 | * else: |
| 17171 | * if negative_step: |
| 17172 | */ |
| 17173 | /*else*/ { |
| 17174 | __pyx_v_start = __pyx_v_shape; |
| 17175 | } |
| 17176 | __pyx_L14:; |
| 17177 | |
| 17178 | /* "View.MemoryView":804 |
| 17179 | * if start < 0: |
| 17180 | * start = 0 |
| 17181 | * elif start >= shape: # <<<<<<<<<<<<<< |
| 17182 | * if negative_step: |
| 17183 | * start = shape - 1 |
| 17184 | */ |
| 17185 | } |
| 17186 | __pyx_L12:; |
| 17187 | |
| 17188 | /* "View.MemoryView":799 |
| 17189 | * |
| 17190 | * |
| 17191 | * if have_start: # <<<<<<<<<<<<<< |
| 17192 | * if start < 0: |
| 17193 | * start += shape |
| 17194 | */ |
| 17195 | goto __pyx_L11; |
| 17196 | } |
| 17197 | |
| 17198 | /* "View.MemoryView":810 |
| 17199 | * start = shape |
| 17200 | * else: |
| 17201 | * if negative_step: # <<<<<<<<<<<<<< |
| 17202 | * start = shape - 1 |
| 17203 | * else: |
| 17204 | */ |
| 17205 | /*else*/ { |
| 17206 | __pyx_t_2 = (__pyx_v_negative_step != 0); |
| 17207 | if (__pyx_t_2) { |
| 17208 | |
| 17209 | /* "View.MemoryView":811 |
| 17210 | * else: |
| 17211 | * if negative_step: |
| 17212 | * start = shape - 1 # <<<<<<<<<<<<<< |
| 17213 | * else: |
| 17214 | * start = 0 |
| 17215 | */ |
| 17216 | __pyx_v_start = (__pyx_v_shape - 1); |
| 17217 | |
| 17218 | /* "View.MemoryView":810 |
| 17219 | * start = shape |
| 17220 | * else: |
| 17221 | * if negative_step: # <<<<<<<<<<<<<< |
| 17222 | * start = shape - 1 |
| 17223 | * else: |
| 17224 | */ |
| 17225 | goto __pyx_L15; |
| 17226 | } |
| 17227 | |
| 17228 | /* "View.MemoryView":813 |
| 17229 | * start = shape - 1 |
| 17230 | * else: |
| 17231 | * start = 0 # <<<<<<<<<<<<<< |
| 17232 | * |
| 17233 | * if have_stop: |
| 17234 | */ |
| 17235 | /*else*/ { |
| 17236 | __pyx_v_start = 0; |
| 17237 | } |
| 17238 | __pyx_L15:; |
| 17239 | } |
| 17240 | __pyx_L11:; |
| 17241 | |
| 17242 | /* "View.MemoryView":815 |
| 17243 | * start = 0 |
| 17244 | * |
| 17245 | * if have_stop: # <<<<<<<<<<<<<< |
| 17246 | * if stop < 0: |
| 17247 | * stop += shape |
| 17248 | */ |
| 17249 | __pyx_t_2 = (__pyx_v_have_stop != 0); |
| 17250 | if (__pyx_t_2) { |
| 17251 | |
| 17252 | /* "View.MemoryView":816 |
| 17253 | * |
| 17254 | * if have_stop: |
| 17255 | * if stop < 0: # <<<<<<<<<<<<<< |
| 17256 | * stop += shape |
| 17257 | * if stop < 0: |
| 17258 | */ |
| 17259 | __pyx_t_2 = ((__pyx_v_stop < 0) != 0); |
| 17260 | if (__pyx_t_2) { |
| 17261 | |
| 17262 | /* "View.MemoryView":817 |
| 17263 | * if have_stop: |
| 17264 | * if stop < 0: |
| 17265 | * stop += shape # <<<<<<<<<<<<<< |
| 17266 | * if stop < 0: |
| 17267 | * stop = 0 |
| 17268 | */ |
| 17269 | __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape); |
| 17270 | |
| 17271 | /* "View.MemoryView":818 |
| 17272 | * if stop < 0: |
| 17273 | * stop += shape |
| 17274 | * if stop < 0: # <<<<<<<<<<<<<< |
| 17275 | * stop = 0 |
| 17276 | * elif stop > shape: |
| 17277 | */ |
| 17278 | __pyx_t_2 = ((__pyx_v_stop < 0) != 0); |
| 17279 | if (__pyx_t_2) { |
| 17280 | |
| 17281 | /* "View.MemoryView":819 |
| 17282 | * stop += shape |
| 17283 | * if stop < 0: |
| 17284 | * stop = 0 # <<<<<<<<<<<<<< |
| 17285 | * elif stop > shape: |
| 17286 | * stop = shape |
| 17287 | */ |
| 17288 | __pyx_v_stop = 0; |
| 17289 | |
| 17290 | /* "View.MemoryView":818 |
| 17291 | * if stop < 0: |
| 17292 | * stop += shape |
| 17293 | * if stop < 0: # <<<<<<<<<<<<<< |
| 17294 | * stop = 0 |
| 17295 | * elif stop > shape: |
| 17296 | */ |
| 17297 | } |
| 17298 | |
| 17299 | /* "View.MemoryView":816 |
| 17300 | * |
| 17301 | * if have_stop: |
| 17302 | * if stop < 0: # <<<<<<<<<<<<<< |
| 17303 | * stop += shape |
| 17304 | * if stop < 0: |
| 17305 | */ |
| 17306 | goto __pyx_L17; |
| 17307 | } |
| 17308 | |
| 17309 | /* "View.MemoryView":820 |
| 17310 | * if stop < 0: |
| 17311 | * stop = 0 |
| 17312 | * elif stop > shape: # <<<<<<<<<<<<<< |
| 17313 | * stop = shape |
| 17314 | * else: |
| 17315 | */ |
| 17316 | __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0); |
| 17317 | if (__pyx_t_2) { |
| 17318 | |
| 17319 | /* "View.MemoryView":821 |
| 17320 | * stop = 0 |
| 17321 | * elif stop > shape: |
| 17322 | * stop = shape # <<<<<<<<<<<<<< |
| 17323 | * else: |
| 17324 | * if negative_step: |
| 17325 | */ |
| 17326 | __pyx_v_stop = __pyx_v_shape; |
| 17327 | |
| 17328 | /* "View.MemoryView":820 |
| 17329 | * if stop < 0: |
| 17330 | * stop = 0 |
| 17331 | * elif stop > shape: # <<<<<<<<<<<<<< |
| 17332 | * stop = shape |
| 17333 | * else: |
| 17334 | */ |
| 17335 | } |
| 17336 | __pyx_L17:; |
| 17337 | |
| 17338 | /* "View.MemoryView":815 |
| 17339 | * start = 0 |
| 17340 | * |
| 17341 | * if have_stop: # <<<<<<<<<<<<<< |
| 17342 | * if stop < 0: |
| 17343 | * stop += shape |
| 17344 | */ |
| 17345 | goto __pyx_L16; |
| 17346 | } |
| 17347 | |
| 17348 | /* "View.MemoryView":823 |
| 17349 | * stop = shape |
| 17350 | * else: |
| 17351 | * if negative_step: # <<<<<<<<<<<<<< |
| 17352 | * stop = -1 |
| 17353 | * else: |
| 17354 | */ |
| 17355 | /*else*/ { |
| 17356 | __pyx_t_2 = (__pyx_v_negative_step != 0); |
| 17357 | if (__pyx_t_2) { |
| 17358 | |
| 17359 | /* "View.MemoryView":824 |
| 17360 | * else: |
| 17361 | * if negative_step: |
| 17362 | * stop = -1 # <<<<<<<<<<<<<< |
| 17363 | * else: |
| 17364 | * stop = shape |
| 17365 | */ |
| 17366 | __pyx_v_stop = -1L; |
| 17367 | |
| 17368 | /* "View.MemoryView":823 |
| 17369 | * stop = shape |
| 17370 | * else: |
| 17371 | * if negative_step: # <<<<<<<<<<<<<< |
| 17372 | * stop = -1 |
| 17373 | * else: |
| 17374 | */ |
| 17375 | goto __pyx_L19; |
| 17376 | } |
| 17377 | |
| 17378 | /* "View.MemoryView":826 |
| 17379 | * stop = -1 |
| 17380 | * else: |
| 17381 | * stop = shape # <<<<<<<<<<<<<< |
| 17382 | * |
| 17383 | * if not have_step: |
| 17384 | */ |
| 17385 | /*else*/ { |
| 17386 | __pyx_v_stop = __pyx_v_shape; |
| 17387 | } |
| 17388 | __pyx_L19:; |
| 17389 | } |
| 17390 | __pyx_L16:; |
| 17391 | |
| 17392 | /* "View.MemoryView":828 |
| 17393 | * stop = shape |
| 17394 | * |
| 17395 | * if not have_step: # <<<<<<<<<<<<<< |
| 17396 | * step = 1 |
| 17397 | * |
| 17398 | */ |
| 17399 | __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0); |
| 17400 | if (__pyx_t_2) { |
| 17401 | |
| 17402 | /* "View.MemoryView":829 |
| 17403 | * |
| 17404 | * if not have_step: |
| 17405 | * step = 1 # <<<<<<<<<<<<<< |
| 17406 | * |
| 17407 | * |
| 17408 | */ |
| 17409 | __pyx_v_step = 1; |
| 17410 | |
| 17411 | /* "View.MemoryView":828 |
| 17412 | * stop = shape |
| 17413 | * |
| 17414 | * if not have_step: # <<<<<<<<<<<<<< |
| 17415 | * step = 1 |
| 17416 | * |
| 17417 | */ |
| 17418 | } |
| 17419 | |
| 17420 | /* "View.MemoryView":833 |
| 17421 | * |
| 17422 | * with cython.cdivision(True): |
| 17423 | * new_shape = (stop - start) // step # <<<<<<<<<<<<<< |
| 17424 | * |
| 17425 | * if (stop - start) - step * new_shape: |
| 17426 | */ |
| 17427 | __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step); |
| 17428 | |
| 17429 | /* "View.MemoryView":835 |
| 17430 | * new_shape = (stop - start) // step |
| 17431 | * |
| 17432 | * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< |
| 17433 | * new_shape += 1 |
| 17434 | * |
| 17435 | */ |
| 17436 | __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0); |
| 17437 | if (__pyx_t_2) { |
| 17438 | |
| 17439 | /* "View.MemoryView":836 |
| 17440 | * |
| 17441 | * if (stop - start) - step * new_shape: |
| 17442 | * new_shape += 1 # <<<<<<<<<<<<<< |
| 17443 | * |
| 17444 | * if new_shape < 0: |
| 17445 | */ |
| 17446 | __pyx_v_new_shape = (__pyx_v_new_shape + 1); |
| 17447 | |
| 17448 | /* "View.MemoryView":835 |
| 17449 | * new_shape = (stop - start) // step |
| 17450 | * |
| 17451 | * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< |
| 17452 | * new_shape += 1 |
| 17453 | * |
| 17454 | */ |
| 17455 | } |
| 17456 | |
| 17457 | /* "View.MemoryView":838 |
| 17458 | * new_shape += 1 |
| 17459 | * |
| 17460 | * if new_shape < 0: # <<<<<<<<<<<<<< |
| 17461 | * new_shape = 0 |
| 17462 | * |
| 17463 | */ |
| 17464 | __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0); |
| 17465 | if (__pyx_t_2) { |
| 17466 | |
| 17467 | /* "View.MemoryView":839 |
| 17468 | * |
| 17469 | * if new_shape < 0: |
| 17470 | * new_shape = 0 # <<<<<<<<<<<<<< |
| 17471 | * |
| 17472 | * |
| 17473 | */ |
| 17474 | __pyx_v_new_shape = 0; |
| 17475 | |
| 17476 | /* "View.MemoryView":838 |
| 17477 | * new_shape += 1 |
| 17478 | * |
| 17479 | * if new_shape < 0: # <<<<<<<<<<<<<< |
| 17480 | * new_shape = 0 |
| 17481 | * |
| 17482 | */ |
| 17483 | } |
| 17484 | |
| 17485 | /* "View.MemoryView":842 |
| 17486 | * |
| 17487 | * |
| 17488 | * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<< |
| 17489 | * dst.shape[new_ndim] = new_shape |
| 17490 | * dst.suboffsets[new_ndim] = suboffset |
| 17491 | */ |
| 17492 | (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step); |
| 17493 | |
| 17494 | /* "View.MemoryView":843 |
| 17495 | * |
| 17496 | * dst.strides[new_ndim] = stride * step |
| 17497 | * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<< |
| 17498 | * dst.suboffsets[new_ndim] = suboffset |
| 17499 | * |
| 17500 | */ |
| 17501 | (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape; |
| 17502 | |
| 17503 | /* "View.MemoryView":844 |
| 17504 | * dst.strides[new_ndim] = stride * step |
| 17505 | * dst.shape[new_ndim] = new_shape |
| 17506 | * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<< |
| 17507 | * |
| 17508 | * |
| 17509 | */ |
| 17510 | (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset; |
| 17511 | } |
| 17512 | __pyx_L3:; |
| 17513 | |
| 17514 | /* "View.MemoryView":847 |
| 17515 | * |
| 17516 | * |
| 17517 | * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< |
| 17518 | * dst.data += start * stride |
| 17519 | * else: |
| 17520 | */ |
| 17521 | __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0); |
| 17522 | if (__pyx_t_2) { |
| 17523 | |
| 17524 | /* "View.MemoryView":848 |
| 17525 | * |
| 17526 | * if suboffset_dim[0] < 0: |
| 17527 | * dst.data += start * stride # <<<<<<<<<<<<<< |
| 17528 | * else: |
| 17529 | * dst.suboffsets[suboffset_dim[0]] += start * stride |
| 17530 | */ |
| 17531 | __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride)); |
| 17532 | |
| 17533 | /* "View.MemoryView":847 |
| 17534 | * |
| 17535 | * |
| 17536 | * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< |
| 17537 | * dst.data += start * stride |
| 17538 | * else: |
| 17539 | */ |
| 17540 | goto __pyx_L23; |
| 17541 | } |
| 17542 | |
| 17543 | /* "View.MemoryView":850 |
| 17544 | * dst.data += start * stride |
| 17545 | * else: |
| 17546 | * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<< |
| 17547 | * |
| 17548 | * if suboffset >= 0: |
| 17549 | */ |
| 17550 | /*else*/ { |
| 17551 | __pyx_t_3 = (__pyx_v_suboffset_dim[0]); |
| 17552 | (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride)); |
| 17553 | } |
| 17554 | __pyx_L23:; |
| 17555 | |
| 17556 | /* "View.MemoryView":852 |
| 17557 | * dst.suboffsets[suboffset_dim[0]] += start * stride |
| 17558 | * |
| 17559 | * if suboffset >= 0: # <<<<<<<<<<<<<< |
| 17560 | * if not is_slice: |
| 17561 | * if new_ndim == 0: |
| 17562 | */ |
| 17563 | __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0); |
| 17564 | if (__pyx_t_2) { |
| 17565 | |
| 17566 | /* "View.MemoryView":853 |
| 17567 | * |
| 17568 | * if suboffset >= 0: |
| 17569 | * if not is_slice: # <<<<<<<<<<<<<< |
| 17570 | * if new_ndim == 0: |
| 17571 | * dst.data = (<char **> dst.data)[0] + suboffset |
| 17572 | */ |
| 17573 | __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0); |
| 17574 | if (__pyx_t_2) { |
| 17575 | |
| 17576 | /* "View.MemoryView":854 |
| 17577 | * if suboffset >= 0: |
| 17578 | * if not is_slice: |
| 17579 | * if new_ndim == 0: # <<<<<<<<<<<<<< |
| 17580 | * dst.data = (<char **> dst.data)[0] + suboffset |
| 17581 | * else: |
| 17582 | */ |
| 17583 | __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0); |
| 17584 | if (__pyx_t_2) { |
| 17585 | |
| 17586 | /* "View.MemoryView":855 |
| 17587 | * if not is_slice: |
| 17588 | * if new_ndim == 0: |
| 17589 | * dst.data = (<char **> dst.data)[0] + suboffset # <<<<<<<<<<<<<< |
| 17590 | * else: |
| 17591 | * _err_dim(IndexError, "All dimensions preceding dimension %d " |
| 17592 | */ |
| 17593 | __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset); |
| 17594 | |
| 17595 | /* "View.MemoryView":854 |
| 17596 | * if suboffset >= 0: |
| 17597 | * if not is_slice: |
| 17598 | * if new_ndim == 0: # <<<<<<<<<<<<<< |
| 17599 | * dst.data = (<char **> dst.data)[0] + suboffset |
| 17600 | * else: |
| 17601 | */ |
| 17602 | goto __pyx_L26; |
| 17603 | } |
| 17604 | |
| 17605 | /* "View.MemoryView":857 |
| 17606 | * dst.data = (<char **> dst.data)[0] + suboffset |
| 17607 | * else: |
| 17608 | * _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<< |
| 17609 | * "must be indexed and not sliced", dim) |
| 17610 | * else: |
| 17611 | */ |
| 17612 | /*else*/ { |
| 17613 | |
| 17614 | /* "View.MemoryView":858 |
| 17615 | * else: |
| 17616 | * _err_dim(IndexError, "All dimensions preceding dimension %d " |
| 17617 | * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<< |
| 17618 | * else: |
| 17619 | * suboffset_dim[0] = new_ndim |
| 17620 | */ |
| 17621 | __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, __pyx_k_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == -1)__builtin_expect(!!(__pyx_t_3 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 857; __pyx_clineno = __LINE__17621; goto __pyx_L1_error;} |
| 17622 | } |
| 17623 | __pyx_L26:; |
| 17624 | |
| 17625 | /* "View.MemoryView":853 |
| 17626 | * |
| 17627 | * if suboffset >= 0: |
| 17628 | * if not is_slice: # <<<<<<<<<<<<<< |
| 17629 | * if new_ndim == 0: |
| 17630 | * dst.data = (<char **> dst.data)[0] + suboffset |
| 17631 | */ |
| 17632 | goto __pyx_L25; |
| 17633 | } |
| 17634 | |
| 17635 | /* "View.MemoryView":860 |
| 17636 | * "must be indexed and not sliced", dim) |
| 17637 | * else: |
| 17638 | * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<< |
| 17639 | * |
| 17640 | * return 0 |
| 17641 | */ |
| 17642 | /*else*/ { |
| 17643 | (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim; |
| 17644 | } |
| 17645 | __pyx_L25:; |
| 17646 | |
| 17647 | /* "View.MemoryView":852 |
| 17648 | * dst.suboffsets[suboffset_dim[0]] += start * stride |
| 17649 | * |
| 17650 | * if suboffset >= 0: # <<<<<<<<<<<<<< |
| 17651 | * if not is_slice: |
| 17652 | * if new_ndim == 0: |
| 17653 | */ |
| 17654 | } |
| 17655 | |
| 17656 | /* "View.MemoryView":862 |
| 17657 | * suboffset_dim[0] = new_ndim |
| 17658 | * |
| 17659 | * return 0 # <<<<<<<<<<<<<< |
| 17660 | * |
| 17661 | * |
| 17662 | */ |
| 17663 | __pyx_r = 0; |
| 17664 | goto __pyx_L0; |
| 17665 | |
| 17666 | /* "View.MemoryView":765 |
| 17667 | * |
| 17668 | * @cname('__pyx_memoryview_slice_memviewslice') |
| 17669 | * cdef int slice_memviewslice( # <<<<<<<<<<<<<< |
| 17670 | * __Pyx_memviewslice *dst, |
| 17671 | * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, |
| 17672 | */ |
| 17673 | |
| 17674 | /* function exit code */ |
| 17675 | __pyx_L1_error:; |
| 17676 | { |
| 17677 | #ifdef WITH_THREAD1 |
| 17678 | PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); |
| 17679 | #endif |
| 17680 | __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 17681 | #ifdef WITH_THREAD1 |
| 17682 | PyGILState_Release(__pyx_gilstate_save); |
| 17683 | #endif |
| 17684 | } |
| 17685 | __pyx_r = -1; |
| 17686 | __pyx_L0:; |
| 17687 | return __pyx_r; |
| 17688 | } |
| 17689 | |
| 17690 | /* "View.MemoryView":868 |
| 17691 | * |
| 17692 | * @cname('__pyx_pybuffer_index') |
| 17693 | * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<< |
| 17694 | * Py_ssize_t dim) except NULL: |
| 17695 | * cdef Py_ssize_t shape, stride, suboffset = -1 |
| 17696 | */ |
| 17697 | |
| 17698 | static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) { |
| 17699 | Py_ssize_t __pyx_v_shape; |
| 17700 | Py_ssize_t __pyx_v_stride; |
| 17701 | Py_ssize_t __pyx_v_suboffset; |
| 17702 | Py_ssize_t __pyx_v_itemsize; |
| 17703 | char *__pyx_v_resultp; |
| 17704 | char *__pyx_r; |
| 17705 | __Pyx_RefNannyDeclarations |
| 17706 | Py_ssize_t __pyx_t_1; |
| 17707 | int __pyx_t_2; |
| 17708 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 17709 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 17710 | int __pyx_lineno = 0; |
| 17711 | const char *__pyx_filename = NULL((void*)0); |
| 17712 | int __pyx_clineno = 0; |
| 17713 | __Pyx_RefNannySetupContext("pybuffer_index", 0); |
| 17714 | |
| 17715 | /* "View.MemoryView":870 |
| 17716 | * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, |
| 17717 | * Py_ssize_t dim) except NULL: |
| 17718 | * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<< |
| 17719 | * cdef Py_ssize_t itemsize = view.itemsize |
| 17720 | * cdef char *resultp |
| 17721 | */ |
| 17722 | __pyx_v_suboffset = -1L; |
| 17723 | |
| 17724 | /* "View.MemoryView":871 |
| 17725 | * Py_ssize_t dim) except NULL: |
| 17726 | * cdef Py_ssize_t shape, stride, suboffset = -1 |
| 17727 | * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<< |
| 17728 | * cdef char *resultp |
| 17729 | * |
| 17730 | */ |
| 17731 | __pyx_t_1 = __pyx_v_view->itemsize; |
| 17732 | __pyx_v_itemsize = __pyx_t_1; |
| 17733 | |
| 17734 | /* "View.MemoryView":874 |
| 17735 | * cdef char *resultp |
| 17736 | * |
| 17737 | * if view.ndim == 0: # <<<<<<<<<<<<<< |
| 17738 | * shape = view.len / itemsize |
| 17739 | * stride = itemsize |
| 17740 | */ |
| 17741 | __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0); |
| 17742 | if (__pyx_t_2) { |
| 17743 | |
| 17744 | /* "View.MemoryView":875 |
| 17745 | * |
| 17746 | * if view.ndim == 0: |
| 17747 | * shape = view.len / itemsize # <<<<<<<<<<<<<< |
| 17748 | * stride = itemsize |
| 17749 | * else: |
| 17750 | */ |
| 17751 | if (unlikely(__pyx_v_itemsize == 0)__builtin_expect(!!(__pyx_v_itemsize == 0), 0)) { |
| 17752 | PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); |
| 17753 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 875; __pyx_clineno = __LINE__17753; goto __pyx_L1_error;} |
| 17754 | } |
| 17755 | else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)__builtin_expect(!!(__pyx_v_itemsize == (Py_ssize_t)-1), 0) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))__builtin_expect(!!((((__pyx_v_view->len) < 0) & (( unsigned long)(__pyx_v_view->len) == 0-(unsigned long)(__pyx_v_view ->len)))), 0)) { |
| 17756 | PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); |
| 17757 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 875; __pyx_clineno = __LINE__17757; goto __pyx_L1_error;} |
| 17758 | } |
| 17759 | __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize); |
| 17760 | |
| 17761 | /* "View.MemoryView":876 |
| 17762 | * if view.ndim == 0: |
| 17763 | * shape = view.len / itemsize |
| 17764 | * stride = itemsize # <<<<<<<<<<<<<< |
| 17765 | * else: |
| 17766 | * shape = view.shape[dim] |
| 17767 | */ |
| 17768 | __pyx_v_stride = __pyx_v_itemsize; |
| 17769 | |
| 17770 | /* "View.MemoryView":874 |
| 17771 | * cdef char *resultp |
| 17772 | * |
| 17773 | * if view.ndim == 0: # <<<<<<<<<<<<<< |
| 17774 | * shape = view.len / itemsize |
| 17775 | * stride = itemsize |
| 17776 | */ |
| 17777 | goto __pyx_L3; |
| 17778 | } |
| 17779 | |
| 17780 | /* "View.MemoryView":878 |
| 17781 | * stride = itemsize |
| 17782 | * else: |
| 17783 | * shape = view.shape[dim] # <<<<<<<<<<<<<< |
| 17784 | * stride = view.strides[dim] |
| 17785 | * if view.suboffsets != NULL: |
| 17786 | */ |
| 17787 | /*else*/ { |
| 17788 | __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]); |
| 17789 | |
| 17790 | /* "View.MemoryView":879 |
| 17791 | * else: |
| 17792 | * shape = view.shape[dim] |
| 17793 | * stride = view.strides[dim] # <<<<<<<<<<<<<< |
| 17794 | * if view.suboffsets != NULL: |
| 17795 | * suboffset = view.suboffsets[dim] |
| 17796 | */ |
| 17797 | __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]); |
| 17798 | |
| 17799 | /* "View.MemoryView":880 |
| 17800 | * shape = view.shape[dim] |
| 17801 | * stride = view.strides[dim] |
| 17802 | * if view.suboffsets != NULL: # <<<<<<<<<<<<<< |
| 17803 | * suboffset = view.suboffsets[dim] |
| 17804 | * |
| 17805 | */ |
| 17806 | __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL((void*)0)) != 0); |
| 17807 | if (__pyx_t_2) { |
| 17808 | |
| 17809 | /* "View.MemoryView":881 |
| 17810 | * stride = view.strides[dim] |
| 17811 | * if view.suboffsets != NULL: |
| 17812 | * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<< |
| 17813 | * |
| 17814 | * if index < 0: |
| 17815 | */ |
| 17816 | __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]); |
| 17817 | |
| 17818 | /* "View.MemoryView":880 |
| 17819 | * shape = view.shape[dim] |
| 17820 | * stride = view.strides[dim] |
| 17821 | * if view.suboffsets != NULL: # <<<<<<<<<<<<<< |
| 17822 | * suboffset = view.suboffsets[dim] |
| 17823 | * |
| 17824 | */ |
| 17825 | } |
| 17826 | } |
| 17827 | __pyx_L3:; |
| 17828 | |
| 17829 | /* "View.MemoryView":883 |
| 17830 | * suboffset = view.suboffsets[dim] |
| 17831 | * |
| 17832 | * if index < 0: # <<<<<<<<<<<<<< |
| 17833 | * index += view.shape[dim] |
| 17834 | * if index < 0: |
| 17835 | */ |
| 17836 | __pyx_t_2 = ((__pyx_v_index < 0) != 0); |
| 17837 | if (__pyx_t_2) { |
| 17838 | |
| 17839 | /* "View.MemoryView":884 |
| 17840 | * |
| 17841 | * if index < 0: |
| 17842 | * index += view.shape[dim] # <<<<<<<<<<<<<< |
| 17843 | * if index < 0: |
| 17844 | * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) |
| 17845 | */ |
| 17846 | __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim])); |
| 17847 | |
| 17848 | /* "View.MemoryView":885 |
| 17849 | * if index < 0: |
| 17850 | * index += view.shape[dim] |
| 17851 | * if index < 0: # <<<<<<<<<<<<<< |
| 17852 | * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) |
| 17853 | * |
| 17854 | */ |
| 17855 | __pyx_t_2 = ((__pyx_v_index < 0) != 0); |
| 17856 | if (__pyx_t_2) { |
| 17857 | |
| 17858 | /* "View.MemoryView":886 |
| 17859 | * index += view.shape[dim] |
| 17860 | * if index < 0: |
| 17861 | * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<< |
| 17862 | * |
| 17863 | * if index >= shape: |
| 17864 | */ |
| 17865 | __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 886; __pyx_clineno = __LINE__17865; goto __pyx_L1_error;} |
| 17866 | __Pyx_GOTREF(__pyx_t_3); |
| 17867 | __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3)PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3 ); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 886; __pyx_clineno = __LINE__17867; goto __pyx_L1_error;} |
| 17868 | __Pyx_GOTREF(__pyx_t_4); |
| 17869 | __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; |
| 17870 | __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 886; __pyx_clineno = __LINE__17870; goto __pyx_L1_error;} |
| 17871 | __Pyx_GOTREF(__pyx_t_3); |
| 17872 | __Pyx_GIVEREF(__pyx_t_4); |
| 17873 | PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_4); |
| 17874 | __pyx_t_4 = 0; |
| 17875 | __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 886; __pyx_clineno = __LINE__17875; goto __pyx_L1_error;} |
| 17876 | __Pyx_GOTREF(__pyx_t_4); |
| 17877 | __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; |
| 17878 | __Pyx_Raise(__pyx_t_4, 0, 0, 0); |
| 17879 | __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; |
| 17880 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 886; __pyx_clineno = __LINE__17880; goto __pyx_L1_error;} |
| 17881 | |
| 17882 | /* "View.MemoryView":885 |
| 17883 | * if index < 0: |
| 17884 | * index += view.shape[dim] |
| 17885 | * if index < 0: # <<<<<<<<<<<<<< |
| 17886 | * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) |
| 17887 | * |
| 17888 | */ |
| 17889 | } |
| 17890 | |
| 17891 | /* "View.MemoryView":883 |
| 17892 | * suboffset = view.suboffsets[dim] |
| 17893 | * |
| 17894 | * if index < 0: # <<<<<<<<<<<<<< |
| 17895 | * index += view.shape[dim] |
| 17896 | * if index < 0: |
| 17897 | */ |
| 17898 | } |
| 17899 | |
| 17900 | /* "View.MemoryView":888 |
| 17901 | * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) |
| 17902 | * |
| 17903 | * if index >= shape: # <<<<<<<<<<<<<< |
| 17904 | * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) |
| 17905 | * |
| 17906 | */ |
| 17907 | __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0); |
| 17908 | if (__pyx_t_2) { |
| 17909 | |
| 17910 | /* "View.MemoryView":889 |
| 17911 | * |
| 17912 | * if index >= shape: |
| 17913 | * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<< |
| 17914 | * |
| 17915 | * resultp = bufp + index * stride |
| 17916 | */ |
| 17917 | __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 889; __pyx_clineno = __LINE__17917; goto __pyx_L1_error;} |
| 17918 | __Pyx_GOTREF(__pyx_t_4); |
| 17919 | __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_4)PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_4 ); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 889; __pyx_clineno = __LINE__17919; goto __pyx_L1_error;} |
| 17920 | __Pyx_GOTREF(__pyx_t_3); |
| 17921 | __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; |
| 17922 | __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 889; __pyx_clineno = __LINE__17922; goto __pyx_L1_error;} |
| 17923 | __Pyx_GOTREF(__pyx_t_4); |
| 17924 | __Pyx_GIVEREF(__pyx_t_3); |
| 17925 | PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_t_3); |
| 17926 | __pyx_t_3 = 0; |
| 17927 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 889; __pyx_clineno = __LINE__17927; goto __pyx_L1_error;} |
| 17928 | __Pyx_GOTREF(__pyx_t_3); |
| 17929 | __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; |
| 17930 | __Pyx_Raise(__pyx_t_3, 0, 0, 0); |
| 17931 | __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; |
| 17932 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 889; __pyx_clineno = __LINE__17932; goto __pyx_L1_error;} |
| 17933 | |
| 17934 | /* "View.MemoryView":888 |
| 17935 | * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) |
| 17936 | * |
| 17937 | * if index >= shape: # <<<<<<<<<<<<<< |
| 17938 | * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) |
| 17939 | * |
| 17940 | */ |
| 17941 | } |
| 17942 | |
| 17943 | /* "View.MemoryView":891 |
| 17944 | * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) |
| 17945 | * |
| 17946 | * resultp = bufp + index * stride # <<<<<<<<<<<<<< |
| 17947 | * if suboffset >= 0: |
| 17948 | * resultp = (<char **> resultp)[0] + suboffset |
| 17949 | */ |
| 17950 | __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride)); |
| 17951 | |
| 17952 | /* "View.MemoryView":892 |
| 17953 | * |
| 17954 | * resultp = bufp + index * stride |
| 17955 | * if suboffset >= 0: # <<<<<<<<<<<<<< |
| 17956 | * resultp = (<char **> resultp)[0] + suboffset |
| 17957 | * |
| 17958 | */ |
| 17959 | __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0); |
| 17960 | if (__pyx_t_2) { |
| 17961 | |
| 17962 | /* "View.MemoryView":893 |
| 17963 | * resultp = bufp + index * stride |
| 17964 | * if suboffset >= 0: |
| 17965 | * resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<< |
| 17966 | * |
| 17967 | * return resultp |
| 17968 | */ |
| 17969 | __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); |
| 17970 | |
| 17971 | /* "View.MemoryView":892 |
| 17972 | * |
| 17973 | * resultp = bufp + index * stride |
| 17974 | * if suboffset >= 0: # <<<<<<<<<<<<<< |
| 17975 | * resultp = (<char **> resultp)[0] + suboffset |
| 17976 | * |
| 17977 | */ |
| 17978 | } |
| 17979 | |
| 17980 | /* "View.MemoryView":895 |
| 17981 | * resultp = (<char **> resultp)[0] + suboffset |
| 17982 | * |
| 17983 | * return resultp # <<<<<<<<<<<<<< |
| 17984 | * |
| 17985 | * |
| 17986 | */ |
| 17987 | __pyx_r = __pyx_v_resultp; |
| 17988 | goto __pyx_L0; |
| 17989 | |
| 17990 | /* "View.MemoryView":868 |
| 17991 | * |
| 17992 | * @cname('__pyx_pybuffer_index') |
| 17993 | * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<< |
| 17994 | * Py_ssize_t dim) except NULL: |
| 17995 | * cdef Py_ssize_t shape, stride, suboffset = -1 |
| 17996 | */ |
| 17997 | |
| 17998 | /* function exit code */ |
| 17999 | __pyx_L1_error:; |
| 18000 | __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); |
| 18001 | __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); |
| 18002 | __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 18003 | __pyx_r = NULL((void*)0); |
| 18004 | __pyx_L0:; |
| 18005 | __Pyx_RefNannyFinishContext(); |
| 18006 | return __pyx_r; |
| 18007 | } |
| 18008 | |
| 18009 | /* "View.MemoryView":901 |
| 18010 | * |
| 18011 | * @cname('__pyx_memslice_transpose') |
| 18012 | * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<< |
| 18013 | * cdef int ndim = memslice.memview.view.ndim |
| 18014 | * |
| 18015 | */ |
| 18016 | |
| 18017 | static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) { |
| 18018 | int __pyx_v_ndim; |
| 18019 | Py_ssize_t *__pyx_v_shape; |
| 18020 | Py_ssize_t *__pyx_v_strides; |
| 18021 | int __pyx_v_i; |
| 18022 | int __pyx_v_j; |
| 18023 | int __pyx_r; |
| 18024 | int __pyx_t_1; |
| 18025 | Py_ssize_t *__pyx_t_2; |
| 18026 | long __pyx_t_3; |
| 18027 | Py_ssize_t __pyx_t_4; |
| 18028 | Py_ssize_t __pyx_t_5; |
| 18029 | int __pyx_t_6; |
| 18030 | int __pyx_t_7; |
| 18031 | int __pyx_t_8; |
| 18032 | int __pyx_lineno = 0; |
| 18033 | const char *__pyx_filename = NULL((void*)0); |
| 18034 | int __pyx_clineno = 0; |
| 18035 | |
| 18036 | /* "View.MemoryView":902 |
| 18037 | * @cname('__pyx_memslice_transpose') |
| 18038 | * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: |
| 18039 | * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<< |
| 18040 | * |
| 18041 | * cdef Py_ssize_t *shape = memslice.shape |
| 18042 | */ |
| 18043 | __pyx_t_1 = __pyx_v_memslice->memview->view.ndim; |
| 18044 | __pyx_v_ndim = __pyx_t_1; |
| 18045 | |
| 18046 | /* "View.MemoryView":904 |
| 18047 | * cdef int ndim = memslice.memview.view.ndim |
| 18048 | * |
| 18049 | * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<< |
| 18050 | * cdef Py_ssize_t *strides = memslice.strides |
| 18051 | * |
| 18052 | */ |
| 18053 | __pyx_t_2 = __pyx_v_memslice->shape; |
| 18054 | __pyx_v_shape = __pyx_t_2; |
| 18055 | |
| 18056 | /* "View.MemoryView":905 |
| 18057 | * |
| 18058 | * cdef Py_ssize_t *shape = memslice.shape |
| 18059 | * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<< |
| 18060 | * |
| 18061 | * |
| 18062 | */ |
| 18063 | __pyx_t_2 = __pyx_v_memslice->strides; |
| 18064 | __pyx_v_strides = __pyx_t_2; |
| 18065 | |
| 18066 | /* "View.MemoryView":909 |
| 18067 | * |
| 18068 | * cdef int i, j |
| 18069 | * for i in range(ndim / 2): # <<<<<<<<<<<<<< |
| 18070 | * j = ndim - 1 - i |
| 18071 | * strides[i], strides[j] = strides[j], strides[i] |
| 18072 | */ |
| 18073 | __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2); |
| 18074 | for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_3; __pyx_t_1+=1) { |
| 18075 | __pyx_v_i = __pyx_t_1; |
| 18076 | |
| 18077 | /* "View.MemoryView":910 |
| 18078 | * cdef int i, j |
| 18079 | * for i in range(ndim / 2): |
| 18080 | * j = ndim - 1 - i # <<<<<<<<<<<<<< |
| 18081 | * strides[i], strides[j] = strides[j], strides[i] |
| 18082 | * shape[i], shape[j] = shape[j], shape[i] |
| 18083 | */ |
| 18084 | __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i); |
| 18085 | |
| 18086 | /* "View.MemoryView":911 |
| 18087 | * for i in range(ndim / 2): |
| 18088 | * j = ndim - 1 - i |
| 18089 | * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<< |
| 18090 | * shape[i], shape[j] = shape[j], shape[i] |
| 18091 | * |
| 18092 | */ |
| 18093 | __pyx_t_4 = (__pyx_v_strides[__pyx_v_j]); |
| 18094 | __pyx_t_5 = (__pyx_v_strides[__pyx_v_i]); |
| 18095 | (__pyx_v_strides[__pyx_v_i]) = __pyx_t_4; |
| 18096 | (__pyx_v_strides[__pyx_v_j]) = __pyx_t_5; |
| 18097 | |
| 18098 | /* "View.MemoryView":912 |
| 18099 | * j = ndim - 1 - i |
| 18100 | * strides[i], strides[j] = strides[j], strides[i] |
| 18101 | * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<< |
| 18102 | * |
| 18103 | * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: |
| 18104 | */ |
| 18105 | __pyx_t_5 = (__pyx_v_shape[__pyx_v_j]); |
| 18106 | __pyx_t_4 = (__pyx_v_shape[__pyx_v_i]); |
| 18107 | (__pyx_v_shape[__pyx_v_i]) = __pyx_t_5; |
| 18108 | (__pyx_v_shape[__pyx_v_j]) = __pyx_t_4; |
| 18109 | |
| 18110 | /* "View.MemoryView":914 |
| 18111 | * shape[i], shape[j] = shape[j], shape[i] |
| 18112 | * |
| 18113 | * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< |
| 18114 | * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") |
| 18115 | * |
| 18116 | */ |
| 18117 | __pyx_t_7 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0); |
| 18118 | if (!__pyx_t_7) { |
| 18119 | } else { |
| 18120 | __pyx_t_6 = __pyx_t_7; |
| 18121 | goto __pyx_L6_bool_binop_done; |
| 18122 | } |
| 18123 | __pyx_t_7 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0); |
| 18124 | __pyx_t_6 = __pyx_t_7; |
| 18125 | __pyx_L6_bool_binop_done:; |
| 18126 | if (__pyx_t_6) { |
| 18127 | |
| 18128 | /* "View.MemoryView":915 |
| 18129 | * |
| 18130 | * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: |
| 18131 | * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<< |
| 18132 | * |
| 18133 | * return 1 |
| 18134 | */ |
| 18135 | __pyx_t_8 = __pyx_memoryview_err(__pyx_builtin_ValueError, __pyx_k_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_8 == -1)__builtin_expect(!!(__pyx_t_8 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 915; __pyx_clineno = __LINE__18135; goto __pyx_L1_error;} |
| 18136 | |
| 18137 | /* "View.MemoryView":914 |
| 18138 | * shape[i], shape[j] = shape[j], shape[i] |
| 18139 | * |
| 18140 | * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< |
| 18141 | * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") |
| 18142 | * |
| 18143 | */ |
| 18144 | } |
| 18145 | } |
| 18146 | |
| 18147 | /* "View.MemoryView":917 |
| 18148 | * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") |
| 18149 | * |
| 18150 | * return 1 # <<<<<<<<<<<<<< |
| 18151 | * |
| 18152 | * |
| 18153 | */ |
| 18154 | __pyx_r = 1; |
| 18155 | goto __pyx_L0; |
| 18156 | |
| 18157 | /* "View.MemoryView":901 |
| 18158 | * |
| 18159 | * @cname('__pyx_memslice_transpose') |
| 18160 | * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<< |
| 18161 | * cdef int ndim = memslice.memview.view.ndim |
| 18162 | * |
| 18163 | */ |
| 18164 | |
| 18165 | /* function exit code */ |
| 18166 | __pyx_L1_error:; |
| 18167 | { |
| 18168 | #ifdef WITH_THREAD1 |
| 18169 | PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); |
| 18170 | #endif |
| 18171 | __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 18172 | #ifdef WITH_THREAD1 |
| 18173 | PyGILState_Release(__pyx_gilstate_save); |
| 18174 | #endif |
| 18175 | } |
| 18176 | __pyx_r = 0; |
| 18177 | __pyx_L0:; |
| 18178 | return __pyx_r; |
| 18179 | } |
| 18180 | |
| 18181 | /* "View.MemoryView":934 |
| 18182 | * cdef int (*to_dtype_func)(char *, object) except 0 |
| 18183 | * |
| 18184 | * def __dealloc__(self): # <<<<<<<<<<<<<< |
| 18185 | * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) |
| 18186 | * |
| 18187 | */ |
| 18188 | |
| 18189 | /* Python wrapper */ |
| 18190 | static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/ |
| 18191 | static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) { |
| 18192 | __Pyx_RefNannyDeclarations |
| 18193 | __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); |
| 18194 | __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); |
| 18195 | |
| 18196 | /* function exit code */ |
| 18197 | __Pyx_RefNannyFinishContext(); |
| 18198 | } |
| 18199 | |
| 18200 | static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) { |
| 18201 | __Pyx_RefNannyDeclarations |
| 18202 | __Pyx_RefNannySetupContext("__dealloc__", 0); |
| 18203 | |
| 18204 | /* "View.MemoryView":935 |
| 18205 | * |
| 18206 | * def __dealloc__(self): |
| 18207 | * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<< |
| 18208 | * |
| 18209 | * cdef convert_item_to_object(self, char *itemp): |
| 18210 | */ |
| 18211 | __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1)__Pyx_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1, 18211 ); |
| 18212 | |
| 18213 | /* "View.MemoryView":934 |
| 18214 | * cdef int (*to_dtype_func)(char *, object) except 0 |
| 18215 | * |
| 18216 | * def __dealloc__(self): # <<<<<<<<<<<<<< |
| 18217 | * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) |
| 18218 | * |
| 18219 | */ |
| 18220 | |
| 18221 | /* function exit code */ |
| 18222 | __Pyx_RefNannyFinishContext(); |
| 18223 | } |
| 18224 | |
| 18225 | /* "View.MemoryView":937 |
| 18226 | * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) |
| 18227 | * |
| 18228 | * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< |
| 18229 | * if self.to_object_func != NULL: |
| 18230 | * return self.to_object_func(itemp) |
| 18231 | */ |
| 18232 | |
| 18233 | static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) { |
| 18234 | PyObject *__pyx_r = NULL((void*)0); |
| 18235 | __Pyx_RefNannyDeclarations |
| 18236 | int __pyx_t_1; |
| 18237 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 18238 | int __pyx_lineno = 0; |
| 18239 | const char *__pyx_filename = NULL((void*)0); |
| 18240 | int __pyx_clineno = 0; |
| 18241 | __Pyx_RefNannySetupContext("convert_item_to_object", 0); |
| 18242 | |
| 18243 | /* "View.MemoryView":938 |
| 18244 | * |
| 18245 | * cdef convert_item_to_object(self, char *itemp): |
| 18246 | * if self.to_object_func != NULL: # <<<<<<<<<<<<<< |
| 18247 | * return self.to_object_func(itemp) |
| 18248 | * else: |
| 18249 | */ |
| 18250 | __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL((void*)0)) != 0); |
| 18251 | if (__pyx_t_1) { |
| 18252 | |
| 18253 | /* "View.MemoryView":939 |
| 18254 | * cdef convert_item_to_object(self, char *itemp): |
| 18255 | * if self.to_object_func != NULL: |
| 18256 | * return self.to_object_func(itemp) # <<<<<<<<<<<<<< |
| 18257 | * else: |
| 18258 | * return memoryview.convert_item_to_object(self, itemp) |
| 18259 | */ |
| 18260 | __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); |
| 18261 | __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 939; __pyx_clineno = __LINE__18261; goto __pyx_L1_error;} |
| 18262 | __Pyx_GOTREF(__pyx_t_2); |
| 18263 | __pyx_r = __pyx_t_2; |
| 18264 | __pyx_t_2 = 0; |
| 18265 | goto __pyx_L0; |
| 18266 | |
| 18267 | /* "View.MemoryView":938 |
| 18268 | * |
| 18269 | * cdef convert_item_to_object(self, char *itemp): |
| 18270 | * if self.to_object_func != NULL: # <<<<<<<<<<<<<< |
| 18271 | * return self.to_object_func(itemp) |
| 18272 | * else: |
| 18273 | */ |
| 18274 | } |
| 18275 | |
| 18276 | /* "View.MemoryView":941 |
| 18277 | * return self.to_object_func(itemp) |
| 18278 | * else: |
| 18279 | * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<< |
| 18280 | * |
| 18281 | * cdef assign_item_from_object(self, char *itemp, object value): |
| 18282 | */ |
| 18283 | /*else*/ { |
| 18284 | __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); |
| 18285 | __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 941; __pyx_clineno = __LINE__18285; goto __pyx_L1_error;} |
| 18286 | __Pyx_GOTREF(__pyx_t_2); |
| 18287 | __pyx_r = __pyx_t_2; |
| 18288 | __pyx_t_2 = 0; |
| 18289 | goto __pyx_L0; |
| 18290 | } |
| 18291 | |
| 18292 | /* "View.MemoryView":937 |
| 18293 | * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) |
| 18294 | * |
| 18295 | * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< |
| 18296 | * if self.to_object_func != NULL: |
| 18297 | * return self.to_object_func(itemp) |
| 18298 | */ |
| 18299 | |
| 18300 | /* function exit code */ |
| 18301 | __pyx_L1_error:; |
| 18302 | __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); |
| 18303 | __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 18304 | __pyx_r = 0; |
| 18305 | __pyx_L0:; |
| 18306 | __Pyx_XGIVEREF(__pyx_r); |
| 18307 | __Pyx_RefNannyFinishContext(); |
| 18308 | return __pyx_r; |
| 18309 | } |
| 18310 | |
| 18311 | /* "View.MemoryView":943 |
| 18312 | * return memoryview.convert_item_to_object(self, itemp) |
| 18313 | * |
| 18314 | * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< |
| 18315 | * if self.to_dtype_func != NULL: |
| 18316 | * self.to_dtype_func(itemp, value) |
| 18317 | */ |
| 18318 | |
| 18319 | static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { |
| 18320 | PyObject *__pyx_r = NULL((void*)0); |
| 18321 | __Pyx_RefNannyDeclarations |
| 18322 | int __pyx_t_1; |
| 18323 | int __pyx_t_2; |
| 18324 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 18325 | int __pyx_lineno = 0; |
| 18326 | const char *__pyx_filename = NULL((void*)0); |
| 18327 | int __pyx_clineno = 0; |
| 18328 | __Pyx_RefNannySetupContext("assign_item_from_object", 0); |
| 18329 | |
| 18330 | /* "View.MemoryView":944 |
| 18331 | * |
| 18332 | * cdef assign_item_from_object(self, char *itemp, object value): |
| 18333 | * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< |
| 18334 | * self.to_dtype_func(itemp, value) |
| 18335 | * else: |
| 18336 | */ |
| 18337 | __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL((void*)0)) != 0); |
| 18338 | if (__pyx_t_1) { |
| 18339 | |
| 18340 | /* "View.MemoryView":945 |
| 18341 | * cdef assign_item_from_object(self, char *itemp, object value): |
| 18342 | * if self.to_dtype_func != NULL: |
| 18343 | * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<< |
| 18344 | * else: |
| 18345 | * memoryview.assign_item_from_object(self, itemp, value) |
| 18346 | */ |
| 18347 | __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == 0)__builtin_expect(!!(__pyx_t_2 == 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 945; __pyx_clineno = __LINE__18347; goto __pyx_L1_error;} |
| 18348 | |
| 18349 | /* "View.MemoryView":944 |
| 18350 | * |
| 18351 | * cdef assign_item_from_object(self, char *itemp, object value): |
| 18352 | * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< |
| 18353 | * self.to_dtype_func(itemp, value) |
| 18354 | * else: |
| 18355 | */ |
| 18356 | goto __pyx_L3; |
| 18357 | } |
| 18358 | |
| 18359 | /* "View.MemoryView":947 |
| 18360 | * self.to_dtype_func(itemp, value) |
| 18361 | * else: |
| 18362 | * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<< |
| 18363 | * |
| 18364 | * property base: |
| 18365 | */ |
| 18366 | /*else*/ { |
| 18367 | __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 947; __pyx_clineno = __LINE__18367; goto __pyx_L1_error;} |
| 18368 | __Pyx_GOTREF(__pyx_t_3); |
| 18369 | __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; |
| 18370 | } |
| 18371 | __pyx_L3:; |
| 18372 | |
| 18373 | /* "View.MemoryView":943 |
| 18374 | * return memoryview.convert_item_to_object(self, itemp) |
| 18375 | * |
| 18376 | * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< |
| 18377 | * if self.to_dtype_func != NULL: |
| 18378 | * self.to_dtype_func(itemp, value) |
| 18379 | */ |
| 18380 | |
| 18381 | /* function exit code */ |
| 18382 | __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 18383 | goto __pyx_L0; |
| 18384 | __pyx_L1_error:; |
| 18385 | __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); |
| 18386 | __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 18387 | __pyx_r = 0; |
| 18388 | __pyx_L0:; |
| 18389 | __Pyx_XGIVEREF(__pyx_r); |
| 18390 | __Pyx_RefNannyFinishContext(); |
| 18391 | return __pyx_r; |
| 18392 | } |
| 18393 | |
| 18394 | /* "View.MemoryView":951 |
| 18395 | * property base: |
| 18396 | * @cname('__pyx_memoryviewslice__get__base') |
| 18397 | * def __get__(self): # <<<<<<<<<<<<<< |
| 18398 | * return self.from_object |
| 18399 | * |
| 18400 | */ |
| 18401 | |
| 18402 | /* Python wrapper */ |
| 18403 | static PyObject *__pyx_memoryviewslice__get__base(PyObject *__pyx_v_self); /*proto*/ |
| 18404 | static PyObject *__pyx_memoryviewslice__get__base(PyObject *__pyx_v_self) { |
| 18405 | PyObject *__pyx_r = 0; |
| 18406 | __Pyx_RefNannyDeclarations |
| 18407 | __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); |
| 18408 | __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); |
| 18409 | |
| 18410 | /* function exit code */ |
| 18411 | __Pyx_RefNannyFinishContext(); |
| 18412 | return __pyx_r; |
| 18413 | } |
| 18414 | |
| 18415 | static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) { |
| 18416 | PyObject *__pyx_r = NULL((void*)0); |
| 18417 | __Pyx_RefNannyDeclarations |
| 18418 | __Pyx_RefNannySetupContext("__get__", 0); |
| 18419 | |
| 18420 | /* "View.MemoryView":952 |
| 18421 | * @cname('__pyx_memoryviewslice__get__base') |
| 18422 | * def __get__(self): |
| 18423 | * return self.from_object # <<<<<<<<<<<<<< |
| 18424 | * |
| 18425 | * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") |
| 18426 | */ |
| 18427 | __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); |
| 18428 | __Pyx_INCREF(__pyx_v_self->from_object)( ((PyObject*)(__pyx_v_self->from_object))->ob_refcnt++ ); |
| 18429 | __pyx_r = __pyx_v_self->from_object; |
| 18430 | goto __pyx_L0; |
| 18431 | |
| 18432 | /* "View.MemoryView":951 |
| 18433 | * property base: |
| 18434 | * @cname('__pyx_memoryviewslice__get__base') |
| 18435 | * def __get__(self): # <<<<<<<<<<<<<< |
| 18436 | * return self.from_object |
| 18437 | * |
| 18438 | */ |
| 18439 | |
| 18440 | /* function exit code */ |
| 18441 | __pyx_L0:; |
| 18442 | __Pyx_XGIVEREF(__pyx_r); |
| 18443 | __Pyx_RefNannyFinishContext(); |
| 18444 | return __pyx_r; |
| 18445 | } |
| 18446 | |
| 18447 | /* "View.MemoryView":958 |
| 18448 | * |
| 18449 | * @cname('__pyx_memoryview_fromslice') |
| 18450 | * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<< |
| 18451 | * int ndim, |
| 18452 | * object (*to_object_func)(char *), |
| 18453 | */ |
| 18454 | |
| 18455 | static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) { |
| 18456 | struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; |
| 18457 | Py_ssize_t __pyx_v_suboffset; |
| 18458 | PyObject *__pyx_v_length = NULL((void*)0); |
| 18459 | PyObject *__pyx_r = NULL((void*)0); |
| 18460 | __Pyx_RefNannyDeclarations |
| 18461 | int __pyx_t_1; |
| 18462 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 18463 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 18464 | __Pyx_TypeInfo *__pyx_t_4; |
| 18465 | Py_buffer __pyx_t_5; |
| 18466 | Py_ssize_t *__pyx_t_6; |
| 18467 | Py_ssize_t *__pyx_t_7; |
| 18468 | Py_ssize_t *__pyx_t_8; |
| 18469 | Py_ssize_t __pyx_t_9; |
| 18470 | int __pyx_lineno = 0; |
| 18471 | const char *__pyx_filename = NULL((void*)0); |
| 18472 | int __pyx_clineno = 0; |
| 18473 | __Pyx_RefNannySetupContext("memoryview_fromslice", 0); |
| 18474 | |
| 18475 | /* "View.MemoryView":966 |
| 18476 | * cdef _memoryviewslice result |
| 18477 | * |
| 18478 | * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<< |
| 18479 | * return None |
| 18480 | * |
| 18481 | */ |
| 18482 | __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None(&_Py_NoneStruct)) != 0); |
| 18483 | if (__pyx_t_1) { |
| 18484 | |
| 18485 | /* "View.MemoryView":967 |
| 18486 | * |
| 18487 | * if <PyObject *> memviewslice.memview == Py_None: |
| 18488 | * return None # <<<<<<<<<<<<<< |
| 18489 | * |
| 18490 | * |
| 18491 | */ |
| 18492 | __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); |
| 18493 | __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 18494 | __pyx_r = Py_None(&_Py_NoneStruct); |
| 18495 | goto __pyx_L0; |
| 18496 | |
| 18497 | /* "View.MemoryView":966 |
| 18498 | * cdef _memoryviewslice result |
| 18499 | * |
| 18500 | * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<< |
| 18501 | * return None |
| 18502 | * |
| 18503 | */ |
| 18504 | } |
| 18505 | |
| 18506 | /* "View.MemoryView":972 |
| 18507 | * |
| 18508 | * |
| 18509 | * result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<< |
| 18510 | * |
| 18511 | * result.from_slice = memviewslice |
| 18512 | */ |
| 18513 | __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object)((__pyx_v_dtype_is_object) ? (( ((PyObject*)(((PyObject *) & _Py_TrueStruct)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct )) : (( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))-> ob_refcnt++), ((PyObject *) &_Py_ZeroStruct))); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 972; __pyx_clineno = __LINE__18513; goto __pyx_L1_error;} |
| 18514 | __Pyx_GOTREF(__pyx_t_2); |
| 18515 | __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 972; __pyx_clineno = __LINE__18515; goto __pyx_L1_error;} |
| 18516 | __Pyx_GOTREF(__pyx_t_3); |
| 18517 | __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 18518 | __Pyx_GIVEREF(Py_None); |
| 18519 | PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = (&_Py_NoneStruct )); |
| 18520 | __Pyx_INCREF(__pyx_int_0)( ((PyObject*)(__pyx_int_0))->ob_refcnt++); |
| 18521 | __Pyx_GIVEREF(__pyx_int_0); |
| 18522 | PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_int_0); |
| 18523 | __Pyx_GIVEREF(__pyx_t_2); |
| 18524 | PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[2] = __pyx_t_2); |
| 18525 | __pyx_t_2 = 0; |
| 18526 | __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 972; __pyx_clineno = __LINE__18526; goto __pyx_L1_error;} |
| 18527 | __Pyx_GOTREF(__pyx_t_2); |
| 18528 | __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; |
| 18529 | __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); |
| 18530 | __pyx_t_2 = 0; |
| 18531 | |
| 18532 | /* "View.MemoryView":974 |
| 18533 | * result = _memoryviewslice(None, 0, dtype_is_object) |
| 18534 | * |
| 18535 | * result.from_slice = memviewslice # <<<<<<<<<<<<<< |
| 18536 | * __PYX_INC_MEMVIEW(&memviewslice, 1) |
| 18537 | * |
| 18538 | */ |
| 18539 | __pyx_v_result->from_slice = __pyx_v_memviewslice; |
| 18540 | |
| 18541 | /* "View.MemoryView":975 |
| 18542 | * |
| 18543 | * result.from_slice = memviewslice |
| 18544 | * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<< |
| 18545 | * |
| 18546 | * result.from_object = (<memoryview> memviewslice.memview).base |
| 18547 | */ |
| 18548 | __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1)__Pyx_INC_MEMVIEW((&__pyx_v_memviewslice), 1, 18548); |
| 18549 | |
| 18550 | /* "View.MemoryView":977 |
| 18551 | * __PYX_INC_MEMVIEW(&memviewslice, 1) |
| 18552 | * |
| 18553 | * result.from_object = (<memoryview> memviewslice.memview).base # <<<<<<<<<<<<<< |
| 18554 | * result.typeinfo = memviewslice.memview.typeinfo |
| 18555 | * |
| 18556 | */ |
| 18557 | __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 977; __pyx_clineno = __LINE__18557; goto __pyx_L1_error;} |
| 18558 | __Pyx_GOTREF(__pyx_t_2); |
| 18559 | __Pyx_GIVEREF(__pyx_t_2); |
| 18560 | __Pyx_GOTREF(__pyx_v_result->from_object); |
| 18561 | __Pyx_DECREF(__pyx_v_result->from_object)do { if ( --((PyObject*)(__pyx_v_result->from_object))-> ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_result ->from_object)))->ob_type)->tp_dealloc)((PyObject *) ((PyObject *)(__pyx_v_result->from_object)))); } while (0); |
| 18562 | __pyx_v_result->from_object = __pyx_t_2; |
| 18563 | __pyx_t_2 = 0; |
| 18564 | |
| 18565 | /* "View.MemoryView":978 |
| 18566 | * |
| 18567 | * result.from_object = (<memoryview> memviewslice.memview).base |
| 18568 | * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<< |
| 18569 | * |
| 18570 | * result.view = memviewslice.memview.view |
| 18571 | */ |
| 18572 | __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo; |
| 18573 | __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4; |
| 18574 | |
| 18575 | /* "View.MemoryView":980 |
| 18576 | * result.typeinfo = memviewslice.memview.typeinfo |
| 18577 | * |
| 18578 | * result.view = memviewslice.memview.view # <<<<<<<<<<<<<< |
| 18579 | * result.view.buf = <void *> memviewslice.data |
| 18580 | * result.view.ndim = ndim |
| 18581 | */ |
| 18582 | __pyx_t_5 = __pyx_v_memviewslice.memview->view; |
| 18583 | __pyx_v_result->__pyx_base.view = __pyx_t_5; |
| 18584 | |
| 18585 | /* "View.MemoryView":981 |
| 18586 | * |
| 18587 | * result.view = memviewslice.memview.view |
| 18588 | * result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<< |
| 18589 | * result.view.ndim = ndim |
| 18590 | * (<__pyx_buffer *> &result.view).obj = Py_None |
| 18591 | */ |
| 18592 | __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data); |
| 18593 | |
| 18594 | /* "View.MemoryView":982 |
| 18595 | * result.view = memviewslice.memview.view |
| 18596 | * result.view.buf = <void *> memviewslice.data |
| 18597 | * result.view.ndim = ndim # <<<<<<<<<<<<<< |
| 18598 | * (<__pyx_buffer *> &result.view).obj = Py_None |
| 18599 | * Py_INCREF(Py_None) |
| 18600 | */ |
| 18601 | __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim; |
| 18602 | |
| 18603 | /* "View.MemoryView":983 |
| 18604 | * result.view.buf = <void *> memviewslice.data |
| 18605 | * result.view.ndim = ndim |
| 18606 | * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<< |
| 18607 | * Py_INCREF(Py_None) |
| 18608 | * |
| 18609 | */ |
| 18610 | ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None(&_Py_NoneStruct); |
| 18611 | |
| 18612 | /* "View.MemoryView":984 |
| 18613 | * result.view.ndim = ndim |
| 18614 | * (<__pyx_buffer *> &result.view).obj = Py_None |
| 18615 | * Py_INCREF(Py_None) # <<<<<<<<<<<<<< |
| 18616 | * |
| 18617 | * result.flags = PyBUF_RECORDS |
| 18618 | */ |
| 18619 | Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 18620 | |
| 18621 | /* "View.MemoryView":986 |
| 18622 | * Py_INCREF(Py_None) |
| 18623 | * |
| 18624 | * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<< |
| 18625 | * |
| 18626 | * result.view.shape = <Py_ssize_t *> result.from_slice.shape |
| 18627 | */ |
| 18628 | __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS((0x0010 | 0x0008) | 0x0001 | 0x0004); |
| 18629 | |
| 18630 | /* "View.MemoryView":988 |
| 18631 | * result.flags = PyBUF_RECORDS |
| 18632 | * |
| 18633 | * result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<< |
| 18634 | * result.view.strides = <Py_ssize_t *> result.from_slice.strides |
| 18635 | * |
| 18636 | */ |
| 18637 | __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape); |
| 18638 | |
| 18639 | /* "View.MemoryView":989 |
| 18640 | * |
| 18641 | * result.view.shape = <Py_ssize_t *> result.from_slice.shape |
| 18642 | * result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<< |
| 18643 | * |
| 18644 | * |
| 18645 | */ |
| 18646 | __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides); |
| 18647 | |
| 18648 | /* "View.MemoryView":992 |
| 18649 | * |
| 18650 | * |
| 18651 | * result.view.suboffsets = NULL # <<<<<<<<<<<<<< |
| 18652 | * for suboffset in result.from_slice.suboffsets[:ndim]: |
| 18653 | * if suboffset >= 0: |
| 18654 | */ |
| 18655 | __pyx_v_result->__pyx_base.view.suboffsets = NULL((void*)0); |
| 18656 | |
| 18657 | /* "View.MemoryView":993 |
| 18658 | * |
| 18659 | * result.view.suboffsets = NULL |
| 18660 | * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<< |
| 18661 | * if suboffset >= 0: |
| 18662 | * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets |
| 18663 | */ |
| 18664 | __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim); |
| 18665 | for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { |
| 18666 | __pyx_t_6 = __pyx_t_8; |
| 18667 | __pyx_v_suboffset = (__pyx_t_6[0]); |
| 18668 | |
| 18669 | /* "View.MemoryView":994 |
| 18670 | * result.view.suboffsets = NULL |
| 18671 | * for suboffset in result.from_slice.suboffsets[:ndim]: |
| 18672 | * if suboffset >= 0: # <<<<<<<<<<<<<< |
| 18673 | * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets |
| 18674 | * break |
| 18675 | */ |
| 18676 | __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0); |
| 18677 | if (__pyx_t_1) { |
| 18678 | |
| 18679 | /* "View.MemoryView":995 |
| 18680 | * for suboffset in result.from_slice.suboffsets[:ndim]: |
| 18681 | * if suboffset >= 0: |
| 18682 | * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<< |
| 18683 | * break |
| 18684 | * |
| 18685 | */ |
| 18686 | __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets); |
| 18687 | |
| 18688 | /* "View.MemoryView":996 |
| 18689 | * if suboffset >= 0: |
| 18690 | * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets |
| 18691 | * break # <<<<<<<<<<<<<< |
| 18692 | * |
| 18693 | * result.view.len = result.view.itemsize |
| 18694 | */ |
| 18695 | goto __pyx_L5_break; |
| 18696 | |
| 18697 | /* "View.MemoryView":994 |
| 18698 | * result.view.suboffsets = NULL |
| 18699 | * for suboffset in result.from_slice.suboffsets[:ndim]: |
| 18700 | * if suboffset >= 0: # <<<<<<<<<<<<<< |
| 18701 | * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets |
| 18702 | * break |
| 18703 | */ |
| 18704 | } |
| 18705 | } |
| 18706 | __pyx_L5_break:; |
| 18707 | |
| 18708 | /* "View.MemoryView":998 |
| 18709 | * break |
| 18710 | * |
| 18711 | * result.view.len = result.view.itemsize # <<<<<<<<<<<<<< |
| 18712 | * for length in result.view.shape[:ndim]: |
| 18713 | * result.view.len *= length |
| 18714 | */ |
| 18715 | __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize; |
| 18716 | __pyx_v_result->__pyx_base.view.len = __pyx_t_9; |
| 18717 | |
| 18718 | /* "View.MemoryView":999 |
| 18719 | * |
| 18720 | * result.view.len = result.view.itemsize |
| 18721 | * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<< |
| 18722 | * result.view.len *= length |
| 18723 | * |
| 18724 | */ |
| 18725 | __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim); |
| 18726 | for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { |
| 18727 | __pyx_t_6 = __pyx_t_8; |
| 18728 | __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 999; __pyx_clineno = __LINE__18728; goto __pyx_L1_error;} |
| 18729 | __Pyx_GOTREF(__pyx_t_2); |
| 18730 | __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_length; __pyx_v_length = __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); |
| 18731 | __pyx_t_2 = 0; |
| 18732 | |
| 18733 | /* "View.MemoryView":1000 |
| 18734 | * result.view.len = result.view.itemsize |
| 18735 | * for length in result.view.shape[:ndim]: |
| 18736 | * result.view.len *= length # <<<<<<<<<<<<<< |
| 18737 | * |
| 18738 | * result.to_object_func = to_object_func |
| 18739 | */ |
| 18740 | __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1000; __pyx_clineno = __LINE__18740; goto __pyx_L1_error;} |
| 18741 | __Pyx_GOTREF(__pyx_t_2); |
| 18742 | __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1000; __pyx_clineno = __LINE__18742; goto __pyx_L1_error;} |
| 18743 | __Pyx_GOTREF(__pyx_t_3); |
| 18744 | __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; |
| 18745 | __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred ()), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1000; __pyx_clineno = __LINE__18745; goto __pyx_L1_error;} |
| 18746 | __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; |
| 18747 | __pyx_v_result->__pyx_base.view.len = __pyx_t_9; |
| 18748 | } |
| 18749 | |
| 18750 | /* "View.MemoryView":1002 |
| 18751 | * result.view.len *= length |
| 18752 | * |
| 18753 | * result.to_object_func = to_object_func # <<<<<<<<<<<<<< |
| 18754 | * result.to_dtype_func = to_dtype_func |
| 18755 | * |
| 18756 | */ |
| 18757 | __pyx_v_result->to_object_func = __pyx_v_to_object_func; |
| 18758 | |
| 18759 | /* "View.MemoryView":1003 |
| 18760 | * |
| 18761 | * result.to_object_func = to_object_func |
| 18762 | * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<< |
| 18763 | * |
| 18764 | * return result |
| 18765 | */ |
| 18766 | __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func; |
| 18767 | |
| 18768 | /* "View.MemoryView":1005 |
| 18769 | * result.to_dtype_func = to_dtype_func |
| 18770 | * |
| 18771 | * return result # <<<<<<<<<<<<<< |
| 18772 | * |
| 18773 | * @cname('__pyx_memoryview_get_slice_from_memoryview') |
| 18774 | */ |
| 18775 | __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); |
| 18776 | __Pyx_INCREF(((PyObject *)__pyx_v_result))( ((PyObject*)(((PyObject *)__pyx_v_result)))->ob_refcnt++ ); |
| 18777 | __pyx_r = ((PyObject *)__pyx_v_result); |
| 18778 | goto __pyx_L0; |
| 18779 | |
| 18780 | /* "View.MemoryView":958 |
| 18781 | * |
| 18782 | * @cname('__pyx_memoryview_fromslice') |
| 18783 | * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<< |
| 18784 | * int ndim, |
| 18785 | * object (*to_object_func)(char *), |
| 18786 | */ |
| 18787 | |
| 18788 | /* function exit code */ |
| 18789 | __pyx_L1_error:; |
| 18790 | __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); |
| 18791 | __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); |
| 18792 | __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 18793 | __pyx_r = 0; |
| 18794 | __pyx_L0:; |
| 18795 | __Pyx_XDECREF((PyObject *)__pyx_v_result)do { if (((PyObject *)__pyx_v_result) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_result )))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject *)__pyx_v_result)))); } while (0); } while (0); |
| 18796 | __Pyx_XDECREF(__pyx_v_length)do { if ((__pyx_v_length) == ((void*)0)) ; else do { if ( --( (PyObject*)(__pyx_v_length))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(__pyx_v_length)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_length)))); } while (0); } while (0); |
| 18797 | __Pyx_XGIVEREF(__pyx_r); |
| 18798 | __Pyx_RefNannyFinishContext(); |
| 18799 | return __pyx_r; |
| 18800 | } |
| 18801 | |
| 18802 | /* "View.MemoryView":1008 |
| 18803 | * |
| 18804 | * @cname('__pyx_memoryview_get_slice_from_memoryview') |
| 18805 | * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<< |
| 18806 | * __Pyx_memviewslice *mslice): |
| 18807 | * cdef _memoryviewslice obj |
| 18808 | */ |
| 18809 | |
| 18810 | static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) { |
| 18811 | struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0; |
| 18812 | __Pyx_memviewslice *__pyx_r; |
| 18813 | __Pyx_RefNannyDeclarations |
| 18814 | int __pyx_t_1; |
| 18815 | int __pyx_t_2; |
| 18816 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 18817 | int __pyx_lineno = 0; |
| 18818 | const char *__pyx_filename = NULL((void*)0); |
| 18819 | int __pyx_clineno = 0; |
| 18820 | __Pyx_RefNannySetupContext("get_slice_from_memview", 0); |
| 18821 | |
| 18822 | /* "View.MemoryView":1011 |
| 18823 | * __Pyx_memviewslice *mslice): |
| 18824 | * cdef _memoryviewslice obj |
| 18825 | * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< |
| 18826 | * obj = memview |
| 18827 | * return &obj.from_slice |
| 18828 | */ |
| 18829 | __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type)((((PyObject*)(((PyObject *)__pyx_v_memview)))->ob_type) == ((PyTypeObject *)__pyx_memoryviewslice_type) || PyType_IsSubtype ((((PyObject*)(((PyObject *)__pyx_v_memview)))->ob_type), ( (PyTypeObject *)__pyx_memoryviewslice_type))); |
| 18830 | __pyx_t_2 = (__pyx_t_1 != 0); |
| 18831 | if (__pyx_t_2) { |
| 18832 | |
| 18833 | /* "View.MemoryView":1012 |
| 18834 | * cdef _memoryviewslice obj |
| 18835 | * if isinstance(memview, _memoryviewslice): |
| 18836 | * obj = memview # <<<<<<<<<<<<<< |
| 18837 | * return &obj.from_slice |
| 18838 | * else: |
| 18839 | */ |
| 18840 | if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type)))__builtin_expect(!!(((((PyObject *)__pyx_v_memview)) == (& _Py_NoneStruct)) || __builtin_expect(!!(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type)), 1)), 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1012; __pyx_clineno = __LINE__18840; goto __pyx_L1_error;} |
| 18841 | __pyx_t_3 = ((PyObject *)__pyx_v_memview); |
| 18842 | __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); |
| 18843 | __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3); |
| 18844 | __pyx_t_3 = 0; |
| 18845 | |
| 18846 | /* "View.MemoryView":1013 |
| 18847 | * if isinstance(memview, _memoryviewslice): |
| 18848 | * obj = memview |
| 18849 | * return &obj.from_slice # <<<<<<<<<<<<<< |
| 18850 | * else: |
| 18851 | * slice_copy(memview, mslice) |
| 18852 | */ |
| 18853 | __pyx_r = (&__pyx_v_obj->from_slice); |
| 18854 | goto __pyx_L0; |
| 18855 | |
| 18856 | /* "View.MemoryView":1011 |
| 18857 | * __Pyx_memviewslice *mslice): |
| 18858 | * cdef _memoryviewslice obj |
| 18859 | * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< |
| 18860 | * obj = memview |
| 18861 | * return &obj.from_slice |
| 18862 | */ |
| 18863 | } |
| 18864 | |
| 18865 | /* "View.MemoryView":1015 |
| 18866 | * return &obj.from_slice |
| 18867 | * else: |
| 18868 | * slice_copy(memview, mslice) # <<<<<<<<<<<<<< |
| 18869 | * return mslice |
| 18870 | * |
| 18871 | */ |
| 18872 | /*else*/ { |
| 18873 | __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice); |
| 18874 | |
| 18875 | /* "View.MemoryView":1016 |
| 18876 | * else: |
| 18877 | * slice_copy(memview, mslice) |
| 18878 | * return mslice # <<<<<<<<<<<<<< |
| 18879 | * |
| 18880 | * @cname('__pyx_memoryview_slice_copy') |
| 18881 | */ |
| 18882 | __pyx_r = __pyx_v_mslice; |
| 18883 | goto __pyx_L0; |
| 18884 | } |
| 18885 | |
| 18886 | /* "View.MemoryView":1008 |
| 18887 | * |
| 18888 | * @cname('__pyx_memoryview_get_slice_from_memoryview') |
| 18889 | * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<< |
| 18890 | * __Pyx_memviewslice *mslice): |
| 18891 | * cdef _memoryviewslice obj |
| 18892 | */ |
| 18893 | |
| 18894 | /* function exit code */ |
| 18895 | __pyx_L1_error:; |
| 18896 | __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); |
| 18897 | __Pyx_WriteUnraisable("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); |
| 18898 | __pyx_r = 0; |
| 18899 | __pyx_L0:; |
| 18900 | __Pyx_XDECREF((PyObject *)__pyx_v_obj)do { if (((PyObject *)__pyx_v_obj) == ((void*)0)) ; else do { if ( --((PyObject*)((PyObject *)__pyx_v_obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_obj )))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject *)__pyx_v_obj)))); } while (0); } while (0); |
| 18901 | __Pyx_RefNannyFinishContext(); |
| 18902 | return __pyx_r; |
| 18903 | } |
| 18904 | |
| 18905 | /* "View.MemoryView":1019 |
| 18906 | * |
| 18907 | * @cname('__pyx_memoryview_slice_copy') |
| 18908 | * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<< |
| 18909 | * cdef int dim |
| 18910 | * cdef (Py_ssize_t*) shape, strides, suboffsets |
| 18911 | */ |
| 18912 | |
| 18913 | static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) { |
| 18914 | int __pyx_v_dim; |
| 18915 | Py_ssize_t *__pyx_v_shape; |
| 18916 | Py_ssize_t *__pyx_v_strides; |
| 18917 | Py_ssize_t *__pyx_v_suboffsets; |
| 18918 | __Pyx_RefNannyDeclarations |
| 18919 | Py_ssize_t *__pyx_t_1; |
| 18920 | int __pyx_t_2; |
| 18921 | int __pyx_t_3; |
| 18922 | Py_ssize_t __pyx_t_4; |
| 18923 | __Pyx_RefNannySetupContext("slice_copy", 0); |
| 18924 | |
| 18925 | /* "View.MemoryView":1023 |
| 18926 | * cdef (Py_ssize_t*) shape, strides, suboffsets |
| 18927 | * |
| 18928 | * shape = memview.view.shape # <<<<<<<<<<<<<< |
| 18929 | * strides = memview.view.strides |
| 18930 | * suboffsets = memview.view.suboffsets |
| 18931 | */ |
| 18932 | __pyx_t_1 = __pyx_v_memview->view.shape; |
| 18933 | __pyx_v_shape = __pyx_t_1; |
| 18934 | |
| 18935 | /* "View.MemoryView":1024 |
| 18936 | * |
| 18937 | * shape = memview.view.shape |
| 18938 | * strides = memview.view.strides # <<<<<<<<<<<<<< |
| 18939 | * suboffsets = memview.view.suboffsets |
| 18940 | * |
| 18941 | */ |
| 18942 | __pyx_t_1 = __pyx_v_memview->view.strides; |
| 18943 | __pyx_v_strides = __pyx_t_1; |
| 18944 | |
| 18945 | /* "View.MemoryView":1025 |
| 18946 | * shape = memview.view.shape |
| 18947 | * strides = memview.view.strides |
| 18948 | * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<< |
| 18949 | * |
| 18950 | * dst.memview = <__pyx_memoryview *> memview |
| 18951 | */ |
| 18952 | __pyx_t_1 = __pyx_v_memview->view.suboffsets; |
| 18953 | __pyx_v_suboffsets = __pyx_t_1; |
| 18954 | |
| 18955 | /* "View.MemoryView":1027 |
| 18956 | * suboffsets = memview.view.suboffsets |
| 18957 | * |
| 18958 | * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<< |
| 18959 | * dst.data = <char *> memview.view.buf |
| 18960 | * |
| 18961 | */ |
| 18962 | __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview); |
| 18963 | |
| 18964 | /* "View.MemoryView":1028 |
| 18965 | * |
| 18966 | * dst.memview = <__pyx_memoryview *> memview |
| 18967 | * dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<< |
| 18968 | * |
| 18969 | * for dim in range(memview.view.ndim): |
| 18970 | */ |
| 18971 | __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf); |
| 18972 | |
| 18973 | /* "View.MemoryView":1030 |
| 18974 | * dst.data = <char *> memview.view.buf |
| 18975 | * |
| 18976 | * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<< |
| 18977 | * dst.shape[dim] = shape[dim] |
| 18978 | * dst.strides[dim] = strides[dim] |
| 18979 | */ |
| 18980 | __pyx_t_2 = __pyx_v_memview->view.ndim; |
| 18981 | for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { |
| 18982 | __pyx_v_dim = __pyx_t_3; |
| 18983 | |
| 18984 | /* "View.MemoryView":1031 |
| 18985 | * |
| 18986 | * for dim in range(memview.view.ndim): |
| 18987 | * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<< |
| 18988 | * dst.strides[dim] = strides[dim] |
| 18989 | * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 |
| 18990 | */ |
| 18991 | (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]); |
| 18992 | |
| 18993 | /* "View.MemoryView":1032 |
| 18994 | * for dim in range(memview.view.ndim): |
| 18995 | * dst.shape[dim] = shape[dim] |
| 18996 | * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<< |
| 18997 | * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 |
| 18998 | * |
| 18999 | */ |
| 19000 | (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]); |
| 19001 | |
| 19002 | /* "View.MemoryView":1033 |
| 19003 | * dst.shape[dim] = shape[dim] |
| 19004 | * dst.strides[dim] = strides[dim] |
| 19005 | * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<< |
| 19006 | * |
| 19007 | * @cname('__pyx_memoryview_copy_object') |
| 19008 | */ |
| 19009 | if ((__pyx_v_suboffsets != 0)) { |
| 19010 | __pyx_t_4 = (__pyx_v_suboffsets[__pyx_v_dim]); |
| 19011 | } else { |
| 19012 | __pyx_t_4 = -1L; |
| 19013 | } |
| 19014 | (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_4; |
| 19015 | } |
| 19016 | |
| 19017 | /* "View.MemoryView":1019 |
| 19018 | * |
| 19019 | * @cname('__pyx_memoryview_slice_copy') |
| 19020 | * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<< |
| 19021 | * cdef int dim |
| 19022 | * cdef (Py_ssize_t*) shape, strides, suboffsets |
| 19023 | */ |
| 19024 | |
| 19025 | /* function exit code */ |
| 19026 | __Pyx_RefNannyFinishContext(); |
| 19027 | } |
| 19028 | |
| 19029 | /* "View.MemoryView":1036 |
| 19030 | * |
| 19031 | * @cname('__pyx_memoryview_copy_object') |
| 19032 | * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<< |
| 19033 | * "Create a new memoryview object" |
| 19034 | * cdef __Pyx_memviewslice memviewslice |
| 19035 | */ |
| 19036 | |
| 19037 | static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) { |
| 19038 | __Pyx_memviewslice __pyx_v_memviewslice; |
| 19039 | PyObject *__pyx_r = NULL((void*)0); |
| 19040 | __Pyx_RefNannyDeclarations |
| 19041 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 19042 | int __pyx_lineno = 0; |
| 19043 | const char *__pyx_filename = NULL((void*)0); |
| 19044 | int __pyx_clineno = 0; |
| 19045 | __Pyx_RefNannySetupContext("memoryview_copy", 0); |
| 19046 | |
| 19047 | /* "View.MemoryView":1039 |
| 19048 | * "Create a new memoryview object" |
| 19049 | * cdef __Pyx_memviewslice memviewslice |
| 19050 | * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<< |
| 19051 | * return memoryview_copy_from_slice(memview, &memviewslice) |
| 19052 | * |
| 19053 | */ |
| 19054 | __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice)); |
| 19055 | |
| 19056 | /* "View.MemoryView":1040 |
| 19057 | * cdef __Pyx_memviewslice memviewslice |
| 19058 | * slice_copy(memview, &memviewslice) |
| 19059 | * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<< |
| 19060 | * |
| 19061 | * @cname('__pyx_memoryview_copy_object_from_slice') |
| 19062 | */ |
| 19063 | __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); |
| 19064 | __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__19064; goto __pyx_L1_error;} |
| 19065 | __Pyx_GOTREF(__pyx_t_1); |
| 19066 | __pyx_r = __pyx_t_1; |
| 19067 | __pyx_t_1 = 0; |
| 19068 | goto __pyx_L0; |
| 19069 | |
| 19070 | /* "View.MemoryView":1036 |
| 19071 | * |
| 19072 | * @cname('__pyx_memoryview_copy_object') |
| 19073 | * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<< |
| 19074 | * "Create a new memoryview object" |
| 19075 | * cdef __Pyx_memviewslice memviewslice |
| 19076 | */ |
| 19077 | |
| 19078 | /* function exit code */ |
| 19079 | __pyx_L1_error:; |
| 19080 | __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); |
| 19081 | __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 19082 | __pyx_r = 0; |
| 19083 | __pyx_L0:; |
| 19084 | __Pyx_XGIVEREF(__pyx_r); |
| 19085 | __Pyx_RefNannyFinishContext(); |
| 19086 | return __pyx_r; |
| 19087 | } |
| 19088 | |
| 19089 | /* "View.MemoryView":1043 |
| 19090 | * |
| 19091 | * @cname('__pyx_memoryview_copy_object_from_slice') |
| 19092 | * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<< |
| 19093 | * """ |
| 19094 | * Create a new memoryview object from a given memoryview object and slice. |
| 19095 | */ |
| 19096 | |
| 19097 | static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) { |
| 19098 | PyObject *(*__pyx_v_to_object_func)(char *); |
| 19099 | int (*__pyx_v_to_dtype_func)(char *, PyObject *); |
| 19100 | PyObject *__pyx_r = NULL((void*)0); |
| 19101 | __Pyx_RefNannyDeclarations |
| 19102 | int __pyx_t_1; |
| 19103 | int __pyx_t_2; |
| 19104 | PyObject *(*__pyx_t_3)(char *); |
| 19105 | int (*__pyx_t_4)(char *, PyObject *); |
| 19106 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 19107 | int __pyx_lineno = 0; |
| 19108 | const char *__pyx_filename = NULL((void*)0); |
| 19109 | int __pyx_clineno = 0; |
| 19110 | __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0); |
| 19111 | |
| 19112 | /* "View.MemoryView":1050 |
| 19113 | * cdef int (*to_dtype_func)(char *, object) except 0 |
| 19114 | * |
| 19115 | * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< |
| 19116 | * to_object_func = (<_memoryviewslice> memview).to_object_func |
| 19117 | * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func |
| 19118 | */ |
| 19119 | __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type)((((PyObject*)(((PyObject *)__pyx_v_memview)))->ob_type) == ((PyTypeObject *)__pyx_memoryviewslice_type) || PyType_IsSubtype ((((PyObject*)(((PyObject *)__pyx_v_memview)))->ob_type), ( (PyTypeObject *)__pyx_memoryviewslice_type))); |
| 19120 | __pyx_t_2 = (__pyx_t_1 != 0); |
| 19121 | if (__pyx_t_2) { |
| 19122 | |
| 19123 | /* "View.MemoryView":1051 |
| 19124 | * |
| 19125 | * if isinstance(memview, _memoryviewslice): |
| 19126 | * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<< |
| 19127 | * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func |
| 19128 | * else: |
| 19129 | */ |
| 19130 | __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func; |
| 19131 | __pyx_v_to_object_func = __pyx_t_3; |
| 19132 | |
| 19133 | /* "View.MemoryView":1052 |
| 19134 | * if isinstance(memview, _memoryviewslice): |
| 19135 | * to_object_func = (<_memoryviewslice> memview).to_object_func |
| 19136 | * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<< |
| 19137 | * else: |
| 19138 | * to_object_func = NULL |
| 19139 | */ |
| 19140 | __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func; |
| 19141 | __pyx_v_to_dtype_func = __pyx_t_4; |
| 19142 | |
| 19143 | /* "View.MemoryView":1050 |
| 19144 | * cdef int (*to_dtype_func)(char *, object) except 0 |
| 19145 | * |
| 19146 | * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< |
| 19147 | * to_object_func = (<_memoryviewslice> memview).to_object_func |
| 19148 | * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func |
| 19149 | */ |
| 19150 | goto __pyx_L3; |
| 19151 | } |
| 19152 | |
| 19153 | /* "View.MemoryView":1054 |
| 19154 | * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func |
| 19155 | * else: |
| 19156 | * to_object_func = NULL # <<<<<<<<<<<<<< |
| 19157 | * to_dtype_func = NULL |
| 19158 | * |
| 19159 | */ |
| 19160 | /*else*/ { |
| 19161 | __pyx_v_to_object_func = NULL((void*)0); |
| 19162 | |
| 19163 | /* "View.MemoryView":1055 |
| 19164 | * else: |
| 19165 | * to_object_func = NULL |
| 19166 | * to_dtype_func = NULL # <<<<<<<<<<<<<< |
| 19167 | * |
| 19168 | * return memoryview_fromslice(memviewslice[0], memview.view.ndim, |
| 19169 | */ |
| 19170 | __pyx_v_to_dtype_func = NULL((void*)0); |
| 19171 | } |
| 19172 | __pyx_L3:; |
| 19173 | |
| 19174 | /* "View.MemoryView":1057 |
| 19175 | * to_dtype_func = NULL |
| 19176 | * |
| 19177 | * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<< |
| 19178 | * to_object_func, to_dtype_func, |
| 19179 | * memview.dtype_is_object) |
| 19180 | */ |
| 19181 | __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); |
| 19182 | |
| 19183 | /* "View.MemoryView":1059 |
| 19184 | * return memoryview_fromslice(memviewslice[0], memview.view.ndim, |
| 19185 | * to_object_func, to_dtype_func, |
| 19186 | * memview.dtype_is_object) # <<<<<<<<<<<<<< |
| 19187 | * |
| 19188 | * |
| 19189 | */ |
| 19190 | __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1057; __pyx_clineno = __LINE__19190; goto __pyx_L1_error;} |
| 19191 | __Pyx_GOTREF(__pyx_t_5); |
| 19192 | __pyx_r = __pyx_t_5; |
| 19193 | __pyx_t_5 = 0; |
| 19194 | goto __pyx_L0; |
| 19195 | |
| 19196 | /* "View.MemoryView":1043 |
| 19197 | * |
| 19198 | * @cname('__pyx_memoryview_copy_object_from_slice') |
| 19199 | * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<< |
| 19200 | * """ |
| 19201 | * Create a new memoryview object from a given memoryview object and slice. |
| 19202 | */ |
| 19203 | |
| 19204 | /* function exit code */ |
| 19205 | __pyx_L1_error:; |
| 19206 | __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); |
| 19207 | __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 19208 | __pyx_r = 0; |
| 19209 | __pyx_L0:; |
| 19210 | __Pyx_XGIVEREF(__pyx_r); |
| 19211 | __Pyx_RefNannyFinishContext(); |
| 19212 | return __pyx_r; |
| 19213 | } |
| 19214 | |
| 19215 | /* "View.MemoryView":1065 |
| 19216 | * |
| 19217 | * |
| 19218 | * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<< |
| 19219 | * if arg < 0: |
| 19220 | * return -arg |
| 19221 | */ |
| 19222 | |
| 19223 | static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) { |
| 19224 | Py_ssize_t __pyx_r; |
| 19225 | int __pyx_t_1; |
| 19226 | |
| 19227 | /* "View.MemoryView":1066 |
| 19228 | * |
| 19229 | * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: |
| 19230 | * if arg < 0: # <<<<<<<<<<<<<< |
| 19231 | * return -arg |
| 19232 | * else: |
| 19233 | */ |
| 19234 | __pyx_t_1 = ((__pyx_v_arg < 0) != 0); |
| 19235 | if (__pyx_t_1) { |
| 19236 | |
| 19237 | /* "View.MemoryView":1067 |
| 19238 | * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: |
| 19239 | * if arg < 0: |
| 19240 | * return -arg # <<<<<<<<<<<<<< |
| 19241 | * else: |
| 19242 | * return arg |
| 19243 | */ |
| 19244 | __pyx_r = (-__pyx_v_arg); |
| 19245 | goto __pyx_L0; |
| 19246 | |
| 19247 | /* "View.MemoryView":1066 |
| 19248 | * |
| 19249 | * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: |
| 19250 | * if arg < 0: # <<<<<<<<<<<<<< |
| 19251 | * return -arg |
| 19252 | * else: |
| 19253 | */ |
| 19254 | } |
| 19255 | |
| 19256 | /* "View.MemoryView":1069 |
| 19257 | * return -arg |
| 19258 | * else: |
| 19259 | * return arg # <<<<<<<<<<<<<< |
| 19260 | * |
| 19261 | * @cname('__pyx_get_best_slice_order') |
| 19262 | */ |
| 19263 | /*else*/ { |
| 19264 | __pyx_r = __pyx_v_arg; |
| 19265 | goto __pyx_L0; |
| 19266 | } |
| 19267 | |
| 19268 | /* "View.MemoryView":1065 |
| 19269 | * |
| 19270 | * |
| 19271 | * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<< |
| 19272 | * if arg < 0: |
| 19273 | * return -arg |
| 19274 | */ |
| 19275 | |
| 19276 | /* function exit code */ |
| 19277 | __pyx_L0:; |
| 19278 | return __pyx_r; |
| 19279 | } |
| 19280 | |
| 19281 | /* "View.MemoryView":1072 |
| 19282 | * |
| 19283 | * @cname('__pyx_get_best_slice_order') |
| 19284 | * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<< |
| 19285 | * """ |
| 19286 | * Figure out the best memory access order for a given slice. |
| 19287 | */ |
| 19288 | |
| 19289 | static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) { |
| 19290 | int __pyx_v_i; |
| 19291 | Py_ssize_t __pyx_v_c_stride; |
| 19292 | Py_ssize_t __pyx_v_f_stride; |
| 19293 | char __pyx_r; |
| 19294 | int __pyx_t_1; |
| 19295 | int __pyx_t_2; |
| 19296 | int __pyx_t_3; |
| 19297 | |
| 19298 | /* "View.MemoryView":1077 |
| 19299 | * """ |
| 19300 | * cdef int i |
| 19301 | * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<< |
| 19302 | * cdef Py_ssize_t f_stride = 0 |
| 19303 | * |
| 19304 | */ |
| 19305 | __pyx_v_c_stride = 0; |
| 19306 | |
| 19307 | /* "View.MemoryView":1078 |
| 19308 | * cdef int i |
| 19309 | * cdef Py_ssize_t c_stride = 0 |
| 19310 | * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<< |
| 19311 | * |
| 19312 | * for i in range(ndim - 1, -1, -1): |
| 19313 | */ |
| 19314 | __pyx_v_f_stride = 0; |
| 19315 | |
| 19316 | /* "View.MemoryView":1080 |
| 19317 | * cdef Py_ssize_t f_stride = 0 |
| 19318 | * |
| 19319 | * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< |
| 19320 | * if mslice.shape[i] > 1: |
| 19321 | * c_stride = mslice.strides[i] |
| 19322 | */ |
| 19323 | for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1L; __pyx_t_1-=1) { |
| 19324 | __pyx_v_i = __pyx_t_1; |
| 19325 | |
| 19326 | /* "View.MemoryView":1081 |
| 19327 | * |
| 19328 | * for i in range(ndim - 1, -1, -1): |
| 19329 | * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< |
| 19330 | * c_stride = mslice.strides[i] |
| 19331 | * break |
| 19332 | */ |
| 19333 | __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0); |
| 19334 | if (__pyx_t_2) { |
| 19335 | |
| 19336 | /* "View.MemoryView":1082 |
| 19337 | * for i in range(ndim - 1, -1, -1): |
| 19338 | * if mslice.shape[i] > 1: |
| 19339 | * c_stride = mslice.strides[i] # <<<<<<<<<<<<<< |
| 19340 | * break |
| 19341 | * |
| 19342 | */ |
| 19343 | __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]); |
| 19344 | |
| 19345 | /* "View.MemoryView":1083 |
| 19346 | * if mslice.shape[i] > 1: |
| 19347 | * c_stride = mslice.strides[i] |
| 19348 | * break # <<<<<<<<<<<<<< |
| 19349 | * |
| 19350 | * for i in range(ndim): |
| 19351 | */ |
| 19352 | goto __pyx_L4_break; |
| 19353 | |
| 19354 | /* "View.MemoryView":1081 |
| 19355 | * |
| 19356 | * for i in range(ndim - 1, -1, -1): |
| 19357 | * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< |
| 19358 | * c_stride = mslice.strides[i] |
| 19359 | * break |
| 19360 | */ |
| 19361 | } |
| 19362 | } |
| 19363 | __pyx_L4_break:; |
| 19364 | |
| 19365 | /* "View.MemoryView":1085 |
| 19366 | * break |
| 19367 | * |
| 19368 | * for i in range(ndim): # <<<<<<<<<<<<<< |
| 19369 | * if mslice.shape[i] > 1: |
| 19370 | * f_stride = mslice.strides[i] |
| 19371 | */ |
| 19372 | __pyx_t_1 = __pyx_v_ndim; |
| 19373 | for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { |
| 19374 | __pyx_v_i = __pyx_t_3; |
| 19375 | |
| 19376 | /* "View.MemoryView":1086 |
| 19377 | * |
| 19378 | * for i in range(ndim): |
| 19379 | * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< |
| 19380 | * f_stride = mslice.strides[i] |
| 19381 | * break |
| 19382 | */ |
| 19383 | __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0); |
| 19384 | if (__pyx_t_2) { |
| 19385 | |
| 19386 | /* "View.MemoryView":1087 |
| 19387 | * for i in range(ndim): |
| 19388 | * if mslice.shape[i] > 1: |
| 19389 | * f_stride = mslice.strides[i] # <<<<<<<<<<<<<< |
| 19390 | * break |
| 19391 | * |
| 19392 | */ |
| 19393 | __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]); |
| 19394 | |
| 19395 | /* "View.MemoryView":1088 |
| 19396 | * if mslice.shape[i] > 1: |
| 19397 | * f_stride = mslice.strides[i] |
| 19398 | * break # <<<<<<<<<<<<<< |
| 19399 | * |
| 19400 | * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): |
| 19401 | */ |
| 19402 | goto __pyx_L7_break; |
| 19403 | |
| 19404 | /* "View.MemoryView":1086 |
| 19405 | * |
| 19406 | * for i in range(ndim): |
| 19407 | * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< |
| 19408 | * f_stride = mslice.strides[i] |
| 19409 | * break |
| 19410 | */ |
| 19411 | } |
| 19412 | } |
| 19413 | __pyx_L7_break:; |
| 19414 | |
| 19415 | /* "View.MemoryView":1090 |
| 19416 | * break |
| 19417 | * |
| 19418 | * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< |
| 19419 | * return 'C' |
| 19420 | * else: |
| 19421 | */ |
| 19422 | __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0); |
| 19423 | if (__pyx_t_2) { |
| 19424 | |
| 19425 | /* "View.MemoryView":1091 |
| 19426 | * |
| 19427 | * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): |
| 19428 | * return 'C' # <<<<<<<<<<<<<< |
| 19429 | * else: |
| 19430 | * return 'F' |
| 19431 | */ |
| 19432 | __pyx_r = 'C'; |
| 19433 | goto __pyx_L0; |
| 19434 | |
| 19435 | /* "View.MemoryView":1090 |
| 19436 | * break |
| 19437 | * |
| 19438 | * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< |
| 19439 | * return 'C' |
| 19440 | * else: |
| 19441 | */ |
| 19442 | } |
| 19443 | |
| 19444 | /* "View.MemoryView":1093 |
| 19445 | * return 'C' |
| 19446 | * else: |
| 19447 | * return 'F' # <<<<<<<<<<<<<< |
| 19448 | * |
| 19449 | * @cython.cdivision(True) |
| 19450 | */ |
| 19451 | /*else*/ { |
| 19452 | __pyx_r = 'F'; |
| 19453 | goto __pyx_L0; |
| 19454 | } |
| 19455 | |
| 19456 | /* "View.MemoryView":1072 |
| 19457 | * |
| 19458 | * @cname('__pyx_get_best_slice_order') |
| 19459 | * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<< |
| 19460 | * """ |
| 19461 | * Figure out the best memory access order for a given slice. |
| 19462 | */ |
| 19463 | |
| 19464 | /* function exit code */ |
| 19465 | __pyx_L0:; |
| 19466 | return __pyx_r; |
| 19467 | } |
| 19468 | |
| 19469 | /* "View.MemoryView":1096 |
| 19470 | * |
| 19471 | * @cython.cdivision(True) |
| 19472 | * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<< |
| 19473 | * char *dst_data, Py_ssize_t *dst_strides, |
| 19474 | * Py_ssize_t *src_shape, Py_ssize_t *dst_shape, |
| 19475 | */ |
| 19476 | |
| 19477 | static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) { |
| 19478 | CYTHON_UNUSED__attribute__ ((__unused__)) Py_ssize_t __pyx_v_i; |
| 19479 | CYTHON_UNUSED__attribute__ ((__unused__)) Py_ssize_t __pyx_v_src_extent; |
| 19480 | Py_ssize_t __pyx_v_dst_extent; |
| 19481 | Py_ssize_t __pyx_v_src_stride; |
| 19482 | Py_ssize_t __pyx_v_dst_stride; |
| 19483 | int __pyx_t_1; |
| 19484 | int __pyx_t_2; |
| 19485 | int __pyx_t_3; |
| 19486 | Py_ssize_t __pyx_t_4; |
| 19487 | Py_ssize_t __pyx_t_5; |
| 19488 | |
| 19489 | /* "View.MemoryView":1103 |
| 19490 | * |
| 19491 | * cdef Py_ssize_t i |
| 19492 | * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<< |
| 19493 | * cdef Py_ssize_t dst_extent = dst_shape[0] |
| 19494 | * cdef Py_ssize_t src_stride = src_strides[0] |
| 19495 | */ |
| 19496 | __pyx_v_src_extent = (__pyx_v_src_shape[0]); |
| 19497 | |
| 19498 | /* "View.MemoryView":1104 |
| 19499 | * cdef Py_ssize_t i |
| 19500 | * cdef Py_ssize_t src_extent = src_shape[0] |
| 19501 | * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<< |
| 19502 | * cdef Py_ssize_t src_stride = src_strides[0] |
| 19503 | * cdef Py_ssize_t dst_stride = dst_strides[0] |
| 19504 | */ |
| 19505 | __pyx_v_dst_extent = (__pyx_v_dst_shape[0]); |
| 19506 | |
| 19507 | /* "View.MemoryView":1105 |
| 19508 | * cdef Py_ssize_t src_extent = src_shape[0] |
| 19509 | * cdef Py_ssize_t dst_extent = dst_shape[0] |
| 19510 | * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<< |
| 19511 | * cdef Py_ssize_t dst_stride = dst_strides[0] |
| 19512 | * |
| 19513 | */ |
| 19514 | __pyx_v_src_stride = (__pyx_v_src_strides[0]); |
| 19515 | |
| 19516 | /* "View.MemoryView":1106 |
| 19517 | * cdef Py_ssize_t dst_extent = dst_shape[0] |
| 19518 | * cdef Py_ssize_t src_stride = src_strides[0] |
| 19519 | * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<< |
| 19520 | * |
| 19521 | * if ndim == 1: |
| 19522 | */ |
| 19523 | __pyx_v_dst_stride = (__pyx_v_dst_strides[0]); |
| 19524 | |
| 19525 | /* "View.MemoryView":1108 |
| 19526 | * cdef Py_ssize_t dst_stride = dst_strides[0] |
| 19527 | * |
| 19528 | * if ndim == 1: # <<<<<<<<<<<<<< |
| 19529 | * if (src_stride > 0 and dst_stride > 0 and |
| 19530 | * <size_t> src_stride == itemsize == <size_t> dst_stride): |
| 19531 | */ |
| 19532 | __pyx_t_1 = ((__pyx_v_ndim == 1) != 0); |
| 19533 | if (__pyx_t_1) { |
| 19534 | |
| 19535 | /* "View.MemoryView":1109 |
| 19536 | * |
| 19537 | * if ndim == 1: |
| 19538 | * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< |
| 19539 | * <size_t> src_stride == itemsize == <size_t> dst_stride): |
| 19540 | * memcpy(dst_data, src_data, itemsize * dst_extent) |
| 19541 | */ |
| 19542 | __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0); |
| 19543 | if (__pyx_t_2) { |
| 19544 | } else { |
| 19545 | __pyx_t_1 = __pyx_t_2; |
| 19546 | goto __pyx_L5_bool_binop_done; |
| 19547 | } |
| 19548 | __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0); |
| 19549 | if (__pyx_t_2) { |
| 19550 | } else { |
| 19551 | __pyx_t_1 = __pyx_t_2; |
| 19552 | goto __pyx_L5_bool_binop_done; |
| 19553 | } |
| 19554 | |
| 19555 | /* "View.MemoryView":1110 |
| 19556 | * if ndim == 1: |
| 19557 | * if (src_stride > 0 and dst_stride > 0 and |
| 19558 | * <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<< |
| 19559 | * memcpy(dst_data, src_data, itemsize * dst_extent) |
| 19560 | * else: |
| 19561 | */ |
| 19562 | __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize); |
| 19563 | if (__pyx_t_2) { |
| 19564 | __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride)); |
| 19565 | } |
| 19566 | __pyx_t_3 = (__pyx_t_2 != 0); |
| 19567 | __pyx_t_1 = __pyx_t_3; |
| 19568 | __pyx_L5_bool_binop_done:; |
| 19569 | |
| 19570 | /* "View.MemoryView":1109 |
| 19571 | * |
| 19572 | * if ndim == 1: |
| 19573 | * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< |
| 19574 | * <size_t> src_stride == itemsize == <size_t> dst_stride): |
| 19575 | * memcpy(dst_data, src_data, itemsize * dst_extent) |
| 19576 | */ |
| 19577 | if (__pyx_t_1) { |
| 19578 | |
| 19579 | /* "View.MemoryView":1111 |
| 19580 | * if (src_stride > 0 and dst_stride > 0 and |
| 19581 | * <size_t> src_stride == itemsize == <size_t> dst_stride): |
| 19582 | * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<< |
| 19583 | * else: |
| 19584 | * for i in range(dst_extent): |
| 19585 | */ |
| 19586 | memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)); |
| 19587 | |
| 19588 | /* "View.MemoryView":1109 |
| 19589 | * |
| 19590 | * if ndim == 1: |
| 19591 | * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< |
| 19592 | * <size_t> src_stride == itemsize == <size_t> dst_stride): |
| 19593 | * memcpy(dst_data, src_data, itemsize * dst_extent) |
| 19594 | */ |
| 19595 | goto __pyx_L4; |
| 19596 | } |
| 19597 | |
| 19598 | /* "View.MemoryView":1113 |
| 19599 | * memcpy(dst_data, src_data, itemsize * dst_extent) |
| 19600 | * else: |
| 19601 | * for i in range(dst_extent): # <<<<<<<<<<<<<< |
| 19602 | * memcpy(dst_data, src_data, itemsize) |
| 19603 | * src_data += src_stride |
| 19604 | */ |
| 19605 | /*else*/ { |
| 19606 | __pyx_t_4 = __pyx_v_dst_extent; |
| 19607 | for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { |
| 19608 | __pyx_v_i = __pyx_t_5; |
| 19609 | |
| 19610 | /* "View.MemoryView":1114 |
| 19611 | * else: |
| 19612 | * for i in range(dst_extent): |
| 19613 | * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<< |
| 19614 | * src_data += src_stride |
| 19615 | * dst_data += dst_stride |
| 19616 | */ |
| 19617 | memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize); |
| 19618 | |
| 19619 | /* "View.MemoryView":1115 |
| 19620 | * for i in range(dst_extent): |
| 19621 | * memcpy(dst_data, src_data, itemsize) |
| 19622 | * src_data += src_stride # <<<<<<<<<<<<<< |
| 19623 | * dst_data += dst_stride |
| 19624 | * else: |
| 19625 | */ |
| 19626 | __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); |
| 19627 | |
| 19628 | /* "View.MemoryView":1116 |
| 19629 | * memcpy(dst_data, src_data, itemsize) |
| 19630 | * src_data += src_stride |
| 19631 | * dst_data += dst_stride # <<<<<<<<<<<<<< |
| 19632 | * else: |
| 19633 | * for i in range(dst_extent): |
| 19634 | */ |
| 19635 | __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); |
| 19636 | } |
| 19637 | } |
| 19638 | __pyx_L4:; |
| 19639 | |
| 19640 | /* "View.MemoryView":1108 |
| 19641 | * cdef Py_ssize_t dst_stride = dst_strides[0] |
| 19642 | * |
| 19643 | * if ndim == 1: # <<<<<<<<<<<<<< |
| 19644 | * if (src_stride > 0 and dst_stride > 0 and |
| 19645 | * <size_t> src_stride == itemsize == <size_t> dst_stride): |
| 19646 | */ |
| 19647 | goto __pyx_L3; |
| 19648 | } |
| 19649 | |
| 19650 | /* "View.MemoryView":1118 |
| 19651 | * dst_data += dst_stride |
| 19652 | * else: |
| 19653 | * for i in range(dst_extent): # <<<<<<<<<<<<<< |
| 19654 | * _copy_strided_to_strided(src_data, src_strides + 1, |
| 19655 | * dst_data, dst_strides + 1, |
| 19656 | */ |
| 19657 | /*else*/ { |
| 19658 | __pyx_t_4 = __pyx_v_dst_extent; |
| 19659 | for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { |
| 19660 | __pyx_v_i = __pyx_t_5; |
| 19661 | |
| 19662 | /* "View.MemoryView":1119 |
| 19663 | * else: |
| 19664 | * for i in range(dst_extent): |
| 19665 | * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<< |
| 19666 | * dst_data, dst_strides + 1, |
| 19667 | * src_shape + 1, dst_shape + 1, |
| 19668 | */ |
| 19669 | _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize); |
| 19670 | |
| 19671 | /* "View.MemoryView":1123 |
| 19672 | * src_shape + 1, dst_shape + 1, |
| 19673 | * ndim - 1, itemsize) |
| 19674 | * src_data += src_stride # <<<<<<<<<<<<<< |
| 19675 | * dst_data += dst_stride |
| 19676 | * |
| 19677 | */ |
| 19678 | __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); |
| 19679 | |
| 19680 | /* "View.MemoryView":1124 |
| 19681 | * ndim - 1, itemsize) |
| 19682 | * src_data += src_stride |
| 19683 | * dst_data += dst_stride # <<<<<<<<<<<<<< |
| 19684 | * |
| 19685 | * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, |
| 19686 | */ |
| 19687 | __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); |
| 19688 | } |
| 19689 | } |
| 19690 | __pyx_L3:; |
| 19691 | |
| 19692 | /* "View.MemoryView":1096 |
| 19693 | * |
| 19694 | * @cython.cdivision(True) |
| 19695 | * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<< |
| 19696 | * char *dst_data, Py_ssize_t *dst_strides, |
| 19697 | * Py_ssize_t *src_shape, Py_ssize_t *dst_shape, |
| 19698 | */ |
| 19699 | |
| 19700 | /* function exit code */ |
| 19701 | } |
| 19702 | |
| 19703 | /* "View.MemoryView":1126 |
| 19704 | * dst_data += dst_stride |
| 19705 | * |
| 19706 | * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< |
| 19707 | * __Pyx_memviewslice *dst, |
| 19708 | * int ndim, size_t itemsize) nogil: |
| 19709 | */ |
| 19710 | |
| 19711 | static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) { |
| 19712 | |
| 19713 | /* "View.MemoryView":1129 |
| 19714 | * __Pyx_memviewslice *dst, |
| 19715 | * int ndim, size_t itemsize) nogil: |
| 19716 | * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<< |
| 19717 | * src.shape, dst.shape, ndim, itemsize) |
| 19718 | * |
| 19719 | */ |
| 19720 | _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize); |
| 19721 | |
| 19722 | /* "View.MemoryView":1126 |
| 19723 | * dst_data += dst_stride |
| 19724 | * |
| 19725 | * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< |
| 19726 | * __Pyx_memviewslice *dst, |
| 19727 | * int ndim, size_t itemsize) nogil: |
| 19728 | */ |
| 19729 | |
| 19730 | /* function exit code */ |
| 19731 | } |
| 19732 | |
| 19733 | /* "View.MemoryView":1133 |
| 19734 | * |
| 19735 | * @cname('__pyx_memoryview_slice_get_size') |
| 19736 | * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<< |
| 19737 | * "Return the size of the memory occupied by the slice in number of bytes" |
| 19738 | * cdef int i |
| 19739 | */ |
| 19740 | |
| 19741 | static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) { |
| 19742 | int __pyx_v_i; |
| 19743 | Py_ssize_t __pyx_v_size; |
| 19744 | Py_ssize_t __pyx_r; |
| 19745 | Py_ssize_t __pyx_t_1; |
| 19746 | int __pyx_t_2; |
| 19747 | int __pyx_t_3; |
| 19748 | |
| 19749 | /* "View.MemoryView":1136 |
| 19750 | * "Return the size of the memory occupied by the slice in number of bytes" |
| 19751 | * cdef int i |
| 19752 | * cdef Py_ssize_t size = src.memview.view.itemsize # <<<<<<<<<<<<<< |
| 19753 | * |
| 19754 | * for i in range(ndim): |
| 19755 | */ |
| 19756 | __pyx_t_1 = __pyx_v_src->memview->view.itemsize; |
| 19757 | __pyx_v_size = __pyx_t_1; |
| 19758 | |
| 19759 | /* "View.MemoryView":1138 |
| 19760 | * cdef Py_ssize_t size = src.memview.view.itemsize |
| 19761 | * |
| 19762 | * for i in range(ndim): # <<<<<<<<<<<<<< |
| 19763 | * size *= src.shape[i] |
| 19764 | * |
| 19765 | */ |
| 19766 | __pyx_t_2 = __pyx_v_ndim; |
| 19767 | for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { |
| 19768 | __pyx_v_i = __pyx_t_3; |
| 19769 | |
| 19770 | /* "View.MemoryView":1139 |
| 19771 | * |
| 19772 | * for i in range(ndim): |
| 19773 | * size *= src.shape[i] # <<<<<<<<<<<<<< |
| 19774 | * |
| 19775 | * return size |
| 19776 | */ |
| 19777 | __pyx_v_size = (__pyx_v_size * (__pyx_v_src->shape[__pyx_v_i])); |
| 19778 | } |
| 19779 | |
| 19780 | /* "View.MemoryView":1141 |
| 19781 | * size *= src.shape[i] |
| 19782 | * |
| 19783 | * return size # <<<<<<<<<<<<<< |
| 19784 | * |
| 19785 | * @cname('__pyx_fill_contig_strides_array') |
| 19786 | */ |
| 19787 | __pyx_r = __pyx_v_size; |
| 19788 | goto __pyx_L0; |
| 19789 | |
| 19790 | /* "View.MemoryView":1133 |
| 19791 | * |
| 19792 | * @cname('__pyx_memoryview_slice_get_size') |
| 19793 | * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<< |
| 19794 | * "Return the size of the memory occupied by the slice in number of bytes" |
| 19795 | * cdef int i |
| 19796 | */ |
| 19797 | |
| 19798 | /* function exit code */ |
| 19799 | __pyx_L0:; |
| 19800 | return __pyx_r; |
| 19801 | } |
| 19802 | |
| 19803 | /* "View.MemoryView":1144 |
| 19804 | * |
| 19805 | * @cname('__pyx_fill_contig_strides_array') |
| 19806 | * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<< |
| 19807 | * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, |
| 19808 | * int ndim, char order) nogil: |
| 19809 | */ |
| 19810 | |
| 19811 | static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) { |
| 19812 | int __pyx_v_idx; |
| 19813 | Py_ssize_t __pyx_r; |
| 19814 | int __pyx_t_1; |
| 19815 | int __pyx_t_2; |
| 19816 | int __pyx_t_3; |
| 19817 | |
| 19818 | /* "View.MemoryView":1153 |
| 19819 | * cdef int idx |
| 19820 | * |
| 19821 | * if order == 'F': # <<<<<<<<<<<<<< |
| 19822 | * for idx in range(ndim): |
| 19823 | * strides[idx] = stride |
| 19824 | */ |
| 19825 | __pyx_t_1 = ((__pyx_v_order == 'F') != 0); |
| 19826 | if (__pyx_t_1) { |
| 19827 | |
| 19828 | /* "View.MemoryView":1154 |
| 19829 | * |
| 19830 | * if order == 'F': |
| 19831 | * for idx in range(ndim): # <<<<<<<<<<<<<< |
| 19832 | * strides[idx] = stride |
| 19833 | * stride = stride * shape[idx] |
| 19834 | */ |
| 19835 | __pyx_t_2 = __pyx_v_ndim; |
| 19836 | for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { |
| 19837 | __pyx_v_idx = __pyx_t_3; |
| 19838 | |
| 19839 | /* "View.MemoryView":1155 |
| 19840 | * if order == 'F': |
| 19841 | * for idx in range(ndim): |
| 19842 | * strides[idx] = stride # <<<<<<<<<<<<<< |
| 19843 | * stride = stride * shape[idx] |
| 19844 | * else: |
| 19845 | */ |
| 19846 | (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; |
| 19847 | |
| 19848 | /* "View.MemoryView":1156 |
| 19849 | * for idx in range(ndim): |
| 19850 | * strides[idx] = stride |
| 19851 | * stride = stride * shape[idx] # <<<<<<<<<<<<<< |
| 19852 | * else: |
| 19853 | * for idx in range(ndim - 1, -1, -1): |
| 19854 | */ |
| 19855 | __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); |
| 19856 | } |
| 19857 | |
| 19858 | /* "View.MemoryView":1153 |
| 19859 | * cdef int idx |
| 19860 | * |
| 19861 | * if order == 'F': # <<<<<<<<<<<<<< |
| 19862 | * for idx in range(ndim): |
| 19863 | * strides[idx] = stride |
| 19864 | */ |
| 19865 | goto __pyx_L3; |
| 19866 | } |
| 19867 | |
| 19868 | /* "View.MemoryView":1158 |
| 19869 | * stride = stride * shape[idx] |
| 19870 | * else: |
| 19871 | * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< |
| 19872 | * strides[idx] = stride |
| 19873 | * stride = stride * shape[idx] |
| 19874 | */ |
| 19875 | /*else*/ { |
| 19876 | for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1L; __pyx_t_2-=1) { |
| 19877 | __pyx_v_idx = __pyx_t_2; |
| 19878 | |
| 19879 | /* "View.MemoryView":1159 |
| 19880 | * else: |
| 19881 | * for idx in range(ndim - 1, -1, -1): |
| 19882 | * strides[idx] = stride # <<<<<<<<<<<<<< |
| 19883 | * stride = stride * shape[idx] |
| 19884 | * |
| 19885 | */ |
| 19886 | (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; |
| 19887 | |
| 19888 | /* "View.MemoryView":1160 |
| 19889 | * for idx in range(ndim - 1, -1, -1): |
| 19890 | * strides[idx] = stride |
| 19891 | * stride = stride * shape[idx] # <<<<<<<<<<<<<< |
| 19892 | * |
| 19893 | * return stride |
| 19894 | */ |
| 19895 | __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); |
| 19896 | } |
| 19897 | } |
| 19898 | __pyx_L3:; |
| 19899 | |
| 19900 | /* "View.MemoryView":1162 |
| 19901 | * stride = stride * shape[idx] |
| 19902 | * |
| 19903 | * return stride # <<<<<<<<<<<<<< |
| 19904 | * |
| 19905 | * @cname('__pyx_memoryview_copy_data_to_temp') |
| 19906 | */ |
| 19907 | __pyx_r = __pyx_v_stride; |
| 19908 | goto __pyx_L0; |
| 19909 | |
| 19910 | /* "View.MemoryView":1144 |
| 19911 | * |
| 19912 | * @cname('__pyx_fill_contig_strides_array') |
| 19913 | * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<< |
| 19914 | * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, |
| 19915 | * int ndim, char order) nogil: |
| 19916 | */ |
| 19917 | |
| 19918 | /* function exit code */ |
| 19919 | __pyx_L0:; |
| 19920 | return __pyx_r; |
| 19921 | } |
| 19922 | |
| 19923 | /* "View.MemoryView":1165 |
| 19924 | * |
| 19925 | * @cname('__pyx_memoryview_copy_data_to_temp') |
| 19926 | * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< |
| 19927 | * __Pyx_memviewslice *tmpslice, |
| 19928 | * char order, |
| 19929 | */ |
| 19930 | |
| 19931 | static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) { |
| 19932 | int __pyx_v_i; |
| 19933 | void *__pyx_v_result; |
| 19934 | size_t __pyx_v_itemsize; |
| 19935 | size_t __pyx_v_size; |
| 19936 | void *__pyx_r; |
| 19937 | Py_ssize_t __pyx_t_1; |
| 19938 | int __pyx_t_2; |
| 19939 | int __pyx_t_3; |
| 19940 | struct __pyx_memoryview_obj *__pyx_t_4; |
| 19941 | int __pyx_t_5; |
| 19942 | int __pyx_lineno = 0; |
| 19943 | const char *__pyx_filename = NULL((void*)0); |
| 19944 | int __pyx_clineno = 0; |
| 19945 | |
| 19946 | /* "View.MemoryView":1176 |
| 19947 | * cdef void *result |
| 19948 | * |
| 19949 | * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< |
| 19950 | * cdef size_t size = slice_get_size(src, ndim) |
| 19951 | * |
| 19952 | */ |
| 19953 | __pyx_t_1 = __pyx_v_src->memview->view.itemsize; |
| 19954 | __pyx_v_itemsize = __pyx_t_1; |
| 19955 | |
| 19956 | /* "View.MemoryView":1177 |
| 19957 | * |
| 19958 | * cdef size_t itemsize = src.memview.view.itemsize |
| 19959 | * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<< |
| 19960 | * |
| 19961 | * result = malloc(size) |
| 19962 | */ |
| 19963 | __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim); |
| 19964 | |
| 19965 | /* "View.MemoryView":1179 |
| 19966 | * cdef size_t size = slice_get_size(src, ndim) |
| 19967 | * |
| 19968 | * result = malloc(size) # <<<<<<<<<<<<<< |
| 19969 | * if not result: |
| 19970 | * _err(MemoryError, NULL) |
| 19971 | */ |
| 19972 | __pyx_v_result = malloc(__pyx_v_size); |
| 19973 | |
| 19974 | /* "View.MemoryView":1180 |
| 19975 | * |
| 19976 | * result = malloc(size) |
| 19977 | * if not result: # <<<<<<<<<<<<<< |
| 19978 | * _err(MemoryError, NULL) |
| 19979 | * |
| 19980 | */ |
| 19981 | __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0); |
| 19982 | if (__pyx_t_2) { |
| 19983 | |
| 19984 | /* "View.MemoryView":1181 |
| 19985 | * result = malloc(size) |
| 19986 | * if not result: |
| 19987 | * _err(MemoryError, NULL) # <<<<<<<<<<<<<< |
| 19988 | * |
| 19989 | * |
| 19990 | */ |
| 19991 | __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL((void*)0)); if (unlikely(__pyx_t_3 == -1)__builtin_expect(!!(__pyx_t_3 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1181; __pyx_clineno = __LINE__19991; goto __pyx_L1_error;} |
| 19992 | |
| 19993 | /* "View.MemoryView":1180 |
| 19994 | * |
| 19995 | * result = malloc(size) |
| 19996 | * if not result: # <<<<<<<<<<<<<< |
| 19997 | * _err(MemoryError, NULL) |
| 19998 | * |
| 19999 | */ |
| 20000 | } |
| 20001 | |
| 20002 | /* "View.MemoryView":1184 |
| 20003 | * |
| 20004 | * |
| 20005 | * tmpslice.data = <char *> result # <<<<<<<<<<<<<< |
| 20006 | * tmpslice.memview = src.memview |
| 20007 | * for i in range(ndim): |
| 20008 | */ |
| 20009 | __pyx_v_tmpslice->data = ((char *)__pyx_v_result); |
| 20010 | |
| 20011 | /* "View.MemoryView":1185 |
| 20012 | * |
| 20013 | * tmpslice.data = <char *> result |
| 20014 | * tmpslice.memview = src.memview # <<<<<<<<<<<<<< |
| 20015 | * for i in range(ndim): |
| 20016 | * tmpslice.shape[i] = src.shape[i] |
| 20017 | */ |
| 20018 | __pyx_t_4 = __pyx_v_src->memview; |
| 20019 | __pyx_v_tmpslice->memview = __pyx_t_4; |
| 20020 | |
| 20021 | /* "View.MemoryView":1186 |
| 20022 | * tmpslice.data = <char *> result |
| 20023 | * tmpslice.memview = src.memview |
| 20024 | * for i in range(ndim): # <<<<<<<<<<<<<< |
| 20025 | * tmpslice.shape[i] = src.shape[i] |
| 20026 | * tmpslice.suboffsets[i] = -1 |
| 20027 | */ |
| 20028 | __pyx_t_3 = __pyx_v_ndim; |
| 20029 | for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_3; __pyx_t_5+=1) { |
| 20030 | __pyx_v_i = __pyx_t_5; |
| 20031 | |
| 20032 | /* "View.MemoryView":1187 |
| 20033 | * tmpslice.memview = src.memview |
| 20034 | * for i in range(ndim): |
| 20035 | * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<< |
| 20036 | * tmpslice.suboffsets[i] = -1 |
| 20037 | * |
| 20038 | */ |
| 20039 | (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]); |
| 20040 | |
| 20041 | /* "View.MemoryView":1188 |
| 20042 | * for i in range(ndim): |
| 20043 | * tmpslice.shape[i] = src.shape[i] |
| 20044 | * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< |
| 20045 | * |
| 20046 | * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, |
| 20047 | */ |
| 20048 | (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L; |
| 20049 | } |
| 20050 | |
| 20051 | /* "View.MemoryView":1190 |
| 20052 | * tmpslice.suboffsets[i] = -1 |
| 20053 | * |
| 20054 | * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<< |
| 20055 | * ndim, order) |
| 20056 | * |
| 20057 | */ |
| 20058 | __pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order); |
| 20059 | |
| 20060 | /* "View.MemoryView":1194 |
| 20061 | * |
| 20062 | * |
| 20063 | * for i in range(ndim): # <<<<<<<<<<<<<< |
| 20064 | * if tmpslice.shape[i] == 1: |
| 20065 | * tmpslice.strides[i] = 0 |
| 20066 | */ |
| 20067 | __pyx_t_3 = __pyx_v_ndim; |
| 20068 | for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_3; __pyx_t_5+=1) { |
| 20069 | __pyx_v_i = __pyx_t_5; |
| 20070 | |
| 20071 | /* "View.MemoryView":1195 |
| 20072 | * |
| 20073 | * for i in range(ndim): |
| 20074 | * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< |
| 20075 | * tmpslice.strides[i] = 0 |
| 20076 | * |
| 20077 | */ |
| 20078 | __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0); |
| 20079 | if (__pyx_t_2) { |
| 20080 | |
| 20081 | /* "View.MemoryView":1196 |
| 20082 | * for i in range(ndim): |
| 20083 | * if tmpslice.shape[i] == 1: |
| 20084 | * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<< |
| 20085 | * |
| 20086 | * if slice_is_contig(src, order, ndim): |
| 20087 | */ |
| 20088 | (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0; |
| 20089 | |
| 20090 | /* "View.MemoryView":1195 |
| 20091 | * |
| 20092 | * for i in range(ndim): |
| 20093 | * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< |
| 20094 | * tmpslice.strides[i] = 0 |
| 20095 | * |
| 20096 | */ |
| 20097 | } |
| 20098 | } |
| 20099 | |
| 20100 | /* "View.MemoryView":1198 |
| 20101 | * tmpslice.strides[i] = 0 |
| 20102 | * |
| 20103 | * if slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< |
| 20104 | * memcpy(result, src.data, size) |
| 20105 | * else: |
| 20106 | */ |
| 20107 | __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0); |
| 20108 | if (__pyx_t_2) { |
| 20109 | |
| 20110 | /* "View.MemoryView":1199 |
| 20111 | * |
| 20112 | * if slice_is_contig(src, order, ndim): |
| 20113 | * memcpy(result, src.data, size) # <<<<<<<<<<<<<< |
| 20114 | * else: |
| 20115 | * copy_strided_to_strided(src, tmpslice, ndim, itemsize) |
| 20116 | */ |
| 20117 | memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size); |
| 20118 | |
| 20119 | /* "View.MemoryView":1198 |
| 20120 | * tmpslice.strides[i] = 0 |
| 20121 | * |
| 20122 | * if slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< |
| 20123 | * memcpy(result, src.data, size) |
| 20124 | * else: |
| 20125 | */ |
| 20126 | goto __pyx_L9; |
| 20127 | } |
| 20128 | |
| 20129 | /* "View.MemoryView":1201 |
| 20130 | * memcpy(result, src.data, size) |
| 20131 | * else: |
| 20132 | * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<< |
| 20133 | * |
| 20134 | * return result |
| 20135 | */ |
| 20136 | /*else*/ { |
| 20137 | copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize); |
| 20138 | } |
| 20139 | __pyx_L9:; |
| 20140 | |
| 20141 | /* "View.MemoryView":1203 |
| 20142 | * copy_strided_to_strided(src, tmpslice, ndim, itemsize) |
| 20143 | * |
| 20144 | * return result # <<<<<<<<<<<<<< |
| 20145 | * |
| 20146 | * |
| 20147 | */ |
| 20148 | __pyx_r = __pyx_v_result; |
| 20149 | goto __pyx_L0; |
| 20150 | |
| 20151 | /* "View.MemoryView":1165 |
| 20152 | * |
| 20153 | * @cname('__pyx_memoryview_copy_data_to_temp') |
| 20154 | * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< |
| 20155 | * __Pyx_memviewslice *tmpslice, |
| 20156 | * char order, |
| 20157 | */ |
| 20158 | |
| 20159 | /* function exit code */ |
| 20160 | __pyx_L1_error:; |
| 20161 | { |
| 20162 | #ifdef WITH_THREAD1 |
| 20163 | PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); |
| 20164 | #endif |
| 20165 | __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 20166 | #ifdef WITH_THREAD1 |
| 20167 | PyGILState_Release(__pyx_gilstate_save); |
| 20168 | #endif |
| 20169 | } |
| 20170 | __pyx_r = NULL((void*)0); |
| 20171 | __pyx_L0:; |
| 20172 | return __pyx_r; |
| 20173 | } |
| 20174 | |
| 20175 | /* "View.MemoryView":1208 |
| 20176 | * |
| 20177 | * @cname('__pyx_memoryview_err_extents') |
| 20178 | * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<< |
| 20179 | * Py_ssize_t extent2) except -1 with gil: |
| 20180 | * raise ValueError("got differing extents in dimension %d (got %d and %d)" % |
| 20181 | */ |
| 20182 | |
| 20183 | static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) { |
| 20184 | int __pyx_r; |
| 20185 | __Pyx_RefNannyDeclarations |
| 20186 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 20187 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 20188 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 20189 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 20190 | int __pyx_lineno = 0; |
| 20191 | const char *__pyx_filename = NULL((void*)0); |
| 20192 | int __pyx_clineno = 0; |
| 20193 | #ifdef WITH_THREAD1 |
| 20194 | PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); |
| 20195 | #endif |
| 20196 | __Pyx_RefNannySetupContext("_err_extents", 0); |
| 20197 | |
| 20198 | /* "View.MemoryView":1211 |
| 20199 | * Py_ssize_t extent2) except -1 with gil: |
| 20200 | * raise ValueError("got differing extents in dimension %d (got %d and %d)" % |
| 20201 | * (i, extent1, extent2)) # <<<<<<<<<<<<<< |
| 20202 | * |
| 20203 | * @cname('__pyx_memoryview_err_dim') |
| 20204 | */ |
| 20205 | __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1211; __pyx_clineno = __LINE__20205; goto __pyx_L1_error;} |
| 20206 | __Pyx_GOTREF(__pyx_t_1); |
| 20207 | __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1211; __pyx_clineno = __LINE__20207; goto __pyx_L1_error;} |
| 20208 | __Pyx_GOTREF(__pyx_t_2); |
| 20209 | __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1211; __pyx_clineno = __LINE__20209; goto __pyx_L1_error;} |
| 20210 | __Pyx_GOTREF(__pyx_t_3); |
| 20211 | __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1211; __pyx_clineno = __LINE__20211; goto __pyx_L1_error;} |
| 20212 | __Pyx_GOTREF(__pyx_t_4); |
| 20213 | __Pyx_GIVEREF(__pyx_t_1); |
| 20214 | PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_t_1); |
| 20215 | __Pyx_GIVEREF(__pyx_t_2); |
| 20216 | PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_4))->ob_item[1] = __pyx_t_2); |
| 20217 | __Pyx_GIVEREF(__pyx_t_3); |
| 20218 | PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)(((PyTupleObject *)(__pyx_t_4))->ob_item[2] = __pyx_t_3); |
| 20219 | __pyx_t_1 = 0; |
| 20220 | __pyx_t_2 = 0; |
| 20221 | __pyx_t_3 = 0; |
| 20222 | |
| 20223 | /* "View.MemoryView":1210 |
| 20224 | * cdef int _err_extents(int i, Py_ssize_t extent1, |
| 20225 | * Py_ssize_t extent2) except -1 with gil: |
| 20226 | * raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<< |
| 20227 | * (i, extent1, extent2)) |
| 20228 | * |
| 20229 | */ |
| 20230 | __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4)PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4 ); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1210; __pyx_clineno = __LINE__20230; goto __pyx_L1_error;} |
| 20231 | __Pyx_GOTREF(__pyx_t_3); |
| 20232 | __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; |
| 20233 | __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1210; __pyx_clineno = __LINE__20233; goto __pyx_L1_error;} |
| 20234 | __Pyx_GOTREF(__pyx_t_4); |
| 20235 | __Pyx_GIVEREF(__pyx_t_3); |
| 20236 | PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_t_3); |
| 20237 | __pyx_t_3 = 0; |
| 20238 | __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1210; __pyx_clineno = __LINE__20238; goto __pyx_L1_error;} |
| 20239 | __Pyx_GOTREF(__pyx_t_3); |
| 20240 | __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; |
| 20241 | __Pyx_Raise(__pyx_t_3, 0, 0, 0); |
| 20242 | __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; |
| 20243 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1210; __pyx_clineno = __LINE__20243; goto __pyx_L1_error;} |
| 20244 | |
| 20245 | /* "View.MemoryView":1208 |
| 20246 | * |
| 20247 | * @cname('__pyx_memoryview_err_extents') |
| 20248 | * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<< |
| 20249 | * Py_ssize_t extent2) except -1 with gil: |
| 20250 | * raise ValueError("got differing extents in dimension %d (got %d and %d)" % |
| 20251 | */ |
| 20252 | |
| 20253 | /* function exit code */ |
| 20254 | __pyx_L1_error:; |
| 20255 | __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); |
| 20256 | __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); |
| 20257 | __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); |
| 20258 | __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); |
| 20259 | __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 20260 | __pyx_r = -1; |
| 20261 | __Pyx_RefNannyFinishContext(); |
| 20262 | #ifdef WITH_THREAD1 |
| 20263 | PyGILState_Release(__pyx_gilstate_save); |
| 20264 | #endif |
| 20265 | return __pyx_r; |
| 20266 | } |
| 20267 | |
| 20268 | /* "View.MemoryView":1214 |
| 20269 | * |
| 20270 | * @cname('__pyx_memoryview_err_dim') |
| 20271 | * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<< |
| 20272 | * raise error(msg.decode('ascii') % dim) |
| 20273 | * |
| 20274 | */ |
| 20275 | |
| 20276 | static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) { |
| 20277 | int __pyx_r; |
| 20278 | __Pyx_RefNannyDeclarations |
| 20279 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 20280 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 20281 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 20282 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 20283 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 20284 | int __pyx_lineno = 0; |
| 20285 | const char *__pyx_filename = NULL((void*)0); |
| 20286 | int __pyx_clineno = 0; |
| 20287 | #ifdef WITH_THREAD1 |
| 20288 | PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); |
| 20289 | #endif |
| 20290 | __Pyx_RefNannySetupContext("_err_dim", 0); |
| 20291 | __Pyx_INCREF(__pyx_v_error)( ((PyObject*)(__pyx_v_error))->ob_refcnt++); |
| 20292 | |
| 20293 | /* "View.MemoryView":1215 |
| 20294 | * @cname('__pyx_memoryview_err_dim') |
| 20295 | * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: |
| 20296 | * raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<< |
| 20297 | * |
| 20298 | * @cname('__pyx_memoryview_err') |
| 20299 | */ |
| 20300 | __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL((void*)0), NULL((void*)0), PyUnicode_DecodeASCIIPyUnicodeUCS4_DecodeASCII); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1215; __pyx_clineno = __LINE__20300; goto __pyx_L1_error;} |
| 20301 | __Pyx_GOTREF(__pyx_t_2); |
| 20302 | __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1215; __pyx_clineno = __LINE__20302; goto __pyx_L1_error;} |
| 20303 | __Pyx_GOTREF(__pyx_t_3); |
| 20304 | __pyx_t_4 = PyUnicode_FormatPyUnicodeUCS4_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1215; __pyx_clineno = __LINE__20304; goto __pyx_L1_error;} |
| 20305 | __Pyx_GOTREF(__pyx_t_4); |
| 20306 | __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; |
| 20307 | __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; |
| 20308 | __Pyx_INCREF(__pyx_v_error)( ((PyObject*)(__pyx_v_error))->ob_refcnt++); |
| 20309 | __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL((void*)0); |
| 20310 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type )), 0)) { |
| 20311 | __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self); |
| 20312 | if (likely(__pyx_t_2)__builtin_expect(!!(__pyx_t_2), 1)) { |
| 20313 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func); |
| 20314 | __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++); |
| 20315 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 20316 | __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); |
| 20317 | } |
| 20318 | } |
| 20319 | if (!__pyx_t_2) { |
| 20320 | __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1215; __pyx_clineno = __LINE__20320; goto __pyx_L1_error;} |
| 20321 | __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; |
| 20322 | __Pyx_GOTREF(__pyx_t_1); |
| 20323 | } else { |
| 20324 | __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1215; __pyx_clineno = __LINE__20324; goto __pyx_L1_error;} |
| 20325 | __Pyx_GOTREF(__pyx_t_5); |
| 20326 | __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); |
| 20327 | __Pyx_GIVEREF(__pyx_t_4); |
| 20328 | PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+1] = __pyx_t_4); |
| 20329 | __pyx_t_4 = 0; |
| 20330 | __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[2]; __pyx_lineno = 1215; __pyx_clineno = __LINE__20330; goto __pyx_L1_error;} |
| 20331 | __Pyx_GOTREF(__pyx_t_1); |
| 20332 | __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; |
| 20333 | } |
| 20334 | __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; |
| 20335 | __Pyx_Raise(__pyx_t_1, 0, 0, 0); |
| 20336 | __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; |
| 20337 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1215; __pyx_clineno = __LINE__20337; goto __pyx_L1_error;} |
| 20338 | |
| 20339 | /* "View.MemoryView":1214 |
| 20340 | * |
| 20341 | * @cname('__pyx_memoryview_err_dim') |
| 20342 | * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<< |
| 20343 | * raise error(msg.decode('ascii') % dim) |
| 20344 | * |
| 20345 | */ |
| 20346 | |
| 20347 | /* function exit code */ |
| 20348 | __pyx_L1_error:; |
| 20349 | __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); |
| 20350 | __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); |
| 20351 | __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); |
| 20352 | __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); |
| 20353 | __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); |
| 20354 | __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 20355 | __pyx_r = -1; |
| 20356 | __Pyx_XDECREF(__pyx_v_error)do { if ((__pyx_v_error) == ((void*)0)) ; else do { if ( --(( PyObject*)(__pyx_v_error))->ob_refcnt != 0) ; else ( (*((( PyObject*)((PyObject *)(__pyx_v_error)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(__pyx_v_error)))); } while (0); } while (0); |
| 20357 | __Pyx_RefNannyFinishContext(); |
| 20358 | #ifdef WITH_THREAD1 |
| 20359 | PyGILState_Release(__pyx_gilstate_save); |
| 20360 | #endif |
| 20361 | return __pyx_r; |
| 20362 | } |
| 20363 | |
| 20364 | /* "View.MemoryView":1218 |
| 20365 | * |
| 20366 | * @cname('__pyx_memoryview_err') |
| 20367 | * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<< |
| 20368 | * if msg != NULL: |
| 20369 | * raise error(msg.decode('ascii')) |
| 20370 | */ |
| 20371 | |
| 20372 | static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) { |
| 20373 | int __pyx_r; |
| 20374 | __Pyx_RefNannyDeclarations |
| 20375 | int __pyx_t_1; |
| 20376 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 20377 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 20378 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 20379 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 20380 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 20381 | int __pyx_lineno = 0; |
| 20382 | const char *__pyx_filename = NULL((void*)0); |
| 20383 | int __pyx_clineno = 0; |
| 20384 | #ifdef WITH_THREAD1 |
| 20385 | PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); |
| 20386 | #endif |
| 20387 | __Pyx_RefNannySetupContext("_err", 0); |
| 20388 | __Pyx_INCREF(__pyx_v_error)( ((PyObject*)(__pyx_v_error))->ob_refcnt++); |
| 20389 | |
| 20390 | /* "View.MemoryView":1219 |
| 20391 | * @cname('__pyx_memoryview_err') |
| 20392 | * cdef int _err(object error, char *msg) except -1 with gil: |
| 20393 | * if msg != NULL: # <<<<<<<<<<<<<< |
| 20394 | * raise error(msg.decode('ascii')) |
| 20395 | * else: |
| 20396 | */ |
| 20397 | __pyx_t_1 = ((__pyx_v_msg != NULL((void*)0)) != 0); |
| 20398 | if (__pyx_t_1) { |
| 20399 | |
| 20400 | /* "View.MemoryView":1220 |
| 20401 | * cdef int _err(object error, char *msg) except -1 with gil: |
| 20402 | * if msg != NULL: |
| 20403 | * raise error(msg.decode('ascii')) # <<<<<<<<<<<<<< |
| 20404 | * else: |
| 20405 | * raise error |
| 20406 | */ |
| 20407 | __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL((void*)0), NULL((void*)0), PyUnicode_DecodeASCIIPyUnicodeUCS4_DecodeASCII); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1220; __pyx_clineno = __LINE__20407; goto __pyx_L1_error;} |
| 20408 | __Pyx_GOTREF(__pyx_t_3); |
| 20409 | __Pyx_INCREF(__pyx_v_error)( ((PyObject*)(__pyx_v_error))->ob_refcnt++); |
| 20410 | __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL((void*)0); |
| 20411 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type )), 0)) { |
| 20412 | __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self); |
| 20413 | if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) { |
| 20414 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func); |
| 20415 | __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); |
| 20416 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 20417 | __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); |
| 20418 | } |
| 20419 | } |
| 20420 | if (!__pyx_t_5) { |
| 20421 | __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1220; __pyx_clineno = __LINE__20421; goto __pyx_L1_error;} |
| 20422 | __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; |
| 20423 | __Pyx_GOTREF(__pyx_t_2); |
| 20424 | } else { |
| 20425 | __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1220; __pyx_clineno = __LINE__20425; goto __pyx_L1_error;} |
| 20426 | __Pyx_GOTREF(__pyx_t_6); |
| 20427 | __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); |
| 20428 | __Pyx_GIVEREF(__pyx_t_3); |
| 20429 | PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_t_3); |
| 20430 | __pyx_t_3 = 0; |
| 20431 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1220; __pyx_clineno = __LINE__20431; goto __pyx_L1_error;} |
| 20432 | __Pyx_GOTREF(__pyx_t_2); |
| 20433 | __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; |
| 20434 | } |
| 20435 | __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; |
| 20436 | __Pyx_Raise(__pyx_t_2, 0, 0, 0); |
| 20437 | __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; |
| 20438 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1220; __pyx_clineno = __LINE__20438; goto __pyx_L1_error;} |
| 20439 | |
| 20440 | /* "View.MemoryView":1219 |
| 20441 | * @cname('__pyx_memoryview_err') |
| 20442 | * cdef int _err(object error, char *msg) except -1 with gil: |
| 20443 | * if msg != NULL: # <<<<<<<<<<<<<< |
| 20444 | * raise error(msg.decode('ascii')) |
| 20445 | * else: |
| 20446 | */ |
| 20447 | } |
| 20448 | |
| 20449 | /* "View.MemoryView":1222 |
| 20450 | * raise error(msg.decode('ascii')) |
| 20451 | * else: |
| 20452 | * raise error # <<<<<<<<<<<<<< |
| 20453 | * |
| 20454 | * @cname('__pyx_memoryview_copy_contents') |
| 20455 | */ |
| 20456 | /*else*/ { |
| 20457 | __Pyx_Raise(__pyx_v_error, 0, 0, 0); |
| 20458 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1222; __pyx_clineno = __LINE__20458; goto __pyx_L1_error;} |
| 20459 | } |
| 20460 | |
| 20461 | /* "View.MemoryView":1218 |
| 20462 | * |
| 20463 | * @cname('__pyx_memoryview_err') |
| 20464 | * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<< |
| 20465 | * if msg != NULL: |
| 20466 | * raise error(msg.decode('ascii')) |
| 20467 | */ |
| 20468 | |
| 20469 | /* function exit code */ |
| 20470 | __pyx_L1_error:; |
| 20471 | __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); |
| 20472 | __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); |
| 20473 | __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); |
| 20474 | __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); |
| 20475 | __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); |
| 20476 | __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 20477 | __pyx_r = -1; |
| 20478 | __Pyx_XDECREF(__pyx_v_error)do { if ((__pyx_v_error) == ((void*)0)) ; else do { if ( --(( PyObject*)(__pyx_v_error))->ob_refcnt != 0) ; else ( (*((( PyObject*)((PyObject *)(__pyx_v_error)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(__pyx_v_error)))); } while (0); } while (0); |
| 20479 | __Pyx_RefNannyFinishContext(); |
| 20480 | #ifdef WITH_THREAD1 |
| 20481 | PyGILState_Release(__pyx_gilstate_save); |
| 20482 | #endif |
| 20483 | return __pyx_r; |
| 20484 | } |
| 20485 | |
| 20486 | /* "View.MemoryView":1225 |
| 20487 | * |
| 20488 | * @cname('__pyx_memoryview_copy_contents') |
| 20489 | * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<< |
| 20490 | * __Pyx_memviewslice dst, |
| 20491 | * int src_ndim, int dst_ndim, |
| 20492 | */ |
| 20493 | |
| 20494 | static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) { |
| 20495 | void *__pyx_v_tmpdata; |
| 20496 | size_t __pyx_v_itemsize; |
| 20497 | int __pyx_v_i; |
| 20498 | char __pyx_v_order; |
| 20499 | int __pyx_v_broadcasting; |
| 20500 | int __pyx_v_direct_copy; |
| 20501 | __Pyx_memviewslice __pyx_v_tmp; |
| 20502 | int __pyx_v_ndim; |
| 20503 | int __pyx_r; |
| 20504 | Py_ssize_t __pyx_t_1; |
| 20505 | int __pyx_t_2; |
| 20506 | int __pyx_t_3; |
| 20507 | int __pyx_t_4; |
| 20508 | int __pyx_t_5; |
| 20509 | void *__pyx_t_6; |
| 20510 | int __pyx_t_7; |
| 20511 | int __pyx_lineno = 0; |
| 20512 | const char *__pyx_filename = NULL((void*)0); |
| 20513 | int __pyx_clineno = 0; |
| 20514 | |
| 20515 | /* "View.MemoryView":1233 |
| 20516 | * Check for overlapping memory and verify the shapes. |
| 20517 | * """ |
| 20518 | * cdef void *tmpdata = NULL # <<<<<<<<<<<<<< |
| 20519 | * cdef size_t itemsize = src.memview.view.itemsize |
| 20520 | * cdef int i |
| 20521 | */ |
| 20522 | __pyx_v_tmpdata = NULL((void*)0); |
| 20523 | |
| 20524 | /* "View.MemoryView":1234 |
| 20525 | * """ |
| 20526 | * cdef void *tmpdata = NULL |
| 20527 | * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< |
| 20528 | * cdef int i |
| 20529 | * cdef char order = get_best_order(&src, src_ndim) |
| 20530 | */ |
| 20531 | __pyx_t_1 = __pyx_v_src.memview->view.itemsize; |
| 20532 | __pyx_v_itemsize = __pyx_t_1; |
| 20533 | |
| 20534 | /* "View.MemoryView":1236 |
| 20535 | * cdef size_t itemsize = src.memview.view.itemsize |
| 20536 | * cdef int i |
| 20537 | * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<< |
| 20538 | * cdef bint broadcasting = False |
| 20539 | * cdef bint direct_copy = False |
| 20540 | */ |
| 20541 | __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim); |
| 20542 | |
| 20543 | /* "View.MemoryView":1237 |
| 20544 | * cdef int i |
| 20545 | * cdef char order = get_best_order(&src, src_ndim) |
| 20546 | * cdef bint broadcasting = False # <<<<<<<<<<<<<< |
| 20547 | * cdef bint direct_copy = False |
| 20548 | * cdef __Pyx_memviewslice tmp |
| 20549 | */ |
| 20550 | __pyx_v_broadcasting = 0; |
| 20551 | |
| 20552 | /* "View.MemoryView":1238 |
| 20553 | * cdef char order = get_best_order(&src, src_ndim) |
| 20554 | * cdef bint broadcasting = False |
| 20555 | * cdef bint direct_copy = False # <<<<<<<<<<<<<< |
| 20556 | * cdef __Pyx_memviewslice tmp |
| 20557 | * |
| 20558 | */ |
| 20559 | __pyx_v_direct_copy = 0; |
| 20560 | |
| 20561 | /* "View.MemoryView":1241 |
| 20562 | * cdef __Pyx_memviewslice tmp |
| 20563 | * |
| 20564 | * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< |
| 20565 | * broadcast_leading(&src, src_ndim, dst_ndim) |
| 20566 | * elif dst_ndim < src_ndim: |
| 20567 | */ |
| 20568 | __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0); |
| 20569 | if (__pyx_t_2) { |
| 20570 | |
| 20571 | /* "View.MemoryView":1242 |
| 20572 | * |
| 20573 | * if src_ndim < dst_ndim: |
| 20574 | * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<< |
| 20575 | * elif dst_ndim < src_ndim: |
| 20576 | * broadcast_leading(&dst, dst_ndim, src_ndim) |
| 20577 | */ |
| 20578 | __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim); |
| 20579 | |
| 20580 | /* "View.MemoryView":1241 |
| 20581 | * cdef __Pyx_memviewslice tmp |
| 20582 | * |
| 20583 | * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< |
| 20584 | * broadcast_leading(&src, src_ndim, dst_ndim) |
| 20585 | * elif dst_ndim < src_ndim: |
| 20586 | */ |
| 20587 | goto __pyx_L3; |
| 20588 | } |
| 20589 | |
| 20590 | /* "View.MemoryView":1243 |
| 20591 | * if src_ndim < dst_ndim: |
| 20592 | * broadcast_leading(&src, src_ndim, dst_ndim) |
| 20593 | * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< |
| 20594 | * broadcast_leading(&dst, dst_ndim, src_ndim) |
| 20595 | * |
| 20596 | */ |
| 20597 | __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0); |
| 20598 | if (__pyx_t_2) { |
| 20599 | |
| 20600 | /* "View.MemoryView":1244 |
| 20601 | * broadcast_leading(&src, src_ndim, dst_ndim) |
| 20602 | * elif dst_ndim < src_ndim: |
| 20603 | * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<< |
| 20604 | * |
| 20605 | * cdef int ndim = max(src_ndim, dst_ndim) |
| 20606 | */ |
| 20607 | __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim); |
| 20608 | |
| 20609 | /* "View.MemoryView":1243 |
| 20610 | * if src_ndim < dst_ndim: |
| 20611 | * broadcast_leading(&src, src_ndim, dst_ndim) |
| 20612 | * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< |
| 20613 | * broadcast_leading(&dst, dst_ndim, src_ndim) |
| 20614 | * |
| 20615 | */ |
| 20616 | } |
| 20617 | __pyx_L3:; |
| 20618 | |
| 20619 | /* "View.MemoryView":1246 |
| 20620 | * broadcast_leading(&dst, dst_ndim, src_ndim) |
| 20621 | * |
| 20622 | * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<< |
| 20623 | * |
| 20624 | * for i in range(ndim): |
| 20625 | */ |
| 20626 | __pyx_t_3 = __pyx_v_dst_ndim; |
| 20627 | __pyx_t_4 = __pyx_v_src_ndim; |
| 20628 | if (((__pyx_t_3 > __pyx_t_4) != 0)) { |
| 20629 | __pyx_t_5 = __pyx_t_3; |
| 20630 | } else { |
| 20631 | __pyx_t_5 = __pyx_t_4; |
| 20632 | } |
| 20633 | __pyx_v_ndim = __pyx_t_5; |
| 20634 | |
| 20635 | /* "View.MemoryView":1248 |
| 20636 | * cdef int ndim = max(src_ndim, dst_ndim) |
| 20637 | * |
| 20638 | * for i in range(ndim): # <<<<<<<<<<<<<< |
| 20639 | * if src.shape[i] != dst.shape[i]: |
| 20640 | * if src.shape[i] == 1: |
| 20641 | */ |
| 20642 | __pyx_t_5 = __pyx_v_ndim; |
| 20643 | for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_5; __pyx_t_3+=1) { |
| 20644 | __pyx_v_i = __pyx_t_3; |
| 20645 | |
| 20646 | /* "View.MemoryView":1249 |
| 20647 | * |
| 20648 | * for i in range(ndim): |
| 20649 | * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< |
| 20650 | * if src.shape[i] == 1: |
| 20651 | * broadcasting = True |
| 20652 | */ |
| 20653 | __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0); |
| 20654 | if (__pyx_t_2) { |
| 20655 | |
| 20656 | /* "View.MemoryView":1250 |
| 20657 | * for i in range(ndim): |
| 20658 | * if src.shape[i] != dst.shape[i]: |
| 20659 | * if src.shape[i] == 1: # <<<<<<<<<<<<<< |
| 20660 | * broadcasting = True |
| 20661 | * src.strides[i] = 0 |
| 20662 | */ |
| 20663 | __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0); |
| 20664 | if (__pyx_t_2) { |
| 20665 | |
| 20666 | /* "View.MemoryView":1251 |
| 20667 | * if src.shape[i] != dst.shape[i]: |
| 20668 | * if src.shape[i] == 1: |
| 20669 | * broadcasting = True # <<<<<<<<<<<<<< |
| 20670 | * src.strides[i] = 0 |
| 20671 | * else: |
| 20672 | */ |
| 20673 | __pyx_v_broadcasting = 1; |
| 20674 | |
| 20675 | /* "View.MemoryView":1252 |
| 20676 | * if src.shape[i] == 1: |
| 20677 | * broadcasting = True |
| 20678 | * src.strides[i] = 0 # <<<<<<<<<<<<<< |
| 20679 | * else: |
| 20680 | * _err_extents(i, dst.shape[i], src.shape[i]) |
| 20681 | */ |
| 20682 | (__pyx_v_src.strides[__pyx_v_i]) = 0; |
| 20683 | |
| 20684 | /* "View.MemoryView":1250 |
| 20685 | * for i in range(ndim): |
| 20686 | * if src.shape[i] != dst.shape[i]: |
| 20687 | * if src.shape[i] == 1: # <<<<<<<<<<<<<< |
| 20688 | * broadcasting = True |
| 20689 | * src.strides[i] = 0 |
| 20690 | */ |
| 20691 | goto __pyx_L7; |
| 20692 | } |
| 20693 | |
| 20694 | /* "View.MemoryView":1254 |
| 20695 | * src.strides[i] = 0 |
| 20696 | * else: |
| 20697 | * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<< |
| 20698 | * |
| 20699 | * if src.suboffsets[i] >= 0: |
| 20700 | */ |
| 20701 | /*else*/ { |
| 20702 | __pyx_t_4 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_4 == -1)__builtin_expect(!!(__pyx_t_4 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1254; __pyx_clineno = __LINE__20702; goto __pyx_L1_error;} |
| 20703 | } |
| 20704 | __pyx_L7:; |
| 20705 | |
| 20706 | /* "View.MemoryView":1249 |
| 20707 | * |
| 20708 | * for i in range(ndim): |
| 20709 | * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< |
| 20710 | * if src.shape[i] == 1: |
| 20711 | * broadcasting = True |
| 20712 | */ |
| 20713 | } |
| 20714 | |
| 20715 | /* "View.MemoryView":1256 |
| 20716 | * _err_extents(i, dst.shape[i], src.shape[i]) |
| 20717 | * |
| 20718 | * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< |
| 20719 | * _err_dim(ValueError, "Dimension %d is not direct", i) |
| 20720 | * |
| 20721 | */ |
| 20722 | __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0); |
| 20723 | if (__pyx_t_2) { |
| 20724 | |
| 20725 | /* "View.MemoryView":1257 |
| 20726 | * |
| 20727 | * if src.suboffsets[i] >= 0: |
| 20728 | * _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<< |
| 20729 | * |
| 20730 | * if slices_overlap(&src, &dst, ndim, itemsize): |
| 20731 | */ |
| 20732 | __pyx_t_4 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, __pyx_k_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_4 == -1)__builtin_expect(!!(__pyx_t_4 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1257; __pyx_clineno = __LINE__20732; goto __pyx_L1_error;} |
| 20733 | |
| 20734 | /* "View.MemoryView":1256 |
| 20735 | * _err_extents(i, dst.shape[i], src.shape[i]) |
| 20736 | * |
| 20737 | * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< |
| 20738 | * _err_dim(ValueError, "Dimension %d is not direct", i) |
| 20739 | * |
| 20740 | */ |
| 20741 | } |
| 20742 | } |
| 20743 | |
| 20744 | /* "View.MemoryView":1259 |
| 20745 | * _err_dim(ValueError, "Dimension %d is not direct", i) |
| 20746 | * |
| 20747 | * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< |
| 20748 | * |
| 20749 | * if not slice_is_contig(&src, order, ndim): |
| 20750 | */ |
| 20751 | __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0); |
| 20752 | if (__pyx_t_2) { |
| 20753 | |
| 20754 | /* "View.MemoryView":1261 |
| 20755 | * if slices_overlap(&src, &dst, ndim, itemsize): |
| 20756 | * |
| 20757 | * if not slice_is_contig(&src, order, ndim): # <<<<<<<<<<<<<< |
| 20758 | * order = get_best_order(&dst, ndim) |
| 20759 | * |
| 20760 | */ |
| 20761 | __pyx_t_2 = ((!(__pyx_memviewslice_is_contig((&__pyx_v_src), __pyx_v_order, __pyx_v_ndim) != 0)) != 0); |
| 20762 | if (__pyx_t_2) { |
| 20763 | |
| 20764 | /* "View.MemoryView":1262 |
| 20765 | * |
| 20766 | * if not slice_is_contig(&src, order, ndim): |
| 20767 | * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<< |
| 20768 | * |
| 20769 | * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) |
| 20770 | */ |
| 20771 | __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim); |
| 20772 | |
| 20773 | /* "View.MemoryView":1261 |
| 20774 | * if slices_overlap(&src, &dst, ndim, itemsize): |
| 20775 | * |
| 20776 | * if not slice_is_contig(&src, order, ndim): # <<<<<<<<<<<<<< |
| 20777 | * order = get_best_order(&dst, ndim) |
| 20778 | * |
| 20779 | */ |
| 20780 | } |
| 20781 | |
| 20782 | /* "View.MemoryView":1264 |
| 20783 | * order = get_best_order(&dst, ndim) |
| 20784 | * |
| 20785 | * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<< |
| 20786 | * src = tmp |
| 20787 | * |
| 20788 | */ |
| 20789 | __pyx_t_6 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_6 == NULL)__builtin_expect(!!(__pyx_t_6 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1264; __pyx_clineno = __LINE__20789; goto __pyx_L1_error;} |
| 20790 | __pyx_v_tmpdata = __pyx_t_6; |
| 20791 | |
| 20792 | /* "View.MemoryView":1265 |
| 20793 | * |
| 20794 | * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) |
| 20795 | * src = tmp # <<<<<<<<<<<<<< |
| 20796 | * |
| 20797 | * if not broadcasting: |
| 20798 | */ |
| 20799 | __pyx_v_src = __pyx_v_tmp; |
| 20800 | |
| 20801 | /* "View.MemoryView":1259 |
| 20802 | * _err_dim(ValueError, "Dimension %d is not direct", i) |
| 20803 | * |
| 20804 | * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< |
| 20805 | * |
| 20806 | * if not slice_is_contig(&src, order, ndim): |
| 20807 | */ |
| 20808 | } |
| 20809 | |
| 20810 | /* "View.MemoryView":1267 |
| 20811 | * src = tmp |
| 20812 | * |
| 20813 | * if not broadcasting: # <<<<<<<<<<<<<< |
| 20814 | * |
| 20815 | * |
| 20816 | */ |
| 20817 | __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0); |
| 20818 | if (__pyx_t_2) { |
| 20819 | |
| 20820 | /* "View.MemoryView":1270 |
| 20821 | * |
| 20822 | * |
| 20823 | * if slice_is_contig(&src, 'C', ndim): # <<<<<<<<<<<<<< |
| 20824 | * direct_copy = slice_is_contig(&dst, 'C', ndim) |
| 20825 | * elif slice_is_contig(&src, 'F', ndim): |
| 20826 | */ |
| 20827 | __pyx_t_2 = (__pyx_memviewslice_is_contig((&__pyx_v_src), 'C', __pyx_v_ndim) != 0); |
| 20828 | if (__pyx_t_2) { |
| 20829 | |
| 20830 | /* "View.MemoryView":1271 |
| 20831 | * |
| 20832 | * if slice_is_contig(&src, 'C', ndim): |
| 20833 | * direct_copy = slice_is_contig(&dst, 'C', ndim) # <<<<<<<<<<<<<< |
| 20834 | * elif slice_is_contig(&src, 'F', ndim): |
| 20835 | * direct_copy = slice_is_contig(&dst, 'F', ndim) |
| 20836 | */ |
| 20837 | __pyx_v_direct_copy = __pyx_memviewslice_is_contig((&__pyx_v_dst), 'C', __pyx_v_ndim); |
| 20838 | |
| 20839 | /* "View.MemoryView":1270 |
| 20840 | * |
| 20841 | * |
| 20842 | * if slice_is_contig(&src, 'C', ndim): # <<<<<<<<<<<<<< |
| 20843 | * direct_copy = slice_is_contig(&dst, 'C', ndim) |
| 20844 | * elif slice_is_contig(&src, 'F', ndim): |
| 20845 | */ |
| 20846 | goto __pyx_L12; |
| 20847 | } |
| 20848 | |
| 20849 | /* "View.MemoryView":1272 |
| 20850 | * if slice_is_contig(&src, 'C', ndim): |
| 20851 | * direct_copy = slice_is_contig(&dst, 'C', ndim) |
| 20852 | * elif slice_is_contig(&src, 'F', ndim): # <<<<<<<<<<<<<< |
| 20853 | * direct_copy = slice_is_contig(&dst, 'F', ndim) |
| 20854 | * |
| 20855 | */ |
| 20856 | __pyx_t_2 = (__pyx_memviewslice_is_contig((&__pyx_v_src), 'F', __pyx_v_ndim) != 0); |
| 20857 | if (__pyx_t_2) { |
| 20858 | |
| 20859 | /* "View.MemoryView":1273 |
| 20860 | * direct_copy = slice_is_contig(&dst, 'C', ndim) |
| 20861 | * elif slice_is_contig(&src, 'F', ndim): |
| 20862 | * direct_copy = slice_is_contig(&dst, 'F', ndim) # <<<<<<<<<<<<<< |
| 20863 | * |
| 20864 | * if direct_copy: |
| 20865 | */ |
| 20866 | __pyx_v_direct_copy = __pyx_memviewslice_is_contig((&__pyx_v_dst), 'F', __pyx_v_ndim); |
| 20867 | |
| 20868 | /* "View.MemoryView":1272 |
| 20869 | * if slice_is_contig(&src, 'C', ndim): |
| 20870 | * direct_copy = slice_is_contig(&dst, 'C', ndim) |
| 20871 | * elif slice_is_contig(&src, 'F', ndim): # <<<<<<<<<<<<<< |
| 20872 | * direct_copy = slice_is_contig(&dst, 'F', ndim) |
| 20873 | * |
| 20874 | */ |
| 20875 | } |
| 20876 | __pyx_L12:; |
| 20877 | |
| 20878 | /* "View.MemoryView":1275 |
| 20879 | * direct_copy = slice_is_contig(&dst, 'F', ndim) |
| 20880 | * |
| 20881 | * if direct_copy: # <<<<<<<<<<<<<< |
| 20882 | * |
| 20883 | * refcount_copying(&dst, dtype_is_object, ndim, False) |
| 20884 | */ |
| 20885 | __pyx_t_2 = (__pyx_v_direct_copy != 0); |
| 20886 | if (__pyx_t_2) { |
| 20887 | |
| 20888 | /* "View.MemoryView":1277 |
| 20889 | * if direct_copy: |
| 20890 | * |
| 20891 | * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<< |
| 20892 | * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) |
| 20893 | * refcount_copying(&dst, dtype_is_object, ndim, True) |
| 20894 | */ |
| 20895 | __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); |
| 20896 | |
| 20897 | /* "View.MemoryView":1278 |
| 20898 | * |
| 20899 | * refcount_copying(&dst, dtype_is_object, ndim, False) |
| 20900 | * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<< |
| 20901 | * refcount_copying(&dst, dtype_is_object, ndim, True) |
| 20902 | * free(tmpdata) |
| 20903 | */ |
| 20904 | memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)); |
| 20905 | |
| 20906 | /* "View.MemoryView":1279 |
| 20907 | * refcount_copying(&dst, dtype_is_object, ndim, False) |
| 20908 | * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) |
| 20909 | * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<< |
| 20910 | * free(tmpdata) |
| 20911 | * return 0 |
| 20912 | */ |
| 20913 | __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); |
| 20914 | |
| 20915 | /* "View.MemoryView":1280 |
| 20916 | * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) |
| 20917 | * refcount_copying(&dst, dtype_is_object, ndim, True) |
| 20918 | * free(tmpdata) # <<<<<<<<<<<<<< |
| 20919 | * return 0 |
| 20920 | * |
| 20921 | */ |
| 20922 | free(__pyx_v_tmpdata); |
| 20923 | |
| 20924 | /* "View.MemoryView":1281 |
| 20925 | * refcount_copying(&dst, dtype_is_object, ndim, True) |
| 20926 | * free(tmpdata) |
| 20927 | * return 0 # <<<<<<<<<<<<<< |
| 20928 | * |
| 20929 | * if order == 'F' == get_best_order(&dst, ndim): |
| 20930 | */ |
| 20931 | __pyx_r = 0; |
| 20932 | goto __pyx_L0; |
| 20933 | |
| 20934 | /* "View.MemoryView":1275 |
| 20935 | * direct_copy = slice_is_contig(&dst, 'F', ndim) |
| 20936 | * |
| 20937 | * if direct_copy: # <<<<<<<<<<<<<< |
| 20938 | * |
| 20939 | * refcount_copying(&dst, dtype_is_object, ndim, False) |
| 20940 | */ |
| 20941 | } |
| 20942 | |
| 20943 | /* "View.MemoryView":1267 |
| 20944 | * src = tmp |
| 20945 | * |
| 20946 | * if not broadcasting: # <<<<<<<<<<<<<< |
| 20947 | * |
| 20948 | * |
| 20949 | */ |
| 20950 | } |
| 20951 | |
| 20952 | /* "View.MemoryView":1283 |
| 20953 | * return 0 |
| 20954 | * |
| 20955 | * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< |
| 20956 | * |
| 20957 | * |
| 20958 | */ |
| 20959 | __pyx_t_2 = (__pyx_v_order == 'F'); |
| 20960 | if (__pyx_t_2) { |
| 20961 | __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim)); |
| 20962 | } |
| 20963 | __pyx_t_7 = (__pyx_t_2 != 0); |
| 20964 | if (__pyx_t_7) { |
| 20965 | |
| 20966 | /* "View.MemoryView":1286 |
| 20967 | * |
| 20968 | * |
| 20969 | * transpose_memslice(&src) # <<<<<<<<<<<<<< |
| 20970 | * transpose_memslice(&dst) |
| 20971 | * |
| 20972 | */ |
| 20973 | __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == 0)__builtin_expect(!!(__pyx_t_5 == 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1286; __pyx_clineno = __LINE__20973; goto __pyx_L1_error;} |
| 20974 | |
| 20975 | /* "View.MemoryView":1287 |
| 20976 | * |
| 20977 | * transpose_memslice(&src) |
| 20978 | * transpose_memslice(&dst) # <<<<<<<<<<<<<< |
| 20979 | * |
| 20980 | * refcount_copying(&dst, dtype_is_object, ndim, False) |
| 20981 | */ |
| 20982 | __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == 0)__builtin_expect(!!(__pyx_t_5 == 0), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1287; __pyx_clineno = __LINE__20982; goto __pyx_L1_error;} |
| 20983 | |
| 20984 | /* "View.MemoryView":1283 |
| 20985 | * return 0 |
| 20986 | * |
| 20987 | * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< |
| 20988 | * |
| 20989 | * |
| 20990 | */ |
| 20991 | } |
| 20992 | |
| 20993 | /* "View.MemoryView":1289 |
| 20994 | * transpose_memslice(&dst) |
| 20995 | * |
| 20996 | * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<< |
| 20997 | * copy_strided_to_strided(&src, &dst, ndim, itemsize) |
| 20998 | * refcount_copying(&dst, dtype_is_object, ndim, True) |
| 20999 | */ |
| 21000 | __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); |
| 21001 | |
| 21002 | /* "View.MemoryView":1290 |
| 21003 | * |
| 21004 | * refcount_copying(&dst, dtype_is_object, ndim, False) |
| 21005 | * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<< |
| 21006 | * refcount_copying(&dst, dtype_is_object, ndim, True) |
| 21007 | * |
| 21008 | */ |
| 21009 | copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize); |
| 21010 | |
| 21011 | /* "View.MemoryView":1291 |
| 21012 | * refcount_copying(&dst, dtype_is_object, ndim, False) |
| 21013 | * copy_strided_to_strided(&src, &dst, ndim, itemsize) |
| 21014 | * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<< |
| 21015 | * |
| 21016 | * free(tmpdata) |
| 21017 | */ |
| 21018 | __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); |
| 21019 | |
| 21020 | /* "View.MemoryView":1293 |
| 21021 | * refcount_copying(&dst, dtype_is_object, ndim, True) |
| 21022 | * |
| 21023 | * free(tmpdata) # <<<<<<<<<<<<<< |
| 21024 | * return 0 |
| 21025 | * |
| 21026 | */ |
| 21027 | free(__pyx_v_tmpdata); |
| 21028 | |
| 21029 | /* "View.MemoryView":1294 |
| 21030 | * |
| 21031 | * free(tmpdata) |
| 21032 | * return 0 # <<<<<<<<<<<<<< |
| 21033 | * |
| 21034 | * @cname('__pyx_memoryview_broadcast_leading') |
| 21035 | */ |
| 21036 | __pyx_r = 0; |
| 21037 | goto __pyx_L0; |
| 21038 | |
| 21039 | /* "View.MemoryView":1225 |
| 21040 | * |
| 21041 | * @cname('__pyx_memoryview_copy_contents') |
| 21042 | * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<< |
| 21043 | * __Pyx_memviewslice dst, |
| 21044 | * int src_ndim, int dst_ndim, |
| 21045 | */ |
| 21046 | |
| 21047 | /* function exit code */ |
| 21048 | __pyx_L1_error:; |
| 21049 | { |
| 21050 | #ifdef WITH_THREAD1 |
| 21051 | PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); |
| 21052 | #endif |
| 21053 | __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 21054 | #ifdef WITH_THREAD1 |
| 21055 | PyGILState_Release(__pyx_gilstate_save); |
| 21056 | #endif |
| 21057 | } |
| 21058 | __pyx_r = -1; |
| 21059 | __pyx_L0:; |
| 21060 | return __pyx_r; |
| 21061 | } |
| 21062 | |
| 21063 | /* "View.MemoryView":1297 |
| 21064 | * |
| 21065 | * @cname('__pyx_memoryview_broadcast_leading') |
| 21066 | * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<< |
| 21067 | * int ndim, |
| 21068 | * int ndim_other) nogil: |
| 21069 | */ |
| 21070 | |
| 21071 | static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) { |
| 21072 | int __pyx_v_i; |
| 21073 | int __pyx_v_offset; |
| 21074 | int __pyx_t_1; |
| 21075 | int __pyx_t_2; |
| 21076 | |
| 21077 | /* "View.MemoryView":1301 |
| 21078 | * int ndim_other) nogil: |
| 21079 | * cdef int i |
| 21080 | * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<< |
| 21081 | * |
| 21082 | * for i in range(ndim - 1, -1, -1): |
| 21083 | */ |
| 21084 | __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim); |
| 21085 | |
| 21086 | /* "View.MemoryView":1303 |
| 21087 | * cdef int offset = ndim_other - ndim |
| 21088 | * |
| 21089 | * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< |
| 21090 | * mslice.shape[i + offset] = mslice.shape[i] |
| 21091 | * mslice.strides[i + offset] = mslice.strides[i] |
| 21092 | */ |
| 21093 | for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1L; __pyx_t_1-=1) { |
| 21094 | __pyx_v_i = __pyx_t_1; |
| 21095 | |
| 21096 | /* "View.MemoryView":1304 |
| 21097 | * |
| 21098 | * for i in range(ndim - 1, -1, -1): |
| 21099 | * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<< |
| 21100 | * mslice.strides[i + offset] = mslice.strides[i] |
| 21101 | * mslice.suboffsets[i + offset] = mslice.suboffsets[i] |
| 21102 | */ |
| 21103 | (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]); |
| 21104 | |
| 21105 | /* "View.MemoryView":1305 |
| 21106 | * for i in range(ndim - 1, -1, -1): |
| 21107 | * mslice.shape[i + offset] = mslice.shape[i] |
| 21108 | * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<< |
| 21109 | * mslice.suboffsets[i + offset] = mslice.suboffsets[i] |
| 21110 | * |
| 21111 | */ |
| 21112 | (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]); |
| 21113 | |
| 21114 | /* "View.MemoryView":1306 |
| 21115 | * mslice.shape[i + offset] = mslice.shape[i] |
| 21116 | * mslice.strides[i + offset] = mslice.strides[i] |
| 21117 | * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<< |
| 21118 | * |
| 21119 | * for i in range(offset): |
| 21120 | */ |
| 21121 | (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]); |
| 21122 | } |
| 21123 | |
| 21124 | /* "View.MemoryView":1308 |
| 21125 | * mslice.suboffsets[i + offset] = mslice.suboffsets[i] |
| 21126 | * |
| 21127 | * for i in range(offset): # <<<<<<<<<<<<<< |
| 21128 | * mslice.shape[i] = 1 |
| 21129 | * mslice.strides[i] = mslice.strides[0] |
| 21130 | */ |
| 21131 | __pyx_t_1 = __pyx_v_offset; |
| 21132 | for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { |
| 21133 | __pyx_v_i = __pyx_t_2; |
| 21134 | |
| 21135 | /* "View.MemoryView":1309 |
| 21136 | * |
| 21137 | * for i in range(offset): |
| 21138 | * mslice.shape[i] = 1 # <<<<<<<<<<<<<< |
| 21139 | * mslice.strides[i] = mslice.strides[0] |
| 21140 | * mslice.suboffsets[i] = -1 |
| 21141 | */ |
| 21142 | (__pyx_v_mslice->shape[__pyx_v_i]) = 1; |
| 21143 | |
| 21144 | /* "View.MemoryView":1310 |
| 21145 | * for i in range(offset): |
| 21146 | * mslice.shape[i] = 1 |
| 21147 | * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<< |
| 21148 | * mslice.suboffsets[i] = -1 |
| 21149 | * |
| 21150 | */ |
| 21151 | (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]); |
| 21152 | |
| 21153 | /* "View.MemoryView":1311 |
| 21154 | * mslice.shape[i] = 1 |
| 21155 | * mslice.strides[i] = mslice.strides[0] |
| 21156 | * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< |
| 21157 | * |
| 21158 | * |
| 21159 | */ |
| 21160 | (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L; |
| 21161 | } |
| 21162 | |
| 21163 | /* "View.MemoryView":1297 |
| 21164 | * |
| 21165 | * @cname('__pyx_memoryview_broadcast_leading') |
| 21166 | * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<< |
| 21167 | * int ndim, |
| 21168 | * int ndim_other) nogil: |
| 21169 | */ |
| 21170 | |
| 21171 | /* function exit code */ |
| 21172 | } |
| 21173 | |
| 21174 | /* "View.MemoryView":1319 |
| 21175 | * |
| 21176 | * @cname('__pyx_memoryview_refcount_copying') |
| 21177 | * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<< |
| 21178 | * int ndim, bint inc) nogil: |
| 21179 | * |
| 21180 | */ |
| 21181 | |
| 21182 | static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) { |
| 21183 | int __pyx_t_1; |
| 21184 | |
| 21185 | /* "View.MemoryView":1323 |
| 21186 | * |
| 21187 | * |
| 21188 | * if dtype_is_object: # <<<<<<<<<<<<<< |
| 21189 | * refcount_objects_in_slice_with_gil(dst.data, dst.shape, |
| 21190 | * dst.strides, ndim, inc) |
| 21191 | */ |
| 21192 | __pyx_t_1 = (__pyx_v_dtype_is_object != 0); |
| 21193 | if (__pyx_t_1) { |
| 21194 | |
| 21195 | /* "View.MemoryView":1324 |
| 21196 | * |
| 21197 | * if dtype_is_object: |
| 21198 | * refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<< |
| 21199 | * dst.strides, ndim, inc) |
| 21200 | * |
| 21201 | */ |
| 21202 | __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc); |
| 21203 | |
| 21204 | /* "View.MemoryView":1323 |
| 21205 | * |
| 21206 | * |
| 21207 | * if dtype_is_object: # <<<<<<<<<<<<<< |
| 21208 | * refcount_objects_in_slice_with_gil(dst.data, dst.shape, |
| 21209 | * dst.strides, ndim, inc) |
| 21210 | */ |
| 21211 | } |
| 21212 | |
| 21213 | /* "View.MemoryView":1319 |
| 21214 | * |
| 21215 | * @cname('__pyx_memoryview_refcount_copying') |
| 21216 | * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<< |
| 21217 | * int ndim, bint inc) nogil: |
| 21218 | * |
| 21219 | */ |
| 21220 | |
| 21221 | /* function exit code */ |
| 21222 | } |
| 21223 | |
| 21224 | /* "View.MemoryView":1328 |
| 21225 | * |
| 21226 | * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') |
| 21227 | * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< |
| 21228 | * Py_ssize_t *strides, int ndim, |
| 21229 | * bint inc) with gil: |
| 21230 | */ |
| 21231 | |
| 21232 | static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { |
| 21233 | __Pyx_RefNannyDeclarations |
| 21234 | #ifdef WITH_THREAD1 |
| 21235 | PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); |
| 21236 | #endif |
| 21237 | __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0); |
| 21238 | |
| 21239 | /* "View.MemoryView":1331 |
| 21240 | * Py_ssize_t *strides, int ndim, |
| 21241 | * bint inc) with gil: |
| 21242 | * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<< |
| 21243 | * |
| 21244 | * @cname('__pyx_memoryview_refcount_objects_in_slice') |
| 21245 | */ |
| 21246 | __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc); |
| 21247 | |
| 21248 | /* "View.MemoryView":1328 |
| 21249 | * |
| 21250 | * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') |
| 21251 | * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< |
| 21252 | * Py_ssize_t *strides, int ndim, |
| 21253 | * bint inc) with gil: |
| 21254 | */ |
| 21255 | |
| 21256 | /* function exit code */ |
| 21257 | __Pyx_RefNannyFinishContext(); |
| 21258 | #ifdef WITH_THREAD1 |
| 21259 | PyGILState_Release(__pyx_gilstate_save); |
| 21260 | #endif |
| 21261 | } |
| 21262 | |
| 21263 | /* "View.MemoryView":1334 |
| 21264 | * |
| 21265 | * @cname('__pyx_memoryview_refcount_objects_in_slice') |
| 21266 | * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< |
| 21267 | * Py_ssize_t *strides, int ndim, bint inc): |
| 21268 | * cdef Py_ssize_t i |
| 21269 | */ |
| 21270 | |
| 21271 | static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { |
| 21272 | CYTHON_UNUSED__attribute__ ((__unused__)) Py_ssize_t __pyx_v_i; |
| 21273 | __Pyx_RefNannyDeclarations |
| 21274 | Py_ssize_t __pyx_t_1; |
| 21275 | Py_ssize_t __pyx_t_2; |
| 21276 | int __pyx_t_3; |
| 21277 | __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0); |
| 21278 | |
| 21279 | /* "View.MemoryView":1338 |
| 21280 | * cdef Py_ssize_t i |
| 21281 | * |
| 21282 | * for i in range(shape[0]): # <<<<<<<<<<<<<< |
| 21283 | * if ndim == 1: |
| 21284 | * if inc: |
| 21285 | */ |
| 21286 | __pyx_t_1 = (__pyx_v_shape[0]); |
| 21287 | for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { |
| 21288 | __pyx_v_i = __pyx_t_2; |
| 21289 | |
| 21290 | /* "View.MemoryView":1339 |
| 21291 | * |
| 21292 | * for i in range(shape[0]): |
| 21293 | * if ndim == 1: # <<<<<<<<<<<<<< |
| 21294 | * if inc: |
| 21295 | * Py_INCREF((<PyObject **> data)[0]) |
| 21296 | */ |
| 21297 | __pyx_t_3 = ((__pyx_v_ndim == 1) != 0); |
| 21298 | if (__pyx_t_3) { |
| 21299 | |
| 21300 | /* "View.MemoryView":1340 |
| 21301 | * for i in range(shape[0]): |
| 21302 | * if ndim == 1: |
| 21303 | * if inc: # <<<<<<<<<<<<<< |
| 21304 | * Py_INCREF((<PyObject **> data)[0]) |
| 21305 | * else: |
| 21306 | */ |
| 21307 | __pyx_t_3 = (__pyx_v_inc != 0); |
| 21308 | if (__pyx_t_3) { |
| 21309 | |
| 21310 | /* "View.MemoryView":1341 |
| 21311 | * if ndim == 1: |
| 21312 | * if inc: |
| 21313 | * Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<< |
| 21314 | * else: |
| 21315 | * Py_DECREF((<PyObject **> data)[0]) |
| 21316 | */ |
| 21317 | Py_INCREF((((PyObject **)__pyx_v_data)[0]))( ((PyObject*)((((PyObject **)__pyx_v_data)[0])))->ob_refcnt ++); |
| 21318 | |
| 21319 | /* "View.MemoryView":1340 |
| 21320 | * for i in range(shape[0]): |
| 21321 | * if ndim == 1: |
| 21322 | * if inc: # <<<<<<<<<<<<<< |
| 21323 | * Py_INCREF((<PyObject **> data)[0]) |
| 21324 | * else: |
| 21325 | */ |
| 21326 | goto __pyx_L6; |
| 21327 | } |
| 21328 | |
| 21329 | /* "View.MemoryView":1343 |
| 21330 | * Py_INCREF((<PyObject **> data)[0]) |
| 21331 | * else: |
| 21332 | * Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<< |
| 21333 | * else: |
| 21334 | * refcount_objects_in_slice(data, shape + 1, strides + 1, |
| 21335 | */ |
| 21336 | /*else*/ { |
| 21337 | Py_DECREF((((PyObject **)__pyx_v_data)[0]))do { if ( --((PyObject*)((((PyObject **)__pyx_v_data)[0])))-> ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((((PyObject **)__pyx_v_data)[0]))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((((PyObject **)__pyx_v_data)[0]))))); } while (0); |
| 21338 | } |
| 21339 | __pyx_L6:; |
| 21340 | |
| 21341 | /* "View.MemoryView":1339 |
| 21342 | * |
| 21343 | * for i in range(shape[0]): |
| 21344 | * if ndim == 1: # <<<<<<<<<<<<<< |
| 21345 | * if inc: |
| 21346 | * Py_INCREF((<PyObject **> data)[0]) |
| 21347 | */ |
| 21348 | goto __pyx_L5; |
| 21349 | } |
| 21350 | |
| 21351 | /* "View.MemoryView":1345 |
| 21352 | * Py_DECREF((<PyObject **> data)[0]) |
| 21353 | * else: |
| 21354 | * refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<< |
| 21355 | * ndim - 1, inc) |
| 21356 | * |
| 21357 | */ |
| 21358 | /*else*/ { |
| 21359 | |
| 21360 | /* "View.MemoryView":1346 |
| 21361 | * else: |
| 21362 | * refcount_objects_in_slice(data, shape + 1, strides + 1, |
| 21363 | * ndim - 1, inc) # <<<<<<<<<<<<<< |
| 21364 | * |
| 21365 | * data += strides[0] |
| 21366 | */ |
| 21367 | __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc); |
| 21368 | } |
| 21369 | __pyx_L5:; |
| 21370 | |
| 21371 | /* "View.MemoryView":1348 |
| 21372 | * ndim - 1, inc) |
| 21373 | * |
| 21374 | * data += strides[0] # <<<<<<<<<<<<<< |
| 21375 | * |
| 21376 | * |
| 21377 | */ |
| 21378 | __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0])); |
| 21379 | } |
| 21380 | |
| 21381 | /* "View.MemoryView":1334 |
| 21382 | * |
| 21383 | * @cname('__pyx_memoryview_refcount_objects_in_slice') |
| 21384 | * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< |
| 21385 | * Py_ssize_t *strides, int ndim, bint inc): |
| 21386 | * cdef Py_ssize_t i |
| 21387 | */ |
| 21388 | |
| 21389 | /* function exit code */ |
| 21390 | __Pyx_RefNannyFinishContext(); |
| 21391 | } |
| 21392 | |
| 21393 | /* "View.MemoryView":1354 |
| 21394 | * |
| 21395 | * @cname('__pyx_memoryview_slice_assign_scalar') |
| 21396 | * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<< |
| 21397 | * size_t itemsize, void *item, |
| 21398 | * bint dtype_is_object) nogil: |
| 21399 | */ |
| 21400 | |
| 21401 | static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) { |
| 21402 | |
| 21403 | /* "View.MemoryView":1357 |
| 21404 | * size_t itemsize, void *item, |
| 21405 | * bint dtype_is_object) nogil: |
| 21406 | * refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<< |
| 21407 | * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, |
| 21408 | * itemsize, item) |
| 21409 | */ |
| 21410 | __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0); |
| 21411 | |
| 21412 | /* "View.MemoryView":1358 |
| 21413 | * bint dtype_is_object) nogil: |
| 21414 | * refcount_copying(dst, dtype_is_object, ndim, False) |
| 21415 | * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<< |
| 21416 | * itemsize, item) |
| 21417 | * refcount_copying(dst, dtype_is_object, ndim, True) |
| 21418 | */ |
| 21419 | __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item); |
| 21420 | |
| 21421 | /* "View.MemoryView":1360 |
| 21422 | * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, |
| 21423 | * itemsize, item) |
| 21424 | * refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<< |
| 21425 | * |
| 21426 | * |
| 21427 | */ |
| 21428 | __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1); |
| 21429 | |
| 21430 | /* "View.MemoryView":1354 |
| 21431 | * |
| 21432 | * @cname('__pyx_memoryview_slice_assign_scalar') |
| 21433 | * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<< |
| 21434 | * size_t itemsize, void *item, |
| 21435 | * bint dtype_is_object) nogil: |
| 21436 | */ |
| 21437 | |
| 21438 | /* function exit code */ |
| 21439 | } |
| 21440 | |
| 21441 | /* "View.MemoryView":1364 |
| 21442 | * |
| 21443 | * @cname('__pyx_memoryview__slice_assign_scalar') |
| 21444 | * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< |
| 21445 | * Py_ssize_t *strides, int ndim, |
| 21446 | * size_t itemsize, void *item) nogil: |
| 21447 | */ |
| 21448 | |
| 21449 | static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) { |
| 21450 | CYTHON_UNUSED__attribute__ ((__unused__)) Py_ssize_t __pyx_v_i; |
| 21451 | Py_ssize_t __pyx_v_stride; |
| 21452 | Py_ssize_t __pyx_v_extent; |
| 21453 | int __pyx_t_1; |
| 21454 | Py_ssize_t __pyx_t_2; |
| 21455 | Py_ssize_t __pyx_t_3; |
| 21456 | |
| 21457 | /* "View.MemoryView":1368 |
| 21458 | * size_t itemsize, void *item) nogil: |
| 21459 | * cdef Py_ssize_t i |
| 21460 | * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<< |
| 21461 | * cdef Py_ssize_t extent = shape[0] |
| 21462 | * |
| 21463 | */ |
| 21464 | __pyx_v_stride = (__pyx_v_strides[0]); |
| 21465 | |
| 21466 | /* "View.MemoryView":1369 |
| 21467 | * cdef Py_ssize_t i |
| 21468 | * cdef Py_ssize_t stride = strides[0] |
| 21469 | * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<< |
| 21470 | * |
| 21471 | * if ndim == 1: |
| 21472 | */ |
| 21473 | __pyx_v_extent = (__pyx_v_shape[0]); |
| 21474 | |
| 21475 | /* "View.MemoryView":1371 |
| 21476 | * cdef Py_ssize_t extent = shape[0] |
| 21477 | * |
| 21478 | * if ndim == 1: # <<<<<<<<<<<<<< |
| 21479 | * for i in range(extent): |
| 21480 | * memcpy(data, item, itemsize) |
| 21481 | */ |
| 21482 | __pyx_t_1 = ((__pyx_v_ndim == 1) != 0); |
| 21483 | if (__pyx_t_1) { |
| 21484 | |
| 21485 | /* "View.MemoryView":1372 |
| 21486 | * |
| 21487 | * if ndim == 1: |
| 21488 | * for i in range(extent): # <<<<<<<<<<<<<< |
| 21489 | * memcpy(data, item, itemsize) |
| 21490 | * data += stride |
| 21491 | */ |
| 21492 | __pyx_t_2 = __pyx_v_extent; |
| 21493 | for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { |
| 21494 | __pyx_v_i = __pyx_t_3; |
| 21495 | |
| 21496 | /* "View.MemoryView":1373 |
| 21497 | * if ndim == 1: |
| 21498 | * for i in range(extent): |
| 21499 | * memcpy(data, item, itemsize) # <<<<<<<<<<<<<< |
| 21500 | * data += stride |
| 21501 | * else: |
| 21502 | */ |
| 21503 | memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize); |
| 21504 | |
| 21505 | /* "View.MemoryView":1374 |
| 21506 | * for i in range(extent): |
| 21507 | * memcpy(data, item, itemsize) |
| 21508 | * data += stride # <<<<<<<<<<<<<< |
| 21509 | * else: |
| 21510 | * for i in range(extent): |
| 21511 | */ |
| 21512 | __pyx_v_data = (__pyx_v_data + __pyx_v_stride); |
| 21513 | } |
| 21514 | |
| 21515 | /* "View.MemoryView":1371 |
| 21516 | * cdef Py_ssize_t extent = shape[0] |
| 21517 | * |
| 21518 | * if ndim == 1: # <<<<<<<<<<<<<< |
| 21519 | * for i in range(extent): |
| 21520 | * memcpy(data, item, itemsize) |
| 21521 | */ |
| 21522 | goto __pyx_L3; |
| 21523 | } |
| 21524 | |
| 21525 | /* "View.MemoryView":1376 |
| 21526 | * data += stride |
| 21527 | * else: |
| 21528 | * for i in range(extent): # <<<<<<<<<<<<<< |
| 21529 | * _slice_assign_scalar(data, shape + 1, strides + 1, |
| 21530 | * ndim - 1, itemsize, item) |
| 21531 | */ |
| 21532 | /*else*/ { |
| 21533 | __pyx_t_2 = __pyx_v_extent; |
| 21534 | for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { |
| 21535 | __pyx_v_i = __pyx_t_3; |
| 21536 | |
| 21537 | /* "View.MemoryView":1377 |
| 21538 | * else: |
| 21539 | * for i in range(extent): |
| 21540 | * _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<< |
| 21541 | * ndim - 1, itemsize, item) |
| 21542 | * data += stride |
| 21543 | */ |
| 21544 | __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item); |
| 21545 | |
| 21546 | /* "View.MemoryView":1379 |
| 21547 | * _slice_assign_scalar(data, shape + 1, strides + 1, |
| 21548 | * ndim - 1, itemsize, item) |
| 21549 | * data += stride # <<<<<<<<<<<<<< |
| 21550 | * |
| 21551 | * |
| 21552 | */ |
| 21553 | __pyx_v_data = (__pyx_v_data + __pyx_v_stride); |
| 21554 | } |
| 21555 | } |
| 21556 | __pyx_L3:; |
| 21557 | |
| 21558 | /* "View.MemoryView":1364 |
| 21559 | * |
| 21560 | * @cname('__pyx_memoryview__slice_assign_scalar') |
| 21561 | * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< |
| 21562 | * Py_ssize_t *strides, int ndim, |
| 21563 | * size_t itemsize, void *item) nogil: |
| 21564 | */ |
| 21565 | |
| 21566 | /* function exit code */ |
| 21567 | } |
| 21568 | |
| 21569 | /* "BufferFormatFromTypeInfo":1420 |
| 21570 | * |
| 21571 | * @cname('__pyx_format_from_typeinfo') |
| 21572 | * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<< |
| 21573 | * cdef __Pyx_StructField *field |
| 21574 | * cdef __pyx_typeinfo_string fmt |
| 21575 | */ |
| 21576 | |
| 21577 | static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *__pyx_v_type) { |
| 21578 | __Pyx_StructField *__pyx_v_field; |
| 21579 | struct __pyx_typeinfo_string __pyx_v_fmt; |
| 21580 | PyObject *__pyx_v_part = 0; |
| 21581 | PyObject *__pyx_v_result = 0; |
| 21582 | PyObject *__pyx_v_alignment = NULL((void*)0); |
| 21583 | PyObject *__pyx_v_parts = NULL((void*)0); |
| 21584 | PyObject *__pyx_v_extents = NULL((void*)0); |
| 21585 | int __pyx_v_i; |
| 21586 | PyObject *__pyx_r = NULL((void*)0); |
| 21587 | __Pyx_RefNannyDeclarations |
| 21588 | int __pyx_t_1; |
| 21589 | int __pyx_t_2; |
| 21590 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 21591 | __Pyx_StructField *__pyx_t_4; |
| 21592 | PyObject *__pyx_t_5 = NULL((void*)0); |
| 21593 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 21594 | int __pyx_t_7; |
| 21595 | int __pyx_t_8; |
| 21596 | int __pyx_t_9; |
| 21597 | int __pyx_lineno = 0; |
| 21598 | const char *__pyx_filename = NULL((void*)0); |
| 21599 | int __pyx_clineno = 0; |
| 21600 | __Pyx_RefNannySetupContext("format_from_typeinfo", 0); |
| 21601 | |
| 21602 | /* "BufferFormatFromTypeInfo":1425 |
| 21603 | * cdef bytes part, result |
| 21604 | * |
| 21605 | * if type.typegroup == 'S': # <<<<<<<<<<<<<< |
| 21606 | * assert type.fields != NULL and type.fields.type != NULL |
| 21607 | * |
| 21608 | */ |
| 21609 | __pyx_t_1 = ((__pyx_v_type->typegroup == 'S') != 0); |
| 21610 | if (__pyx_t_1) { |
| 21611 | |
| 21612 | /* "BufferFormatFromTypeInfo":1426 |
| 21613 | * |
| 21614 | * if type.typegroup == 'S': |
| 21615 | * assert type.fields != NULL and type.fields.type != NULL # <<<<<<<<<<<<<< |
| 21616 | * |
| 21617 | * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: |
| 21618 | */ |
| 21619 | #ifndef CYTHON_WITHOUT_ASSERTIONS |
| 21620 | if (unlikely(!Py_OptimizeFlag)__builtin_expect(!!(!Py_OptimizeFlag), 0)) { |
| 21621 | __pyx_t_2 = ((__pyx_v_type->fields != NULL((void*)0)) != 0); |
| 21622 | if (__pyx_t_2) { |
| 21623 | } else { |
| 21624 | __pyx_t_1 = __pyx_t_2; |
| 21625 | goto __pyx_L4_bool_binop_done; |
| 21626 | } |
| 21627 | __pyx_t_2 = ((__pyx_v_type->fields->type != NULL((void*)0)) != 0); |
| 21628 | __pyx_t_1 = __pyx_t_2; |
| 21629 | __pyx_L4_bool_binop_done:; |
| 21630 | if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) { |
| 21631 | PyErr_SetNone(PyExc_AssertionError); |
| 21632 | {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1426; __pyx_clineno = __LINE__21632; goto __pyx_L1_error;} |
| 21633 | } |
| 21634 | } |
| 21635 | #endif |
| 21636 | |
| 21637 | /* "BufferFormatFromTypeInfo":1428 |
| 21638 | * assert type.fields != NULL and type.fields.type != NULL |
| 21639 | * |
| 21640 | * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<< |
| 21641 | * alignment = b'^' |
| 21642 | * else: |
| 21643 | */ |
| 21644 | __pyx_t_1 = ((__pyx_v_type->flags & __PYX_BUF_FLAGS_PACKED_STRUCT(1 << 0)) != 0); |
| 21645 | if (__pyx_t_1) { |
| 21646 | |
| 21647 | /* "BufferFormatFromTypeInfo":1429 |
| 21648 | * |
| 21649 | * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: |
| 21650 | * alignment = b'^' # <<<<<<<<<<<<<< |
| 21651 | * else: |
| 21652 | * alignment = b'' |
| 21653 | */ |
| 21654 | __Pyx_INCREF(__pyx_kp_b__36)( ((PyObject*)(__pyx_kp_b__36))->ob_refcnt++); |
| 21655 | __pyx_v_alignment = __pyx_kp_b__36; |
| 21656 | |
| 21657 | /* "BufferFormatFromTypeInfo":1428 |
| 21658 | * assert type.fields != NULL and type.fields.type != NULL |
| 21659 | * |
| 21660 | * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<< |
| 21661 | * alignment = b'^' |
| 21662 | * else: |
| 21663 | */ |
| 21664 | goto __pyx_L6; |
| 21665 | } |
| 21666 | |
| 21667 | /* "BufferFormatFromTypeInfo":1431 |
| 21668 | * alignment = b'^' |
| 21669 | * else: |
| 21670 | * alignment = b'' # <<<<<<<<<<<<<< |
| 21671 | * |
| 21672 | * parts = [b"T{"] |
| 21673 | */ |
| 21674 | /*else*/ { |
| 21675 | __Pyx_INCREF(__pyx_kp_b__37)( ((PyObject*)(__pyx_kp_b__37))->ob_refcnt++); |
| 21676 | __pyx_v_alignment = __pyx_kp_b__37; |
| 21677 | } |
| 21678 | __pyx_L6:; |
| 21679 | |
| 21680 | /* "BufferFormatFromTypeInfo":1433 |
| 21681 | * alignment = b'' |
| 21682 | * |
| 21683 | * parts = [b"T{"] # <<<<<<<<<<<<<< |
| 21684 | * field = type.fields |
| 21685 | * |
| 21686 | */ |
| 21687 | __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1433; __pyx_clineno = __LINE__21687; goto __pyx_L1_error;} |
| 21688 | __Pyx_GOTREF(__pyx_t_3); |
| 21689 | __Pyx_INCREF(__pyx_kp_b_T)( ((PyObject*)(__pyx_kp_b_T))->ob_refcnt++); |
| 21690 | __Pyx_GIVEREF(__pyx_kp_b_T); |
| 21691 | PyList_SET_ITEM(__pyx_t_3, 0, __pyx_kp_b_T)(((PyListObject *)(__pyx_t_3))->ob_item[0] = (__pyx_kp_b_T )); |
| 21692 | __pyx_v_parts = ((PyObject*)__pyx_t_3); |
| 21693 | __pyx_t_3 = 0; |
| 21694 | |
| 21695 | /* "BufferFormatFromTypeInfo":1434 |
| 21696 | * |
| 21697 | * parts = [b"T{"] |
| 21698 | * field = type.fields # <<<<<<<<<<<<<< |
| 21699 | * |
| 21700 | * while field.type: |
| 21701 | */ |
| 21702 | __pyx_t_4 = __pyx_v_type->fields; |
| 21703 | __pyx_v_field = __pyx_t_4; |
| 21704 | |
| 21705 | /* "BufferFormatFromTypeInfo":1436 |
| 21706 | * field = type.fields |
| 21707 | * |
| 21708 | * while field.type: # <<<<<<<<<<<<<< |
| 21709 | * part = format_from_typeinfo(field.type) |
| 21710 | * parts.append(part + b':' + field.name + b':') |
| 21711 | */ |
| 21712 | while (1) { |
| 21713 | __pyx_t_1 = (__pyx_v_field->type != 0); |
| 21714 | if (!__pyx_t_1) break; |
| 21715 | |
| 21716 | /* "BufferFormatFromTypeInfo":1437 |
| 21717 | * |
| 21718 | * while field.type: |
| 21719 | * part = format_from_typeinfo(field.type) # <<<<<<<<<<<<<< |
| 21720 | * parts.append(part + b':' + field.name + b':') |
| 21721 | * field += 1 |
| 21722 | */ |
| 21723 | __pyx_t_3 = __pyx_format_from_typeinfo(__pyx_v_field->type); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1437; __pyx_clineno = __LINE__21723; goto __pyx_L1_error;} |
| 21724 | __Pyx_GOTREF(__pyx_t_3); |
| 21725 | __Pyx_XDECREF_SET(__pyx_v_part, ((PyObject*)__pyx_t_3))do { PyObject *tmp = (PyObject *) __pyx_v_part; __pyx_v_part = ((PyObject*)__pyx_t_3); 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); |
| 21726 | __pyx_t_3 = 0; |
| 21727 | |
| 21728 | /* "BufferFormatFromTypeInfo":1438 |
| 21729 | * while field.type: |
| 21730 | * part = format_from_typeinfo(field.type) |
| 21731 | * parts.append(part + b':' + field.name + b':') # <<<<<<<<<<<<<< |
| 21732 | * field += 1 |
| 21733 | * |
| 21734 | */ |
| 21735 | __pyx_t_3 = PyNumber_Add(__pyx_v_part, __pyx_kp_b__38); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1438; __pyx_clineno = __LINE__21735; goto __pyx_L1_error;} |
| 21736 | __Pyx_GOTREF(__pyx_t_3); |
| 21737 | __pyx_t_5 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_field->name); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1438; __pyx_clineno = __LINE__21737; goto __pyx_L1_error;} |
| 21738 | __Pyx_GOTREF(__pyx_t_5); |
| 21739 | __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1438; __pyx_clineno = __LINE__21739; goto __pyx_L1_error;} |
| 21740 | __Pyx_GOTREF(__pyx_t_6); |
| 21741 | __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; |
| 21742 | __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; |
| 21743 | __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__38); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1438; __pyx_clineno = __LINE__21743; goto __pyx_L1_error;} |
| 21744 | __Pyx_GOTREF(__pyx_t_5); |
| 21745 | __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; |
| 21746 | __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_5); if (unlikely(__pyx_t_7 == -1)__builtin_expect(!!(__pyx_t_7 == -1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1438; __pyx_clineno = __LINE__21746; goto __pyx_L1_error;} |
| 21747 | __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; |
| 21748 | |
| 21749 | /* "BufferFormatFromTypeInfo":1439 |
| 21750 | * part = format_from_typeinfo(field.type) |
| 21751 | * parts.append(part + b':' + field.name + b':') |
| 21752 | * field += 1 # <<<<<<<<<<<<<< |
| 21753 | * |
| 21754 | * result = alignment.join(parts) + b'}' |
| 21755 | */ |
| 21756 | __pyx_v_field = (__pyx_v_field + 1); |
| 21757 | } |
| 21758 | |
| 21759 | /* "BufferFormatFromTypeInfo":1441 |
| 21760 | * field += 1 |
| 21761 | * |
| 21762 | * result = alignment.join(parts) + b'}' # <<<<<<<<<<<<<< |
| 21763 | * else: |
| 21764 | * fmt = __Pyx_TypeInfoToFormat(type) |
| 21765 | */ |
| 21766 | __pyx_t_5 = __Pyx_PyBytes_Join_PyString_Join(__pyx_v_alignment, __pyx_v_parts); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1441; __pyx_clineno = __LINE__21766; goto __pyx_L1_error;} |
| 21767 | __Pyx_GOTREF(__pyx_t_5); |
| 21768 | __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_kp_b__39); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1441; __pyx_clineno = __LINE__21768; goto __pyx_L1_error;} |
| 21769 | __Pyx_GOTREF(__pyx_t_6); |
| 21770 | __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; |
| 21771 | if (!(likely(PyBytes_CheckExact(__pyx_t_6))__builtin_expect(!!(((((PyObject*)(__pyx_t_6))->ob_type) == &PyString_Type)), 1)||((__pyx_t_6) == Py_None(&_Py_NoneStruct))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)(((PyObject*)(__pyx_t_6))->ob_type)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1441; __pyx_clineno = __LINE__21771; goto __pyx_L1_error;} |
| 21772 | __pyx_v_result = ((PyObject*)__pyx_t_6); |
| 21773 | __pyx_t_6 = 0; |
| 21774 | |
| 21775 | /* "BufferFormatFromTypeInfo":1425 |
| 21776 | * cdef bytes part, result |
| 21777 | * |
| 21778 | * if type.typegroup == 'S': # <<<<<<<<<<<<<< |
| 21779 | * assert type.fields != NULL and type.fields.type != NULL |
| 21780 | * |
| 21781 | */ |
| 21782 | goto __pyx_L3; |
| 21783 | } |
| 21784 | |
| 21785 | /* "BufferFormatFromTypeInfo":1443 |
| 21786 | * result = alignment.join(parts) + b'}' |
| 21787 | * else: |
| 21788 | * fmt = __Pyx_TypeInfoToFormat(type) # <<<<<<<<<<<<<< |
| 21789 | * if type.arraysize[0]: |
| 21790 | * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] |
| 21791 | */ |
| 21792 | /*else*/ { |
| 21793 | __pyx_v_fmt = __Pyx_TypeInfoToFormat(__pyx_v_type); |
| 21794 | |
| 21795 | /* "BufferFormatFromTypeInfo":1444 |
| 21796 | * else: |
| 21797 | * fmt = __Pyx_TypeInfoToFormat(type) |
| 21798 | * if type.arraysize[0]: # <<<<<<<<<<<<<< |
| 21799 | * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] |
| 21800 | * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string |
| 21801 | */ |
| 21802 | __pyx_t_1 = ((__pyx_v_type->arraysize[0]) != 0); |
| 21803 | if (__pyx_t_1) { |
| 21804 | |
| 21805 | /* "BufferFormatFromTypeInfo":1445 |
| 21806 | * fmt = __Pyx_TypeInfoToFormat(type) |
| 21807 | * if type.arraysize[0]: |
| 21808 | * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] # <<<<<<<<<<<<<< |
| 21809 | * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string |
| 21810 | * else: |
| 21811 | */ |
| 21812 | __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1445; __pyx_clineno = __LINE__21812; goto __pyx_L1_error;} |
| 21813 | __Pyx_GOTREF(__pyx_t_6); |
| 21814 | __pyx_t_8 = __pyx_v_type->ndim; |
| 21815 | for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { |
| 21816 | __pyx_v_i = __pyx_t_9; |
| 21817 | __pyx_t_5 = __Pyx_PyInt_FromSize_t((__pyx_v_type->arraysize[__pyx_v_i])); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1445; __pyx_clineno = __LINE__21817; goto __pyx_L1_error;} |
| 21818 | __Pyx_GOTREF(__pyx_t_5); |
| 21819 | __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1445; __pyx_clineno = __LINE__21819; goto __pyx_L1_error;} |
| 21820 | __Pyx_GOTREF(__pyx_t_3); |
| 21821 | __Pyx_GIVEREF(__pyx_t_5); |
| 21822 | PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); |
| 21823 | __pyx_t_5 = 0; |
| 21824 | __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1445; __pyx_clineno = __LINE__21824; goto __pyx_L1_error;} |
| 21825 | __Pyx_GOTREF(__pyx_t_5); |
| 21826 | __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; |
| 21827 | if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_5))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_6, (PyObject *)__pyx_t_5)), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1445; __pyx_clineno = __LINE__21827; goto __pyx_L1_error;} |
| 21828 | __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; |
| 21829 | } |
| 21830 | __pyx_v_extents = ((PyObject*)__pyx_t_6); |
| 21831 | __pyx_t_6 = 0; |
| 21832 | |
| 21833 | /* "BufferFormatFromTypeInfo":1446 |
| 21834 | * if type.arraysize[0]: |
| 21835 | * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] |
| 21836 | * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string # <<<<<<<<<<<<<< |
| 21837 | * else: |
| 21838 | * result = fmt.string |
| 21839 | */ |
| 21840 | __pyx_t_6 = PyUnicode_JoinPyUnicodeUCS4_Join(__pyx_kp_u__40, __pyx_v_extents); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1446; __pyx_clineno = __LINE__21840; goto __pyx_L1_error;} |
| 21841 | __Pyx_GOTREF(__pyx_t_6); |
| 21842 | __pyx_t_5 = PyUnicode_FormatPyUnicodeUCS4_Format(__pyx_kp_u_s, __pyx_t_6); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1446; __pyx_clineno = __LINE__21842; goto __pyx_L1_error;} |
| 21843 | __Pyx_GOTREF(__pyx_t_5); |
| 21844 | __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; |
| 21845 | __pyx_t_6 = PyUnicode_AsASCIIStringPyUnicodeUCS4_AsASCIIString(((PyObject*)__pyx_t_5)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1446; __pyx_clineno = __LINE__21845; goto __pyx_L1_error;} |
| 21846 | __Pyx_GOTREF(__pyx_t_6); |
| 21847 | __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; |
| 21848 | __pyx_t_5 = __Pyx_PyObject_FromStringPyString_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1446; __pyx_clineno = __LINE__21848; goto __pyx_L1_error;} |
| 21849 | __Pyx_GOTREF(__pyx_t_5); |
| 21850 | __pyx_t_3 = PyNumber_Add(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1446; __pyx_clineno = __LINE__21850; goto __pyx_L1_error;} |
| 21851 | __Pyx_GOTREF(__pyx_t_3); |
| 21852 | __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; |
| 21853 | __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; |
| 21854 | if (!(likely(PyBytes_CheckExact(__pyx_t_3))__builtin_expect(!!(((((PyObject*)(__pyx_t_3))->ob_type) == &PyString_Type)), 1)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)(((PyObject*)(__pyx_t_3))->ob_type)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1446; __pyx_clineno = __LINE__21854; goto __pyx_L1_error;} |
| 21855 | __pyx_v_result = ((PyObject*)__pyx_t_3); |
| 21856 | __pyx_t_3 = 0; |
| 21857 | |
| 21858 | /* "BufferFormatFromTypeInfo":1444 |
| 21859 | * else: |
| 21860 | * fmt = __Pyx_TypeInfoToFormat(type) |
| 21861 | * if type.arraysize[0]: # <<<<<<<<<<<<<< |
| 21862 | * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] |
| 21863 | * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string |
| 21864 | */ |
| 21865 | goto __pyx_L9; |
| 21866 | } |
| 21867 | |
| 21868 | /* "BufferFormatFromTypeInfo":1448 |
| 21869 | * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string |
| 21870 | * else: |
| 21871 | * result = fmt.string # <<<<<<<<<<<<<< |
| 21872 | * |
| 21873 | * return result |
| 21874 | */ |
| 21875 | /*else*/ { |
| 21876 | __pyx_t_3 = __Pyx_PyObject_FromStringPyString_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1448; __pyx_clineno = __LINE__21876; goto __pyx_L1_error;} |
| 21877 | __Pyx_GOTREF(__pyx_t_3); |
| 21878 | __pyx_v_result = ((PyObject*)__pyx_t_3); |
| 21879 | __pyx_t_3 = 0; |
| 21880 | } |
| 21881 | __pyx_L9:; |
| 21882 | } |
| 21883 | __pyx_L3:; |
| 21884 | |
| 21885 | /* "BufferFormatFromTypeInfo":1450 |
| 21886 | * result = fmt.string |
| 21887 | * |
| 21888 | * return result # <<<<<<<<<<<<<< |
| 21889 | */ |
| 21890 | __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); |
| 21891 | __Pyx_INCREF(__pyx_v_result)( ((PyObject*)(__pyx_v_result))->ob_refcnt++); |
| 21892 | __pyx_r = __pyx_v_result; |
| 21893 | goto __pyx_L0; |
| 21894 | |
| 21895 | /* "BufferFormatFromTypeInfo":1420 |
| 21896 | * |
| 21897 | * @cname('__pyx_format_from_typeinfo') |
| 21898 | * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<< |
| 21899 | * cdef __Pyx_StructField *field |
| 21900 | * cdef __pyx_typeinfo_string fmt |
| 21901 | */ |
| 21902 | |
| 21903 | /* function exit code */ |
| 21904 | __pyx_L1_error:; |
| 21905 | __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); |
| 21906 | __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); |
| 21907 | __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); |
| 21908 | __Pyx_AddTraceback("BufferFormatFromTypeInfo.format_from_typeinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 21909 | __pyx_r = 0; |
| 21910 | __pyx_L0:; |
| 21911 | __Pyx_XDECREF(__pyx_v_part)do { if ((__pyx_v_part) == ((void*)0)) ; else do { if ( --((PyObject *)(__pyx_v_part))->ob_refcnt != 0) ; else ( (*(((PyObject* )((PyObject *)(__pyx_v_part)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(__pyx_v_part)))); } while (0); } while (0); |
| 21912 | __Pyx_XDECREF(__pyx_v_result)do { if ((__pyx_v_result) == ((void*)0)) ; else do { if ( --( (PyObject*)(__pyx_v_result))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(__pyx_v_result)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_result)))); } while (0); } while (0); |
| 21913 | __Pyx_XDECREF(__pyx_v_alignment)do { if ((__pyx_v_alignment) == ((void*)0)) ; else do { if ( -- ((PyObject*)(__pyx_v_alignment))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_alignment)))->ob_type )->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_alignment )))); } while (0); } while (0); |
| 21914 | __Pyx_XDECREF(__pyx_v_parts)do { if ((__pyx_v_parts) == ((void*)0)) ; else do { if ( --(( PyObject*)(__pyx_v_parts))->ob_refcnt != 0) ; else ( (*((( PyObject*)((PyObject *)(__pyx_v_parts)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(__pyx_v_parts)))); } while (0); } while (0); |
| 21915 | __Pyx_XDECREF(__pyx_v_extents)do { if ((__pyx_v_extents) == ((void*)0)) ; else do { if ( -- ((PyObject*)(__pyx_v_extents))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(__pyx_v_extents)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_extents)))); } while (0); } while (0); |
| 21916 | __Pyx_XGIVEREF(__pyx_r); |
| 21917 | __Pyx_RefNannyFinishContext(); |
| 21918 | return __pyx_r; |
| 21919 | } |
| 21920 | |
| 21921 | static PyObject *__pyx_tp_new_3rgw_FileHandle(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) { |
| 21922 | PyObject *o; |
| 21923 | if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0 ), 1)) { |
| 21924 | o = (*t->tp_alloc)(t, 0); |
| 21925 | } else { |
| 21926 | o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); |
| 21927 | } |
| 21928 | if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0; |
| 21929 | return o; |
| 21930 | } |
| 21931 | |
| 21932 | static void __pyx_tp_dealloc_3rgw_FileHandle(PyObject *o) { |
| 21933 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 21934 | if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize ), 0) && (!PyType_IS_GC(Py_TYPE(o))(((((((PyObject*)(o))->ob_type)))->tp_flags & ((1L<< 14))) != 0) || !_PyGC_FINALIZED(o))) { |
| 21935 | if (PyObject_CallFinalizerFromDealloc(o)) return; |
| 21936 | } |
| 21937 | #endif |
| 21938 | (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o); |
| 21939 | } |
| 21940 | |
| 21941 | static PyTypeObject __pyx_type_3rgw_FileHandle = { |
| 21942 | PyVarObject_HEAD_INIT(0, 0)1, 0, 0, |
| 21943 | "rgw.FileHandle", /*tp_name*/ |
| 21944 | sizeof(struct __pyx_obj_3rgw_FileHandle), /*tp_basicsize*/ |
| 21945 | 0, /*tp_itemsize*/ |
| 21946 | __pyx_tp_dealloc_3rgw_FileHandle, /*tp_dealloc*/ |
| 21947 | 0, /*tp_print*/ |
| 21948 | 0, /*tp_getattr*/ |
| 21949 | 0, /*tp_setattr*/ |
| 21950 | #if PY_MAJOR_VERSION2 < 3 |
| 21951 | 0, /*tp_compare*/ |
| 21952 | #endif |
| 21953 | #if PY_MAJOR_VERSION2 >= 3 |
| 21954 | 0, /*tp_as_async*/ |
| 21955 | #endif |
| 21956 | 0, /*tp_repr*/ |
| 21957 | 0, /*tp_as_number*/ |
| 21958 | 0, /*tp_as_sequence*/ |
| 21959 | 0, /*tp_as_mapping*/ |
| 21960 | 0, /*tp_hash*/ |
| 21961 | 0, /*tp_call*/ |
| 21962 | 0, /*tp_str*/ |
| 21963 | 0, /*tp_getattro*/ |
| 21964 | 0, /*tp_setattro*/ |
| 21965 | 0, /*tp_as_buffer*/ |
| 21966 | 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), /*tp_flags*/ |
| 21967 | 0, /*tp_doc*/ |
| 21968 | 0, /*tp_traverse*/ |
| 21969 | 0, /*tp_clear*/ |
| 21970 | 0, /*tp_richcompare*/ |
| 21971 | 0, /*tp_weaklistoffset*/ |
| 21972 | 0, /*tp_iter*/ |
| 21973 | 0, /*tp_iternext*/ |
| 21974 | 0, /*tp_methods*/ |
| 21975 | 0, /*tp_members*/ |
| 21976 | 0, /*tp_getset*/ |
| 21977 | 0, /*tp_base*/ |
| 21978 | 0, /*tp_dict*/ |
| 21979 | 0, /*tp_descr_get*/ |
| 21980 | 0, /*tp_descr_set*/ |
| 21981 | 0, /*tp_dictoffset*/ |
| 21982 | 0, /*tp_init*/ |
| 21983 | 0, /*tp_alloc*/ |
| 21984 | __pyx_tp_new_3rgw_FileHandle, /*tp_new*/ |
| 21985 | 0, /*tp_free*/ |
| 21986 | 0, /*tp_is_gc*/ |
| 21987 | 0, /*tp_bases*/ |
| 21988 | 0, /*tp_mro*/ |
| 21989 | 0, /*tp_cache*/ |
| 21990 | 0, /*tp_subclasses*/ |
| 21991 | 0, /*tp_weaklist*/ |
| 21992 | 0, /*tp_del*/ |
| 21993 | 0, /*tp_version_tag*/ |
| 21994 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 21995 | 0, /*tp_finalize*/ |
| 21996 | #endif |
| 21997 | }; |
| 21998 | |
| 21999 | static PyObject *__pyx_tp_new_3rgw_LibRGWFS(PyTypeObject *t, PyObject *a, PyObject *k) { |
| 22000 | struct __pyx_obj_3rgw_LibRGWFS *p; |
| 22001 | PyObject *o; |
| 22002 | if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0 ), 1)) { |
| 22003 | o = (*t->tp_alloc)(t, 0); |
| 22004 | } else { |
| 22005 | o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); |
| 22006 | } |
| 22007 | if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0; |
| 22008 | p = ((struct __pyx_obj_3rgw_LibRGWFS *)o); |
| 22009 | p->state = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22010 | p->uid = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22011 | p->key = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22012 | p->secret = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22013 | if (unlikely(__pyx_pw_3rgw_8LibRGWFS_3__cinit__(o, a, k) < 0)__builtin_expect(!!(__pyx_pw_3rgw_8LibRGWFS_3__cinit__(o, a, k ) < 0), 0)) { |
| 22014 | 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; |
| 22015 | } |
| 22016 | return o; |
| 22017 | } |
| 22018 | |
| 22019 | static void __pyx_tp_dealloc_3rgw_LibRGWFS(PyObject *o) { |
| 22020 | struct __pyx_obj_3rgw_LibRGWFS *p = (struct __pyx_obj_3rgw_LibRGWFS *)o; |
| 22021 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 22022 | if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize ), 0) && !_PyGC_FINALIZED(o)) { |
| 22023 | if (PyObject_CallFinalizerFromDealloc(o)) return; |
| 22024 | } |
| 22025 | #endif |
| 22026 | PyObject_GC_UnTrack(o); |
| 22027 | { |
| 22028 | PyObject *etype, *eval, *etb; |
| 22029 | PyErr_Fetch(&etype, &eval, &etb); |
| 22030 | ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt); |
| 22031 | __pyx_pw_3rgw_8LibRGWFS_11__dealloc__(o); |
| 22032 | --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt); |
| 22033 | PyErr_Restore(etype, eval, etb); |
| 22034 | } |
| 22035 | 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); |
| 22036 | Py_CLEAR(p->uid)do { if (p->uid) { PyObject *_py_tmp = (PyObject *)(p-> uid); (p->uid) = ((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); |
| 22037 | Py_CLEAR(p->key)do { if (p->key) { PyObject *_py_tmp = (PyObject *)(p-> key); (p->key) = ((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); |
| 22038 | Py_CLEAR(p->secret)do { if (p->secret) { PyObject *_py_tmp = (PyObject *)(p-> secret); (p->secret) = ((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); |
| 22039 | (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o); |
| 22040 | } |
| 22041 | |
| 22042 | static int __pyx_tp_traverse_3rgw_LibRGWFS(PyObject *o, visitproc v, void *a) { |
| 22043 | int e; |
| 22044 | struct __pyx_obj_3rgw_LibRGWFS *p = (struct __pyx_obj_3rgw_LibRGWFS *)o; |
| 22045 | if (p->state) { |
| 22046 | e = (*v)(p->state, a); if (e) return e; |
| 22047 | } |
| 22048 | if (p->uid) { |
| 22049 | e = (*v)(p->uid, a); if (e) return e; |
| 22050 | } |
| 22051 | if (p->key) { |
| 22052 | e = (*v)(p->key, a); if (e) return e; |
| 22053 | } |
| 22054 | if (p->secret) { |
| 22055 | e = (*v)(p->secret, a); if (e) return e; |
| 22056 | } |
| 22057 | return 0; |
| 22058 | } |
| 22059 | |
| 22060 | static int __pyx_tp_clear_3rgw_LibRGWFS(PyObject *o) { |
| 22061 | PyObject* tmp; |
| 22062 | struct __pyx_obj_3rgw_LibRGWFS *p = (struct __pyx_obj_3rgw_LibRGWFS *)o; |
| 22063 | tmp = ((PyObject*)p->state); |
| 22064 | p->state = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22065 | 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); |
| 22066 | tmp = ((PyObject*)p->uid); |
| 22067 | p->uid = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22068 | 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); |
| 22069 | tmp = ((PyObject*)p->key); |
| 22070 | p->key = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22071 | 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); |
| 22072 | tmp = ((PyObject*)p->secret); |
| 22073 | p->secret = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22074 | 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); |
| 22075 | return 0; |
| 22076 | } |
| 22077 | |
| 22078 | static PyObject *__pyx_getprop_3rgw_8LibRGWFS_state(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22079 | return __pyx_pw_3rgw_8LibRGWFS_5state_1__get__(o); |
| 22080 | } |
| 22081 | |
| 22082 | static int __pyx_setprop_3rgw_8LibRGWFS_state(PyObject *o, PyObject *v, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22083 | if (v) { |
| 22084 | return __pyx_pw_3rgw_8LibRGWFS_5state_3__set__(o, v); |
| 22085 | } |
| 22086 | else { |
| 22087 | return __pyx_pw_3rgw_8LibRGWFS_5state_5__del__(o); |
| 22088 | } |
| 22089 | } |
| 22090 | |
| 22091 | static PyObject *__pyx_getprop_3rgw_8LibRGWFS_uid(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22092 | return __pyx_pw_3rgw_8LibRGWFS_3uid_1__get__(o); |
| 22093 | } |
| 22094 | |
| 22095 | static int __pyx_setprop_3rgw_8LibRGWFS_uid(PyObject *o, PyObject *v, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22096 | if (v) { |
| 22097 | return __pyx_pw_3rgw_8LibRGWFS_3uid_3__set__(o, v); |
| 22098 | } |
| 22099 | else { |
| 22100 | return __pyx_pw_3rgw_8LibRGWFS_3uid_5__del__(o); |
| 22101 | } |
| 22102 | } |
| 22103 | |
| 22104 | static PyObject *__pyx_getprop_3rgw_8LibRGWFS_key(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22105 | return __pyx_pw_3rgw_8LibRGWFS_3key_1__get__(o); |
| 22106 | } |
| 22107 | |
| 22108 | static int __pyx_setprop_3rgw_8LibRGWFS_key(PyObject *o, PyObject *v, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22109 | if (v) { |
| 22110 | return __pyx_pw_3rgw_8LibRGWFS_3key_3__set__(o, v); |
| 22111 | } |
| 22112 | else { |
| 22113 | return __pyx_pw_3rgw_8LibRGWFS_3key_5__del__(o); |
| 22114 | } |
| 22115 | } |
| 22116 | |
| 22117 | static PyObject *__pyx_getprop_3rgw_8LibRGWFS_secret(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22118 | return __pyx_pw_3rgw_8LibRGWFS_6secret_1__get__(o); |
| 22119 | } |
| 22120 | |
| 22121 | static int __pyx_setprop_3rgw_8LibRGWFS_secret(PyObject *o, PyObject *v, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22122 | if (v) { |
| 22123 | return __pyx_pw_3rgw_8LibRGWFS_6secret_3__set__(o, v); |
| 22124 | } |
| 22125 | else { |
| 22126 | return __pyx_pw_3rgw_8LibRGWFS_6secret_5__del__(o); |
| 22127 | } |
| 22128 | } |
| 22129 | |
| 22130 | static PyMethodDef __pyx_methods_3rgw_LibRGWFS[] = { |
| 22131 | {"require_state", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_1require_state, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22132 | {"shutdown", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_5shutdown, METH_NOARGS0x0004, __pyx_doc_3rgw_8LibRGWFS_4shutdown}, |
| 22133 | {"__enter__", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_7__enter__, METH_NOARGS0x0004, 0}, |
| 22134 | {"__exit__", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_9__exit__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22135 | {"version", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_13version, METH_NOARGS0x0004, __pyx_doc_3rgw_8LibRGWFS_12version}, |
| 22136 | {"mount", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_15mount, METH_NOARGS0x0004, 0}, |
| 22137 | {"unmount", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_17unmount, METH_NOARGS0x0004, 0}, |
| 22138 | {"statfs", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_19statfs, METH_NOARGS0x0004, 0}, |
| 22139 | {"create", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_21create, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22140 | {"mkdir", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_23mkdir, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22141 | {"rename", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_25rename, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22142 | {"unlink", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_27unlink, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22143 | {"readdir", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_29readdir, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22144 | {"fstat", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_31fstat, METH_O0x0008, 0}, |
| 22145 | {"opendir", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_33opendir, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22146 | {"open", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_35open, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22147 | {"close", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_37close, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22148 | {"read", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_39read, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22149 | {"write", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_41write, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22150 | {"fsync", (PyCFunction)__pyx_pw_3rgw_8LibRGWFS_43fsync, METH_VARARGS0x0001|METH_KEYWORDS0x0002, 0}, |
| 22151 | {0, 0, 0, 0} |
| 22152 | }; |
| 22153 | |
| 22154 | static struct PyGetSetDef __pyx_getsets_3rgw_LibRGWFS[] = { |
| 22155 | {(char *)"state", __pyx_getprop_3rgw_8LibRGWFS_state, __pyx_setprop_3rgw_8LibRGWFS_state, 0, 0}, |
| 22156 | {(char *)"uid", __pyx_getprop_3rgw_8LibRGWFS_uid, __pyx_setprop_3rgw_8LibRGWFS_uid, 0, 0}, |
| 22157 | {(char *)"key", __pyx_getprop_3rgw_8LibRGWFS_key, __pyx_setprop_3rgw_8LibRGWFS_key, 0, 0}, |
| 22158 | {(char *)"secret", __pyx_getprop_3rgw_8LibRGWFS_secret, __pyx_setprop_3rgw_8LibRGWFS_secret, 0, 0}, |
| 22159 | {0, 0, 0, 0, 0} |
| 22160 | }; |
| 22161 | |
| 22162 | static PyTypeObject __pyx_type_3rgw_LibRGWFS = { |
| 22163 | PyVarObject_HEAD_INIT(0, 0)1, 0, 0, |
| 22164 | "rgw.LibRGWFS", /*tp_name*/ |
| 22165 | sizeof(struct __pyx_obj_3rgw_LibRGWFS), /*tp_basicsize*/ |
| 22166 | 0, /*tp_itemsize*/ |
| 22167 | __pyx_tp_dealloc_3rgw_LibRGWFS, /*tp_dealloc*/ |
| 22168 | 0, /*tp_print*/ |
| 22169 | 0, /*tp_getattr*/ |
| 22170 | 0, /*tp_setattr*/ |
| 22171 | #if PY_MAJOR_VERSION2 < 3 |
| 22172 | 0, /*tp_compare*/ |
| 22173 | #endif |
| 22174 | #if PY_MAJOR_VERSION2 >= 3 |
| 22175 | 0, /*tp_as_async*/ |
| 22176 | #endif |
| 22177 | 0, /*tp_repr*/ |
| 22178 | 0, /*tp_as_number*/ |
| 22179 | 0, /*tp_as_sequence*/ |
| 22180 | 0, /*tp_as_mapping*/ |
| 22181 | 0, /*tp_hash*/ |
| 22182 | 0, /*tp_call*/ |
| 22183 | 0, /*tp_str*/ |
| 22184 | 0, /*tp_getattro*/ |
| 22185 | 0, /*tp_setattro*/ |
| 22186 | 0, /*tp_as_buffer*/ |
| 22187 | 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*/ |
| 22188 | "librgwfs python wrapper", /*tp_doc*/ |
| 22189 | __pyx_tp_traverse_3rgw_LibRGWFS, /*tp_traverse*/ |
| 22190 | __pyx_tp_clear_3rgw_LibRGWFS, /*tp_clear*/ |
| 22191 | 0, /*tp_richcompare*/ |
| 22192 | 0, /*tp_weaklistoffset*/ |
| 22193 | 0, /*tp_iter*/ |
| 22194 | 0, /*tp_iternext*/ |
| 22195 | __pyx_methods_3rgw_LibRGWFS, /*tp_methods*/ |
| 22196 | 0, /*tp_members*/ |
| 22197 | __pyx_getsets_3rgw_LibRGWFS, /*tp_getset*/ |
| 22198 | 0, /*tp_base*/ |
| 22199 | 0, /*tp_dict*/ |
| 22200 | 0, /*tp_descr_get*/ |
| 22201 | 0, /*tp_descr_set*/ |
| 22202 | 0, /*tp_dictoffset*/ |
| 22203 | 0, /*tp_init*/ |
| 22204 | 0, /*tp_alloc*/ |
| 22205 | __pyx_tp_new_3rgw_LibRGWFS, /*tp_new*/ |
| 22206 | 0, /*tp_free*/ |
| 22207 | 0, /*tp_is_gc*/ |
| 22208 | 0, /*tp_bases*/ |
| 22209 | 0, /*tp_mro*/ |
| 22210 | 0, /*tp_cache*/ |
| 22211 | 0, /*tp_subclasses*/ |
| 22212 | 0, /*tp_weaklist*/ |
| 22213 | 0, /*tp_del*/ |
| 22214 | 0, /*tp_version_tag*/ |
| 22215 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 22216 | 0, /*tp_finalize*/ |
| 22217 | #endif |
| 22218 | }; |
| 22219 | |
| 22220 | static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) { |
| 22221 | struct __pyx_array_obj *p; |
| 22222 | PyObject *o; |
| 22223 | if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0 ), 1)) { |
| 22224 | o = (*t->tp_alloc)(t, 0); |
| 22225 | } else { |
| 22226 | o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); |
| 22227 | } |
| 22228 | if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0; |
| 22229 | p = ((struct __pyx_array_obj *)o); |
| 22230 | p->mode = ((PyObject*)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22231 | p->_format = ((PyObject*)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22232 | if (unlikely(__pyx_array___cinit__(o, a, k) < 0)__builtin_expect(!!(__pyx_array___cinit__(o, a, k) < 0), 0 )) { |
| 22233 | 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; |
| 22234 | } |
| 22235 | return o; |
| 22236 | } |
| 22237 | |
| 22238 | static void __pyx_tp_dealloc_array(PyObject *o) { |
| 22239 | struct __pyx_array_obj *p = (struct __pyx_array_obj *)o; |
| 22240 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 22241 | if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize ), 0) && (!PyType_IS_GC(Py_TYPE(o))(((((((PyObject*)(o))->ob_type)))->tp_flags & ((1L<< 14))) != 0) || !_PyGC_FINALIZED(o))) { |
| 22242 | if (PyObject_CallFinalizerFromDealloc(o)) return; |
| 22243 | } |
| 22244 | #endif |
| 22245 | { |
| 22246 | PyObject *etype, *eval, *etb; |
| 22247 | PyErr_Fetch(&etype, &eval, &etb); |
| 22248 | ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt); |
| 22249 | __pyx_array___dealloc__(o); |
| 22250 | --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt); |
| 22251 | PyErr_Restore(etype, eval, etb); |
| 22252 | } |
| 22253 | Py_CLEAR(p->mode)do { if (p->mode) { PyObject *_py_tmp = (PyObject *)(p-> mode); (p->mode) = ((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); |
| 22254 | Py_CLEAR(p->_format)do { if (p->_format) { PyObject *_py_tmp = (PyObject *)(p-> _format); (p->_format) = ((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); |
| 22255 | (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o); |
| 22256 | } |
| 22257 | static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) { |
| 22258 | PyObject *r; |
| 22259 | PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; |
| 22260 | r = Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_as_mapping->mp_subscript(o, x); |
| 22261 | Py_DECREF(x)do { if ( --((PyObject*)(x))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(x)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(x)))); } while (0); |
| 22262 | return r; |
| 22263 | } |
| 22264 | |
| 22265 | static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) { |
| 22266 | if (v) { |
| 22267 | return __pyx_array___setitem__(o, i, v); |
| 22268 | } |
| 22269 | else { |
| 22270 | PyErr_Format(PyExc_NotImplementedError, |
| 22271 | "Subscript deletion not supported by %.200s", Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_name); |
| 22272 | return -1; |
| 22273 | } |
| 22274 | } |
| 22275 | |
| 22276 | static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) { |
| 22277 | PyObject *v = PyObject_GenericGetAttr(o, n); |
| 22278 | if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { |
| 22279 | PyErr_Clear(); |
| 22280 | v = __pyx_array___getattr__(o, n); |
| 22281 | } |
| 22282 | return v; |
| 22283 | } |
| 22284 | |
| 22285 | static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22286 | return get_memview(o); |
| 22287 | } |
| 22288 | |
| 22289 | static PyMethodDef __pyx_methods_array[] = { |
| 22290 | {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O0x0008|METH_COEXIST0x0040, 0}, |
| 22291 | {0, 0, 0, 0} |
| 22292 | }; |
| 22293 | |
| 22294 | static struct PyGetSetDef __pyx_getsets_array[] = { |
| 22295 | {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, 0, 0}, |
| 22296 | {0, 0, 0, 0, 0} |
| 22297 | }; |
| 22298 | |
| 22299 | static PySequenceMethods __pyx_tp_as_sequence_array = { |
| 22300 | 0, /*sq_length*/ |
| 22301 | 0, /*sq_concat*/ |
| 22302 | 0, /*sq_repeat*/ |
| 22303 | __pyx_sq_item_array, /*sq_item*/ |
| 22304 | 0, /*sq_slice*/ |
| 22305 | 0, /*sq_ass_item*/ |
| 22306 | 0, /*sq_ass_slice*/ |
| 22307 | 0, /*sq_contains*/ |
| 22308 | 0, /*sq_inplace_concat*/ |
| 22309 | 0, /*sq_inplace_repeat*/ |
| 22310 | }; |
| 22311 | |
| 22312 | static PyMappingMethods __pyx_tp_as_mapping_array = { |
| 22313 | 0, /*mp_length*/ |
| 22314 | __pyx_array___getitem__, /*mp_subscript*/ |
| 22315 | __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/ |
| 22316 | }; |
| 22317 | |
| 22318 | static PyBufferProcs __pyx_tp_as_buffer_array = { |
| 22319 | #if PY_MAJOR_VERSION2 < 3 |
| 22320 | 0, /*bf_getreadbuffer*/ |
| 22321 | #endif |
| 22322 | #if PY_MAJOR_VERSION2 < 3 |
| 22323 | 0, /*bf_getwritebuffer*/ |
| 22324 | #endif |
| 22325 | #if PY_MAJOR_VERSION2 < 3 |
| 22326 | 0, /*bf_getsegcount*/ |
| 22327 | #endif |
| 22328 | #if PY_MAJOR_VERSION2 < 3 |
| 22329 | 0, /*bf_getcharbuffer*/ |
| 22330 | #endif |
| 22331 | __pyx_array_getbuffer, /*bf_getbuffer*/ |
| 22332 | 0, /*bf_releasebuffer*/ |
| 22333 | }; |
| 22334 | |
| 22335 | static PyTypeObject __pyx_type___pyx_array = { |
| 22336 | PyVarObject_HEAD_INIT(0, 0)1, 0, 0, |
| 22337 | "rgw.array", /*tp_name*/ |
| 22338 | sizeof(struct __pyx_array_obj), /*tp_basicsize*/ |
| 22339 | 0, /*tp_itemsize*/ |
| 22340 | __pyx_tp_dealloc_array, /*tp_dealloc*/ |
| 22341 | 0, /*tp_print*/ |
| 22342 | 0, /*tp_getattr*/ |
| 22343 | 0, /*tp_setattr*/ |
| 22344 | #if PY_MAJOR_VERSION2 < 3 |
| 22345 | 0, /*tp_compare*/ |
| 22346 | #endif |
| 22347 | #if PY_MAJOR_VERSION2 >= 3 |
| 22348 | 0, /*tp_as_async*/ |
| 22349 | #endif |
| 22350 | 0, /*tp_repr*/ |
| 22351 | 0, /*tp_as_number*/ |
| 22352 | &__pyx_tp_as_sequence_array, /*tp_as_sequence*/ |
| 22353 | &__pyx_tp_as_mapping_array, /*tp_as_mapping*/ |
| 22354 | 0, /*tp_hash*/ |
| 22355 | 0, /*tp_call*/ |
| 22356 | 0, /*tp_str*/ |
| 22357 | __pyx_tp_getattro_array, /*tp_getattro*/ |
| 22358 | 0, /*tp_setattro*/ |
| 22359 | &__pyx_tp_as_buffer_array, /*tp_as_buffer*/ |
| 22360 | 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), /*tp_flags*/ |
| 22361 | 0, /*tp_doc*/ |
| 22362 | 0, /*tp_traverse*/ |
| 22363 | 0, /*tp_clear*/ |
| 22364 | 0, /*tp_richcompare*/ |
| 22365 | 0, /*tp_weaklistoffset*/ |
| 22366 | 0, /*tp_iter*/ |
| 22367 | 0, /*tp_iternext*/ |
| 22368 | __pyx_methods_array, /*tp_methods*/ |
| 22369 | 0, /*tp_members*/ |
| 22370 | __pyx_getsets_array, /*tp_getset*/ |
| 22371 | 0, /*tp_base*/ |
| 22372 | 0, /*tp_dict*/ |
| 22373 | 0, /*tp_descr_get*/ |
| 22374 | 0, /*tp_descr_set*/ |
| 22375 | 0, /*tp_dictoffset*/ |
| 22376 | 0, /*tp_init*/ |
| 22377 | 0, /*tp_alloc*/ |
| 22378 | __pyx_tp_new_array, /*tp_new*/ |
| 22379 | 0, /*tp_free*/ |
| 22380 | 0, /*tp_is_gc*/ |
| 22381 | 0, /*tp_bases*/ |
| 22382 | 0, /*tp_mro*/ |
| 22383 | 0, /*tp_cache*/ |
| 22384 | 0, /*tp_subclasses*/ |
| 22385 | 0, /*tp_weaklist*/ |
| 22386 | 0, /*tp_del*/ |
| 22387 | 0, /*tp_version_tag*/ |
| 22388 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 22389 | 0, /*tp_finalize*/ |
| 22390 | #endif |
| 22391 | }; |
| 22392 | |
| 22393 | static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) { |
| 22394 | struct __pyx_MemviewEnum_obj *p; |
| 22395 | PyObject *o; |
| 22396 | if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0 ), 1)) { |
| 22397 | o = (*t->tp_alloc)(t, 0); |
| 22398 | } else { |
| 22399 | o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); |
| 22400 | } |
| 22401 | if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0; |
| 22402 | p = ((struct __pyx_MemviewEnum_obj *)o); |
| 22403 | p->name = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22404 | return o; |
| 22405 | } |
| 22406 | |
| 22407 | static void __pyx_tp_dealloc_Enum(PyObject *o) { |
| 22408 | struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; |
| 22409 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 22410 | if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize ), 0) && !_PyGC_FINALIZED(o)) { |
| 22411 | if (PyObject_CallFinalizerFromDealloc(o)) return; |
| 22412 | } |
| 22413 | #endif |
| 22414 | PyObject_GC_UnTrack(o); |
| 22415 | Py_CLEAR(p->name)do { if (p->name) { PyObject *_py_tmp = (PyObject *)(p-> name); (p->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); |
| 22416 | (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o); |
| 22417 | } |
| 22418 | |
| 22419 | static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) { |
| 22420 | int e; |
| 22421 | struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; |
| 22422 | if (p->name) { |
| 22423 | e = (*v)(p->name, a); if (e) return e; |
| 22424 | } |
| 22425 | return 0; |
| 22426 | } |
| 22427 | |
| 22428 | static int __pyx_tp_clear_Enum(PyObject *o) { |
| 22429 | PyObject* tmp; |
| 22430 | struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; |
| 22431 | tmp = ((PyObject*)p->name); |
| 22432 | p->name = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22433 | 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); |
| 22434 | return 0; |
| 22435 | } |
| 22436 | |
| 22437 | static PyMethodDef __pyx_methods_Enum[] = { |
| 22438 | {0, 0, 0, 0} |
| 22439 | }; |
| 22440 | |
| 22441 | static PyTypeObject __pyx_type___pyx_MemviewEnum = { |
| 22442 | PyVarObject_HEAD_INIT(0, 0)1, 0, 0, |
| 22443 | "rgw.Enum", /*tp_name*/ |
| 22444 | sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/ |
| 22445 | 0, /*tp_itemsize*/ |
| 22446 | __pyx_tp_dealloc_Enum, /*tp_dealloc*/ |
| 22447 | 0, /*tp_print*/ |
| 22448 | 0, /*tp_getattr*/ |
| 22449 | 0, /*tp_setattr*/ |
| 22450 | #if PY_MAJOR_VERSION2 < 3 |
| 22451 | 0, /*tp_compare*/ |
| 22452 | #endif |
| 22453 | #if PY_MAJOR_VERSION2 >= 3 |
| 22454 | 0, /*tp_as_async*/ |
| 22455 | #endif |
| 22456 | __pyx_MemviewEnum___repr__, /*tp_repr*/ |
| 22457 | 0, /*tp_as_number*/ |
| 22458 | 0, /*tp_as_sequence*/ |
| 22459 | 0, /*tp_as_mapping*/ |
| 22460 | 0, /*tp_hash*/ |
| 22461 | 0, /*tp_call*/ |
| 22462 | 0, /*tp_str*/ |
| 22463 | 0, /*tp_getattro*/ |
| 22464 | 0, /*tp_setattro*/ |
| 22465 | 0, /*tp_as_buffer*/ |
| 22466 | 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*/ |
| 22467 | 0, /*tp_doc*/ |
| 22468 | __pyx_tp_traverse_Enum, /*tp_traverse*/ |
| 22469 | __pyx_tp_clear_Enum, /*tp_clear*/ |
| 22470 | 0, /*tp_richcompare*/ |
| 22471 | 0, /*tp_weaklistoffset*/ |
| 22472 | 0, /*tp_iter*/ |
| 22473 | 0, /*tp_iternext*/ |
| 22474 | __pyx_methods_Enum, /*tp_methods*/ |
| 22475 | 0, /*tp_members*/ |
| 22476 | 0, /*tp_getset*/ |
| 22477 | 0, /*tp_base*/ |
| 22478 | 0, /*tp_dict*/ |
| 22479 | 0, /*tp_descr_get*/ |
| 22480 | 0, /*tp_descr_set*/ |
| 22481 | 0, /*tp_dictoffset*/ |
| 22482 | __pyx_MemviewEnum___init__, /*tp_init*/ |
| 22483 | 0, /*tp_alloc*/ |
| 22484 | __pyx_tp_new_Enum, /*tp_new*/ |
| 22485 | 0, /*tp_free*/ |
| 22486 | 0, /*tp_is_gc*/ |
| 22487 | 0, /*tp_bases*/ |
| 22488 | 0, /*tp_mro*/ |
| 22489 | 0, /*tp_cache*/ |
| 22490 | 0, /*tp_subclasses*/ |
| 22491 | 0, /*tp_weaklist*/ |
| 22492 | 0, /*tp_del*/ |
| 22493 | 0, /*tp_version_tag*/ |
| 22494 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 22495 | 0, /*tp_finalize*/ |
| 22496 | #endif |
| 22497 | }; |
| 22498 | static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview; |
| 22499 | |
| 22500 | static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) { |
| 22501 | struct __pyx_memoryview_obj *p; |
| 22502 | PyObject *o; |
| 22503 | if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0 ), 1)) { |
| 22504 | o = (*t->tp_alloc)(t, 0); |
| 22505 | } else { |
| 22506 | o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); |
| 22507 | } |
| 22508 | if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0; |
| 22509 | p = ((struct __pyx_memoryview_obj *)o); |
| 22510 | p->__pyx_vtab = __pyx_vtabptr_memoryview; |
| 22511 | p->obj = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22512 | p->_size = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22513 | p->_array_interface = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22514 | p->view.obj = NULL((void*)0); |
| 22515 | if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)__builtin_expect(!!(__pyx_memoryview___cinit__(o, a, k) < 0 ), 0)) { |
| 22516 | 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; |
| 22517 | } |
| 22518 | return o; |
| 22519 | } |
| 22520 | |
| 22521 | static void __pyx_tp_dealloc_memoryview(PyObject *o) { |
| 22522 | struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; |
| 22523 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 22524 | if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize ), 0) && !_PyGC_FINALIZED(o)) { |
| 22525 | if (PyObject_CallFinalizerFromDealloc(o)) return; |
| 22526 | } |
| 22527 | #endif |
| 22528 | PyObject_GC_UnTrack(o); |
| 22529 | { |
| 22530 | PyObject *etype, *eval, *etb; |
| 22531 | PyErr_Fetch(&etype, &eval, &etb); |
| 22532 | ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt); |
| 22533 | __pyx_memoryview___dealloc__(o); |
| 22534 | --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt); |
| 22535 | PyErr_Restore(etype, eval, etb); |
| 22536 | } |
| 22537 | Py_CLEAR(p->obj)do { if (p->obj) { PyObject *_py_tmp = (PyObject *)(p-> obj); (p->obj) = ((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); |
| 22538 | Py_CLEAR(p->_size)do { if (p->_size) { PyObject *_py_tmp = (PyObject *)(p-> _size); (p->_size) = ((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); |
| 22539 | Py_CLEAR(p->_array_interface)do { if (p->_array_interface) { PyObject *_py_tmp = (PyObject *)(p->_array_interface); (p->_array_interface) = ((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); |
| 22540 | (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o); |
| 22541 | } |
| 22542 | |
| 22543 | static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) { |
| 22544 | int e; |
| 22545 | struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; |
| 22546 | if (p->obj) { |
| 22547 | e = (*v)(p->obj, a); if (e) return e; |
| 22548 | } |
| 22549 | if (p->_size) { |
| 22550 | e = (*v)(p->_size, a); if (e) return e; |
| 22551 | } |
| 22552 | if (p->_array_interface) { |
| 22553 | e = (*v)(p->_array_interface, a); if (e) return e; |
| 22554 | } |
| 22555 | if (p->view.obj) { |
| 22556 | e = (*v)(p->view.obj, a); if (e) return e; |
| 22557 | } |
| 22558 | return 0; |
| 22559 | } |
| 22560 | |
| 22561 | static int __pyx_tp_clear_memoryview(PyObject *o) { |
| 22562 | PyObject* tmp; |
| 22563 | struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; |
| 22564 | tmp = ((PyObject*)p->obj); |
| 22565 | p->obj = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22566 | 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); |
| 22567 | tmp = ((PyObject*)p->_size); |
| 22568 | p->_size = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22569 | 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); |
| 22570 | tmp = ((PyObject*)p->_array_interface); |
| 22571 | p->_array_interface = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22572 | 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); |
| 22573 | Py_CLEAR(p->view.obj)do { if (p->view.obj) { PyObject *_py_tmp = (PyObject *)(p ->view.obj); (p->view.obj) = ((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); |
| 22574 | return 0; |
| 22575 | } |
| 22576 | static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) { |
| 22577 | PyObject *r; |
| 22578 | PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; |
| 22579 | r = Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_as_mapping->mp_subscript(o, x); |
| 22580 | Py_DECREF(x)do { if ( --((PyObject*)(x))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(x)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(x)))); } while (0); |
| 22581 | return r; |
| 22582 | } |
| 22583 | |
| 22584 | static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) { |
| 22585 | if (v) { |
| 22586 | return __pyx_memoryview___setitem__(o, i, v); |
| 22587 | } |
| 22588 | else { |
| 22589 | PyErr_Format(PyExc_NotImplementedError, |
| 22590 | "Subscript deletion not supported by %.200s", Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_name); |
| 22591 | return -1; |
| 22592 | } |
| 22593 | } |
| 22594 | |
| 22595 | static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22596 | return __pyx_memoryview_transpose(o); |
| 22597 | } |
| 22598 | |
| 22599 | static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22600 | return __pyx_memoryview__get__base(o); |
| 22601 | } |
| 22602 | |
| 22603 | static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22604 | return __pyx_memoryview_get_shape(o); |
| 22605 | } |
| 22606 | |
| 22607 | static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22608 | return __pyx_memoryview_get_strides(o); |
| 22609 | } |
| 22610 | |
| 22611 | static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22612 | return __pyx_memoryview_get_suboffsets(o); |
| 22613 | } |
| 22614 | |
| 22615 | static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22616 | return __pyx_memoryview_get_ndim(o); |
| 22617 | } |
| 22618 | |
| 22619 | static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22620 | return __pyx_memoryview_get_itemsize(o); |
| 22621 | } |
| 22622 | |
| 22623 | static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22624 | return __pyx_memoryview_get_nbytes(o); |
| 22625 | } |
| 22626 | |
| 22627 | static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22628 | return __pyx_memoryview_get_size(o); |
| 22629 | } |
| 22630 | |
| 22631 | static PyMethodDef __pyx_methods_memoryview[] = { |
| 22632 | {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS0x0004, 0}, |
| 22633 | {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS0x0004, 0}, |
| 22634 | {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS0x0004, 0}, |
| 22635 | {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS0x0004, 0}, |
| 22636 | {0, 0, 0, 0} |
| 22637 | }; |
| 22638 | |
| 22639 | static struct PyGetSetDef __pyx_getsets_memoryview[] = { |
| 22640 | {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, 0, 0}, |
| 22641 | {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, 0, 0}, |
| 22642 | {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, 0, 0}, |
| 22643 | {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, 0, 0}, |
| 22644 | {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, 0, 0}, |
| 22645 | {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, 0, 0}, |
| 22646 | {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, 0, 0}, |
| 22647 | {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, 0, 0}, |
| 22648 | {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, 0, 0}, |
| 22649 | {0, 0, 0, 0, 0} |
| 22650 | }; |
| 22651 | |
| 22652 | static PySequenceMethods __pyx_tp_as_sequence_memoryview = { |
| 22653 | __pyx_memoryview___len__, /*sq_length*/ |
| 22654 | 0, /*sq_concat*/ |
| 22655 | 0, /*sq_repeat*/ |
| 22656 | __pyx_sq_item_memoryview, /*sq_item*/ |
| 22657 | 0, /*sq_slice*/ |
| 22658 | 0, /*sq_ass_item*/ |
| 22659 | 0, /*sq_ass_slice*/ |
| 22660 | 0, /*sq_contains*/ |
| 22661 | 0, /*sq_inplace_concat*/ |
| 22662 | 0, /*sq_inplace_repeat*/ |
| 22663 | }; |
| 22664 | |
| 22665 | static PyMappingMethods __pyx_tp_as_mapping_memoryview = { |
| 22666 | __pyx_memoryview___len__, /*mp_length*/ |
| 22667 | __pyx_memoryview___getitem__, /*mp_subscript*/ |
| 22668 | __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/ |
| 22669 | }; |
| 22670 | |
| 22671 | static PyBufferProcs __pyx_tp_as_buffer_memoryview = { |
| 22672 | #if PY_MAJOR_VERSION2 < 3 |
| 22673 | 0, /*bf_getreadbuffer*/ |
| 22674 | #endif |
| 22675 | #if PY_MAJOR_VERSION2 < 3 |
| 22676 | 0, /*bf_getwritebuffer*/ |
| 22677 | #endif |
| 22678 | #if PY_MAJOR_VERSION2 < 3 |
| 22679 | 0, /*bf_getsegcount*/ |
| 22680 | #endif |
| 22681 | #if PY_MAJOR_VERSION2 < 3 |
| 22682 | 0, /*bf_getcharbuffer*/ |
| 22683 | #endif |
| 22684 | __pyx_memoryview_getbuffer, /*bf_getbuffer*/ |
| 22685 | 0, /*bf_releasebuffer*/ |
| 22686 | }; |
| 22687 | |
| 22688 | static PyTypeObject __pyx_type___pyx_memoryview = { |
| 22689 | PyVarObject_HEAD_INIT(0, 0)1, 0, 0, |
| 22690 | "rgw.memoryview", /*tp_name*/ |
| 22691 | sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/ |
| 22692 | 0, /*tp_itemsize*/ |
| 22693 | __pyx_tp_dealloc_memoryview, /*tp_dealloc*/ |
| 22694 | 0, /*tp_print*/ |
| 22695 | 0, /*tp_getattr*/ |
| 22696 | 0, /*tp_setattr*/ |
| 22697 | #if PY_MAJOR_VERSION2 < 3 |
| 22698 | 0, /*tp_compare*/ |
| 22699 | #endif |
| 22700 | #if PY_MAJOR_VERSION2 >= 3 |
| 22701 | 0, /*tp_as_async*/ |
| 22702 | #endif |
| 22703 | __pyx_memoryview___repr__, /*tp_repr*/ |
| 22704 | 0, /*tp_as_number*/ |
| 22705 | &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/ |
| 22706 | &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/ |
| 22707 | 0, /*tp_hash*/ |
| 22708 | 0, /*tp_call*/ |
| 22709 | __pyx_memoryview___str__, /*tp_str*/ |
| 22710 | 0, /*tp_getattro*/ |
| 22711 | 0, /*tp_setattro*/ |
| 22712 | &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/ |
| 22713 | 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*/ |
| 22714 | 0, /*tp_doc*/ |
| 22715 | __pyx_tp_traverse_memoryview, /*tp_traverse*/ |
| 22716 | __pyx_tp_clear_memoryview, /*tp_clear*/ |
| 22717 | 0, /*tp_richcompare*/ |
| 22718 | 0, /*tp_weaklistoffset*/ |
| 22719 | 0, /*tp_iter*/ |
| 22720 | 0, /*tp_iternext*/ |
| 22721 | __pyx_methods_memoryview, /*tp_methods*/ |
| 22722 | 0, /*tp_members*/ |
| 22723 | __pyx_getsets_memoryview, /*tp_getset*/ |
| 22724 | 0, /*tp_base*/ |
| 22725 | 0, /*tp_dict*/ |
| 22726 | 0, /*tp_descr_get*/ |
| 22727 | 0, /*tp_descr_set*/ |
| 22728 | 0, /*tp_dictoffset*/ |
| 22729 | 0, /*tp_init*/ |
| 22730 | 0, /*tp_alloc*/ |
| 22731 | __pyx_tp_new_memoryview, /*tp_new*/ |
| 22732 | 0, /*tp_free*/ |
| 22733 | 0, /*tp_is_gc*/ |
| 22734 | 0, /*tp_bases*/ |
| 22735 | 0, /*tp_mro*/ |
| 22736 | 0, /*tp_cache*/ |
| 22737 | 0, /*tp_subclasses*/ |
| 22738 | 0, /*tp_weaklist*/ |
| 22739 | 0, /*tp_del*/ |
| 22740 | 0, /*tp_version_tag*/ |
| 22741 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 22742 | 0, /*tp_finalize*/ |
| 22743 | #endif |
| 22744 | }; |
| 22745 | static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice; |
| 22746 | |
| 22747 | static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) { |
| 22748 | struct __pyx_memoryviewslice_obj *p; |
| 22749 | PyObject *o = __pyx_tp_new_memoryview(t, a, k); |
| 22750 | if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0; |
| 22751 | p = ((struct __pyx_memoryviewslice_obj *)o); |
| 22752 | p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice; |
| 22753 | p->from_object = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22754 | p->from_slice.memview = NULL((void*)0); |
| 22755 | return o; |
| 22756 | } |
| 22757 | |
| 22758 | static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) { |
| 22759 | struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; |
| 22760 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 22761 | if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize ), 0) && !_PyGC_FINALIZED(o)) { |
| 22762 | if (PyObject_CallFinalizerFromDealloc(o)) return; |
| 22763 | } |
| 22764 | #endif |
| 22765 | PyObject_GC_UnTrack(o); |
| 22766 | { |
| 22767 | PyObject *etype, *eval, *etb; |
| 22768 | PyErr_Fetch(&etype, &eval, &etb); |
| 22769 | ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt); |
| 22770 | __pyx_memoryviewslice___dealloc__(o); |
| 22771 | --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt); |
| 22772 | PyErr_Restore(etype, eval, etb); |
| 22773 | } |
| 22774 | Py_CLEAR(p->from_object)do { if (p->from_object) { PyObject *_py_tmp = (PyObject * )(p->from_object); (p->from_object) = ((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); |
| 22775 | PyObject_GC_Track(o); |
| 22776 | __pyx_tp_dealloc_memoryview(o); |
| 22777 | } |
| 22778 | |
| 22779 | static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) { |
| 22780 | int e; |
| 22781 | struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; |
| 22782 | e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e; |
| 22783 | if (p->from_object) { |
| 22784 | e = (*v)(p->from_object, a); if (e) return e; |
| 22785 | } |
| 22786 | return 0; |
| 22787 | } |
| 22788 | |
| 22789 | static int __pyx_tp_clear__memoryviewslice(PyObject *o) { |
| 22790 | PyObject* tmp; |
| 22791 | struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; |
| 22792 | __pyx_tp_clear_memoryview(o); |
| 22793 | tmp = ((PyObject*)p->from_object); |
| 22794 | p->from_object = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 22795 | 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); |
| 22796 | __PYX_XDEC_MEMVIEW(&p->from_slice, 1)__Pyx_XDEC_MEMVIEW(&p->from_slice, 1, 22796); |
| 22797 | return 0; |
| 22798 | } |
| 22799 | |
| 22800 | static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED__attribute__ ((__unused__)) void *x) { |
| 22801 | return __pyx_memoryviewslice__get__base(o); |
| 22802 | } |
| 22803 | |
| 22804 | static PyMethodDef __pyx_methods__memoryviewslice[] = { |
| 22805 | {0, 0, 0, 0} |
| 22806 | }; |
| 22807 | |
| 22808 | static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = { |
| 22809 | {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, 0, 0}, |
| 22810 | {0, 0, 0, 0, 0} |
| 22811 | }; |
| 22812 | |
| 22813 | static PyTypeObject __pyx_type___pyx_memoryviewslice = { |
| 22814 | PyVarObject_HEAD_INIT(0, 0)1, 0, 0, |
| 22815 | "rgw._memoryviewslice", /*tp_name*/ |
| 22816 | sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/ |
| 22817 | 0, /*tp_itemsize*/ |
| 22818 | __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/ |
| 22819 | 0, /*tp_print*/ |
| 22820 | 0, /*tp_getattr*/ |
| 22821 | 0, /*tp_setattr*/ |
| 22822 | #if PY_MAJOR_VERSION2 < 3 |
| 22823 | 0, /*tp_compare*/ |
| 22824 | #endif |
| 22825 | #if PY_MAJOR_VERSION2 >= 3 |
| 22826 | 0, /*tp_as_async*/ |
| 22827 | #endif |
| 22828 | #if CYTHON_COMPILING_IN_PYPY0 |
| 22829 | __pyx_memoryview___repr__, /*tp_repr*/ |
| 22830 | #else |
| 22831 | 0, /*tp_repr*/ |
| 22832 | #endif |
| 22833 | 0, /*tp_as_number*/ |
| 22834 | 0, /*tp_as_sequence*/ |
| 22835 | 0, /*tp_as_mapping*/ |
| 22836 | 0, /*tp_hash*/ |
| 22837 | 0, /*tp_call*/ |
| 22838 | #if CYTHON_COMPILING_IN_PYPY0 |
| 22839 | __pyx_memoryview___str__, /*tp_str*/ |
| 22840 | #else |
| 22841 | 0, /*tp_str*/ |
| 22842 | #endif |
| 22843 | 0, /*tp_getattro*/ |
| 22844 | 0, /*tp_setattro*/ |
| 22845 | 0, /*tp_as_buffer*/ |
| 22846 | 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*/ |
| 22847 | "Internal class for passing memoryview slices to Python", /*tp_doc*/ |
| 22848 | __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/ |
| 22849 | __pyx_tp_clear__memoryviewslice, /*tp_clear*/ |
| 22850 | 0, /*tp_richcompare*/ |
| 22851 | 0, /*tp_weaklistoffset*/ |
| 22852 | 0, /*tp_iter*/ |
| 22853 | 0, /*tp_iternext*/ |
| 22854 | __pyx_methods__memoryviewslice, /*tp_methods*/ |
| 22855 | 0, /*tp_members*/ |
| 22856 | __pyx_getsets__memoryviewslice, /*tp_getset*/ |
| 22857 | 0, /*tp_base*/ |
| 22858 | 0, /*tp_dict*/ |
| 22859 | 0, /*tp_descr_get*/ |
| 22860 | 0, /*tp_descr_set*/ |
| 22861 | 0, /*tp_dictoffset*/ |
| 22862 | 0, /*tp_init*/ |
| 22863 | 0, /*tp_alloc*/ |
| 22864 | __pyx_tp_new__memoryviewslice, /*tp_new*/ |
| 22865 | 0, /*tp_free*/ |
| 22866 | 0, /*tp_is_gc*/ |
| 22867 | 0, /*tp_bases*/ |
| 22868 | 0, /*tp_mro*/ |
| 22869 | 0, /*tp_cache*/ |
| 22870 | 0, /*tp_subclasses*/ |
| 22871 | 0, /*tp_weaklist*/ |
| 22872 | 0, /*tp_del*/ |
| 22873 | 0, /*tp_version_tag*/ |
| 22874 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 22875 | 0, /*tp_finalize*/ |
| 22876 | #endif |
| 22877 | }; |
| 22878 | |
| 22879 | static PyMethodDef __pyx_methods[] = { |
| 22880 | {0, 0, 0, 0} |
| 22881 | }; |
| 22882 | |
| 22883 | #if PY_MAJOR_VERSION2 >= 3 |
| 22884 | static struct PyModuleDef __pyx_moduledef = { |
| 22885 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) < 0x03020000 |
| 22886 | { PyObject_HEAD_INIT(NULL)1, ((void*)0), NULL((void*)0), 0, NULL((void*)0) }, |
| 22887 | #else |
| 22888 | PyModuleDef_HEAD_INIT, |
| 22889 | #endif |
| 22890 | "rgw", |
| 22891 | __pyx_k_This_module_is_a_thin_wrapper_a, /* m_doc */ |
| 22892 | -1, /* m_size */ |
| 22893 | __pyx_methods /* m_methods */, |
| 22894 | NULL((void*)0), /* m_reload */ |
| 22895 | NULL((void*)0), /* m_traverse */ |
| 22896 | NULL((void*)0), /* m_clear */ |
| 22897 | NULL((void*)0) /* m_free */ |
| 22898 | }; |
| 22899 | #endif |
| 22900 | |
| 22901 | static __Pyx_StringTabEntry __pyx_string_tab[] = { |
| 22902 | {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1}, |
| 22903 | {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0}, |
| 22904 | {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0}, |
| 22905 | {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0}, |
| 22906 | {&__pyx_n_s_EEXIST, __pyx_k_EEXIST, sizeof(__pyx_k_EEXIST), 0, 0, 1, 1}, |
| 22907 | {&__pyx_n_s_EINVAL, __pyx_k_EINVAL, sizeof(__pyx_k_EINVAL), 0, 0, 1, 1}, |
| 22908 | {&__pyx_n_s_EIO, __pyx_k_EIO, sizeof(__pyx_k_EIO), 0, 0, 1, 1}, |
| 22909 | {&__pyx_n_s_ENODATA, __pyx_k_ENODATA, sizeof(__pyx_k_ENODATA), 0, 0, 1, 1}, |
| 22910 | {&__pyx_n_s_ENOENT, __pyx_k_ENOENT, sizeof(__pyx_k_ENOENT), 0, 0, 1, 1}, |
| 22911 | {&__pyx_n_s_ENOSPC, __pyx_k_ENOSPC, sizeof(__pyx_k_ENOSPC), 0, 0, 1, 1}, |
| 22912 | {&__pyx_n_s_EOPNOTSUPP, __pyx_k_EOPNOTSUPP, sizeof(__pyx_k_EOPNOTSUPP), 0, 0, 1, 1}, |
| 22913 | {&__pyx_n_s_EPERM, __pyx_k_EPERM, sizeof(__pyx_k_EPERM), 0, 0, 1, 1}, |
| 22914 | {&__pyx_n_s_ERANGE, __pyx_k_ERANGE, sizeof(__pyx_k_ERANGE), 0, 0, 1, 1}, |
| 22915 | {&__pyx_n_s_EWOULDBLOCK, __pyx_k_EWOULDBLOCK, sizeof(__pyx_k_EWOULDBLOCK), 0, 0, 1, 1}, |
| 22916 | {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1}, |
| 22917 | {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0}, |
| 22918 | {&__pyx_kp_s_Errno_0_1, __pyx_k_Errno_0_1, sizeof(__pyx_k_Errno_0_1), 0, 0, 1, 0}, |
| 22919 | {&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1}, |
| 22920 | {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1}, |
| 22921 | {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1}, |
| 22922 | {&__pyx_n_s_IncompleteWriteError, __pyx_k_IncompleteWriteError, sizeof(__pyx_k_IncompleteWriteError), 0, 0, 1, 1}, |
| 22923 | {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, |
| 22924 | {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0}, |
| 22925 | {&__pyx_n_s_InvalidValue, __pyx_k_InvalidValue, sizeof(__pyx_k_InvalidValue), 0, 0, 1, 1}, |
| 22926 | {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0}, |
| 22927 | {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0}, |
| 22928 | {&__pyx_n_s_LibCephFSStateError, __pyx_k_LibCephFSStateError, sizeof(__pyx_k_LibCephFSStateError), 0, 0, 1, 1}, |
| 22929 | {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, |
| 22930 | {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0}, |
| 22931 | {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0}, |
| 22932 | {&__pyx_n_s_NoData, __pyx_k_NoData, sizeof(__pyx_k_NoData), 0, 0, 1, 1}, |
| 22933 | {&__pyx_n_s_NoSpace, __pyx_k_NoSpace, sizeof(__pyx_k_NoSpace), 0, 0, 1, 1}, |
| 22934 | {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1}, |
| 22935 | {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1}, |
| 22936 | {&__pyx_n_s_OSError___init, __pyx_k_OSError___init, sizeof(__pyx_k_OSError___init), 0, 0, 1, 1}, |
| 22937 | {&__pyx_n_s_OSError___str, __pyx_k_OSError___str, sizeof(__pyx_k_OSError___str), 0, 0, 1, 1}, |
| 22938 | {&__pyx_kp_s_OSError_class_derived_from_Erro, __pyx_k_OSError_class_derived_from_Erro, sizeof(__pyx_k_OSError_class_derived_from_Erro), 0, 0, 1, 0}, |
| 22939 | {&__pyx_n_s_ObjectExists, __pyx_k_ObjectExists, sizeof(__pyx_k_ObjectExists), 0, 0, 1, 1}, |
| 22940 | {&__pyx_n_s_ObjectNotFound, __pyx_k_ObjectNotFound, sizeof(__pyx_k_ObjectNotFound), 0, 0, 1, 1}, |
| 22941 | {&__pyx_n_s_OperationNotSupported, __pyx_k_OperationNotSupported, sizeof(__pyx_k_OperationNotSupported), 0, 0, 1, 1}, |
| 22942 | {&__pyx_n_s_OutOfRange, __pyx_k_OutOfRange, sizeof(__pyx_k_OutOfRange), 0, 0, 1, 1}, |
| 22943 | {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0}, |
| 22944 | {&__pyx_n_s_PermissionError, __pyx_k_PermissionError, sizeof(__pyx_k_PermissionError), 0, 0, 1, 1}, |
| 22945 | {&__pyx_n_s_StatResult, __pyx_k_StatResult, sizeof(__pyx_k_StatResult), 0, 0, 1, 1}, |
| 22946 | {&__pyx_kp_b_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 0, 0}, |
| 22947 | {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, |
| 22948 | {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0}, |
| 22949 | {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, |
| 22950 | {&__pyx_n_s_WouldBlock, __pyx_k_WouldBlock, sizeof(__pyx_k_WouldBlock), 0, 0, 1, 1}, |
| 22951 | {&__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}, |
| 22952 | {&__pyx_kp_b__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 0, 0, 0}, |
| 22953 | {&__pyx_kp_b__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 0, 0, 0}, |
| 22954 | {&__pyx_kp_b__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 0, 0, 0}, |
| 22955 | {&__pyx_kp_b__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 0, 0, 0}, |
| 22956 | {&__pyx_kp_u__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 1, 0, 0}, |
| 22957 | {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1}, |
| 22958 | {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1}, |
| 22959 | {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1}, |
| 22960 | {&__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}, |
| 22961 | {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, |
| 22962 | {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1}, |
| 22963 | {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, |
| 22964 | {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1}, |
| 22965 | {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0}, |
| 22966 | {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0}, |
| 22967 | {&__pyx_n_s_cstr, __pyx_k_cstr, sizeof(__pyx_k_cstr), 0, 0, 1, 1}, |
| 22968 | {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1}, |
| 22969 | {&__pyx_n_s_dir_handler, __pyx_k_dir_handler, sizeof(__pyx_k_dir_handler), 0, 0, 1, 1}, |
| 22970 | {&__pyx_n_s_dirname, __pyx_k_dirname, sizeof(__pyx_k_dirname), 0, 0, 1, 1}, |
| 22971 | {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, |
| 22972 | {&__pyx_n_s_dst_handler, __pyx_k_dst_handler, sizeof(__pyx_k_dst_handler), 0, 0, 1, 1}, |
| 22973 | {&__pyx_n_s_dst_name, __pyx_k_dst_name, sizeof(__pyx_k_dst_name), 0, 0, 1, 1}, |
| 22974 | {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1}, |
| 22975 | {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, |
| 22976 | {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1}, |
| 22977 | {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, |
| 22978 | {&__pyx_n_s_errno, __pyx_k_errno, sizeof(__pyx_k_errno), 0, 0, 1, 1}, |
| 22979 | {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, |
| 22980 | {&__pyx_kp_s_error_calling_librgw_create, __pyx_k_error_calling_librgw_create, sizeof(__pyx_k_error_calling_librgw_create), 0, 0, 1, 0}, |
| 22981 | {&__pyx_kp_s_error_calling_rgw_mount, __pyx_k_error_calling_rgw_mount, sizeof(__pyx_k_error_calling_rgw_mount), 0, 0, 1, 0}, |
| 22982 | {&__pyx_kp_s_error_calling_rgw_umount, __pyx_k_error_calling_rgw_umount, sizeof(__pyx_k_error_calling_rgw_umount), 0, 0, 1, 0}, |
| 22983 | {&__pyx_kp_s_error_calling_rgw_unmount, __pyx_k_error_calling_rgw_unmount, sizeof(__pyx_k_error_calling_rgw_unmount), 0, 0, 1, 0}, |
| 22984 | {&__pyx_kp_s_error_code_d, __pyx_k_error_code_d, sizeof(__pyx_k_error_code_d), 0, 0, 1, 0}, |
| 22985 | {&__pyx_kp_s_error_in_close, __pyx_k_error_in_close, sizeof(__pyx_k_error_in_close), 0, 0, 1, 0}, |
| 22986 | {&__pyx_kp_s_error_in_create_s, __pyx_k_error_in_create_s, sizeof(__pyx_k_error_in_create_s), 0, 0, 1, 0}, |
| 22987 | {&__pyx_kp_s_error_in_getattr, __pyx_k_error_in_getattr, sizeof(__pyx_k_error_in_getattr), 0, 0, 1, 0}, |
| 22988 | {&__pyx_kp_s_error_in_mkdir_s, __pyx_k_error_in_mkdir_s, sizeof(__pyx_k_error_in_mkdir_s), 0, 0, 1, 0}, |
| 22989 | {&__pyx_kp_s_error_in_open_s, __pyx_k_error_in_open_s, sizeof(__pyx_k_error_in_open_s), 0, 0, 1, 0}, |
| 22990 | {&__pyx_kp_s_error_in_read, __pyx_k_error_in_read, sizeof(__pyx_k_error_in_read), 0, 0, 1, 0}, |
| 22991 | {&__pyx_kp_s_error_in_readdir, __pyx_k_error_in_readdir, sizeof(__pyx_k_error_in_readdir), 0, 0, 1, 0}, |
| 22992 | {&__pyx_kp_s_error_in_rename_s_to_s, __pyx_k_error_in_rename_s_to_s, sizeof(__pyx_k_error_in_rename_s_to_s), 0, 0, 1, 0}, |
| 22993 | {&__pyx_kp_s_error_in_unlink, __pyx_k_error_in_unlink, sizeof(__pyx_k_error_in_unlink), 0, 0, 1, 0}, |
| 22994 | {&__pyx_kp_s_error_in_write, __pyx_k_error_in_write, sizeof(__pyx_k_error_in_write), 0, 0, 1, 0}, |
| 22995 | {&__pyx_n_s_f_bavail, __pyx_k_f_bavail, sizeof(__pyx_k_f_bavail), 0, 0, 1, 1}, |
| 22996 | {&__pyx_n_s_f_bfree, __pyx_k_f_bfree, sizeof(__pyx_k_f_bfree), 0, 0, 1, 1}, |
| 22997 | {&__pyx_n_s_f_blocks, __pyx_k_f_blocks, sizeof(__pyx_k_f_blocks), 0, 0, 1, 1}, |
| 22998 | {&__pyx_n_s_f_bsize, __pyx_k_f_bsize, sizeof(__pyx_k_f_bsize), 0, 0, 1, 1}, |
| 22999 | {&__pyx_n_s_f_favail, __pyx_k_f_favail, sizeof(__pyx_k_f_favail), 0, 0, 1, 1}, |
| 23000 | {&__pyx_n_s_f_ffree, __pyx_k_f_ffree, sizeof(__pyx_k_f_ffree), 0, 0, 1, 1}, |
| 23001 | {&__pyx_n_s_f_files, __pyx_k_f_files, sizeof(__pyx_k_f_files), 0, 0, 1, 1}, |
| 23002 | {&__pyx_n_s_f_flag, __pyx_k_f_flag, sizeof(__pyx_k_f_flag), 0, 0, 1, 1}, |
| 23003 | {&__pyx_n_s_f_frsize, __pyx_k_f_frsize, sizeof(__pyx_k_f_frsize), 0, 0, 1, 1}, |
| 23004 | {&__pyx_n_s_f_fsid, __pyx_k_f_fsid, sizeof(__pyx_k_f_fsid), 0, 0, 1, 1}, |
| 23005 | {&__pyx_n_s_f_namemax, __pyx_k_f_namemax, sizeof(__pyx_k_f_namemax), 0, 0, 1, 1}, |
| 23006 | {&__pyx_n_s_file_handler, __pyx_k_file_handler, sizeof(__pyx_k_file_handler), 0, 0, 1, 1}, |
| 23007 | {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1}, |
| 23008 | {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, |
| 23009 | {&__pyx_kp_s_flags_must_be_an_integer, __pyx_k_flags_must_be_an_integer, sizeof(__pyx_k_flags_must_be_an_integer), 0, 0, 1, 0}, |
| 23010 | {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, |
| 23011 | {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1}, |
| 23012 | {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1}, |
| 23013 | {&__pyx_n_s_fromtimestamp, __pyx_k_fromtimestamp, sizeof(__pyx_k_fromtimestamp), 0, 0, 1, 1}, |
| 23014 | {&__pyx_kp_s_fsync_failed, __pyx_k_fsync_failed, sizeof(__pyx_k_fsync_failed), 0, 0, 1, 0}, |
| 23015 | {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0}, |
| 23016 | {&__pyx_n_s_handler, __pyx_k_handler, sizeof(__pyx_k_handler), 0, 0, 1, 1}, |
| 23017 | {&__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}, |
| 23018 | {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1}, |
| 23019 | {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, |
| 23020 | {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, |
| 23021 | {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1}, |
| 23022 | {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0}, |
| 23023 | {&__pyx_n_s_iterate_cb, __pyx_k_iterate_cb, sizeof(__pyx_k_iterate_cb), 0, 0, 1, 1}, |
| 23024 | {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, |
| 23025 | {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, |
| 23026 | {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1}, |
| 23027 | {&__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}, |
| 23028 | {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, |
| 23029 | {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1}, |
| 23030 | {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, |
| 23031 | {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1}, |
| 23032 | {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, |
| 23033 | {&__pyx_n_s_mount, __pyx_k_mount, sizeof(__pyx_k_mount), 0, 0, 1, 1}, |
| 23034 | {&__pyx_n_s_mounted, __pyx_k_mounted, sizeof(__pyx_k_mounted), 0, 0, 1, 1}, |
| 23035 | {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, |
| 23036 | {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, |
| 23037 | {&__pyx_n_s_namedtuple, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1}, |
| 23038 | {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1}, |
| 23039 | {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, |
| 23040 | {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1}, |
| 23041 | {&__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}, |
| 23042 | {&__pyx_n_s_opt, __pyx_k_opt, sizeof(__pyx_k_opt), 0, 0, 1, 1}, |
| 23043 | {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1}, |
| 23044 | {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, |
| 23045 | {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1}, |
| 23046 | {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, |
| 23047 | {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, |
| 23048 | {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, |
| 23049 | {&__pyx_n_s_require_state, __pyx_k_require_state, sizeof(__pyx_k_require_state), 0, 0, 1, 1}, |
| 23050 | {&__pyx_n_s_rgw, __pyx_k_rgw, sizeof(__pyx_k_rgw), 0, 0, 1, 1}, |
| 23051 | {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0}, |
| 23052 | {&__pyx_kp_s_s_must_be_a_string, __pyx_k_s_must_be_a_string, sizeof(__pyx_k_s_must_be_a_string), 0, 0, 1, 0}, |
| 23053 | {&__pyx_n_s_secret, __pyx_k_secret, sizeof(__pyx_k_secret), 0, 0, 1, 1}, |
| 23054 | {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, |
| 23055 | {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, |
| 23056 | {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1}, |
| 23057 | {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, |
| 23058 | {&__pyx_n_s_src_handler, __pyx_k_src_handler, sizeof(__pyx_k_src_handler), 0, 0, 1, 1}, |
| 23059 | {&__pyx_n_s_src_name, __pyx_k_src_name, sizeof(__pyx_k_src_name), 0, 0, 1, 1}, |
| 23060 | {&__pyx_n_s_st_atime, __pyx_k_st_atime, sizeof(__pyx_k_st_atime), 0, 0, 1, 1}, |
| 23061 | {&__pyx_n_s_st_blksize, __pyx_k_st_blksize, sizeof(__pyx_k_st_blksize), 0, 0, 1, 1}, |
| 23062 | {&__pyx_n_s_st_blocks, __pyx_k_st_blocks, sizeof(__pyx_k_st_blocks), 0, 0, 1, 1}, |
| 23063 | {&__pyx_n_s_st_ctime, __pyx_k_st_ctime, sizeof(__pyx_k_st_ctime), 0, 0, 1, 1}, |
| 23064 | {&__pyx_n_s_st_dev, __pyx_k_st_dev, sizeof(__pyx_k_st_dev), 0, 0, 1, 1}, |
| 23065 | {&__pyx_n_s_st_gid, __pyx_k_st_gid, sizeof(__pyx_k_st_gid), 0, 0, 1, 1}, |
| 23066 | {&__pyx_n_s_st_ino, __pyx_k_st_ino, sizeof(__pyx_k_st_ino), 0, 0, 1, 1}, |
| 23067 | {&__pyx_n_s_st_mode, __pyx_k_st_mode, sizeof(__pyx_k_st_mode), 0, 0, 1, 1}, |
| 23068 | {&__pyx_n_s_st_mtime, __pyx_k_st_mtime, sizeof(__pyx_k_st_mtime), 0, 0, 1, 1}, |
| 23069 | {&__pyx_n_s_st_nlink, __pyx_k_st_nlink, sizeof(__pyx_k_st_nlink), 0, 0, 1, 1}, |
| 23070 | {&__pyx_n_s_st_rdev, __pyx_k_st_rdev, sizeof(__pyx_k_st_rdev), 0, 0, 1, 1}, |
| 23071 | {&__pyx_n_s_st_size, __pyx_k_st_size, sizeof(__pyx_k_st_size), 0, 0, 1, 1}, |
| 23072 | {&__pyx_n_s_st_uid, __pyx_k_st_uid, sizeof(__pyx_k_st_uid), 0, 0, 1, 1}, |
| 23073 | {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, |
| 23074 | {&__pyx_kp_s_statfs_failed, __pyx_k_statfs_failed, sizeof(__pyx_k_statfs_failed), 0, 0, 1, 0}, |
| 23075 | {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1}, |
| 23076 | {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, |
| 23077 | {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1}, |
| 23078 | {&__pyx_n_s_strerror, __pyx_k_strerror, sizeof(__pyx_k_strerror), 0, 0, 1, 1}, |
| 23079 | {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0}, |
| 23080 | {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0}, |
| 23081 | {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0}, |
| 23082 | {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1}, |
| 23083 | {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, |
| 23084 | {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1}, |
| 23085 | {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, |
| 23086 | {&__pyx_n_s_uid, __pyx_k_uid, sizeof(__pyx_k_uid), 0, 0, 1, 1}, |
| 23087 | {&__pyx_n_s_umounted, __pyx_k_umounted, sizeof(__pyx_k_umounted), 0, 0, 1, 1}, |
| 23088 | {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0}, |
| 23089 | {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0}, |
| 23090 | {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1}, |
| 23091 | {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, |
| 23092 | {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1}, |
| 23093 | {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, |
| 23094 | {0, 0, 0, 0, 0, 0, 0} |
| 23095 | }; |
| 23096 | static int __Pyx_InitCachedBuiltins(void) { |
| 23097 | __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__23097; goto __pyx_L1_error;} |
| 23098 | __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__23098; goto __pyx_L1_error;} |
| 23099 | __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__23099; goto __pyx_L1_error;} |
| 23100 | __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 129; __pyx_clineno = __LINE__23100; goto __pyx_L1_error;} |
| 23101 | __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 147; __pyx_clineno = __LINE__23101; goto __pyx_L1_error;} |
| 23102 | __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 176; __pyx_clineno = __LINE__23102; goto __pyx_L1_error;} |
| 23103 | __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 359; __pyx_clineno = __LINE__23103; goto __pyx_L1_error;} |
| 23104 | __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__23104; goto __pyx_L1_error;} |
| 23105 | __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 790; __pyx_clineno = __LINE__23105; goto __pyx_L1_error;} |
| 23106 | return 0; |
| 23107 | __pyx_L1_error:; |
| 23108 | return -1; |
| 23109 | } |
| 23110 | |
| 23111 | static int __Pyx_InitCachedConstants(void) { |
| 23112 | __Pyx_RefNannyDeclarations |
| 23113 | __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); |
| 23114 | |
| 23115 | /* "rgw.pyx":393 |
| 23116 | * |
| 23117 | * def mount(self): |
| 23118 | * self.require_state("umounted") # <<<<<<<<<<<<<< |
| 23119 | * cdef: |
| 23120 | * char *_uid = self.uid |
| 23121 | */ |
| 23122 | __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_umounted); if (unlikely(!__pyx_tuple_)__builtin_expect(!!(!__pyx_tuple_), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__23122; goto __pyx_L1_error;} |
| 23123 | __Pyx_GOTREF(__pyx_tuple_); |
| 23124 | __Pyx_GIVEREF(__pyx_tuple_); |
| 23125 | |
| 23126 | /* "rgw.pyx":409 |
| 23127 | * |
| 23128 | * def unmount(self): |
| 23129 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23130 | * with nogil: |
| 23131 | * ret = rgw_umount(self.fs, 0) |
| 23132 | */ |
| 23133 | __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 = 409; __pyx_clineno = __LINE__23133; goto __pyx_L1_error;} |
| 23134 | __Pyx_GOTREF(__pyx_tuple__2); |
| 23135 | __Pyx_GIVEREF(__pyx_tuple__2); |
| 23136 | |
| 23137 | /* "rgw.pyx":417 |
| 23138 | * |
| 23139 | * def statfs(self): |
| 23140 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23141 | * cdef: |
| 23142 | * rgw_statvfs statbuf |
| 23143 | */ |
| 23144 | __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 = 417; __pyx_clineno = __LINE__23144; goto __pyx_L1_error;} |
| 23145 | __Pyx_GOTREF(__pyx_tuple__3); |
| 23146 | __Pyx_GIVEREF(__pyx_tuple__3); |
| 23147 | |
| 23148 | /* "rgw.pyx":440 |
| 23149 | * |
| 23150 | * def create(self, FileHandle dir_handler, filename, flags = 0): |
| 23151 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23152 | * |
| 23153 | * if not isinstance(flags, int): |
| 23154 | */ |
| 23155 | __pyx_tuple__4 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__4)__builtin_expect(!!(!__pyx_tuple__4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__23155; goto __pyx_L1_error;} |
| 23156 | __Pyx_GOTREF(__pyx_tuple__4); |
| 23157 | __Pyx_GIVEREF(__pyx_tuple__4); |
| 23158 | |
| 23159 | /* "rgw.pyx":443 |
| 23160 | * |
| 23161 | * if not isinstance(flags, int): |
| 23162 | * raise TypeError("flags must be an integer") # <<<<<<<<<<<<<< |
| 23163 | * |
| 23164 | * filename = cstr(filename, 'filename') |
| 23165 | */ |
| 23166 | __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_flags_must_be_an_integer); if (unlikely(!__pyx_tuple__5)__builtin_expect(!!(!__pyx_tuple__5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__23166; goto __pyx_L1_error;} |
| 23167 | __Pyx_GOTREF(__pyx_tuple__5); |
| 23168 | __Pyx_GIVEREF(__pyx_tuple__5); |
| 23169 | |
| 23170 | /* "rgw.pyx":469 |
| 23171 | * |
| 23172 | * def mkdir(self, FileHandle dir_handler, dirname, flags = 0): |
| 23173 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23174 | * dirname = cstr(dirname, 'dirname') |
| 23175 | * new_dir_handler = FileHandle() |
| 23176 | */ |
| 23177 | __pyx_tuple__6 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__6)__builtin_expect(!!(!__pyx_tuple__6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__23177; goto __pyx_L1_error;} |
| 23178 | __Pyx_GOTREF(__pyx_tuple__6); |
| 23179 | __Pyx_GIVEREF(__pyx_tuple__6); |
| 23180 | |
| 23181 | /* "rgw.pyx":487 |
| 23182 | * |
| 23183 | * def rename(self, FileHandle src_handler, src_name, FileHandle dst_handler, dst_name, flags = 0): |
| 23184 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23185 | * |
| 23186 | * src_name = cstr(src_name, 'src_name') |
| 23187 | */ |
| 23188 | __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__7)__builtin_expect(!!(!__pyx_tuple__7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__23188; goto __pyx_L1_error;} |
| 23189 | __Pyx_GOTREF(__pyx_tuple__7); |
| 23190 | __Pyx_GIVEREF(__pyx_tuple__7); |
| 23191 | |
| 23192 | /* "rgw.pyx":508 |
| 23193 | * |
| 23194 | * def unlink(self, FileHandle handler, name, flags = 0): |
| 23195 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23196 | * name = cstr(name, 'name') |
| 23197 | * cdef: |
| 23198 | */ |
| 23199 | __pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__8)__builtin_expect(!!(!__pyx_tuple__8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__23199; goto __pyx_L1_error;} |
| 23200 | __Pyx_GOTREF(__pyx_tuple__8); |
| 23201 | __Pyx_GIVEREF(__pyx_tuple__8); |
| 23202 | |
| 23203 | /* "rgw.pyx":521 |
| 23204 | * |
| 23205 | * def readdir(self, FileHandle dir_handler, iterate_cb, offset, flags = 0): |
| 23206 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23207 | * |
| 23208 | * cdef: |
| 23209 | */ |
| 23210 | __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__9)__builtin_expect(!!(!__pyx_tuple__9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__23210; goto __pyx_L1_error;} |
| 23211 | __Pyx_GOTREF(__pyx_tuple__9); |
| 23212 | __Pyx_GIVEREF(__pyx_tuple__9); |
| 23213 | |
| 23214 | /* "rgw.pyx":537 |
| 23215 | * |
| 23216 | * def fstat(self, FileHandle file_handler): |
| 23217 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23218 | * |
| 23219 | * cdef: |
| 23220 | */ |
| 23221 | __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__10)__builtin_expect(!!(!__pyx_tuple__10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__23221; goto __pyx_L1_error;} |
| 23222 | __Pyx_GOTREF(__pyx_tuple__10); |
| 23223 | __Pyx_GIVEREF(__pyx_tuple__10); |
| 23224 | |
| 23225 | /* "rgw.pyx":558 |
| 23226 | * |
| 23227 | * def opendir(self, FileHandle dir_handler, dirname, flags = 0): |
| 23228 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23229 | * |
| 23230 | * if not isinstance(flags, int): |
| 23231 | */ |
| 23232 | __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__11)__builtin_expect(!!(!__pyx_tuple__11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__23232; goto __pyx_L1_error;} |
| 23233 | __Pyx_GOTREF(__pyx_tuple__11); |
| 23234 | __Pyx_GIVEREF(__pyx_tuple__11); |
| 23235 | |
| 23236 | /* "rgw.pyx":561 |
| 23237 | * |
| 23238 | * if not isinstance(flags, int): |
| 23239 | * raise TypeError("flags must be an integer") # <<<<<<<<<<<<<< |
| 23240 | * |
| 23241 | * dirname = cstr(dirname, 'dirname') |
| 23242 | */ |
| 23243 | __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_flags_must_be_an_integer); if (unlikely(!__pyx_tuple__12)__builtin_expect(!!(!__pyx_tuple__12), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__23243; goto __pyx_L1_error;} |
| 23244 | __Pyx_GOTREF(__pyx_tuple__12); |
| 23245 | __Pyx_GIVEREF(__pyx_tuple__12); |
| 23246 | |
| 23247 | /* "rgw.pyx":584 |
| 23248 | * |
| 23249 | * def open(self, FileHandle dir_handler, filename, flags = 0): |
| 23250 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23251 | * |
| 23252 | * if not isinstance(flags, int): |
| 23253 | */ |
| 23254 | __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__13)__builtin_expect(!!(!__pyx_tuple__13), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__23254; goto __pyx_L1_error;} |
| 23255 | __Pyx_GOTREF(__pyx_tuple__13); |
| 23256 | __Pyx_GIVEREF(__pyx_tuple__13); |
| 23257 | |
| 23258 | /* "rgw.pyx":587 |
| 23259 | * |
| 23260 | * if not isinstance(flags, int): |
| 23261 | * raise TypeError("flags must be an integer") # <<<<<<<<<<<<<< |
| 23262 | * |
| 23263 | * filename = cstr(filename, 'filename') |
| 23264 | */ |
| 23265 | __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_flags_must_be_an_integer); if (unlikely(!__pyx_tuple__14)__builtin_expect(!!(!__pyx_tuple__14), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__23265; goto __pyx_L1_error;} |
| 23266 | __Pyx_GOTREF(__pyx_tuple__14); |
| 23267 | __Pyx_GIVEREF(__pyx_tuple__14); |
| 23268 | |
| 23269 | /* "rgw.pyx":614 |
| 23270 | * |
| 23271 | * def close(self, FileHandle file_handler, flags = 0): |
| 23272 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23273 | * cdef: |
| 23274 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler |
| 23275 | */ |
| 23276 | __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 = 614; __pyx_clineno = __LINE__23276; goto __pyx_L1_error;} |
| 23277 | __Pyx_GOTREF(__pyx_tuple__15); |
| 23278 | __Pyx_GIVEREF(__pyx_tuple__15); |
| 23279 | |
| 23280 | /* "rgw.pyx":624 |
| 23281 | * |
| 23282 | * def read(self, FileHandle file_handler, offset, l, flags = 0): |
| 23283 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23284 | * if not isinstance(offset, int): |
| 23285 | * raise TypeError('offset must be an int') |
| 23286 | */ |
| 23287 | __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_mounted); if (unlikely(!__pyx_tuple__16)__builtin_expect(!!(!__pyx_tuple__16), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__23287; goto __pyx_L1_error;} |
| 23288 | __Pyx_GOTREF(__pyx_tuple__16); |
| 23289 | __Pyx_GIVEREF(__pyx_tuple__16); |
| 23290 | |
| 23291 | /* "rgw.pyx":626 |
| 23292 | * self.require_state("mounted") |
| 23293 | * if not isinstance(offset, int): |
| 23294 | * raise TypeError('offset must be an int') # <<<<<<<<<<<<<< |
| 23295 | * if not isinstance(l, int): |
| 23296 | * raise TypeError('l must be an int') |
| 23297 | */ |
| 23298 | __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_offset_must_be_an_int); if (unlikely(!__pyx_tuple__17)__builtin_expect(!!(!__pyx_tuple__17), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__23298; goto __pyx_L1_error;} |
| 23299 | __Pyx_GOTREF(__pyx_tuple__17); |
| 23300 | __Pyx_GIVEREF(__pyx_tuple__17); |
| 23301 | |
| 23302 | /* "rgw.pyx":628 |
| 23303 | * raise TypeError('offset must be an int') |
| 23304 | * if not isinstance(l, int): |
| 23305 | * raise TypeError('l must be an int') # <<<<<<<<<<<<<< |
| 23306 | * cdef: |
| 23307 | * rgw_file_handle *_file_handler = <rgw_file_handle*>file_handler.handler |
| 23308 | */ |
| 23309 | __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_l_must_be_an_int); if (unlikely(!__pyx_tuple__18)__builtin_expect(!!(!__pyx_tuple__18), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__23309; goto __pyx_L1_error;} |
| 23310 | __Pyx_GOTREF(__pyx_tuple__18); |
| 23311 | __Pyx_GIVEREF(__pyx_tuple__18); |
| 23312 | |
| 23313 | /* "rgw.pyx":661 |
| 23314 | * |
| 23315 | * def write(self, FileHandle file_handler, offset, buf, flags = 0): |
| 23316 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23317 | * if not isinstance(buf, bytes): |
| 23318 | * raise TypeError('buf must be a bytes') |
| 23319 | */ |
| 23320 | __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 = 661; __pyx_clineno = __LINE__23320; goto __pyx_L1_error;} |
| 23321 | __Pyx_GOTREF(__pyx_tuple__19); |
| 23322 | __Pyx_GIVEREF(__pyx_tuple__19); |
| 23323 | |
| 23324 | /* "rgw.pyx":663 |
| 23325 | * self.require_state("mounted") |
| 23326 | * if not isinstance(buf, bytes): |
| 23327 | * raise TypeError('buf must be a bytes') # <<<<<<<<<<<<<< |
| 23328 | * if not isinstance(offset, int): |
| 23329 | * raise TypeError('offset must be an int') |
| 23330 | */ |
| 23331 | __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_buf_must_be_a_bytes); if (unlikely(!__pyx_tuple__20)__builtin_expect(!!(!__pyx_tuple__20), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__23331; goto __pyx_L1_error;} |
| 23332 | __Pyx_GOTREF(__pyx_tuple__20); |
| 23333 | __Pyx_GIVEREF(__pyx_tuple__20); |
| 23334 | |
| 23335 | /* "rgw.pyx":665 |
| 23336 | * raise TypeError('buf must be a bytes') |
| 23337 | * if not isinstance(offset, int): |
| 23338 | * raise TypeError('offset must be an int') # <<<<<<<<<<<<<< |
| 23339 | * |
| 23340 | * cdef: |
| 23341 | */ |
| 23342 | __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_offset_must_be_an_int); if (unlikely(!__pyx_tuple__21)__builtin_expect(!!(!__pyx_tuple__21), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__23342; goto __pyx_L1_error;} |
| 23343 | __Pyx_GOTREF(__pyx_tuple__21); |
| 23344 | __Pyx_GIVEREF(__pyx_tuple__21); |
| 23345 | |
| 23346 | /* "rgw.pyx":685 |
| 23347 | * |
| 23348 | * def fsync(self, FileHandle handler, flags = 0): |
| 23349 | * self.require_state("mounted") # <<<<<<<<<<<<<< |
| 23350 | * |
| 23351 | * cdef: |
| 23352 | */ |
| 23353 | __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 = 685; __pyx_clineno = __LINE__23353; goto __pyx_L1_error;} |
| 23354 | __Pyx_GOTREF(__pyx_tuple__22); |
| 23355 | __Pyx_GIVEREF(__pyx_tuple__22); |
| 23356 | |
| 23357 | /* "View.MemoryView":129 |
| 23358 | * |
| 23359 | * if not self.ndim: |
| 23360 | * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<< |
| 23361 | * |
| 23362 | * if itemsize <= 0: |
| 23363 | */ |
| 23364 | __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__23)__builtin_expect(!!(!__pyx_tuple__23), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 129; __pyx_clineno = __LINE__23364; goto __pyx_L1_error;} |
| 23365 | __Pyx_GOTREF(__pyx_tuple__23); |
| 23366 | __Pyx_GIVEREF(__pyx_tuple__23); |
| 23367 | |
| 23368 | /* "View.MemoryView":132 |
| 23369 | * |
| 23370 | * if itemsize <= 0: |
| 23371 | * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<< |
| 23372 | * |
| 23373 | * if not isinstance(format, bytes): |
| 23374 | */ |
| 23375 | __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__24)__builtin_expect(!!(!__pyx_tuple__24), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 132; __pyx_clineno = __LINE__23375; goto __pyx_L1_error;} |
| 23376 | __Pyx_GOTREF(__pyx_tuple__24); |
| 23377 | __Pyx_GIVEREF(__pyx_tuple__24); |
| 23378 | |
| 23379 | /* "View.MemoryView":135 |
| 23380 | * |
| 23381 | * if not isinstance(format, bytes): |
| 23382 | * format = format.encode('ASCII') # <<<<<<<<<<<<<< |
| 23383 | * self._format = format # keep a reference to the byte string |
| 23384 | * self.format = self._format |
| 23385 | */ |
| 23386 | __pyx_tuple__25 = PyTuple_Pack(1, __pyx_n_s_ASCII); if (unlikely(!__pyx_tuple__25)__builtin_expect(!!(!__pyx_tuple__25), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__23386; goto __pyx_L1_error;} |
| 23387 | __Pyx_GOTREF(__pyx_tuple__25); |
| 23388 | __Pyx_GIVEREF(__pyx_tuple__25); |
| 23389 | |
| 23390 | /* "View.MemoryView":144 |
| 23391 | * |
| 23392 | * if not self._shape: |
| 23393 | * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<< |
| 23394 | * |
| 23395 | * |
| 23396 | */ |
| 23397 | __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__26)__builtin_expect(!!(!__pyx_tuple__26), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 144; __pyx_clineno = __LINE__23397; goto __pyx_L1_error;} |
| 23398 | __Pyx_GOTREF(__pyx_tuple__26); |
| 23399 | __Pyx_GIVEREF(__pyx_tuple__26); |
| 23400 | |
| 23401 | /* "View.MemoryView":172 |
| 23402 | * self.data = <char *>malloc(self.len) |
| 23403 | * if not self.data: |
| 23404 | * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<< |
| 23405 | * |
| 23406 | * if self.dtype_is_object: |
| 23407 | */ |
| 23408 | __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__27)__builtin_expect(!!(!__pyx_tuple__27), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 172; __pyx_clineno = __LINE__23408; goto __pyx_L1_error;} |
| 23409 | __Pyx_GOTREF(__pyx_tuple__27); |
| 23410 | __Pyx_GIVEREF(__pyx_tuple__27); |
| 23411 | |
| 23412 | /* "View.MemoryView":188 |
| 23413 | * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS |
| 23414 | * if not (flags & bufmode): |
| 23415 | * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<< |
| 23416 | * info.buf = self.data |
| 23417 | * info.len = self.len |
| 23418 | */ |
| 23419 | __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__28)__builtin_expect(!!(!__pyx_tuple__28), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 188; __pyx_clineno = __LINE__23419; goto __pyx_L1_error;} |
| 23420 | __Pyx_GOTREF(__pyx_tuple__28); |
| 23421 | __Pyx_GIVEREF(__pyx_tuple__28); |
| 23422 | |
| 23423 | /* "View.MemoryView":447 |
| 23424 | * result = struct.unpack(self.view.format, bytesitem) |
| 23425 | * except struct.error: |
| 23426 | * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<< |
| 23427 | * else: |
| 23428 | * if len(self.view.format) == 1: |
| 23429 | */ |
| 23430 | __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__29)__builtin_expect(!!(!__pyx_tuple__29), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 447; __pyx_clineno = __LINE__23430; goto __pyx_L1_error;} |
| 23431 | __Pyx_GOTREF(__pyx_tuple__29); |
| 23432 | __Pyx_GIVEREF(__pyx_tuple__29); |
| 23433 | |
| 23434 | /* "View.MemoryView":523 |
| 23435 | * if self.view.strides == NULL: |
| 23436 | * |
| 23437 | * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<< |
| 23438 | * |
| 23439 | * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) |
| 23440 | */ |
| 23441 | __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__30)__builtin_expect(!!(!__pyx_tuple__30), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 523; __pyx_clineno = __LINE__23441; goto __pyx_L1_error;} |
| 23442 | __Pyx_GOTREF(__pyx_tuple__30); |
| 23443 | __Pyx_GIVEREF(__pyx_tuple__30); |
| 23444 | |
| 23445 | /* "View.MemoryView":531 |
| 23446 | * def __get__(self): |
| 23447 | * if self.view.suboffsets == NULL: |
| 23448 | * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< |
| 23449 | * |
| 23450 | * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) |
| 23451 | */ |
| 23452 | __pyx_tuple__31 = PyTuple_New(1); if (unlikely(!__pyx_tuple__31)__builtin_expect(!!(!__pyx_tuple__31), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 531; __pyx_clineno = __LINE__23452; goto __pyx_L1_error;} |
| 23453 | __Pyx_GOTREF(__pyx_tuple__31); |
| 23454 | __Pyx_INCREF(__pyx_int_neg_1)( ((PyObject*)(__pyx_int_neg_1))->ob_refcnt++); |
| 23455 | __Pyx_GIVEREF(__pyx_int_neg_1); |
| 23456 | PyTuple_SET_ITEM(__pyx_tuple__31, 0, __pyx_int_neg_1)(((PyTupleObject *)(__pyx_tuple__31))->ob_item[0] = __pyx_int_neg_1 ); |
| 23457 | __Pyx_GIVEREF(__pyx_tuple__31); |
| 23458 | |
| 23459 | /* "View.MemoryView":640 |
| 23460 | * if item is Ellipsis: |
| 23461 | * if not seen_ellipsis: |
| 23462 | * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<< |
| 23463 | * seen_ellipsis = True |
| 23464 | * else: |
| 23465 | */ |
| 23466 | __pyx_slice__32 = PySlice_New(Py_None(&_Py_NoneStruct), Py_None(&_Py_NoneStruct), Py_None(&_Py_NoneStruct)); if (unlikely(!__pyx_slice__32)__builtin_expect(!!(!__pyx_slice__32), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__23466; goto __pyx_L1_error;} |
| 23467 | __Pyx_GOTREF(__pyx_slice__32); |
| 23468 | __Pyx_GIVEREF(__pyx_slice__32); |
| 23469 | |
| 23470 | /* "View.MemoryView":643 |
| 23471 | * seen_ellipsis = True |
| 23472 | * else: |
| 23473 | * result.append(slice(None)) # <<<<<<<<<<<<<< |
| 23474 | * have_slices = True |
| 23475 | * else: |
| 23476 | */ |
| 23477 | __pyx_slice__33 = PySlice_New(Py_None(&_Py_NoneStruct), Py_None(&_Py_NoneStruct), Py_None(&_Py_NoneStruct)); if (unlikely(!__pyx_slice__33)__builtin_expect(!!(!__pyx_slice__33), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__23477; goto __pyx_L1_error;} |
| 23478 | __Pyx_GOTREF(__pyx_slice__33); |
| 23479 | __Pyx_GIVEREF(__pyx_slice__33); |
| 23480 | |
| 23481 | /* "View.MemoryView":654 |
| 23482 | * nslices = ndim - len(result) |
| 23483 | * if nslices: |
| 23484 | * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<< |
| 23485 | * |
| 23486 | * return have_slices or nslices, tuple(result) |
| 23487 | */ |
| 23488 | __pyx_slice__34 = PySlice_New(Py_None(&_Py_NoneStruct), Py_None(&_Py_NoneStruct), Py_None(&_Py_NoneStruct)); if (unlikely(!__pyx_slice__34)__builtin_expect(!!(!__pyx_slice__34), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 654; __pyx_clineno = __LINE__23488; goto __pyx_L1_error;} |
| 23489 | __Pyx_GOTREF(__pyx_slice__34); |
| 23490 | __Pyx_GIVEREF(__pyx_slice__34); |
| 23491 | |
| 23492 | /* "View.MemoryView":661 |
| 23493 | * for suboffset in suboffsets[:ndim]: |
| 23494 | * if suboffset >= 0: |
| 23495 | * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<< |
| 23496 | * |
| 23497 | * |
| 23498 | */ |
| 23499 | __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__35)__builtin_expect(!!(!__pyx_tuple__35), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 661; __pyx_clineno = __LINE__23499; goto __pyx_L1_error;} |
| 23500 | __Pyx_GOTREF(__pyx_tuple__35); |
| 23501 | __Pyx_GIVEREF(__pyx_tuple__35); |
| 23502 | |
| 23503 | /* "rgw.pyx":189 |
| 23504 | * class OSError(Error): |
| 23505 | * """ `OSError` class, derived from `Error` """ |
| 23506 | * def __init__(self, errno, strerror): # <<<<<<<<<<<<<< |
| 23507 | * self.errno = errno |
| 23508 | * self.strerror = strerror |
| 23509 | */ |
| 23510 | __pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_errno, __pyx_n_s_strerror); if (unlikely(!__pyx_tuple__41)__builtin_expect(!!(!__pyx_tuple__41), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__23510; goto __pyx_L1_error;} |
| 23511 | __Pyx_GOTREF(__pyx_tuple__41); |
| 23512 | __Pyx_GIVEREF(__pyx_tuple__41); |
| 23513 | __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 189, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple , __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple , __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 189 , __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)__builtin_expect(!!(!__pyx_codeobj__42), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__23513; goto __pyx_L1_error;} |
| 23514 | |
| 23515 | /* "rgw.pyx":193 |
| 23516 | * self.strerror = strerror |
| 23517 | * |
| 23518 | * def __str__(self): # <<<<<<<<<<<<<< |
| 23519 | * return '[Errno {0}] {1}'.format(self.errno, self.strerror) |
| 23520 | * |
| 23521 | */ |
| 23522 | __pyx_tuple__43 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__43)__builtin_expect(!!(!__pyx_tuple__43), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__23522; goto __pyx_L1_error;} |
| 23523 | __Pyx_GOTREF(__pyx_tuple__43); |
| 23524 | __Pyx_GIVEREF(__pyx_tuple__43); |
| 23525 | __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_str, 193, __pyx_empty_bytes)PyCode_New(1 +0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple , __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple , __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_str, 193 , __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)__builtin_expect(!!(!__pyx_codeobj__44), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__23525; goto __pyx_L1_error;} |
| 23526 | |
| 23527 | /* "rgw.pyx":280 |
| 23528 | * |
| 23529 | * |
| 23530 | * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<< |
| 23531 | * """ |
| 23532 | * Create a byte string from a Python string |
| 23533 | */ |
| 23534 | __pyx_tuple__45 = PyTuple_Pack(4, __pyx_n_s_val, __pyx_n_s_name, __pyx_n_s_encoding, __pyx_n_s_opt); if (unlikely(!__pyx_tuple__45)__builtin_expect(!!(!__pyx_tuple__45), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__23534; goto __pyx_L1_error;} |
| 23535 | __Pyx_GOTREF(__pyx_tuple__45); |
| 23536 | __Pyx_GIVEREF(__pyx_tuple__45); |
| 23537 | __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_cstr, 280, __pyx_empty_bytes)PyCode_New(4 +0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple , __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple , __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_cstr, 280 , __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)__builtin_expect(!!(!__pyx_codeobj__46), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__23537; goto __pyx_L1_error;} |
| 23538 | |
| 23539 | /* "View.MemoryView":278 |
| 23540 | * return self.name |
| 23541 | * |
| 23542 | * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<< |
| 23543 | * cdef strided = Enum("<strided and direct>") # default |
| 23544 | * cdef indirect = Enum("<strided and indirect>") |
| 23545 | */ |
| 23546 | __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__47)__builtin_expect(!!(!__pyx_tuple__47), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__23546; goto __pyx_L1_error;} |
| 23547 | __Pyx_GOTREF(__pyx_tuple__47); |
| 23548 | __Pyx_GIVEREF(__pyx_tuple__47); |
| 23549 | |
| 23550 | /* "View.MemoryView":279 |
| 23551 | * |
| 23552 | * cdef generic = Enum("<strided and direct or indirect>") |
| 23553 | * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<< |
| 23554 | * cdef indirect = Enum("<strided and indirect>") |
| 23555 | * |
| 23556 | */ |
| 23557 | __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__48)__builtin_expect(!!(!__pyx_tuple__48), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__23557; goto __pyx_L1_error;} |
| 23558 | __Pyx_GOTREF(__pyx_tuple__48); |
| 23559 | __Pyx_GIVEREF(__pyx_tuple__48); |
| 23560 | |
| 23561 | /* "View.MemoryView":280 |
| 23562 | * cdef generic = Enum("<strided and direct or indirect>") |
| 23563 | * cdef strided = Enum("<strided and direct>") # default |
| 23564 | * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<< |
| 23565 | * |
| 23566 | * |
| 23567 | */ |
| 23568 | __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__49)__builtin_expect(!!(!__pyx_tuple__49), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 280; __pyx_clineno = __LINE__23568; goto __pyx_L1_error;} |
| 23569 | __Pyx_GOTREF(__pyx_tuple__49); |
| 23570 | __Pyx_GIVEREF(__pyx_tuple__49); |
| 23571 | |
| 23572 | /* "View.MemoryView":283 |
| 23573 | * |
| 23574 | * |
| 23575 | * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<< |
| 23576 | * cdef indirect_contiguous = Enum("<contiguous and indirect>") |
| 23577 | * |
| 23578 | */ |
| 23579 | __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__50)__builtin_expect(!!(!__pyx_tuple__50), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 283; __pyx_clineno = __LINE__23579; goto __pyx_L1_error;} |
| 23580 | __Pyx_GOTREF(__pyx_tuple__50); |
| 23581 | __Pyx_GIVEREF(__pyx_tuple__50); |
| 23582 | |
| 23583 | /* "View.MemoryView":284 |
| 23584 | * |
| 23585 | * cdef contiguous = Enum("<contiguous and direct>") |
| 23586 | * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<< |
| 23587 | * |
| 23588 | * |
| 23589 | */ |
| 23590 | __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__51)__builtin_expect(!!(!__pyx_tuple__51), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 284; __pyx_clineno = __LINE__23590; goto __pyx_L1_error;} |
| 23591 | __Pyx_GOTREF(__pyx_tuple__51); |
| 23592 | __Pyx_GIVEREF(__pyx_tuple__51); |
| 23593 | __Pyx_RefNannyFinishContext(); |
| 23594 | return 0; |
| 23595 | __pyx_L1_error:; |
| 23596 | __Pyx_RefNannyFinishContext(); |
| 23597 | return -1; |
| 23598 | } |
| 23599 | |
| 23600 | static int __Pyx_InitGlobals(void) { |
| 23601 | if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23601; goto __pyx_L1_error;}; |
| 23602 | __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__23602; goto __pyx_L1_error;} |
| 23603 | __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)__builtin_expect(!!(!__pyx_int_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23603; goto __pyx_L1_error;} |
| 23604 | __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)__builtin_expect(!!(!__pyx_int_neg_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23604; goto __pyx_L1_error;} |
| 23605 | return 0; |
| 23606 | __pyx_L1_error:; |
| 23607 | return -1; |
| 23608 | } |
| 23609 | |
| 23610 | #if PY_MAJOR_VERSION2 < 3 |
| 23611 | PyMODINIT_FUNCvoid initrgw(void); /*proto*/ |
| 23612 | PyMODINIT_FUNCvoid initrgw(void) |
| 23613 | #else |
| 23614 | PyMODINIT_FUNCvoid PyInit_rgw(void); /*proto*/ |
| 23615 | PyMODINIT_FUNCvoid PyInit_rgw(void) |
| 23616 | #endif |
| 23617 | { |
| 23618 | PyObject *__pyx_t_1 = NULL((void*)0); |
| 23619 | PyObject *__pyx_t_2 = NULL((void*)0); |
| 23620 | PyObject *__pyx_t_3 = NULL((void*)0); |
| 23621 | PyObject *__pyx_t_4 = NULL((void*)0); |
| 23622 | Py_ssize_t __pyx_t_5; |
| 23623 | PyObject *__pyx_t_6 = NULL((void*)0); |
| 23624 | int __pyx_lineno = 0; |
| 23625 | const char *__pyx_filename = NULL((void*)0); |
| 23626 | int __pyx_clineno = 0; |
| 23627 | __Pyx_RefNannyDeclarations |
| 23628 | #if CYTHON_REFNANNY0 |
| 23629 | __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); |
| 23630 | if (!__Pyx_RefNanny) { |
| 23631 | PyErr_Clear(); |
| 23632 | __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); |
| 23633 | if (!__Pyx_RefNanny) |
| 23634 | Py_FatalError("failed to import 'refnanny' module"); |
| 23635 | } |
| 23636 | #endif |
| 23637 | __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_rgw(void)", 0); |
| 23638 | if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23638; goto __pyx_L1_error;} |
| 23639 | __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__23639; goto __pyx_L1_error;} |
| 23640 | __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__23640; goto __pyx_L1_error;} |
| 23641 | #ifdef __Pyx_CyFunction_USED1 |
| 23642 | if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23642; goto __pyx_L1_error;} |
| 23643 | #endif |
| 23644 | #ifdef __Pyx_FusedFunction_USED |
| 23645 | if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23645; goto __pyx_L1_error;} |
| 23646 | #endif |
| 23647 | #ifdef __Pyx_Coroutine_USED |
| 23648 | if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23648; goto __pyx_L1_error;} |
| 23649 | #endif |
| 23650 | #ifdef __Pyx_Generator_USED |
| 23651 | if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23651; goto __pyx_L1_error;} |
| 23652 | #endif |
| 23653 | #ifdef __Pyx_StopAsyncIteration_USED |
| 23654 | if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23654; goto __pyx_L1_error;} |
| 23655 | #endif |
| 23656 | /*--- Library function declarations ---*/ |
| 23657 | /*--- Threads initialization code ---*/ |
| 23658 | #if defined(__PYX_FORCE_INIT_THREADS0) && __PYX_FORCE_INIT_THREADS0 |
| 23659 | #ifdef WITH_THREAD1 /* Python build with threading support? */ |
| 23660 | PyEval_InitThreads(); |
| 23661 | #endif |
| 23662 | #endif |
| 23663 | /*--- Module creation code ---*/ |
| 23664 | #if PY_MAJOR_VERSION2 < 3 |
| 23665 | __pyx_m = Py_InitModule4Py_InitModule4_64("rgw", __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); |
| 23666 | #else |
| 23667 | __pyx_m = PyModule_Create(&__pyx_moduledef); |
| 23668 | #endif |
| 23669 | if (unlikely(!__pyx_m)__builtin_expect(!!(!__pyx_m), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23669; goto __pyx_L1_error;} |
| 23670 | __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__23670; goto __pyx_L1_error;} |
| 23671 | Py_INCREF(__pyx_d)( ((PyObject*)(__pyx_d))->ob_refcnt++); |
| 23672 | __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__23672; goto __pyx_L1_error;} |
| 23673 | #if CYTHON_COMPILING_IN_PYPY0 |
| 23674 | Py_INCREF(__pyx_b)( ((PyObject*)(__pyx_b))->ob_refcnt++); |
| 23675 | #endif |
| 23676 | if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23676; goto __pyx_L1_error;}; |
| 23677 | /*--- Initialize various global constants etc. ---*/ |
| 23678 | if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23678; goto __pyx_L1_error;} |
| 23679 | #if PY_MAJOR_VERSION2 < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0) |
| 23680 | if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23680; goto __pyx_L1_error;} |
| 23681 | #endif |
| 23682 | if (__pyx_module_is_main_rgw) { |
| 23683 | if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23683; goto __pyx_L1_error;} |
| 23684 | } |
| 23685 | #if PY_MAJOR_VERSION2 >= 3 |
| 23686 | { |
| 23687 | PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)__builtin_expect(!!(!modules), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23687; goto __pyx_L1_error;} |
| 23688 | if (!PyDict_GetItemString(modules, "rgw")) { |
| 23689 | if (unlikely(PyDict_SetItemString(modules, "rgw", __pyx_m) < 0)__builtin_expect(!!(PyDict_SetItemString(modules, "rgw", __pyx_m ) < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23689; goto __pyx_L1_error;} |
| 23690 | } |
| 23691 | } |
| 23692 | #endif |
| 23693 | /*--- Builtin init code ---*/ |
| 23694 | if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23694; goto __pyx_L1_error;} |
| 23695 | /*--- Constants init code ---*/ |
| 23696 | if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23696; goto __pyx_L1_error;} |
| 23697 | /*--- Global init code ---*/ |
| 23698 | __pyx_v_3rgw_errno_to_exception = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 23699 | generic = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 23700 | strided = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 23701 | indirect = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 23702 | contiguous = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 23703 | indirect_contiguous = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 23704 | /*--- Variable export code ---*/ |
| 23705 | /*--- Function export code ---*/ |
| 23706 | /*--- Type init code ---*/ |
| 23707 | if (PyType_Ready(&__pyx_type_3rgw_FileHandle) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__23707; goto __pyx_L1_error;} |
| 23708 | __pyx_type_3rgw_FileHandle.tp_print = 0; |
| 23709 | if (PyObject_SetAttrString(__pyx_m, "FileHandle", (PyObject *)&__pyx_type_3rgw_FileHandle) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__23709; goto __pyx_L1_error;} |
| 23710 | __pyx_ptype_3rgw_FileHandle = &__pyx_type_3rgw_FileHandle; |
| 23711 | if (PyType_Ready(&__pyx_type_3rgw_LibRGWFS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__23711; goto __pyx_L1_error;} |
| 23712 | __pyx_type_3rgw_LibRGWFS.tp_print = 0; |
| 23713 | if (PyObject_SetAttrString(__pyx_m, "LibRGWFS", (PyObject *)&__pyx_type_3rgw_LibRGWFS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__23713; goto __pyx_L1_error;} |
| 23714 | __pyx_ptype_3rgw_LibRGWFS = &__pyx_type_3rgw_LibRGWFS; |
| 23715 | if (PyType_Ready(&__pyx_type___pyx_array) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 101; __pyx_clineno = __LINE__23715; goto __pyx_L1_error;} |
| 23716 | __pyx_type___pyx_array.tp_print = 0; |
| 23717 | __pyx_array_type = &__pyx_type___pyx_array; |
| 23718 | if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__23718; goto __pyx_L1_error;} |
| 23719 | __pyx_type___pyx_MemviewEnum.tp_print = 0; |
| 23720 | __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum; |
| 23721 | __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview; |
| 23722 | __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer; |
| 23723 | __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice; |
| 23724 | __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment; |
| 23725 | __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar; |
| 23726 | __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed; |
| 23727 | __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object; |
| 23728 | __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object; |
| 23729 | if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 304; __pyx_clineno = __LINE__23729; goto __pyx_L1_error;} |
| 23730 | __pyx_type___pyx_memoryview.tp_print = 0; |
| 23731 | if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 304; __pyx_clineno = __LINE__23731; goto __pyx_L1_error;} |
| 23732 | __pyx_memoryview_type = &__pyx_type___pyx_memoryview; |
| 23733 | __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice; |
| 23734 | __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview; |
| 23735 | __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object; |
| 23736 | __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object; |
| 23737 | __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type; |
| 23738 | if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 923; __pyx_clineno = __LINE__23738; goto __pyx_L1_error;} |
| 23739 | __pyx_type___pyx_memoryviewslice.tp_print = 0; |
| 23740 | if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 923; __pyx_clineno = __LINE__23740; goto __pyx_L1_error;} |
| 23741 | __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice; |
| 23742 | /*--- Type import code ---*/ |
| 23743 | __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME"__builtin__", "type", |
| 23744 | #if CYTHON_COMPILING_IN_PYPY0 |
| 23745 | sizeof(PyTypeObject), |
| 23746 | #else |
| 23747 | sizeof(PyHeapTypeObject), |
| 23748 | #endif |
| 23749 | 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)__builtin_expect(!!(!__pyx_ptype_7cpython_4type_type), 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__23749; goto __pyx_L1_error;} |
| 23750 | __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[4]; __pyx_lineno = 8; __pyx_clineno = __LINE__23750; goto __pyx_L1_error;} |
| 23751 | __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[5]; __pyx_lineno = 15; __pyx_clineno = __LINE__23751; goto __pyx_L1_error;} |
| 23752 | __pyx_ptype_7cpython_5array_array = __Pyx_ImportType("array", "array", sizeof(arrayobject), 0); if (unlikely(!__pyx_ptype_7cpython_5array_array)__builtin_expect(!!(!__pyx_ptype_7cpython_5array_array), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__23752; goto __pyx_L1_error;} |
| 23753 | __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[6]; __pyx_lineno = 14; __pyx_clineno = __LINE__23753; goto __pyx_L1_error;} |
| 23754 | __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[6]; __pyx_lineno = 26; __pyx_clineno = __LINE__23754; goto __pyx_L1_error;} |
| 23755 | /*--- Variable import code ---*/ |
| 23756 | /*--- Function import code ---*/ |
| 23757 | /*--- Execution code ---*/ |
| 23758 | #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) |
| 23759 | if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__23759; goto __pyx_L1_error;} |
| 23760 | #endif |
| 23761 | |
| 23762 | /* "rgw.pyx":13 |
| 23763 | * cimport rados |
| 23764 | * |
| 23765 | * from collections import namedtuple # <<<<<<<<<<<<<< |
| 23766 | * from datetime import datetime |
| 23767 | * import errno |
| 23768 | */ |
| 23769 | __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__23769; goto __pyx_L1_error;} |
| 23770 | __Pyx_GOTREF(__pyx_t_1); |
| 23771 | __Pyx_INCREF(__pyx_n_s_namedtuple)( ((PyObject*)(__pyx_n_s_namedtuple))->ob_refcnt++); |
| 23772 | __Pyx_GIVEREF(__pyx_n_s_namedtuple); |
| 23773 | PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_namedtuple)(((PyListObject *)(__pyx_t_1))->ob_item[0] = (__pyx_n_s_namedtuple )); |
| 23774 | __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 = 13; __pyx_clineno = __LINE__23774; goto __pyx_L1_error;} |
| 23775 | __Pyx_GOTREF(__pyx_t_2); |
| 23776 | __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; |
| 23777 | __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 = 13; __pyx_clineno = __LINE__23777; goto __pyx_L1_error;} |
| 23778 | __Pyx_GOTREF(__pyx_t_1); |
| 23779 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__23779; goto __pyx_L1_error;} |
| 23780 | __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; |
| 23781 | __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; |
| 23782 | |
| 23783 | /* "rgw.pyx":14 |
| 23784 | * |
| 23785 | * from collections import namedtuple |
| 23786 | * from datetime import datetime # <<<<<<<<<<<<<< |
| 23787 | * import errno |
| 23788 | * |
| 23789 | */ |
| 23790 | __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__23790; goto __pyx_L1_error;} |
| 23791 | __Pyx_GOTREF(__pyx_t_2); |
| 23792 | __Pyx_INCREF(__pyx_n_s_datetime)( ((PyObject*)(__pyx_n_s_datetime))->ob_refcnt++); |
| 23793 | __Pyx_GIVEREF(__pyx_n_s_datetime); |
| 23794 | PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_datetime)(((PyListObject *)(__pyx_t_2))->ob_item[0] = (__pyx_n_s_datetime )); |
| 23795 | __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 = 14; __pyx_clineno = __LINE__23795; goto __pyx_L1_error;} |
| 23796 | __Pyx_GOTREF(__pyx_t_1); |
| 23797 | __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; |
| 23798 | __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 = 14; __pyx_clineno = __LINE__23798; goto __pyx_L1_error;} |
| 23799 | __Pyx_GOTREF(__pyx_t_2); |
| 23800 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__23800; goto __pyx_L1_error;} |
| 23801 | __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; |
| 23802 | __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; |
| 23803 | |
| 23804 | /* "rgw.pyx":15 |
| 23805 | * from collections import namedtuple |
| 23806 | * from datetime import datetime |
| 23807 | * import errno # <<<<<<<<<<<<<< |
| 23808 | * |
| 23809 | * |
| 23810 | */ |
| 23811 | __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 = 15; __pyx_clineno = __LINE__23811; goto __pyx_L1_error;} |
| 23812 | __Pyx_GOTREF(__pyx_t_1); |
| 23813 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_errno, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__23813; goto __pyx_L1_error;} |
| 23814 | __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; |
| 23815 | |
| 23816 | /* "rgw.pyx":183 |
| 23817 | * |
| 23818 | * |
| 23819 | * class Error(Exception): # <<<<<<<<<<<<<< |
| 23820 | * pass |
| 23821 | * |
| 23822 | */ |
| 23823 | __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__23823; goto __pyx_L1_error;} |
| 23824 | __Pyx_GOTREF(__pyx_t_1); |
| 23825 | __Pyx_INCREF(__pyx_builtin_Exception)( ((PyObject*)(__pyx_builtin_Exception))->ob_refcnt++); |
| 23826 | __Pyx_GIVEREF(__pyx_builtin_Exception); |
| 23827 | PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_Exception)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_builtin_Exception ); |
| 23828 | __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 = 183; __pyx_clineno = __LINE__23828; goto __pyx_L1_error;} |
| 23829 | __Pyx_GOTREF(__pyx_t_2); |
| 23830 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Error, __pyx_n_s_Error, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__23830; goto __pyx_L1_error;} |
| 23831 | __Pyx_GOTREF(__pyx_t_3); |
| 23832 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Error, __pyx_t_1, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__23832; goto __pyx_L1_error;} |
| 23833 | __Pyx_GOTREF(__pyx_t_4); |
| 23834 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_Error, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__23834; goto __pyx_L1_error;} |
| 23835 | __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; |
| 23836 | __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; |
| 23837 | __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; |
| 23838 | __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; |
| 23839 | |
| 23840 | /* "rgw.pyx":187 |
| 23841 | * |
| 23842 | * |
| 23843 | * class OSError(Error): # <<<<<<<<<<<<<< |
| 23844 | * """ `OSError` class, derived from `Error` """ |
| 23845 | * def __init__(self, errno, strerror): |
| 23846 | */ |
| 23847 | __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 = 187; __pyx_clineno = __LINE__23847; goto __pyx_L1_error;} |
| 23848 | __Pyx_GOTREF(__pyx_t_1); |
| 23849 | __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__23849; goto __pyx_L1_error;} |
| 23850 | __Pyx_GOTREF(__pyx_t_2); |
| 23851 | __Pyx_GIVEREF(__pyx_t_1); |
| 23852 | PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1); |
| 23853 | __pyx_t_1 = 0; |
| 23854 | __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 = 187; __pyx_clineno = __LINE__23854; goto __pyx_L1_error;} |
| 23855 | __Pyx_GOTREF(__pyx_t_1); |
| 23856 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_OSError, __pyx_n_s_OSError, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, __pyx_kp_s_OSError_class_derived_from_Erro); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__23856; goto __pyx_L1_error;} |
| 23857 | __Pyx_GOTREF(__pyx_t_3); |
| 23858 | |
| 23859 | /* "rgw.pyx":189 |
| 23860 | * class OSError(Error): |
| 23861 | * """ `OSError` class, derived from `Error` """ |
| 23862 | * def __init__(self, errno, strerror): # <<<<<<<<<<<<<< |
| 23863 | * self.errno = errno |
| 23864 | * self.strerror = strerror |
| 23865 | */ |
| 23866 | __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rgw_7OSError_1__init__, 0, __pyx_n_s_OSError___init, NULL, __pyx_n_s_rgw, __pyx_d, ((PyObject *)__pyx_codeobj__42))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rgw_7OSError_1__init__ , 0, __pyx_n_s_OSError___init, ((void*)0), __pyx_n_s_rgw, __pyx_d , ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__23866; goto __pyx_L1_error;} |
| 23867 | __Pyx_GOTREF(__pyx_t_4); |
| 23868 | if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__23868; goto __pyx_L1_error;} |
| 23869 | __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; |
| 23870 | |
| 23871 | /* "rgw.pyx":193 |
| 23872 | * self.strerror = strerror |
| 23873 | * |
| 23874 | * def __str__(self): # <<<<<<<<<<<<<< |
| 23875 | * return '[Errno {0}] {1}'.format(self.errno, self.strerror) |
| 23876 | * |
| 23877 | */ |
| 23878 | __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rgw_7OSError_3__str__, 0, __pyx_n_s_OSError___str, NULL, __pyx_n_s_rgw, __pyx_d, ((PyObject *)__pyx_codeobj__44))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rgw_7OSError_3__str__ , 0, __pyx_n_s_OSError___str, ((void*)0), __pyx_n_s_rgw, __pyx_d , ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__23878; goto __pyx_L1_error;} |
| 23879 | __Pyx_GOTREF(__pyx_t_4); |
| 23880 | if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_str, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__23880; goto __pyx_L1_error;} |
| 23881 | __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; |
| 23882 | |
| 23883 | /* "rgw.pyx":187 |
| 23884 | * |
| 23885 | * |
| 23886 | * class OSError(Error): # <<<<<<<<<<<<<< |
| 23887 | * """ `OSError` class, derived from `Error` """ |
| 23888 | * def __init__(self, errno, strerror): |
| 23889 | */ |
| 23890 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OSError, __pyx_t_2, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__23890; goto __pyx_L1_error;} |
| 23891 | __Pyx_GOTREF(__pyx_t_4); |
| 23892 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_OSError, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__23892; goto __pyx_L1_error;} |
| 23893 | __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; |
| 23894 | __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; |
| 23895 | __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; |
| 23896 | __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; |
| 23897 | |
| 23898 | /* "rgw.pyx":197 |
| 23899 | * |
| 23900 | * |
| 23901 | * class PermissionError(OSError): # <<<<<<<<<<<<<< |
| 23902 | * pass |
| 23903 | * |
| 23904 | */ |
| 23905 | __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 = 197; __pyx_clineno = __LINE__23905; goto __pyx_L1_error;} |
| 23906 | __Pyx_GOTREF(__pyx_t_2); |
| 23907 | __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__23907; goto __pyx_L1_error;} |
| 23908 | __Pyx_GOTREF(__pyx_t_1); |
| 23909 | __Pyx_GIVEREF(__pyx_t_2); |
| 23910 | PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2); |
| 23911 | __pyx_t_2 = 0; |
| 23912 | __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 = 197; __pyx_clineno = __LINE__23912; goto __pyx_L1_error;} |
| 23913 | __Pyx_GOTREF(__pyx_t_2); |
| 23914 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_PermissionError, __pyx_n_s_PermissionError, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__23914; goto __pyx_L1_error;} |
| 23915 | __Pyx_GOTREF(__pyx_t_3); |
| 23916 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PermissionError, __pyx_t_1, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__23916; goto __pyx_L1_error;} |
| 23917 | __Pyx_GOTREF(__pyx_t_4); |
| 23918 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_PermissionError, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__23918; goto __pyx_L1_error;} |
| 23919 | __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; |
| 23920 | __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; |
| 23921 | __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; |
| 23922 | __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; |
| 23923 | |
| 23924 | /* "rgw.pyx":201 |
| 23925 | * |
| 23926 | * |
| 23927 | * class ObjectNotFound(OSError): # <<<<<<<<<<<<<< |
| 23928 | * pass |
| 23929 | * |
| 23930 | */ |
| 23931 | __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 = 201; __pyx_clineno = __LINE__23931; goto __pyx_L1_error;} |
| 23932 | __Pyx_GOTREF(__pyx_t_1); |
| 23933 | __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__23933; goto __pyx_L1_error;} |
| 23934 | __Pyx_GOTREF(__pyx_t_2); |
| 23935 | __Pyx_GIVEREF(__pyx_t_1); |
| 23936 | PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1); |
| 23937 | __pyx_t_1 = 0; |
| 23938 | __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 = 201; __pyx_clineno = __LINE__23938; goto __pyx_L1_error;} |
| 23939 | __Pyx_GOTREF(__pyx_t_1); |
| 23940 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ObjectNotFound, __pyx_n_s_ObjectNotFound, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__23940; goto __pyx_L1_error;} |
| 23941 | __Pyx_GOTREF(__pyx_t_3); |
| 23942 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ObjectNotFound, __pyx_t_2, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__23942; goto __pyx_L1_error;} |
| 23943 | __Pyx_GOTREF(__pyx_t_4); |
| 23944 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObjectNotFound, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__23944; goto __pyx_L1_error;} |
| 23945 | __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; |
| 23946 | __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; |
| 23947 | __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; |
| 23948 | __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; |
| 23949 | |
| 23950 | /* "rgw.pyx":205 |
| 23951 | * |
| 23952 | * |
| 23953 | * class NoData(Error): # <<<<<<<<<<<<<< |
| 23954 | * pass |
| 23955 | * |
| 23956 | */ |
| 23957 | __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 = 205; __pyx_clineno = __LINE__23957; goto __pyx_L1_error;} |
| 23958 | __Pyx_GOTREF(__pyx_t_2); |
| 23959 | __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__23959; goto __pyx_L1_error;} |
| 23960 | __Pyx_GOTREF(__pyx_t_1); |
| 23961 | __Pyx_GIVEREF(__pyx_t_2); |
| 23962 | PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2); |
| 23963 | __pyx_t_2 = 0; |
| 23964 | __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 = 205; __pyx_clineno = __LINE__23964; goto __pyx_L1_error;} |
| 23965 | __Pyx_GOTREF(__pyx_t_2); |
| 23966 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NoData, __pyx_n_s_NoData, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__23966; goto __pyx_L1_error;} |
| 23967 | __Pyx_GOTREF(__pyx_t_3); |
| 23968 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NoData, __pyx_t_1, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__23968; goto __pyx_L1_error;} |
| 23969 | __Pyx_GOTREF(__pyx_t_4); |
| 23970 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoData, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__23970; goto __pyx_L1_error;} |
| 23971 | __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; |
| 23972 | __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; |
| 23973 | __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; |
| 23974 | __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; |
| 23975 | |
| 23976 | /* "rgw.pyx":209 |
| 23977 | * |
| 23978 | * |
| 23979 | * class ObjectExists(Error): # <<<<<<<<<<<<<< |
| 23980 | * pass |
| 23981 | * |
| 23982 | */ |
| 23983 | __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 = 209; __pyx_clineno = __LINE__23983; goto __pyx_L1_error;} |
| 23984 | __Pyx_GOTREF(__pyx_t_1); |
| 23985 | __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__23985; goto __pyx_L1_error;} |
| 23986 | __Pyx_GOTREF(__pyx_t_2); |
| 23987 | __Pyx_GIVEREF(__pyx_t_1); |
| 23988 | PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1); |
| 23989 | __pyx_t_1 = 0; |
| 23990 | __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 = 209; __pyx_clineno = __LINE__23990; goto __pyx_L1_error;} |
| 23991 | __Pyx_GOTREF(__pyx_t_1); |
| 23992 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ObjectExists, __pyx_n_s_ObjectExists, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__23992; goto __pyx_L1_error;} |
| 23993 | __Pyx_GOTREF(__pyx_t_3); |
| 23994 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ObjectExists, __pyx_t_2, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__23994; goto __pyx_L1_error;} |
| 23995 | __Pyx_GOTREF(__pyx_t_4); |
| 23996 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObjectExists, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__23996; goto __pyx_L1_error;} |
| 23997 | __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; |
| 23998 | __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; |
| 23999 | __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; |
| 24000 | __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; |
| 24001 | |
| 24002 | /* "rgw.pyx":213 |
| 24003 | * |
| 24004 | * |
| 24005 | * class IOError(OSError): # <<<<<<<<<<<<<< |
| 24006 | * pass |
| 24007 | * |
| 24008 | */ |
| 24009 | __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 = 213; __pyx_clineno = __LINE__24009; goto __pyx_L1_error;} |
| 24010 | __Pyx_GOTREF(__pyx_t_2); |
| 24011 | __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__24011; goto __pyx_L1_error;} |
| 24012 | __Pyx_GOTREF(__pyx_t_1); |
| 24013 | __Pyx_GIVEREF(__pyx_t_2); |
| 24014 | PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2); |
| 24015 | __pyx_t_2 = 0; |
| 24016 | __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 = 213; __pyx_clineno = __LINE__24016; goto __pyx_L1_error;} |
| 24017 | __Pyx_GOTREF(__pyx_t_2); |
| 24018 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_IOError, __pyx_n_s_IOError, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__24018; goto __pyx_L1_error;} |
| 24019 | __Pyx_GOTREF(__pyx_t_3); |
| 24020 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_IOError, __pyx_t_1, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__24020; goto __pyx_L1_error;} |
| 24021 | __Pyx_GOTREF(__pyx_t_4); |
| 24022 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_IOError, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__24022; goto __pyx_L1_error;} |
| 24023 | __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; |
| 24024 | __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; |
| 24025 | __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; |
| 24026 | __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; |
| 24027 | |
| 24028 | /* "rgw.pyx":217 |
| 24029 | * |
| 24030 | * |
| 24031 | * class NoSpace(Error): # <<<<<<<<<<<<<< |
| 24032 | * pass |
| 24033 | * |
| 24034 | */ |
| 24035 | __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 = 217; __pyx_clineno = __LINE__24035; goto __pyx_L1_error;} |
| 24036 | __Pyx_GOTREF(__pyx_t_1); |
| 24037 | __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__24037; goto __pyx_L1_error;} |
| 24038 | __Pyx_GOTREF(__pyx_t_2); |
| 24039 | __Pyx_GIVEREF(__pyx_t_1); |
| 24040 | PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1); |
| 24041 | __pyx_t_1 = 0; |
| 24042 | __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 = 217; __pyx_clineno = __LINE__24042; goto __pyx_L1_error;} |
| 24043 | __Pyx_GOTREF(__pyx_t_1); |
| 24044 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NoSpace, __pyx_n_s_NoSpace, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__24044; goto __pyx_L1_error;} |
| 24045 | __Pyx_GOTREF(__pyx_t_3); |
| 24046 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NoSpace, __pyx_t_2, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__24046; goto __pyx_L1_error;} |
| 24047 | __Pyx_GOTREF(__pyx_t_4); |
| 24048 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoSpace, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__24048; goto __pyx_L1_error;} |
| 24049 | __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; |
| 24050 | __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; |
| 24051 | __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; |
| 24052 | __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; |
| 24053 | |
| 24054 | /* "rgw.pyx":221 |
| 24055 | * |
| 24056 | * |
| 24057 | * class InvalidValue(Error): # <<<<<<<<<<<<<< |
| 24058 | * pass |
| 24059 | * |
| 24060 | */ |
| 24061 | __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 = 221; __pyx_clineno = __LINE__24061; goto __pyx_L1_error;} |
| 24062 | __Pyx_GOTREF(__pyx_t_2); |
| 24063 | __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__24063; goto __pyx_L1_error;} |
| 24064 | __Pyx_GOTREF(__pyx_t_1); |
| 24065 | __Pyx_GIVEREF(__pyx_t_2); |
| 24066 | PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2); |
| 24067 | __pyx_t_2 = 0; |
| 24068 | __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 = 221; __pyx_clineno = __LINE__24068; goto __pyx_L1_error;} |
| 24069 | __Pyx_GOTREF(__pyx_t_2); |
| 24070 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_InvalidValue, __pyx_n_s_InvalidValue, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__24070; goto __pyx_L1_error;} |
| 24071 | __Pyx_GOTREF(__pyx_t_3); |
| 24072 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InvalidValue, __pyx_t_1, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__24072; goto __pyx_L1_error;} |
| 24073 | __Pyx_GOTREF(__pyx_t_4); |
| 24074 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidValue, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__24074; goto __pyx_L1_error;} |
| 24075 | __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; |
| 24076 | __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; |
| 24077 | __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; |
| 24078 | __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; |
| 24079 | |
| 24080 | /* "rgw.pyx":225 |
| 24081 | * |
| 24082 | * |
| 24083 | * class OperationNotSupported(Error): # <<<<<<<<<<<<<< |
| 24084 | * pass |
| 24085 | * |
| 24086 | */ |
| 24087 | __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 = 225; __pyx_clineno = __LINE__24087; goto __pyx_L1_error;} |
| 24088 | __Pyx_GOTREF(__pyx_t_1); |
| 24089 | __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__24089; goto __pyx_L1_error;} |
| 24090 | __Pyx_GOTREF(__pyx_t_2); |
| 24091 | __Pyx_GIVEREF(__pyx_t_1); |
| 24092 | PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1); |
| 24093 | __pyx_t_1 = 0; |
| 24094 | __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 = 225; __pyx_clineno = __LINE__24094; goto __pyx_L1_error;} |
| 24095 | __Pyx_GOTREF(__pyx_t_1); |
| 24096 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_OperationNotSupported, __pyx_n_s_OperationNotSupported, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__24096; goto __pyx_L1_error;} |
| 24097 | __Pyx_GOTREF(__pyx_t_3); |
| 24098 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OperationNotSupported, __pyx_t_2, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__24098; goto __pyx_L1_error;} |
| 24099 | __Pyx_GOTREF(__pyx_t_4); |
| 24100 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_OperationNotSupported, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__24100; goto __pyx_L1_error;} |
| 24101 | __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; |
| 24102 | __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; |
| 24103 | __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; |
| 24104 | __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; |
| 24105 | |
| 24106 | /* "rgw.pyx":229 |
| 24107 | * |
| 24108 | * |
| 24109 | * class IncompleteWriteError(Error): # <<<<<<<<<<<<<< |
| 24110 | * pass |
| 24111 | * |
| 24112 | */ |
| 24113 | __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 = 229; __pyx_clineno = __LINE__24113; goto __pyx_L1_error;} |
| 24114 | __Pyx_GOTREF(__pyx_t_2); |
| 24115 | __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__24115; goto __pyx_L1_error;} |
| 24116 | __Pyx_GOTREF(__pyx_t_1); |
| 24117 | __Pyx_GIVEREF(__pyx_t_2); |
| 24118 | PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2); |
| 24119 | __pyx_t_2 = 0; |
| 24120 | __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 = 229; __pyx_clineno = __LINE__24120; goto __pyx_L1_error;} |
| 24121 | __Pyx_GOTREF(__pyx_t_2); |
| 24122 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_IncompleteWriteError, __pyx_n_s_IncompleteWriteError, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__24122; goto __pyx_L1_error;} |
| 24123 | __Pyx_GOTREF(__pyx_t_3); |
| 24124 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_IncompleteWriteError, __pyx_t_1, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__24124; goto __pyx_L1_error;} |
| 24125 | __Pyx_GOTREF(__pyx_t_4); |
| 24126 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_IncompleteWriteError, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__24126; goto __pyx_L1_error;} |
| 24127 | __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; |
| 24128 | __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; |
| 24129 | __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; |
| 24130 | __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; |
| 24131 | |
| 24132 | /* "rgw.pyx":233 |
| 24133 | * |
| 24134 | * |
| 24135 | * class LibCephFSStateError(Error): # <<<<<<<<<<<<<< |
| 24136 | * pass |
| 24137 | * |
| 24138 | */ |
| 24139 | __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 = 233; __pyx_clineno = __LINE__24139; goto __pyx_L1_error;} |
| 24140 | __Pyx_GOTREF(__pyx_t_1); |
| 24141 | __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__24141; goto __pyx_L1_error;} |
| 24142 | __Pyx_GOTREF(__pyx_t_2); |
| 24143 | __Pyx_GIVEREF(__pyx_t_1); |
| 24144 | PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1); |
| 24145 | __pyx_t_1 = 0; |
| 24146 | __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 = 233; __pyx_clineno = __LINE__24146; goto __pyx_L1_error;} |
| 24147 | __Pyx_GOTREF(__pyx_t_1); |
| 24148 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_LibCephFSStateError, __pyx_n_s_LibCephFSStateError, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__24148; goto __pyx_L1_error;} |
| 24149 | __Pyx_GOTREF(__pyx_t_3); |
| 24150 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_LibCephFSStateError, __pyx_t_2, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__24150; goto __pyx_L1_error;} |
| 24151 | __Pyx_GOTREF(__pyx_t_4); |
| 24152 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_LibCephFSStateError, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__24152; goto __pyx_L1_error;} |
| 24153 | __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; |
| 24154 | __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; |
| 24155 | __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; |
| 24156 | __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; |
| 24157 | |
| 24158 | /* "rgw.pyx":236 |
| 24159 | * pass |
| 24160 | * |
| 24161 | * class WouldBlock(Error): # <<<<<<<<<<<<<< |
| 24162 | * pass |
| 24163 | * |
| 24164 | */ |
| 24165 | __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 = 236; __pyx_clineno = __LINE__24165; goto __pyx_L1_error;} |
| 24166 | __Pyx_GOTREF(__pyx_t_2); |
| 24167 | __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__24167; goto __pyx_L1_error;} |
| 24168 | __Pyx_GOTREF(__pyx_t_1); |
| 24169 | __Pyx_GIVEREF(__pyx_t_2); |
| 24170 | PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2); |
| 24171 | __pyx_t_2 = 0; |
| 24172 | __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 = 236; __pyx_clineno = __LINE__24172; goto __pyx_L1_error;} |
| 24173 | __Pyx_GOTREF(__pyx_t_2); |
| 24174 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_WouldBlock, __pyx_n_s_WouldBlock, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__24174; goto __pyx_L1_error;} |
| 24175 | __Pyx_GOTREF(__pyx_t_3); |
| 24176 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_WouldBlock, __pyx_t_1, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__24176; goto __pyx_L1_error;} |
| 24177 | __Pyx_GOTREF(__pyx_t_4); |
| 24178 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_WouldBlock, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__24178; goto __pyx_L1_error;} |
| 24179 | __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; |
| 24180 | __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; |
| 24181 | __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; |
| 24182 | __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; |
| 24183 | |
| 24184 | /* "rgw.pyx":239 |
| 24185 | * pass |
| 24186 | * |
| 24187 | * class OutOfRange(Error): # <<<<<<<<<<<<<< |
| 24188 | * pass |
| 24189 | * |
| 24190 | */ |
| 24191 | __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 = 239; __pyx_clineno = __LINE__24191; goto __pyx_L1_error;} |
| 24192 | __Pyx_GOTREF(__pyx_t_1); |
| 24193 | __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__24193; goto __pyx_L1_error;} |
| 24194 | __Pyx_GOTREF(__pyx_t_2); |
| 24195 | __Pyx_GIVEREF(__pyx_t_1); |
| 24196 | PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1); |
| 24197 | __pyx_t_1 = 0; |
| 24198 | __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 = 239; __pyx_clineno = __LINE__24198; goto __pyx_L1_error;} |
| 24199 | __Pyx_GOTREF(__pyx_t_1); |
| 24200 | __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_OutOfRange, __pyx_n_s_OutOfRange, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__24200; goto __pyx_L1_error;} |
| 24201 | __Pyx_GOTREF(__pyx_t_3); |
| 24202 | __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OutOfRange, __pyx_t_2, __pyx_t_3, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__24202; goto __pyx_L1_error;} |
| 24203 | __Pyx_GOTREF(__pyx_t_4); |
| 24204 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_OutOfRange, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__24204; goto __pyx_L1_error;} |
| 24205 | __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; |
| 24206 | __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; |
| 24207 | __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; |
| 24208 | __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; |
| 24209 | |
| 24210 | /* "rgw.pyx":257 |
| 24211 | * ELSE: |
| 24212 | * cdef errno_to_exception = { |
| 24213 | * errno.EPERM : PermissionError, # <<<<<<<<<<<<<< |
| 24214 | * errno.ENOENT : ObjectNotFound, |
| 24215 | * errno.EIO : IOError, |
| 24216 | */ |
| 24217 | __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24217; goto __pyx_L1_error;} |
| 24218 | __Pyx_GOTREF(__pyx_t_2); |
| 24219 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_errno); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24219; goto __pyx_L1_error;} |
| 24220 | __Pyx_GOTREF(__pyx_t_1); |
| 24221 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_EPERM); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24221; goto __pyx_L1_error;} |
| 24222 | __Pyx_GOTREF(__pyx_t_3); |
| 24223 | __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; |
| 24224 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PermissionError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24224; goto __pyx_L1_error;} |
| 24225 | __Pyx_GOTREF(__pyx_t_1); |
| 24226 | if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24226; goto __pyx_L1_error;} |
| 24227 | __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; |
| 24228 | __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; |
| 24229 | |
| 24230 | /* "rgw.pyx":258 |
| 24231 | * cdef errno_to_exception = { |
| 24232 | * errno.EPERM : PermissionError, |
| 24233 | * errno.ENOENT : ObjectNotFound, # <<<<<<<<<<<<<< |
| 24234 | * errno.EIO : IOError, |
| 24235 | * errno.ENOSPC : NoSpace, |
| 24236 | */ |
| 24237 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_errno); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__24237; goto __pyx_L1_error;} |
| 24238 | __Pyx_GOTREF(__pyx_t_1); |
| 24239 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ENOENT); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__24239; goto __pyx_L1_error;} |
| 24240 | __Pyx_GOTREF(__pyx_t_3); |
| 24241 | __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; |
| 24242 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ObjectNotFound); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__24242; goto __pyx_L1_error;} |
| 24243 | __Pyx_GOTREF(__pyx_t_1); |
| 24244 | if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24244; goto __pyx_L1_error;} |
| 24245 | __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; |
| 24246 | __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; |
| 24247 | |
| 24248 | /* "rgw.pyx":259 |
| 24249 | * errno.EPERM : PermissionError, |
| 24250 | * errno.ENOENT : ObjectNotFound, |
| 24251 | * errno.EIO : IOError, # <<<<<<<<<<<<<< |
| 24252 | * errno.ENOSPC : NoSpace, |
| 24253 | * errno.EEXIST : ObjectExists, |
| 24254 | */ |
| 24255 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_errno); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__24255; goto __pyx_L1_error;} |
| 24256 | __Pyx_GOTREF(__pyx_t_1); |
| 24257 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_EIO); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__24257; goto __pyx_L1_error;} |
| 24258 | __Pyx_GOTREF(__pyx_t_3); |
| 24259 | __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; |
| 24260 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_IOError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__24260; goto __pyx_L1_error;} |
| 24261 | __Pyx_GOTREF(__pyx_t_1); |
| 24262 | if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24262; goto __pyx_L1_error;} |
| 24263 | __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; |
| 24264 | __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; |
| 24265 | |
| 24266 | /* "rgw.pyx":260 |
| 24267 | * errno.ENOENT : ObjectNotFound, |
| 24268 | * errno.EIO : IOError, |
| 24269 | * errno.ENOSPC : NoSpace, # <<<<<<<<<<<<<< |
| 24270 | * errno.EEXIST : ObjectExists, |
| 24271 | * errno.ENODATA : NoData, |
| 24272 | */ |
| 24273 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_errno); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__24273; goto __pyx_L1_error;} |
| 24274 | __Pyx_GOTREF(__pyx_t_1); |
| 24275 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ENOSPC); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__24275; goto __pyx_L1_error;} |
| 24276 | __Pyx_GOTREF(__pyx_t_3); |
| 24277 | __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; |
| 24278 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NoSpace); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__24278; goto __pyx_L1_error;} |
| 24279 | __Pyx_GOTREF(__pyx_t_1); |
| 24280 | if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24280; goto __pyx_L1_error;} |
| 24281 | __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; |
| 24282 | __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; |
| 24283 | |
| 24284 | /* "rgw.pyx":261 |
| 24285 | * errno.EIO : IOError, |
| 24286 | * errno.ENOSPC : NoSpace, |
| 24287 | * errno.EEXIST : ObjectExists, # <<<<<<<<<<<<<< |
| 24288 | * errno.ENODATA : NoData, |
| 24289 | * errno.EINVAL : InvalidValue, |
| 24290 | */ |
| 24291 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_errno); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__24291; goto __pyx_L1_error;} |
| 24292 | __Pyx_GOTREF(__pyx_t_1); |
| 24293 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_EEXIST); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__24293; goto __pyx_L1_error;} |
| 24294 | __Pyx_GOTREF(__pyx_t_3); |
| 24295 | __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; |
| 24296 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ObjectExists); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__24296; goto __pyx_L1_error;} |
| 24297 | __Pyx_GOTREF(__pyx_t_1); |
| 24298 | if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24298; goto __pyx_L1_error;} |
| 24299 | __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; |
| 24300 | __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; |
| 24301 | |
| 24302 | /* "rgw.pyx":262 |
| 24303 | * errno.ENOSPC : NoSpace, |
| 24304 | * errno.EEXIST : ObjectExists, |
| 24305 | * errno.ENODATA : NoData, # <<<<<<<<<<<<<< |
| 24306 | * errno.EINVAL : InvalidValue, |
| 24307 | * errno.EOPNOTSUPP : OperationNotSupported, |
| 24308 | */ |
| 24309 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_errno); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__24309; goto __pyx_L1_error;} |
| 24310 | __Pyx_GOTREF(__pyx_t_1); |
| 24311 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ENODATA); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__24311; goto __pyx_L1_error;} |
| 24312 | __Pyx_GOTREF(__pyx_t_3); |
| 24313 | __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; |
| 24314 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NoData); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__24314; goto __pyx_L1_error;} |
| 24315 | __Pyx_GOTREF(__pyx_t_1); |
| 24316 | if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24316; goto __pyx_L1_error;} |
| 24317 | __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; |
| 24318 | __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; |
| 24319 | |
| 24320 | /* "rgw.pyx":263 |
| 24321 | * errno.EEXIST : ObjectExists, |
| 24322 | * errno.ENODATA : NoData, |
| 24323 | * errno.EINVAL : InvalidValue, # <<<<<<<<<<<<<< |
| 24324 | * errno.EOPNOTSUPP : OperationNotSupported, |
| 24325 | * errno.ERANGE : OutOfRange, |
| 24326 | */ |
| 24327 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_errno); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__24327; goto __pyx_L1_error;} |
| 24328 | __Pyx_GOTREF(__pyx_t_1); |
| 24329 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_EINVAL); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__24329; goto __pyx_L1_error;} |
| 24330 | __Pyx_GOTREF(__pyx_t_3); |
| 24331 | __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; |
| 24332 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidValue); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__24332; goto __pyx_L1_error;} |
| 24333 | __Pyx_GOTREF(__pyx_t_1); |
| 24334 | if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24334; goto __pyx_L1_error;} |
| 24335 | __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; |
| 24336 | __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; |
| 24337 | |
| 24338 | /* "rgw.pyx":264 |
| 24339 | * errno.ENODATA : NoData, |
| 24340 | * errno.EINVAL : InvalidValue, |
| 24341 | * errno.EOPNOTSUPP : OperationNotSupported, # <<<<<<<<<<<<<< |
| 24342 | * errno.ERANGE : OutOfRange, |
| 24343 | * errno.EWOULDBLOCK: WouldBlock, |
| 24344 | */ |
| 24345 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_errno); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__24345; goto __pyx_L1_error;} |
| 24346 | __Pyx_GOTREF(__pyx_t_1); |
| 24347 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_EOPNOTSUPP); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__24347; goto __pyx_L1_error;} |
| 24348 | __Pyx_GOTREF(__pyx_t_3); |
| 24349 | __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; |
| 24350 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OperationNotSupported); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__24350; goto __pyx_L1_error;} |
| 24351 | __Pyx_GOTREF(__pyx_t_1); |
| 24352 | if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24352; goto __pyx_L1_error;} |
| 24353 | __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; |
| 24354 | __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; |
| 24355 | |
| 24356 | /* "rgw.pyx":265 |
| 24357 | * errno.EINVAL : InvalidValue, |
| 24358 | * errno.EOPNOTSUPP : OperationNotSupported, |
| 24359 | * errno.ERANGE : OutOfRange, # <<<<<<<<<<<<<< |
| 24360 | * errno.EWOULDBLOCK: WouldBlock, |
| 24361 | * } |
| 24362 | */ |
| 24363 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_errno); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__24363; goto __pyx_L1_error;} |
| 24364 | __Pyx_GOTREF(__pyx_t_1); |
| 24365 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ERANGE); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__24365; goto __pyx_L1_error;} |
| 24366 | __Pyx_GOTREF(__pyx_t_3); |
| 24367 | __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; |
| 24368 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OutOfRange); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__24368; goto __pyx_L1_error;} |
| 24369 | __Pyx_GOTREF(__pyx_t_1); |
| 24370 | if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24370; goto __pyx_L1_error;} |
| 24371 | __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; |
| 24372 | __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; |
| 24373 | |
| 24374 | /* "rgw.pyx":266 |
| 24375 | * errno.EOPNOTSUPP : OperationNotSupported, |
| 24376 | * errno.ERANGE : OutOfRange, |
| 24377 | * errno.EWOULDBLOCK: WouldBlock, # <<<<<<<<<<<<<< |
| 24378 | * } |
| 24379 | * |
| 24380 | */ |
| 24381 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_errno); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__24381; goto __pyx_L1_error;} |
| 24382 | __Pyx_GOTREF(__pyx_t_1); |
| 24383 | __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_EWOULDBLOCK); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__24383; goto __pyx_L1_error;} |
| 24384 | __Pyx_GOTREF(__pyx_t_3); |
| 24385 | __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; |
| 24386 | __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_WouldBlock); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__24386; goto __pyx_L1_error;} |
| 24387 | __Pyx_GOTREF(__pyx_t_1); |
| 24388 | if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__24388; goto __pyx_L1_error;} |
| 24389 | __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; |
| 24390 | __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; |
| 24391 | __Pyx_XGOTREF(__pyx_v_3rgw_errno_to_exception); |
| 24392 | __Pyx_DECREF_SET(__pyx_v_3rgw_errno_to_exception, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_3rgw_errno_to_exception ; __pyx_v_3rgw_errno_to_exception = __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); |
| 24393 | __Pyx_GIVEREF(__pyx_t_2); |
| 24394 | __pyx_t_2 = 0; |
| 24395 | |
| 24396 | /* "rgw.pyx":274 |
| 24397 | * |
| 24398 | * |
| 24399 | * StatResult = namedtuple('StatResult', # <<<<<<<<<<<<<< |
| 24400 | * ["st_dev", "st_ino", "st_mode", "st_nlink", "st_uid", |
| 24401 | * "st_gid", "st_rdev", "st_size", "st_blksize", |
| 24402 | */ |
| 24403 | __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 = 274; __pyx_clineno = __LINE__24403; goto __pyx_L1_error;} |
| 24404 | __Pyx_GOTREF(__pyx_t_1); |
| 24405 | |
| 24406 | /* "rgw.pyx":275 |
| 24407 | * |
| 24408 | * StatResult = namedtuple('StatResult', |
| 24409 | * ["st_dev", "st_ino", "st_mode", "st_nlink", "st_uid", # <<<<<<<<<<<<<< |
| 24410 | * "st_gid", "st_rdev", "st_size", "st_blksize", |
| 24411 | * "st_blocks", "st_atime", "st_mtime", "st_ctime"]) |
| 24412 | */ |
| 24413 | __pyx_t_3 = PyList_New(13); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__24413; goto __pyx_L1_error;} |
| 24414 | __Pyx_GOTREF(__pyx_t_3); |
| 24415 | __Pyx_INCREF(__pyx_n_s_st_dev)( ((PyObject*)(__pyx_n_s_st_dev))->ob_refcnt++); |
| 24416 | __Pyx_GIVEREF(__pyx_n_s_st_dev); |
| 24417 | PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_st_dev)(((PyListObject *)(__pyx_t_3))->ob_item[0] = (__pyx_n_s_st_dev )); |
| 24418 | __Pyx_INCREF(__pyx_n_s_st_ino)( ((PyObject*)(__pyx_n_s_st_ino))->ob_refcnt++); |
| 24419 | __Pyx_GIVEREF(__pyx_n_s_st_ino); |
| 24420 | PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_st_ino)(((PyListObject *)(__pyx_t_3))->ob_item[1] = (__pyx_n_s_st_ino )); |
| 24421 | __Pyx_INCREF(__pyx_n_s_st_mode)( ((PyObject*)(__pyx_n_s_st_mode))->ob_refcnt++); |
| 24422 | __Pyx_GIVEREF(__pyx_n_s_st_mode); |
| 24423 | PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_st_mode)(((PyListObject *)(__pyx_t_3))->ob_item[2] = (__pyx_n_s_st_mode )); |
| 24424 | __Pyx_INCREF(__pyx_n_s_st_nlink)( ((PyObject*)(__pyx_n_s_st_nlink))->ob_refcnt++); |
| 24425 | __Pyx_GIVEREF(__pyx_n_s_st_nlink); |
| 24426 | PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_st_nlink)(((PyListObject *)(__pyx_t_3))->ob_item[3] = (__pyx_n_s_st_nlink )); |
| 24427 | __Pyx_INCREF(__pyx_n_s_st_uid)( ((PyObject*)(__pyx_n_s_st_uid))->ob_refcnt++); |
| 24428 | __Pyx_GIVEREF(__pyx_n_s_st_uid); |
| 24429 | PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_st_uid)(((PyListObject *)(__pyx_t_3))->ob_item[4] = (__pyx_n_s_st_uid )); |
| 24430 | __Pyx_INCREF(__pyx_n_s_st_gid)( ((PyObject*)(__pyx_n_s_st_gid))->ob_refcnt++); |
| 24431 | __Pyx_GIVEREF(__pyx_n_s_st_gid); |
| 24432 | PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_st_gid)(((PyListObject *)(__pyx_t_3))->ob_item[5] = (__pyx_n_s_st_gid )); |
| 24433 | __Pyx_INCREF(__pyx_n_s_st_rdev)( ((PyObject*)(__pyx_n_s_st_rdev))->ob_refcnt++); |
| 24434 | __Pyx_GIVEREF(__pyx_n_s_st_rdev); |
| 24435 | PyList_SET_ITEM(__pyx_t_3, 6, __pyx_n_s_st_rdev)(((PyListObject *)(__pyx_t_3))->ob_item[6] = (__pyx_n_s_st_rdev )); |
| 24436 | __Pyx_INCREF(__pyx_n_s_st_size)( ((PyObject*)(__pyx_n_s_st_size))->ob_refcnt++); |
| 24437 | __Pyx_GIVEREF(__pyx_n_s_st_size); |
| 24438 | PyList_SET_ITEM(__pyx_t_3, 7, __pyx_n_s_st_size)(((PyListObject *)(__pyx_t_3))->ob_item[7] = (__pyx_n_s_st_size )); |
| 24439 | __Pyx_INCREF(__pyx_n_s_st_blksize)( ((PyObject*)(__pyx_n_s_st_blksize))->ob_refcnt++); |
| 24440 | __Pyx_GIVEREF(__pyx_n_s_st_blksize); |
| 24441 | PyList_SET_ITEM(__pyx_t_3, 8, __pyx_n_s_st_blksize)(((PyListObject *)(__pyx_t_3))->ob_item[8] = (__pyx_n_s_st_blksize )); |
| 24442 | __Pyx_INCREF(__pyx_n_s_st_blocks)( ((PyObject*)(__pyx_n_s_st_blocks))->ob_refcnt++); |
| 24443 | __Pyx_GIVEREF(__pyx_n_s_st_blocks); |
| 24444 | PyList_SET_ITEM(__pyx_t_3, 9, __pyx_n_s_st_blocks)(((PyListObject *)(__pyx_t_3))->ob_item[9] = (__pyx_n_s_st_blocks )); |
| 24445 | __Pyx_INCREF(__pyx_n_s_st_atime)( ((PyObject*)(__pyx_n_s_st_atime))->ob_refcnt++); |
| 24446 | __Pyx_GIVEREF(__pyx_n_s_st_atime); |
| 24447 | PyList_SET_ITEM(__pyx_t_3, 10, __pyx_n_s_st_atime)(((PyListObject *)(__pyx_t_3))->ob_item[10] = (__pyx_n_s_st_atime )); |
| 24448 | __Pyx_INCREF(__pyx_n_s_st_mtime)( ((PyObject*)(__pyx_n_s_st_mtime))->ob_refcnt++); |
| 24449 | __Pyx_GIVEREF(__pyx_n_s_st_mtime); |
| 24450 | PyList_SET_ITEM(__pyx_t_3, 11, __pyx_n_s_st_mtime)(((PyListObject *)(__pyx_t_3))->ob_item[11] = (__pyx_n_s_st_mtime )); |
| 24451 | __Pyx_INCREF(__pyx_n_s_st_ctime)( ((PyObject*)(__pyx_n_s_st_ctime))->ob_refcnt++); |
| 24452 | __Pyx_GIVEREF(__pyx_n_s_st_ctime); |
| 24453 | PyList_SET_ITEM(__pyx_t_3, 12, __pyx_n_s_st_ctime)(((PyListObject *)(__pyx_t_3))->ob_item[12] = (__pyx_n_s_st_ctime )); |
| 24454 | __pyx_t_4 = NULL((void*)0); |
| 24455 | __pyx_t_5 = 0; |
| 24456 | if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type )), 0)) { |
| 24457 | __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self); |
| 24458 | if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) { |
| 24459 | PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func); |
| 24460 | __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); |
| 24461 | __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++); |
| 24462 | __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); |
| 24463 | __pyx_t_5 = 1; |
| 24464 | } |
| 24465 | } |
| 24466 | __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__24466; goto __pyx_L1_error;} |
| 24467 | __Pyx_GOTREF(__pyx_t_6); |
| 24468 | if (__pyx_t_4) { |
| 24469 | __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); |
| 24470 | } |
| 24471 | __Pyx_INCREF(__pyx_n_s_StatResult)( ((PyObject*)(__pyx_n_s_StatResult))->ob_refcnt++); |
| 24472 | __Pyx_GIVEREF(__pyx_n_s_StatResult); |
| 24473 | PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_s_StatResult)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_n_s_StatResult ); |
| 24474 | __Pyx_GIVEREF(__pyx_t_3); |
| 24475 | PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_t_3 ); |
| 24476 | __pyx_t_3 = 0; |
| 24477 | __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__24477; goto __pyx_L1_error;} |
| 24478 | __Pyx_GOTREF(__pyx_t_2); |
| 24479 | __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; |
| 24480 | __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; |
| 24481 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_StatResult, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__24481; goto __pyx_L1_error;} |
| 24482 | __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; |
| 24483 | |
| 24484 | /* "rgw.pyx":280 |
| 24485 | * |
| 24486 | * |
| 24487 | * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<< |
| 24488 | * """ |
| 24489 | * Create a byte string from a Python string |
| 24490 | */ |
| 24491 | __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3rgw_1cstr, NULL((void*)0), __pyx_n_s_rgw); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__24491; goto __pyx_L1_error;} |
| 24492 | __Pyx_GOTREF(__pyx_t_2); |
| 24493 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_cstr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__24493; goto __pyx_L1_error;} |
| 24494 | __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; |
| 24495 | |
| 24496 | /* "rgw.pyx":326 |
| 24497 | * |
| 24498 | * |
| 24499 | * class LibCephFSStateError(Error): # <<<<<<<<<<<<<< |
| 24500 | * pass |
| 24501 | * |
| 24502 | */ |
| 24503 | __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 = 326; __pyx_clineno = __LINE__24503; goto __pyx_L1_error;} |
| 24504 | __Pyx_GOTREF(__pyx_t_2); |
| 24505 | __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__24505; goto __pyx_L1_error;} |
| 24506 | __Pyx_GOTREF(__pyx_t_1); |
| 24507 | __Pyx_GIVEREF(__pyx_t_2); |
| 24508 | PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2); |
| 24509 | __pyx_t_2 = 0; |
| 24510 | __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 = 326; __pyx_clineno = __LINE__24510; goto __pyx_L1_error;} |
| 24511 | __Pyx_GOTREF(__pyx_t_2); |
| 24512 | __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_LibCephFSStateError, __pyx_n_s_LibCephFSStateError, (PyObject *) NULL((void*)0), __pyx_n_s_rgw, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__24512; goto __pyx_L1_error;} |
| 24513 | __Pyx_GOTREF(__pyx_t_6); |
| 24514 | __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_LibCephFSStateError, __pyx_t_1, __pyx_t_6, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__24514; goto __pyx_L1_error;} |
| 24515 | __Pyx_GOTREF(__pyx_t_3); |
| 24516 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_LibCephFSStateError, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__24516; goto __pyx_L1_error;} |
| 24517 | __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; |
| 24518 | __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; |
| 24519 | __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; |
| 24520 | __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; |
| 24521 | |
| 24522 | /* "rgw.pyx":1 |
| 24523 | * """ # <<<<<<<<<<<<<< |
| 24524 | * This module is a thin wrapper around rgw_file. |
| 24525 | * """ |
| 24526 | */ |
| 24527 | __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__24527; goto __pyx_L1_error;} |
| 24528 | __Pyx_GOTREF(__pyx_t_1); |
| 24529 | if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__24529; goto __pyx_L1_error;} |
| 24530 | __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; |
| 24531 | |
| 24532 | /* "View.MemoryView":205 |
| 24533 | * info.obj = self |
| 24534 | * |
| 24535 | * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<< |
| 24536 | * |
| 24537 | * def __dealloc__(array self): |
| 24538 | */ |
| 24539 | __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), __pyx_k_getbuffer_obj_view_flags); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__24539; goto __pyx_L1_error;} |
| 24540 | __Pyx_GOTREF(__pyx_t_1); |
| 24541 | if (PyDict_SetItem(__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__24541; goto __pyx_L1_error;} |
| 24542 | __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; |
| 24543 | PyType_Modified(__pyx_array_type); |
| 24544 | |
| 24545 | /* "View.MemoryView":278 |
| 24546 | * return self.name |
| 24547 | * |
| 24548 | * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<< |
| 24549 | * cdef strided = Enum("<strided and direct>") # default |
| 24550 | * cdef indirect = Enum("<strided and indirect>") |
| 24551 | */ |
| 24552 | __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__47, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__24552; goto __pyx_L1_error;} |
| 24553 | __Pyx_GOTREF(__pyx_t_1); |
| 24554 | __Pyx_XGOTREF(generic); |
| 24555 | __Pyx_DECREF_SET(generic, __pyx_t_1)do { PyObject *tmp = (PyObject *) generic; generic = __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); |
| 24556 | __Pyx_GIVEREF(__pyx_t_1); |
| 24557 | __pyx_t_1 = 0; |
| 24558 | |
| 24559 | /* "View.MemoryView":279 |
| 24560 | * |
| 24561 | * cdef generic = Enum("<strided and direct or indirect>") |
| 24562 | * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<< |
| 24563 | * cdef indirect = Enum("<strided and indirect>") |
| 24564 | * |
| 24565 | */ |
| 24566 | __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__48, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__24566; goto __pyx_L1_error;} |
| 24567 | __Pyx_GOTREF(__pyx_t_1); |
| 24568 | __Pyx_XGOTREF(strided); |
| 24569 | __Pyx_DECREF_SET(strided, __pyx_t_1)do { PyObject *tmp = (PyObject *) strided; strided = __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); |
| 24570 | __Pyx_GIVEREF(__pyx_t_1); |
| 24571 | __pyx_t_1 = 0; |
| 24572 | |
| 24573 | /* "View.MemoryView":280 |
| 24574 | * cdef generic = Enum("<strided and direct or indirect>") |
| 24575 | * cdef strided = Enum("<strided and direct>") # default |
| 24576 | * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<< |
| 24577 | * |
| 24578 | * |
| 24579 | */ |
| 24580 | __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__49, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 280; __pyx_clineno = __LINE__24580; goto __pyx_L1_error;} |
| 24581 | __Pyx_GOTREF(__pyx_t_1); |
| 24582 | __Pyx_XGOTREF(indirect); |
| 24583 | __Pyx_DECREF_SET(indirect, __pyx_t_1)do { PyObject *tmp = (PyObject *) indirect; indirect = __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); |
| 24584 | __Pyx_GIVEREF(__pyx_t_1); |
| 24585 | __pyx_t_1 = 0; |
| 24586 | |
| 24587 | /* "View.MemoryView":283 |
| 24588 | * |
| 24589 | * |
| 24590 | * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<< |
| 24591 | * cdef indirect_contiguous = Enum("<contiguous and indirect>") |
| 24592 | * |
| 24593 | */ |
| 24594 | __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__50, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 283; __pyx_clineno = __LINE__24594; goto __pyx_L1_error;} |
| 24595 | __Pyx_GOTREF(__pyx_t_1); |
| 24596 | __Pyx_XGOTREF(contiguous); |
| 24597 | __Pyx_DECREF_SET(contiguous, __pyx_t_1)do { PyObject *tmp = (PyObject *) contiguous; contiguous = __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); |
| 24598 | __Pyx_GIVEREF(__pyx_t_1); |
| 24599 | __pyx_t_1 = 0; |
| 24600 | |
| 24601 | /* "View.MemoryView":284 |
| 24602 | * |
| 24603 | * cdef contiguous = Enum("<contiguous and direct>") |
| 24604 | * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<< |
| 24605 | * |
| 24606 | * |
| 24607 | */ |
| 24608 | __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__51, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 284; __pyx_clineno = __LINE__24608; goto __pyx_L1_error;} |
| 24609 | __Pyx_GOTREF(__pyx_t_1); |
| 24610 | __Pyx_XGOTREF(indirect_contiguous); |
| 24611 | __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1)do { PyObject *tmp = (PyObject *) indirect_contiguous; indirect_contiguous = __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); |
| 24612 | __Pyx_GIVEREF(__pyx_t_1); |
| 24613 | __pyx_t_1 = 0; |
| 24614 | |
| 24615 | /* "View.MemoryView":498 |
| 24616 | * info.obj = self |
| 24617 | * |
| 24618 | * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<< |
| 24619 | * |
| 24620 | * |
| 24621 | */ |
| 24622 | __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), __pyx_k_getbuffer_obj_view_flags); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 498; __pyx_clineno = __LINE__24622; goto __pyx_L1_error;} |
| 24623 | __Pyx_GOTREF(__pyx_t_1); |
| 24624 | if (PyDict_SetItem(__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 498; __pyx_clineno = __LINE__24624; goto __pyx_L1_error;} |
| 24625 | __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; |
| 24626 | PyType_Modified(__pyx_memoryview_type); |
| 24627 | |
| 24628 | /* "View.MemoryView":954 |
| 24629 | * return self.from_object |
| 24630 | * |
| 24631 | * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<< |
| 24632 | * |
| 24633 | * |
| 24634 | */ |
| 24635 | __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), __pyx_k_getbuffer_obj_view_flags); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 954; __pyx_clineno = __LINE__24635; goto __pyx_L1_error;} |
| 24636 | __Pyx_GOTREF(__pyx_t_1); |
| 24637 | if (PyDict_SetItem(__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 954; __pyx_clineno = __LINE__24637; goto __pyx_L1_error;} |
| 24638 | __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; |
| 24639 | PyType_Modified(__pyx_memoryviewslice_type); |
| 24640 | |
| 24641 | /* "BufferFormatFromTypeInfo":1420 |
| 24642 | * |
| 24643 | * @cname('__pyx_format_from_typeinfo') |
| 24644 | * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<< |
| 24645 | * cdef __Pyx_StructField *field |
| 24646 | * cdef __pyx_typeinfo_string fmt |
| 24647 | */ |
| 24648 | |
| 24649 | /*--- Wrapped vars code ---*/ |
| 24650 | |
| 24651 | goto __pyx_L0; |
| 24652 | __pyx_L1_error:; |
| 24653 | __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); |
| 24654 | __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); |
| 24655 | __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); |
| 24656 | __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); |
| 24657 | __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); |
| 24658 | if (__pyx_m) { |
| 24659 | if (__pyx_d) { |
| 24660 | __Pyx_AddTraceback("init rgw", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 24661 | } |
| 24662 | 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; |
| 24663 | } else if (!PyErr_Occurred()) { |
| 24664 | PyErr_SetString(PyExc_ImportError, "init rgw"); |
| 24665 | } |
| 24666 | __pyx_L0:; |
| 24667 | __Pyx_RefNannyFinishContext(); |
| 24668 | #if PY_MAJOR_VERSION2 < 3 |
| 24669 | return; |
| 24670 | #else |
| 24671 | return __pyx_m; |
| 24672 | #endif |
| 24673 | } |
| 24674 | |
| 24675 | /* --- Runtime support code --- */ |
| 24676 | #if CYTHON_REFNANNY0 |
| 24677 | static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { |
| 24678 | PyObject *m = NULL((void*)0), *p = NULL((void*)0); |
| 24679 | void *r = NULL((void*)0); |
| 24680 | m = PyImport_ImportModule((char *)modname); |
| 24681 | if (!m) goto end; |
| 24682 | p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); |
| 24683 | if (!p) goto end; |
| 24684 | r = PyLong_AsVoidPtr(p); |
| 24685 | end: |
| 24686 | 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); |
| 24687 | 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); |
| 24688 | return (__Pyx_RefNannyAPIStruct *)r; |
| 24689 | } |
| 24690 | #endif |
| 24691 | |
| 24692 | static PyObject *__Pyx_GetBuiltinName(PyObject *name) { |
| 24693 | PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); |
| 24694 | if (unlikely(!result)__builtin_expect(!!(!result), 0)) { |
| 24695 | PyErr_Format(PyExc_NameError, |
| 24696 | #if PY_MAJOR_VERSION2 >= 3 |
| 24697 | "name '%U' is not defined", name); |
| 24698 | #else |
| 24699 | "name '%.200s' is not defined", PyString_AS_STRING(name)(((PyStringObject *)(name))->ob_sval)); |
| 24700 | #endif |
| 24701 | } |
| 24702 | return result; |
| 24703 | } |
| 24704 | |
| 24705 | static void __Pyx_RaiseArgtupleInvalid( |
| 24706 | const char* func_name, |
| 24707 | int exact, |
| 24708 | Py_ssize_t num_min, |
| 24709 | Py_ssize_t num_max, |
| 24710 | Py_ssize_t num_found) |
| 24711 | { |
| 24712 | Py_ssize_t num_expected; |
| 24713 | const char *more_or_less; |
| 24714 | if (num_found < num_min) { |
| 24715 | num_expected = num_min; |
| 24716 | more_or_less = "at least"; |
| 24717 | } else { |
| 24718 | num_expected = num_max; |
| 24719 | more_or_less = "at most"; |
| 24720 | } |
| 24721 | if (exact) { |
| 24722 | more_or_less = "exactly"; |
| 24723 | } |
| 24724 | PyErr_Format(PyExc_TypeError, |
| 24725 | "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T"z" "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T"z" "d given)", |
| 24726 | func_name, more_or_less, num_expected, |
| 24727 | (num_expected == 1) ? "" : "s", num_found); |
| 24728 | } |
| 24729 | |
| 24730 | static void __Pyx_RaiseDoubleKeywordsError( |
| 24731 | const char* func_name, |
| 24732 | PyObject* kw_name) |
| 24733 | { |
| 24734 | PyErr_Format(PyExc_TypeError, |
| 24735 | #if PY_MAJOR_VERSION2 >= 3 |
| 24736 | "%s() got multiple values for keyword argument '%U'", func_name, kw_name); |
| 24737 | #else |
| 24738 | "%s() got multiple values for keyword argument '%s'", func_name, |
| 24739 | PyString_AsString(kw_name)); |
| 24740 | #endif |
| 24741 | } |
| 24742 | |
| 24743 | static int __Pyx_ParseOptionalKeywords( |
| 24744 | PyObject *kwds, |
| 24745 | PyObject **argnames[], |
| 24746 | PyObject *kwds2, |
| 24747 | PyObject *values[], |
| 24748 | Py_ssize_t num_pos_args, |
| 24749 | const char* function_name) |
| 24750 | { |
| 24751 | PyObject *key = 0, *value = 0; |
| 24752 | Py_ssize_t pos = 0; |
| 24753 | PyObject*** name; |
| 24754 | PyObject*** first_kw_arg = argnames + num_pos_args; |
| 24755 | while (PyDict_Next(kwds, &pos, &key, &value)) { |
| 24756 | name = first_kw_arg; |
| 24757 | while (*name && (**name != key)) name++; |
| 24758 | if (*name) { |
| 24759 | values[name-argnames] = value; |
| 24760 | continue; |
| 24761 | } |
| 24762 | name = first_kw_arg; |
| 24763 | #if PY_MAJOR_VERSION2 < 3 |
| 24764 | 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)) { |
| 24765 | while (*name) { |
| 24766 | if ((CYTHON_COMPILING_IN_PYPY0 || PyString_GET_SIZE(**name)(((PyVarObject*)(**name))->ob_size) == PyString_GET_SIZE(key)(((PyVarObject*)(key))->ob_size)) |
| 24767 | && _PyString_Eq(**name, key)) { |
| 24768 | values[name-argnames] = value; |
| 24769 | break; |
| 24770 | } |
| 24771 | name++; |
| 24772 | } |
| 24773 | if (*name) continue; |
| 24774 | else { |
| 24775 | PyObject*** argname = argnames; |
| 24776 | while (argname != first_kw_arg) { |
| 24777 | if ((**argname == key) || ( |
| 24778 | (CYTHON_COMPILING_IN_PYPY0 || PyString_GET_SIZE(**argname)(((PyVarObject*)(**argname))->ob_size) == PyString_GET_SIZE(key)(((PyVarObject*)(key))->ob_size)) |
| 24779 | && _PyString_Eq(**argname, key))) { |
| 24780 | goto arg_passed_twice; |
| 24781 | } |
| 24782 | argname++; |
| 24783 | } |
| 24784 | } |
| 24785 | } else |
| 24786 | #endif |
| 24787 | if (likely(PyUnicode_Check(key))__builtin_expect(!!(((((((PyObject*)(key))->ob_type))-> tp_flags & ((1L<<28))) != 0)), 1)) { |
| 24788 | while (*name) { |
| 24789 | int cmp = (**name == key) ? 0 : |
| 24790 | #if !CYTHON_COMPILING_IN_PYPY0 && PY_MAJOR_VERSION2 >= 3 |
| 24791 | (PyUnicode_GET_SIZE(**name)(((PyUnicodeObject *)(**name))->length) != PyUnicode_GET_SIZE(key)(((PyUnicodeObject *)(key))->length)) ? 1 : |
| 24792 | #endif |
| 24793 | PyUnicode_ComparePyUnicodeUCS4_Compare(**name, key); |
| 24794 | if (cmp < 0 && unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) goto bad; |
| 24795 | if (cmp == 0) { |
| 24796 | values[name-argnames] = value; |
| 24797 | break; |
| 24798 | } |
| 24799 | name++; |
| 24800 | } |
| 24801 | if (*name) continue; |
| 24802 | else { |
| 24803 | PyObject*** argname = argnames; |
| 24804 | while (argname != first_kw_arg) { |
| 24805 | int cmp = (**argname == key) ? 0 : |
| 24806 | #if !CYTHON_COMPILING_IN_PYPY0 && PY_MAJOR_VERSION2 >= 3 |
| 24807 | (PyUnicode_GET_SIZE(**argname)(((PyUnicodeObject *)(**argname))->length) != PyUnicode_GET_SIZE(key)(((PyUnicodeObject *)(key))->length)) ? 1 : |
| 24808 | #endif |
| 24809 | PyUnicode_ComparePyUnicodeUCS4_Compare(**argname, key); |
| 24810 | if (cmp < 0 && unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) goto bad; |
| 24811 | if (cmp == 0) goto arg_passed_twice; |
| 24812 | argname++; |
| 24813 | } |
| 24814 | } |
| 24815 | } else |
| 24816 | goto invalid_keyword_type; |
| 24817 | if (kwds2) { |
| 24818 | if (unlikely(PyDict_SetItem(kwds2, key, value))__builtin_expect(!!(PyDict_SetItem(kwds2, key, value)), 0)) goto bad; |
| 24819 | } else { |
| 24820 | goto invalid_keyword; |
| 24821 | } |
| 24822 | } |
| 24823 | return 0; |
| 24824 | arg_passed_twice: |
| 24825 | __Pyx_RaiseDoubleKeywordsError(function_name, key); |
| 24826 | goto bad; |
| 24827 | invalid_keyword_type: |
| 24828 | PyErr_Format(PyExc_TypeError, |
| 24829 | "%.200s() keywords must be strings", function_name); |
| 24830 | goto bad; |
| 24831 | invalid_keyword: |
| 24832 | PyErr_Format(PyExc_TypeError, |
| 24833 | #if PY_MAJOR_VERSION2 < 3 |
| 24834 | "%.200s() got an unexpected keyword argument '%.200s'", |
| 24835 | function_name, PyString_AsString(key)); |
| 24836 | #else |
| 24837 | "%s() got an unexpected keyword argument '%U'", |
| 24838 | function_name, key); |
| 24839 | #endif |
| 24840 | bad: |
| 24841 | return -1; |
| 24842 | } |
| 24843 | |
| 24844 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 24845 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { |
| 24846 | PyObject *result; |
| 24847 | ternaryfunc call = func->ob_type->tp_call; |
| 24848 | if (unlikely(!call)__builtin_expect(!!(!call), 0)) |
| 24849 | return PyObject_Call(func, arg, kw); |
| 24850 | 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)) |
| 24851 | return NULL((void*)0); |
| 24852 | result = (*call)(func, arg, kw); |
| 24853 | Py_LeaveRecursiveCall()(--(_PyThreadState_Current)->recursion_depth); |
| 24854 | if (unlikely(!result)__builtin_expect(!!(!result), 0) && unlikely(!PyErr_Occurred())__builtin_expect(!!(!PyErr_Occurred()), 0)) { |
| 24855 | PyErr_SetString( |
| 24856 | PyExc_SystemError, |
| 24857 | "NULL result without error in PyObject_Call"); |
| 24858 | } |
| 24859 | return result; |
| 24860 | } |
| 24861 | #endif |
| 24862 | |
| 24863 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 24864 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { |
| 24865 | PyObject *self, *result; |
| 24866 | PyCFunction cfunc; |
| 24867 | cfunc = PyCFunction_GET_FUNCTION(func)(((PyCFunctionObject *)func) -> m_ml -> ml_meth); |
| 24868 | self = PyCFunction_GET_SELF(func)(((PyCFunctionObject *)func) -> m_self); |
| 24869 | 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)) |
| 24870 | return NULL((void*)0); |
| 24871 | result = cfunc(self, arg); |
| 24872 | Py_LeaveRecursiveCall()(--(_PyThreadState_Current)->recursion_depth); |
| 24873 | if (unlikely(!result)__builtin_expect(!!(!result), 0) && unlikely(!PyErr_Occurred())__builtin_expect(!!(!PyErr_Occurred()), 0)) { |
| 24874 | PyErr_SetString( |
| 24875 | PyExc_SystemError, |
| 24876 | "NULL result without error in PyObject_Call"); |
| 24877 | } |
| 24878 | return result; |
| 24879 | } |
| 24880 | #endif |
| 24881 | |
| 24882 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 24883 | static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { |
| 24884 | PyObject *result; |
| 24885 | PyObject *args = PyTuple_New(1); |
| 24886 | if (unlikely(!args)__builtin_expect(!!(!args), 0)) return NULL((void*)0); |
| 24887 | Py_INCREF(arg)( ((PyObject*)(arg))->ob_refcnt++); |
| 24888 | PyTuple_SET_ITEM(args, 0, arg)(((PyTupleObject *)(args))->ob_item[0] = arg); |
| 24889 | result = __Pyx_PyObject_Call(func, args, NULL((void*)0)); |
| 24890 | Py_DECREF(args)do { if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(args)))); } while (0); |
| 24891 | return result; |
| 24892 | } |
| 24893 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { |
| 24894 | #ifdef __Pyx_CyFunction_USED1 |
| 24895 | 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)) { |
| 24896 | #else |
| 24897 | if (likely(PyCFunction_Check(func))__builtin_expect(!!(((((PyObject*)(func))->ob_type) == & PyCFunction_Type)), 1)) { |
| 24898 | #endif |
| 24899 | if (likely(PyCFunction_GET_FLAGS(func) & METH_O)__builtin_expect(!!((((PyCFunctionObject *)func) -> m_ml -> ml_flags) & 0x0008), 1)) { |
| 24900 | return __Pyx_PyObject_CallMethO(func, arg); |
| 24901 | } |
| 24902 | } |
| 24903 | return __Pyx__PyObject_CallOneArg(func, arg); |
| 24904 | } |
| 24905 | #else |
| 24906 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { |
| 24907 | PyObject *result; |
| 24908 | PyObject *args = PyTuple_Pack(1, arg); |
| 24909 | if (unlikely(!args)__builtin_expect(!!(!args), 0)) return NULL((void*)0); |
| 24910 | result = __Pyx_PyObject_Call(func, args, NULL((void*)0)); |
| 24911 | Py_DECREF(args)do { if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(args)))); } while (0); |
| 24912 | return result; |
| 24913 | } |
| 24914 | #endif |
| 24915 | |
| 24916 | static CYTHON_INLINE__inline__ void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { |
| 24917 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 24918 | PyObject *tmp_type, *tmp_value, *tmp_tb; |
| 24919 | PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current); |
| 24920 | tmp_type = tstate->curexc_type; |
| 24921 | tmp_value = tstate->curexc_value; |
| 24922 | tmp_tb = tstate->curexc_traceback; |
| 24923 | tstate->curexc_type = type; |
| 24924 | tstate->curexc_value = value; |
| 24925 | tstate->curexc_traceback = tb; |
| 24926 | 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); |
| 24927 | 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); |
| 24928 | 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); |
| 24929 | #else |
| 24930 | PyErr_Restore(type, value, tb); |
| 24931 | #endif |
| 24932 | } |
| 24933 | static CYTHON_INLINE__inline__ void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { |
| 24934 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 24935 | PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current); |
| 24936 | *type = tstate->curexc_type; |
| 24937 | *value = tstate->curexc_value; |
| 24938 | *tb = tstate->curexc_traceback; |
| 24939 | tstate->curexc_type = 0; |
| 24940 | tstate->curexc_value = 0; |
| 24941 | tstate->curexc_traceback = 0; |
| 24942 | #else |
| 24943 | PyErr_Fetch(type, value, tb); |
| 24944 | #endif |
| 24945 | } |
| 24946 | |
| 24947 | #if PY_MAJOR_VERSION2 < 3 |
| 24948 | static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, |
| 24949 | CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *cause) { |
| 24950 | Py_XINCREF(type)do { if ((type) == ((void*)0)) ; else ( ((PyObject*)(type))-> ob_refcnt++); } while (0); |
| 24951 | if (!value || value == Py_None(&_Py_NoneStruct)) |
| 24952 | value = NULL((void*)0); |
| 24953 | else |
| 24954 | Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++); |
| 24955 | if (!tb || tb == Py_None(&_Py_NoneStruct)) |
| 24956 | tb = NULL((void*)0); |
| 24957 | else { |
| 24958 | Py_INCREF(tb)( ((PyObject*)(tb))->ob_refcnt++); |
| 24959 | if (!PyTraceBack_Check(tb)((((PyObject*)(tb))->ob_type) == &PyTraceBack_Type)) { |
| 24960 | PyErr_SetString(PyExc_TypeError, |
| 24961 | "raise: arg 3 must be a traceback or None"); |
| 24962 | goto raise_error; |
| 24963 | } |
| 24964 | } |
| 24965 | if (PyType_Check(type)((((((PyObject*)(type))->ob_type))->tp_flags & ((1L <<31))) != 0)) { |
| 24966 | #if CYTHON_COMPILING_IN_PYPY0 |
| 24967 | if (!value) { |
| 24968 | Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 24969 | value = Py_None(&_Py_NoneStruct); |
| 24970 | } |
| 24971 | #endif |
| 24972 | PyErr_NormalizeException(&type, &value, &tb); |
| 24973 | } else { |
| 24974 | if (value) { |
| 24975 | PyErr_SetString(PyExc_TypeError, |
| 24976 | "instance exception may not have a separate value"); |
| 24977 | goto raise_error; |
| 24978 | } |
| 24979 | value = type; |
| 24980 | type = (PyObject*) Py_TYPE(type)(((PyObject*)(type))->ob_type); |
| 24981 | Py_INCREF(type)( ((PyObject*)(type))->ob_refcnt++); |
| 24982 | if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { |
| 24983 | PyErr_SetString(PyExc_TypeError, |
| 24984 | "raise: exception class must be a subclass of BaseException"); |
| 24985 | goto raise_error; |
| 24986 | } |
| 24987 | } |
| 24988 | __Pyx_ErrRestore(type, value, tb); |
| 24989 | return; |
| 24990 | raise_error: |
| 24991 | 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); |
| 24992 | 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); |
| 24993 | 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); |
| 24994 | return; |
| 24995 | } |
| 24996 | #else |
| 24997 | static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { |
| 24998 | PyObject* owned_instance = NULL((void*)0); |
| 24999 | if (tb == Py_None(&_Py_NoneStruct)) { |
| 25000 | tb = 0; |
| 25001 | } else if (tb && !PyTraceBack_Check(tb)((((PyObject*)(tb))->ob_type) == &PyTraceBack_Type)) { |
| 25002 | PyErr_SetString(PyExc_TypeError, |
| 25003 | "raise: arg 3 must be a traceback or None"); |
| 25004 | goto bad; |
| 25005 | } |
| 25006 | if (value == Py_None(&_Py_NoneStruct)) |
| 25007 | value = 0; |
| 25008 | if (PyExceptionInstance_Check(type)((((type))->ob_type == &PyInstance_Type) || ((((type)-> ob_type)->tp_flags & ((1L<<30))) != 0))) { |
| 25009 | if (value) { |
| 25010 | PyErr_SetString(PyExc_TypeError, |
| 25011 | "instance exception may not have a separate value"); |
| 25012 | goto bad; |
| 25013 | } |
| 25014 | value = type; |
| 25015 | type = (PyObject*) Py_TYPE(value)(((PyObject*)(value))->ob_type); |
| 25016 | } 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)))) { |
| 25017 | PyObject *instance_class = NULL((void*)0); |
| 25018 | if (value && PyExceptionInstance_Check(value)((((value))->ob_type == &PyInstance_Type) || ((((value )->ob_type)->tp_flags & ((1L<<30))) != 0))) { |
| 25019 | instance_class = (PyObject*) Py_TYPE(value)(((PyObject*)(value))->ob_type); |
| 25020 | if (instance_class != type) { |
| 25021 | int is_subclass = PyObject_IsSubclass(instance_class, type); |
| 25022 | if (!is_subclass) { |
| 25023 | instance_class = NULL((void*)0); |
| 25024 | } else if (unlikely(is_subclass == -1)__builtin_expect(!!(is_subclass == -1), 0)) { |
| 25025 | goto bad; |
| 25026 | } else { |
| 25027 | type = instance_class; |
| 25028 | } |
| 25029 | } |
| 25030 | } |
| 25031 | if (!instance_class) { |
| 25032 | PyObject *args; |
| 25033 | if (!value) |
| 25034 | args = PyTuple_New(0); |
| 25035 | else if (PyTuple_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L <<26))) != 0)) { |
| 25036 | Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++); |
| 25037 | args = value; |
| 25038 | } else |
| 25039 | args = PyTuple_Pack(1, value); |
| 25040 | if (!args) |
| 25041 | goto bad; |
| 25042 | owned_instance = PyObject_Call(type, args, NULL((void*)0)); |
| 25043 | Py_DECREF(args)do { if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(args)))); } while (0); |
| 25044 | if (!owned_instance) |
| 25045 | goto bad; |
| 25046 | value = owned_instance; |
| 25047 | if (!PyExceptionInstance_Check(value)((((value))->ob_type == &PyInstance_Type) || ((((value )->ob_type)->tp_flags & ((1L<<30))) != 0))) { |
| 25048 | PyErr_Format(PyExc_TypeError, |
| 25049 | "calling %R should have returned an instance of " |
| 25050 | "BaseException, not %R", |
| 25051 | type, Py_TYPE(value)(((PyObject*)(value))->ob_type)); |
| 25052 | goto bad; |
| 25053 | } |
| 25054 | } |
| 25055 | } else { |
| 25056 | PyErr_SetString(PyExc_TypeError, |
| 25057 | "raise: exception class must be a subclass of BaseException"); |
| 25058 | goto bad; |
| 25059 | } |
| 25060 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x03030000 |
| 25061 | if (cause) { |
| 25062 | #else |
| 25063 | if (cause && cause != Py_None(&_Py_NoneStruct)) { |
| 25064 | #endif |
| 25065 | PyObject *fixed_cause; |
| 25066 | if (cause == Py_None(&_Py_NoneStruct)) { |
| 25067 | fixed_cause = NULL((void*)0); |
| 25068 | } 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)))) { |
| 25069 | fixed_cause = PyObject_CallObject(cause, NULL((void*)0)); |
| 25070 | if (fixed_cause == NULL((void*)0)) |
| 25071 | goto bad; |
| 25072 | } else if (PyExceptionInstance_Check(cause)((((cause))->ob_type == &PyInstance_Type) || ((((cause )->ob_type)->tp_flags & ((1L<<30))) != 0))) { |
| 25073 | fixed_cause = cause; |
| 25074 | Py_INCREF(fixed_cause)( ((PyObject*)(fixed_cause))->ob_refcnt++); |
| 25075 | } else { |
| 25076 | PyErr_SetString(PyExc_TypeError, |
| 25077 | "exception causes must derive from " |
| 25078 | "BaseException"); |
| 25079 | goto bad; |
| 25080 | } |
| 25081 | PyException_SetCause(value, fixed_cause); |
| 25082 | } |
| 25083 | PyErr_SetObject(type, value); |
| 25084 | if (tb) { |
| 25085 | #if CYTHON_COMPILING_IN_PYPY0 |
| 25086 | PyObject *tmp_type, *tmp_value, *tmp_tb; |
| 25087 | PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); |
| 25088 | Py_INCREF(tb)( ((PyObject*)(tb))->ob_refcnt++); |
| 25089 | PyErr_Restore(tmp_type, tmp_value, tb); |
| 25090 | 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); |
| 25091 | #else |
| 25092 | PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current); |
| 25093 | PyObject* tmp_tb = tstate->curexc_traceback; |
| 25094 | if (tb != tmp_tb) { |
| 25095 | Py_INCREF(tb)( ((PyObject*)(tb))->ob_refcnt++); |
| 25096 | tstate->curexc_traceback = tb; |
| 25097 | 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); |
| 25098 | } |
| 25099 | #endif |
| 25100 | } |
| 25101 | bad: |
| 25102 | 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); |
| 25103 | return; |
| 25104 | } |
| 25105 | #endif |
| 25106 | |
| 25107 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { |
| 25108 | PyObject *result; |
| 25109 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 25110 | result = PyDict_GetItem(__pyx_d, name); |
| 25111 | if (likely(result)__builtin_expect(!!(result), 1)) { |
| 25112 | Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++); |
| 25113 | } else { |
| 25114 | #else |
| 25115 | result = PyObject_GetItem(__pyx_d, name); |
| 25116 | if (!result) { |
| 25117 | PyErr_Clear(); |
| 25118 | #endif |
| 25119 | result = __Pyx_GetBuiltinName(name); |
| 25120 | } |
| 25121 | return result; |
| 25122 | } |
| 25123 | |
| 25124 | static CYTHON_INLINE__inline__ int __Pyx_CheckKeywordStrings( |
| 25125 | PyObject *kwdict, |
| 25126 | const char* function_name, |
| 25127 | int kw_allowed) |
| 25128 | { |
| 25129 | PyObject* key = 0; |
| 25130 | Py_ssize_t pos = 0; |
| 25131 | #if CYTHON_COMPILING_IN_PYPY0 |
| 25132 | if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) |
| 25133 | goto invalid_keyword; |
| 25134 | return 1; |
| 25135 | #else |
| 25136 | while (PyDict_Next(kwdict, &pos, &key, 0)) { |
| 25137 | #if PY_MAJOR_VERSION2 < 3 |
| 25138 | 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)) |
| 25139 | #endif |
| 25140 | if (unlikely(!PyUnicode_Check(key))__builtin_expect(!!(!((((((PyObject*)(key))->ob_type))-> tp_flags & ((1L<<28))) != 0)), 0)) |
| 25141 | goto invalid_keyword_type; |
| 25142 | } |
| 25143 | if ((!kw_allowed) && unlikely(key)__builtin_expect(!!(key), 0)) |
| 25144 | goto invalid_keyword; |
| 25145 | return 1; |
| 25146 | invalid_keyword_type: |
| 25147 | PyErr_Format(PyExc_TypeError, |
| 25148 | "%.200s() keywords must be strings", function_name); |
| 25149 | return 0; |
| 25150 | #endif |
| 25151 | invalid_keyword: |
| 25152 | PyErr_Format(PyExc_TypeError, |
| 25153 | #if PY_MAJOR_VERSION2 < 3 |
| 25154 | "%.200s() got an unexpected keyword argument '%.200s'", |
| 25155 | function_name, PyString_AsString(key)); |
| 25156 | #else |
| 25157 | "%s() got an unexpected keyword argument '%U'", |
| 25158 | function_name, key); |
| 25159 | #endif |
| 25160 | return 0; |
| 25161 | } |
| 25162 | |
| 25163 | static CYTHON_INLINE__inline__ int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { |
| 25164 | #if CYTHON_COMPILING_IN_PYPY0 |
| 25165 | return PyObject_RichCompareBool(s1, s2, equals); |
| 25166 | #else |
| 25167 | if (s1 == s2) { |
| 25168 | return (equals == Py_EQ2); |
| 25169 | } else if (PyBytes_CheckExact(s1)((((PyObject*)(s1))->ob_type) == &PyString_Type) & PyBytes_CheckExact(s2)((((PyObject*)(s2))->ob_type) == &PyString_Type)) { |
| 25170 | const char *ps1, *ps2; |
| 25171 | Py_ssize_t length = PyBytes_GET_SIZE(s1)(((PyVarObject*)(s1))->ob_size); |
| 25172 | if (length != PyBytes_GET_SIZE(s2)(((PyVarObject*)(s2))->ob_size)) |
| 25173 | return (equals == Py_NE3); |
| 25174 | ps1 = PyBytes_AS_STRING(s1)(((PyStringObject *)(s1))->ob_sval); |
| 25175 | ps2 = PyBytes_AS_STRING(s2)(((PyStringObject *)(s2))->ob_sval); |
| 25176 | if (ps1[0] != ps2[0]) { |
| 25177 | return (equals == Py_NE3); |
| 25178 | } else if (length == 1) { |
| 25179 | return (equals == Py_EQ2); |
| 25180 | } else { |
| 25181 | int result = memcmp(ps1, ps2, (size_t)length); |
| 25182 | return (equals == Py_EQ2) ? (result == 0) : (result != 0); |
| 25183 | } |
| 25184 | } else if ((s1 == Py_None(&_Py_NoneStruct)) & PyBytes_CheckExact(s2)((((PyObject*)(s2))->ob_type) == &PyString_Type)) { |
| 25185 | return (equals == Py_NE3); |
| 25186 | } else if ((s2 == Py_None(&_Py_NoneStruct)) & PyBytes_CheckExact(s1)((((PyObject*)(s1))->ob_type) == &PyString_Type)) { |
| 25187 | return (equals == Py_NE3); |
| 25188 | } else { |
| 25189 | int result; |
| 25190 | PyObject* py_result = PyObject_RichCompare(s1, s2, equals); |
| 25191 | if (!py_result) |
| 25192 | return -1; |
| 25193 | result = __Pyx_PyObject_IsTrue(py_result); |
| 25194 | 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); |
| 25195 | return result; |
| 25196 | } |
| 25197 | #endif |
| 25198 | } |
| 25199 | |
| 25200 | static CYTHON_INLINE__inline__ int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { |
| 25201 | #if CYTHON_COMPILING_IN_PYPY0 |
| 25202 | return PyObject_RichCompareBool(s1, s2, equals); |
| 25203 | #else |
| 25204 | #if PY_MAJOR_VERSION2 < 3 |
| 25205 | PyObject* owned_ref = NULL((void*)0); |
| 25206 | #endif |
| 25207 | int s1_is_unicode, s2_is_unicode; |
| 25208 | if (s1 == s2) { |
| 25209 | goto return_eq; |
| 25210 | } |
| 25211 | s1_is_unicode = PyUnicode_CheckExact(s1)((((PyObject*)(s1))->ob_type) == &PyUnicode_Type); |
| 25212 | s2_is_unicode = PyUnicode_CheckExact(s2)((((PyObject*)(s2))->ob_type) == &PyUnicode_Type); |
| 25213 | #if PY_MAJOR_VERSION2 < 3 |
| 25214 | if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)((((PyObject*)(s2))->ob_type) == &PyString_Type)) { |
| 25215 | owned_ref = PyUnicode_FromObjectPyUnicodeUCS4_FromObject(s2); |
| 25216 | if (unlikely(!owned_ref)__builtin_expect(!!(!owned_ref), 0)) |
| 25217 | return -1; |
| 25218 | s2 = owned_ref; |
| 25219 | s2_is_unicode = 1; |
| 25220 | } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)((((PyObject*)(s1))->ob_type) == &PyString_Type)) { |
| 25221 | owned_ref = PyUnicode_FromObjectPyUnicodeUCS4_FromObject(s1); |
| 25222 | if (unlikely(!owned_ref)__builtin_expect(!!(!owned_ref), 0)) |
| 25223 | return -1; |
| 25224 | s1 = owned_ref; |
| 25225 | s1_is_unicode = 1; |
| 25226 | } else if (((!s2_is_unicode) & (!s1_is_unicode))) { |
| 25227 | return __Pyx_PyBytes_Equals(s1, s2, equals); |
| 25228 | } |
| 25229 | #endif |
| 25230 | if (s1_is_unicode & s2_is_unicode) { |
| 25231 | Py_ssize_t length; |
| 25232 | int kind; |
| 25233 | void *data1, *data2; |
| 25234 | if (unlikely(__Pyx_PyUnicode_READY(s1) < 0)__builtin_expect(!!((0) < 0), 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)__builtin_expect(!!((0) < 0), 0)) |
| 25235 | return -1; |
| 25236 | length = __Pyx_PyUnicode_GET_LENGTH(s1)(((PyUnicodeObject *)(s1))->length); |
| 25237 | if (length != __Pyx_PyUnicode_GET_LENGTH(s2)(((PyUnicodeObject *)(s2))->length)) { |
| 25238 | goto return_ne; |
| 25239 | } |
| 25240 | kind = __Pyx_PyUnicode_KIND(s1)(sizeof(Py_UNICODE)); |
| 25241 | if (kind != __Pyx_PyUnicode_KIND(s2)(sizeof(Py_UNICODE))) { |
| 25242 | goto return_ne; |
| 25243 | } |
| 25244 | data1 = __Pyx_PyUnicode_DATA(s1)((void*)(((PyUnicodeObject *)(s1))->str)); |
| 25245 | data2 = __Pyx_PyUnicode_DATA(s2)((void*)(((PyUnicodeObject *)(s2))->str)); |
| 25246 | 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]))) { |
| 25247 | goto return_ne; |
| 25248 | } else if (length == 1) { |
| 25249 | goto return_eq; |
| 25250 | } else { |
| 25251 | int result = memcmp(data1, data2, (size_t)(length * kind)); |
| 25252 | #if PY_MAJOR_VERSION2 < 3 |
| 25253 | 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); |
| 25254 | #endif |
| 25255 | return (equals == Py_EQ2) ? (result == 0) : (result != 0); |
| 25256 | } |
| 25257 | } else if ((s1 == Py_None(&_Py_NoneStruct)) & s2_is_unicode) { |
| 25258 | goto return_ne; |
| 25259 | } else if ((s2 == Py_None(&_Py_NoneStruct)) & s1_is_unicode) { |
| 25260 | goto return_ne; |
| 25261 | } else { |
| 25262 | int result; |
| 25263 | PyObject* py_result = PyObject_RichCompare(s1, s2, equals); |
| 25264 | if (!py_result) |
| 25265 | return -1; |
| 25266 | result = __Pyx_PyObject_IsTrue(py_result); |
| 25267 | 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); |
| 25268 | return result; |
| 25269 | } |
| 25270 | return_eq: |
| 25271 | #if PY_MAJOR_VERSION2 < 3 |
| 25272 | 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); |
| 25273 | #endif |
| 25274 | return (equals == Py_EQ2); |
| 25275 | return_ne: |
| 25276 | #if PY_MAJOR_VERSION2 < 3 |
| 25277 | 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); |
| 25278 | #endif |
| 25279 | return (equals == Py_NE3); |
| 25280 | #endif |
| 25281 | } |
| 25282 | |
| 25283 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 25284 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { |
| 25285 | #ifdef __Pyx_CyFunction_USED1 |
| 25286 | 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)) { |
| 25287 | #else |
| 25288 | if (likely(PyCFunction_Check(func))__builtin_expect(!!(((((PyObject*)(func))->ob_type) == & PyCFunction_Type)), 1)) { |
| 25289 | #endif |
| 25290 | if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)__builtin_expect(!!((((PyCFunctionObject *)func) -> m_ml -> ml_flags) & 0x0004), 1)) { |
| 25291 | return __Pyx_PyObject_CallMethO(func, NULL((void*)0)); |
| 25292 | } |
| 25293 | } |
| 25294 | return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL((void*)0)); |
| 25295 | } |
| 25296 | #endif |
| 25297 | |
| 25298 | static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED__attribute__ ((__unused__)) int clineno, |
| 25299 | CYTHON_UNUSED__attribute__ ((__unused__)) int lineno, CYTHON_UNUSED__attribute__ ((__unused__)) const char *filename, |
| 25300 | int full_traceback, CYTHON_UNUSED__attribute__ ((__unused__)) int nogil) { |
| 25301 | PyObject *old_exc, *old_val, *old_tb; |
| 25302 | PyObject *ctx; |
| 25303 | #ifdef WITH_THREAD1 |
| 25304 | PyGILState_STATE state; |
| 25305 | if (nogil) |
| 25306 | state = PyGILState_Ensure(); |
| 25307 | #endif |
| 25308 | __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); |
| 25309 | if (full_traceback) { |
| 25310 | Py_XINCREF(old_exc)do { if ((old_exc) == ((void*)0)) ; else ( ((PyObject*)(old_exc ))->ob_refcnt++); } while (0); |
| 25311 | Py_XINCREF(old_val)do { if ((old_val) == ((void*)0)) ; else ( ((PyObject*)(old_val ))->ob_refcnt++); } while (0); |
| 25312 | Py_XINCREF(old_tb)do { if ((old_tb) == ((void*)0)) ; else ( ((PyObject*)(old_tb ))->ob_refcnt++); } while (0); |
| 25313 | __Pyx_ErrRestore(old_exc, old_val, old_tb); |
| 25314 | PyErr_PrintEx(1); |
| 25315 | } |
| 25316 | #if PY_MAJOR_VERSION2 < 3 |
| 25317 | ctx = PyString_FromString(name); |
| 25318 | #else |
| 25319 | ctx = PyUnicode_FromStringPyUnicodeUCS4_FromString(name); |
| 25320 | #endif |
| 25321 | __Pyx_ErrRestore(old_exc, old_val, old_tb); |
| 25322 | if (!ctx) { |
| 25323 | PyErr_WriteUnraisable(Py_None(&_Py_NoneStruct)); |
| 25324 | } else { |
| 25325 | PyErr_WriteUnraisable(ctx); |
| 25326 | Py_DECREF(ctx)do { if ( --((PyObject*)(ctx))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(ctx)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(ctx)))); } while (0); |
| 25327 | } |
| 25328 | #ifdef WITH_THREAD1 |
| 25329 | if (nogil) |
| 25330 | PyGILState_Release(state); |
| 25331 | #endif |
| 25332 | } |
| 25333 | |
| 25334 | static CYTHON_INLINE__inline__ int __Pyx_IsLittleEndian(void) { |
| 25335 | unsigned int n = 1; |
| 25336 | return *(unsigned char*)(&n) != 0; |
| 25337 | } |
| 25338 | static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, |
| 25339 | __Pyx_BufFmt_StackElem* stack, |
| 25340 | __Pyx_TypeInfo* type) { |
| 25341 | stack[0].field = &ctx->root; |
| 25342 | stack[0].parent_offset = 0; |
| 25343 | ctx->root.type = type; |
| 25344 | ctx->root.name = "buffer dtype"; |
| 25345 | ctx->root.offset = 0; |
| 25346 | ctx->head = stack; |
| 25347 | ctx->head->field = &ctx->root; |
| 25348 | ctx->fmt_offset = 0; |
| 25349 | ctx->head->parent_offset = 0; |
| 25350 | ctx->new_packmode = '@'; |
| 25351 | ctx->enc_packmode = '@'; |
| 25352 | ctx->new_count = 1; |
| 25353 | ctx->enc_count = 0; |
| 25354 | ctx->enc_type = 0; |
| 25355 | ctx->is_complex = 0; |
| 25356 | ctx->is_valid_array = 0; |
| 25357 | ctx->struct_alignment = 0; |
| 25358 | while (type->typegroup == 'S') { |
| 25359 | ++ctx->head; |
| 25360 | ctx->head->field = type->fields; |
| 25361 | ctx->head->parent_offset = 0; |
| 25362 | type = type->fields->type; |
| 25363 | } |
| 25364 | } |
| 25365 | static int __Pyx_BufFmt_ParseNumber(const char** ts) { |
| 25366 | int count; |
| 25367 | const char* t = *ts; |
| 25368 | if (*t < '0' || *t > '9') { |
| 25369 | return -1; |
| 25370 | } else { |
| 25371 | count = *t++ - '0'; |
| 25372 | while (*t >= '0' && *t < '9') { |
| 25373 | count *= 10; |
| 25374 | count += *t++ - '0'; |
| 25375 | } |
| 25376 | } |
| 25377 | *ts = t; |
| 25378 | return count; |
| 25379 | } |
| 25380 | static int __Pyx_BufFmt_ExpectNumber(const char **ts) { |
| 25381 | int number = __Pyx_BufFmt_ParseNumber(ts); |
| 25382 | if (number == -1) |
| 25383 | PyErr_Format(PyExc_ValueError,\ |
| 25384 | "Does not understand character buffer dtype format string ('%c')", **ts); |
| 25385 | return number; |
| 25386 | } |
| 25387 | static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { |
| 25388 | PyErr_Format(PyExc_ValueError, |
| 25389 | "Unexpected format string character: '%c'", ch); |
| 25390 | } |
| 25391 | static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { |
| 25392 | switch (ch) { |
| 25393 | case 'c': return "'char'"; |
| 25394 | case 'b': return "'signed char'"; |
| 25395 | case 'B': return "'unsigned char'"; |
| 25396 | case 'h': return "'short'"; |
| 25397 | case 'H': return "'unsigned short'"; |
| 25398 | case 'i': return "'int'"; |
| 25399 | case 'I': return "'unsigned int'"; |
| 25400 | case 'l': return "'long'"; |
| 25401 | case 'L': return "'unsigned long'"; |
| 25402 | case 'q': return "'long long'"; |
| 25403 | case 'Q': return "'unsigned long long'"; |
| 25404 | case 'f': return (is_complex ? "'complex float'" : "'float'"); |
| 25405 | case 'd': return (is_complex ? "'complex double'" : "'double'"); |
| 25406 | case 'g': return (is_complex ? "'complex long double'" : "'long double'"); |
| 25407 | case 'T': return "a struct"; |
| 25408 | case 'O': return "Python object"; |
| 25409 | case 'P': return "a pointer"; |
| 25410 | case 's': case 'p': return "a string"; |
| 25411 | case 0: return "end"; |
| 25412 | default: return "unparseable format string"; |
| 25413 | } |
| 25414 | } |
| 25415 | static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { |
| 25416 | switch (ch) { |
| 25417 | case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; |
| 25418 | case 'h': case 'H': return 2; |
| 25419 | case 'i': case 'I': case 'l': case 'L': return 4; |
| 25420 | case 'q': case 'Q': return 8; |
| 25421 | case 'f': return (is_complex ? 8 : 4); |
| 25422 | case 'd': return (is_complex ? 16 : 8); |
| 25423 | case 'g': { |
| 25424 | PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); |
| 25425 | return 0; |
| 25426 | } |
| 25427 | case 'O': case 'P': return sizeof(void*); |
| 25428 | default: |
| 25429 | __Pyx_BufFmt_RaiseUnexpectedChar(ch); |
| 25430 | return 0; |
| 25431 | } |
| 25432 | } |
| 25433 | static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { |
| 25434 | switch (ch) { |
| 25435 | case 'c': case 'b': case 'B': case 's': case 'p': return 1; |
| 25436 | case 'h': case 'H': return sizeof(short); |
| 25437 | case 'i': case 'I': return sizeof(int); |
| 25438 | case 'l': case 'L': return sizeof(long); |
| 25439 | #ifdef HAVE_LONG_LONG1 |
| 25440 | case 'q': case 'Q': return sizeof(PY_LONG_LONGlong long); |
| 25441 | #endif |
| 25442 | case 'f': return sizeof(float) * (is_complex ? 2 : 1); |
| 25443 | case 'd': return sizeof(double) * (is_complex ? 2 : 1); |
| 25444 | case 'g': return sizeof(long double) * (is_complex ? 2 : 1); |
| 25445 | case 'O': case 'P': return sizeof(void*); |
| 25446 | default: { |
| 25447 | __Pyx_BufFmt_RaiseUnexpectedChar(ch); |
| 25448 | return 0; |
| 25449 | } |
| 25450 | } |
| 25451 | } |
| 25452 | typedef struct { char c; short x; } __Pyx_st_short; |
| 25453 | typedef struct { char c; int x; } __Pyx_st_int; |
| 25454 | typedef struct { char c; long x; } __Pyx_st_long; |
| 25455 | typedef struct { char c; float x; } __Pyx_st_float; |
| 25456 | typedef struct { char c; double x; } __Pyx_st_double; |
| 25457 | typedef struct { char c; long double x; } __Pyx_st_longdouble; |
| 25458 | typedef struct { char c; void *x; } __Pyx_st_void_p; |
| 25459 | #ifdef HAVE_LONG_LONG1 |
| 25460 | typedef struct { char c; PY_LONG_LONGlong long x; } __Pyx_st_longlong; |
| 25461 | #endif |
| 25462 | static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED__attribute__ ((__unused__)) int is_complex) { |
| 25463 | switch (ch) { |
| 25464 | case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; |
| 25465 | case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); |
| 25466 | case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); |
| 25467 | case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); |
| 25468 | #ifdef HAVE_LONG_LONG1 |
| 25469 | case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONGlong long); |
| 25470 | #endif |
| 25471 | case 'f': return sizeof(__Pyx_st_float) - sizeof(float); |
| 25472 | case 'd': return sizeof(__Pyx_st_double) - sizeof(double); |
| 25473 | case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); |
| 25474 | case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); |
| 25475 | default: |
| 25476 | __Pyx_BufFmt_RaiseUnexpectedChar(ch); |
| 25477 | return 0; |
| 25478 | } |
| 25479 | } |
| 25480 | /* These are for computing the padding at the end of the struct to align |
| 25481 | on the first member of the struct. This will probably the same as above, |
| 25482 | but we don't have any guarantees. |
| 25483 | */ |
| 25484 | typedef struct { short x; char c; } __Pyx_pad_short; |
| 25485 | typedef struct { int x; char c; } __Pyx_pad_int; |
| 25486 | typedef struct { long x; char c; } __Pyx_pad_long; |
| 25487 | typedef struct { float x; char c; } __Pyx_pad_float; |
| 25488 | typedef struct { double x; char c; } __Pyx_pad_double; |
| 25489 | typedef struct { long double x; char c; } __Pyx_pad_longdouble; |
| 25490 | typedef struct { void *x; char c; } __Pyx_pad_void_p; |
| 25491 | #ifdef HAVE_LONG_LONG1 |
| 25492 | typedef struct { PY_LONG_LONGlong long x; char c; } __Pyx_pad_longlong; |
| 25493 | #endif |
| 25494 | static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED__attribute__ ((__unused__)) int is_complex) { |
| 25495 | switch (ch) { |
| 25496 | case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; |
| 25497 | case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); |
| 25498 | case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); |
| 25499 | case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); |
| 25500 | #ifdef HAVE_LONG_LONG1 |
| 25501 | case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONGlong long); |
| 25502 | #endif |
| 25503 | case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); |
| 25504 | case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); |
| 25505 | case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); |
| 25506 | case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); |
| 25507 | default: |
| 25508 | __Pyx_BufFmt_RaiseUnexpectedChar(ch); |
| 25509 | return 0; |
| 25510 | } |
| 25511 | } |
| 25512 | static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { |
| 25513 | switch (ch) { |
| 25514 | case 'c': |
| 25515 | return 'H'; |
| 25516 | case 'b': case 'h': case 'i': |
| 25517 | case 'l': case 'q': case 's': case 'p': |
| 25518 | return 'I'; |
| 25519 | case 'B': case 'H': case 'I': case 'L': case 'Q': |
| 25520 | return 'U'; |
| 25521 | case 'f': case 'd': case 'g': |
| 25522 | return (is_complex ? 'C' : 'R'); |
| 25523 | case 'O': |
| 25524 | return 'O'; |
| 25525 | case 'P': |
| 25526 | return 'P'; |
| 25527 | default: { |
| 25528 | __Pyx_BufFmt_RaiseUnexpectedChar(ch); |
| 25529 | return 0; |
| 25530 | } |
| 25531 | } |
| 25532 | } |
| 25533 | static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { |
| 25534 | if (ctx->head == NULL((void*)0) || ctx->head->field == &ctx->root) { |
| 25535 | const char* expected; |
| 25536 | const char* quote; |
| 25537 | if (ctx->head == NULL((void*)0)) { |
| 25538 | expected = "end"; |
| 25539 | quote = ""; |
| 25540 | } else { |
| 25541 | expected = ctx->head->field->type->name; |
| 25542 | quote = "'"; |
| 25543 | } |
| 25544 | PyErr_Format(PyExc_ValueError, |
| 25545 | "Buffer dtype mismatch, expected %s%s%s but got %s", |
| 25546 | quote, expected, quote, |
| 25547 | __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); |
| 25548 | } else { |
| 25549 | __Pyx_StructField* field = ctx->head->field; |
| 25550 | __Pyx_StructField* parent = (ctx->head - 1)->field; |
| 25551 | PyErr_Format(PyExc_ValueError, |
| 25552 | "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", |
| 25553 | field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), |
| 25554 | parent->type->name, field->name); |
| 25555 | } |
| 25556 | } |
| 25557 | static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { |
| 25558 | char group; |
| 25559 | size_t size, offset, arraysize = 1; |
| 25560 | if (ctx->enc_type == 0) return 0; |
| 25561 | if (ctx->head->field->type->arraysize[0]) { |
| 25562 | int i, ndim = 0; |
| 25563 | if (ctx->enc_type == 's' || ctx->enc_type == 'p') { |
| 25564 | ctx->is_valid_array = ctx->head->field->type->ndim == 1; |
| 25565 | ndim = 1; |
| 25566 | if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { |
| 25567 | PyErr_Format(PyExc_ValueError, |
| 25568 | "Expected a dimension of size %zu, got %zu", |
| 25569 | ctx->head->field->type->arraysize[0], ctx->enc_count); |
| 25570 | return -1; |
| 25571 | } |
| 25572 | } |
| 25573 | if (!ctx->is_valid_array) { |
| 25574 | PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", |
| 25575 | ctx->head->field->type->ndim, ndim); |
| 25576 | return -1; |
| 25577 | } |
| 25578 | for (i = 0; i < ctx->head->field->type->ndim; i++) { |
| 25579 | arraysize *= ctx->head->field->type->arraysize[i]; |
| 25580 | } |
| 25581 | ctx->is_valid_array = 0; |
| 25582 | ctx->enc_count = 1; |
| 25583 | } |
| 25584 | group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); |
| 25585 | do { |
| 25586 | __Pyx_StructField* field = ctx->head->field; |
| 25587 | __Pyx_TypeInfo* type = field->type; |
| 25588 | if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { |
| 25589 | size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); |
| 25590 | } else { |
| 25591 | size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); |
| 25592 | } |
| 25593 | if (ctx->enc_packmode == '@') { |
| 25594 | size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); |
| 25595 | size_t align_mod_offset; |
| 25596 | if (align_at == 0) return -1; |
| 25597 | align_mod_offset = ctx->fmt_offset % align_at; |
| 25598 | if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; |
| 25599 | if (ctx->struct_alignment == 0) |
| 25600 | ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, |
| 25601 | ctx->is_complex); |
| 25602 | } |
| 25603 | if (type->size != size || type->typegroup != group) { |
| 25604 | if (type->typegroup == 'C' && type->fields != NULL((void*)0)) { |
| 25605 | size_t parent_offset = ctx->head->parent_offset + field->offset; |
| 25606 | ++ctx->head; |
| 25607 | ctx->head->field = type->fields; |
| 25608 | ctx->head->parent_offset = parent_offset; |
| 25609 | continue; |
| 25610 | } |
| 25611 | if ((type->typegroup == 'H' || group == 'H') && type->size == size) { |
| 25612 | } else { |
| 25613 | __Pyx_BufFmt_RaiseExpected(ctx); |
| 25614 | return -1; |
| 25615 | } |
| 25616 | } |
| 25617 | offset = ctx->head->parent_offset + field->offset; |
| 25618 | if (ctx->fmt_offset != offset) { |
| 25619 | PyErr_Format(PyExc_ValueError, |
| 25620 | "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T"z" "d but %" CYTHON_FORMAT_SSIZE_T"z" "d expected", |
| 25621 | (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); |
| 25622 | return -1; |
| 25623 | } |
| 25624 | ctx->fmt_offset += size; |
| 25625 | if (arraysize) |
| 25626 | ctx->fmt_offset += (arraysize - 1) * size; |
| 25627 | --ctx->enc_count; |
| 25628 | while (1) { |
| 25629 | if (field == &ctx->root) { |
| 25630 | ctx->head = NULL((void*)0); |
| 25631 | if (ctx->enc_count != 0) { |
| 25632 | __Pyx_BufFmt_RaiseExpected(ctx); |
| 25633 | return -1; |
| 25634 | } |
| 25635 | break; |
| 25636 | } |
| 25637 | ctx->head->field = ++field; |
| 25638 | if (field->type == NULL((void*)0)) { |
| 25639 | --ctx->head; |
| 25640 | field = ctx->head->field; |
| 25641 | continue; |
| 25642 | } else if (field->type->typegroup == 'S') { |
| 25643 | size_t parent_offset = ctx->head->parent_offset + field->offset; |
| 25644 | if (field->type->fields->type == NULL((void*)0)) continue; |
| 25645 | field = field->type->fields; |
| 25646 | ++ctx->head; |
| 25647 | ctx->head->field = field; |
| 25648 | ctx->head->parent_offset = parent_offset; |
| 25649 | break; |
| 25650 | } else { |
| 25651 | break; |
| 25652 | } |
| 25653 | } |
| 25654 | } while (ctx->enc_count); |
| 25655 | ctx->enc_type = 0; |
| 25656 | ctx->is_complex = 0; |
| 25657 | return 0; |
| 25658 | } |
| 25659 | static CYTHON_INLINE__inline__ PyObject * |
| 25660 | __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) |
| 25661 | { |
| 25662 | const char *ts = *tsp; |
| 25663 | int i = 0, number; |
| 25664 | int ndim = ctx->head->field->type->ndim; |
| 25665 | ; |
| 25666 | ++ts; |
| 25667 | if (ctx->new_count != 1) { |
| 25668 | PyErr_SetString(PyExc_ValueError, |
| 25669 | "Cannot handle repeated arrays in format string"); |
| 25670 | return NULL((void*)0); |
| 25671 | } |
| 25672 | if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL((void*)0); |
| 25673 | while (*ts && *ts != ')') { |
| 25674 | switch (*ts) { |
| 25675 | case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; |
| 25676 | default: break; |
| 25677 | } |
| 25678 | number = __Pyx_BufFmt_ExpectNumber(&ts); |
| 25679 | if (number == -1) return NULL((void*)0); |
| 25680 | if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) |
| 25681 | return PyErr_Format(PyExc_ValueError, |
| 25682 | "Expected a dimension of size %zu, got %d", |
| 25683 | ctx->head->field->type->arraysize[i], number); |
| 25684 | if (*ts != ',' && *ts != ')') |
| 25685 | return PyErr_Format(PyExc_ValueError, |
| 25686 | "Expected a comma in format string, got '%c'", *ts); |
| 25687 | if (*ts == ',') ts++; |
| 25688 | i++; |
| 25689 | } |
| 25690 | if (i != ndim) |
| 25691 | return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", |
| 25692 | ctx->head->field->type->ndim, i); |
| 25693 | if (!*ts) { |
| 25694 | PyErr_SetString(PyExc_ValueError, |
| 25695 | "Unexpected end of format string, expected ')'"); |
| 25696 | return NULL((void*)0); |
| 25697 | } |
| 25698 | ctx->is_valid_array = 1; |
| 25699 | ctx->new_count = 1; |
| 25700 | *tsp = ++ts; |
| 25701 | return Py_None(&_Py_NoneStruct); |
| 25702 | } |
| 25703 | static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { |
| 25704 | int got_Z = 0; |
| 25705 | while (1) { |
| 25706 | switch(*ts) { |
| 25707 | case 0: |
| 25708 | if (ctx->enc_type != 0 && ctx->head == NULL((void*)0)) { |
| 25709 | __Pyx_BufFmt_RaiseExpected(ctx); |
| 25710 | return NULL((void*)0); |
| 25711 | } |
| 25712 | if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL((void*)0); |
| 25713 | if (ctx->head != NULL((void*)0)) { |
| 25714 | __Pyx_BufFmt_RaiseExpected(ctx); |
| 25715 | return NULL((void*)0); |
| 25716 | } |
| 25717 | return ts; |
| 25718 | case ' ': |
| 25719 | case '\r': |
| 25720 | case '\n': |
| 25721 | ++ts; |
| 25722 | break; |
| 25723 | case '<': |
| 25724 | if (!__Pyx_IsLittleEndian()) { |
| 25725 | PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); |
| 25726 | return NULL((void*)0); |
| 25727 | } |
| 25728 | ctx->new_packmode = '='; |
| 25729 | ++ts; |
| 25730 | break; |
| 25731 | case '>': |
| 25732 | case '!': |
| 25733 | if (__Pyx_IsLittleEndian()) { |
| 25734 | PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); |
| 25735 | return NULL((void*)0); |
| 25736 | } |
| 25737 | ctx->new_packmode = '='; |
| 25738 | ++ts; |
| 25739 | break; |
| 25740 | case '=': |
| 25741 | case '@': |
| 25742 | case '^': |
| 25743 | ctx->new_packmode = *ts++; |
| 25744 | break; |
| 25745 | case 'T': |
| 25746 | { |
| 25747 | const char* ts_after_sub; |
| 25748 | size_t i, struct_count = ctx->new_count; |
| 25749 | size_t struct_alignment = ctx->struct_alignment; |
| 25750 | ctx->new_count = 1; |
| 25751 | ++ts; |
| 25752 | if (*ts != '{') { |
| 25753 | PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); |
| 25754 | return NULL((void*)0); |
| 25755 | } |
| 25756 | if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL((void*)0); |
| 25757 | ctx->enc_type = 0; |
| 25758 | ctx->enc_count = 0; |
| 25759 | ctx->struct_alignment = 0; |
| 25760 | ++ts; |
| 25761 | ts_after_sub = ts; |
| 25762 | for (i = 0; i != struct_count; ++i) { |
| 25763 | ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); |
| 25764 | if (!ts_after_sub) return NULL((void*)0); |
| 25765 | } |
| 25766 | ts = ts_after_sub; |
| 25767 | if (struct_alignment) ctx->struct_alignment = struct_alignment; |
| 25768 | } |
| 25769 | break; |
| 25770 | case '}': |
| 25771 | { |
| 25772 | size_t alignment = ctx->struct_alignment; |
| 25773 | ++ts; |
| 25774 | if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL((void*)0); |
| 25775 | ctx->enc_type = 0; |
| 25776 | if (alignment && ctx->fmt_offset % alignment) { |
| 25777 | ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); |
| 25778 | } |
| 25779 | } |
| 25780 | return ts; |
| 25781 | case 'x': |
| 25782 | if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL((void*)0); |
| 25783 | ctx->fmt_offset += ctx->new_count; |
| 25784 | ctx->new_count = 1; |
| 25785 | ctx->enc_count = 0; |
| 25786 | ctx->enc_type = 0; |
| 25787 | ctx->enc_packmode = ctx->new_packmode; |
| 25788 | ++ts; |
| 25789 | break; |
| 25790 | case 'Z': |
| 25791 | got_Z = 1; |
| 25792 | ++ts; |
| 25793 | if (*ts != 'f' && *ts != 'd' && *ts != 'g') { |
| 25794 | __Pyx_BufFmt_RaiseUnexpectedChar('Z'); |
| 25795 | return NULL((void*)0); |
| 25796 | } |
| 25797 | case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': |
| 25798 | case 'l': case 'L': case 'q': case 'Q': |
| 25799 | case 'f': case 'd': case 'g': |
| 25800 | case 'O': case 'p': |
| 25801 | if (ctx->enc_type == *ts && got_Z == ctx->is_complex && |
| 25802 | ctx->enc_packmode == ctx->new_packmode) { |
| 25803 | ctx->enc_count += ctx->new_count; |
| 25804 | ctx->new_count = 1; |
| 25805 | got_Z = 0; |
| 25806 | ++ts; |
| 25807 | break; |
| 25808 | } |
| 25809 | case 's': |
| 25810 | if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL((void*)0); |
| 25811 | ctx->enc_count = ctx->new_count; |
| 25812 | ctx->enc_packmode = ctx->new_packmode; |
| 25813 | ctx->enc_type = *ts; |
| 25814 | ctx->is_complex = got_Z; |
| 25815 | ++ts; |
| 25816 | ctx->new_count = 1; |
| 25817 | got_Z = 0; |
| 25818 | break; |
| 25819 | case ':': |
| 25820 | ++ts; |
| 25821 | while(*ts != ':') ++ts; |
| 25822 | ++ts; |
| 25823 | break; |
| 25824 | case '(': |
| 25825 | if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL((void*)0); |
| 25826 | break; |
| 25827 | default: |
| 25828 | { |
| 25829 | int number = __Pyx_BufFmt_ExpectNumber(&ts); |
| 25830 | if (number == -1) return NULL((void*)0); |
| 25831 | ctx->new_count = (size_t)number; |
| 25832 | } |
| 25833 | } |
| 25834 | } |
| 25835 | } |
| 25836 | static CYTHON_INLINE__inline__ void __Pyx_ZeroBuffer(Py_buffer* buf) { |
| 25837 | buf->buf = NULL((void*)0); |
| 25838 | buf->obj = NULL((void*)0); |
| 25839 | buf->strides = __Pyx_zeros; |
| 25840 | buf->shape = __Pyx_zeros; |
| 25841 | buf->suboffsets = __Pyx_minusones; |
| 25842 | } |
| 25843 | static CYTHON_INLINE__inline__ int __Pyx_GetBufferAndValidate( |
| 25844 | Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, |
| 25845 | int nd, int cast, __Pyx_BufFmt_StackElem* stack) |
| 25846 | { |
| 25847 | if (obj == Py_None(&_Py_NoneStruct) || obj == NULL((void*)0)) { |
| 25848 | __Pyx_ZeroBuffer(buf); |
| 25849 | return 0; |
| 25850 | } |
| 25851 | buf->buf = NULL((void*)0); |
| 25852 | if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; |
| 25853 | if (buf->ndim != nd) { |
| 25854 | PyErr_Format(PyExc_ValueError, |
| 25855 | "Buffer has wrong number of dimensions (expected %d, got %d)", |
| 25856 | nd, buf->ndim); |
| 25857 | goto fail; |
| 25858 | } |
| 25859 | if (!cast) { |
| 25860 | __Pyx_BufFmt_Context ctx; |
| 25861 | __Pyx_BufFmt_Init(&ctx, stack, dtype); |
| 25862 | if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; |
| 25863 | } |
| 25864 | if ((unsigned)buf->itemsize != dtype->size) { |
| 25865 | PyErr_Format(PyExc_ValueError, |
| 25866 | "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T"z" "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T"z" "d byte%s)", |
| 25867 | buf->itemsize, (buf->itemsize > 1) ? "s" : "", |
| 25868 | dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); |
| 25869 | goto fail; |
| 25870 | } |
| 25871 | if (buf->suboffsets == NULL((void*)0)) buf->suboffsets = __Pyx_minusones; |
| 25872 | return 0; |
| 25873 | fail:; |
| 25874 | __Pyx_ZeroBuffer(buf); |
| 25875 | return -1; |
| 25876 | } |
| 25877 | static CYTHON_INLINE__inline__ void __Pyx_SafeReleaseBuffer(Py_buffer* info) { |
| 25878 | if (info->buf == NULL((void*)0)) return; |
| 25879 | if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL((void*)0); |
| 25880 | __Pyx_ReleaseBuffer(info); |
| 25881 | } |
| 25882 | |
| 25883 | static int |
| 25884 | __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, |
| 25885 | int ndim, |
| 25886 | __Pyx_memviewslice *memviewslice, |
| 25887 | int memview_is_new_reference) |
| 25888 | { |
| 25889 | __Pyx_RefNannyDeclarations |
| 25890 | int i, retval=-1; |
| 25891 | Py_buffer *buf = &memview->view; |
| 25892 | __Pyx_RefNannySetupContext("init_memviewslice", 0); |
| 25893 | if (!buf) { |
| 25894 | PyErr_SetString(PyExc_ValueError, |
| 25895 | "buf is NULL."); |
| 25896 | goto fail; |
| 25897 | } else if (memviewslice->memview || memviewslice->data) { |
| 25898 | PyErr_SetString(PyExc_ValueError, |
| 25899 | "memviewslice is already initialized!"); |
| 25900 | goto fail; |
| 25901 | } |
| 25902 | if (buf->strides) { |
| 25903 | for (i = 0; i < ndim; i++) { |
| 25904 | memviewslice->strides[i] = buf->strides[i]; |
| 25905 | } |
| 25906 | } else { |
| 25907 | Py_ssize_t stride = buf->itemsize; |
| 25908 | for (i = ndim - 1; i >= 0; i--) { |
| 25909 | memviewslice->strides[i] = stride; |
| 25910 | stride *= buf->shape[i]; |
| 25911 | } |
| 25912 | } |
| 25913 | for (i = 0; i < ndim; i++) { |
| 25914 | memviewslice->shape[i] = buf->shape[i]; |
| 25915 | if (buf->suboffsets) { |
| 25916 | memviewslice->suboffsets[i] = buf->suboffsets[i]; |
| 25917 | } else { |
| 25918 | memviewslice->suboffsets[i] = -1; |
| 25919 | } |
| 25920 | } |
| 25921 | memviewslice->memview = memview; |
| 25922 | memviewslice->data = (char *)buf->buf; |
| 25923 | if (__pyx_add_acquisition_count(memview)__sync_fetch_and_add((memview->acquisition_count_aligned_p ), 1) == 0 && !memview_is_new_reference) { |
| 25924 | Py_INCREF(memview)( ((PyObject*)(memview))->ob_refcnt++); |
| 25925 | } |
| 25926 | retval = 0; |
| 25927 | goto no_fail; |
| 25928 | fail: |
| 25929 | memviewslice->memview = 0; |
| 25930 | memviewslice->data = 0; |
| 25931 | retval = -1; |
| 25932 | no_fail: |
| 25933 | __Pyx_RefNannyFinishContext(); |
| 25934 | return retval; |
| 25935 | } |
| 25936 | static CYTHON_INLINE__inline__ void __pyx_fatalerror(const char *fmt, ...) { |
| 25937 | va_list vargs; |
| 25938 | char msg[200]; |
| 25939 | #ifdef HAVE_STDARG_PROTOTYPES1 |
| 25940 | va_start(vargs, fmt)__builtin_va_start(vargs, fmt); |
| 25941 | #else |
| 25942 | va_start(vargs); |
| 25943 | #endif |
| 25944 | vsnprintf(msg, 200, fmt, vargs); |
| 25945 | Py_FatalError(msg); |
| 25946 | va_end(vargs)__builtin_va_end(vargs); |
| 25947 | } |
| 25948 | static CYTHON_INLINE__inline__ int |
| 25949 | __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count, |
| 25950 | PyThread_type_lock lock) |
| 25951 | { |
| 25952 | int result; |
| 25953 | PyThread_acquire_lock(lock, 1); |
| 25954 | result = (*acquisition_count)++; |
| 25955 | PyThread_release_lock(lock); |
| 25956 | return result; |
| 25957 | } |
| 25958 | static CYTHON_INLINE__inline__ int |
| 25959 | __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count, |
| 25960 | PyThread_type_lock lock) |
| 25961 | { |
| 25962 | int result; |
| 25963 | PyThread_acquire_lock(lock, 1); |
| 25964 | result = (*acquisition_count)--; |
| 25965 | PyThread_release_lock(lock); |
| 25966 | return result; |
| 25967 | } |
| 25968 | static CYTHON_INLINE__inline__ void |
| 25969 | __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno) |
| 25970 | { |
| 25971 | int first_time; |
| 25972 | struct __pyx_memoryview_obj *memview = memslice->memview; |
| 25973 | if (!memview || (PyObject *) memview == Py_None(&_Py_NoneStruct)) |
| 25974 | return; |
| 25975 | if (__pyx_get_slice_count(memview)(*(memview->acquisition_count_aligned_p)) < 0) |
| 25976 | __pyx_fatalerror("Acquisition count is %d (line %d)", |
| 25977 | __pyx_get_slice_count(memview)(*(memview->acquisition_count_aligned_p)), lineno); |
| 25978 | first_time = __pyx_add_acquisition_count(memview)__sync_fetch_and_add((memview->acquisition_count_aligned_p ), 1) == 0; |
| 25979 | if (first_time) { |
| 25980 | if (have_gil) { |
| 25981 | Py_INCREF((PyObject *) memview)( ((PyObject*)((PyObject *) memview))->ob_refcnt++); |
| 25982 | } else { |
| 25983 | PyGILState_STATE _gilstate = PyGILState_Ensure(); |
| 25984 | Py_INCREF((PyObject *) memview)( ((PyObject*)((PyObject *) memview))->ob_refcnt++); |
| 25985 | PyGILState_Release(_gilstate); |
| 25986 | } |
| 25987 | } |
| 25988 | } |
| 25989 | static CYTHON_INLINE__inline__ void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice, |
| 25990 | int have_gil, int lineno) { |
| 25991 | int last_time; |
| 25992 | struct __pyx_memoryview_obj *memview = memslice->memview; |
| 25993 | if (!memview ) { |
| 25994 | return; |
| 25995 | } else if ((PyObject *) memview == Py_None(&_Py_NoneStruct)) { |
| 25996 | memslice->memview = NULL((void*)0); |
| 25997 | return; |
| 25998 | } |
| 25999 | if (__pyx_get_slice_count(memview)(*(memview->acquisition_count_aligned_p)) <= 0) |
| 26000 | __pyx_fatalerror("Acquisition count is %d (line %d)", |
| 26001 | __pyx_get_slice_count(memview)(*(memview->acquisition_count_aligned_p)), lineno); |
| 26002 | last_time = __pyx_sub_acquisition_count(memview)__sync_fetch_and_sub((memview->acquisition_count_aligned_p ), 1) == 1; |
| 26003 | memslice->data = NULL((void*)0); |
| 26004 | if (last_time) { |
| 26005 | if (have_gil) { |
| 26006 | Py_CLEAR(memslice->memview)do { if (memslice->memview) { PyObject *_py_tmp = (PyObject *)(memslice->memview); (memslice->memview) = ((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); |
| 26007 | } else { |
| 26008 | PyGILState_STATE _gilstate = PyGILState_Ensure(); |
| 26009 | Py_CLEAR(memslice->memview)do { if (memslice->memview) { PyObject *_py_tmp = (PyObject *)(memslice->memview); (memslice->memview) = ((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); |
| 26010 | PyGILState_Release(_gilstate); |
| 26011 | } |
| 26012 | } else { |
| 26013 | memslice->memview = NULL((void*)0); |
| 26014 | } |
| 26015 | } |
| 26016 | |
| 26017 | static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { |
| 26018 | PyErr_Format(PyExc_TypeError, |
| 26019 | "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", |
| 26020 | name, type->tp_name, Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_name); |
| 26021 | } |
| 26022 | static CYTHON_INLINE__inline__ int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, |
| 26023 | const char *name, int exact) |
| 26024 | { |
| 26025 | if (unlikely(!type)__builtin_expect(!!(!type), 0)) { |
| 26026 | PyErr_SetString(PyExc_SystemError, "Missing type object"); |
| 26027 | return 0; |
| 26028 | } |
| 26029 | if (none_allowed && obj == Py_None(&_Py_NoneStruct)) return 1; |
| 26030 | else if (exact) { |
| 26031 | if (likely(Py_TYPE(obj) == type)__builtin_expect(!!((((PyObject*)(obj))->ob_type) == type) , 1)) return 1; |
| 26032 | #if PY_MAJOR_VERSION2 == 2 |
| 26033 | 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; |
| 26034 | #endif |
| 26035 | } |
| 26036 | else { |
| 26037 | if (likely(PyObject_TypeCheck(obj, type))__builtin_expect(!!(((((PyObject*)(obj))->ob_type) == (type ) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (type )))), 1)) return 1; |
| 26038 | } |
| 26039 | __Pyx_RaiseArgumentTypeInvalid(name, obj, type); |
| 26040 | return 0; |
| 26041 | } |
| 26042 | |
| 26043 | static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { |
| 26044 | PyObject *local_type, *local_value, *local_tb; |
| 26045 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26046 | PyObject *tmp_type, *tmp_value, *tmp_tb; |
| 26047 | PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current); |
| 26048 | local_type = tstate->curexc_type; |
| 26049 | local_value = tstate->curexc_value; |
| 26050 | local_tb = tstate->curexc_traceback; |
| 26051 | tstate->curexc_type = 0; |
| 26052 | tstate->curexc_value = 0; |
| 26053 | tstate->curexc_traceback = 0; |
| 26054 | #else |
| 26055 | PyErr_Fetch(&local_type, &local_value, &local_tb); |
| 26056 | #endif |
| 26057 | PyErr_NormalizeException(&local_type, &local_value, &local_tb); |
| 26058 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26059 | if (unlikely(tstate->curexc_type)__builtin_expect(!!(tstate->curexc_type), 0)) |
| 26060 | #else |
| 26061 | if (unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) |
| 26062 | #endif |
| 26063 | goto bad; |
| 26064 | #if PY_MAJOR_VERSION2 >= 3 |
| 26065 | if (local_tb) { |
| 26066 | if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)__builtin_expect(!!(PyException_SetTraceback(local_value, local_tb ) < 0), 0)) |
| 26067 | goto bad; |
| 26068 | } |
| 26069 | #endif |
| 26070 | Py_XINCREF(local_tb)do { if ((local_tb) == ((void*)0)) ; else ( ((PyObject*)(local_tb ))->ob_refcnt++); } while (0); |
| 26071 | Py_XINCREF(local_type)do { if ((local_type) == ((void*)0)) ; else ( ((PyObject*)(local_type ))->ob_refcnt++); } while (0); |
| 26072 | Py_XINCREF(local_value)do { if ((local_value) == ((void*)0)) ; else ( ((PyObject*)(local_value ))->ob_refcnt++); } while (0); |
| 26073 | *type = local_type; |
| 26074 | *value = local_value; |
| 26075 | *tb = local_tb; |
| 26076 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26077 | tmp_type = tstate->exc_type; |
| 26078 | tmp_value = tstate->exc_value; |
| 26079 | tmp_tb = tstate->exc_traceback; |
| 26080 | tstate->exc_type = local_type; |
| 26081 | tstate->exc_value = local_value; |
| 26082 | tstate->exc_traceback = local_tb; |
| 26083 | 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); |
| 26084 | 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); |
| 26085 | 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); |
| 26086 | #else |
| 26087 | PyErr_SetExcInfo(local_type, local_value, local_tb); |
| 26088 | #endif |
| 26089 | return 0; |
| 26090 | bad: |
| 26091 | *type = 0; |
| 26092 | *value = 0; |
| 26093 | *tb = 0; |
| 26094 | 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); |
| 26095 | 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); |
| 26096 | 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); |
| 26097 | return -1; |
| 26098 | } |
| 26099 | |
| 26100 | static CYTHON_INLINE__inline__ void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { |
| 26101 | PyObject *tmp_type, *tmp_value, *tmp_tb; |
| 26102 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26103 | PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current); |
| 26104 | tmp_type = tstate->exc_type; |
| 26105 | tmp_value = tstate->exc_value; |
| 26106 | tmp_tb = tstate->exc_traceback; |
| 26107 | tstate->exc_type = *type; |
| 26108 | tstate->exc_value = *value; |
| 26109 | tstate->exc_traceback = *tb; |
| 26110 | #else |
| 26111 | PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); |
| 26112 | PyErr_SetExcInfo(*type, *value, *tb); |
| 26113 | #endif |
| 26114 | *type = tmp_type; |
| 26115 | *value = tmp_value; |
| 26116 | *tb = tmp_tb; |
| 26117 | } |
| 26118 | |
| 26119 | static CYTHON_INLINE__inline__ void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { |
| 26120 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26121 | PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current); |
| 26122 | *type = tstate->exc_type; |
| 26123 | *value = tstate->exc_value; |
| 26124 | *tb = tstate->exc_traceback; |
| 26125 | Py_XINCREF(*type)do { if ((*type) == ((void*)0)) ; else ( ((PyObject*)(*type)) ->ob_refcnt++); } while (0); |
| 26126 | Py_XINCREF(*value)do { if ((*value) == ((void*)0)) ; else ( ((PyObject*)(*value ))->ob_refcnt++); } while (0); |
| 26127 | Py_XINCREF(*tb)do { if ((*tb) == ((void*)0)) ; else ( ((PyObject*)(*tb))-> ob_refcnt++); } while (0); |
| 26128 | #else |
| 26129 | PyErr_GetExcInfo(type, value, tb); |
| 26130 | #endif |
| 26131 | } |
| 26132 | static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { |
| 26133 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26134 | PyObject *tmp_type, *tmp_value, *tmp_tb; |
| 26135 | PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current); |
| 26136 | tmp_type = tstate->exc_type; |
| 26137 | tmp_value = tstate->exc_value; |
| 26138 | tmp_tb = tstate->exc_traceback; |
| 26139 | tstate->exc_type = type; |
| 26140 | tstate->exc_value = value; |
| 26141 | tstate->exc_traceback = tb; |
| 26142 | 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); |
| 26143 | 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); |
| 26144 | 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); |
| 26145 | #else |
| 26146 | PyErr_SetExcInfo(type, value, tb); |
| 26147 | #endif |
| 26148 | } |
| 26149 | |
| 26150 | static CYTHON_INLINE__inline__ Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { |
| 26151 | Py_ssize_t q = a / b; |
| 26152 | Py_ssize_t r = a - q*b; |
| 26153 | q -= ((r != 0) & ((r ^ b) < 0)); |
| 26154 | return q; |
| 26155 | } |
| 26156 | |
| 26157 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { |
| 26158 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26159 | #if PY_MAJOR_VERSION2 >= 3 |
| 26160 | if (likely(PyUnicode_Check(n))__builtin_expect(!!(((((((PyObject*)(n))->ob_type))->tp_flags & ((1L<<28))) != 0)), 1)) |
| 26161 | #else |
| 26162 | if (likely(PyString_Check(n))__builtin_expect(!!(((((((PyObject*)(n))->ob_type))->tp_flags & ((1L<<27))) != 0)), 1)) |
| 26163 | #endif |
| 26164 | return __Pyx_PyObject_GetAttrStr(o, n); |
| 26165 | #endif |
| 26166 | return PyObject_GetAttr(o, n); |
| 26167 | } |
| 26168 | |
| 26169 | static CYTHON_INLINE__inline__ PyObject* __Pyx_decode_c_string( |
| 26170 | const char* cstring, Py_ssize_t start, Py_ssize_t stop, |
| 26171 | const char* encoding, const char* errors, |
| 26172 | PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { |
| 26173 | Py_ssize_t length; |
| 26174 | if (unlikely((start < 0) | (stop < 0))__builtin_expect(!!((start < 0) | (stop < 0)), 0)) { |
| 26175 | size_t slen = strlen(cstring); |
| 26176 | if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)__builtin_expect(!!(slen > (size_t) ((Py_ssize_t)(((size_t )-1)>>1))), 0)) { |
| 26177 | PyErr_SetString(PyExc_OverflowError, |
| 26178 | "c-string too long to convert to Python"); |
| 26179 | return NULL((void*)0); |
| 26180 | } |
| 26181 | length = (Py_ssize_t) slen; |
| 26182 | if (start < 0) { |
| 26183 | start += length; |
| 26184 | if (start < 0) |
| 26185 | start = 0; |
| 26186 | } |
| 26187 | if (stop < 0) |
| 26188 | stop += length; |
| 26189 | } |
| 26190 | length = stop - start; |
| 26191 | if (unlikely(length <= 0)__builtin_expect(!!(length <= 0), 0)) |
| 26192 | return PyUnicode_FromUnicodePyUnicodeUCS4_FromUnicode(NULL((void*)0), 0); |
| 26193 | cstring += start; |
| 26194 | if (decode_func) { |
| 26195 | return decode_func(cstring, length, errors); |
| 26196 | } else { |
| 26197 | return PyUnicode_DecodePyUnicodeUCS4_Decode(cstring, length, encoding, errors); |
| 26198 | } |
| 26199 | } |
| 26200 | |
| 26201 | static CYTHON_INLINE__inline__ void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { |
| 26202 | PyErr_Format(PyExc_ValueError, |
| 26203 | "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T"z" "d)", expected); |
| 26204 | } |
| 26205 | |
| 26206 | static CYTHON_INLINE__inline__ void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { |
| 26207 | PyErr_Format(PyExc_ValueError, |
| 26208 | "need more than %" CYTHON_FORMAT_SSIZE_T"z" "d value%.1s to unpack", |
| 26209 | index, (index == 1) ? "" : "s"); |
| 26210 | } |
| 26211 | |
| 26212 | static CYTHON_INLINE__inline__ void __Pyx_RaiseNoneNotIterableError(void) { |
| 26213 | PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); |
| 26214 | } |
| 26215 | |
| 26216 | static CYTHON_INLINE__inline__ int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { |
| 26217 | if (unlikely(!type)__builtin_expect(!!(!type), 0)) { |
| 26218 | PyErr_SetString(PyExc_SystemError, "Missing type object"); |
| 26219 | return 0; |
| 26220 | } |
| 26221 | if (likely(PyObject_TypeCheck(obj, type))__builtin_expect(!!(((((PyObject*)(obj))->ob_type) == (type ) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (type )))), 1)) |
| 26222 | return 1; |
| 26223 | PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", |
| 26224 | Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_name, type->tp_name); |
| 26225 | return 0; |
| 26226 | } |
| 26227 | |
| 26228 | static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { |
| 26229 | PyObject *empty_list = 0; |
| 26230 | PyObject *module = 0; |
| 26231 | PyObject *global_dict = 0; |
| 26232 | PyObject *empty_dict = 0; |
| 26233 | PyObject *list; |
| 26234 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) < 0x03030000 |
| 26235 | PyObject *py_import; |
| 26236 | py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); |
| 26237 | if (!py_import) |
| 26238 | goto bad; |
| 26239 | #endif |
| 26240 | if (from_list) |
| 26241 | list = from_list; |
| 26242 | else { |
| 26243 | empty_list = PyList_New(0); |
| 26244 | if (!empty_list) |
| 26245 | goto bad; |
| 26246 | list = empty_list; |
| 26247 | } |
| 26248 | global_dict = PyModule_GetDict(__pyx_m); |
| 26249 | if (!global_dict) |
| 26250 | goto bad; |
| 26251 | empty_dict = PyDict_New(); |
| 26252 | if (!empty_dict) |
| 26253 | goto bad; |
| 26254 | { |
| 26255 | #if PY_MAJOR_VERSION2 >= 3 |
| 26256 | if (level == -1) { |
| 26257 | if (strchr(__Pyx_MODULE_NAME, '.')(__extension__ (__builtin_constant_p ('.') && !__builtin_constant_p ("rgw") && ('.') == '\0' ? (char *) __rawmemchr ("rgw" , '.') : __builtin_strchr ("rgw", '.')))) { |
| 26258 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) < 0x03030000 |
| 26259 | PyObject *py_level = PyInt_FromLong(1); |
| 26260 | if (!py_level) |
| 26261 | goto bad; |
| 26262 | module = PyObject_CallFunctionObjArgs(py_import, |
| 26263 | name, global_dict, empty_dict, list, py_level, NULL((void*)0)); |
| 26264 | 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); |
| 26265 | #else |
| 26266 | module = PyImport_ImportModuleLevelObject( |
| 26267 | name, global_dict, empty_dict, list, 1); |
| 26268 | #endif |
| 26269 | if (!module) { |
| 26270 | if (!PyErr_ExceptionMatches(PyExc_ImportError)) |
| 26271 | goto bad; |
| 26272 | PyErr_Clear(); |
| 26273 | } |
| 26274 | } |
| 26275 | level = 0; |
| 26276 | } |
| 26277 | #endif |
| 26278 | if (!module) { |
| 26279 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) < 0x03030000 |
| 26280 | PyObject *py_level = PyInt_FromLong(level); |
| 26281 | if (!py_level) |
| 26282 | goto bad; |
| 26283 | module = PyObject_CallFunctionObjArgs(py_import, |
| 26284 | name, global_dict, empty_dict, list, py_level, NULL((void*)0)); |
| 26285 | 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); |
| 26286 | #else |
| 26287 | module = PyImport_ImportModuleLevelObject( |
| 26288 | name, global_dict, empty_dict, list, level); |
| 26289 | #endif |
| 26290 | } |
| 26291 | } |
| 26292 | bad: |
| 26293 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) < 0x03030000 |
| 26294 | 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); |
| 26295 | #endif |
| 26296 | 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); |
| 26297 | 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); |
| 26298 | return module; |
| 26299 | } |
| 26300 | |
| 26301 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { |
| 26302 | PyObject *r; |
| 26303 | if (!j) return NULL((void*)0); |
| 26304 | r = PyObject_GetItem(o, j); |
| 26305 | Py_DECREF(j)do { if ( --((PyObject*)(j))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(j)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(j)))); } while (0); |
| 26306 | return r; |
| 26307 | } |
| 26308 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, |
| 26309 | CYTHON_NCP_UNUSED int wraparound, |
| 26310 | CYTHON_NCP_UNUSED int boundscheck) { |
| 26311 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26312 | if (wraparound & unlikely(i < 0)__builtin_expect(!!(i < 0), 0)) i += PyList_GET_SIZE(o)(((PyVarObject*)(o))->ob_size); |
| 26313 | if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))__builtin_expect(!!((0 <= i) & (i < (((PyVarObject* )(o))->ob_size))), 1)) { |
| 26314 | PyObject *r = PyList_GET_ITEM(o, i)(((PyListObject *)(o))->ob_item[i]); |
| 26315 | Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++); |
| 26316 | return r; |
| 26317 | } |
| 26318 | return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); |
| 26319 | #else |
| 26320 | return PySequence_GetItem(o, i); |
| 26321 | #endif |
| 26322 | } |
| 26323 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, |
| 26324 | CYTHON_NCP_UNUSED int wraparound, |
| 26325 | CYTHON_NCP_UNUSED int boundscheck) { |
| 26326 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26327 | if (wraparound & unlikely(i < 0)__builtin_expect(!!(i < 0), 0)) i += PyTuple_GET_SIZE(o)(((PyVarObject*)(o))->ob_size); |
| 26328 | if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))__builtin_expect(!!((0 <= i) & (i < (((PyVarObject* )(o))->ob_size))), 1)) { |
| 26329 | PyObject *r = PyTuple_GET_ITEM(o, i)(((PyTupleObject *)(o))->ob_item[i]); |
| 26330 | Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++); |
| 26331 | return r; |
| 26332 | } |
| 26333 | return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); |
| 26334 | #else |
| 26335 | return PySequence_GetItem(o, i); |
| 26336 | #endif |
| 26337 | } |
| 26338 | static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, |
| 26339 | CYTHON_NCP_UNUSED int wraparound, |
| 26340 | CYTHON_NCP_UNUSED int boundscheck) { |
| 26341 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26342 | if (is_list || PyList_CheckExact(o)((((PyObject*)(o))->ob_type) == &PyList_Type)) { |
| 26343 | Py_ssize_t n = ((!wraparound) | likely(i >= 0)__builtin_expect(!!(i >= 0), 1)) ? i : i + PyList_GET_SIZE(o)(((PyVarObject*)(o))->ob_size); |
| 26344 | if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o)))__builtin_expect(!!((n >= 0) & (n < (((PyVarObject* )(o))->ob_size))), 1))) { |
| 26345 | PyObject *r = PyList_GET_ITEM(o, n)(((PyListObject *)(o))->ob_item[n]); |
| 26346 | Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++); |
| 26347 | return r; |
| 26348 | } |
| 26349 | } |
| 26350 | else if (PyTuple_CheckExact(o)((((PyObject*)(o))->ob_type) == &PyTuple_Type)) { |
| 26351 | Py_ssize_t n = ((!wraparound) | likely(i >= 0)__builtin_expect(!!(i >= 0), 1)) ? i : i + PyTuple_GET_SIZE(o)(((PyVarObject*)(o))->ob_size); |
| 26352 | if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))__builtin_expect(!!((n >= 0) & (n < (((PyVarObject* )(o))->ob_size))), 1)) { |
| 26353 | PyObject *r = PyTuple_GET_ITEM(o, n)(((PyTupleObject *)(o))->ob_item[n]); |
| 26354 | Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++); |
| 26355 | return r; |
| 26356 | } |
| 26357 | } else { |
| 26358 | PySequenceMethods *m = Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_as_sequence; |
| 26359 | if (likely(m && m->sq_item)__builtin_expect(!!(m && m->sq_item), 1)) { |
| 26360 | if (wraparound && unlikely(i < 0)__builtin_expect(!!(i < 0), 0) && likely(m->sq_length)__builtin_expect(!!(m->sq_length), 1)) { |
| 26361 | Py_ssize_t l = m->sq_length(o); |
| 26362 | if (likely(l >= 0)__builtin_expect(!!(l >= 0), 1)) { |
| 26363 | i += l; |
| 26364 | } else { |
| 26365 | if (PyErr_ExceptionMatches(PyExc_OverflowError)) |
| 26366 | PyErr_Clear(); |
| 26367 | else |
| 26368 | return NULL((void*)0); |
| 26369 | } |
| 26370 | } |
| 26371 | return m->sq_item(o, i); |
| 26372 | } |
| 26373 | } |
| 26374 | #else |
| 26375 | if (is_list || PySequence_Check(o)) { |
| 26376 | return PySequence_GetItem(o, i); |
| 26377 | } |
| 26378 | #endif |
| 26379 | return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); |
| 26380 | } |
| 26381 | |
| 26382 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 26383 | #include "longintrepr.h" |
| 26384 | #endif |
| 26385 | |
| 26386 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26387 | static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED__attribute__ ((__unused__)) long intval, CYTHON_UNUSED__attribute__ ((__unused__)) int inplace) { |
| 26388 | #if PY_MAJOR_VERSION2 < 3 |
| 26389 | if (likely(PyInt_CheckExact(op1))__builtin_expect(!!(((op1)->ob_type == &PyInt_Type)), 1 )) { |
| 26390 | const long b = intval; |
| 26391 | long x; |
| 26392 | long a = PyInt_AS_LONG(op1)(((PyIntObject *)(op1))->ob_ival); |
| 26393 | x = (long)((unsigned long)a + b); |
| 26394 | if (likely((x^a) >= 0 || (x^b) >= 0)__builtin_expect(!!((x^a) >= 0 || (x^b) >= 0), 1)) |
| 26395 | return PyInt_FromLong(x); |
| 26396 | return PyLong_Type.tp_as_number->nb_add(op1, op2); |
| 26397 | } |
| 26398 | #endif |
| 26399 | #if CYTHON_USE_PYLONG_INTERNALS1 && PY_MAJOR_VERSION2 >= 3 |
| 26400 | if (likely(PyLong_CheckExact(op1))__builtin_expect(!!(((((PyObject*)(op1))->ob_type) == & PyLong_Type)), 1)) { |
| 26401 | const long b = intval; |
| 26402 | long a, x; |
| 26403 | const PY_LONG_LONGlong long llb = intval; |
| 26404 | PY_LONG_LONGlong long lla, llx; |
| 26405 | const digit* digits = ((PyLongObject*)op1)->ob_digit; |
| 26406 | const Py_ssize_t size = Py_SIZE(op1)(((PyVarObject*)(op1))->ob_size); |
| 26407 | if (likely(__Pyx_sst_abs(size) <= 1)__builtin_expect(!!(labs(size) <= 1), 1)) { |
| 26408 | a = likely(size)__builtin_expect(!!(size), 1) ? digits[0] : 0; |
| 26409 | if (size == -1) a = -a; |
| 26410 | } else { |
| 26411 | switch (size) { |
| 26412 | case -2: |
| 26413 | if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT30) { |
| 26414 | a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT30) | (unsigned long)digits[0])); |
| 26415 | break; |
| 26416 | } else if (8 * sizeof(PY_LONG_LONGlong long) - 1 > 2 * PyLong_SHIFT30) { |
| 26417 | lla = -(PY_LONG_LONGlong long) (((((unsigned PY_LONG_LONGlong long)digits[1]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[0])); |
| 26418 | goto long_long; |
| 26419 | } |
| 26420 | case 2: |
| 26421 | if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT30) { |
| 26422 | a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT30) | (unsigned long)digits[0])); |
| 26423 | break; |
| 26424 | } else if (8 * sizeof(PY_LONG_LONGlong long) - 1 > 2 * PyLong_SHIFT30) { |
| 26425 | lla = (PY_LONG_LONGlong long) (((((unsigned PY_LONG_LONGlong long)digits[1]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[0])); |
| 26426 | goto long_long; |
| 26427 | } |
| 26428 | case -3: |
| 26429 | if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT30) { |
| 26430 | a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT30) | (unsigned long)digits[1]) << PyLong_SHIFT30) | (unsigned long)digits[0])); |
| 26431 | break; |
| 26432 | } else if (8 * sizeof(PY_LONG_LONGlong long) - 1 > 3 * PyLong_SHIFT30) { |
| 26433 | lla = -(PY_LONG_LONGlong long) (((((((unsigned PY_LONG_LONGlong long)digits[2]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[1]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[0])); |
| 26434 | goto long_long; |
| 26435 | } |
| 26436 | case 3: |
| 26437 | if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT30) { |
| 26438 | a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT30) | (unsigned long)digits[1]) << PyLong_SHIFT30) | (unsigned long)digits[0])); |
| 26439 | break; |
| 26440 | } else if (8 * sizeof(PY_LONG_LONGlong long) - 1 > 3 * PyLong_SHIFT30) { |
| 26441 | lla = (PY_LONG_LONGlong long) (((((((unsigned PY_LONG_LONGlong long)digits[2]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[1]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[0])); |
| 26442 | goto long_long; |
| 26443 | } |
| 26444 | case -4: |
| 26445 | if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT30) { |
| 26446 | a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT30) | (unsigned long)digits[2]) << PyLong_SHIFT30) | (unsigned long)digits[1]) << PyLong_SHIFT30) | (unsigned long)digits[0])); |
| 26447 | break; |
| 26448 | } else if (8 * sizeof(PY_LONG_LONGlong long) - 1 > 4 * PyLong_SHIFT30) { |
| 26449 | lla = -(PY_LONG_LONGlong long) (((((((((unsigned PY_LONG_LONGlong long)digits[3]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[2]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[1]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[0])); |
| 26450 | goto long_long; |
| 26451 | } |
| 26452 | case 4: |
| 26453 | if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT30) { |
| 26454 | a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT30) | (unsigned long)digits[2]) << PyLong_SHIFT30) | (unsigned long)digits[1]) << PyLong_SHIFT30) | (unsigned long)digits[0])); |
| 26455 | break; |
| 26456 | } else if (8 * sizeof(PY_LONG_LONGlong long) - 1 > 4 * PyLong_SHIFT30) { |
| 26457 | lla = (PY_LONG_LONGlong long) (((((((((unsigned PY_LONG_LONGlong long)digits[3]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[2]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[1]) << PyLong_SHIFT30) | (unsigned PY_LONG_LONGlong long)digits[0])); |
| 26458 | goto long_long; |
| 26459 | } |
| 26460 | default: return PyLong_Type.tp_as_number->nb_add(op1, op2); |
| 26461 | } |
| 26462 | } |
| 26463 | x = a + b; |
| 26464 | return PyLong_FromLong(x); |
| 26465 | long_long: |
| 26466 | llx = lla + llb; |
| 26467 | return PyLong_FromLongLong(llx); |
| 26468 | } |
| 26469 | #endif |
| 26470 | if (PyFloat_CheckExact(op1)((((PyObject*)(op1))->ob_type) == &PyFloat_Type)) { |
| 26471 | const long b = intval; |
| 26472 | double a = PyFloat_AS_DOUBLE(op1)(((PyFloatObject *)(op1))->ob_fval); |
| 26473 | double result; |
| 26474 | PyFPE_START_PROTECT("add", return NULL)if (!PyFPE_counter++ && _setjmp (PyFPE_jbuf)) { PyErr_SetString (PyExc_FloatingPointError, "add"); PyFPE_counter = 0; return ( (void*)0); } |
| 26475 | result = ((double)a) + (double)b; |
| 26476 | PyFPE_END_PROTECT(result)PyFPE_counter -= (int)PyFPE_dummy(&(result)); |
| 26477 | return PyFloat_FromDouble(result); |
| 26478 | } |
| 26479 | return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); |
| 26480 | } |
| 26481 | #endif |
| 26482 | |
| 26483 | static CYTHON_INLINE__inline__ void __Pyx_RaiseUnboundLocalError(const char *varname) { |
| 26484 | PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); |
| 26485 | } |
| 26486 | |
| 26487 | static CYTHON_INLINE__inline__ long __Pyx_div_long(long a, long b) { |
| 26488 | long q = a / b; |
| 26489 | long r = a - q*b; |
| 26490 | q -= ((r != 0) & ((r ^ b) < 0)); |
| 26491 | return q; |
| 26492 | } |
| 26493 | |
| 26494 | #if !CYTHON_COMPILING_IN_CPYTHON1 |
| 26495 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyBytes_Join_PyString_Join(PyObject* sep, PyObject* values) { |
| 26496 | return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL((void*)0)); |
| 26497 | } |
| 26498 | #endif |
| 26499 | |
| 26500 | static int __Pyx_SetVtable(PyObject *dict, void *vtable) { |
| 26501 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x02070000 |
| 26502 | PyObject *ob = PyCapsule_New(vtable, 0, 0); |
| 26503 | #else |
| 26504 | PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); |
| 26505 | #endif |
| 26506 | if (!ob) |
| 26507 | goto bad; |
| 26508 | if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0) |
| 26509 | goto bad; |
| 26510 | Py_DECREF(ob)do { if ( --((PyObject*)(ob))->ob_refcnt != 0) ; else ( (* (((PyObject*)((PyObject *)(ob)))->ob_type)->tp_dealloc) ((PyObject *)((PyObject *)(ob)))); } while (0); |
| 26511 | return 0; |
| 26512 | bad: |
| 26513 | Py_XDECREF(ob)do { if ((ob) == ((void*)0)) ; else do { if ( --((PyObject*)( ob))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject * )(ob)))->ob_type)->tp_dealloc)((PyObject *)((PyObject * )(ob)))); } while (0); } while (0); |
| 26514 | return -1; |
| 26515 | } |
| 26516 | |
| 26517 | static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { |
| 26518 | PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); |
| 26519 | if (unlikely(!value)__builtin_expect(!!(!value), 0) && PyErr_ExceptionMatches(PyExc_AttributeError)) { |
| 26520 | PyErr_Format(PyExc_ImportError, |
| 26521 | #if PY_MAJOR_VERSION2 < 3 |
| 26522 | "cannot import name %.230s", PyString_AS_STRING(name)(((PyStringObject *)(name))->ob_sval)); |
| 26523 | #else |
| 26524 | "cannot import name %S", name); |
| 26525 | #endif |
| 26526 | } |
| 26527 | return value; |
| 26528 | } |
| 26529 | |
| 26530 | static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { |
| 26531 | Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases)(((PyVarObject*)(bases))->ob_size); |
| 26532 | for (i=0; i < nbases; i++) { |
| 26533 | PyTypeObject *tmptype; |
| 26534 | PyObject *tmp = PyTuple_GET_ITEM(bases, i)(((PyTupleObject *)(bases))->ob_item[i]); |
| 26535 | tmptype = Py_TYPE(tmp)(((PyObject*)(tmp))->ob_type); |
| 26536 | #if PY_MAJOR_VERSION2 < 3 |
| 26537 | if (tmptype == &PyClass_Type) |
| 26538 | continue; |
| 26539 | #endif |
| 26540 | if (!metaclass) { |
| 26541 | metaclass = tmptype; |
| 26542 | continue; |
| 26543 | } |
| 26544 | if (PyType_IsSubtype(metaclass, tmptype)) |
| 26545 | continue; |
| 26546 | if (PyType_IsSubtype(tmptype, metaclass)) { |
| 26547 | metaclass = tmptype; |
| 26548 | continue; |
| 26549 | } |
| 26550 | PyErr_SetString(PyExc_TypeError, |
| 26551 | "metaclass conflict: " |
| 26552 | "the metaclass of a derived class " |
| 26553 | "must be a (non-strict) subclass " |
| 26554 | "of the metaclasses of all its bases"); |
| 26555 | return NULL((void*)0); |
| 26556 | } |
| 26557 | if (!metaclass) { |
| 26558 | #if PY_MAJOR_VERSION2 < 3 |
| 26559 | metaclass = &PyClass_Type; |
| 26560 | #else |
| 26561 | metaclass = &PyType_Type; |
| 26562 | #endif |
| 26563 | } |
| 26564 | Py_INCREF((PyObject*) metaclass)( ((PyObject*)((PyObject*) metaclass))->ob_refcnt++); |
| 26565 | return (PyObject*) metaclass; |
| 26566 | } |
| 26567 | |
| 26568 | static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, |
| 26569 | PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { |
| 26570 | PyObject *ns; |
| 26571 | if (metaclass) { |
| 26572 | PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); |
| 26573 | if (prep) { |
| 26574 | PyObject *pargs = PyTuple_Pack(2, name, bases); |
| 26575 | if (unlikely(!pargs)__builtin_expect(!!(!pargs), 0)) { |
| 26576 | Py_DECREF(prep)do { if ( --((PyObject*)(prep))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(prep)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(prep)))); } while (0); |
| 26577 | return NULL((void*)0); |
| 26578 | } |
| 26579 | ns = PyObject_Call(prep, pargs, mkw); |
| 26580 | Py_DECREF(prep)do { if ( --((PyObject*)(prep))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(prep)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(prep)))); } while (0); |
| 26581 | Py_DECREF(pargs)do { if ( --((PyObject*)(pargs))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(pargs)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(pargs)))); } while (0); |
| 26582 | } else { |
| 26583 | if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))__builtin_expect(!!(!PyErr_ExceptionMatches(PyExc_AttributeError )), 0)) |
| 26584 | return NULL((void*)0); |
| 26585 | PyErr_Clear(); |
| 26586 | ns = PyDict_New(); |
| 26587 | } |
| 26588 | } else { |
| 26589 | ns = PyDict_New(); |
| 26590 | } |
| 26591 | if (unlikely(!ns)__builtin_expect(!!(!ns), 0)) |
| 26592 | return NULL((void*)0); |
| 26593 | 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; |
| 26594 | 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; |
| 26595 | 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; |
| 26596 | return ns; |
| 26597 | bad: |
| 26598 | Py_DECREF(ns)do { if ( --((PyObject*)(ns))->ob_refcnt != 0) ; else ( (* (((PyObject*)((PyObject *)(ns)))->ob_type)->tp_dealloc) ((PyObject *)((PyObject *)(ns)))); } while (0); |
| 26599 | return NULL((void*)0); |
| 26600 | } |
| 26601 | static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, |
| 26602 | PyObject *dict, PyObject *mkw, |
| 26603 | int calculate_metaclass, int allow_py2_metaclass) { |
| 26604 | PyObject *result, *margs; |
| 26605 | PyObject *owned_metaclass = NULL((void*)0); |
| 26606 | if (allow_py2_metaclass) { |
| 26607 | owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); |
| 26608 | if (owned_metaclass) { |
| 26609 | metaclass = owned_metaclass; |
| 26610 | } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))__builtin_expect(!!(PyErr_ExceptionMatches(PyExc_KeyError)), 1 )) { |
| 26611 | PyErr_Clear(); |
| 26612 | } else { |
| 26613 | return NULL((void*)0); |
| 26614 | } |
| 26615 | } |
| 26616 | if (calculate_metaclass && (!metaclass || PyType_Check(metaclass)((((((PyObject*)(metaclass))->ob_type))->tp_flags & ((1L<<31))) != 0))) { |
| 26617 | metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); |
| 26618 | 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); |
| 26619 | if (unlikely(!metaclass)__builtin_expect(!!(!metaclass), 0)) |
| 26620 | return NULL((void*)0); |
| 26621 | owned_metaclass = metaclass; |
| 26622 | } |
| 26623 | margs = PyTuple_Pack(3, name, bases, dict); |
| 26624 | if (unlikely(!margs)__builtin_expect(!!(!margs), 0)) { |
| 26625 | result = NULL((void*)0); |
| 26626 | } else { |
| 26627 | result = PyObject_Call(metaclass, margs, mkw); |
| 26628 | Py_DECREF(margs)do { if ( --((PyObject*)(margs))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(margs)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(margs)))); } while (0); |
| 26629 | } |
| 26630 | 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); |
| 26631 | return result; |
| 26632 | } |
| 26633 | |
| 26634 | static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { |
| 26635 | PyObject* fake_module; |
| 26636 | PyTypeObject* cached_type = NULL((void*)0); |
| 26637 | fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI"0_23_4"); |
| 26638 | if (!fake_module) return NULL((void*)0); |
| 26639 | Py_INCREF(fake_module)( ((PyObject*)(fake_module))->ob_refcnt++); |
| 26640 | cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); |
| 26641 | if (cached_type) { |
| 26642 | if (!PyType_Check((PyObject*)cached_type)((((((PyObject*)((PyObject*)cached_type))->ob_type))->tp_flags & ((1L<<31))) != 0)) { |
| 26643 | PyErr_Format(PyExc_TypeError, |
| 26644 | "Shared Cython type %.200s is not a type object", |
| 26645 | type->tp_name); |
| 26646 | goto bad; |
| 26647 | } |
| 26648 | if (cached_type->tp_basicsize != type->tp_basicsize) { |
| 26649 | PyErr_Format(PyExc_TypeError, |
| 26650 | "Shared Cython type %.200s has the wrong size, try recompiling", |
| 26651 | type->tp_name); |
| 26652 | goto bad; |
| 26653 | } |
| 26654 | } else { |
| 26655 | if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; |
| 26656 | PyErr_Clear(); |
| 26657 | if (PyType_Ready(type) < 0) goto bad; |
| 26658 | if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) |
| 26659 | goto bad; |
| 26660 | Py_INCREF(type)( ((PyObject*)(type))->ob_refcnt++); |
| 26661 | cached_type = type; |
| 26662 | } |
| 26663 | done: |
| 26664 | 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); |
| 26665 | return cached_type; |
| 26666 | bad: |
| 26667 | 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); |
| 26668 | cached_type = NULL((void*)0); |
| 26669 | goto done; |
| 26670 | } |
| 26671 | |
| 26672 | static PyObject * |
| 26673 | __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED__attribute__ ((__unused__)) void *closure) |
| 26674 | { |
| 26675 | if (unlikely(op->func_doc == NULL)__builtin_expect(!!(op->func_doc == ((void*)0)), 0)) { |
| 26676 | if (op->func.m_ml->ml_doc) { |
| 26677 | #if PY_MAJOR_VERSION2 >= 3 |
| 26678 | op->func_doc = PyUnicode_FromStringPyUnicodeUCS4_FromString(op->func.m_ml->ml_doc); |
| 26679 | #else |
| 26680 | op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); |
| 26681 | #endif |
| 26682 | if (unlikely(op->func_doc == NULL)__builtin_expect(!!(op->func_doc == ((void*)0)), 0)) |
| 26683 | return NULL((void*)0); |
| 26684 | } else { |
| 26685 | Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 26686 | return Py_None(&_Py_NoneStruct); |
| 26687 | } |
| 26688 | } |
| 26689 | Py_INCREF(op->func_doc)( ((PyObject*)(op->func_doc))->ob_refcnt++); |
| 26690 | return op->func_doc; |
| 26691 | } |
| 26692 | static int |
| 26693 | __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) |
| 26694 | { |
| 26695 | PyObject *tmp = op->func_doc; |
| 26696 | if (value == NULL((void*)0)) { |
| 26697 | value = Py_None(&_Py_NoneStruct); |
| 26698 | } |
| 26699 | Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++); |
| 26700 | op->func_doc = value; |
| 26701 | 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); |
| 26702 | return 0; |
| 26703 | } |
| 26704 | static PyObject * |
| 26705 | __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) |
| 26706 | { |
| 26707 | if (unlikely(op->func_name == NULL)__builtin_expect(!!(op->func_name == ((void*)0)), 0)) { |
| 26708 | #if PY_MAJOR_VERSION2 >= 3 |
| 26709 | op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); |
| 26710 | #else |
| 26711 | op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); |
| 26712 | #endif |
| 26713 | if (unlikely(op->func_name == NULL)__builtin_expect(!!(op->func_name == ((void*)0)), 0)) |
| 26714 | return NULL((void*)0); |
| 26715 | } |
| 26716 | Py_INCREF(op->func_name)( ((PyObject*)(op->func_name))->ob_refcnt++); |
| 26717 | return op->func_name; |
| 26718 | } |
| 26719 | static int |
| 26720 | __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) |
| 26721 | { |
| 26722 | PyObject *tmp; |
| 26723 | #if PY_MAJOR_VERSION2 >= 3 |
| 26724 | if (unlikely(value == NULL || !PyUnicode_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)( value))->ob_type))->tp_flags & ((1L<<28))) != 0)), 0)) { |
| 26725 | #else |
| 26726 | if (unlikely(value == NULL || !PyString_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)( value))->ob_type))->tp_flags & ((1L<<27))) != 0)), 0)) { |
| 26727 | #endif |
| 26728 | PyErr_SetString(PyExc_TypeError, |
| 26729 | "__name__ must be set to a string object"); |
| 26730 | return -1; |
| 26731 | } |
| 26732 | tmp = op->func_name; |
| 26733 | Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++); |
| 26734 | op->func_name = value; |
| 26735 | 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); |
| 26736 | return 0; |
| 26737 | } |
| 26738 | static PyObject * |
| 26739 | __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) |
| 26740 | { |
| 26741 | Py_INCREF(op->func_qualname)( ((PyObject*)(op->func_qualname))->ob_refcnt++); |
| 26742 | return op->func_qualname; |
| 26743 | } |
| 26744 | static int |
| 26745 | __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) |
| 26746 | { |
| 26747 | PyObject *tmp; |
| 26748 | #if PY_MAJOR_VERSION2 >= 3 |
| 26749 | if (unlikely(value == NULL || !PyUnicode_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)( value))->ob_type))->tp_flags & ((1L<<28))) != 0)), 0)) { |
| 26750 | #else |
| 26751 | if (unlikely(value == NULL || !PyString_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)( value))->ob_type))->tp_flags & ((1L<<27))) != 0)), 0)) { |
| 26752 | #endif |
| 26753 | PyErr_SetString(PyExc_TypeError, |
| 26754 | "__qualname__ must be set to a string object"); |
| 26755 | return -1; |
| 26756 | } |
| 26757 | tmp = op->func_qualname; |
| 26758 | Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++); |
| 26759 | op->func_qualname = value; |
| 26760 | 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); |
| 26761 | return 0; |
| 26762 | } |
| 26763 | static PyObject * |
| 26764 | __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED__attribute__ ((__unused__)) void *closure) |
| 26765 | { |
| 26766 | PyObject *self; |
| 26767 | self = m->func_closure; |
| 26768 | if (self == NULL((void*)0)) |
| 26769 | self = Py_None(&_Py_NoneStruct); |
| 26770 | Py_INCREF(self)( ((PyObject*)(self))->ob_refcnt++); |
| 26771 | return self; |
| 26772 | } |
| 26773 | static PyObject * |
| 26774 | __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) |
| 26775 | { |
| 26776 | if (unlikely(op->func_dict == NULL)__builtin_expect(!!(op->func_dict == ((void*)0)), 0)) { |
| 26777 | op->func_dict = PyDict_New(); |
| 26778 | if (unlikely(op->func_dict == NULL)__builtin_expect(!!(op->func_dict == ((void*)0)), 0)) |
| 26779 | return NULL((void*)0); |
| 26780 | } |
| 26781 | Py_INCREF(op->func_dict)( ((PyObject*)(op->func_dict))->ob_refcnt++); |
| 26782 | return op->func_dict; |
| 26783 | } |
| 26784 | static int |
| 26785 | __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) |
| 26786 | { |
| 26787 | PyObject *tmp; |
| 26788 | if (unlikely(value == NULL)__builtin_expect(!!(value == ((void*)0)), 0)) { |
| 26789 | PyErr_SetString(PyExc_TypeError, |
| 26790 | "function's dictionary may not be deleted"); |
| 26791 | return -1; |
| 26792 | } |
| 26793 | if (unlikely(!PyDict_Check(value))__builtin_expect(!!(!((((((PyObject*)(value))->ob_type))-> tp_flags & ((1L<<29))) != 0)), 0)) { |
| 26794 | PyErr_SetString(PyExc_TypeError, |
| 26795 | "setting function's dictionary to a non-dict"); |
| 26796 | return -1; |
| 26797 | } |
| 26798 | tmp = op->func_dict; |
| 26799 | Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++); |
| 26800 | op->func_dict = value; |
| 26801 | 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); |
| 26802 | return 0; |
| 26803 | } |
| 26804 | static PyObject * |
| 26805 | __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) |
| 26806 | { |
| 26807 | Py_INCREF(op->func_globals)( ((PyObject*)(op->func_globals))->ob_refcnt++); |
| 26808 | return op->func_globals; |
| 26809 | } |
| 26810 | static PyObject * |
| 26811 | __Pyx_CyFunction_get_closure(CYTHON_UNUSED__attribute__ ((__unused__)) __pyx_CyFunctionObject *op) |
| 26812 | { |
| 26813 | Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); |
| 26814 | return Py_None(&_Py_NoneStruct); |
| 26815 | } |
| 26816 | static PyObject * |
| 26817 | __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) |
| 26818 | { |
| 26819 | PyObject* result = (op->func_code) ? op->func_code : Py_None(&_Py_NoneStruct); |
| 26820 | Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++); |
| 26821 | return result; |
| 26822 | } |
| 26823 | static int |
| 26824 | __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { |
| 26825 | int result = 0; |
| 26826 | PyObject *res = op->defaults_getter((PyObject *) op); |
| 26827 | if (unlikely(!res)__builtin_expect(!!(!res), 0)) |
| 26828 | return -1; |
| 26829 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 26830 | op->defaults_tuple = PyTuple_GET_ITEM(res, 0)(((PyTupleObject *)(res))->ob_item[0]); |
| 26831 | Py_INCREF(op->defaults_tuple)( ((PyObject*)(op->defaults_tuple))->ob_refcnt++); |
| 26832 | op->defaults_kwdict = PyTuple_GET_ITEM(res, 1)(((PyTupleObject *)(res))->ob_item[1]); |
| 26833 | Py_INCREF(op->defaults_kwdict)( ((PyObject*)(op->defaults_kwdict))->ob_refcnt++); |
| 26834 | #else |
| 26835 | op->defaults_tuple = PySequence_ITEM(res, 0)( (((PyObject*)(res))->ob_type)->tp_as_sequence->sq_item (res, 0) ); |
| 26836 | if (unlikely(!op->defaults_tuple)__builtin_expect(!!(!op->defaults_tuple), 0)) result = -1; |
| 26837 | else { |
| 26838 | op->defaults_kwdict = PySequence_ITEM(res, 1)( (((PyObject*)(res))->ob_type)->tp_as_sequence->sq_item (res, 1) ); |
| 26839 | if (unlikely(!op->defaults_kwdict)__builtin_expect(!!(!op->defaults_kwdict), 0)) result = -1; |
| 26840 | } |
| 26841 | #endif |
| 26842 | Py_DECREF(res)do { if ( --((PyObject*)(res))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(res)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(res)))); } while (0); |
| 26843 | return result; |
| 26844 | } |
| 26845 | static int |
| 26846 | __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { |
| 26847 | PyObject* tmp; |
| 26848 | if (!value) { |
| 26849 | value = Py_None(&_Py_NoneStruct); |
| 26850 | } else if (value != Py_None(&_Py_NoneStruct) && !PyTuple_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L <<26))) != 0)) { |
| 26851 | PyErr_SetString(PyExc_TypeError, |
| 26852 | "__defaults__ must be set to a tuple object"); |
| 26853 | return -1; |
| 26854 | } |
| 26855 | Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++); |
| 26856 | tmp = op->defaults_tuple; |
| 26857 | op->defaults_tuple = value; |
| 26858 | 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); |
| 26859 | return 0; |
| 26860 | } |
| 26861 | static PyObject * |
| 26862 | __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { |
| 26863 | PyObject* result = op->defaults_tuple; |
| 26864 | if (unlikely(!result)__builtin_expect(!!(!result), 0)) { |
| 26865 | if (op->defaults_getter) { |
| 26866 | if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL((void*)0); |
| 26867 | result = op->defaults_tuple; |
| 26868 | } else { |
| 26869 | result = Py_None(&_Py_NoneStruct); |
| 26870 | } |
| 26871 | } |
| 26872 | Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++); |
| 26873 | return result; |
| 26874 | } |
| 26875 | static int |
| 26876 | __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { |
| 26877 | PyObject* tmp; |
| 26878 | if (!value) { |
| 26879 | value = Py_None(&_Py_NoneStruct); |
| 26880 | } else if (value != Py_None(&_Py_NoneStruct) && !PyDict_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L <<29))) != 0)) { |
| 26881 | PyErr_SetString(PyExc_TypeError, |
| 26882 | "__kwdefaults__ must be set to a dict object"); |
| 26883 | return -1; |
| 26884 | } |
| 26885 | Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++); |
| 26886 | tmp = op->defaults_kwdict; |
| 26887 | op->defaults_kwdict = value; |
| 26888 | 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); |
| 26889 | return 0; |
| 26890 | } |
| 26891 | static PyObject * |
| 26892 | __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { |
| 26893 | PyObject* result = op->defaults_kwdict; |
| 26894 | if (unlikely(!result)__builtin_expect(!!(!result), 0)) { |
| 26895 | if (op->defaults_getter) { |
| 26896 | if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL((void*)0); |
| 26897 | result = op->defaults_kwdict; |
| 26898 | } else { |
| 26899 | result = Py_None(&_Py_NoneStruct); |
| 26900 | } |
| 26901 | } |
| 26902 | Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++); |
| 26903 | return result; |
| 26904 | } |
| 26905 | static int |
| 26906 | __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { |
| 26907 | PyObject* tmp; |
| 26908 | if (!value || value == Py_None(&_Py_NoneStruct)) { |
| 26909 | value = NULL((void*)0); |
| 26910 | } else if (!PyDict_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L <<29))) != 0)) { |
| 26911 | PyErr_SetString(PyExc_TypeError, |
| 26912 | "__annotations__ must be set to a dict object"); |
| 26913 | return -1; |
| 26914 | } |
| 26915 | Py_XINCREF(value)do { if ((value) == ((void*)0)) ; else ( ((PyObject*)(value)) ->ob_refcnt++); } while (0); |
| 26916 | tmp = op->func_annotations; |
| 26917 | op->func_annotations = value; |
| 26918 | 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); |
| 26919 | return 0; |
| 26920 | } |
| 26921 | static PyObject * |
| 26922 | __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { |
| 26923 | PyObject* result = op->func_annotations; |
| 26924 | if (unlikely(!result)__builtin_expect(!!(!result), 0)) { |
| 26925 | result = PyDict_New(); |
| 26926 | if (unlikely(!result)__builtin_expect(!!(!result), 0)) return NULL((void*)0); |
| 26927 | op->func_annotations = result; |
| 26928 | } |
| 26929 | Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++); |
| 26930 | return result; |
| 26931 | } |
| 26932 | static PyGetSetDef __pyx_CyFunction_getsets[] = { |
| 26933 | {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, |
| 26934 | {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, |
| 26935 | {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, |
| 26936 | {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, |
| 26937 | {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, |
| 26938 | {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, |
| 26939 | {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, |
| 26940 | {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, |
| 26941 | {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, |
| 26942 | {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, |
| 26943 | {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, |
| 26944 | {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, |
| 26945 | {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, |
| 26946 | {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, |
| 26947 | {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, |
| 26948 | {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, |
| 26949 | {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, |
| 26950 | {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, |
| 26951 | {0, 0, 0, 0, 0} |
| 26952 | }; |
| 26953 | static PyMemberDef __pyx_CyFunction_members[] = { |
| 26954 | {(char *) "__module__", T_OBJECT6, offsetof(__pyx_CyFunctionObject, func.m_module)__builtin_offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED4, 0}, |
| 26955 | {0, 0, 0, 0, 0} |
| 26956 | }; |
| 26957 | static PyObject * |
| 26958 | __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *args) |
| 26959 | { |
| 26960 | #if PY_MAJOR_VERSION2 >= 3 |
| 26961 | return PyUnicode_FromStringPyUnicodeUCS4_FromString(m->func.m_ml->ml_name); |
| 26962 | #else |
| 26963 | return PyString_FromString(m->func.m_ml->ml_name); |
| 26964 | #endif |
| 26965 | } |
| 26966 | static PyMethodDef __pyx_CyFunction_methods[] = { |
| 26967 | {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS0x0001, 0}, |
| 26968 | {0, 0, 0, 0} |
| 26969 | }; |
| 26970 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) < 0x030500A0 |
| 26971 | #define __Pyx_CyFunction_weakreflist(cyfunc)((cyfunc)->func_weakreflist) ((cyfunc)->func_weakreflist) |
| 26972 | #else |
| 26973 | #define __Pyx_CyFunction_weakreflist(cyfunc)((cyfunc)->func_weakreflist) ((cyfunc)->func.m_weakreflist) |
| 26974 | #endif |
| 26975 | static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, |
| 26976 | PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { |
| 26977 | __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type)( (__pyx_CyFunctionObject *) _PyObject_GC_New(type) ); |
| 26978 | if (op == NULL((void*)0)) |
| 26979 | return NULL((void*)0); |
| 26980 | op->flags = flags; |
| 26981 | __Pyx_CyFunction_weakreflist(op)((op)->func_weakreflist) = NULL((void*)0); |
| 26982 | op->func.m_ml = ml; |
| 26983 | op->func.m_self = (PyObject *) op; |
| 26984 | Py_XINCREF(closure)do { if ((closure) == ((void*)0)) ; else ( ((PyObject*)(closure ))->ob_refcnt++); } while (0); |
| 26985 | op->func_closure = closure; |
| 26986 | Py_XINCREF(module)do { if ((module) == ((void*)0)) ; else ( ((PyObject*)(module ))->ob_refcnt++); } while (0); |
| 26987 | op->func.m_module = module; |
| 26988 | op->func_dict = NULL((void*)0); |
| 26989 | op->func_name = NULL((void*)0); |
| 26990 | Py_INCREF(qualname)( ((PyObject*)(qualname))->ob_refcnt++); |
| 26991 | op->func_qualname = qualname; |
| 26992 | op->func_doc = NULL((void*)0); |
| 26993 | op->func_classobj = NULL((void*)0); |
| 26994 | op->func_globals = globals; |
| 26995 | Py_INCREF(op->func_globals)( ((PyObject*)(op->func_globals))->ob_refcnt++); |
| 26996 | Py_XINCREF(code)do { if ((code) == ((void*)0)) ; else ( ((PyObject*)(code))-> ob_refcnt++); } while (0); |
| 26997 | op->func_code = code; |
| 26998 | op->defaults_pyobjects = 0; |
| 26999 | op->defaults = NULL((void*)0); |
| 27000 | op->defaults_tuple = NULL((void*)0); |
| 27001 | op->defaults_kwdict = NULL((void*)0); |
| 27002 | op->defaults_getter = NULL((void*)0); |
| 27003 | op->func_annotations = NULL((void*)0); |
| 27004 | PyObject_GC_Track(op); |
| 27005 | return (PyObject *) op; |
| 27006 | } |
| 27007 | static int |
| 27008 | __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) |
| 27009 | { |
| 27010 | 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); |
| 27011 | 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); |
| 27012 | 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); |
| 27013 | 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); |
| 27014 | 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); |
| 27015 | 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); |
| 27016 | 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); |
| 27017 | 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); |
| 27018 | 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); |
| 27019 | 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); |
| 27020 | 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); |
| 27021 | 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); |
| 27022 | if (m->defaults) { |
| 27023 | PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m)((PyObject * *)(((__pyx_CyFunctionObject *) (m))->defaults )); |
| 27024 | int i; |
| 27025 | for (i = 0; i < m->defaults_pyobjects; i++) |
| 27026 | 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); |
| 27027 | PyMem_Free(m->defaults); |
| 27028 | m->defaults = NULL((void*)0); |
| 27029 | } |
| 27030 | return 0; |
| 27031 | } |
| 27032 | static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) |
| 27033 | { |
| 27034 | PyObject_GC_UnTrack(m); |
| 27035 | if (__Pyx_CyFunction_weakreflist(m)((m)->func_weakreflist) != NULL((void*)0)) |
| 27036 | PyObject_ClearWeakRefs((PyObject *) m); |
| 27037 | __Pyx_CyFunction_clear(m); |
| 27038 | PyObject_GC_Del(m); |
| 27039 | } |
| 27040 | static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) |
| 27041 | { |
| 27042 | Py_VISIT(m->func_closure)do { if (m->func_closure) { int vret = visit((PyObject *)( m->func_closure), arg); if (vret) return vret; } } while ( 0); |
| 27043 | 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); |
| 27044 | Py_VISIT(m->func_dict)do { if (m->func_dict) { int vret = visit((PyObject *)(m-> func_dict), arg); if (vret) return vret; } } while (0); |
| 27045 | Py_VISIT(m->func_name)do { if (m->func_name) { int vret = visit((PyObject *)(m-> func_name), arg); if (vret) return vret; } } while (0); |
| 27046 | Py_VISIT(m->func_qualname)do { if (m->func_qualname) { int vret = visit((PyObject *) (m->func_qualname), arg); if (vret) return vret; } } while (0); |
| 27047 | Py_VISIT(m->func_doc)do { if (m->func_doc) { int vret = visit((PyObject *)(m-> func_doc), arg); if (vret) return vret; } } while (0); |
| 27048 | Py_VISIT(m->func_globals)do { if (m->func_globals) { int vret = visit((PyObject *)( m->func_globals), arg); if (vret) return vret; } } while ( 0); |
| 27049 | Py_VISIT(m->func_code)do { if (m->func_code) { int vret = visit((PyObject *)(m-> func_code), arg); if (vret) return vret; } } while (0); |
| 27050 | Py_VISIT(m->func_classobj)do { if (m->func_classobj) { int vret = visit((PyObject *) (m->func_classobj), arg); if (vret) return vret; } } while (0); |
| 27051 | Py_VISIT(m->defaults_tuple)do { if (m->defaults_tuple) { int vret = visit((PyObject * )(m->defaults_tuple), arg); if (vret) return vret; } } while (0); |
| 27052 | Py_VISIT(m->defaults_kwdict)do { if (m->defaults_kwdict) { int vret = visit((PyObject * )(m->defaults_kwdict), arg); if (vret) return vret; } } while (0); |
| 27053 | if (m->defaults) { |
| 27054 | PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m)((PyObject * *)(((__pyx_CyFunctionObject *) (m))->defaults )); |
| 27055 | int i; |
| 27056 | for (i = 0; i < m->defaults_pyobjects; i++) |
| 27057 | Py_VISIT(pydefaults[i])do { if (pydefaults[i]) { int vret = visit((PyObject *)(pydefaults [i]), arg); if (vret) return vret; } } while (0); |
| 27058 | } |
| 27059 | return 0; |
| 27060 | } |
| 27061 | static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) |
| 27062 | { |
| 27063 | __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; |
| 27064 | if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD0x01) { |
| 27065 | Py_INCREF(func)( ((PyObject*)(func))->ob_refcnt++); |
| 27066 | return func; |
| 27067 | } |
| 27068 | if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD0x02) { |
| 27069 | if (type == NULL((void*)0)) |
| 27070 | type = (PyObject *)(Py_TYPE(obj)(((PyObject*)(obj))->ob_type)); |
| 27071 | return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)))PyMethod_New(func, type, (PyObject *)((((PyObject*)(type))-> ob_type))); |
| 27072 | } |
| 27073 | if (obj == Py_None(&_Py_NoneStruct)) |
| 27074 | obj = NULL((void*)0); |
| 27075 | return __Pyx_PyMethod_New(func, obj, type)PyMethod_New(func, obj, type); |
| 27076 | } |
| 27077 | static PyObject* |
| 27078 | __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) |
| 27079 | { |
| 27080 | #if PY_MAJOR_VERSION2 >= 3 |
| 27081 | return PyUnicode_FromFormatPyUnicodeUCS4_FromFormat("<cyfunction %U at %p>", |
| 27082 | op->func_qualname, (void *)op); |
| 27083 | #else |
| 27084 | return PyString_FromFormat("<cyfunction %s at %p>", |
| 27085 | PyString_AsString(op->func_qualname), (void *)op); |
| 27086 | #endif |
| 27087 | } |
| 27088 | #if CYTHON_COMPILING_IN_PYPY0 |
| 27089 | static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { |
| 27090 | PyCFunctionObject* f = (PyCFunctionObject*)func; |
| 27091 | PyCFunction meth = f->m_ml->ml_meth; |
| 27092 | PyObject *self = f->m_self; |
| 27093 | Py_ssize_t size; |
| 27094 | switch (f->m_ml->ml_flags & (METH_VARARGS0x0001 | METH_KEYWORDS0x0002 | METH_NOARGS0x0004 | METH_O0x0008)) { |
| 27095 | case METH_VARARGS0x0001: |
| 27096 | if (likely(kw == NULL || PyDict_Size(kw) == 0)__builtin_expect(!!(kw == ((void*)0) || PyDict_Size(kw) == 0) , 1)) |
| 27097 | return (*meth)(self, arg); |
| 27098 | break; |
| 27099 | case METH_VARARGS0x0001 | METH_KEYWORDS0x0002: |
| 27100 | return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); |
| 27101 | case METH_NOARGS0x0004: |
| 27102 | if (likely(kw == NULL || PyDict_Size(kw) == 0)__builtin_expect(!!(kw == ((void*)0) || PyDict_Size(kw) == 0) , 1)) { |
| 27103 | size = PyTuple_GET_SIZE(arg)(((PyVarObject*)(arg))->ob_size); |
| 27104 | if (likely(size == 0)__builtin_expect(!!(size == 0), 1)) |
| 27105 | return (*meth)(self, NULL((void*)0)); |
| 27106 | PyErr_Format(PyExc_TypeError, |
| 27107 | "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T"z" "d given)", |
| 27108 | f->m_ml->ml_name, size); |
| 27109 | return NULL((void*)0); |
| 27110 | } |
| 27111 | break; |
| 27112 | case METH_O0x0008: |
| 27113 | if (likely(kw == NULL || PyDict_Size(kw) == 0)__builtin_expect(!!(kw == ((void*)0) || PyDict_Size(kw) == 0) , 1)) { |
| 27114 | size = PyTuple_GET_SIZE(arg)(((PyVarObject*)(arg))->ob_size); |
| 27115 | if (likely(size == 1)__builtin_expect(!!(size == 1), 1)) { |
| 27116 | PyObject *result, *arg0 = PySequence_ITEM(arg, 0)( (((PyObject*)(arg))->ob_type)->tp_as_sequence->sq_item (arg, 0) ); |
| 27117 | if (unlikely(!arg0)__builtin_expect(!!(!arg0), 0)) return NULL((void*)0); |
| 27118 | result = (*meth)(self, arg0); |
| 27119 | Py_DECREF(arg0)do { if ( --((PyObject*)(arg0))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(arg0)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(arg0)))); } while (0); |
| 27120 | return result; |
| 27121 | } |
| 27122 | PyErr_Format(PyExc_TypeError, |
| 27123 | "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T"z" "d given)", |
| 27124 | f->m_ml->ml_name, size); |
| 27125 | return NULL((void*)0); |
| 27126 | } |
| 27127 | break; |
| 27128 | default: |
| 27129 | PyErr_SetString(PyExc_SystemError, "Bad call flags in " |
| 27130 | "__Pyx_CyFunction_Call. METH_OLDARGS is no " |
| 27131 | "longer supported!"); |
| 27132 | return NULL((void*)0); |
| 27133 | } |
| 27134 | PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", |
| 27135 | f->m_ml->ml_name); |
| 27136 | return NULL((void*)0); |
| 27137 | } |
| 27138 | #else |
| 27139 | static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { |
| 27140 | return PyCFunction_Call(func, arg, kw); |
| 27141 | } |
| 27142 | #endif |
| 27143 | static PyTypeObject __pyx_CyFunctionType_type = { |
| 27144 | PyVarObject_HEAD_INIT(0, 0)1, 0, 0, |
| 27145 | "cython_function_or_method", |
| 27146 | sizeof(__pyx_CyFunctionObject), |
| 27147 | 0, |
| 27148 | (destructor) __Pyx_CyFunction_dealloc, |
| 27149 | 0, |
| 27150 | 0, |
| 27151 | 0, |
| 27152 | #if PY_MAJOR_VERSION2 < 3 |
| 27153 | 0, |
| 27154 | #else |
| 27155 | 0, |
| 27156 | #endif |
| 27157 | (reprfunc) __Pyx_CyFunction_repr, |
| 27158 | 0, |
| 27159 | 0, |
| 27160 | 0, |
| 27161 | 0, |
| 27162 | __Pyx_CyFunction_Call, |
| 27163 | 0, |
| 27164 | 0, |
| 27165 | 0, |
| 27166 | 0, |
| 27167 | 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), |
| 27168 | 0, |
| 27169 | (traverseproc) __Pyx_CyFunction_traverse, |
| 27170 | (inquiry) __Pyx_CyFunction_clear, |
| 27171 | 0, |
| 27172 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) < 0x030500A0 |
| 27173 | offsetof(__pyx_CyFunctionObject, func_weakreflist)__builtin_offsetof(__pyx_CyFunctionObject, func_weakreflist), |
| 27174 | #else |
| 27175 | offsetof(PyCFunctionObject, m_weakreflist)__builtin_offsetof(PyCFunctionObject, m_weakreflist), |
| 27176 | #endif |
| 27177 | 0, |
| 27178 | 0, |
| 27179 | __pyx_CyFunction_methods, |
| 27180 | __pyx_CyFunction_members, |
| 27181 | __pyx_CyFunction_getsets, |
| 27182 | 0, |
| 27183 | 0, |
| 27184 | __Pyx_CyFunction_descr_get, |
| 27185 | 0, |
| 27186 | offsetof(__pyx_CyFunctionObject, func_dict)__builtin_offsetof(__pyx_CyFunctionObject, func_dict), |
| 27187 | 0, |
| 27188 | 0, |
| 27189 | 0, |
| 27190 | 0, |
| 27191 | 0, |
| 27192 | 0, |
| 27193 | 0, |
| 27194 | 0, |
| 27195 | 0, |
| 27196 | 0, |
| 27197 | 0, |
| 27198 | 0, |
| 27199 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x030400a1 |
| 27200 | 0, |
| 27201 | #endif |
| 27202 | }; |
| 27203 | static int __pyx_CyFunction_init(void) { |
| 27204 | #if !CYTHON_COMPILING_IN_PYPY0 |
| 27205 | __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; |
| 27206 | #endif |
| 27207 | __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); |
| 27208 | if (__pyx_CyFunctionType == NULL((void*)0)) { |
| 27209 | return -1; |
| 27210 | } |
| 27211 | return 0; |
| 27212 | } |
| 27213 | static CYTHON_INLINE__inline__ void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { |
| 27214 | __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; |
| 27215 | m->defaults = PyMem_Malloc(size); |
| 27216 | if (!m->defaults) |
| 27217 | return PyErr_NoMemory(); |
| 27218 | memset(m->defaults, 0, size); |
| 27219 | m->defaults_pyobjects = pyobjects; |
| 27220 | return m->defaults; |
| 27221 | } |
| 27222 | static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { |
| 27223 | __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; |
| 27224 | m->defaults_tuple = tuple; |
| 27225 | Py_INCREF(tuple)( ((PyObject*)(tuple))->ob_refcnt++); |
| 27226 | } |
| 27227 | static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { |
| 27228 | __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; |
| 27229 | m->defaults_kwdict = dict; |
| 27230 | Py_INCREF(dict)( ((PyObject*)(dict))->ob_refcnt++); |
| 27231 | } |
| 27232 | static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { |
| 27233 | __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; |
| 27234 | m->func_annotations = dict; |
| 27235 | Py_INCREF(dict)( ((PyObject*)(dict))->ob_refcnt++); |
| 27236 | } |
| 27237 | |
| 27238 | static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { |
| 27239 | int start = 0, mid = 0, end = count - 1; |
| 27240 | if (end >= 0 && code_line > entries[end].code_line) { |
| 27241 | return count; |
| 27242 | } |
| 27243 | while (start < end) { |
| 27244 | mid = start + (end - start) / 2; |
| 27245 | if (code_line < entries[mid].code_line) { |
| 27246 | end = mid; |
| 27247 | } else if (code_line > entries[mid].code_line) { |
| 27248 | start = mid + 1; |
| 27249 | } else { |
| 27250 | return mid; |
| 27251 | } |
| 27252 | } |
| 27253 | if (code_line <= entries[mid].code_line) { |
| 27254 | return mid; |
| 27255 | } else { |
| 27256 | return mid + 1; |
| 27257 | } |
| 27258 | } |
| 27259 | static PyCodeObject *__pyx_find_code_object(int code_line) { |
| 27260 | PyCodeObject* code_object; |
| 27261 | int pos; |
| 27262 | if (unlikely(!code_line)__builtin_expect(!!(!code_line), 0) || unlikely(!__pyx_code_cache.entries)__builtin_expect(!!(!__pyx_code_cache.entries), 0)) { |
| 27263 | return NULL((void*)0); |
| 27264 | } |
| 27265 | pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); |
| 27266 | 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)) { |
| 27267 | return NULL((void*)0); |
| 27268 | } |
| 27269 | code_object = __pyx_code_cache.entries[pos].code_object; |
| 27270 | Py_INCREF(code_object)( ((PyObject*)(code_object))->ob_refcnt++); |
| 27271 | return code_object; |
| 27272 | } |
| 27273 | static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { |
| 27274 | int pos, i; |
| 27275 | __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; |
| 27276 | if (unlikely(!code_line)__builtin_expect(!!(!code_line), 0)) { |
| 27277 | return; |
| 27278 | } |
| 27279 | if (unlikely(!entries)__builtin_expect(!!(!entries), 0)) { |
| 27280 | entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); |
| 27281 | if (likely(entries)__builtin_expect(!!(entries), 1)) { |
| 27282 | __pyx_code_cache.entries = entries; |
| 27283 | __pyx_code_cache.max_count = 64; |
| 27284 | __pyx_code_cache.count = 1; |
| 27285 | entries[0].code_line = code_line; |
| 27286 | entries[0].code_object = code_object; |
| 27287 | Py_INCREF(code_object)( ((PyObject*)(code_object))->ob_refcnt++); |
| 27288 | } |
| 27289 | return; |
| 27290 | } |
| 27291 | pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); |
| 27292 | 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)) { |
| 27293 | PyCodeObject* tmp = entries[pos].code_object; |
| 27294 | entries[pos].code_object = code_object; |
| 27295 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 27296 | return; |
| 27297 | } |
| 27298 | if (__pyx_code_cache.count == __pyx_code_cache.max_count) { |
| 27299 | int new_max = __pyx_code_cache.max_count + 64; |
| 27300 | entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( |
| 27301 | __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); |
| 27302 | if (unlikely(!entries)__builtin_expect(!!(!entries), 0)) { |
| 27303 | return; |
| 27304 | } |
| 27305 | __pyx_code_cache.entries = entries; |
| 27306 | __pyx_code_cache.max_count = new_max; |
| 27307 | } |
| 27308 | for (i=__pyx_code_cache.count; i>pos; i--) { |
| 27309 | entries[i] = entries[i-1]; |
| 27310 | } |
| 27311 | entries[pos].code_line = code_line; |
| 27312 | entries[pos].code_object = code_object; |
| 27313 | __pyx_code_cache.count++; |
| 27314 | Py_INCREF(code_object)( ((PyObject*)(code_object))->ob_refcnt++); |
| 27315 | } |
| 27316 | |
| 27317 | #include "compile.h" |
| 27318 | #include "frameobject.h" |
| 27319 | #include "traceback.h" |
| 27320 | static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( |
| 27321 | const char *funcname, int c_line, |
| 27322 | int py_line, const char *filename) { |
| 27323 | PyCodeObject *py_code = 0; |
| 27324 | PyObject *py_srcfile = 0; |
| 27325 | PyObject *py_funcname = 0; |
| 27326 | #if PY_MAJOR_VERSION2 < 3 |
| 27327 | py_srcfile = PyString_FromString(filename); |
| 27328 | #else |
| 27329 | py_srcfile = PyUnicode_FromStringPyUnicodeUCS4_FromString(filename); |
| 27330 | #endif |
| 27331 | if (!py_srcfile) goto bad; |
| 27332 | if (c_line) { |
| 27333 | #if PY_MAJOR_VERSION2 < 3 |
| 27334 | py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); |
| 27335 | #else |
| 27336 | py_funcname = PyUnicode_FromFormatPyUnicodeUCS4_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); |
| 27337 | #endif |
| 27338 | } |
| 27339 | else { |
| 27340 | #if PY_MAJOR_VERSION2 < 3 |
| 27341 | py_funcname = PyString_FromString(funcname); |
| 27342 | #else |
| 27343 | py_funcname = PyUnicode_FromStringPyUnicodeUCS4_FromString(funcname); |
| 27344 | #endif |
| 27345 | } |
| 27346 | if (!py_funcname) goto bad; |
| 27347 | 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) |
| 27348 | 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) |
| 27349 | 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) |
| 27350 | 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) |
| 27351 | 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) |
| 27352 | 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) |
| 27353 | __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) |
| 27354 | __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) |
| 27355 | __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) |
| 27356 | __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) |
| 27357 | __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) |
| 27358 | __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) |
| 27359 | 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) |
| 27360 | 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) |
| 27361 | 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) |
| 27362 | __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) |
| 27363 | )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); |
| 27364 | 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); |
| 27365 | 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); |
| 27366 | return py_code; |
| 27367 | bad: |
| 27368 | 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); |
| 27369 | 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); |
| 27370 | return NULL((void*)0); |
| 27371 | } |
| 27372 | static void __Pyx_AddTraceback(const char *funcname, int c_line, |
| 27373 | int py_line, const char *filename) { |
| 27374 | PyCodeObject *py_code = 0; |
| 27375 | PyFrameObject *py_frame = 0; |
| 27376 | py_code = __pyx_find_code_object(c_line ? c_line : py_line); |
| 27377 | if (!py_code) { |
| 27378 | py_code = __Pyx_CreateCodeObjectForTraceback( |
| 27379 | funcname, c_line, py_line, filename); |
| 27380 | if (!py_code) goto bad; |
| 27381 | __pyx_insert_code_object(c_line ? c_line : py_line, py_code); |
| 27382 | } |
| 27383 | py_frame = PyFrame_New( |
| 27384 | PyThreadState_GET()(_PyThreadState_Current), /*PyThreadState *tstate,*/ |
| 27385 | py_code, /*PyCodeObject *code,*/ |
| 27386 | __pyx_d, /*PyObject *globals,*/ |
| 27387 | 0 /*PyObject *locals*/ |
| 27388 | ); |
| 27389 | if (!py_frame) goto bad; |
| 27390 | py_frame->f_lineno = py_line; |
| 27391 | PyTraceBack_Here(py_frame); |
| 27392 | bad: |
| 27393 | 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); |
| 27394 | 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); |
| 27395 | } |
| 27396 | |
| 27397 | #if PY_MAJOR_VERSION2 < 3 |
| 27398 | static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { |
| 27399 | if (PyObject_CheckBuffer(obj)(((obj)->ob_type->tp_as_buffer != ((void*)0)) && (((((obj)->ob_type)->tp_flags & ((1L<<21))) != 0)) && ((obj)->ob_type->tp_as_buffer->bf_getbuffer != ((void*)0)))) return PyObject_GetBuffer(obj, view, flags); |
| 27400 | if (PyObject_TypeCheck(obj, __pyx_ptype_7cpython_5array_array)((((PyObject*)(obj))->ob_type) == (__pyx_ptype_7cpython_5array_array ) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (__pyx_ptype_7cpython_5array_array )))) return __pyx_pw_7cpython_5array_5array_1__getbuffer__(obj, view, flags); |
| 27401 | if (PyObject_TypeCheck(obj, __pyx_array_type)((((PyObject*)(obj))->ob_type) == (__pyx_array_type) || PyType_IsSubtype ((((PyObject*)(obj))->ob_type), (__pyx_array_type)))) return __pyx_array_getbuffer(obj, view, flags); |
| 27402 | if (PyObject_TypeCheck(obj, __pyx_memoryview_type)((((PyObject*)(obj))->ob_type) == (__pyx_memoryview_type) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (__pyx_memoryview_type )))) return __pyx_memoryview_getbuffer(obj, view, flags); |
| 27403 | PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_name); |
| 27404 | return -1; |
| 27405 | } |
| 27406 | static void __Pyx_ReleaseBuffer(Py_buffer *view) { |
| 27407 | PyObject *obj = view->obj; |
| 27408 | if (!obj) return; |
| 27409 | if (PyObject_CheckBuffer(obj)(((obj)->ob_type->tp_as_buffer != ((void*)0)) && (((((obj)->ob_type)->tp_flags & ((1L<<21))) != 0)) && ((obj)->ob_type->tp_as_buffer->bf_getbuffer != ((void*)0)))) { |
| 27410 | PyBuffer_Release(view); |
| 27411 | return; |
| 27412 | } |
| 27413 | if (PyObject_TypeCheck(obj, __pyx_ptype_7cpython_5array_array)((((PyObject*)(obj))->ob_type) == (__pyx_ptype_7cpython_5array_array ) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (__pyx_ptype_7cpython_5array_array )))) { __pyx_pw_7cpython_5array_5array_3__releasebuffer__(obj, view); return; } |
| 27414 | Py_DECREF(obj)do { if ( --((PyObject*)(obj))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(obj)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(obj)))); } while (0); |
| 27415 | view->obj = NULL((void*)0); |
| 27416 | } |
| 27417 | #endif |
| 27418 | |
| 27419 | |
| 27420 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) { |
| 27421 | const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; |
| 27422 | const int is_unsigned = neg_one > const_zero; |
| 27423 | if (is_unsigned) { |
| 27424 | if (sizeof(uint64_t) < sizeof(long)) { |
| 27425 | return PyInt_FromLong((long) value); |
| 27426 | } else if (sizeof(uint64_t) <= sizeof(unsigned long)) { |
| 27427 | return PyLong_FromUnsignedLong((unsigned long) value); |
| 27428 | } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 27429 | return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value); |
| 27430 | } |
| 27431 | } else { |
| 27432 | if (sizeof(uint64_t) <= sizeof(long)) { |
| 27433 | return PyInt_FromLong((long) value); |
| 27434 | } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONGlong long)) { |
| 27435 | return PyLong_FromLongLong((PY_LONG_LONGlong long) value); |
| 27436 | } |
| 27437 | } |
| 27438 | { |
| 27439 | int one = 1; int little = (int)*(unsigned char *)&one; |
| 27440 | unsigned char *bytes = (unsigned char *)&value; |
| 27441 | return _PyLong_FromByteArray(bytes, sizeof(uint64_t), |
| 27442 | little, !is_unsigned); |
| 27443 | } |
| 27444 | } |
| 27445 | |
| 27446 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) { |
| 27447 | const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0; |
| 27448 | const int is_unsigned = neg_one > const_zero; |
| 27449 | if (is_unsigned) { |
| 27450 | if (sizeof(uint32_t) < sizeof(long)) { |
| 27451 | return PyInt_FromLong((long) value); |
| 27452 | } else if (sizeof(uint32_t) <= sizeof(unsigned long)) { |
| 27453 | return PyLong_FromUnsignedLong((unsigned long) value); |
| 27454 | } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 27455 | return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value); |
| 27456 | } |
| 27457 | } else { |
| 27458 | if (sizeof(uint32_t) <= sizeof(long)) { |
| 27459 | return PyInt_FromLong((long) value); |
| 27460 | } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONGlong long)) { |
| 27461 | return PyLong_FromLongLong((PY_LONG_LONGlong long) value); |
| 27462 | } |
| 27463 | } |
| 27464 | { |
| 27465 | int one = 1; int little = (int)*(unsigned char *)&one; |
| 27466 | unsigned char *bytes = (unsigned char *)&value; |
| 27467 | return _PyLong_FromByteArray(bytes, sizeof(uint32_t), |
| 27468 | little, !is_unsigned); |
| 27469 | } |
| 27470 | } |
| 27471 | |
| 27472 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_int(int value) { |
| 27473 | const int neg_one = (int) -1, const_zero = (int) 0; |
| 27474 | const int is_unsigned = neg_one > const_zero; |
| 27475 | if (is_unsigned) { |
| 27476 | if (sizeof(int) < sizeof(long)) { |
| 27477 | return PyInt_FromLong((long) value); |
| 27478 | } else if (sizeof(int) <= sizeof(unsigned long)) { |
| 27479 | return PyLong_FromUnsignedLong((unsigned long) value); |
| 27480 | } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 27481 | return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value); |
| 27482 | } |
| 27483 | } else { |
| 27484 | if (sizeof(int) <= sizeof(long)) { |
| 27485 | return PyInt_FromLong((long) value); |
| 27486 | } else if (sizeof(int) <= sizeof(PY_LONG_LONGlong long)) { |
| 27487 | return PyLong_FromLongLong((PY_LONG_LONGlong long) value); |
| 27488 | } |
| 27489 | } |
| 27490 | { |
| 27491 | int one = 1; int little = (int)*(unsigned char *)&one; |
| 27492 | unsigned char *bytes = (unsigned char *)&value; |
| 27493 | return _PyLong_FromByteArray(bytes, sizeof(int), |
| 27494 | little, !is_unsigned); |
| 27495 | } |
| 27496 | } |
| 27497 | |
| 27498 | #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; }\ |
| 27499 | __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; } |
| 27500 | #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; }\ |
| 27501 | __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; } |
| 27502 | #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; }\ |
| 27503 | {\ |
| 27504 | func_type value = func_value;\ |
| 27505 | if (sizeof(target_type) < sizeof(func_type)) {\ |
| 27506 | if (unlikely(value != (func_type) (target_type) value)__builtin_expect(!!(value != (func_type) (target_type) value) , 0)) {\ |
| 27507 | func_type zero = 0;\ |
| 27508 | if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred())__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred ()), 0))\ |
| 27509 | return (target_type) -1;\ |
| 27510 | if (is_unsigned && unlikely(value < zero)__builtin_expect(!!(value < zero), 0))\ |
| 27511 | goto raise_neg_overflow;\ |
| 27512 | else\ |
| 27513 | goto raise_overflow;\ |
| 27514 | }\ |
| 27515 | }\ |
| 27516 | return (target_type) value;\ |
| 27517 | } |
| 27518 | |
| 27519 | static CYTHON_INLINE__inline__ uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) { |
| 27520 | const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; |
| 27521 | const int is_unsigned = neg_one > const_zero; |
| 27522 | #if PY_MAJOR_VERSION2 < 3 |
| 27523 | if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & (( 1L<<23))) != 0)), 1)) { |
| 27524 | if (sizeof(uint64_t) < sizeof(long)) { |
| 27525 | __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; } |
| 27526 | } else { |
| 27527 | long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival); |
| 27528 | if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) { |
| 27529 | goto raise_neg_overflow; |
| 27530 | } |
| 27531 | return (uint64_t) val; |
| 27532 | } |
| 27533 | } else |
| 27534 | #endif |
| 27535 | if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<<24))) != 0)), 1)) { |
| 27536 | if (is_unsigned) { |
| 27537 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 27538 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 27539 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 27540 | case 0: return (uint64_t) 0; |
| 27541 | 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; } |
| 27542 | case 2: |
| 27543 | if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT30) { |
| 27544 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 27545 | __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; } |
| 27546 | } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT30) { |
| 27547 | return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])); |
| 27548 | } |
| 27549 | } |
| 27550 | break; |
| 27551 | case 3: |
| 27552 | if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT30) { |
| 27553 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 27554 | __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; } |
| 27555 | } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT30) { |
| 27556 | return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])); |
| 27557 | } |
| 27558 | } |
| 27559 | break; |
| 27560 | case 4: |
| 27561 | if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT30) { |
| 27562 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 27563 | __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; } |
| 27564 | } else if (8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT30) { |
| 27565 | 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])); |
| 27566 | } |
| 27567 | } |
| 27568 | break; |
| 27569 | } |
| 27570 | #endif |
| 27571 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 27572 | if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0) , 0)) { |
| 27573 | goto raise_neg_overflow; |
| 27574 | } |
| 27575 | #else |
| 27576 | { |
| 27577 | int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0); |
| 27578 | if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0)) |
| 27579 | return (uint64_t) -1; |
| 27580 | if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0)) |
| 27581 | goto raise_neg_overflow; |
| 27582 | } |
| 27583 | #endif |
| 27584 | if (sizeof(uint64_t) <= sizeof(unsigned long)) { |
| 27585 | __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; } |
| 27586 | } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 27587 | __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; } |
| 27588 | } |
| 27589 | } else { |
| 27590 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 27591 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 27592 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 27593 | case 0: return (uint64_t) 0; |
| 27594 | 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; } |
| 27595 | 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; } |
| 27596 | case -2: |
| 27597 | if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT30) { |
| 27598 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 27599 | __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; } |
| 27600 | } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT30) { |
| 27601 | return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0]))); |
| 27602 | } |
| 27603 | } |
| 27604 | break; |
| 27605 | case 2: |
| 27606 | if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT30) { |
| 27607 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 27608 | __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; } |
| 27609 | } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT30) { |
| 27610 | return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0]))); |
| 27611 | } |
| 27612 | } |
| 27613 | break; |
| 27614 | case -3: |
| 27615 | if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT30) { |
| 27616 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 27617 | __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; } |
| 27618 | } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT30) { |
| 27619 | return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0]))); |
| 27620 | } |
| 27621 | } |
| 27622 | break; |
| 27623 | case 3: |
| 27624 | if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT30) { |
| 27625 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 27626 | __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; } |
| 27627 | } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT30) { |
| 27628 | return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0]))); |
| 27629 | } |
| 27630 | } |
| 27631 | break; |
| 27632 | case -4: |
| 27633 | if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT30) { |
| 27634 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 27635 | __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; } |
| 27636 | } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT30) { |
| 27637 | 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]))); |
| 27638 | } |
| 27639 | } |
| 27640 | break; |
| 27641 | case 4: |
| 27642 | if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT30) { |
| 27643 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 27644 | __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; } |
| 27645 | } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT30) { |
| 27646 | 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]))); |
| 27647 | } |
| 27648 | } |
| 27649 | break; |
| 27650 | } |
| 27651 | #endif |
| 27652 | if (sizeof(uint64_t) <= sizeof(long)) { |
| 27653 | __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; } |
| 27654 | } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONGlong long)) { |
| 27655 | __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; } |
| 27656 | } |
| 27657 | } |
| 27658 | { |
| 27659 | #if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray) |
| 27660 | PyErr_SetString(PyExc_RuntimeError, |
| 27661 | "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); |
| 27662 | #else |
| 27663 | uint64_t val; |
| 27664 | PyObject *v = __Pyx_PyNumber_Int(x); |
| 27665 | #if PY_MAJOR_VERSION2 < 3 |
| 27666 | if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<< 24))) != 0)) { |
| 27667 | PyObject *tmp = v; |
| 27668 | v = PyNumber_Long(tmp); |
| 27669 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 27670 | } |
| 27671 | #endif |
| 27672 | if (likely(v)__builtin_expect(!!(v), 1)) { |
| 27673 | int one = 1; int is_little = (int)*(unsigned char *)&one; |
| 27674 | unsigned char *bytes = (unsigned char *)&val; |
| 27675 | int ret = _PyLong_AsByteArray((PyLongObject *)v, |
| 27676 | bytes, sizeof(val), |
| 27677 | is_little, !is_unsigned); |
| 27678 | Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(v)))); } while (0); |
| 27679 | if (likely(!ret)__builtin_expect(!!(!ret), 1)) |
| 27680 | return val; |
| 27681 | } |
| 27682 | #endif |
| 27683 | return (uint64_t) -1; |
| 27684 | } |
| 27685 | } else { |
| 27686 | uint64_t val; |
| 27687 | PyObject *tmp = __Pyx_PyNumber_Int(x); |
| 27688 | if (!tmp) return (uint64_t) -1; |
| 27689 | val = __Pyx_PyInt_As_uint64_t(tmp); |
| 27690 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 27691 | return val; |
| 27692 | } |
| 27693 | raise_overflow: |
| 27694 | PyErr_SetString(PyExc_OverflowError, |
| 27695 | "value too large to convert to uint64_t"); |
| 27696 | return (uint64_t) -1; |
| 27697 | raise_neg_overflow: |
| 27698 | PyErr_SetString(PyExc_OverflowError, |
| 27699 | "can't convert negative value to uint64_t"); |
| 27700 | return (uint64_t) -1; |
| 27701 | } |
| 27702 | |
| 27703 | static PyObject *__pyx_memview_get_nn_uint64_t(const char *itemp) { |
| 27704 | return (PyObject *) __Pyx_PyInt_From_uint64_t(*(uint64_t *) itemp); |
| 27705 | } |
| 27706 | static int __pyx_memview_set_nn_uint64_t(const char *itemp, PyObject *obj) { |
| 27707 | uint64_t value = __Pyx_PyInt_As_uint64_t(obj); |
| 27708 | if ((value == (uint64_t)-1) && PyErr_Occurred()) |
| 27709 | return 0; |
| 27710 | *(uint64_t *) itemp = value; |
| 27711 | return 1; |
| 27712 | } |
| 27713 | |
| 27714 | static CYTHON_INLINE__inline__ int __Pyx_PyInt_As_int(PyObject *x) { |
| 27715 | const int neg_one = (int) -1, const_zero = (int) 0; |
| 27716 | const int is_unsigned = neg_one > const_zero; |
| 27717 | #if PY_MAJOR_VERSION2 < 3 |
| 27718 | if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & (( 1L<<23))) != 0)), 1)) { |
| 27719 | if (sizeof(int) < sizeof(long)) { |
| 27720 | __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; } |
| 27721 | } else { |
| 27722 | long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival); |
| 27723 | if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) { |
| 27724 | goto raise_neg_overflow; |
| 27725 | } |
| 27726 | return (int) val; |
| 27727 | } |
| 27728 | } else |
| 27729 | #endif |
| 27730 | if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<<24))) != 0)), 1)) { |
| 27731 | if (is_unsigned) { |
| 27732 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 27733 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 27734 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 27735 | case 0: return (int) 0; |
| 27736 | 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; } |
| 27737 | case 2: |
| 27738 | if (8 * sizeof(int) > 1 * PyLong_SHIFT30) { |
| 27739 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 27740 | __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; } |
| 27741 | } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT30) { |
| 27742 | return (int) (((((int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])); |
| 27743 | } |
| 27744 | } |
| 27745 | break; |
| 27746 | case 3: |
| 27747 | if (8 * sizeof(int) > 2 * PyLong_SHIFT30) { |
| 27748 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 27749 | __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; } |
| 27750 | } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT30) { |
| 27751 | return (int) (((((((int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])); |
| 27752 | } |
| 27753 | } |
| 27754 | break; |
| 27755 | case 4: |
| 27756 | if (8 * sizeof(int) > 3 * PyLong_SHIFT30) { |
| 27757 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 27758 | __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; } |
| 27759 | } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT30) { |
| 27760 | return (int) (((((((((int)digits[3]) << PyLong_SHIFT30) | (int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])); |
| 27761 | } |
| 27762 | } |
| 27763 | break; |
| 27764 | } |
| 27765 | #endif |
| 27766 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 27767 | if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0) , 0)) { |
| 27768 | goto raise_neg_overflow; |
| 27769 | } |
| 27770 | #else |
| 27771 | { |
| 27772 | int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0); |
| 27773 | if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0)) |
| 27774 | return (int) -1; |
| 27775 | if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0)) |
| 27776 | goto raise_neg_overflow; |
| 27777 | } |
| 27778 | #endif |
| 27779 | if (sizeof(int) <= sizeof(unsigned long)) { |
| 27780 | __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; } |
| 27781 | } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 27782 | __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; } |
| 27783 | } |
| 27784 | } else { |
| 27785 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 27786 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 27787 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 27788 | case 0: return (int) 0; |
| 27789 | 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; } |
| 27790 | 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; } |
| 27791 | case -2: |
| 27792 | if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT30) { |
| 27793 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 27794 | __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; } |
| 27795 | } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT30) { |
| 27796 | return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]))); |
| 27797 | } |
| 27798 | } |
| 27799 | break; |
| 27800 | case 2: |
| 27801 | if (8 * sizeof(int) > 1 * PyLong_SHIFT30) { |
| 27802 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 27803 | __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; } |
| 27804 | } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT30) { |
| 27805 | return (int) ((((((int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]))); |
| 27806 | } |
| 27807 | } |
| 27808 | break; |
| 27809 | case -3: |
| 27810 | if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT30) { |
| 27811 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 27812 | __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; } |
| 27813 | } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT30) { |
| 27814 | return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]))); |
| 27815 | } |
| 27816 | } |
| 27817 | break; |
| 27818 | case 3: |
| 27819 | if (8 * sizeof(int) > 2 * PyLong_SHIFT30) { |
| 27820 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 27821 | __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; } |
| 27822 | } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT30) { |
| 27823 | return (int) ((((((((int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]))); |
| 27824 | } |
| 27825 | } |
| 27826 | break; |
| 27827 | case -4: |
| 27828 | if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT30) { |
| 27829 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 27830 | __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; } |
| 27831 | } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT30) { |
| 27832 | return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT30) | (int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]))); |
| 27833 | } |
| 27834 | } |
| 27835 | break; |
| 27836 | case 4: |
| 27837 | if (8 * sizeof(int) > 3 * PyLong_SHIFT30) { |
| 27838 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 27839 | __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; } |
| 27840 | } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT30) { |
| 27841 | return (int) ((((((((((int)digits[3]) << PyLong_SHIFT30) | (int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]))); |
| 27842 | } |
| 27843 | } |
| 27844 | break; |
| 27845 | } |
| 27846 | #endif |
| 27847 | if (sizeof(int) <= sizeof(long)) { |
| 27848 | __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; } |
| 27849 | } else if (sizeof(int) <= sizeof(PY_LONG_LONGlong long)) { |
| 27850 | __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; } |
| 27851 | } |
| 27852 | } |
| 27853 | { |
| 27854 | #if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray) |
| 27855 | PyErr_SetString(PyExc_RuntimeError, |
| 27856 | "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); |
| 27857 | #else |
| 27858 | int val; |
| 27859 | PyObject *v = __Pyx_PyNumber_Int(x); |
| 27860 | #if PY_MAJOR_VERSION2 < 3 |
| 27861 | if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<< 24))) != 0)) { |
| 27862 | PyObject *tmp = v; |
| 27863 | v = PyNumber_Long(tmp); |
| 27864 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 27865 | } |
| 27866 | #endif |
| 27867 | if (likely(v)__builtin_expect(!!(v), 1)) { |
| 27868 | int one = 1; int is_little = (int)*(unsigned char *)&one; |
| 27869 | unsigned char *bytes = (unsigned char *)&val; |
| 27870 | int ret = _PyLong_AsByteArray((PyLongObject *)v, |
| 27871 | bytes, sizeof(val), |
| 27872 | is_little, !is_unsigned); |
| 27873 | Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(v)))); } while (0); |
| 27874 | if (likely(!ret)__builtin_expect(!!(!ret), 1)) |
| 27875 | return val; |
| 27876 | } |
| 27877 | #endif |
| 27878 | return (int) -1; |
| 27879 | } |
| 27880 | } else { |
| 27881 | int val; |
| 27882 | PyObject *tmp = __Pyx_PyNumber_Int(x); |
| 27883 | if (!tmp) return (int) -1; |
| 27884 | val = __Pyx_PyInt_As_int(tmp); |
| 27885 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 27886 | return val; |
| 27887 | } |
| 27888 | raise_overflow: |
| 27889 | PyErr_SetString(PyExc_OverflowError, |
| 27890 | "value too large to convert to int"); |
| 27891 | return (int) -1; |
| 27892 | raise_neg_overflow: |
| 27893 | PyErr_SetString(PyExc_OverflowError, |
| 27894 | "can't convert negative value to int"); |
| 27895 | return (int) -1; |
| 27896 | } |
| 27897 | |
| 27898 | static CYTHON_INLINE__inline__ uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) { |
| 27899 | const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0; |
| 27900 | const int is_unsigned = neg_one > const_zero; |
| 27901 | #if PY_MAJOR_VERSION2 < 3 |
| 27902 | if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & (( 1L<<23))) != 0)), 1)) { |
| 27903 | if (sizeof(uint32_t) < sizeof(long)) { |
| 27904 | __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof (uint32_t) < sizeof(long)) { if (__builtin_expect(!!(value != (long) (uint32_t) value), 0)) { long zero = 0; if (0 && __builtin_expect(!!(value == (long)-1 && PyErr_Occurred ()), 0)) return (uint32_t) -1; if (is_unsigned && __builtin_expect (!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 27905 | } else { |
| 27906 | long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival); |
| 27907 | if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) { |
| 27908 | goto raise_neg_overflow; |
| 27909 | } |
| 27910 | return (uint32_t) val; |
| 27911 | } |
| 27912 | } else |
| 27913 | #endif |
| 27914 | if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<<24))) != 0)), 1)) { |
| 27915 | if (is_unsigned) { |
| 27916 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 27917 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 27918 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 27919 | case 0: return (uint32_t) 0; |
| 27920 | case 1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(uint32_t) < sizeof(digit )) { if (__builtin_expect(!!(value != (digit) (uint32_t) value ), 0)) { digit zero = 0; if (0 && __builtin_expect(!! (value == (digit)-1 && PyErr_Occurred()), 0)) return ( uint32_t) -1; if (is_unsigned && __builtin_expect(!!( value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 27921 | case 2: |
| 27922 | if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT30) { |
| 27923 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 27924 | __PYX_VERIFY_RETURN_INT(uint32_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(uint32_t) < sizeof (unsigned long)) { if (__builtin_expect(!!(value != (unsigned long) (uint32_t) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0)) return (uint32_t) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow ; else goto raise_overflow; } } return (uint32_t) value; } |
| 27925 | } else if (8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT30) { |
| 27926 | return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0])); |
| 27927 | } |
| 27928 | } |
| 27929 | break; |
| 27930 | case 3: |
| 27931 | if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT30) { |
| 27932 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 27933 | __PYX_VERIFY_RETURN_INT(uint32_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(uint32_t) < sizeof(unsigned long) ) { if (__builtin_expect(!!(value != (unsigned long) (uint32_t ) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect (!!(value == (unsigned long)-1 && PyErr_Occurred()), 0 )) return (uint32_t) -1; if (is_unsigned && __builtin_expect (!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 27934 | } else if (8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT30) { |
| 27935 | return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0])); |
| 27936 | } |
| 27937 | } |
| 27938 | break; |
| 27939 | case 4: |
| 27940 | if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT30) { |
| 27941 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 27942 | __PYX_VERIFY_RETURN_INT(uint32_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 (uint32_t) < sizeof(unsigned long)) { if (__builtin_expect (!!(value != (unsigned long) (uint32_t) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0)) return ( uint32_t) -1; if (is_unsigned && __builtin_expect(!!( value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 27943 | } else if (8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT30) { |
| 27944 | return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT30) | (uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0])); |
| 27945 | } |
| 27946 | } |
| 27947 | break; |
| 27948 | } |
| 27949 | #endif |
| 27950 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 27951 | if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0) , 0)) { |
| 27952 | goto raise_neg_overflow; |
| 27953 | } |
| 27954 | #else |
| 27955 | { |
| 27956 | int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0); |
| 27957 | if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0)) |
| 27958 | return (uint32_t) -1; |
| 27959 | if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0)) |
| 27960 | goto raise_neg_overflow; |
| 27961 | } |
| 27962 | #endif |
| 27963 | if (sizeof(uint32_t) <= sizeof(unsigned long)) { |
| 27964 | __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof( uint32_t) < sizeof(unsigned long)) { if (__builtin_expect( !!(value != (unsigned long) (uint32_t) value), 0)) { unsigned long zero = 0; if (1 && __builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0)) return ( uint32_t) -1; if (is_unsigned && __builtin_expect(!!( value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 27965 | } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 27966 | __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if (sizeof(uint32_t) < sizeof(unsigned long long)) { if (__builtin_expect (!!(value != (unsigned long long) (uint32_t) value), 0)) { unsigned long long zero = 0; if (1 && __builtin_expect(!!(value == (unsigned long long)-1 && PyErr_Occurred()), 0)) return (uint32_t) -1; if (is_unsigned && __builtin_expect(! !(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 27967 | } |
| 27968 | } else { |
| 27969 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 27970 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 27971 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 27972 | case 0: return (uint32_t) 0; |
| 27973 | case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(uint32_t) < sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit) ( uint32_t) value), 0)) { sdigit zero = 0; if (0 && __builtin_expect (!!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return (uint32_t) -1; if (is_unsigned && __builtin_expect(! !(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 27974 | case 1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(uint32_t) < sizeof( digit)) { if (__builtin_expect(!!(value != (digit) (uint32_t) value), 0)) { digit zero = 0; if (0 && __builtin_expect (!!(value == (digit)-1 && PyErr_Occurred()), 0)) return (uint32_t) -1; if (is_unsigned && __builtin_expect(! !(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 27975 | case -2: |
| 27976 | if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT30) { |
| 27977 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 27978 | __PYX_VERIFY_RETURN_INT(uint32_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(uint32_t) < sizeof (long)) { if (__builtin_expect(!!(value != (long) (uint32_t) value ), 0)) { long zero = 0; if (0 && __builtin_expect(!!( value == (long)-1 && PyErr_Occurred()), 0)) return (uint32_t ) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 27979 | } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT30) { |
| 27980 | return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0]))); |
| 27981 | } |
| 27982 | } |
| 27983 | break; |
| 27984 | case 2: |
| 27985 | if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT30) { |
| 27986 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 27987 | __PYX_VERIFY_RETURN_INT(uint32_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(uint32_t) < sizeof (unsigned long)) { if (__builtin_expect(!!(value != (unsigned long) (uint32_t) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0)) return (uint32_t) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow ; else goto raise_overflow; } } return (uint32_t) value; } |
| 27988 | } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT30) { |
| 27989 | return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0]))); |
| 27990 | } |
| 27991 | } |
| 27992 | break; |
| 27993 | case -3: |
| 27994 | if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT30) { |
| 27995 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 27996 | __PYX_VERIFY_RETURN_INT(uint32_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(uint32_t) < sizeof(long)) { if (__builtin_expect (!!(value != (long) (uint32_t) value), 0)) { long zero = 0; if (0 && __builtin_expect(!!(value == (long)-1 && PyErr_Occurred()), 0)) return (uint32_t) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow ; else goto raise_overflow; } } return (uint32_t) value; } |
| 27997 | } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT30) { |
| 27998 | return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0]))); |
| 27999 | } |
| 28000 | } |
| 28001 | break; |
| 28002 | case 3: |
| 28003 | if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT30) { |
| 28004 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 28005 | __PYX_VERIFY_RETURN_INT(uint32_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(uint32_t) < sizeof(unsigned long) ) { if (__builtin_expect(!!(value != (unsigned long) (uint32_t ) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect (!!(value == (unsigned long)-1 && PyErr_Occurred()), 0 )) return (uint32_t) -1; if (is_unsigned && __builtin_expect (!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 28006 | } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT30) { |
| 28007 | return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0]))); |
| 28008 | } |
| 28009 | } |
| 28010 | break; |
| 28011 | case -4: |
| 28012 | if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT30) { |
| 28013 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28014 | __PYX_VERIFY_RETURN_INT(uint32_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 (uint32_t) < sizeof(long)) { if (__builtin_expect(!!(value != (long) (uint32_t) value), 0)) { long zero = 0; if (0 && __builtin_expect(!!(value == (long)-1 && PyErr_Occurred ()), 0)) return (uint32_t) -1; if (is_unsigned && __builtin_expect (!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 28015 | } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT30) { |
| 28016 | return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT30) | (uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0]))); |
| 28017 | } |
| 28018 | } |
| 28019 | break; |
| 28020 | case 4: |
| 28021 | if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT30) { |
| 28022 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28023 | __PYX_VERIFY_RETURN_INT(uint32_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 (uint32_t) < sizeof(unsigned long)) { if (__builtin_expect (!!(value != (unsigned long) (uint32_t) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0)) return ( uint32_t) -1; if (is_unsigned && __builtin_expect(!!( value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 28024 | } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT30) { |
| 28025 | return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT30) | (uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0]))); |
| 28026 | } |
| 28027 | } |
| 28028 | break; |
| 28029 | } |
| 28030 | #endif |
| 28031 | if (sizeof(uint32_t) <= sizeof(long)) { |
| 28032 | __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(uint32_t) < sizeof (long)) { if (__builtin_expect(!!(value != (long) (uint32_t) value ), 0)) { long zero = 0; if (1 && __builtin_expect(!!( value == (long)-1 && PyErr_Occurred()), 0)) return (uint32_t ) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (uint32_t) value; } |
| 28033 | } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONGlong long)) { |
| 28034 | __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(uint32_t ) < sizeof(long long)) { if (__builtin_expect(!!(value != ( long long) (uint32_t) value), 0)) { long long zero = 0; if (1 && __builtin_expect(!!(value == (long long)-1 && PyErr_Occurred()), 0)) return (uint32_t) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow ; else goto raise_overflow; } } return (uint32_t) value; } |
| 28035 | } |
| 28036 | } |
| 28037 | { |
| 28038 | #if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray) |
| 28039 | PyErr_SetString(PyExc_RuntimeError, |
| 28040 | "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); |
| 28041 | #else |
| 28042 | uint32_t val; |
| 28043 | PyObject *v = __Pyx_PyNumber_Int(x); |
| 28044 | #if PY_MAJOR_VERSION2 < 3 |
| 28045 | if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<< 24))) != 0)) { |
| 28046 | PyObject *tmp = v; |
| 28047 | v = PyNumber_Long(tmp); |
| 28048 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 28049 | } |
| 28050 | #endif |
| 28051 | if (likely(v)__builtin_expect(!!(v), 1)) { |
| 28052 | int one = 1; int is_little = (int)*(unsigned char *)&one; |
| 28053 | unsigned char *bytes = (unsigned char *)&val; |
| 28054 | int ret = _PyLong_AsByteArray((PyLongObject *)v, |
| 28055 | bytes, sizeof(val), |
| 28056 | is_little, !is_unsigned); |
| 28057 | Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(v)))); } while (0); |
| 28058 | if (likely(!ret)__builtin_expect(!!(!ret), 1)) |
| 28059 | return val; |
| 28060 | } |
| 28061 | #endif |
| 28062 | return (uint32_t) -1; |
| 28063 | } |
| 28064 | } else { |
| 28065 | uint32_t val; |
| 28066 | PyObject *tmp = __Pyx_PyNumber_Int(x); |
| 28067 | if (!tmp) return (uint32_t) -1; |
| 28068 | val = __Pyx_PyInt_As_uint32_t(tmp); |
| 28069 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 28070 | return val; |
| 28071 | } |
| 28072 | raise_overflow: |
| 28073 | PyErr_SetString(PyExc_OverflowError, |
| 28074 | "value too large to convert to uint32_t"); |
| 28075 | return (uint32_t) -1; |
| 28076 | raise_neg_overflow: |
| 28077 | PyErr_SetString(PyExc_OverflowError, |
| 28078 | "can't convert negative value to uint32_t"); |
| 28079 | return (uint32_t) -1; |
| 28080 | } |
| 28081 | |
| 28082 | static CYTHON_INLINE__inline__ int __Pyx_ErrOccurredWithGIL(void) { |
| 28083 | int err; |
| 28084 | #ifdef WITH_THREAD1 |
| 28085 | PyGILState_STATE _save = PyGILState_Ensure(); |
| 28086 | #endif |
| 28087 | err = !!PyErr_Occurred(); |
| 28088 | #ifdef WITH_THREAD1 |
| 28089 | PyGILState_Release(_save); |
| 28090 | #endif |
| 28091 | return err; |
| 28092 | } |
| 28093 | |
| 28094 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) { |
| 28095 | const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0; |
| 28096 | const int is_unsigned = neg_one > const_zero; |
| 28097 | if (is_unsigned) { |
| 28098 | if (sizeof(unsigned long) < sizeof(long)) { |
| 28099 | return PyInt_FromLong((long) value); |
| 28100 | } else if (sizeof(unsigned long) <= sizeof(unsigned long)) { |
| 28101 | return PyLong_FromUnsignedLong((unsigned long) value); |
| 28102 | } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 28103 | return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value); |
| 28104 | } |
| 28105 | } else { |
| 28106 | if (sizeof(unsigned long) <= sizeof(long)) { |
| 28107 | return PyInt_FromLong((long) value); |
| 28108 | } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONGlong long)) { |
| 28109 | return PyLong_FromLongLong((PY_LONG_LONGlong long) value); |
| 28110 | } |
| 28111 | } |
| 28112 | { |
| 28113 | int one = 1; int little = (int)*(unsigned char *)&one; |
| 28114 | unsigned char *bytes = (unsigned char *)&value; |
| 28115 | return _PyLong_FromByteArray(bytes, sizeof(unsigned long), |
| 28116 | little, !is_unsigned); |
| 28117 | } |
| 28118 | } |
| 28119 | |
| 28120 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { |
| 28121 | const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; |
| 28122 | const int is_unsigned = neg_one > const_zero; |
| 28123 | if (is_unsigned) { |
| 28124 | if (sizeof(unsigned int) < sizeof(long)) { |
| 28125 | return PyInt_FromLong((long) value); |
| 28126 | } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { |
| 28127 | return PyLong_FromUnsignedLong((unsigned long) value); |
| 28128 | } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 28129 | return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value); |
| 28130 | } |
| 28131 | } else { |
| 28132 | if (sizeof(unsigned int) <= sizeof(long)) { |
| 28133 | return PyInt_FromLong((long) value); |
| 28134 | } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONGlong long)) { |
| 28135 | return PyLong_FromLongLong((PY_LONG_LONGlong long) value); |
| 28136 | } |
| 28137 | } |
| 28138 | { |
| 28139 | int one = 1; int little = (int)*(unsigned char *)&one; |
| 28140 | unsigned char *bytes = (unsigned char *)&value; |
| 28141 | return _PyLong_FromByteArray(bytes, sizeof(unsigned int), |
| 28142 | little, !is_unsigned); |
| 28143 | } |
| 28144 | } |
| 28145 | |
| 28146 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_long(long value) { |
| 28147 | const long neg_one = (long) -1, const_zero = (long) 0; |
| 28148 | const int is_unsigned = neg_one > const_zero; |
| 28149 | if (is_unsigned) { |
| 28150 | if (sizeof(long) < sizeof(long)) { |
| 28151 | return PyInt_FromLong((long) value); |
| 28152 | } else if (sizeof(long) <= sizeof(unsigned long)) { |
| 28153 | return PyLong_FromUnsignedLong((unsigned long) value); |
| 28154 | } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 28155 | return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value); |
| 28156 | } |
| 28157 | } else { |
| 28158 | if (sizeof(long) <= sizeof(long)) { |
| 28159 | return PyInt_FromLong((long) value); |
| 28160 | } else if (sizeof(long) <= sizeof(PY_LONG_LONGlong long)) { |
| 28161 | return PyLong_FromLongLong((PY_LONG_LONGlong long) value); |
| 28162 | } |
| 28163 | } |
| 28164 | { |
| 28165 | int one = 1; int little = (int)*(unsigned char *)&one; |
| 28166 | unsigned char *bytes = (unsigned char *)&value; |
| 28167 | return _PyLong_FromByteArray(bytes, sizeof(long), |
| 28168 | little, !is_unsigned); |
| 28169 | } |
| 28170 | } |
| 28171 | |
| 28172 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_time_t(time_t value) { |
| 28173 | const time_t neg_one = (time_t) -1, const_zero = (time_t) 0; |
| 28174 | const int is_unsigned = neg_one > const_zero; |
| 28175 | if (is_unsigned) { |
| 28176 | if (sizeof(time_t) < sizeof(long)) { |
| 28177 | return PyInt_FromLong((long) value); |
| 28178 | } else if (sizeof(time_t) <= sizeof(unsigned long)) { |
| 28179 | return PyLong_FromUnsignedLong((unsigned long) value); |
| 28180 | } else if (sizeof(time_t) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 28181 | return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value); |
| 28182 | } |
| 28183 | } else { |
| 28184 | if (sizeof(time_t) <= sizeof(long)) { |
| 28185 | return PyInt_FromLong((long) value); |
| 28186 | } else if (sizeof(time_t) <= sizeof(PY_LONG_LONGlong long)) { |
| 28187 | return PyLong_FromLongLong((PY_LONG_LONGlong long) value); |
| 28188 | } |
| 28189 | } |
| 28190 | { |
| 28191 | int one = 1; int little = (int)*(unsigned char *)&one; |
| 28192 | unsigned char *bytes = (unsigned char *)&value; |
| 28193 | return _PyLong_FromByteArray(bytes, sizeof(time_t), |
| 28194 | little, !is_unsigned); |
| 28195 | } |
| 28196 | } |
| 28197 | |
| 28198 | static CYTHON_INLINE__inline__ int64_t __Pyx_PyInt_As_int64_t(PyObject *x) { |
| 28199 | const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; |
| 28200 | const int is_unsigned = neg_one > const_zero; |
| 28201 | #if PY_MAJOR_VERSION2 < 3 |
| 28202 | if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & (( 1L<<23))) != 0)), 1)) { |
| 28203 | if (sizeof(int64_t) < sizeof(long)) { |
| 28204 | __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; } |
| 28205 | } else { |
| 28206 | long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival); |
| 28207 | if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) { |
| 28208 | goto raise_neg_overflow; |
| 28209 | } |
| 28210 | return (int64_t) val; |
| 28211 | } |
| 28212 | } else |
| 28213 | #endif |
| 28214 | if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<<24))) != 0)), 1)) { |
| 28215 | if (is_unsigned) { |
| 28216 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 28217 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 28218 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 28219 | case 0: return (int64_t) 0; |
| 28220 | 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; } |
| 28221 | case 2: |
| 28222 | if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT30) { |
| 28223 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 28224 | __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; } |
| 28225 | } else if (8 * sizeof(int64_t) >= 2 * PyLong_SHIFT30) { |
| 28226 | return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])); |
| 28227 | } |
| 28228 | } |
| 28229 | break; |
| 28230 | case 3: |
| 28231 | if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT30) { |
| 28232 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 28233 | __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; } |
| 28234 | } else if (8 * sizeof(int64_t) >= 3 * PyLong_SHIFT30) { |
| 28235 | return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])); |
| 28236 | } |
| 28237 | } |
| 28238 | break; |
| 28239 | case 4: |
| 28240 | if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT30) { |
| 28241 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28242 | __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; } |
| 28243 | } else if (8 * sizeof(int64_t) >= 4 * PyLong_SHIFT30) { |
| 28244 | 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])); |
| 28245 | } |
| 28246 | } |
| 28247 | break; |
| 28248 | } |
| 28249 | #endif |
| 28250 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 28251 | if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0) , 0)) { |
| 28252 | goto raise_neg_overflow; |
| 28253 | } |
| 28254 | #else |
| 28255 | { |
| 28256 | int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0); |
| 28257 | if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0)) |
| 28258 | return (int64_t) -1; |
| 28259 | if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0)) |
| 28260 | goto raise_neg_overflow; |
| 28261 | } |
| 28262 | #endif |
| 28263 | if (sizeof(int64_t) <= sizeof(unsigned long)) { |
| 28264 | __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; } |
| 28265 | } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 28266 | __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; } |
| 28267 | } |
| 28268 | } else { |
| 28269 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 28270 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 28271 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 28272 | case 0: return (int64_t) 0; |
| 28273 | 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; } |
| 28274 | 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; } |
| 28275 | case -2: |
| 28276 | if (8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT30) { |
| 28277 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 28278 | __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; } |
| 28279 | } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT30) { |
| 28280 | return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0]))); |
| 28281 | } |
| 28282 | } |
| 28283 | break; |
| 28284 | case 2: |
| 28285 | if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT30) { |
| 28286 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 28287 | __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; } |
| 28288 | } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT30) { |
| 28289 | return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0]))); |
| 28290 | } |
| 28291 | } |
| 28292 | break; |
| 28293 | case -3: |
| 28294 | if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT30) { |
| 28295 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 28296 | __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; } |
| 28297 | } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT30) { |
| 28298 | return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0]))); |
| 28299 | } |
| 28300 | } |
| 28301 | break; |
| 28302 | case 3: |
| 28303 | if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT30) { |
| 28304 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 28305 | __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; } |
| 28306 | } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT30) { |
| 28307 | return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0]))); |
| 28308 | } |
| 28309 | } |
| 28310 | break; |
| 28311 | case -4: |
| 28312 | if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT30) { |
| 28313 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28314 | __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; } |
| 28315 | } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT30) { |
| 28316 | 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]))); |
| 28317 | } |
| 28318 | } |
| 28319 | break; |
| 28320 | case 4: |
| 28321 | if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT30) { |
| 28322 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28323 | __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; } |
| 28324 | } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT30) { |
| 28325 | 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]))); |
| 28326 | } |
| 28327 | } |
| 28328 | break; |
| 28329 | } |
| 28330 | #endif |
| 28331 | if (sizeof(int64_t) <= sizeof(long)) { |
| 28332 | __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; } |
| 28333 | } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONGlong long)) { |
| 28334 | __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; } |
| 28335 | } |
| 28336 | } |
| 28337 | { |
| 28338 | #if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray) |
| 28339 | PyErr_SetString(PyExc_RuntimeError, |
| 28340 | "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); |
| 28341 | #else |
| 28342 | int64_t val; |
| 28343 | PyObject *v = __Pyx_PyNumber_Int(x); |
| 28344 | #if PY_MAJOR_VERSION2 < 3 |
| 28345 | if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<< 24))) != 0)) { |
| 28346 | PyObject *tmp = v; |
| 28347 | v = PyNumber_Long(tmp); |
| 28348 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 28349 | } |
| 28350 | #endif |
| 28351 | if (likely(v)__builtin_expect(!!(v), 1)) { |
| 28352 | int one = 1; int is_little = (int)*(unsigned char *)&one; |
| 28353 | unsigned char *bytes = (unsigned char *)&val; |
| 28354 | int ret = _PyLong_AsByteArray((PyLongObject *)v, |
| 28355 | bytes, sizeof(val), |
| 28356 | is_little, !is_unsigned); |
| 28357 | Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(v)))); } while (0); |
| 28358 | if (likely(!ret)__builtin_expect(!!(!ret), 1)) |
| 28359 | return val; |
| 28360 | } |
| 28361 | #endif |
| 28362 | return (int64_t) -1; |
| 28363 | } |
| 28364 | } else { |
| 28365 | int64_t val; |
| 28366 | PyObject *tmp = __Pyx_PyNumber_Int(x); |
| 28367 | if (!tmp) return (int64_t) -1; |
| 28368 | val = __Pyx_PyInt_As_int64_t(tmp); |
| 28369 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 28370 | return val; |
| 28371 | } |
| 28372 | raise_overflow: |
| 28373 | PyErr_SetString(PyExc_OverflowError, |
| 28374 | "value too large to convert to int64_t"); |
| 28375 | return (int64_t) -1; |
| 28376 | raise_neg_overflow: |
| 28377 | PyErr_SetString(PyExc_OverflowError, |
| 28378 | "can't convert negative value to int64_t"); |
| 28379 | return (int64_t) -1; |
| 28380 | } |
| 28381 | |
| 28382 | static CYTHON_INLINE__inline__ size_t __Pyx_PyInt_As_size_t(PyObject *x) { |
| 28383 | const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; |
| 28384 | const int is_unsigned = neg_one > const_zero; |
| 28385 | #if PY_MAJOR_VERSION2 < 3 |
| 28386 | if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & (( 1L<<23))) != 0)), 1)) { |
| 28387 | if (sizeof(size_t) < sizeof(long)) { |
| 28388 | __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; } |
| 28389 | } else { |
| 28390 | long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival); |
| 28391 | if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) { |
| 28392 | goto raise_neg_overflow; |
| 28393 | } |
| 28394 | return (size_t) val; |
| 28395 | } |
| 28396 | } else |
| 28397 | #endif |
| 28398 | if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<<24))) != 0)), 1)) { |
| 28399 | if (is_unsigned) { |
| 28400 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 28401 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 28402 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 28403 | case 0: return (size_t) 0; |
| 28404 | 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; } |
| 28405 | case 2: |
| 28406 | if (8 * sizeof(size_t) > 1 * PyLong_SHIFT30) { |
| 28407 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 28408 | __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; } |
| 28409 | } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT30) { |
| 28410 | return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])); |
| 28411 | } |
| 28412 | } |
| 28413 | break; |
| 28414 | case 3: |
| 28415 | if (8 * sizeof(size_t) > 2 * PyLong_SHIFT30) { |
| 28416 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 28417 | __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; } |
| 28418 | } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT30) { |
| 28419 | return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])); |
| 28420 | } |
| 28421 | } |
| 28422 | break; |
| 28423 | case 4: |
| 28424 | if (8 * sizeof(size_t) > 3 * PyLong_SHIFT30) { |
| 28425 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28426 | __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; } |
| 28427 | } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT30) { |
| 28428 | 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])); |
| 28429 | } |
| 28430 | } |
| 28431 | break; |
| 28432 | } |
| 28433 | #endif |
| 28434 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 28435 | if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0) , 0)) { |
| 28436 | goto raise_neg_overflow; |
| 28437 | } |
| 28438 | #else |
| 28439 | { |
| 28440 | int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0); |
| 28441 | if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0)) |
| 28442 | return (size_t) -1; |
| 28443 | if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0)) |
| 28444 | goto raise_neg_overflow; |
| 28445 | } |
| 28446 | #endif |
| 28447 | if (sizeof(size_t) <= sizeof(unsigned long)) { |
| 28448 | __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; } |
| 28449 | } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 28450 | __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; } |
| 28451 | } |
| 28452 | } else { |
| 28453 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 28454 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 28455 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 28456 | case 0: return (size_t) 0; |
| 28457 | 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; } |
| 28458 | 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; } |
| 28459 | case -2: |
| 28460 | if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT30) { |
| 28461 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 28462 | __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; } |
| 28463 | } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT30) { |
| 28464 | return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]))); |
| 28465 | } |
| 28466 | } |
| 28467 | break; |
| 28468 | case 2: |
| 28469 | if (8 * sizeof(size_t) > 1 * PyLong_SHIFT30) { |
| 28470 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 28471 | __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; } |
| 28472 | } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT30) { |
| 28473 | return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]))); |
| 28474 | } |
| 28475 | } |
| 28476 | break; |
| 28477 | case -3: |
| 28478 | if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT30) { |
| 28479 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 28480 | __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; } |
| 28481 | } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT30) { |
| 28482 | return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]))); |
| 28483 | } |
| 28484 | } |
| 28485 | break; |
| 28486 | case 3: |
| 28487 | if (8 * sizeof(size_t) > 2 * PyLong_SHIFT30) { |
| 28488 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 28489 | __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; } |
| 28490 | } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT30) { |
| 28491 | return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]))); |
| 28492 | } |
| 28493 | } |
| 28494 | break; |
| 28495 | case -4: |
| 28496 | if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT30) { |
| 28497 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28498 | __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; } |
| 28499 | } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT30) { |
| 28500 | 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]))); |
| 28501 | } |
| 28502 | } |
| 28503 | break; |
| 28504 | case 4: |
| 28505 | if (8 * sizeof(size_t) > 3 * PyLong_SHIFT30) { |
| 28506 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28507 | __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; } |
| 28508 | } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT30) { |
| 28509 | 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]))); |
| 28510 | } |
| 28511 | } |
| 28512 | break; |
| 28513 | } |
| 28514 | #endif |
| 28515 | if (sizeof(size_t) <= sizeof(long)) { |
| 28516 | __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; } |
| 28517 | } else if (sizeof(size_t) <= sizeof(PY_LONG_LONGlong long)) { |
| 28518 | __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; } |
| 28519 | } |
| 28520 | } |
| 28521 | { |
| 28522 | #if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray) |
| 28523 | PyErr_SetString(PyExc_RuntimeError, |
| 28524 | "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); |
| 28525 | #else |
| 28526 | size_t val; |
| 28527 | PyObject *v = __Pyx_PyNumber_Int(x); |
| 28528 | #if PY_MAJOR_VERSION2 < 3 |
| 28529 | if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<< 24))) != 0)) { |
| 28530 | PyObject *tmp = v; |
| 28531 | v = PyNumber_Long(tmp); |
| 28532 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 28533 | } |
| 28534 | #endif |
| 28535 | if (likely(v)__builtin_expect(!!(v), 1)) { |
| 28536 | int one = 1; int is_little = (int)*(unsigned char *)&one; |
| 28537 | unsigned char *bytes = (unsigned char *)&val; |
| 28538 | int ret = _PyLong_AsByteArray((PyLongObject *)v, |
| 28539 | bytes, sizeof(val), |
| 28540 | is_little, !is_unsigned); |
| 28541 | Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(v)))); } while (0); |
| 28542 | if (likely(!ret)__builtin_expect(!!(!ret), 1)) |
| 28543 | return val; |
| 28544 | } |
| 28545 | #endif |
| 28546 | return (size_t) -1; |
| 28547 | } |
| 28548 | } else { |
| 28549 | size_t val; |
| 28550 | PyObject *tmp = __Pyx_PyNumber_Int(x); |
| 28551 | if (!tmp) return (size_t) -1; |
| 28552 | val = __Pyx_PyInt_As_size_t(tmp); |
| 28553 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 28554 | return val; |
| 28555 | } |
| 28556 | raise_overflow: |
| 28557 | PyErr_SetString(PyExc_OverflowError, |
| 28558 | "value too large to convert to size_t"); |
| 28559 | return (size_t) -1; |
| 28560 | raise_neg_overflow: |
| 28561 | PyErr_SetString(PyExc_OverflowError, |
| 28562 | "can't convert negative value to size_t"); |
| 28563 | return (size_t) -1; |
| 28564 | } |
| 28565 | |
| 28566 | static int |
| 28567 | __pyx_memviewslice_is_contig(const __Pyx_memviewslice *mvs, |
| 28568 | char order, int ndim) |
| 28569 | { |
| 28570 | int i, index, step, start; |
| 28571 | Py_ssize_t itemsize = mvs->memview->view.itemsize; |
| 28572 | if (order == 'F') { |
| 28573 | step = 1; |
| 28574 | start = 0; |
| 28575 | } else { |
| 28576 | step = -1; |
| 28577 | start = ndim - 1; |
| 28578 | } |
| 28579 | for (i = 0; i < ndim; i++) { |
| 28580 | index = start + step * i; |
| 28581 | if (mvs->suboffsets[index] >= 0 || mvs->strides[index] != itemsize) |
| 28582 | return 0; |
| 28583 | itemsize *= mvs->shape[index]; |
| 28584 | } |
| 28585 | return 1; |
| 28586 | } |
| 28587 | |
| 28588 | static void |
| 28589 | __pyx_get_array_memory_extents(__Pyx_memviewslice *slice, |
| 28590 | void **out_start, void **out_end, |
| 28591 | int ndim, size_t itemsize) |
| 28592 | { |
| 28593 | char *start, *end; |
| 28594 | int i; |
| 28595 | start = end = slice->data; |
| 28596 | for (i = 0; i < ndim; i++) { |
| 28597 | Py_ssize_t stride = slice->strides[i]; |
| 28598 | Py_ssize_t extent = slice->shape[i]; |
| 28599 | if (extent == 0) { |
| 28600 | *out_start = *out_end = start; |
| 28601 | return; |
| 28602 | } else { |
| 28603 | if (stride > 0) |
| 28604 | end += stride * (extent - 1); |
| 28605 | else |
| 28606 | start += stride * (extent - 1); |
| 28607 | } |
| 28608 | } |
| 28609 | *out_start = start; |
| 28610 | *out_end = end + itemsize; |
| 28611 | } |
| 28612 | static int |
| 28613 | __pyx_slices_overlap(__Pyx_memviewslice *slice1, |
| 28614 | __Pyx_memviewslice *slice2, |
| 28615 | int ndim, size_t itemsize) |
| 28616 | { |
| 28617 | void *start1, *end1, *start2, *end2; |
| 28618 | __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize); |
| 28619 | __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize); |
| 28620 | return (start1 < end2) && (start2 < end1); |
| 28621 | } |
| 28622 | |
| 28623 | static __Pyx_memviewslice |
| 28624 | __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, |
| 28625 | const char *mode, int ndim, |
| 28626 | size_t sizeof_dtype, int contig_flag, |
| 28627 | int dtype_is_object) |
| 28628 | { |
| 28629 | __Pyx_RefNannyDeclarations |
| 28630 | int i; |
| 28631 | __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } }; |
| 28632 | struct __pyx_memoryview_obj *from_memview = from_mvs->memview; |
| 28633 | Py_buffer *buf = &from_memview->view; |
| 28634 | PyObject *shape_tuple = NULL((void*)0); |
| 28635 | PyObject *temp_int = NULL((void*)0); |
| 28636 | struct __pyx_array_obj *array_obj = NULL((void*)0); |
| 28637 | struct __pyx_memoryview_obj *memview_obj = NULL((void*)0); |
| 28638 | __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0); |
| 28639 | for (i = 0; i < ndim; i++) { |
| 28640 | if (from_mvs->suboffsets[i] >= 0) { |
| 28641 | PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with " |
| 28642 | "indirect dimensions (axis %d)", i); |
| 28643 | goto fail; |
| 28644 | } |
| 28645 | } |
| 28646 | shape_tuple = PyTuple_New(ndim); |
| 28647 | if (unlikely(!shape_tuple)__builtin_expect(!!(!shape_tuple), 0)) { |
| 28648 | goto fail; |
| 28649 | } |
| 28650 | __Pyx_GOTREF(shape_tuple); |
| 28651 | for(i = 0; i < ndim; i++) { |
| 28652 | temp_int = PyInt_FromSsize_t(from_mvs->shape[i]); |
| 28653 | if(unlikely(!temp_int)__builtin_expect(!!(!temp_int), 0)) { |
| 28654 | goto fail; |
| 28655 | } else { |
| 28656 | PyTuple_SET_ITEM(shape_tuple, i, temp_int)(((PyTupleObject *)(shape_tuple))->ob_item[i] = temp_int); |
| 28657 | temp_int = NULL((void*)0); |
| 28658 | } |
| 28659 | } |
| 28660 | array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL((void*)0)); |
| 28661 | if (unlikely(!array_obj)__builtin_expect(!!(!array_obj), 0)) { |
| 28662 | goto fail; |
| 28663 | } |
| 28664 | __Pyx_GOTREF(array_obj); |
| 28665 | memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( |
| 28666 | (PyObject *) array_obj, contig_flag, |
| 28667 | dtype_is_object, |
| 28668 | from_mvs->memview->typeinfo); |
| 28669 | if (unlikely(!memview_obj)__builtin_expect(!!(!memview_obj), 0)) |
| 28670 | goto fail; |
| 28671 | if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0)__builtin_expect(!!(__Pyx_init_memviewslice(memview_obj, ndim , &new_mvs, 1) < 0), 0)) |
| 28672 | goto fail; |
| 28673 | if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,__builtin_expect(!!(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim, dtype_is_object) < 0), 0) |
| 28674 | dtype_is_object) < 0)__builtin_expect(!!(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim, dtype_is_object) < 0), 0)) |
| 28675 | goto fail; |
| 28676 | goto no_fail; |
| 28677 | fail: |
| 28678 | __Pyx_XDECREF(new_mvs.memview)do { if ((new_mvs.memview) == ((void*)0)) ; else do { if ( -- ((PyObject*)(new_mvs.memview))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(new_mvs.memview)))->ob_type)-> tp_dealloc)((PyObject *)((PyObject *)(new_mvs.memview)))); } while (0); } while (0); |
| 28679 | new_mvs.memview = NULL((void*)0); |
| 28680 | new_mvs.data = NULL((void*)0); |
| 28681 | no_fail: |
| 28682 | __Pyx_XDECREF(shape_tuple)do { if ((shape_tuple) == ((void*)0)) ; else do { if ( --((PyObject *)(shape_tuple))->ob_refcnt != 0) ; else ( (*(((PyObject*) ((PyObject *)(shape_tuple)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(shape_tuple)))); } while (0); } while (0); |
| 28683 | __Pyx_XDECREF(temp_int)do { if ((temp_int) == ((void*)0)) ; else do { if ( --((PyObject *)(temp_int))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(temp_int)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(temp_int)))); } while (0); } while (0); |
| 28684 | __Pyx_XDECREF(array_obj)do { if ((array_obj) == ((void*)0)) ; else do { if ( --((PyObject *)(array_obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)(( PyObject *)(array_obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(array_obj)))); } while (0); } while (0); |
| 28685 | __Pyx_RefNannyFinishContext(); |
| 28686 | return new_mvs; |
| 28687 | } |
| 28688 | |
| 28689 | static CYTHON_INLINE__inline__ PyObject * |
| 28690 | __pyx_capsule_create(void *p, CYTHON_UNUSED__attribute__ ((__unused__)) const char *sig) |
| 28691 | { |
| 28692 | PyObject *cobj; |
| 28693 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) >= 0x02070000 |
| 28694 | cobj = PyCapsule_New(p, sig, NULL((void*)0)); |
| 28695 | #else |
| 28696 | cobj = PyCObject_FromVoidPtr(p, NULL((void*)0)); |
| 28697 | #endif |
| 28698 | return cobj; |
| 28699 | } |
| 28700 | |
| 28701 | static CYTHON_INLINE__inline__ char __Pyx_PyInt_As_char(PyObject *x) { |
| 28702 | const char neg_one = (char) -1, const_zero = (char) 0; |
| 28703 | const int is_unsigned = neg_one > const_zero; |
| 28704 | #if PY_MAJOR_VERSION2 < 3 |
| 28705 | if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & (( 1L<<23))) != 0)), 1)) { |
| 28706 | if (sizeof(char) < sizeof(long)) { |
| 28707 | __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof (char) < sizeof(long)) { if (__builtin_expect(!!(value != ( long) (char) value), 0)) { long zero = 0; if (0 && __builtin_expect (!!(value == (long)-1 && PyErr_Occurred()), 0)) return (char) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28708 | } else { |
| 28709 | long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival); |
| 28710 | if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) { |
| 28711 | goto raise_neg_overflow; |
| 28712 | } |
| 28713 | return (char) val; |
| 28714 | } |
| 28715 | } else |
| 28716 | #endif |
| 28717 | if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<<24))) != 0)), 1)) { |
| 28718 | if (is_unsigned) { |
| 28719 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 28720 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 28721 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 28722 | case 0: return (char) 0; |
| 28723 | case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0]){ digit value = digits[0]; if (sizeof(char) < sizeof(digit )) { if (__builtin_expect(!!(value != (digit) (char) value), 0 )) { digit zero = 0; if (0 && __builtin_expect(!!(value == (digit)-1 && PyErr_Occurred()), 0)) return (char) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28724 | case 2: |
| 28725 | if (8 * sizeof(char) > 1 * PyLong_SHIFT30) { |
| 28726 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 28727 | __PYX_VERIFY_RETURN_INT(char, 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(char) < sizeof (unsigned long)) { if (__builtin_expect(!!(value != (unsigned long) (char) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred ()), 0)) return (char) -1; if (is_unsigned && __builtin_expect (!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28728 | } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT30) { |
| 28729 | return (char) (((((char)digits[1]) << PyLong_SHIFT30) | (char)digits[0])); |
| 28730 | } |
| 28731 | } |
| 28732 | break; |
| 28733 | case 3: |
| 28734 | if (8 * sizeof(char) > 2 * PyLong_SHIFT30) { |
| 28735 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 28736 | __PYX_VERIFY_RETURN_INT(char, 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(char) < sizeof(unsigned long)) { if (__builtin_expect(!!(value != (unsigned long) (char) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect (!!(value == (unsigned long)-1 && PyErr_Occurred()), 0 )) return (char) -1; if (is_unsigned && __builtin_expect (!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28737 | } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT30) { |
| 28738 | return (char) (((((((char)digits[2]) << PyLong_SHIFT30) | (char)digits[1]) << PyLong_SHIFT30) | (char)digits[0])); |
| 28739 | } |
| 28740 | } |
| 28741 | break; |
| 28742 | case 4: |
| 28743 | if (8 * sizeof(char) > 3 * PyLong_SHIFT30) { |
| 28744 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28745 | __PYX_VERIFY_RETURN_INT(char, 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 (char) < sizeof(unsigned long)) { if (__builtin_expect(!!( value != (unsigned long) (char) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0)) return (char) -1; if (is_unsigned && __builtin_expect(!!(value < zero) , 0)) goto raise_neg_overflow; else goto raise_overflow; } } return (char) value; } |
| 28746 | } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT30) { |
| 28747 | return (char) (((((((((char)digits[3]) << PyLong_SHIFT30) | (char)digits[2]) << PyLong_SHIFT30) | (char)digits[1]) << PyLong_SHIFT30) | (char)digits[0])); |
| 28748 | } |
| 28749 | } |
| 28750 | break; |
| 28751 | } |
| 28752 | #endif |
| 28753 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 28754 | if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0) , 0)) { |
| 28755 | goto raise_neg_overflow; |
| 28756 | } |
| 28757 | #else |
| 28758 | { |
| 28759 | int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0); |
| 28760 | if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0)) |
| 28761 | return (char) -1; |
| 28762 | if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0)) |
| 28763 | goto raise_neg_overflow; |
| 28764 | } |
| 28765 | #endif |
| 28766 | if (sizeof(char) <= sizeof(unsigned long)) { |
| 28767 | __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof( char) < sizeof(unsigned long)) { if (__builtin_expect(!!(value != (unsigned long) (char) value), 0)) { unsigned long zero = 0; if (1 && __builtin_expect(!!(value == (unsigned long )-1 && PyErr_Occurred()), 0)) return (char) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow ; else goto raise_overflow; } } return (char) value; } |
| 28768 | } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 28769 | __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if (sizeof(char) < sizeof(unsigned long long)) { if (__builtin_expect (!!(value != (unsigned long long) (char) value), 0)) { unsigned long long zero = 0; if (1 && __builtin_expect(!!(value == (unsigned long long)-1 && PyErr_Occurred()), 0)) return (char) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28770 | } |
| 28771 | } else { |
| 28772 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 28773 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 28774 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 28775 | case 0: return (char) 0; |
| 28776 | case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(char) < sizeof (sdigit)) { if (__builtin_expect(!!(value != (sdigit) (char) value ), 0)) { sdigit zero = 0; if (0 && __builtin_expect(! !(value == (sdigit)-1 && PyErr_Occurred()), 0)) return (char) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28777 | case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(char) < sizeof(digit )) { if (__builtin_expect(!!(value != (digit) (char) value), 0 )) { digit zero = 0; if (0 && __builtin_expect(!!(value == (digit)-1 && PyErr_Occurred()), 0)) return (char) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28778 | case -2: |
| 28779 | if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT30) { |
| 28780 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 28781 | __PYX_VERIFY_RETURN_INT(char, 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(char) < sizeof (long)) { if (__builtin_expect(!!(value != (long) (char) value ), 0)) { long zero = 0; if (0 && __builtin_expect(!!( value == (long)-1 && PyErr_Occurred()), 0)) return (char ) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28782 | } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT30) { |
| 28783 | return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT30) | (char)digits[0]))); |
| 28784 | } |
| 28785 | } |
| 28786 | break; |
| 28787 | case 2: |
| 28788 | if (8 * sizeof(char) > 1 * PyLong_SHIFT30) { |
| 28789 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 28790 | __PYX_VERIFY_RETURN_INT(char, 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(char) < sizeof (unsigned long)) { if (__builtin_expect(!!(value != (unsigned long) (char) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred ()), 0)) return (char) -1; if (is_unsigned && __builtin_expect (!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28791 | } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT30) { |
| 28792 | return (char) ((((((char)digits[1]) << PyLong_SHIFT30) | (char)digits[0]))); |
| 28793 | } |
| 28794 | } |
| 28795 | break; |
| 28796 | case -3: |
| 28797 | if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT30) { |
| 28798 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 28799 | __PYX_VERIFY_RETURN_INT(char, 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(char) < sizeof(long)) { if (__builtin_expect (!!(value != (long) (char) value), 0)) { long zero = 0; if (0 && __builtin_expect(!!(value == (long)-1 && PyErr_Occurred ()), 0)) return (char) -1; if (is_unsigned && __builtin_expect (!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28800 | } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT30) { |
| 28801 | return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT30) | (char)digits[1]) << PyLong_SHIFT30) | (char)digits[0]))); |
| 28802 | } |
| 28803 | } |
| 28804 | break; |
| 28805 | case 3: |
| 28806 | if (8 * sizeof(char) > 2 * PyLong_SHIFT30) { |
| 28807 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 28808 | __PYX_VERIFY_RETURN_INT(char, 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(char) < sizeof(unsigned long)) { if (__builtin_expect(!!(value != (unsigned long) (char) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect (!!(value == (unsigned long)-1 && PyErr_Occurred()), 0 )) return (char) -1; if (is_unsigned && __builtin_expect (!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28809 | } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT30) { |
| 28810 | return (char) ((((((((char)digits[2]) << PyLong_SHIFT30) | (char)digits[1]) << PyLong_SHIFT30) | (char)digits[0]))); |
| 28811 | } |
| 28812 | } |
| 28813 | break; |
| 28814 | case -4: |
| 28815 | if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT30) { |
| 28816 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28817 | __PYX_VERIFY_RETURN_INT(char, 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 (char) < sizeof(long)) { if (__builtin_expect(!!(value != ( long) (char) value), 0)) { long zero = 0; if (0 && __builtin_expect (!!(value == (long)-1 && PyErr_Occurred()), 0)) return (char) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28818 | } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT30) { |
| 28819 | return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT30) | (char)digits[2]) << PyLong_SHIFT30) | (char)digits[1]) << PyLong_SHIFT30) | (char)digits[0]))); |
| 28820 | } |
| 28821 | } |
| 28822 | break; |
| 28823 | case 4: |
| 28824 | if (8 * sizeof(char) > 3 * PyLong_SHIFT30) { |
| 28825 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28826 | __PYX_VERIFY_RETURN_INT(char, 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 (char) < sizeof(unsigned long)) { if (__builtin_expect(!!( value != (unsigned long) (char) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0)) return (char) -1; if (is_unsigned && __builtin_expect(!!(value < zero) , 0)) goto raise_neg_overflow; else goto raise_overflow; } } return (char) value; } |
| 28827 | } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT30) { |
| 28828 | return (char) ((((((((((char)digits[3]) << PyLong_SHIFT30) | (char)digits[2]) << PyLong_SHIFT30) | (char)digits[1]) << PyLong_SHIFT30) | (char)digits[0]))); |
| 28829 | } |
| 28830 | } |
| 28831 | break; |
| 28832 | } |
| 28833 | #endif |
| 28834 | if (sizeof(char) <= sizeof(long)) { |
| 28835 | __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(char) < sizeof (long)) { if (__builtin_expect(!!(value != (long) (char) value ), 0)) { long zero = 0; if (1 && __builtin_expect(!!( value == (long)-1 && PyErr_Occurred()), 0)) return (char ) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28836 | } else if (sizeof(char) <= sizeof(PY_LONG_LONGlong long)) { |
| 28837 | __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(char) < sizeof(long long)) { if (__builtin_expect(!!(value != (long long ) (char) value), 0)) { long long zero = 0; if (1 && __builtin_expect (!!(value == (long long)-1 && PyErr_Occurred()), 0)) return (char) -1; if (is_unsigned && __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow ; } } return (char) value; } |
| 28838 | } |
| 28839 | } |
| 28840 | { |
| 28841 | #if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray) |
| 28842 | PyErr_SetString(PyExc_RuntimeError, |
| 28843 | "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); |
| 28844 | #else |
| 28845 | char val; |
| 28846 | PyObject *v = __Pyx_PyNumber_Int(x); |
| 28847 | #if PY_MAJOR_VERSION2 < 3 |
| 28848 | if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<< 24))) != 0)) { |
| 28849 | PyObject *tmp = v; |
| 28850 | v = PyNumber_Long(tmp); |
| 28851 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 28852 | } |
| 28853 | #endif |
| 28854 | if (likely(v)__builtin_expect(!!(v), 1)) { |
| 28855 | int one = 1; int is_little = (int)*(unsigned char *)&one; |
| 28856 | unsigned char *bytes = (unsigned char *)&val; |
| 28857 | int ret = _PyLong_AsByteArray((PyLongObject *)v, |
| 28858 | bytes, sizeof(val), |
| 28859 | is_little, !is_unsigned); |
| 28860 | Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(v)))); } while (0); |
| 28861 | if (likely(!ret)__builtin_expect(!!(!ret), 1)) |
| 28862 | return val; |
| 28863 | } |
| 28864 | #endif |
| 28865 | return (char) -1; |
| 28866 | } |
| 28867 | } else { |
| 28868 | char val; |
| 28869 | PyObject *tmp = __Pyx_PyNumber_Int(x); |
| 28870 | if (!tmp) return (char) -1; |
| 28871 | val = __Pyx_PyInt_As_char(tmp); |
| 28872 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 28873 | return val; |
| 28874 | } |
| 28875 | raise_overflow: |
| 28876 | PyErr_SetString(PyExc_OverflowError, |
| 28877 | "value too large to convert to char"); |
| 28878 | return (char) -1; |
| 28879 | raise_neg_overflow: |
| 28880 | PyErr_SetString(PyExc_OverflowError, |
| 28881 | "can't convert negative value to char"); |
| 28882 | return (char) -1; |
| 28883 | } |
| 28884 | |
| 28885 | static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type) { |
| 28886 | struct __pyx_typeinfo_string result = { {0} }; |
| 28887 | char *buf = (char *) result.string; |
| 28888 | size_t size = type->size; |
| 28889 | switch (type->typegroup) { |
| 28890 | case 'H': |
| 28891 | *buf = 'c'; |
| 28892 | break; |
| 28893 | case 'I': |
| 28894 | case 'U': |
| 28895 | if (size == 1) |
| 28896 | *buf = (type->is_unsigned) ? 'B' : 'b'; |
| 28897 | else if (size == 2) |
| 28898 | *buf = (type->is_unsigned) ? 'H' : 'h'; |
| 28899 | else if (size == 4) |
| 28900 | *buf = (type->is_unsigned) ? 'I' : 'i'; |
| 28901 | else if (size == 8) |
| 28902 | *buf = (type->is_unsigned) ? 'Q' : 'q'; |
| 28903 | break; |
| 28904 | case 'P': |
| 28905 | *buf = 'P'; |
| 28906 | break; |
| 28907 | case 'C': |
| 28908 | { |
| 28909 | __Pyx_TypeInfo complex_type = *type; |
| 28910 | complex_type.typegroup = 'R'; |
| 28911 | complex_type.size /= 2; |
| 28912 | *buf++ = 'Z'; |
| 28913 | *buf = __Pyx_TypeInfoToFormat(&complex_type).string[0]; |
| 28914 | break; |
| 28915 | } |
| 28916 | case 'R': |
| 28917 | if (size == 4) |
| 28918 | *buf = 'f'; |
| 28919 | else if (size == 8) |
| 28920 | *buf = 'd'; |
| 28921 | else |
| 28922 | *buf = 'g'; |
| 28923 | break; |
| 28924 | } |
| 28925 | return result; |
| 28926 | } |
| 28927 | |
| 28928 | static CYTHON_INLINE__inline__ long __Pyx_PyInt_As_long(PyObject *x) { |
| 28929 | const long neg_one = (long) -1, const_zero = (long) 0; |
| 28930 | const int is_unsigned = neg_one > const_zero; |
| 28931 | #if PY_MAJOR_VERSION2 < 3 |
| 28932 | if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & (( 1L<<23))) != 0)), 1)) { |
| 28933 | if (sizeof(long) < sizeof(long)) { |
| 28934 | __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; } |
| 28935 | } else { |
| 28936 | long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival); |
| 28937 | if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) { |
| 28938 | goto raise_neg_overflow; |
| 28939 | } |
| 28940 | return (long) val; |
| 28941 | } |
| 28942 | } else |
| 28943 | #endif |
| 28944 | if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<<24))) != 0)), 1)) { |
| 28945 | if (is_unsigned) { |
| 28946 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 28947 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 28948 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 28949 | case 0: return (long) 0; |
| 28950 | 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; } |
| 28951 | case 2: |
| 28952 | if (8 * sizeof(long) > 1 * PyLong_SHIFT30) { |
| 28953 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 28954 | __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; } |
| 28955 | } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT30) { |
| 28956 | return (long) (((((long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])); |
| 28957 | } |
| 28958 | } |
| 28959 | break; |
| 28960 | case 3: |
| 28961 | if (8 * sizeof(long) > 2 * PyLong_SHIFT30) { |
| 28962 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 28963 | __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; } |
| 28964 | } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT30) { |
| 28965 | return (long) (((((((long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])); |
| 28966 | } |
| 28967 | } |
| 28968 | break; |
| 28969 | case 4: |
| 28970 | if (8 * sizeof(long) > 3 * PyLong_SHIFT30) { |
| 28971 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 28972 | __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; } |
| 28973 | } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT30) { |
| 28974 | return (long) (((((((((long)digits[3]) << PyLong_SHIFT30) | (long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])); |
| 28975 | } |
| 28976 | } |
| 28977 | break; |
| 28978 | } |
| 28979 | #endif |
| 28980 | #if CYTHON_COMPILING_IN_CPYTHON1 |
| 28981 | if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0) , 0)) { |
| 28982 | goto raise_neg_overflow; |
| 28983 | } |
| 28984 | #else |
| 28985 | { |
| 28986 | int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0); |
| 28987 | if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0)) |
| 28988 | return (long) -1; |
| 28989 | if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0)) |
| 28990 | goto raise_neg_overflow; |
| 28991 | } |
| 28992 | #endif |
| 28993 | if (sizeof(long) <= sizeof(unsigned long)) { |
| 28994 | __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; } |
| 28995 | } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONGlong long)) { |
| 28996 | __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; } |
| 28997 | } |
| 28998 | } else { |
| 28999 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 29000 | const digit* digits = ((PyLongObject*)x)->ob_digit; |
| 29001 | switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) { |
| 29002 | case 0: return (long) 0; |
| 29003 | 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; } |
| 29004 | 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; } |
| 29005 | case -2: |
| 29006 | if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT30) { |
| 29007 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 29008 | __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; } |
| 29009 | } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT30) { |
| 29010 | return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]))); |
| 29011 | } |
| 29012 | } |
| 29013 | break; |
| 29014 | case 2: |
| 29015 | if (8 * sizeof(long) > 1 * PyLong_SHIFT30) { |
| 29016 | if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) { |
| 29017 | __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; } |
| 29018 | } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT30) { |
| 29019 | return (long) ((((((long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]))); |
| 29020 | } |
| 29021 | } |
| 29022 | break; |
| 29023 | case -3: |
| 29024 | if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT30) { |
| 29025 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 29026 | __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; } |
| 29027 | } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT30) { |
| 29028 | return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]))); |
| 29029 | } |
| 29030 | } |
| 29031 | break; |
| 29032 | case 3: |
| 29033 | if (8 * sizeof(long) > 2 * PyLong_SHIFT30) { |
| 29034 | if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) { |
| 29035 | __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; } |
| 29036 | } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT30) { |
| 29037 | return (long) ((((((((long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]))); |
| 29038 | } |
| 29039 | } |
| 29040 | break; |
| 29041 | case -4: |
| 29042 | if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT30) { |
| 29043 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 29044 | __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; } |
| 29045 | } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT30) { |
| 29046 | return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT30) | (long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]))); |
| 29047 | } |
| 29048 | } |
| 29049 | break; |
| 29050 | case 4: |
| 29051 | if (8 * sizeof(long) > 3 * PyLong_SHIFT30) { |
| 29052 | if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) { |
| 29053 | __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; } |
| 29054 | } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT30) { |
| 29055 | return (long) ((((((((((long)digits[3]) << PyLong_SHIFT30) | (long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]))); |
| 29056 | } |
| 29057 | } |
| 29058 | break; |
| 29059 | } |
| 29060 | #endif |
| 29061 | if (sizeof(long) <= sizeof(long)) { |
| 29062 | __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; } |
| 29063 | } else if (sizeof(long) <= sizeof(PY_LONG_LONGlong long)) { |
| 29064 | __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; } |
| 29065 | } |
| 29066 | } |
| 29067 | { |
| 29068 | #if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray) |
| 29069 | PyErr_SetString(PyExc_RuntimeError, |
| 29070 | "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); |
| 29071 | #else |
| 29072 | long val; |
| 29073 | PyObject *v = __Pyx_PyNumber_Int(x); |
| 29074 | #if PY_MAJOR_VERSION2 < 3 |
| 29075 | if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<< 24))) != 0)) { |
| 29076 | PyObject *tmp = v; |
| 29077 | v = PyNumber_Long(tmp); |
| 29078 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 29079 | } |
| 29080 | #endif |
| 29081 | if (likely(v)__builtin_expect(!!(v), 1)) { |
| 29082 | int one = 1; int is_little = (int)*(unsigned char *)&one; |
| 29083 | unsigned char *bytes = (unsigned char *)&val; |
| 29084 | int ret = _PyLong_AsByteArray((PyLongObject *)v, |
| 29085 | bytes, sizeof(val), |
| 29086 | is_little, !is_unsigned); |
| 29087 | Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(v)))); } while (0); |
| 29088 | if (likely(!ret)__builtin_expect(!!(!ret), 1)) |
| 29089 | return val; |
| 29090 | } |
| 29091 | #endif |
| 29092 | return (long) -1; |
| 29093 | } |
| 29094 | } else { |
| 29095 | long val; |
| 29096 | PyObject *tmp = __Pyx_PyNumber_Int(x); |
| 29097 | if (!tmp) return (long) -1; |
| 29098 | val = __Pyx_PyInt_As_long(tmp); |
| 29099 | Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(tmp)))); } while (0); |
| 29100 | return val; |
| 29101 | } |
| 29102 | raise_overflow: |
| 29103 | PyErr_SetString(PyExc_OverflowError, |
| 29104 | "value too large to convert to long"); |
| 29105 | return (long) -1; |
| 29106 | raise_neg_overflow: |
| 29107 | PyErr_SetString(PyExc_OverflowError, |
| 29108 | "can't convert negative value to long"); |
| 29109 | return (long) -1; |
| 29110 | } |
| 29111 | |
| 29112 | static int |
| 29113 | __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b) |
| 29114 | { |
| 29115 | int i; |
| 29116 | if (!a || !b) |
| 29117 | return 0; |
| 29118 | if (a == b) |
| 29119 | return 1; |
| 29120 | if (a->size != b->size || a->typegroup != b->typegroup || |
| 29121 | a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) { |
| 29122 | if (a->typegroup == 'H' || b->typegroup == 'H') { |
| 29123 | return a->size == b->size; |
| 29124 | } else { |
| 29125 | return 0; |
| 29126 | } |
| 29127 | } |
| 29128 | if (a->ndim) { |
| 29129 | for (i = 0; i < a->ndim; i++) |
| 29130 | if (a->arraysize[i] != b->arraysize[i]) |
| 29131 | return 0; |
| 29132 | } |
| 29133 | if (a->typegroup == 'S') { |
| 29134 | if (a->flags != b->flags) |
| 29135 | return 0; |
| 29136 | if (a->fields || b->fields) { |
| 29137 | if (!(a->fields && b->fields)) |
| 29138 | return 0; |
| 29139 | for (i = 0; a->fields[i].type && b->fields[i].type; i++) { |
| 29140 | __Pyx_StructField *field_a = a->fields + i; |
| 29141 | __Pyx_StructField *field_b = b->fields + i; |
| 29142 | if (field_a->offset != field_b->offset || |
| 29143 | !__pyx_typeinfo_cmp(field_a->type, field_b->type)) |
| 29144 | return 0; |
| 29145 | } |
| 29146 | return !a->fields[i].type && !b->fields[i].type; |
| 29147 | } |
| 29148 | } |
| 29149 | return 1; |
| 29150 | } |
| 29151 | |
| 29152 | static int |
| 29153 | __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) |
| 29154 | { |
| 29155 | if (buf->shape[dim] <= 1) |
| 29156 | return 1; |
| 29157 | if (buf->strides) { |
| 29158 | if (spec & __Pyx_MEMVIEW_CONTIG8) { |
| 29159 | if (spec & (__Pyx_MEMVIEW_PTR2|__Pyx_MEMVIEW_FULL4)) { |
| 29160 | if (buf->strides[dim] != sizeof(void *)) { |
| 29161 | PyErr_Format(PyExc_ValueError, |
| 29162 | "Buffer is not indirectly contiguous " |
| 29163 | "in dimension %d.", dim); |
| 29164 | goto fail; |
| 29165 | } |
| 29166 | } else if (buf->strides[dim] != buf->itemsize) { |
| 29167 | PyErr_SetString(PyExc_ValueError, |
| 29168 | "Buffer and memoryview are not contiguous " |
| 29169 | "in the same dimension."); |
| 29170 | goto fail; |
| 29171 | } |
| 29172 | } |
| 29173 | if (spec & __Pyx_MEMVIEW_FOLLOW32) { |
| 29174 | Py_ssize_t stride = buf->strides[dim]; |
| 29175 | if (stride < 0) |
| 29176 | stride = -stride; |
| 29177 | if (stride < buf->itemsize) { |
| 29178 | PyErr_SetString(PyExc_ValueError, |
| 29179 | "Buffer and memoryview are not contiguous " |
| 29180 | "in the same dimension."); |
| 29181 | goto fail; |
| 29182 | } |
| 29183 | } |
| 29184 | } else { |
| 29185 | if (spec & __Pyx_MEMVIEW_CONTIG8 && dim != ndim - 1) { |
| 29186 | PyErr_Format(PyExc_ValueError, |
| 29187 | "C-contiguous buffer is not contiguous in " |
| 29188 | "dimension %d", dim); |
| 29189 | goto fail; |
| 29190 | } else if (spec & (__Pyx_MEMVIEW_PTR2)) { |
| 29191 | PyErr_Format(PyExc_ValueError, |
| 29192 | "C-contiguous buffer is not indirect in " |
| 29193 | "dimension %d", dim); |
| 29194 | goto fail; |
| 29195 | } else if (buf->suboffsets) { |
| 29196 | PyErr_SetString(PyExc_ValueError, |
| 29197 | "Buffer exposes suboffsets but no strides"); |
| 29198 | goto fail; |
| 29199 | } |
| 29200 | } |
| 29201 | return 1; |
| 29202 | fail: |
| 29203 | return 0; |
| 29204 | } |
| 29205 | static int |
| 29206 | __pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED__attribute__ ((__unused__)) int ndim, int spec) |
| 29207 | { |
| 29208 | if (spec & __Pyx_MEMVIEW_DIRECT1) { |
| 29209 | if (buf->suboffsets && buf->suboffsets[dim] >= 0) { |
| 29210 | PyErr_Format(PyExc_ValueError, |
| 29211 | "Buffer not compatible with direct access " |
| 29212 | "in dimension %d.", dim); |
| 29213 | goto fail; |
| 29214 | } |
| 29215 | } |
| 29216 | if (spec & __Pyx_MEMVIEW_PTR2) { |
| 29217 | if (!buf->suboffsets || (buf->suboffsets && buf->suboffsets[dim] < 0)) { |
| 29218 | PyErr_Format(PyExc_ValueError, |
| 29219 | "Buffer is not indirectly accessible " |
| 29220 | "in dimension %d.", dim); |
| 29221 | goto fail; |
| 29222 | } |
| 29223 | } |
| 29224 | return 1; |
| 29225 | fail: |
| 29226 | return 0; |
| 29227 | } |
| 29228 | static int |
| 29229 | __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) |
| 29230 | { |
| 29231 | int i; |
| 29232 | if (c_or_f_flag & __Pyx_IS_F_CONTIG2) { |
| 29233 | Py_ssize_t stride = 1; |
| 29234 | for (i = 0; i < ndim; i++) { |
| 29235 | if (stride * buf->itemsize != buf->strides[i] && |
| 29236 | buf->shape[i] > 1) |
| 29237 | { |
| 29238 | PyErr_SetString(PyExc_ValueError, |
| 29239 | "Buffer not fortran contiguous."); |
| 29240 | goto fail; |
| 29241 | } |
| 29242 | stride = stride * buf->shape[i]; |
| 29243 | } |
| 29244 | } else if (c_or_f_flag & __Pyx_IS_C_CONTIG1) { |
| 29245 | Py_ssize_t stride = 1; |
| 29246 | for (i = ndim - 1; i >- 1; i--) { |
| 29247 | if (stride * buf->itemsize != buf->strides[i] && |
| 29248 | buf->shape[i] > 1) { |
| 29249 | PyErr_SetString(PyExc_ValueError, |
| 29250 | "Buffer not C contiguous."); |
| 29251 | goto fail; |
| 29252 | } |
| 29253 | stride = stride * buf->shape[i]; |
| 29254 | } |
| 29255 | } |
| 29256 | return 1; |
| 29257 | fail: |
| 29258 | return 0; |
| 29259 | } |
| 29260 | static int __Pyx_ValidateAndInit_memviewslice( |
| 29261 | int *axes_specs, |
| 29262 | int c_or_f_flag, |
| 29263 | int buf_flags, |
| 29264 | int ndim, |
| 29265 | __Pyx_TypeInfo *dtype, |
| 29266 | __Pyx_BufFmt_StackElem stack[], |
| 29267 | __Pyx_memviewslice *memviewslice, |
| 29268 | PyObject *original_obj) |
| 29269 | { |
| 29270 | struct __pyx_memoryview_obj *memview, *new_memview; |
| 29271 | __Pyx_RefNannyDeclarations |
| 29272 | Py_buffer *buf; |
| 29273 | int i, spec = 0, retval = -1; |
| 29274 | __Pyx_BufFmt_Context ctx; |
| 29275 | int from_memoryview = __pyx_memoryview_check(original_obj); |
| 29276 | __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0); |
| 29277 | if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *) |
| 29278 | original_obj)->typeinfo)) { |
| 29279 | memview = (struct __pyx_memoryview_obj *) original_obj; |
| 29280 | new_memview = NULL((void*)0); |
| 29281 | } else { |
| 29282 | memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( |
| 29283 | original_obj, buf_flags, 0, dtype); |
| 29284 | new_memview = memview; |
| 29285 | if (unlikely(!memview)__builtin_expect(!!(!memview), 0)) |
| 29286 | goto fail; |
| 29287 | } |
| 29288 | buf = &memview->view; |
| 29289 | if (buf->ndim != ndim) { |
| 29290 | PyErr_Format(PyExc_ValueError, |
| 29291 | "Buffer has wrong number of dimensions (expected %d, got %d)", |
| 29292 | ndim, buf->ndim); |
| 29293 | goto fail; |
| 29294 | } |
| 29295 | if (new_memview) { |
| 29296 | __Pyx_BufFmt_Init(&ctx, stack, dtype); |
| 29297 | if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; |
| 29298 | } |
| 29299 | if ((unsigned) buf->itemsize != dtype->size) { |
| 29300 | PyErr_Format(PyExc_ValueError, |
| 29301 | "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T"z" "u byte%s) " |
| 29302 | "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T"z" "u byte%s)", |
| 29303 | buf->itemsize, |
| 29304 | (buf->itemsize > 1) ? "s" : "", |
| 29305 | dtype->name, |
| 29306 | dtype->size, |
| 29307 | (dtype->size > 1) ? "s" : ""); |
| 29308 | goto fail; |
| 29309 | } |
| 29310 | for (i = 0; i < ndim; i++) { |
| 29311 | spec = axes_specs[i]; |
| 29312 | if (!__pyx_check_strides(buf, i, ndim, spec)) |
| 29313 | goto fail; |
| 29314 | if (!__pyx_check_suboffsets(buf, i, ndim, spec)) |
| 29315 | goto fail; |
| 29316 | } |
| 29317 | if (buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)) |
| 29318 | goto fail; |
| 29319 | if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,__builtin_expect(!!(__Pyx_init_memviewslice(memview, ndim, memviewslice , new_memview != ((void*)0)) == -1), 0) |
| 29320 | new_memview != NULL) == -1)__builtin_expect(!!(__Pyx_init_memviewslice(memview, ndim, memviewslice , new_memview != ((void*)0)) == -1), 0)) { |
| 29321 | goto fail; |
| 29322 | } |
| 29323 | retval = 0; |
| 29324 | goto no_fail; |
| 29325 | fail: |
| 29326 | Py_XDECREF(new_memview)do { if ((new_memview) == ((void*)0)) ; else do { if ( --((PyObject *)(new_memview))->ob_refcnt != 0) ; else ( (*(((PyObject*) ((PyObject *)(new_memview)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(new_memview)))); } while (0); } while (0); |
| 29327 | retval = -1; |
| 29328 | no_fail: |
| 29329 | __Pyx_RefNannyFinishContext(); |
| 29330 | return retval; |
| 29331 | } |
| 29332 | |
| 29333 | static CYTHON_INLINE__inline__ __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint64_t(PyObject *obj) { |
| 29334 | __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; |
| 29335 | __Pyx_BufFmt_StackElem stack[1]; |
| 29336 | int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT1 | __Pyx_MEMVIEW_STRIDED16) }; |
| 29337 | int retcode; |
| 29338 | if (obj == Py_None(&_Py_NoneStruct)) { |
| 29339 | result.memview = (struct __pyx_memoryview_obj *) Py_None(&_Py_NoneStruct); |
| 29340 | return result; |
| 29341 | } |
| 29342 | retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0, |
| 29343 | PyBUF_RECORDS((0x0010 | 0x0008) | 0x0001 | 0x0004), 1, |
| 29344 | &__Pyx_TypeInfo_nn_uint64_t, stack, |
| 29345 | &result, obj); |
| 29346 | if (unlikely(retcode == -1)__builtin_expect(!!(retcode == -1), 0)) |
| 29347 | goto __pyx_fail; |
| 29348 | return result; |
| 29349 | __pyx_fail: |
| 29350 | result.memview = NULL((void*)0); |
| 29351 | result.data = NULL((void*)0); |
| 29352 | return result; |
| 29353 | } |
| 29354 | |
| 29355 | static int __Pyx_check_binary_version(void) { |
| 29356 | char ctversion[4], rtversion[4]; |
| 29357 | PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION2, PY_MINOR_VERSION7); |
| 29358 | PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); |
| 29359 | if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { |
| 29360 | char message[200]; |
| 29361 | PyOS_snprintf(message, sizeof(message), |
| 29362 | "compiletime version %s of module '%.100s' " |
| 29363 | "does not match runtime version %s", |
| 29364 | ctversion, __Pyx_MODULE_NAME"rgw", rtversion); |
| 29365 | return PyErr_WarnEx(NULL((void*)0), message, 1); |
| 29366 | } |
| 29367 | return 0; |
| 29368 | } |
| 29369 | |
| 29370 | #ifndef __PYX_HAVE_RT_ImportModule |
| 29371 | #define __PYX_HAVE_RT_ImportModule |
| 29372 | static PyObject *__Pyx_ImportModule(const char *name) { |
| 29373 | PyObject *py_name = 0; |
| 29374 | PyObject *py_module = 0; |
| 29375 | py_name = __Pyx_PyIdentifier_FromString(name)PyString_FromString(name); |
| 29376 | if (!py_name) |
| 29377 | goto bad; |
| 29378 | py_module = PyImport_Import(py_name); |
| 29379 | 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); |
| 29380 | return py_module; |
| 29381 | bad: |
| 29382 | 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); |
| 29383 | return 0; |
| 29384 | } |
| 29385 | #endif |
| 29386 | |
| 29387 | #ifndef __PYX_HAVE_RT_ImportType |
| 29388 | #define __PYX_HAVE_RT_ImportType |
| 29389 | static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, |
| 29390 | size_t size, int strict) |
| 29391 | { |
| 29392 | PyObject *py_module = 0; |
| 29393 | PyObject *result = 0; |
| 29394 | PyObject *py_name = 0; |
| 29395 | char warning[200]; |
| 29396 | Py_ssize_t basicsize; |
| 29397 | #ifdef Py_LIMITED_API |
| 29398 | PyObject *py_basicsize; |
| 29399 | #endif |
| 29400 | py_module = __Pyx_ImportModule(module_name); |
| 29401 | if (!py_module) |
| 29402 | goto bad; |
| 29403 | py_name = __Pyx_PyIdentifier_FromString(class_name)PyString_FromString(class_name); |
| 29404 | if (!py_name) |
| 29405 | goto bad; |
| 29406 | result = PyObject_GetAttr(py_module, py_name); |
| 29407 | 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); |
| 29408 | py_name = 0; |
| 29409 | 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); |
| 29410 | py_module = 0; |
| 29411 | if (!result) |
| 29412 | goto bad; |
| 29413 | if (!PyType_Check(result)((((((PyObject*)(result))->ob_type))->tp_flags & (( 1L<<31))) != 0)) { |
| 29414 | PyErr_Format(PyExc_TypeError, |
| 29415 | "%.200s.%.200s is not a type object", |
| 29416 | module_name, class_name); |
| 29417 | goto bad; |
| 29418 | } |
| 29419 | #ifndef Py_LIMITED_API |
| 29420 | basicsize = ((PyTypeObject *)result)->tp_basicsize; |
| 29421 | #else |
| 29422 | py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); |
| 29423 | if (!py_basicsize) |
| 29424 | goto bad; |
| 29425 | basicsize = PyLong_AsSsize_t(py_basicsize); |
| 29426 | 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); |
| 29427 | py_basicsize = 0; |
| 29428 | if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) |
| 29429 | goto bad; |
| 29430 | #endif |
| 29431 | if (!strict && (size_t)basicsize > size) { |
| 29432 | PyOS_snprintf(warning, sizeof(warning), |
| 29433 | "%s.%s size changed, may indicate binary incompatibility", |
| 29434 | module_name, class_name); |
| 29435 | if (PyErr_WarnEx(NULL((void*)0), warning, 0) < 0) goto bad; |
| 29436 | } |
| 29437 | else if ((size_t)basicsize != size) { |
| 29438 | PyErr_Format(PyExc_ValueError, |
| 29439 | "%.200s.%.200s has the wrong size, try recompiling", |
| 29440 | module_name, class_name); |
| 29441 | goto bad; |
| 29442 | } |
| 29443 | return (PyTypeObject *)result; |
| 29444 | bad: |
| 29445 | 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); |
| 29446 | 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); |
| 29447 | return NULL((void*)0); |
| 29448 | } |
| 29449 | #endif |
| 29450 | |
| 29451 | static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { |
| 29452 | while (t->p) { |
| 29453 | #if PY_MAJOR_VERSION2 < 3 |
| 29454 | if (t->is_unicode) { |
| 29455 | *t->p = PyUnicode_DecodeUTF8PyUnicodeUCS4_DecodeUTF8(t->s, t->n - 1, NULL((void*)0)); |
| 29456 | } else if (t->intern) { |
| 29457 | *t->p = PyString_InternFromString(t->s); |
| 29458 | } else { |
| 29459 | *t->p = PyString_FromStringAndSize(t->s, t->n - 1); |
| 29460 | } |
| 29461 | #else |
| 29462 | if (t->is_unicode | t->is_str) { |
| 29463 | if (t->intern) { |
| 29464 | *t->p = PyUnicode_InternFromString(t->s); |
| 29465 | } else if (t->encoding) { |
| 29466 | *t->p = PyUnicode_DecodePyUnicodeUCS4_Decode(t->s, t->n - 1, t->encoding, NULL((void*)0)); |
| 29467 | } else { |
| 29468 | *t->p = PyUnicode_FromStringAndSizePyUnicodeUCS4_FromStringAndSize(t->s, t->n - 1); |
| 29469 | } |
| 29470 | } else { |
| 29471 | *t->p = PyBytes_FromStringAndSizePyString_FromStringAndSize(t->s, t->n - 1); |
| 29472 | } |
| 29473 | #endif |
| 29474 | if (!*t->p) |
| 29475 | return -1; |
| 29476 | ++t; |
| 29477 | } |
| 29478 | return 0; |
| 29479 | } |
| 29480 | |
| 29481 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { |
| 29482 | return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str))PyUnicodeUCS4_Decode(c_str, (Py_ssize_t)strlen(c_str), "", (( void*)0)); |
| 29483 | } |
| 29484 | static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsString(PyObject* o) { |
| 29485 | Py_ssize_t ignore; |
| 29486 | return __Pyx_PyObject_AsStringAndSize(o, &ignore); |
| 29487 | } |
| 29488 | static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { |
| 29489 | #if CYTHON_COMPILING_IN_CPYTHON1 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0) |
| 29490 | if ( |
| 29491 | #if PY_MAJOR_VERSION2 < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 |
| 29492 | __Pyx_sys_getdefaultencoding_not_ascii && |
| 29493 | #endif |
| 29494 | PyUnicode_Check(o)((((((PyObject*)(o))->ob_type))->tp_flags & ((1L<< 28))) != 0)) { |
| 29495 | #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF << 4) | (0 << 0)) < 0x03030000 |
| 29496 | char* defenc_c; |
| 29497 | PyObject* defenc = _PyUnicode_AsDefaultEncodedString_PyUnicodeUCS4_AsDefaultEncodedString(o, NULL((void*)0)); |
| 29498 | if (!defenc) return NULL((void*)0); |
| 29499 | defenc_c = PyBytes_AS_STRING(defenc)(((PyStringObject *)(defenc))->ob_sval); |
| 29500 | #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 |
| 29501 | { |
| 29502 | char* end = defenc_c + PyBytes_GET_SIZE(defenc)(((PyVarObject*)(defenc))->ob_size); |
| 29503 | char* c; |
| 29504 | for (c = defenc_c; c < end; c++) { |
| 29505 | if ((unsigned char) (*c) >= 128) { |
| 29506 | PyUnicode_AsASCIIStringPyUnicodeUCS4_AsASCIIString(o); |
| 29507 | return NULL((void*)0); |
| 29508 | } |
| 29509 | } |
| 29510 | } |
| 29511 | #endif |
| 29512 | *length = PyBytes_GET_SIZE(defenc)(((PyVarObject*)(defenc))->ob_size); |
| 29513 | return defenc_c; |
| 29514 | #else |
| 29515 | if (__Pyx_PyUnicode_READY(o)(0) == -1) return NULL((void*)0); |
| 29516 | #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 |
| 29517 | if (PyUnicode_IS_ASCII(o)) { |
| 29518 | *length = PyUnicode_GET_LENGTH(o); |
| 29519 | return PyUnicode_AsUTF8(o); |
| 29520 | } else { |
| 29521 | PyUnicode_AsASCIIStringPyUnicodeUCS4_AsASCIIString(o); |
| 29522 | return NULL((void*)0); |
| 29523 | } |
| 29524 | #else |
| 29525 | return PyUnicode_AsUTF8AndSize(o, length); |
| 29526 | #endif |
| 29527 | #endif |
| 29528 | } else |
| 29529 | #endif |
| 29530 | #if (!CYTHON_COMPILING_IN_PYPY0) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) |
| 29531 | if (PyByteArray_Check(o)((((PyObject*)(o))->ob_type) == (&PyByteArray_Type) || PyType_IsSubtype((((PyObject*)(o))->ob_type), (&PyByteArray_Type )))) { |
| 29532 | *length = PyByteArray_GET_SIZE(o)(((void) (0)),(((PyVarObject*)(o))->ob_size)); |
| 29533 | return PyByteArray_AS_STRING(o)(((void) (0)), (((PyVarObject*)(o))->ob_size) ? ((PyByteArrayObject *)(o))->ob_bytes : _PyByteArray_empty_string); |
| 29534 | } else |
| 29535 | #endif |
| 29536 | { |
| 29537 | char* result; |
| 29538 | int r = PyBytes_AsStringAndSizePyString_AsStringAndSize(o, &result, length); |
| 29539 | if (unlikely(r < 0)__builtin_expect(!!(r < 0), 0)) { |
| 29540 | return NULL((void*)0); |
| 29541 | } else { |
| 29542 | return result; |
| 29543 | } |
| 29544 | } |
| 29545 | } |
| 29546 | static CYTHON_INLINE__inline__ int __Pyx_PyObject_IsTrue(PyObject* x) { |
| 29547 | int is_true = x == Py_True((PyObject *) &_Py_TrueStruct); |
| 29548 | if (is_true | (x == Py_False((PyObject *) &_Py_ZeroStruct)) | (x == Py_None(&_Py_NoneStruct))) return is_true; |
| 29549 | else return PyObject_IsTrue(x); |
| 29550 | } |
| 29551 | static CYTHON_INLINE__inline__ PyObject* __Pyx_PyNumber_Int(PyObject* x) { |
| 29552 | PyNumberMethods *m; |
| 29553 | const char *name = NULL((void*)0); |
| 29554 | PyObject *res = NULL((void*)0); |
| 29555 | #if PY_MAJOR_VERSION2 < 3 |
| 29556 | if (PyInt_Check(x)((((x)->ob_type)->tp_flags & ((1L<<23))) != 0 ) || PyLong_Check(x)((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<< 24))) != 0)) |
| 29557 | #else |
| 29558 | if (PyLong_Check(x)((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<< 24))) != 0)) |
| 29559 | #endif |
| 29560 | return __Pyx_NewRef(x)(( ((PyObject*)(x))->ob_refcnt++), x); |
| 29561 | m = Py_TYPE(x)(((PyObject*)(x))->ob_type)->tp_as_number; |
| 29562 | #if PY_MAJOR_VERSION2 < 3 |
| 29563 | if (m && m->nb_int) { |
| 29564 | name = "int"; |
| 29565 | res = PyNumber_Int(x); |
| 29566 | } |
| 29567 | else if (m && m->nb_long) { |
| 29568 | name = "long"; |
| 29569 | res = PyNumber_Long(x); |
| 29570 | } |
| 29571 | #else |
| 29572 | if (m && m->nb_int) { |
| 29573 | name = "int"; |
| 29574 | res = PyNumber_Long(x); |
| 29575 | } |
| 29576 | #endif |
| 29577 | if (res) { |
| 29578 | #if PY_MAJOR_VERSION2 < 3 |
| 29579 | if (!PyInt_Check(res)((((res)->ob_type)->tp_flags & ((1L<<23))) != 0) && !PyLong_Check(res)((((((PyObject*)(res))->ob_type))->tp_flags & ((1L<< 24))) != 0)) { |
| 29580 | #else |
| 29581 | if (!PyLong_Check(res)((((((PyObject*)(res))->ob_type))->tp_flags & ((1L<< 24))) != 0)) { |
| 29582 | #endif |
| 29583 | PyErr_Format(PyExc_TypeError, |
| 29584 | "__%.4s__ returned non-%.4s (type %.200s)", |
| 29585 | name, name, Py_TYPE(res)(((PyObject*)(res))->ob_type)->tp_name); |
| 29586 | Py_DECREF(res)do { if ( --((PyObject*)(res))->ob_refcnt != 0) ; else ( ( *(((PyObject*)((PyObject *)(res)))->ob_type)->tp_dealloc )((PyObject *)((PyObject *)(res)))); } while (0); |
| 29587 | return NULL((void*)0); |
| 29588 | } |
| 29589 | } |
| 29590 | else if (!PyErr_Occurred()) { |
| 29591 | PyErr_SetString(PyExc_TypeError, |
| 29592 | "an integer is required"); |
| 29593 | } |
| 29594 | return res; |
| 29595 | } |
| 29596 | static CYTHON_INLINE__inline__ Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { |
| 29597 | Py_ssize_t ival; |
| 29598 | PyObject *x; |
| 29599 | #if PY_MAJOR_VERSION2 < 3 |
| 29600 | if (likely(PyInt_CheckExact(b))__builtin_expect(!!(((b)->ob_type == &PyInt_Type)), 1)) { |
| 29601 | if (sizeof(Py_ssize_t) >= sizeof(long)) |
| 29602 | return PyInt_AS_LONG(b)(((PyIntObject *)(b))->ob_ival); |
| 29603 | else |
| 29604 | return PyInt_AsSsize_t(x); |
| 29605 | } |
| 29606 | #endif |
| 29607 | if (likely(PyLong_CheckExact(b))__builtin_expect(!!(((((PyObject*)(b))->ob_type) == &PyLong_Type )), 1)) { |
| 29608 | #if CYTHON_USE_PYLONG_INTERNALS1 |
| 29609 | const digit* digits = ((PyLongObject*)b)->ob_digit; |
| 29610 | const Py_ssize_t size = Py_SIZE(b)(((PyVarObject*)(b))->ob_size); |
| 29611 | if (likely(__Pyx_sst_abs(size) <= 1)__builtin_expect(!!(labs(size) <= 1), 1)) { |
| 29612 | ival = likely(size)__builtin_expect(!!(size), 1) ? digits[0] : 0; |
| 29613 | if (size == -1) ival = -ival; |
| 29614 | return ival; |
| 29615 | } else { |
| 29616 | switch (size) { |
| 29617 | case 2: |
| 29618 | if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT30) { |
| 29619 | return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])); |
| 29620 | } |
| 29621 | break; |
| 29622 | case -2: |
| 29623 | if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT30) { |
| 29624 | return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])); |
| 29625 | } |
| 29626 | break; |
| 29627 | case 3: |
| 29628 | if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT30) { |
| 29629 | return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])); |
| 29630 | } |
| 29631 | break; |
| 29632 | case -3: |
| 29633 | if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT30) { |
| 29634 | return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])); |
| 29635 | } |
| 29636 | break; |
| 29637 | case 4: |
| 29638 | if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT30) { |
| 29639 | 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])); |
| 29640 | } |
| 29641 | break; |
| 29642 | case -4: |
| 29643 | if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT30) { |
| 29644 | 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])); |
| 29645 | } |
| 29646 | break; |
| 29647 | } |
| 29648 | } |
| 29649 | #endif |
| 29650 | return PyLong_AsSsize_t(b); |
| 29651 | } |
| 29652 | x = PyNumber_Index(b); |
| 29653 | if (!x) return -1; |
| 29654 | ival = PyInt_AsSsize_t(x); |
| 29655 | Py_DECREF(x)do { if ( --((PyObject*)(x))->ob_refcnt != 0) ; else ( (*( ((PyObject*)((PyObject *)(x)))->ob_type)->tp_dealloc)(( PyObject *)((PyObject *)(x)))); } while (0); |
| 29656 | return ival; |
| 29657 | } |
| 29658 | static CYTHON_INLINE__inline__ PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { |
| 29659 | return PyInt_FromSize_t(ival); |
| 29660 | } |
| 29661 | |
| 29662 | |
| 29663 | #endif /* Py_PYTHON_H */ |