1 /* Generated by Cython 0.29.13 */
2
3 /* BEGIN: Cython Metadata
4 {
5 "distutils": {
6 "depends": [],
7 "name": "tables.linkextension",
8 "sources": [
9 "tables/linkextension.pyx"
10 ]
11 },
12 "module_name": "tables.linkextension"
13 }
14 END: Cython Metadata */
15
16 #define PY_SSIZE_T_CLEAN
17 #include "Python.h"
18 #ifndef Py_PYTHON_H
19 #error Python headers needed to compile C extensions, please install development version of Python.
20 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
21 #error Cython requires Python 2.6+ or Python 3.3+.
22 #else
23 #define CYTHON_ABI "0_29_13"
24 #define CYTHON_HEX_VERSION 0x001D0DF0
25 #define CYTHON_FUTURE_DIVISION 0
26 #include <stddef.h>
27 #ifndef offsetof
28 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
29 #endif
30 #if !defined(WIN32) && !defined(MS_WINDOWS)
31 #ifndef __stdcall
32 #define __stdcall
33 #endif
34 #ifndef __cdecl
35 #define __cdecl
36 #endif
37 #ifndef __fastcall
38 #define __fastcall
39 #endif
40 #endif
41 #ifndef DL_IMPORT
42 #define DL_IMPORT(t) t
43 #endif
44 #ifndef DL_EXPORT
45 #define DL_EXPORT(t) t
46 #endif
47 #define __PYX_COMMA ,
48 #ifndef HAVE_LONG_LONG
49 #if PY_VERSION_HEX >= 0x02070000
50 #define HAVE_LONG_LONG
51 #endif
52 #endif
53 #ifndef PY_LONG_LONG
54 #define PY_LONG_LONG LONG_LONG
55 #endif
56 #ifndef Py_HUGE_VAL
57 #define Py_HUGE_VAL HUGE_VAL
58 #endif
59 #ifdef PYPY_VERSION
60 #define CYTHON_COMPILING_IN_PYPY 1
61 #define CYTHON_COMPILING_IN_PYSTON 0
62 #define CYTHON_COMPILING_IN_CPYTHON 0
63 #undef CYTHON_USE_TYPE_SLOTS
64 #define CYTHON_USE_TYPE_SLOTS 0
65 #undef CYTHON_USE_PYTYPE_LOOKUP
66 #define CYTHON_USE_PYTYPE_LOOKUP 0
67 #if PY_VERSION_HEX < 0x03050000
68 #undef CYTHON_USE_ASYNC_SLOTS
69 #define CYTHON_USE_ASYNC_SLOTS 0
70 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
71 #define CYTHON_USE_ASYNC_SLOTS 1
72 #endif
73 #undef CYTHON_USE_PYLIST_INTERNALS
74 #define CYTHON_USE_PYLIST_INTERNALS 0
75 #undef CYTHON_USE_UNICODE_INTERNALS
76 #define CYTHON_USE_UNICODE_INTERNALS 0
77 #undef CYTHON_USE_UNICODE_WRITER
78 #define CYTHON_USE_UNICODE_WRITER 0
79 #undef CYTHON_USE_PYLONG_INTERNALS
80 #define CYTHON_USE_PYLONG_INTERNALS 0
81 #undef CYTHON_AVOID_BORROWED_REFS
82 #define CYTHON_AVOID_BORROWED_REFS 1
83 #undef CYTHON_ASSUME_SAFE_MACROS
84 #define CYTHON_ASSUME_SAFE_MACROS 0
85 #undef CYTHON_UNPACK_METHODS
86 #define CYTHON_UNPACK_METHODS 0
87 #undef CYTHON_FAST_THREAD_STATE
88 #define CYTHON_FAST_THREAD_STATE 0
89 #undef CYTHON_FAST_PYCALL
90 #define CYTHON_FAST_PYCALL 0
91 #undef CYTHON_PEP489_MULTI_PHASE_INIT
92 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
93 #undef CYTHON_USE_TP_FINALIZE
94 #define CYTHON_USE_TP_FINALIZE 0
95 #undef CYTHON_USE_DICT_VERSIONS
96 #define CYTHON_USE_DICT_VERSIONS 0
97 #undef CYTHON_USE_EXC_INFO_STACK
98 #define CYTHON_USE_EXC_INFO_STACK 0
99 #elif defined(PYSTON_VERSION)
100 #define CYTHON_COMPILING_IN_PYPY 0
101 #define CYTHON_COMPILING_IN_PYSTON 1
102 #define CYTHON_COMPILING_IN_CPYTHON 0
103 #ifndef CYTHON_USE_TYPE_SLOTS
104 #define CYTHON_USE_TYPE_SLOTS 1
105 #endif
106 #undef CYTHON_USE_PYTYPE_LOOKUP
107 #define CYTHON_USE_PYTYPE_LOOKUP 0
108 #undef CYTHON_USE_ASYNC_SLOTS
109 #define CYTHON_USE_ASYNC_SLOTS 0
110 #undef CYTHON_USE_PYLIST_INTERNALS
111 #define CYTHON_USE_PYLIST_INTERNALS 0
112 #ifndef CYTHON_USE_UNICODE_INTERNALS
113 #define CYTHON_USE_UNICODE_INTERNALS 1
114 #endif
115 #undef CYTHON_USE_UNICODE_WRITER
116 #define CYTHON_USE_UNICODE_WRITER 0
117 #undef CYTHON_USE_PYLONG_INTERNALS
118 #define CYTHON_USE_PYLONG_INTERNALS 0
119 #ifndef CYTHON_AVOID_BORROWED_REFS
120 #define CYTHON_AVOID_BORROWED_REFS 0
121 #endif
122 #ifndef CYTHON_ASSUME_SAFE_MACROS
123 #define CYTHON_ASSUME_SAFE_MACROS 1
124 #endif
125 #ifndef CYTHON_UNPACK_METHODS
126 #define CYTHON_UNPACK_METHODS 1
127 #endif
128 #undef CYTHON_FAST_THREAD_STATE
129 #define CYTHON_FAST_THREAD_STATE 0
130 #undef CYTHON_FAST_PYCALL
131 #define CYTHON_FAST_PYCALL 0
132 #undef CYTHON_PEP489_MULTI_PHASE_INIT
133 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
134 #undef CYTHON_USE_TP_FINALIZE
135 #define CYTHON_USE_TP_FINALIZE 0
136 #undef CYTHON_USE_DICT_VERSIONS
137 #define CYTHON_USE_DICT_VERSIONS 0
138 #undef CYTHON_USE_EXC_INFO_STACK
139 #define CYTHON_USE_EXC_INFO_STACK 0
140 #else
141 #define CYTHON_COMPILING_IN_PYPY 0
142 #define CYTHON_COMPILING_IN_PYSTON 0
143 #define CYTHON_COMPILING_IN_CPYTHON 1
144 #ifndef CYTHON_USE_TYPE_SLOTS
145 #define CYTHON_USE_TYPE_SLOTS 1
146 #endif
147 #if PY_VERSION_HEX < 0x02070000
148 #undef CYTHON_USE_PYTYPE_LOOKUP
149 #define CYTHON_USE_PYTYPE_LOOKUP 0
150 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
151 #define CYTHON_USE_PYTYPE_LOOKUP 1
152 #endif
153 #if PY_MAJOR_VERSION < 3
154 #undef CYTHON_USE_ASYNC_SLOTS
155 #define CYTHON_USE_ASYNC_SLOTS 0
156 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
157 #define CYTHON_USE_ASYNC_SLOTS 1
158 #endif
159 #if PY_VERSION_HEX < 0x02070000
160 #undef CYTHON_USE_PYLONG_INTERNALS
161 #define CYTHON_USE_PYLONG_INTERNALS 0
162 #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
163 #define CYTHON_USE_PYLONG_INTERNALS 1
164 #endif
165 #ifndef CYTHON_USE_PYLIST_INTERNALS
166 #define CYTHON_USE_PYLIST_INTERNALS 1
167 #endif
168 #ifndef CYTHON_USE_UNICODE_INTERNALS
169 #define CYTHON_USE_UNICODE_INTERNALS 1
170 #endif
171 #if PY_VERSION_HEX < 0x030300F0
172 #undef CYTHON_USE_UNICODE_WRITER
173 #define CYTHON_USE_UNICODE_WRITER 0
174 #elif !defined(CYTHON_USE_UNICODE_WRITER)
175 #define CYTHON_USE_UNICODE_WRITER 1
176 #endif
177 #ifndef CYTHON_AVOID_BORROWED_REFS
178 #define CYTHON_AVOID_BORROWED_REFS 0
179 #endif
180 #ifndef CYTHON_ASSUME_SAFE_MACROS
181 #define CYTHON_ASSUME_SAFE_MACROS 1
182 #endif
183 #ifndef CYTHON_UNPACK_METHODS
184 #define CYTHON_UNPACK_METHODS 1
185 #endif
186 #ifndef CYTHON_FAST_THREAD_STATE
187 #define CYTHON_FAST_THREAD_STATE 1
188 #endif
189 #ifndef CYTHON_FAST_PYCALL
190 #define CYTHON_FAST_PYCALL 1
191 #endif
192 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
193 #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
194 #endif
195 #ifndef CYTHON_USE_TP_FINALIZE
196 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
197 #endif
198 #ifndef CYTHON_USE_DICT_VERSIONS
199 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
200 #endif
201 #ifndef CYTHON_USE_EXC_INFO_STACK
202 #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
203 #endif
204 #endif
205 #if !defined(CYTHON_FAST_PYCCALL)
206 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
207 #endif
208 #if CYTHON_USE_PYLONG_INTERNALS
209 #include "longintrepr.h"
210 #undef SHIFT
211 #undef BASE
212 #undef MASK
213 #ifdef SIZEOF_VOID_P
214 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
215 #endif
216 #endif
217 #ifndef __has_attribute
218 #define __has_attribute(x) 0
219 #endif
220 #ifndef __has_cpp_attribute
221 #define __has_cpp_attribute(x) 0
222 #endif
223 #ifndef CYTHON_RESTRICT
224 #if defined(__GNUC__)
225 #define CYTHON_RESTRICT __restrict__
226 #elif defined(_MSC_VER) && _MSC_VER >= 1400
227 #define CYTHON_RESTRICT __restrict
228 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
229 #define CYTHON_RESTRICT restrict
230 #else
231 #define CYTHON_RESTRICT
232 #endif
233 #endif
234 #ifndef CYTHON_UNUSED
235 # if defined(__GNUC__)
236 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
237 # define CYTHON_UNUSED __attribute__ ((__unused__))
238 # else
239 # define CYTHON_UNUSED
240 # endif
241 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
242 # define CYTHON_UNUSED __attribute__ ((__unused__))
243 # else
244 # define CYTHON_UNUSED
245 # endif
246 #endif
247 #ifndef CYTHON_MAYBE_UNUSED_VAR
248 # if defined(__cplusplus)
CYTHON_MAYBE_UNUSED_VAR(const T &)249 template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
250 # else
251 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
252 # endif
253 #endif
254 #ifndef CYTHON_NCP_UNUSED
255 # if CYTHON_COMPILING_IN_CPYTHON
256 # define CYTHON_NCP_UNUSED
257 # else
258 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
259 # endif
260 #endif
261 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
262 #ifdef _MSC_VER
263 #ifndef _MSC_STDINT_H_
264 #if _MSC_VER < 1300
265 typedef unsigned char uint8_t;
266 typedef unsigned int uint32_t;
267 #else
268 typedef unsigned __int8 uint8_t;
269 typedef unsigned __int32 uint32_t;
270 #endif
271 #endif
272 #else
273 #include <stdint.h>
274 #endif
275 #ifndef CYTHON_FALLTHROUGH
276 #if defined(__cplusplus) && __cplusplus >= 201103L
277 #if __has_cpp_attribute(fallthrough)
278 #define CYTHON_FALLTHROUGH [[fallthrough]]
279 #elif __has_cpp_attribute(clang::fallthrough)
280 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
281 #elif __has_cpp_attribute(gnu::fallthrough)
282 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
283 #endif
284 #endif
285 #ifndef CYTHON_FALLTHROUGH
286 #if __has_attribute(fallthrough)
287 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
288 #else
289 #define CYTHON_FALLTHROUGH
290 #endif
291 #endif
292 #if defined(__clang__ ) && defined(__apple_build_version__)
293 #if __apple_build_version__ < 7000000
294 #undef CYTHON_FALLTHROUGH
295 #define CYTHON_FALLTHROUGH
296 #endif
297 #endif
298 #endif
299
300 #ifndef CYTHON_INLINE
301 #if defined(__clang__)
302 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
303 #elif defined(__GNUC__)
304 #define CYTHON_INLINE __inline__
305 #elif defined(_MSC_VER)
306 #define CYTHON_INLINE __inline
307 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
308 #define CYTHON_INLINE inline
309 #else
310 #define CYTHON_INLINE
311 #endif
312 #endif
313
314 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
315 #define Py_OptimizeFlag 0
316 #endif
317 #define __PYX_BUILD_PY_SSIZE_T "n"
318 #define CYTHON_FORMAT_SSIZE_T "z"
319 #if PY_MAJOR_VERSION < 3
320 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
321 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
322 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
323 #define __Pyx_DefaultClassType PyClass_Type
324 #else
325 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
326 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
327 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
328 PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
329 #else
330 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
331 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
332 #endif
333 #define __Pyx_DefaultClassType PyType_Type
334 #endif
335 #ifndef Py_TPFLAGS_CHECKTYPES
336 #define Py_TPFLAGS_CHECKTYPES 0
337 #endif
338 #ifndef Py_TPFLAGS_HAVE_INDEX
339 #define Py_TPFLAGS_HAVE_INDEX 0
340 #endif
341 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
342 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
343 #endif
344 #ifndef Py_TPFLAGS_HAVE_FINALIZE
345 #define Py_TPFLAGS_HAVE_FINALIZE 0
346 #endif
347 #ifndef METH_STACKLESS
348 #define METH_STACKLESS 0
349 #endif
350 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
351 #ifndef METH_FASTCALL
352 #define METH_FASTCALL 0x80
353 #endif
354 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
355 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
356 Py_ssize_t nargs, PyObject *kwnames);
357 #else
358 #define __Pyx_PyCFunctionFast _PyCFunctionFast
359 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
360 #endif
361 #if CYTHON_FAST_PYCCALL
362 #define __Pyx_PyFastCFunction_Check(func)\
363 ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
364 #else
365 #define __Pyx_PyFastCFunction_Check(func) 0
366 #endif
367 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
368 #define PyObject_Malloc(s) PyMem_Malloc(s)
369 #define PyObject_Free(p) PyMem_Free(p)
370 #define PyObject_Realloc(p) PyMem_Realloc(p)
371 #endif
372 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
373 #define PyMem_RawMalloc(n) PyMem_Malloc(n)
374 #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
375 #define PyMem_RawFree(p) PyMem_Free(p)
376 #endif
377 #if CYTHON_COMPILING_IN_PYSTON
378 #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
379 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
380 #else
381 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
382 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
383 #endif
384 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
385 #define __Pyx_PyThreadState_Current PyThreadState_GET()
386 #elif PY_VERSION_HEX >= 0x03060000
387 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
388 #elif PY_VERSION_HEX >= 0x03000000
389 #define __Pyx_PyThreadState_Current PyThreadState_GET()
390 #else
391 #define __Pyx_PyThreadState_Current _PyThreadState_Current
392 #endif
393 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
394 #include "pythread.h"
395 #define Py_tss_NEEDS_INIT 0
396 typedef int Py_tss_t;
PyThread_tss_create(Py_tss_t * key)397 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
398 *key = PyThread_create_key();
399 return 0;
400 }
PyThread_tss_alloc(void)401 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
402 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
403 *key = Py_tss_NEEDS_INIT;
404 return key;
405 }
PyThread_tss_free(Py_tss_t * key)406 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
407 PyObject_Free(key);
408 }
PyThread_tss_is_created(Py_tss_t * key)409 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
410 return *key != Py_tss_NEEDS_INIT;
411 }
PyThread_tss_delete(Py_tss_t * key)412 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
413 PyThread_delete_key(*key);
414 *key = Py_tss_NEEDS_INIT;
415 }
PyThread_tss_set(Py_tss_t * key,void * value)416 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
417 return PyThread_set_key_value(*key, value);
418 }
PyThread_tss_get(Py_tss_t * key)419 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
420 return PyThread_get_key_value(*key);
421 }
422 #endif
423 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
424 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
425 #else
426 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
427 #endif
428 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
429 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
430 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
431 #else
432 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
433 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
434 #endif
435 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
436 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
437 #else
438 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
439 #endif
440 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
441 #define CYTHON_PEP393_ENABLED 1
442 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
443 0 : _PyUnicode_Ready((PyObject *)(op)))
444 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
445 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
446 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
447 #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
448 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
449 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
450 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
451 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
452 #else
453 #define CYTHON_PEP393_ENABLED 0
454 #define PyUnicode_1BYTE_KIND 1
455 #define PyUnicode_2BYTE_KIND 2
456 #define PyUnicode_4BYTE_KIND 4
457 #define __Pyx_PyUnicode_READY(op) (0)
458 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
459 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
460 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
461 #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
462 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
463 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
464 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
465 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
466 #endif
467 #if CYTHON_COMPILING_IN_PYPY
468 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
469 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
470 #else
471 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
472 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
473 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
474 #endif
475 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
476 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
477 #endif
478 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
479 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
480 #endif
481 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
482 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
483 #endif
484 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
485 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
486 #if PY_MAJOR_VERSION >= 3
487 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
488 #else
489 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
490 #endif
491 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
492 #define PyObject_ASCII(o) PyObject_Repr(o)
493 #endif
494 #if PY_MAJOR_VERSION >= 3
495 #define PyBaseString_Type PyUnicode_Type
496 #define PyStringObject PyUnicodeObject
497 #define PyString_Type PyUnicode_Type
498 #define PyString_Check PyUnicode_Check
499 #define PyString_CheckExact PyUnicode_CheckExact
500 #define PyObject_Unicode PyObject_Str
501 #endif
502 #if PY_MAJOR_VERSION >= 3
503 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
504 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
505 #else
506 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
507 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
508 #endif
509 #ifndef PySet_CheckExact
510 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
511 #endif
512 #if CYTHON_ASSUME_SAFE_MACROS
513 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
514 #else
515 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
516 #endif
517 #if PY_MAJOR_VERSION >= 3
518 #define PyIntObject PyLongObject
519 #define PyInt_Type PyLong_Type
520 #define PyInt_Check(op) PyLong_Check(op)
521 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
522 #define PyInt_FromString PyLong_FromString
523 #define PyInt_FromUnicode PyLong_FromUnicode
524 #define PyInt_FromLong PyLong_FromLong
525 #define PyInt_FromSize_t PyLong_FromSize_t
526 #define PyInt_FromSsize_t PyLong_FromSsize_t
527 #define PyInt_AsLong PyLong_AsLong
528 #define PyInt_AS_LONG PyLong_AS_LONG
529 #define PyInt_AsSsize_t PyLong_AsSsize_t
530 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
531 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
532 #define PyNumber_Int PyNumber_Long
533 #endif
534 #if PY_MAJOR_VERSION >= 3
535 #define PyBoolObject PyLongObject
536 #endif
537 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
538 #ifndef PyUnicode_InternFromString
539 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
540 #endif
541 #endif
542 #if PY_VERSION_HEX < 0x030200A4
543 typedef long Py_hash_t;
544 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
545 #define __Pyx_PyInt_AsHash_t PyInt_AsLong
546 #else
547 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
548 #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
549 #endif
550 #if PY_MAJOR_VERSION >= 3
551 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
552 #else
553 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
554 #endif
555 #if CYTHON_USE_ASYNC_SLOTS
556 #if PY_VERSION_HEX >= 0x030500B1
557 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
558 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
559 #else
560 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
561 #endif
562 #else
563 #define __Pyx_PyType_AsAsync(obj) NULL
564 #endif
565 #ifndef __Pyx_PyAsyncMethodsStruct
566 typedef struct {
567 unaryfunc am_await;
568 unaryfunc am_aiter;
569 unaryfunc am_anext;
570 } __Pyx_PyAsyncMethodsStruct;
571 #endif
572
573 #if defined(WIN32) || defined(MS_WINDOWS)
574 #define _USE_MATH_DEFINES
575 #endif
576 #include <math.h>
577 #ifdef NAN
578 #define __PYX_NAN() ((float) NAN)
579 #else
__PYX_NAN()580 static CYTHON_INLINE float __PYX_NAN() {
581 float value;
582 memset(&value, 0xFF, sizeof(value));
583 return value;
584 }
585 #endif
586 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
587 #define __Pyx_truncl trunc
588 #else
589 #define __Pyx_truncl truncl
590 #endif
591
592
593 #define __PYX_ERR(f_index, lineno, Ln_error) \
594 { \
595 __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
596 }
597
598 #ifndef __PYX_EXTERN_C
599 #ifdef __cplusplus
600 #define __PYX_EXTERN_C extern "C"
601 #else
602 #define __PYX_EXTERN_C extern
603 #endif
604 #endif
605
606 #define __PYX_HAVE__tables__linkextension
607 #define __PYX_HAVE_API__tables__linkextension
608 /* Early includes */
609 #include <string.h>
610 #include <stdio.h>
611 #include "numpy/arrayobject.h"
612 #include "numpy/ufuncobject.h"
613 #include "time.h"
614 #include "hdf5.h"
615 #include "H5ATTR.h"
616 #include "H5ARRAY.h"
617 #include "utils.h"
618 #include "typeconv.h"
619 #include "blosc_filter.h"
620 #include <stdlib.h>
621 #include "pythread.h"
622 #include "H5Lpublic.h"
623 #ifdef _OPENMP
624 #include <omp.h>
625 #endif /* _OPENMP */
626
627 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
628 #define CYTHON_WITHOUT_ASSERTIONS
629 #endif
630
631 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
632 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
633
634 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
635 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
636 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
637 #define __PYX_DEFAULT_STRING_ENCODING ""
638 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
639 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
640 #define __Pyx_uchar_cast(c) ((unsigned char)c)
641 #define __Pyx_long_cast(x) ((long)x)
642 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
643 (sizeof(type) < sizeof(Py_ssize_t)) ||\
644 (sizeof(type) > sizeof(Py_ssize_t) &&\
645 likely(v < (type)PY_SSIZE_T_MAX ||\
646 v == (type)PY_SSIZE_T_MAX) &&\
647 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
648 v == (type)PY_SSIZE_T_MIN))) ||\
649 (sizeof(type) == sizeof(Py_ssize_t) &&\
650 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
651 v == (type)PY_SSIZE_T_MAX))) )
__Pyx_is_valid_index(Py_ssize_t i,Py_ssize_t limit)652 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
653 return (size_t) i < (size_t) limit;
654 }
655 #if defined (__cplusplus) && __cplusplus >= 201103L
656 #include <cstdlib>
657 #define __Pyx_sst_abs(value) std::abs(value)
658 #elif SIZEOF_INT >= SIZEOF_SIZE_T
659 #define __Pyx_sst_abs(value) abs(value)
660 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
661 #define __Pyx_sst_abs(value) labs(value)
662 #elif defined (_MSC_VER)
663 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
664 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
665 #define __Pyx_sst_abs(value) llabs(value)
666 #elif defined (__GNUC__)
667 #define __Pyx_sst_abs(value) __builtin_llabs(value)
668 #else
669 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
670 #endif
671 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
672 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
673 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
674 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
675 #define __Pyx_PyBytes_FromString PyBytes_FromString
676 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
677 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
678 #if PY_MAJOR_VERSION < 3
679 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
680 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
681 #else
682 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
683 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
684 #endif
685 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
686 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
687 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
688 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
689 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
690 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
691 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
692 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
693 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
694 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
695 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
696 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
697 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
698 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
699 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
700 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
__Pyx_Py_UNICODE_strlen(const Py_UNICODE * u)701 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
702 const Py_UNICODE *u_end = u;
703 while (*u_end++) ;
704 return (size_t)(u_end - u - 1);
705 }
706 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
707 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
708 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
709 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
710 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
711 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
712 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
713 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
714 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
715 #define __Pyx_PySequence_Tuple(obj)\
716 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
717 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
718 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
719 #if CYTHON_ASSUME_SAFE_MACROS
720 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
721 #else
722 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
723 #endif
724 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
725 #if PY_MAJOR_VERSION >= 3
726 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
727 #else
728 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
729 #endif
730 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
731 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
732 static int __Pyx_sys_getdefaultencoding_not_ascii;
__Pyx_init_sys_getdefaultencoding_params(void)733 static int __Pyx_init_sys_getdefaultencoding_params(void) {
734 PyObject* sys;
735 PyObject* default_encoding = NULL;
736 PyObject* ascii_chars_u = NULL;
737 PyObject* ascii_chars_b = NULL;
738 const char* default_encoding_c;
739 sys = PyImport_ImportModule("sys");
740 if (!sys) goto bad;
741 default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
742 Py_DECREF(sys);
743 if (!default_encoding) goto bad;
744 default_encoding_c = PyBytes_AsString(default_encoding);
745 if (!default_encoding_c) goto bad;
746 if (strcmp(default_encoding_c, "ascii") == 0) {
747 __Pyx_sys_getdefaultencoding_not_ascii = 0;
748 } else {
749 char ascii_chars[128];
750 int c;
751 for (c = 0; c < 128; c++) {
752 ascii_chars[c] = c;
753 }
754 __Pyx_sys_getdefaultencoding_not_ascii = 1;
755 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
756 if (!ascii_chars_u) goto bad;
757 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
758 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
759 PyErr_Format(
760 PyExc_ValueError,
761 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
762 default_encoding_c);
763 goto bad;
764 }
765 Py_DECREF(ascii_chars_u);
766 Py_DECREF(ascii_chars_b);
767 }
768 Py_DECREF(default_encoding);
769 return 0;
770 bad:
771 Py_XDECREF(default_encoding);
772 Py_XDECREF(ascii_chars_u);
773 Py_XDECREF(ascii_chars_b);
774 return -1;
775 }
776 #endif
777 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
778 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
779 #else
780 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
781 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
782 static char* __PYX_DEFAULT_STRING_ENCODING;
__Pyx_init_sys_getdefaultencoding_params(void)783 static int __Pyx_init_sys_getdefaultencoding_params(void) {
784 PyObject* sys;
785 PyObject* default_encoding = NULL;
786 char* default_encoding_c;
787 sys = PyImport_ImportModule("sys");
788 if (!sys) goto bad;
789 default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
790 Py_DECREF(sys);
791 if (!default_encoding) goto bad;
792 default_encoding_c = PyBytes_AsString(default_encoding);
793 if (!default_encoding_c) goto bad;
794 __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
795 if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
796 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
797 Py_DECREF(default_encoding);
798 return 0;
799 bad:
800 Py_XDECREF(default_encoding);
801 return -1;
802 }
803 #endif
804 #endif
805
806
807 /* Test for GCC > 2.95 */
808 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
809 #define likely(x) __builtin_expect(!!(x), 1)
810 #define unlikely(x) __builtin_expect(!!(x), 0)
811 #else /* !__GNUC__ or GCC < 2.95 */
812 #define likely(x) (x)
813 #define unlikely(x) (x)
814 #endif /* __GNUC__ */
__Pyx_pretend_to_initialize(void * ptr)815 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
816
817 static PyObject *__pyx_m = NULL;
818 static PyObject *__pyx_d;
819 static PyObject *__pyx_b;
820 static PyObject *__pyx_cython_runtime = NULL;
821 static PyObject *__pyx_empty_tuple;
822 static PyObject *__pyx_empty_bytes;
823 static PyObject *__pyx_empty_unicode;
824 static int __pyx_lineno;
825 static int __pyx_clineno = 0;
826 static const char * __pyx_cfilenm= __FILE__;
827 static const char *__pyx_filename;
828
829 /* Header.proto */
830 #if !defined(CYTHON_CCOMPLEX)
831 #if defined(__cplusplus)
832 #define CYTHON_CCOMPLEX 1
833 #elif defined(_Complex_I)
834 #define CYTHON_CCOMPLEX 1
835 #else
836 #define CYTHON_CCOMPLEX 0
837 #endif
838 #endif
839 #if CYTHON_CCOMPLEX
840 #ifdef __cplusplus
841 #include <complex>
842 #else
843 #include <complex.h>
844 #endif
845 #endif
846 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
847 #undef _Complex_I
848 #define _Complex_I 1.0fj
849 #endif
850
851
852 static const char *__pyx_f[] = {
853 "tables/linkextension.pyx",
854 "stringsource",
855 "__init__.pxd",
856 "type.pxd",
857 "bool.pxd",
858 "complex.pxd",
859 "tables/hdf5extension.pxd",
860 };
861
862 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
863 * # in Cython to enable them only on the right systems.
864 *
865 * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
866 * ctypedef npy_int16 int16_t
867 * ctypedef npy_int32 int32_t
868 */
869 typedef npy_int8 __pyx_t_5numpy_int8_t;
870
871 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
872 *
873 * ctypedef npy_int8 int8_t
874 * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
875 * ctypedef npy_int32 int32_t
876 * ctypedef npy_int64 int64_t
877 */
878 typedef npy_int16 __pyx_t_5numpy_int16_t;
879
880 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":778
881 * ctypedef npy_int8 int8_t
882 * ctypedef npy_int16 int16_t
883 * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
884 * ctypedef npy_int64 int64_t
885 * #ctypedef npy_int96 int96_t
886 */
887 typedef npy_int32 __pyx_t_5numpy_int32_t;
888
889 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
890 * ctypedef npy_int16 int16_t
891 * ctypedef npy_int32 int32_t
892 * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
893 * #ctypedef npy_int96 int96_t
894 * #ctypedef npy_int128 int128_t
895 */
896 typedef npy_int64 __pyx_t_5numpy_int64_t;
897
898 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
899 * #ctypedef npy_int128 int128_t
900 *
901 * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
902 * ctypedef npy_uint16 uint16_t
903 * ctypedef npy_uint32 uint32_t
904 */
905 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
906
907 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":784
908 *
909 * ctypedef npy_uint8 uint8_t
910 * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
911 * ctypedef npy_uint32 uint32_t
912 * ctypedef npy_uint64 uint64_t
913 */
914 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
915
916 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
917 * ctypedef npy_uint8 uint8_t
918 * ctypedef npy_uint16 uint16_t
919 * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
920 * ctypedef npy_uint64 uint64_t
921 * #ctypedef npy_uint96 uint96_t
922 */
923 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
924
925 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":786
926 * ctypedef npy_uint16 uint16_t
927 * ctypedef npy_uint32 uint32_t
928 * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
929 * #ctypedef npy_uint96 uint96_t
930 * #ctypedef npy_uint128 uint128_t
931 */
932 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
933
934 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
935 * #ctypedef npy_uint128 uint128_t
936 *
937 * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
938 * ctypedef npy_float64 float64_t
939 * #ctypedef npy_float80 float80_t
940 */
941 typedef npy_float32 __pyx_t_5numpy_float32_t;
942
943 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
944 *
945 * ctypedef npy_float32 float32_t
946 * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
947 * #ctypedef npy_float80 float80_t
948 * #ctypedef npy_float128 float128_t
949 */
950 typedef npy_float64 __pyx_t_5numpy_float64_t;
951
952 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":800
953 * # The int types are mapped a bit surprising --
954 * # numpy.int corresponds to 'l' and numpy.long to 'q'
955 * ctypedef npy_long int_t # <<<<<<<<<<<<<<
956 * ctypedef npy_longlong long_t
957 * ctypedef npy_longlong longlong_t
958 */
959 typedef npy_long __pyx_t_5numpy_int_t;
960
961 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
962 * # numpy.int corresponds to 'l' and numpy.long to 'q'
963 * ctypedef npy_long int_t
964 * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
965 * ctypedef npy_longlong longlong_t
966 *
967 */
968 typedef npy_longlong __pyx_t_5numpy_long_t;
969
970 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
971 * ctypedef npy_long int_t
972 * ctypedef npy_longlong long_t
973 * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
974 *
975 * ctypedef npy_ulong uint_t
976 */
977 typedef npy_longlong __pyx_t_5numpy_longlong_t;
978
979 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":804
980 * ctypedef npy_longlong longlong_t
981 *
982 * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
983 * ctypedef npy_ulonglong ulong_t
984 * ctypedef npy_ulonglong ulonglong_t
985 */
986 typedef npy_ulong __pyx_t_5numpy_uint_t;
987
988 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":805
989 *
990 * ctypedef npy_ulong uint_t
991 * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
992 * ctypedef npy_ulonglong ulonglong_t
993 *
994 */
995 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
996
997 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":806
998 * ctypedef npy_ulong uint_t
999 * ctypedef npy_ulonglong ulong_t
1000 * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1001 *
1002 * ctypedef npy_intp intp_t
1003 */
1004 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1005
1006 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":808
1007 * ctypedef npy_ulonglong ulonglong_t
1008 *
1009 * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1010 * ctypedef npy_uintp uintp_t
1011 *
1012 */
1013 typedef npy_intp __pyx_t_5numpy_intp_t;
1014
1015 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":809
1016 *
1017 * ctypedef npy_intp intp_t
1018 * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1019 *
1020 * ctypedef npy_double float_t
1021 */
1022 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1023
1024 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":811
1025 * ctypedef npy_uintp uintp_t
1026 *
1027 * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1028 * ctypedef npy_double double_t
1029 * ctypedef npy_longdouble longdouble_t
1030 */
1031 typedef npy_double __pyx_t_5numpy_float_t;
1032
1033 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":812
1034 *
1035 * ctypedef npy_double float_t
1036 * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1037 * ctypedef npy_longdouble longdouble_t
1038 *
1039 */
1040 typedef npy_double __pyx_t_5numpy_double_t;
1041
1042 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
1043 * ctypedef npy_double float_t
1044 * ctypedef npy_double double_t
1045 * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1046 *
1047 * ctypedef npy_cfloat cfloat_t
1048 */
1049 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1050 /* Declarations.proto */
1051 #if CYTHON_CCOMPLEX
1052 #ifdef __cplusplus
1053 typedef ::std::complex< float > __pyx_t_float_complex;
1054 #else
1055 typedef float _Complex __pyx_t_float_complex;
1056 #endif
1057 #else
1058 typedef struct { float real, imag; } __pyx_t_float_complex;
1059 #endif
1060 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1061
1062 /* Declarations.proto */
1063 #if CYTHON_CCOMPLEX
1064 #ifdef __cplusplus
1065 typedef ::std::complex< double > __pyx_t_double_complex;
1066 #else
1067 typedef double _Complex __pyx_t_double_complex;
1068 #endif
1069 #else
1070 typedef struct { double real, imag; } __pyx_t_double_complex;
1071 #endif
1072 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1073
1074
1075 /*--- Type declarations ---*/
1076 struct __pyx_obj_6tables_13hdf5extension_Node;
1077 struct __pyx_obj_6tables_13hdf5extension_Leaf;
1078 struct __pyx_obj_6tables_13hdf5extension_Array;
1079 struct __pyx_obj_6tables_13linkextension_Link;
1080 struct __pyx_obj_6tables_13linkextension_SoftLink;
1081 struct __pyx_obj_6tables_13linkextension_ExternalLink;
1082
1083 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
1084 * ctypedef npy_longdouble longdouble_t
1085 *
1086 * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1087 * ctypedef npy_cdouble cdouble_t
1088 * ctypedef npy_clongdouble clongdouble_t
1089 */
1090 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1091
1092 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
1093 *
1094 * ctypedef npy_cfloat cfloat_t
1095 * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1096 * ctypedef npy_clongdouble clongdouble_t
1097 *
1098 */
1099 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1100
1101 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":817
1102 * ctypedef npy_cfloat cfloat_t
1103 * ctypedef npy_cdouble cdouble_t
1104 * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1105 *
1106 * ctypedef npy_cdouble complex_t
1107 */
1108 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1109
1110 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":819
1111 * ctypedef npy_clongdouble clongdouble_t
1112 *
1113 * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1114 *
1115 * cdef inline object PyArray_MultiIterNew1(a):
1116 */
1117 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1118
1119 /* "hdf5extension.pxd":18
1120 *
1121 * # Declaration of instance variables for shared classes
1122 * cdef class Node: # <<<<<<<<<<<<<<
1123 * cdef object name
1124 * cdef hid_t parent_id
1125 */
1126 struct __pyx_obj_6tables_13hdf5extension_Node {
1127 PyObject_HEAD
1128 PyObject *name;
1129 hid_t parent_id;
1130 };
1131
1132
1133 /* "hdf5extension.pxd":22
1134 * cdef hid_t parent_id
1135 *
1136 * cdef class Leaf(Node): # <<<<<<<<<<<<<<
1137 * cdef hid_t dataset_id
1138 * cdef hid_t type_id
1139 */
1140 struct __pyx_obj_6tables_13hdf5extension_Leaf {
1141 struct __pyx_obj_6tables_13hdf5extension_Node __pyx_base;
1142 struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf *__pyx_vtab;
1143 hid_t dataset_id;
1144 hid_t type_id;
1145 hid_t base_type_id;
1146 hid_t disk_type_id;
1147 hsize_t *dims;
1148 };
1149
1150
1151 /* "hdf5extension.pxd":31
1152 * cdef _convert_time64(self, ndarray nparr, int sense)
1153 *
1154 * cdef class Array(Leaf): # <<<<<<<<<<<<<<
1155 * cdef int rank
1156 * cdef hsize_t *maxdims
1157 */
1158 struct __pyx_obj_6tables_13hdf5extension_Array {
1159 struct __pyx_obj_6tables_13hdf5extension_Leaf __pyx_base;
1160 int rank;
1161 hsize_t *maxdims;
1162 hsize_t *dims_chunk;
1163 };
1164
1165
1166 /* "tables/linkextension.pyx":130
1167 * # Public classes
1168 *
1169 * cdef class Link(Node): # <<<<<<<<<<<<<<
1170 * """Extension class from which all link extensions inherits."""
1171 *
1172 */
1173 struct __pyx_obj_6tables_13linkextension_Link {
1174 struct __pyx_obj_6tables_13hdf5extension_Node __pyx_base;
1175 };
1176
1177
1178 /* "tables/linkextension.pyx":157
1179 *
1180 *
1181 * cdef class SoftLink(Link): # <<<<<<<<<<<<<<
1182 * """Extension class representing a soft link."""
1183 *
1184 */
1185 struct __pyx_obj_6tables_13linkextension_SoftLink {
1186 struct __pyx_obj_6tables_13linkextension_Link __pyx_base;
1187 };
1188
1189
1190 /* "tables/linkextension.pyx":207
1191 *
1192 *
1193 * cdef class ExternalLink(Link): # <<<<<<<<<<<<<<
1194 * """Extension class representing an external link."""
1195 *
1196 */
1197 struct __pyx_obj_6tables_13linkextension_ExternalLink {
1198 struct __pyx_obj_6tables_13linkextension_Link __pyx_base;
1199 };
1200
1201
1202
1203 /* "hdf5extension.pxd":22
1204 * cdef hid_t parent_id
1205 *
1206 * cdef class Leaf(Node): # <<<<<<<<<<<<<<
1207 * cdef hid_t dataset_id
1208 * cdef hid_t type_id
1209 */
1210
1211 struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf {
1212 PyObject *(*_get_type_ids)(struct __pyx_obj_6tables_13hdf5extension_Leaf *);
1213 PyObject *(*_convert_time64)(struct __pyx_obj_6tables_13hdf5extension_Leaf *, PyArrayObject *, int);
1214 };
1215 static struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf *__pyx_vtabptr_6tables_13hdf5extension_Leaf;
1216
1217
1218 /* "hdf5extension.pxd":31
1219 * cdef _convert_time64(self, ndarray nparr, int sense)
1220 *
1221 * cdef class Array(Leaf): # <<<<<<<<<<<<<<
1222 * cdef int rank
1223 * cdef hsize_t *maxdims
1224 */
1225
1226 struct __pyx_vtabstruct_6tables_13hdf5extension_Array {
1227 struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf __pyx_base;
1228 };
1229 static struct __pyx_vtabstruct_6tables_13hdf5extension_Array *__pyx_vtabptr_6tables_13hdf5extension_Array;
1230
1231 /* --- Runtime support code (head) --- */
1232 /* Refnanny.proto */
1233 #ifndef CYTHON_REFNANNY
1234 #define CYTHON_REFNANNY 0
1235 #endif
1236 #if CYTHON_REFNANNY
1237 typedef struct {
1238 void (*INCREF)(void*, PyObject*, int);
1239 void (*DECREF)(void*, PyObject*, int);
1240 void (*GOTREF)(void*, PyObject*, int);
1241 void (*GIVEREF)(void*, PyObject*, int);
1242 void* (*SetupContext)(const char*, int, const char*);
1243 void (*FinishContext)(void**);
1244 } __Pyx_RefNannyAPIStruct;
1245 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1246 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1247 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1248 #ifdef WITH_THREAD
1249 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1250 if (acquire_gil) {\
1251 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1252 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1253 PyGILState_Release(__pyx_gilstate_save);\
1254 } else {\
1255 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1256 }
1257 #else
1258 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1259 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1260 #endif
1261 #define __Pyx_RefNannyFinishContext()\
1262 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1263 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1264 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1265 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1266 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1267 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1268 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1269 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1270 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1271 #else
1272 #define __Pyx_RefNannyDeclarations
1273 #define __Pyx_RefNannySetupContext(name, acquire_gil)
1274 #define __Pyx_RefNannyFinishContext()
1275 #define __Pyx_INCREF(r) Py_INCREF(r)
1276 #define __Pyx_DECREF(r) Py_DECREF(r)
1277 #define __Pyx_GOTREF(r)
1278 #define __Pyx_GIVEREF(r)
1279 #define __Pyx_XINCREF(r) Py_XINCREF(r)
1280 #define __Pyx_XDECREF(r) Py_XDECREF(r)
1281 #define __Pyx_XGOTREF(r)
1282 #define __Pyx_XGIVEREF(r)
1283 #endif
1284 #define __Pyx_XDECREF_SET(r, v) do {\
1285 PyObject *tmp = (PyObject *) r;\
1286 r = v; __Pyx_XDECREF(tmp);\
1287 } while (0)
1288 #define __Pyx_DECREF_SET(r, v) do {\
1289 PyObject *tmp = (PyObject *) r;\
1290 r = v; __Pyx_DECREF(tmp);\
1291 } while (0)
1292 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1293 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1294
1295 /* RaiseArgTupleInvalid.proto */
1296 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1297 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1298
1299 /* RaiseDoubleKeywords.proto */
1300 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1301
1302 /* ParseKeywords.proto */
1303 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1304 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1305 const char* function_name);
1306
1307 /* PyObjectGetAttrStr.proto */
1308 #if CYTHON_USE_TYPE_SLOTS
1309 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1310 #else
1311 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1312 #endif
1313
1314 /* GetBuiltinName.proto */
1315 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1316
1317 /* PyDictVersioning.proto */
1318 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1319 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1320 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1321 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1322 (version_var) = __PYX_GET_DICT_VERSION(dict);\
1323 (cache_var) = (value);
1324 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1325 static PY_UINT64_T __pyx_dict_version = 0;\
1326 static PyObject *__pyx_dict_cached_value = NULL;\
1327 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1328 (VAR) = __pyx_dict_cached_value;\
1329 } else {\
1330 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1331 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1332 }\
1333 }
1334 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1335 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1336 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1337 #else
1338 #define __PYX_GET_DICT_VERSION(dict) (0)
1339 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1340 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1341 #endif
1342
1343 /* GetModuleGlobalName.proto */
1344 #if CYTHON_USE_DICT_VERSIONS
1345 #define __Pyx_GetModuleGlobalName(var, name) {\
1346 static PY_UINT64_T __pyx_dict_version = 0;\
1347 static PyObject *__pyx_dict_cached_value = NULL;\
1348 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1349 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1350 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1351 }
1352 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1353 PY_UINT64_T __pyx_dict_version;\
1354 PyObject *__pyx_dict_cached_value;\
1355 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1356 }
1357 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1358 #else
1359 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1360 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1361 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1362 #endif
1363
1364 /* PyCFunctionFastCall.proto */
1365 #if CYTHON_FAST_PYCCALL
1366 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1367 #else
1368 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1369 #endif
1370
1371 /* PyFunctionFastCall.proto */
1372 #if CYTHON_FAST_PYCALL
1373 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1374 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1375 #if 1 || PY_VERSION_HEX < 0x030600B1
1376 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1377 #else
1378 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1379 #endif
1380 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1381 (sizeof(char [1 - 2*!(cond)]) - 1)
1382 #ifndef Py_MEMBER_SIZE
1383 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1384 #endif
1385 static size_t __pyx_pyframe_localsplus_offset = 0;
1386 #include "frameobject.h"
1387 #define __Pxy_PyFrame_Initialize_Offsets()\
1388 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1389 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1390 #define __Pyx_PyFrame_GetLocalsplus(frame)\
1391 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1392 #endif
1393
1394 /* PyObjectCall.proto */
1395 #if CYTHON_COMPILING_IN_CPYTHON
1396 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1397 #else
1398 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1399 #endif
1400
1401 /* PyObjectCall2Args.proto */
1402 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1403
1404 /* PyObjectCallMethO.proto */
1405 #if CYTHON_COMPILING_IN_CPYTHON
1406 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1407 #endif
1408
1409 /* PyObjectCallOneArg.proto */
1410 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1411
1412 /* PyThreadStateGet.proto */
1413 #if CYTHON_FAST_THREAD_STATE
1414 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1415 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1416 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1417 #else
1418 #define __Pyx_PyThreadState_declare
1419 #define __Pyx_PyThreadState_assign
1420 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1421 #endif
1422
1423 /* PyErrFetchRestore.proto */
1424 #if CYTHON_FAST_THREAD_STATE
1425 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1426 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1427 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1428 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1429 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1430 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1431 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1432 #if CYTHON_COMPILING_IN_CPYTHON
1433 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1434 #else
1435 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1436 #endif
1437 #else
1438 #define __Pyx_PyErr_Clear() PyErr_Clear()
1439 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1440 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1441 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1442 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1443 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1444 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1445 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1446 #endif
1447
1448 /* RaiseException.proto */
1449 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1450
1451 /* ArgTypeTest.proto */
1452 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1453 ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1454 __Pyx__ArgTypeTest(obj, type, name, exact))
1455 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1456
1457 /* UnpackUnboundCMethod.proto */
1458 typedef struct {
1459 PyObject *type;
1460 PyObject **method_name;
1461 PyCFunction func;
1462 PyObject *method;
1463 int flag;
1464 } __Pyx_CachedCFunction;
1465
1466 /* CallUnboundCMethod1.proto */
1467 static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
1468 #if CYTHON_COMPILING_IN_CPYTHON
1469 static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
1470 #else
1471 #define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg)
1472 #endif
1473
1474 /* dict_getitem_default.proto */
1475 static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);
1476
1477 /* CallUnboundCMethod2.proto */
1478 static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
1479 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
1480 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
1481 #else
1482 #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
1483 #endif
1484
1485 /* PyIntBinop.proto */
1486 #if !CYTHON_COMPILING_IN_PYPY
1487 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1488 #else
1489 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1490 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1491 #endif
1492
1493 /* DictGetItem.proto */
1494 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
1495 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
1496 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
1497 (likely(PyDict_CheckExact(obj)) ?\
1498 __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
1499 #else
1500 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1501 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
1502 #endif
1503
1504 /* PyErrExceptionMatches.proto */
1505 #if CYTHON_FAST_THREAD_STATE
1506 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1507 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1508 #else
1509 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1510 #endif
1511
1512 /* GetAttr.proto */
1513 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1514
1515 /* GetAttr3.proto */
1516 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1517
1518 /* PyObjectSetAttrStr.proto */
1519 #if CYTHON_USE_TYPE_SLOTS
1520 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
1521 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
1522 #else
1523 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
1524 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
1525 #endif
1526
1527 /* PyObjectCallNoArg.proto */
1528 #if CYTHON_COMPILING_IN_CPYTHON
1529 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1530 #else
1531 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1532 #endif
1533
1534 /* RaiseTooManyValuesToUnpack.proto */
1535 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1536
1537 /* RaiseNeedMoreValuesToUnpack.proto */
1538 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1539
1540 /* IterFinish.proto */
1541 static CYTHON_INLINE int __Pyx_IterFinish(void);
1542
1543 /* UnpackItemEndCheck.proto */
1544 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
1545
1546 /* Import.proto */
1547 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1548
1549 /* ImportFrom.proto */
1550 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1551
1552 /* GetItemInt.proto */
1553 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1554 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1555 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1556 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1557 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1558 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1559 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1560 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1561 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1562 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1563 int wraparound, int boundscheck);
1564 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1565 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1566 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1567 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1568 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1569 int wraparound, int boundscheck);
1570 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1571 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1572 int is_list, int wraparound, int boundscheck);
1573
1574 /* HasAttr.proto */
1575 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
1576
1577 /* RaiseNoneIterError.proto */
1578 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1579
1580 /* ExtTypeTest.proto */
1581 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1582
1583 /* GetTopmostException.proto */
1584 #if CYTHON_USE_EXC_INFO_STACK
1585 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1586 #endif
1587
1588 /* SaveResetException.proto */
1589 #if CYTHON_FAST_THREAD_STATE
1590 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1591 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1592 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1593 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1594 #else
1595 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1596 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1597 #endif
1598
1599 /* GetException.proto */
1600 #if CYTHON_FAST_THREAD_STATE
1601 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1602 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1603 #else
1604 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1605 #endif
1606
1607 /* CallNextTpDealloc.proto */
1608 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);
1609
1610 /* CallNextTpTraverse.proto */
1611 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
1612
1613 /* CallNextTpClear.proto */
1614 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);
1615
1616 /* TypeImport.proto */
1617 #ifndef __PYX_HAVE_RT_ImportType_proto
1618 #define __PYX_HAVE_RT_ImportType_proto
1619 enum __Pyx_ImportType_CheckSize {
1620 __Pyx_ImportType_CheckSize_Error = 0,
1621 __Pyx_ImportType_CheckSize_Warn = 1,
1622 __Pyx_ImportType_CheckSize_Ignore = 2
1623 };
1624 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
1625 #endif
1626
1627 /* PyObject_GenericGetAttrNoDict.proto */
1628 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1629 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1630 #else
1631 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1632 #endif
1633
1634 /* PyObject_GenericGetAttr.proto */
1635 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1636 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1637 #else
1638 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1639 #endif
1640
1641 /* SetupReduce.proto */
1642 static int __Pyx_setup_reduce(PyObject* type_obj);
1643
1644 /* GetVTable.proto */
1645 static void* __Pyx_GetVtable(PyObject *dict);
1646
1647 /* CLineInTraceback.proto */
1648 #ifdef CYTHON_CLINE_IN_TRACEBACK
1649 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1650 #else
1651 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1652 #endif
1653
1654 /* CodeObjectCache.proto */
1655 typedef struct {
1656 PyCodeObject* code_object;
1657 int code_line;
1658 } __Pyx_CodeObjectCacheEntry;
1659 struct __Pyx_CodeObjectCache {
1660 int count;
1661 int max_count;
1662 __Pyx_CodeObjectCacheEntry* entries;
1663 };
1664 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1665 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1666 static PyCodeObject *__pyx_find_code_object(int code_line);
1667 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1668
1669 /* AddTraceback.proto */
1670 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1671 int py_line, const char *filename);
1672
1673 /* CIntToPy.proto */
1674 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_hid_t(hid_t value);
1675
1676 /* CIntToPy.proto */
1677 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1678
1679 /* RealImag.proto */
1680 #if CYTHON_CCOMPLEX
1681 #ifdef __cplusplus
1682 #define __Pyx_CREAL(z) ((z).real())
1683 #define __Pyx_CIMAG(z) ((z).imag())
1684 #else
1685 #define __Pyx_CREAL(z) (__real__(z))
1686 #define __Pyx_CIMAG(z) (__imag__(z))
1687 #endif
1688 #else
1689 #define __Pyx_CREAL(z) ((z).real)
1690 #define __Pyx_CIMAG(z) ((z).imag)
1691 #endif
1692 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
1693 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
1694 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
1695 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
1696 #else
1697 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1698 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
1699 #endif
1700
1701 /* Arithmetic.proto */
1702 #if CYTHON_CCOMPLEX
1703 #define __Pyx_c_eq_float(a, b) ((a)==(b))
1704 #define __Pyx_c_sum_float(a, b) ((a)+(b))
1705 #define __Pyx_c_diff_float(a, b) ((a)-(b))
1706 #define __Pyx_c_prod_float(a, b) ((a)*(b))
1707 #define __Pyx_c_quot_float(a, b) ((a)/(b))
1708 #define __Pyx_c_neg_float(a) (-(a))
1709 #ifdef __cplusplus
1710 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1711 #define __Pyx_c_conj_float(z) (::std::conj(z))
1712 #if 1
1713 #define __Pyx_c_abs_float(z) (::std::abs(z))
1714 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
1715 #endif
1716 #else
1717 #define __Pyx_c_is_zero_float(z) ((z)==0)
1718 #define __Pyx_c_conj_float(z) (conjf(z))
1719 #if 1
1720 #define __Pyx_c_abs_float(z) (cabsf(z))
1721 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
1722 #endif
1723 #endif
1724 #else
1725 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
1726 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
1727 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
1728 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
1729 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
1730 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
1731 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
1732 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
1733 #if 1
1734 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
1735 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
1736 #endif
1737 #endif
1738
1739 /* Arithmetic.proto */
1740 #if CYTHON_CCOMPLEX
1741 #define __Pyx_c_eq_double(a, b) ((a)==(b))
1742 #define __Pyx_c_sum_double(a, b) ((a)+(b))
1743 #define __Pyx_c_diff_double(a, b) ((a)-(b))
1744 #define __Pyx_c_prod_double(a, b) ((a)*(b))
1745 #define __Pyx_c_quot_double(a, b) ((a)/(b))
1746 #define __Pyx_c_neg_double(a) (-(a))
1747 #ifdef __cplusplus
1748 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
1749 #define __Pyx_c_conj_double(z) (::std::conj(z))
1750 #if 1
1751 #define __Pyx_c_abs_double(z) (::std::abs(z))
1752 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
1753 #endif
1754 #else
1755 #define __Pyx_c_is_zero_double(z) ((z)==0)
1756 #define __Pyx_c_conj_double(z) (conj(z))
1757 #if 1
1758 #define __Pyx_c_abs_double(z) (cabs(z))
1759 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
1760 #endif
1761 #endif
1762 #else
1763 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
1764 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
1765 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
1766 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
1767 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
1768 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
1769 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
1770 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
1771 #if 1
1772 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
1773 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
1774 #endif
1775 #endif
1776
1777 /* CIntToPy.proto */
1778 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1779
1780 /* CIntToPy.proto */
1781 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
1782
1783 /* CIntFromPy.proto */
1784 static CYTHON_INLINE hid_t __Pyx_PyInt_As_hid_t(PyObject *);
1785
1786 /* CIntFromPy.proto */
1787 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1788
1789 /* CIntFromPy.proto */
1790 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1791
1792 /* FastTypeChecks.proto */
1793 #if CYTHON_COMPILING_IN_CPYTHON
1794 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1795 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1796 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1797 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1798 #else
1799 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1800 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1801 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1802 #endif
1803 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1804
1805 /* CheckBinaryVersion.proto */
1806 static int __Pyx_check_binary_version(void);
1807
1808 /* FunctionImport.proto */
1809 static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
1810
1811 /* InitStrings.proto */
1812 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1813
1814
1815 /* Module declarations from 'cpython.buffer' */
1816
1817 /* Module declarations from 'libc.string' */
1818
1819 /* Module declarations from 'libc.stdio' */
1820
1821 /* Module declarations from '__builtin__' */
1822
1823 /* Module declarations from 'cpython.type' */
1824 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1825
1826 /* Module declarations from 'cpython.version' */
1827
1828 /* Module declarations from 'cpython.exc' */
1829
1830 /* Module declarations from 'cpython.module' */
1831
1832 /* Module declarations from 'cpython.mem' */
1833
1834 /* Module declarations from 'cpython.tuple' */
1835
1836 /* Module declarations from 'cpython.list' */
1837
1838 /* Module declarations from 'cpython.sequence' */
1839
1840 /* Module declarations from 'cpython.mapping' */
1841
1842 /* Module declarations from 'cpython.iterator' */
1843
1844 /* Module declarations from 'cpython.number' */
1845
1846 /* Module declarations from 'cpython.int' */
1847
1848 /* Module declarations from '__builtin__' */
1849
1850 /* Module declarations from 'cpython.bool' */
1851 static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
1852
1853 /* Module declarations from 'cpython.long' */
1854
1855 /* Module declarations from 'cpython.float' */
1856
1857 /* Module declarations from '__builtin__' */
1858
1859 /* Module declarations from 'cpython.complex' */
1860 static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
1861
1862 /* Module declarations from 'cpython.string' */
1863
1864 /* Module declarations from 'cpython.unicode' */
1865
1866 /* Module declarations from 'cpython.dict' */
1867
1868 /* Module declarations from 'cpython.instance' */
1869
1870 /* Module declarations from 'cpython.function' */
1871
1872 /* Module declarations from 'cpython.method' */
1873
1874 /* Module declarations from 'cpython.weakref' */
1875
1876 /* Module declarations from 'cpython.getargs' */
1877
1878 /* Module declarations from 'cpython.pythread' */
1879
1880 /* Module declarations from 'cpython.pystate' */
1881
1882 /* Module declarations from 'cpython.cobject' */
1883
1884 /* Module declarations from 'cpython.oldbuffer' */
1885
1886 /* Module declarations from 'cpython.set' */
1887
1888 /* Module declarations from 'cpython.bytes' */
1889
1890 /* Module declarations from 'cpython.pycapsule' */
1891
1892 /* Module declarations from 'cpython' */
1893
1894 /* Module declarations from 'cpython.object' */
1895
1896 /* Module declarations from 'cpython.ref' */
1897
1898 /* Module declarations from 'numpy' */
1899
1900 /* Module declarations from 'numpy' */
1901 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
1902 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
1903 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
1904 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
1905 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
1906 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
1907
1908 /* Module declarations from 'tables.definitions' */
1909
1910 /* Module declarations from 'tables.hdf5extension' */
1911 static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_Node = 0;
1912 static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_Leaf = 0;
1913 static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_Array = 0;
1914
1915 /* Module declarations from 'tables.utilsextension' */
1916 static PyObject *(*__pyx_f_6tables_14utilsextension_cstr_to_pystr)(char const *); /*proto*/
1917
1918 /* Module declarations from 'libc.stdlib' */
1919
1920 /* Module declarations from 'tables.linkextension' */
1921 static PyTypeObject *__pyx_ptype_6tables_13linkextension_Link = 0;
1922 static PyTypeObject *__pyx_ptype_6tables_13linkextension_SoftLink = 0;
1923 static PyTypeObject *__pyx_ptype_6tables_13linkextension_ExternalLink = 0;
1924 static PyObject *__pyx_f_6tables_13linkextension___pyx_unpickle_Link__set_state(struct __pyx_obj_6tables_13linkextension_Link *, PyObject *); /*proto*/
1925 static PyObject *__pyx_f_6tables_13linkextension___pyx_unpickle_SoftLink__set_state(struct __pyx_obj_6tables_13linkextension_SoftLink *, PyObject *); /*proto*/
1926 static PyObject *__pyx_f_6tables_13linkextension___pyx_unpickle_ExternalLink__set_state(struct __pyx_obj_6tables_13linkextension_ExternalLink *, PyObject *); /*proto*/
1927 #define __Pyx_MODULE_NAME "tables.linkextension"
1928 extern int __pyx_module_is_main_tables__linkextension;
1929 int __pyx_module_is_main_tables__linkextension = 0;
1930
1931 /* Implementation of 'tables.linkextension' */
1932 static PyObject *__pyx_builtin_ValueError;
1933 static PyObject *__pyx_builtin_range;
1934 static PyObject *__pyx_builtin_RuntimeError;
1935 static PyObject *__pyx_builtin_ImportError;
1936 static const char __pyx_k_[] = ":";
1937 static const char __pyx_k_get[] = "get";
1938 static const char __pyx_k_log[] = "_log";
1939 static const char __pyx_k_new[] = "__new__";
1940 static const char __pyx_k_ret[] = "ret";
1941 static const char __pyx_k_Link[] = "Link";
1942 static const char __pyx_k_dict[] = "__dict__";
1943 static const char __pyx_k_main[] = "__main__";
1944 static const char __pyx_k_name[] = "name";
1945 static const char __pyx_k_test[] = "__test__";
1946 static const char __pyx_k_links[] = "links";
1947 static const char __pyx_k_range[] = "range";
1948 static const char __pyx_k_stats[] = "stats";
1949 static const char __pyx_k_utf_8[] = "utf-8";
1950 static const char __pyx_k_encode[] = "encode";
1951 static const char __pyx_k_import[] = "__import__";
1952 static const char __pyx_k_name_2[] = "__name__";
1953 static const char __pyx_k_pickle[] = "pickle";
1954 static const char __pyx_k_reduce[] = "__reduce__";
1955 static const char __pyx_k_target[] = "target";
1956 static const char __pyx_k_update[] = "update";
1957 static const char __pyx_k_v_file[] = "_v_file";
1958 static const char __pyx_k_v_name[] = "_v_name";
1959 static const char __pyx_k_newname[] = "newname";
1960 static const char __pyx_k_SoftLink[] = "SoftLink";
1961 static const char __pyx_k_get_node[] = "get_node";
1962 static const char __pyx_k_getstate[] = "__getstate__";
1963 static const char __pyx_k_pyx_type[] = "__pyx_type";
1964 static const char __pyx_k_setstate[] = "__setstate__";
1965 static const char __pyx_k_v_parent[] = "_v_parent";
1966 static const char __pyx_k_link_buff[] = "link_buff";
1967 static const char __pyx_k_link_type[] = "link_type";
1968 static const char __pyx_k_newparent[] = "newparent";
1969 static const char __pyx_k_parent_id[] = "parent_id";
1970 static const char __pyx_k_pyx_state[] = "__pyx_state";
1971 static const char __pyx_k_recursive[] = "recursive";
1972 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1973 static const char __pyx_k_ValueError[] = "ValueError";
1974 static const char __pyx_k_exceptions[] = "exceptions";
1975 static const char __pyx_k_parentnode[] = "parentnode";
1976 static const char __pyx_k_pyx_result[] = "__pyx_result";
1977 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1978 static const char __pyx_k_targetnode[] = "targetnode";
1979 static const char __pyx_k_v_objectid[] = "_v_objectid";
1980 static const char __pyx_k_ImportError[] = "ImportError";
1981 static const char __pyx_k_PickleError[] = "PickleError";
1982 static const char __pyx_k_ExternalLink[] = "ExternalLink";
1983 static const char __pyx_k_HDF5ExtError[] = "HDF5ExtError";
1984 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1985 static const char __pyx_k_encoded_name[] = "encoded_name";
1986 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
1987 static const char __pyx_k_stringsource[] = "stringsource";
1988 static const char __pyx_k_UnImplemented[] = "UnImplemented";
1989 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1990 static const char __pyx_k_encoded_v_name[] = "encoded_v_name";
1991 static const char __pyx_k_get_link_class[] = "_get_link_class";
1992 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
1993 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1994 static const char __pyx_k_get_filename_node[] = "_get_filename_node";
1995 static const char __pyx_k_pyx_unpickle_Link[] = "__pyx_unpickle_Link";
1996 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1997 static const char __pyx_k_g_create_hard_link[] = "_g_create_hard_link";
1998 static const char __pyx_k_tables_linkextension[] = "tables.linkextension";
1999 static const char __pyx_k_pyx_unpickle_SoftLink[] = "__pyx_unpickle_SoftLink";
2000 static const char __pyx_k_failed_to_copy_HDF5_link[] = "failed to copy HDF5 link";
2001 static const char __pyx_k_tables_linkextension_pyx[] = "tables/linkextension.pyx";
2002 static const char __pyx_k_pyx_unpickle_ExternalLink[] = "__pyx_unpickle_ExternalLink";
2003 static const char __pyx_k_failed_to_get_target_value[] = "failed to get target value";
2004 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
2005 static const char __pyx_k_failed_to_get_info_about_link[] = "failed to get info about link";
2006 static const char __pyx_k_failed_to_create_HDF5_hard_link[] = "failed to create HDF5 hard link";
2007 static const char __pyx_k_failed_to_create_HDF5_soft_link[] = "failed to create HDF5 soft link";
2008 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
2009 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
2010 static const char __pyx_k_Cython_functions_and_classes_for[] = "Cython functions and classes for supporting links in HDF5.";
2011 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
2012 static const char __pyx_k_Incompatible_checksums_s_vs_0x38[] = "Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))";
2013 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
2014 static const char __pyx_k_failed_to_create_HDF5_external_l[] = "failed to create HDF5 external link";
2015 static const char __pyx_k_failed_to_get_info_about_externa[] = "failed to get info about external link";
2016 static const char __pyx_k_failed_to_get_info_about_soft_li[] = "failed to get info about soft link";
2017 static const char __pyx_k_failed_to_unpack_external_link_v[] = "failed to unpack external link value";
2018 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
2019 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2020 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
2021 static PyObject *__pyx_kp_s_;
2022 static PyObject *__pyx_n_s_ExternalLink;
2023 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
2024 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
2025 static PyObject *__pyx_n_s_HDF5ExtError;
2026 static PyObject *__pyx_n_s_ImportError;
2027 static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x38;
2028 static PyObject *__pyx_n_s_Link;
2029 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
2030 static PyObject *__pyx_n_s_PickleError;
2031 static PyObject *__pyx_n_s_RuntimeError;
2032 static PyObject *__pyx_n_s_SoftLink;
2033 static PyObject *__pyx_n_s_UnImplemented;
2034 static PyObject *__pyx_n_s_ValueError;
2035 static PyObject *__pyx_n_s_cline_in_traceback;
2036 static PyObject *__pyx_n_s_dict;
2037 static PyObject *__pyx_n_s_encode;
2038 static PyObject *__pyx_n_s_encoded_name;
2039 static PyObject *__pyx_n_s_encoded_v_name;
2040 static PyObject *__pyx_n_s_exceptions;
2041 static PyObject *__pyx_kp_s_failed_to_copy_HDF5_link;
2042 static PyObject *__pyx_kp_s_failed_to_create_HDF5_external_l;
2043 static PyObject *__pyx_kp_s_failed_to_create_HDF5_hard_link;
2044 static PyObject *__pyx_kp_s_failed_to_create_HDF5_soft_link;
2045 static PyObject *__pyx_kp_s_failed_to_get_info_about_externa;
2046 static PyObject *__pyx_kp_s_failed_to_get_info_about_link;
2047 static PyObject *__pyx_kp_s_failed_to_get_info_about_soft_li;
2048 static PyObject *__pyx_kp_s_failed_to_get_target_value;
2049 static PyObject *__pyx_kp_s_failed_to_unpack_external_link_v;
2050 static PyObject *__pyx_n_s_g_create_hard_link;
2051 static PyObject *__pyx_n_s_get;
2052 static PyObject *__pyx_n_s_get_filename_node;
2053 static PyObject *__pyx_n_s_get_link_class;
2054 static PyObject *__pyx_n_s_get_node;
2055 static PyObject *__pyx_n_s_getstate;
2056 static PyObject *__pyx_n_s_import;
2057 static PyObject *__pyx_n_s_link_buff;
2058 static PyObject *__pyx_n_s_link_type;
2059 static PyObject *__pyx_n_s_links;
2060 static PyObject *__pyx_n_s_log;
2061 static PyObject *__pyx_n_s_main;
2062 static PyObject *__pyx_n_s_name;
2063 static PyObject *__pyx_n_s_name_2;
2064 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
2065 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
2066 static PyObject *__pyx_n_s_new;
2067 static PyObject *__pyx_n_s_newname;
2068 static PyObject *__pyx_n_s_newparent;
2069 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2070 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2071 static PyObject *__pyx_n_s_parent_id;
2072 static PyObject *__pyx_n_s_parentnode;
2073 static PyObject *__pyx_n_s_pickle;
2074 static PyObject *__pyx_n_s_pyx_PickleError;
2075 static PyObject *__pyx_n_s_pyx_checksum;
2076 static PyObject *__pyx_n_s_pyx_result;
2077 static PyObject *__pyx_n_s_pyx_state;
2078 static PyObject *__pyx_n_s_pyx_type;
2079 static PyObject *__pyx_n_s_pyx_unpickle_ExternalLink;
2080 static PyObject *__pyx_n_s_pyx_unpickle_Link;
2081 static PyObject *__pyx_n_s_pyx_unpickle_SoftLink;
2082 static PyObject *__pyx_n_s_pyx_vtable;
2083 static PyObject *__pyx_n_s_range;
2084 static PyObject *__pyx_n_s_recursive;
2085 static PyObject *__pyx_n_s_reduce;
2086 static PyObject *__pyx_n_s_reduce_cython;
2087 static PyObject *__pyx_n_s_reduce_ex;
2088 static PyObject *__pyx_n_s_ret;
2089 static PyObject *__pyx_n_s_setstate;
2090 static PyObject *__pyx_n_s_setstate_cython;
2091 static PyObject *__pyx_n_s_stats;
2092 static PyObject *__pyx_kp_s_stringsource;
2093 static PyObject *__pyx_n_s_tables_linkextension;
2094 static PyObject *__pyx_kp_s_tables_linkextension_pyx;
2095 static PyObject *__pyx_n_s_target;
2096 static PyObject *__pyx_n_s_targetnode;
2097 static PyObject *__pyx_n_s_test;
2098 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
2099 static PyObject *__pyx_n_s_update;
2100 static PyObject *__pyx_kp_s_utf_8;
2101 static PyObject *__pyx_n_s_v_file;
2102 static PyObject *__pyx_n_s_v_name;
2103 static PyObject *__pyx_n_s_v_objectid;
2104 static PyObject *__pyx_n_s_v_parent;
2105 static PyObject *__pyx_pf_6tables_13linkextension__get_link_class(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_parent_id, PyObject *__pyx_v_name); /* proto */
2106 static PyObject *__pyx_pf_6tables_13linkextension_2_g_create_hard_link(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_parentnode, PyObject *__pyx_v_name, PyObject *__pyx_v_targetnode); /* proto */
2107 static PyObject *__pyx_pf_6tables_13linkextension_4Link__g_copy(struct __pyx_obj_6tables_13linkextension_Link *__pyx_v_self, PyObject *__pyx_v_newparent, PyObject *__pyx_v_newname, CYTHON_UNUSED PyObject *__pyx_v_recursive, CYTHON_UNUSED PyObject *__pyx_v__log, PyObject *__pyx_v_kwargs); /* proto */
2108 static PyObject *__pyx_pf_6tables_13linkextension_4Link_2__reduce_cython__(struct __pyx_obj_6tables_13linkextension_Link *__pyx_v_self); /* proto */
2109 static PyObject *__pyx_pf_6tables_13linkextension_4Link_4__setstate_cython__(struct __pyx_obj_6tables_13linkextension_Link *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
2110 static PyObject *__pyx_pf_6tables_13linkextension_8SoftLink__g_create(struct __pyx_obj_6tables_13linkextension_SoftLink *__pyx_v_self); /* proto */
2111 static PyObject *__pyx_pf_6tables_13linkextension_8SoftLink_2_g_open(struct __pyx_obj_6tables_13linkextension_SoftLink *__pyx_v_self); /* proto */
2112 static PyObject *__pyx_pf_6tables_13linkextension_8SoftLink_4__reduce_cython__(struct __pyx_obj_6tables_13linkextension_SoftLink *__pyx_v_self); /* proto */
2113 static PyObject *__pyx_pf_6tables_13linkextension_8SoftLink_6__setstate_cython__(struct __pyx_obj_6tables_13linkextension_SoftLink *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
2114 static PyObject *__pyx_pf_6tables_13linkextension_12ExternalLink__g_create(struct __pyx_obj_6tables_13linkextension_ExternalLink *__pyx_v_self); /* proto */
2115 static PyObject *__pyx_pf_6tables_13linkextension_12ExternalLink_2_g_open(struct __pyx_obj_6tables_13linkextension_ExternalLink *__pyx_v_self); /* proto */
2116 static PyObject *__pyx_pf_6tables_13linkextension_12ExternalLink_4__reduce_cython__(struct __pyx_obj_6tables_13linkextension_ExternalLink *__pyx_v_self); /* proto */
2117 static PyObject *__pyx_pf_6tables_13linkextension_12ExternalLink_6__setstate_cython__(struct __pyx_obj_6tables_13linkextension_ExternalLink *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
2118 static PyObject *__pyx_pf_6tables_13linkextension_4__pyx_unpickle_Link(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
2119 static PyObject *__pyx_pf_6tables_13linkextension_6__pyx_unpickle_SoftLink(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
2120 static PyObject *__pyx_pf_6tables_13linkextension_8__pyx_unpickle_ExternalLink(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
2121 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2122 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
2123 static PyObject *__pyx_tp_new_6tables_13linkextension_Link(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2124 static PyObject *__pyx_tp_new_6tables_13linkextension_SoftLink(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2125 static PyObject *__pyx_tp_new_6tables_13linkextension_ExternalLink(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2126 static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0};
2127 static __Pyx_CachedCFunction __pyx_umethod_PyString_Type_encode = {0, &__pyx_n_s_encode, 0, 0, 0};
2128 static PyObject *__pyx_int_0;
2129 static PyObject *__pyx_int_1;
2130 static PyObject *__pyx_int_58832569;
2131 static PyObject *__pyx_tuple__2;
2132 static PyObject *__pyx_tuple__3;
2133 static PyObject *__pyx_tuple__4;
2134 static PyObject *__pyx_tuple__5;
2135 static PyObject *__pyx_tuple__6;
2136 static PyObject *__pyx_tuple__7;
2137 static PyObject *__pyx_tuple__8;
2138 static PyObject *__pyx_tuple__9;
2139 static PyObject *__pyx_tuple__11;
2140 static PyObject *__pyx_tuple__13;
2141 static PyObject *__pyx_tuple__15;
2142 static PyObject *__pyx_tuple__17;
2143 static PyObject *__pyx_codeobj__10;
2144 static PyObject *__pyx_codeobj__12;
2145 static PyObject *__pyx_codeobj__14;
2146 static PyObject *__pyx_codeobj__16;
2147 static PyObject *__pyx_codeobj__18;
2148 /* Late includes */
2149
2150 /* "tables/linkextension.pyx":88
2151 * # Helper functions
2152 *
2153 * def _get_link_class(parent_id, name): # <<<<<<<<<<<<<<
2154 * """Guess the link class."""
2155 *
2156 */
2157
2158 /* Python wrapper */
2159 static PyObject *__pyx_pw_6tables_13linkextension_1_get_link_class(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2160 static char __pyx_doc_6tables_13linkextension__get_link_class[] = "Guess the link class.";
2161 static PyMethodDef __pyx_mdef_6tables_13linkextension_1_get_link_class = {"_get_link_class", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_13linkextension_1_get_link_class, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6tables_13linkextension__get_link_class};
__pyx_pw_6tables_13linkextension_1_get_link_class(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)2162 static PyObject *__pyx_pw_6tables_13linkextension_1_get_link_class(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2163 PyObject *__pyx_v_parent_id = 0;
2164 PyObject *__pyx_v_name = 0;
2165 PyObject *__pyx_r = 0;
2166 __Pyx_RefNannyDeclarations
2167 __Pyx_RefNannySetupContext("_get_link_class (wrapper)", 0);
2168 {
2169 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent_id,&__pyx_n_s_name,0};
2170 PyObject* values[2] = {0,0};
2171 if (unlikely(__pyx_kwds)) {
2172 Py_ssize_t kw_args;
2173 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2174 switch (pos_args) {
2175 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2176 CYTHON_FALLTHROUGH;
2177 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2178 CYTHON_FALLTHROUGH;
2179 case 0: break;
2180 default: goto __pyx_L5_argtuple_error;
2181 }
2182 kw_args = PyDict_Size(__pyx_kwds);
2183 switch (pos_args) {
2184 case 0:
2185 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parent_id)) != 0)) kw_args--;
2186 else goto __pyx_L5_argtuple_error;
2187 CYTHON_FALLTHROUGH;
2188 case 1:
2189 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
2190 else {
2191 __Pyx_RaiseArgtupleInvalid("_get_link_class", 1, 2, 2, 1); __PYX_ERR(0, 88, __pyx_L3_error)
2192 }
2193 }
2194 if (unlikely(kw_args > 0)) {
2195 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_link_class") < 0)) __PYX_ERR(0, 88, __pyx_L3_error)
2196 }
2197 } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
2198 goto __pyx_L5_argtuple_error;
2199 } else {
2200 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2201 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2202 }
2203 __pyx_v_parent_id = values[0];
2204 __pyx_v_name = values[1];
2205 }
2206 goto __pyx_L4_argument_unpacking_done;
2207 __pyx_L5_argtuple_error:;
2208 __Pyx_RaiseArgtupleInvalid("_get_link_class", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 88, __pyx_L3_error)
2209 __pyx_L3_error:;
2210 __Pyx_AddTraceback("tables.linkextension._get_link_class", __pyx_clineno, __pyx_lineno, __pyx_filename);
2211 __Pyx_RefNannyFinishContext();
2212 return NULL;
2213 __pyx_L4_argument_unpacking_done:;
2214 __pyx_r = __pyx_pf_6tables_13linkextension__get_link_class(__pyx_self, __pyx_v_parent_id, __pyx_v_name);
2215
2216 /* function exit code */
2217 __Pyx_RefNannyFinishContext();
2218 return __pyx_r;
2219 }
2220
__pyx_pf_6tables_13linkextension__get_link_class(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v_parent_id,PyObject * __pyx_v_name)2221 static PyObject *__pyx_pf_6tables_13linkextension__get_link_class(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_parent_id, PyObject *__pyx_v_name) {
2222 herr_t __pyx_v_ret;
2223 H5L_info_t __pyx_v_link_buff;
2224 H5L_type_t __pyx_v_link_type;
2225 PyObject *__pyx_r = NULL;
2226 __Pyx_RefNannyDeclarations
2227 hid_t __pyx_t_1;
2228 char *__pyx_t_2;
2229 int __pyx_t_3;
2230 PyObject *__pyx_t_4 = NULL;
2231 PyObject *__pyx_t_5 = NULL;
2232 PyObject *__pyx_t_6 = NULL;
2233 H5L_type_t __pyx_t_7;
2234 __Pyx_RefNannySetupContext("_get_link_class", 0);
2235
2236 /* "tables/linkextension.pyx":95
2237 * cdef H5L_type_t link_type
2238 *
2239 * ret = H5Lget_info(parent_id, name, &link_buff, H5P_DEFAULT) # <<<<<<<<<<<<<<
2240 * if ret < 0:
2241 * raise HDF5ExtError("failed to get info about link")
2242 */
2243 __pyx_t_1 = __Pyx_PyInt_As_hid_t(__pyx_v_parent_id); if (unlikely((__pyx_t_1 == ((hid_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L1_error)
2244 __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_name); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L1_error)
2245 __pyx_v_ret = H5Lget_info(__pyx_t_1, __pyx_t_2, (&__pyx_v_link_buff), H5P_DEFAULT);
2246
2247 /* "tables/linkextension.pyx":96
2248 *
2249 * ret = H5Lget_info(parent_id, name, &link_buff, H5P_DEFAULT)
2250 * if ret < 0: # <<<<<<<<<<<<<<
2251 * raise HDF5ExtError("failed to get info about link")
2252 *
2253 */
2254 __pyx_t_3 = ((__pyx_v_ret < 0) != 0);
2255 if (unlikely(__pyx_t_3)) {
2256
2257 /* "tables/linkextension.pyx":97
2258 * ret = H5Lget_info(parent_id, name, &link_buff, H5P_DEFAULT)
2259 * if ret < 0:
2260 * raise HDF5ExtError("failed to get info about link") # <<<<<<<<<<<<<<
2261 *
2262 * link_type = link_buff.type
2263 */
2264 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error)
2265 __Pyx_GOTREF(__pyx_t_5);
2266 __pyx_t_6 = NULL;
2267 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
2268 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
2269 if (likely(__pyx_t_6)) {
2270 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
2271 __Pyx_INCREF(__pyx_t_6);
2272 __Pyx_INCREF(function);
2273 __Pyx_DECREF_SET(__pyx_t_5, function);
2274 }
2275 }
2276 __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_s_failed_to_get_info_about_link) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_failed_to_get_info_about_link);
2277 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2278 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
2279 __Pyx_GOTREF(__pyx_t_4);
2280 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2281 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
2282 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2283 __PYX_ERR(0, 97, __pyx_L1_error)
2284
2285 /* "tables/linkextension.pyx":96
2286 *
2287 * ret = H5Lget_info(parent_id, name, &link_buff, H5P_DEFAULT)
2288 * if ret < 0: # <<<<<<<<<<<<<<
2289 * raise HDF5ExtError("failed to get info about link")
2290 *
2291 */
2292 }
2293
2294 /* "tables/linkextension.pyx":99
2295 * raise HDF5ExtError("failed to get info about link")
2296 *
2297 * link_type = link_buff.type # <<<<<<<<<<<<<<
2298 * if link_type == H5L_TYPE_SOFT:
2299 * return "SoftLink"
2300 */
2301 __pyx_t_7 = __pyx_v_link_buff.type;
2302 __pyx_v_link_type = __pyx_t_7;
2303
2304 /* "tables/linkextension.pyx":100
2305 *
2306 * link_type = link_buff.type
2307 * if link_type == H5L_TYPE_SOFT: # <<<<<<<<<<<<<<
2308 * return "SoftLink"
2309 * elif link_type == H5L_TYPE_EXTERNAL:
2310 */
2311 switch (__pyx_v_link_type) {
2312 case H5L_TYPE_SOFT:
2313
2314 /* "tables/linkextension.pyx":101
2315 * link_type = link_buff.type
2316 * if link_type == H5L_TYPE_SOFT:
2317 * return "SoftLink" # <<<<<<<<<<<<<<
2318 * elif link_type == H5L_TYPE_EXTERNAL:
2319 * return "ExternalLink"
2320 */
2321 __Pyx_XDECREF(__pyx_r);
2322 __Pyx_INCREF(__pyx_n_s_SoftLink);
2323 __pyx_r = __pyx_n_s_SoftLink;
2324 goto __pyx_L0;
2325
2326 /* "tables/linkextension.pyx":100
2327 *
2328 * link_type = link_buff.type
2329 * if link_type == H5L_TYPE_SOFT: # <<<<<<<<<<<<<<
2330 * return "SoftLink"
2331 * elif link_type == H5L_TYPE_EXTERNAL:
2332 */
2333 break;
2334 case H5L_TYPE_EXTERNAL:
2335
2336 /* "tables/linkextension.pyx":103
2337 * return "SoftLink"
2338 * elif link_type == H5L_TYPE_EXTERNAL:
2339 * return "ExternalLink" # <<<<<<<<<<<<<<
2340 * else:
2341 * return "UnImplemented"
2342 */
2343 __Pyx_XDECREF(__pyx_r);
2344 __Pyx_INCREF(__pyx_n_s_ExternalLink);
2345 __pyx_r = __pyx_n_s_ExternalLink;
2346 goto __pyx_L0;
2347
2348 /* "tables/linkextension.pyx":102
2349 * if link_type == H5L_TYPE_SOFT:
2350 * return "SoftLink"
2351 * elif link_type == H5L_TYPE_EXTERNAL: # <<<<<<<<<<<<<<
2352 * return "ExternalLink"
2353 * else:
2354 */
2355 break;
2356 default:
2357
2358 /* "tables/linkextension.pyx":105
2359 * return "ExternalLink"
2360 * else:
2361 * return "UnImplemented" # <<<<<<<<<<<<<<
2362 *
2363 *
2364 */
2365 __Pyx_XDECREF(__pyx_r);
2366 __Pyx_INCREF(__pyx_n_s_UnImplemented);
2367 __pyx_r = __pyx_n_s_UnImplemented;
2368 goto __pyx_L0;
2369 break;
2370 }
2371
2372 /* "tables/linkextension.pyx":88
2373 * # Helper functions
2374 *
2375 * def _get_link_class(parent_id, name): # <<<<<<<<<<<<<<
2376 * """Guess the link class."""
2377 *
2378 */
2379
2380 /* function exit code */
2381 __pyx_L1_error:;
2382 __Pyx_XDECREF(__pyx_t_4);
2383 __Pyx_XDECREF(__pyx_t_5);
2384 __Pyx_XDECREF(__pyx_t_6);
2385 __Pyx_AddTraceback("tables.linkextension._get_link_class", __pyx_clineno, __pyx_lineno, __pyx_filename);
2386 __pyx_r = NULL;
2387 __pyx_L0:;
2388 __Pyx_XGIVEREF(__pyx_r);
2389 __Pyx_RefNannyFinishContext();
2390 return __pyx_r;
2391 }
2392
2393 /* "tables/linkextension.pyx":110
2394 *
2395 *
2396 * def _g_create_hard_link(parentnode, str name, targetnode): # <<<<<<<<<<<<<<
2397 * """Create a hard link in the file."""
2398 *
2399 */
2400
2401 /* Python wrapper */
2402 static PyObject *__pyx_pw_6tables_13linkextension_3_g_create_hard_link(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2403 static char __pyx_doc_6tables_13linkextension_2_g_create_hard_link[] = "Create a hard link in the file.";
2404 static PyMethodDef __pyx_mdef_6tables_13linkextension_3_g_create_hard_link = {"_g_create_hard_link", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_13linkextension_3_g_create_hard_link, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6tables_13linkextension_2_g_create_hard_link};
__pyx_pw_6tables_13linkextension_3_g_create_hard_link(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)2405 static PyObject *__pyx_pw_6tables_13linkextension_3_g_create_hard_link(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2406 PyObject *__pyx_v_parentnode = 0;
2407 PyObject *__pyx_v_name = 0;
2408 PyObject *__pyx_v_targetnode = 0;
2409 PyObject *__pyx_r = 0;
2410 __Pyx_RefNannyDeclarations
2411 __Pyx_RefNannySetupContext("_g_create_hard_link (wrapper)", 0);
2412 {
2413 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parentnode,&__pyx_n_s_name,&__pyx_n_s_targetnode,0};
2414 PyObject* values[3] = {0,0,0};
2415 if (unlikely(__pyx_kwds)) {
2416 Py_ssize_t kw_args;
2417 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2418 switch (pos_args) {
2419 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2420 CYTHON_FALLTHROUGH;
2421 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2422 CYTHON_FALLTHROUGH;
2423 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2424 CYTHON_FALLTHROUGH;
2425 case 0: break;
2426 default: goto __pyx_L5_argtuple_error;
2427 }
2428 kw_args = PyDict_Size(__pyx_kwds);
2429 switch (pos_args) {
2430 case 0:
2431 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parentnode)) != 0)) kw_args--;
2432 else goto __pyx_L5_argtuple_error;
2433 CYTHON_FALLTHROUGH;
2434 case 1:
2435 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
2436 else {
2437 __Pyx_RaiseArgtupleInvalid("_g_create_hard_link", 1, 3, 3, 1); __PYX_ERR(0, 110, __pyx_L3_error)
2438 }
2439 CYTHON_FALLTHROUGH;
2440 case 2:
2441 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_targetnode)) != 0)) kw_args--;
2442 else {
2443 __Pyx_RaiseArgtupleInvalid("_g_create_hard_link", 1, 3, 3, 2); __PYX_ERR(0, 110, __pyx_L3_error)
2444 }
2445 }
2446 if (unlikely(kw_args > 0)) {
2447 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_create_hard_link") < 0)) __PYX_ERR(0, 110, __pyx_L3_error)
2448 }
2449 } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
2450 goto __pyx_L5_argtuple_error;
2451 } else {
2452 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2453 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2454 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2455 }
2456 __pyx_v_parentnode = values[0];
2457 __pyx_v_name = ((PyObject*)values[1]);
2458 __pyx_v_targetnode = values[2];
2459 }
2460 goto __pyx_L4_argument_unpacking_done;
2461 __pyx_L5_argtuple_error:;
2462 __Pyx_RaiseArgtupleInvalid("_g_create_hard_link", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 110, __pyx_L3_error)
2463 __pyx_L3_error:;
2464 __Pyx_AddTraceback("tables.linkextension._g_create_hard_link", __pyx_clineno, __pyx_lineno, __pyx_filename);
2465 __Pyx_RefNannyFinishContext();
2466 return NULL;
2467 __pyx_L4_argument_unpacking_done:;
2468 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 110, __pyx_L1_error)
2469 __pyx_r = __pyx_pf_6tables_13linkextension_2_g_create_hard_link(__pyx_self, __pyx_v_parentnode, __pyx_v_name, __pyx_v_targetnode);
2470
2471 /* function exit code */
2472 goto __pyx_L0;
2473 __pyx_L1_error:;
2474 __pyx_r = NULL;
2475 __pyx_L0:;
2476 __Pyx_RefNannyFinishContext();
2477 return __pyx_r;
2478 }
2479
__pyx_pf_6tables_13linkextension_2_g_create_hard_link(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v_parentnode,PyObject * __pyx_v_name,PyObject * __pyx_v_targetnode)2480 static PyObject *__pyx_pf_6tables_13linkextension_2_g_create_hard_link(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_parentnode, PyObject *__pyx_v_name, PyObject *__pyx_v_targetnode) {
2481 herr_t __pyx_v_ret;
2482 PyObject *__pyx_v_encoded_name = 0;
2483 PyObject *__pyx_v_encoded_v_name = 0;
2484 PyObject *__pyx_r = NULL;
2485 __Pyx_RefNannyDeclarations
2486 PyObject *__pyx_t_1 = NULL;
2487 PyObject *__pyx_t_2 = NULL;
2488 PyObject *__pyx_t_3 = NULL;
2489 hid_t __pyx_t_4;
2490 char *__pyx_t_5;
2491 hid_t __pyx_t_6;
2492 char *__pyx_t_7;
2493 int __pyx_t_8;
2494 __Pyx_RefNannySetupContext("_g_create_hard_link", 0);
2495
2496 /* "tables/linkextension.pyx":114
2497 *
2498 * cdef herr_t ret
2499 * cdef bytes encoded_name = name.encode('utf-8') # <<<<<<<<<<<<<<
2500 * cdef bytes encoded_v_name = targetnode._v_name.encode('utf-8')
2501 *
2502 */
2503 __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_name, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
2504 __Pyx_GOTREF(__pyx_t_1);
2505 if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 114, __pyx_L1_error)
2506 __pyx_v_encoded_name = ((PyObject*)__pyx_t_1);
2507 __pyx_t_1 = 0;
2508
2509 /* "tables/linkextension.pyx":115
2510 * cdef herr_t ret
2511 * cdef bytes encoded_name = name.encode('utf-8')
2512 * cdef bytes encoded_v_name = targetnode._v_name.encode('utf-8') # <<<<<<<<<<<<<<
2513 *
2514 * ret = H5Lcreate_hard(targetnode._v_parent._v_objectid, encoded_v_name,
2515 */
2516 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_targetnode, __pyx_n_s_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
2517 __Pyx_GOTREF(__pyx_t_2);
2518 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
2519 __Pyx_GOTREF(__pyx_t_3);
2520 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2521 __pyx_t_2 = NULL;
2522 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
2523 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
2524 if (likely(__pyx_t_2)) {
2525 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2526 __Pyx_INCREF(__pyx_t_2);
2527 __Pyx_INCREF(function);
2528 __Pyx_DECREF_SET(__pyx_t_3, function);
2529 }
2530 }
2531 __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_utf_8);
2532 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
2533 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
2534 __Pyx_GOTREF(__pyx_t_1);
2535 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2536 if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 115, __pyx_L1_error)
2537 __pyx_v_encoded_v_name = ((PyObject*)__pyx_t_1);
2538 __pyx_t_1 = 0;
2539
2540 /* "tables/linkextension.pyx":117
2541 * cdef bytes encoded_v_name = targetnode._v_name.encode('utf-8')
2542 *
2543 * ret = H5Lcreate_hard(targetnode._v_parent._v_objectid, encoded_v_name, # <<<<<<<<<<<<<<
2544 * parentnode._v_objectid, <char*>encoded_name,
2545 * H5P_DEFAULT, H5P_DEFAULT)
2546 */
2547 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_targetnode, __pyx_n_s_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
2548 __Pyx_GOTREF(__pyx_t_1);
2549 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_v_objectid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
2550 __Pyx_GOTREF(__pyx_t_3);
2551 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2552 __pyx_t_4 = __Pyx_PyInt_As_hid_t(__pyx_t_3); if (unlikely((__pyx_t_4 == ((hid_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L1_error)
2553 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2554 if (unlikely(__pyx_v_encoded_v_name == Py_None)) {
2555 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
2556 __PYX_ERR(0, 117, __pyx_L1_error)
2557 }
2558 __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_v_name); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L1_error)
2559
2560 /* "tables/linkextension.pyx":118
2561 *
2562 * ret = H5Lcreate_hard(targetnode._v_parent._v_objectid, encoded_v_name,
2563 * parentnode._v_objectid, <char*>encoded_name, # <<<<<<<<<<<<<<
2564 * H5P_DEFAULT, H5P_DEFAULT)
2565 * if ret < 0:
2566 */
2567 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_parentnode, __pyx_n_s_v_objectid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
2568 __Pyx_GOTREF(__pyx_t_3);
2569 __pyx_t_6 = __Pyx_PyInt_As_hid_t(__pyx_t_3); if (unlikely((__pyx_t_6 == ((hid_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
2570 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2571 if (unlikely(__pyx_v_encoded_name == Py_None)) {
2572 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
2573 __PYX_ERR(0, 118, __pyx_L1_error)
2574 }
2575 __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
2576
2577 /* "tables/linkextension.pyx":117
2578 * cdef bytes encoded_v_name = targetnode._v_name.encode('utf-8')
2579 *
2580 * ret = H5Lcreate_hard(targetnode._v_parent._v_objectid, encoded_v_name, # <<<<<<<<<<<<<<
2581 * parentnode._v_objectid, <char*>encoded_name,
2582 * H5P_DEFAULT, H5P_DEFAULT)
2583 */
2584 __pyx_v_ret = H5Lcreate_hard(__pyx_t_4, __pyx_t_5, __pyx_t_6, ((char *)__pyx_t_7), H5P_DEFAULT, H5P_DEFAULT);
2585
2586 /* "tables/linkextension.pyx":120
2587 * parentnode._v_objectid, <char*>encoded_name,
2588 * H5P_DEFAULT, H5P_DEFAULT)
2589 * if ret < 0: # <<<<<<<<<<<<<<
2590 * raise HDF5ExtError("failed to create HDF5 hard link")
2591 *
2592 */
2593 __pyx_t_8 = ((__pyx_v_ret < 0) != 0);
2594 if (unlikely(__pyx_t_8)) {
2595
2596 /* "tables/linkextension.pyx":121
2597 * H5P_DEFAULT, H5P_DEFAULT)
2598 * if ret < 0:
2599 * raise HDF5ExtError("failed to create HDF5 hard link") # <<<<<<<<<<<<<<
2600 *
2601 *
2602 */
2603 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
2604 __Pyx_GOTREF(__pyx_t_1);
2605 __pyx_t_2 = NULL;
2606 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
2607 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
2608 if (likely(__pyx_t_2)) {
2609 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
2610 __Pyx_INCREF(__pyx_t_2);
2611 __Pyx_INCREF(function);
2612 __Pyx_DECREF_SET(__pyx_t_1, function);
2613 }
2614 }
2615 __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_kp_s_failed_to_create_HDF5_hard_link) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s_failed_to_create_HDF5_hard_link);
2616 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
2617 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
2618 __Pyx_GOTREF(__pyx_t_3);
2619 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2620 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
2621 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2622 __PYX_ERR(0, 121, __pyx_L1_error)
2623
2624 /* "tables/linkextension.pyx":120
2625 * parentnode._v_objectid, <char*>encoded_name,
2626 * H5P_DEFAULT, H5P_DEFAULT)
2627 * if ret < 0: # <<<<<<<<<<<<<<
2628 * raise HDF5ExtError("failed to create HDF5 hard link")
2629 *
2630 */
2631 }
2632
2633 /* "tables/linkextension.pyx":110
2634 *
2635 *
2636 * def _g_create_hard_link(parentnode, str name, targetnode): # <<<<<<<<<<<<<<
2637 * """Create a hard link in the file."""
2638 *
2639 */
2640
2641 /* function exit code */
2642 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2643 goto __pyx_L0;
2644 __pyx_L1_error:;
2645 __Pyx_XDECREF(__pyx_t_1);
2646 __Pyx_XDECREF(__pyx_t_2);
2647 __Pyx_XDECREF(__pyx_t_3);
2648 __Pyx_AddTraceback("tables.linkextension._g_create_hard_link", __pyx_clineno, __pyx_lineno, __pyx_filename);
2649 __pyx_r = NULL;
2650 __pyx_L0:;
2651 __Pyx_XDECREF(__pyx_v_encoded_name);
2652 __Pyx_XDECREF(__pyx_v_encoded_v_name);
2653 __Pyx_XGIVEREF(__pyx_r);
2654 __Pyx_RefNannyFinishContext();
2655 return __pyx_r;
2656 }
2657
2658 /* "tables/linkextension.pyx":133
2659 * """Extension class from which all link extensions inherits."""
2660 *
2661 * def _g_copy(self, newparent, newname, recursive, _log=True, **kwargs): # <<<<<<<<<<<<<<
2662 * """Private part for the _f_copy() method."""
2663 *
2664 */
2665
2666 /* Python wrapper */
2667 static PyObject *__pyx_pw_6tables_13linkextension_4Link_1_g_copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2668 static char __pyx_doc_6tables_13linkextension_4Link__g_copy[] = "Private part for the _f_copy() method.";
__pyx_pw_6tables_13linkextension_4Link_1_g_copy(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)2669 static PyObject *__pyx_pw_6tables_13linkextension_4Link_1_g_copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2670 PyObject *__pyx_v_newparent = 0;
2671 PyObject *__pyx_v_newname = 0;
2672 CYTHON_UNUSED PyObject *__pyx_v_recursive = 0;
2673 CYTHON_UNUSED PyObject *__pyx_v__log = 0;
2674 PyObject *__pyx_v_kwargs = 0;
2675 PyObject *__pyx_r = 0;
2676 __Pyx_RefNannyDeclarations
2677 __Pyx_RefNannySetupContext("_g_copy (wrapper)", 0);
2678 __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
2679 __Pyx_GOTREF(__pyx_v_kwargs);
2680 {
2681 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_newparent,&__pyx_n_s_newname,&__pyx_n_s_recursive,&__pyx_n_s_log,0};
2682 PyObject* values[4] = {0,0,0,0};
2683 values[3] = ((PyObject *)Py_True);
2684 if (unlikely(__pyx_kwds)) {
2685 Py_ssize_t kw_args;
2686 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2687 switch (pos_args) {
2688 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2689 CYTHON_FALLTHROUGH;
2690 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2691 CYTHON_FALLTHROUGH;
2692 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2693 CYTHON_FALLTHROUGH;
2694 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2695 CYTHON_FALLTHROUGH;
2696 case 0: break;
2697 default: goto __pyx_L5_argtuple_error;
2698 }
2699 kw_args = PyDict_Size(__pyx_kwds);
2700 switch (pos_args) {
2701 case 0:
2702 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newparent)) != 0)) kw_args--;
2703 else goto __pyx_L5_argtuple_error;
2704 CYTHON_FALLTHROUGH;
2705 case 1:
2706 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
2707 else {
2708 __Pyx_RaiseArgtupleInvalid("_g_copy", 0, 3, 4, 1); __PYX_ERR(0, 133, __pyx_L3_error)
2709 }
2710 CYTHON_FALLTHROUGH;
2711 case 2:
2712 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recursive)) != 0)) kw_args--;
2713 else {
2714 __Pyx_RaiseArgtupleInvalid("_g_copy", 0, 3, 4, 2); __PYX_ERR(0, 133, __pyx_L3_error)
2715 }
2716 CYTHON_FALLTHROUGH;
2717 case 3:
2718 if (kw_args > 0) {
2719 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_log);
2720 if (value) { values[3] = value; kw_args--; }
2721 }
2722 }
2723 if (unlikely(kw_args > 0)) {
2724 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "_g_copy") < 0)) __PYX_ERR(0, 133, __pyx_L3_error)
2725 }
2726 } else {
2727 switch (PyTuple_GET_SIZE(__pyx_args)) {
2728 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2729 CYTHON_FALLTHROUGH;
2730 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2731 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2732 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2733 break;
2734 default: goto __pyx_L5_argtuple_error;
2735 }
2736 }
2737 __pyx_v_newparent = values[0];
2738 __pyx_v_newname = values[1];
2739 __pyx_v_recursive = values[2];
2740 __pyx_v__log = values[3];
2741 }
2742 goto __pyx_L4_argument_unpacking_done;
2743 __pyx_L5_argtuple_error:;
2744 __Pyx_RaiseArgtupleInvalid("_g_copy", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 133, __pyx_L3_error)
2745 __pyx_L3_error:;
2746 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
2747 __Pyx_AddTraceback("tables.linkextension.Link._g_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2748 __Pyx_RefNannyFinishContext();
2749 return NULL;
2750 __pyx_L4_argument_unpacking_done:;
2751 __pyx_r = __pyx_pf_6tables_13linkextension_4Link__g_copy(((struct __pyx_obj_6tables_13linkextension_Link *)__pyx_v_self), __pyx_v_newparent, __pyx_v_newname, __pyx_v_recursive, __pyx_v__log, __pyx_v_kwargs);
2752
2753 /* function exit code */
2754 __Pyx_XDECREF(__pyx_v_kwargs);
2755 __Pyx_RefNannyFinishContext();
2756 return __pyx_r;
2757 }
2758
__pyx_pf_6tables_13linkextension_4Link__g_copy(struct __pyx_obj_6tables_13linkextension_Link * __pyx_v_self,PyObject * __pyx_v_newparent,PyObject * __pyx_v_newname,CYTHON_UNUSED PyObject * __pyx_v_recursive,CYTHON_UNUSED PyObject * __pyx_v__log,PyObject * __pyx_v_kwargs)2759 static PyObject *__pyx_pf_6tables_13linkextension_4Link__g_copy(struct __pyx_obj_6tables_13linkextension_Link *__pyx_v_self, PyObject *__pyx_v_newparent, PyObject *__pyx_v_newname, CYTHON_UNUSED PyObject *__pyx_v_recursive, CYTHON_UNUSED PyObject *__pyx_v__log, PyObject *__pyx_v_kwargs) {
2760 herr_t __pyx_v_ret;
2761 PyObject *__pyx_v_stats = 0;
2762 PyObject *__pyx_v_encoded_name = 0;
2763 PyObject *__pyx_v_encoded_newname = 0;
2764 PyObject *__pyx_r = NULL;
2765 __Pyx_RefNannyDeclarations
2766 PyObject *__pyx_t_1 = NULL;
2767 PyObject *__pyx_t_2 = NULL;
2768 PyObject *__pyx_t_3 = NULL;
2769 char *__pyx_t_4;
2770 hid_t __pyx_t_5;
2771 char *__pyx_t_6;
2772 int __pyx_t_7;
2773 int __pyx_t_8;
2774 PyObject *__pyx_t_9 = NULL;
2775 int __pyx_t_10;
2776 PyObject *__pyx_t_11 = NULL;
2777 __Pyx_RefNannySetupContext("_g_copy", 0);
2778
2779 /* "tables/linkextension.pyx":140
2780 * cdef bytes encoded_name, encoded_newname
2781 *
2782 * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<<
2783 * encoded_newname = newname.encode('utf-8')
2784 *
2785 */
2786 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
2787 __Pyx_GOTREF(__pyx_t_2);
2788 __pyx_t_3 = NULL;
2789 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
2790 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
2791 if (likely(__pyx_t_3)) {
2792 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
2793 __Pyx_INCREF(__pyx_t_3);
2794 __Pyx_INCREF(function);
2795 __Pyx_DECREF_SET(__pyx_t_2, function);
2796 }
2797 }
2798 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_utf_8);
2799 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
2800 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
2801 __Pyx_GOTREF(__pyx_t_1);
2802 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2803 if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 140, __pyx_L1_error)
2804 __pyx_v_encoded_name = ((PyObject*)__pyx_t_1);
2805 __pyx_t_1 = 0;
2806
2807 /* "tables/linkextension.pyx":141
2808 *
2809 * encoded_name = self.name.encode('utf-8')
2810 * encoded_newname = newname.encode('utf-8') # <<<<<<<<<<<<<<
2811 *
2812 * # @TODO: set property list --> utf-8
2813 */
2814 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_newname, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
2815 __Pyx_GOTREF(__pyx_t_2);
2816 __pyx_t_3 = NULL;
2817 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
2818 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
2819 if (likely(__pyx_t_3)) {
2820 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
2821 __Pyx_INCREF(__pyx_t_3);
2822 __Pyx_INCREF(function);
2823 __Pyx_DECREF_SET(__pyx_t_2, function);
2824 }
2825 }
2826 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_utf_8);
2827 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
2828 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
2829 __Pyx_GOTREF(__pyx_t_1);
2830 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2831 if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 141, __pyx_L1_error)
2832 __pyx_v_encoded_newname = ((PyObject*)__pyx_t_1);
2833 __pyx_t_1 = 0;
2834
2835 /* "tables/linkextension.pyx":144
2836 *
2837 * # @TODO: set property list --> utf-8
2838 * ret = H5Lcopy(self.parent_id, encoded_name, newparent._v_objectid, # <<<<<<<<<<<<<<
2839 * encoded_newname, H5P_DEFAULT, H5P_DEFAULT)
2840 * if ret < 0:
2841 */
2842 if (unlikely(__pyx_v_encoded_name == Py_None)) {
2843 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
2844 __PYX_ERR(0, 144, __pyx_L1_error)
2845 }
2846 __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_name); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error)
2847 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_newparent, __pyx_n_s_v_objectid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
2848 __Pyx_GOTREF(__pyx_t_1);
2849 __pyx_t_5 = __Pyx_PyInt_As_hid_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((hid_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error)
2850 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2851
2852 /* "tables/linkextension.pyx":145
2853 * # @TODO: set property list --> utf-8
2854 * ret = H5Lcopy(self.parent_id, encoded_name, newparent._v_objectid,
2855 * encoded_newname, H5P_DEFAULT, H5P_DEFAULT) # <<<<<<<<<<<<<<
2856 * if ret < 0:
2857 * raise HDF5ExtError("failed to copy HDF5 link")
2858 */
2859 if (unlikely(__pyx_v_encoded_newname == Py_None)) {
2860 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
2861 __PYX_ERR(0, 145, __pyx_L1_error)
2862 }
2863 __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_newname); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 145, __pyx_L1_error)
2864
2865 /* "tables/linkextension.pyx":144
2866 *
2867 * # @TODO: set property list --> utf-8
2868 * ret = H5Lcopy(self.parent_id, encoded_name, newparent._v_objectid, # <<<<<<<<<<<<<<
2869 * encoded_newname, H5P_DEFAULT, H5P_DEFAULT)
2870 * if ret < 0:
2871 */
2872 __pyx_v_ret = H5Lcopy(__pyx_v_self->__pyx_base.parent_id, __pyx_t_4, __pyx_t_5, __pyx_t_6, H5P_DEFAULT, H5P_DEFAULT);
2873
2874 /* "tables/linkextension.pyx":146
2875 * ret = H5Lcopy(self.parent_id, encoded_name, newparent._v_objectid,
2876 * encoded_newname, H5P_DEFAULT, H5P_DEFAULT)
2877 * if ret < 0: # <<<<<<<<<<<<<<
2878 * raise HDF5ExtError("failed to copy HDF5 link")
2879 *
2880 */
2881 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
2882 if (unlikely(__pyx_t_7)) {
2883
2884 /* "tables/linkextension.pyx":147
2885 * encoded_newname, H5P_DEFAULT, H5P_DEFAULT)
2886 * if ret < 0:
2887 * raise HDF5ExtError("failed to copy HDF5 link") # <<<<<<<<<<<<<<
2888 *
2889 * # Update statistics if needed.
2890 */
2891 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
2892 __Pyx_GOTREF(__pyx_t_2);
2893 __pyx_t_3 = NULL;
2894 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
2895 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
2896 if (likely(__pyx_t_3)) {
2897 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
2898 __Pyx_INCREF(__pyx_t_3);
2899 __Pyx_INCREF(function);
2900 __Pyx_DECREF_SET(__pyx_t_2, function);
2901 }
2902 }
2903 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_failed_to_copy_HDF5_link) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_failed_to_copy_HDF5_link);
2904 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
2905 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
2906 __Pyx_GOTREF(__pyx_t_1);
2907 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2908 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
2909 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2910 __PYX_ERR(0, 147, __pyx_L1_error)
2911
2912 /* "tables/linkextension.pyx":146
2913 * ret = H5Lcopy(self.parent_id, encoded_name, newparent._v_objectid,
2914 * encoded_newname, H5P_DEFAULT, H5P_DEFAULT)
2915 * if ret < 0: # <<<<<<<<<<<<<<
2916 * raise HDF5ExtError("failed to copy HDF5 link")
2917 *
2918 */
2919 }
2920
2921 /* "tables/linkextension.pyx":150
2922 *
2923 * # Update statistics if needed.
2924 * stats = kwargs.get('stats', None) # <<<<<<<<<<<<<<
2925 * if stats is not None:
2926 * stats['links'] += 1
2927 */
2928 __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_stats, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
2929 __Pyx_GOTREF(__pyx_t_1);
2930 __pyx_v_stats = __pyx_t_1;
2931 __pyx_t_1 = 0;
2932
2933 /* "tables/linkextension.pyx":151
2934 * # Update statistics if needed.
2935 * stats = kwargs.get('stats', None)
2936 * if stats is not None: # <<<<<<<<<<<<<<
2937 * stats['links'] += 1
2938 *
2939 */
2940 __pyx_t_7 = (__pyx_v_stats != Py_None);
2941 __pyx_t_8 = (__pyx_t_7 != 0);
2942 if (__pyx_t_8) {
2943
2944 /* "tables/linkextension.pyx":152
2945 * stats = kwargs.get('stats', None)
2946 * if stats is not None:
2947 * stats['links'] += 1 # <<<<<<<<<<<<<<
2948 *
2949 * return newparent._v_file.get_node(newparent, newname)
2950 */
2951 __Pyx_INCREF(__pyx_n_s_links);
2952 __pyx_t_9 = __pyx_n_s_links;
2953 __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stats, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
2954 __Pyx_GOTREF(__pyx_t_1);
2955 __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
2956 __Pyx_GOTREF(__pyx_t_2);
2957 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2958 if (unlikely(PyObject_SetItem(__pyx_v_stats, __pyx_t_9, __pyx_t_2) < 0)) __PYX_ERR(0, 152, __pyx_L1_error)
2959 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2960 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
2961
2962 /* "tables/linkextension.pyx":151
2963 * # Update statistics if needed.
2964 * stats = kwargs.get('stats', None)
2965 * if stats is not None: # <<<<<<<<<<<<<<
2966 * stats['links'] += 1
2967 *
2968 */
2969 }
2970
2971 /* "tables/linkextension.pyx":154
2972 * stats['links'] += 1
2973 *
2974 * return newparent._v_file.get_node(newparent, newname) # <<<<<<<<<<<<<<
2975 *
2976 *
2977 */
2978 __Pyx_XDECREF(__pyx_r);
2979 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_newparent, __pyx_n_s_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
2980 __Pyx_GOTREF(__pyx_t_1);
2981 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
2982 __Pyx_GOTREF(__pyx_t_3);
2983 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2984 __pyx_t_1 = NULL;
2985 __pyx_t_10 = 0;
2986 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
2987 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
2988 if (likely(__pyx_t_1)) {
2989 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2990 __Pyx_INCREF(__pyx_t_1);
2991 __Pyx_INCREF(function);
2992 __Pyx_DECREF_SET(__pyx_t_3, function);
2993 __pyx_t_10 = 1;
2994 }
2995 }
2996 #if CYTHON_FAST_PYCALL
2997 if (PyFunction_Check(__pyx_t_3)) {
2998 PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_newparent, __pyx_v_newname};
2999 __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
3000 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3001 __Pyx_GOTREF(__pyx_t_2);
3002 } else
3003 #endif
3004 #if CYTHON_FAST_PYCCALL
3005 if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
3006 PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_newparent, __pyx_v_newname};
3007 __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
3008 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3009 __Pyx_GOTREF(__pyx_t_2);
3010 } else
3011 #endif
3012 {
3013 __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 154, __pyx_L1_error)
3014 __Pyx_GOTREF(__pyx_t_11);
3015 if (__pyx_t_1) {
3016 __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
3017 }
3018 __Pyx_INCREF(__pyx_v_newparent);
3019 __Pyx_GIVEREF(__pyx_v_newparent);
3020 PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_newparent);
3021 __Pyx_INCREF(__pyx_v_newname);
3022 __Pyx_GIVEREF(__pyx_v_newname);
3023 PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_newname);
3024 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
3025 __Pyx_GOTREF(__pyx_t_2);
3026 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3027 }
3028 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3029 __pyx_r = __pyx_t_2;
3030 __pyx_t_2 = 0;
3031 goto __pyx_L0;
3032
3033 /* "tables/linkextension.pyx":133
3034 * """Extension class from which all link extensions inherits."""
3035 *
3036 * def _g_copy(self, newparent, newname, recursive, _log=True, **kwargs): # <<<<<<<<<<<<<<
3037 * """Private part for the _f_copy() method."""
3038 *
3039 */
3040
3041 /* function exit code */
3042 __pyx_L1_error:;
3043 __Pyx_XDECREF(__pyx_t_1);
3044 __Pyx_XDECREF(__pyx_t_2);
3045 __Pyx_XDECREF(__pyx_t_3);
3046 __Pyx_XDECREF(__pyx_t_9);
3047 __Pyx_XDECREF(__pyx_t_11);
3048 __Pyx_AddTraceback("tables.linkextension.Link._g_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
3049 __pyx_r = NULL;
3050 __pyx_L0:;
3051 __Pyx_XDECREF(__pyx_v_stats);
3052 __Pyx_XDECREF(__pyx_v_encoded_name);
3053 __Pyx_XDECREF(__pyx_v_encoded_newname);
3054 __Pyx_XGIVEREF(__pyx_r);
3055 __Pyx_RefNannyFinishContext();
3056 return __pyx_r;
3057 }
3058
3059 /* "(tree fragment)":1
3060 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
3061 * cdef tuple state
3062 * cdef object _dict
3063 */
3064
3065 /* Python wrapper */
3066 static PyObject *__pyx_pw_6tables_13linkextension_4Link_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_6tables_13linkextension_4Link_3__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)3067 static PyObject *__pyx_pw_6tables_13linkextension_4Link_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3068 PyObject *__pyx_r = 0;
3069 __Pyx_RefNannyDeclarations
3070 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
3071 __pyx_r = __pyx_pf_6tables_13linkextension_4Link_2__reduce_cython__(((struct __pyx_obj_6tables_13linkextension_Link *)__pyx_v_self));
3072
3073 /* function exit code */
3074 __Pyx_RefNannyFinishContext();
3075 return __pyx_r;
3076 }
3077
__pyx_pf_6tables_13linkextension_4Link_2__reduce_cython__(struct __pyx_obj_6tables_13linkextension_Link * __pyx_v_self)3078 static PyObject *__pyx_pf_6tables_13linkextension_4Link_2__reduce_cython__(struct __pyx_obj_6tables_13linkextension_Link *__pyx_v_self) {
3079 PyObject *__pyx_v_state = 0;
3080 PyObject *__pyx_v__dict = 0;
3081 int __pyx_v_use_setstate;
3082 PyObject *__pyx_r = NULL;
3083 __Pyx_RefNannyDeclarations
3084 PyObject *__pyx_t_1 = NULL;
3085 PyObject *__pyx_t_2 = NULL;
3086 int __pyx_t_3;
3087 int __pyx_t_4;
3088 PyObject *__pyx_t_5 = NULL;
3089 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
3090
3091 /* "(tree fragment)":5
3092 * cdef object _dict
3093 * cdef bint use_setstate
3094 * state = (self.name, self.parent_id) # <<<<<<<<<<<<<<
3095 * _dict = getattr(self, '__dict__', None)
3096 * if _dict is not None:
3097 */
3098 __pyx_t_1 = __Pyx_PyInt_From_hid_t(__pyx_v_self->__pyx_base.parent_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
3099 __Pyx_GOTREF(__pyx_t_1);
3100 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
3101 __Pyx_GOTREF(__pyx_t_2);
3102 __Pyx_INCREF(__pyx_v_self->__pyx_base.name);
3103 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name);
3104 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->__pyx_base.name);
3105 __Pyx_GIVEREF(__pyx_t_1);
3106 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
3107 __pyx_t_1 = 0;
3108 __pyx_v_state = ((PyObject*)__pyx_t_2);
3109 __pyx_t_2 = 0;
3110
3111 /* "(tree fragment)":6
3112 * cdef bint use_setstate
3113 * state = (self.name, self.parent_id)
3114 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
3115 * if _dict is not None:
3116 * state += (_dict,)
3117 */
3118 __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
3119 __Pyx_GOTREF(__pyx_t_2);
3120 __pyx_v__dict = __pyx_t_2;
3121 __pyx_t_2 = 0;
3122
3123 /* "(tree fragment)":7
3124 * state = (self.name, self.parent_id)
3125 * _dict = getattr(self, '__dict__', None)
3126 * if _dict is not None: # <<<<<<<<<<<<<<
3127 * state += (_dict,)
3128 * use_setstate = True
3129 */
3130 __pyx_t_3 = (__pyx_v__dict != Py_None);
3131 __pyx_t_4 = (__pyx_t_3 != 0);
3132 if (__pyx_t_4) {
3133
3134 /* "(tree fragment)":8
3135 * _dict = getattr(self, '__dict__', None)
3136 * if _dict is not None:
3137 * state += (_dict,) # <<<<<<<<<<<<<<
3138 * use_setstate = True
3139 * else:
3140 */
3141 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
3142 __Pyx_GOTREF(__pyx_t_2);
3143 __Pyx_INCREF(__pyx_v__dict);
3144 __Pyx_GIVEREF(__pyx_v__dict);
3145 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
3146 __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
3147 __Pyx_GOTREF(__pyx_t_1);
3148 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3149 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
3150 __pyx_t_1 = 0;
3151
3152 /* "(tree fragment)":9
3153 * if _dict is not None:
3154 * state += (_dict,)
3155 * use_setstate = True # <<<<<<<<<<<<<<
3156 * else:
3157 * use_setstate = self.name is not None
3158 */
3159 __pyx_v_use_setstate = 1;
3160
3161 /* "(tree fragment)":7
3162 * state = (self.name, self.parent_id)
3163 * _dict = getattr(self, '__dict__', None)
3164 * if _dict is not None: # <<<<<<<<<<<<<<
3165 * state += (_dict,)
3166 * use_setstate = True
3167 */
3168 goto __pyx_L3;
3169 }
3170
3171 /* "(tree fragment)":11
3172 * use_setstate = True
3173 * else:
3174 * use_setstate = self.name is not None # <<<<<<<<<<<<<<
3175 * if use_setstate:
3176 * return __pyx_unpickle_Link, (type(self), 0x381b6b9, None), state
3177 */
3178 /*else*/ {
3179 __pyx_t_4 = (__pyx_v_self->__pyx_base.name != Py_None);
3180 __pyx_v_use_setstate = __pyx_t_4;
3181 }
3182 __pyx_L3:;
3183
3184 /* "(tree fragment)":12
3185 * else:
3186 * use_setstate = self.name is not None
3187 * if use_setstate: # <<<<<<<<<<<<<<
3188 * return __pyx_unpickle_Link, (type(self), 0x381b6b9, None), state
3189 * else:
3190 */
3191 __pyx_t_4 = (__pyx_v_use_setstate != 0);
3192 if (__pyx_t_4) {
3193
3194 /* "(tree fragment)":13
3195 * use_setstate = self.name is not None
3196 * if use_setstate:
3197 * return __pyx_unpickle_Link, (type(self), 0x381b6b9, None), state # <<<<<<<<<<<<<<
3198 * else:
3199 * return __pyx_unpickle_Link, (type(self), 0x381b6b9, state)
3200 */
3201 __Pyx_XDECREF(__pyx_r);
3202 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Link); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
3203 __Pyx_GOTREF(__pyx_t_1);
3204 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
3205 __Pyx_GOTREF(__pyx_t_2);
3206 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
3207 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
3208 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
3209 __Pyx_INCREF(__pyx_int_58832569);
3210 __Pyx_GIVEREF(__pyx_int_58832569);
3211 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_58832569);
3212 __Pyx_INCREF(Py_None);
3213 __Pyx_GIVEREF(Py_None);
3214 PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
3215 __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
3216 __Pyx_GOTREF(__pyx_t_5);
3217 __Pyx_GIVEREF(__pyx_t_1);
3218 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
3219 __Pyx_GIVEREF(__pyx_t_2);
3220 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
3221 __Pyx_INCREF(__pyx_v_state);
3222 __Pyx_GIVEREF(__pyx_v_state);
3223 PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
3224 __pyx_t_1 = 0;
3225 __pyx_t_2 = 0;
3226 __pyx_r = __pyx_t_5;
3227 __pyx_t_5 = 0;
3228 goto __pyx_L0;
3229
3230 /* "(tree fragment)":12
3231 * else:
3232 * use_setstate = self.name is not None
3233 * if use_setstate: # <<<<<<<<<<<<<<
3234 * return __pyx_unpickle_Link, (type(self), 0x381b6b9, None), state
3235 * else:
3236 */
3237 }
3238
3239 /* "(tree fragment)":15
3240 * return __pyx_unpickle_Link, (type(self), 0x381b6b9, None), state
3241 * else:
3242 * return __pyx_unpickle_Link, (type(self), 0x381b6b9, state) # <<<<<<<<<<<<<<
3243 * def __setstate_cython__(self, __pyx_state):
3244 * __pyx_unpickle_Link__set_state(self, __pyx_state)
3245 */
3246 /*else*/ {
3247 __Pyx_XDECREF(__pyx_r);
3248 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Link); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
3249 __Pyx_GOTREF(__pyx_t_5);
3250 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
3251 __Pyx_GOTREF(__pyx_t_2);
3252 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
3253 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
3254 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
3255 __Pyx_INCREF(__pyx_int_58832569);
3256 __Pyx_GIVEREF(__pyx_int_58832569);
3257 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_58832569);
3258 __Pyx_INCREF(__pyx_v_state);
3259 __Pyx_GIVEREF(__pyx_v_state);
3260 PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
3261 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
3262 __Pyx_GOTREF(__pyx_t_1);
3263 __Pyx_GIVEREF(__pyx_t_5);
3264 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
3265 __Pyx_GIVEREF(__pyx_t_2);
3266 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
3267 __pyx_t_5 = 0;
3268 __pyx_t_2 = 0;
3269 __pyx_r = __pyx_t_1;
3270 __pyx_t_1 = 0;
3271 goto __pyx_L0;
3272 }
3273
3274 /* "(tree fragment)":1
3275 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
3276 * cdef tuple state
3277 * cdef object _dict
3278 */
3279
3280 /* function exit code */
3281 __pyx_L1_error:;
3282 __Pyx_XDECREF(__pyx_t_1);
3283 __Pyx_XDECREF(__pyx_t_2);
3284 __Pyx_XDECREF(__pyx_t_5);
3285 __Pyx_AddTraceback("tables.linkextension.Link.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3286 __pyx_r = NULL;
3287 __pyx_L0:;
3288 __Pyx_XDECREF(__pyx_v_state);
3289 __Pyx_XDECREF(__pyx_v__dict);
3290 __Pyx_XGIVEREF(__pyx_r);
3291 __Pyx_RefNannyFinishContext();
3292 return __pyx_r;
3293 }
3294
3295 /* "(tree fragment)":16
3296 * else:
3297 * return __pyx_unpickle_Link, (type(self), 0x381b6b9, state)
3298 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
3299 * __pyx_unpickle_Link__set_state(self, __pyx_state)
3300 */
3301
3302 /* Python wrapper */
3303 static PyObject *__pyx_pw_6tables_13linkextension_4Link_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_6tables_13linkextension_4Link_5__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)3304 static PyObject *__pyx_pw_6tables_13linkextension_4Link_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
3305 PyObject *__pyx_r = 0;
3306 __Pyx_RefNannyDeclarations
3307 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
3308 __pyx_r = __pyx_pf_6tables_13linkextension_4Link_4__setstate_cython__(((struct __pyx_obj_6tables_13linkextension_Link *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
3309
3310 /* function exit code */
3311 __Pyx_RefNannyFinishContext();
3312 return __pyx_r;
3313 }
3314
__pyx_pf_6tables_13linkextension_4Link_4__setstate_cython__(struct __pyx_obj_6tables_13linkextension_Link * __pyx_v_self,PyObject * __pyx_v___pyx_state)3315 static PyObject *__pyx_pf_6tables_13linkextension_4Link_4__setstate_cython__(struct __pyx_obj_6tables_13linkextension_Link *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
3316 PyObject *__pyx_r = NULL;
3317 __Pyx_RefNannyDeclarations
3318 PyObject *__pyx_t_1 = NULL;
3319 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
3320
3321 /* "(tree fragment)":17
3322 * return __pyx_unpickle_Link, (type(self), 0x381b6b9, state)
3323 * def __setstate_cython__(self, __pyx_state):
3324 * __pyx_unpickle_Link__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
3325 */
3326 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
3327 __pyx_t_1 = __pyx_f_6tables_13linkextension___pyx_unpickle_Link__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
3328 __Pyx_GOTREF(__pyx_t_1);
3329 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3330
3331 /* "(tree fragment)":16
3332 * else:
3333 * return __pyx_unpickle_Link, (type(self), 0x381b6b9, state)
3334 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
3335 * __pyx_unpickle_Link__set_state(self, __pyx_state)
3336 */
3337
3338 /* function exit code */
3339 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3340 goto __pyx_L0;
3341 __pyx_L1_error:;
3342 __Pyx_XDECREF(__pyx_t_1);
3343 __Pyx_AddTraceback("tables.linkextension.Link.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3344 __pyx_r = NULL;
3345 __pyx_L0:;
3346 __Pyx_XGIVEREF(__pyx_r);
3347 __Pyx_RefNannyFinishContext();
3348 return __pyx_r;
3349 }
3350
3351 /* "tables/linkextension.pyx":160
3352 * """Extension class representing a soft link."""
3353 *
3354 * def _g_create(self): # <<<<<<<<<<<<<<
3355 * """Create the link in file."""
3356 *
3357 */
3358
3359 /* Python wrapper */
3360 static PyObject *__pyx_pw_6tables_13linkextension_8SoftLink_1_g_create(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3361 static char __pyx_doc_6tables_13linkextension_8SoftLink__g_create[] = "Create the link in file.";
__pyx_pw_6tables_13linkextension_8SoftLink_1_g_create(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)3362 static PyObject *__pyx_pw_6tables_13linkextension_8SoftLink_1_g_create(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3363 PyObject *__pyx_r = 0;
3364 __Pyx_RefNannyDeclarations
3365 __Pyx_RefNannySetupContext("_g_create (wrapper)", 0);
3366 __pyx_r = __pyx_pf_6tables_13linkextension_8SoftLink__g_create(((struct __pyx_obj_6tables_13linkextension_SoftLink *)__pyx_v_self));
3367
3368 /* function exit code */
3369 __Pyx_RefNannyFinishContext();
3370 return __pyx_r;
3371 }
3372
__pyx_pf_6tables_13linkextension_8SoftLink__g_create(struct __pyx_obj_6tables_13linkextension_SoftLink * __pyx_v_self)3373 static PyObject *__pyx_pf_6tables_13linkextension_8SoftLink__g_create(struct __pyx_obj_6tables_13linkextension_SoftLink *__pyx_v_self) {
3374 herr_t __pyx_v_ret;
3375 PyObject *__pyx_v_encoded_name = 0;
3376 PyObject *__pyx_v_encoded_target = 0;
3377 PyObject *__pyx_r = NULL;
3378 __Pyx_RefNannyDeclarations
3379 PyObject *__pyx_t_1 = NULL;
3380 PyObject *__pyx_t_2 = NULL;
3381 PyObject *__pyx_t_3 = NULL;
3382 char *__pyx_t_4;
3383 char *__pyx_t_5;
3384 int __pyx_t_6;
3385 __Pyx_RefNannySetupContext("_g_create", 0);
3386
3387 /* "tables/linkextension.pyx":164
3388 *
3389 * cdef herr_t ret
3390 * cdef bytes encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<<
3391 * cdef bytes encoded_target = self.target.encode('utf-8')
3392 *
3393 */
3394 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
3395 __Pyx_GOTREF(__pyx_t_2);
3396 __pyx_t_3 = NULL;
3397 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
3398 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3399 if (likely(__pyx_t_3)) {
3400 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3401 __Pyx_INCREF(__pyx_t_3);
3402 __Pyx_INCREF(function);
3403 __Pyx_DECREF_SET(__pyx_t_2, function);
3404 }
3405 }
3406 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_utf_8);
3407 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3408 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
3409 __Pyx_GOTREF(__pyx_t_1);
3410 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3411 if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 164, __pyx_L1_error)
3412 __pyx_v_encoded_name = ((PyObject*)__pyx_t_1);
3413 __pyx_t_1 = 0;
3414
3415 /* "tables/linkextension.pyx":165
3416 * cdef herr_t ret
3417 * cdef bytes encoded_name = self.name.encode('utf-8')
3418 * cdef bytes encoded_target = self.target.encode('utf-8') # <<<<<<<<<<<<<<
3419 *
3420 * ret = H5Lcreate_soft(encoded_target, self.parent_id, encoded_name,
3421 */
3422 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
3423 __Pyx_GOTREF(__pyx_t_2);
3424 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
3425 __Pyx_GOTREF(__pyx_t_3);
3426 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3427 __pyx_t_2 = NULL;
3428 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
3429 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
3430 if (likely(__pyx_t_2)) {
3431 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3432 __Pyx_INCREF(__pyx_t_2);
3433 __Pyx_INCREF(function);
3434 __Pyx_DECREF_SET(__pyx_t_3, function);
3435 }
3436 }
3437 __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_utf_8);
3438 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3439 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
3440 __Pyx_GOTREF(__pyx_t_1);
3441 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3442 if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 165, __pyx_L1_error)
3443 __pyx_v_encoded_target = ((PyObject*)__pyx_t_1);
3444 __pyx_t_1 = 0;
3445
3446 /* "tables/linkextension.pyx":167
3447 * cdef bytes encoded_target = self.target.encode('utf-8')
3448 *
3449 * ret = H5Lcreate_soft(encoded_target, self.parent_id, encoded_name, # <<<<<<<<<<<<<<
3450 * H5P_DEFAULT, H5P_DEFAULT)
3451 * if ret < 0:
3452 */
3453 if (unlikely(__pyx_v_encoded_target == Py_None)) {
3454 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
3455 __PYX_ERR(0, 167, __pyx_L1_error)
3456 }
3457 __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_target); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error)
3458 if (unlikely(__pyx_v_encoded_name == Py_None)) {
3459 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
3460 __PYX_ERR(0, 167, __pyx_L1_error)
3461 }
3462 __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_name); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error)
3463
3464 /* "tables/linkextension.pyx":168
3465 *
3466 * ret = H5Lcreate_soft(encoded_target, self.parent_id, encoded_name,
3467 * H5P_DEFAULT, H5P_DEFAULT) # <<<<<<<<<<<<<<
3468 * if ret < 0:
3469 * raise HDF5ExtError("failed to create HDF5 soft link")
3470 */
3471 __pyx_v_ret = H5Lcreate_soft(__pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.parent_id, __pyx_t_5, H5P_DEFAULT, H5P_DEFAULT);
3472
3473 /* "tables/linkextension.pyx":169
3474 * ret = H5Lcreate_soft(encoded_target, self.parent_id, encoded_name,
3475 * H5P_DEFAULT, H5P_DEFAULT)
3476 * if ret < 0: # <<<<<<<<<<<<<<
3477 * raise HDF5ExtError("failed to create HDF5 soft link")
3478 *
3479 */
3480 __pyx_t_6 = ((__pyx_v_ret < 0) != 0);
3481 if (unlikely(__pyx_t_6)) {
3482
3483 /* "tables/linkextension.pyx":170
3484 * H5P_DEFAULT, H5P_DEFAULT)
3485 * if ret < 0:
3486 * raise HDF5ExtError("failed to create HDF5 soft link") # <<<<<<<<<<<<<<
3487 *
3488 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links
3489 */
3490 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
3491 __Pyx_GOTREF(__pyx_t_3);
3492 __pyx_t_2 = NULL;
3493 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3494 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
3495 if (likely(__pyx_t_2)) {
3496 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3497 __Pyx_INCREF(__pyx_t_2);
3498 __Pyx_INCREF(function);
3499 __Pyx_DECREF_SET(__pyx_t_3, function);
3500 }
3501 }
3502 __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_failed_to_create_HDF5_soft_link) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_failed_to_create_HDF5_soft_link);
3503 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3504 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
3505 __Pyx_GOTREF(__pyx_t_1);
3506 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3507 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
3508 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3509 __PYX_ERR(0, 170, __pyx_L1_error)
3510
3511 /* "tables/linkextension.pyx":169
3512 * ret = H5Lcreate_soft(encoded_target, self.parent_id, encoded_name,
3513 * H5P_DEFAULT, H5P_DEFAULT)
3514 * if ret < 0: # <<<<<<<<<<<<<<
3515 * raise HDF5ExtError("failed to create HDF5 soft link")
3516 *
3517 */
3518 }
3519
3520 /* "tables/linkextension.pyx":172
3521 * raise HDF5ExtError("failed to create HDF5 soft link")
3522 *
3523 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links # <<<<<<<<<<<<<<
3524 *
3525 * def _g_open(self):
3526 */
3527 __Pyx_XDECREF(__pyx_r);
3528 __Pyx_INCREF(__pyx_int_0);
3529 __pyx_r = __pyx_int_0;
3530 goto __pyx_L0;
3531
3532 /* "tables/linkextension.pyx":160
3533 * """Extension class representing a soft link."""
3534 *
3535 * def _g_create(self): # <<<<<<<<<<<<<<
3536 * """Create the link in file."""
3537 *
3538 */
3539
3540 /* function exit code */
3541 __pyx_L1_error:;
3542 __Pyx_XDECREF(__pyx_t_1);
3543 __Pyx_XDECREF(__pyx_t_2);
3544 __Pyx_XDECREF(__pyx_t_3);
3545 __Pyx_AddTraceback("tables.linkextension.SoftLink._g_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
3546 __pyx_r = NULL;
3547 __pyx_L0:;
3548 __Pyx_XDECREF(__pyx_v_encoded_name);
3549 __Pyx_XDECREF(__pyx_v_encoded_target);
3550 __Pyx_XGIVEREF(__pyx_r);
3551 __Pyx_RefNannyFinishContext();
3552 return __pyx_r;
3553 }
3554
3555 /* "tables/linkextension.pyx":174
3556 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links
3557 *
3558 * def _g_open(self): # <<<<<<<<<<<<<<
3559 * """Open the link in file."""
3560 *
3561 */
3562
3563 /* Python wrapper */
3564 static PyObject *__pyx_pw_6tables_13linkextension_8SoftLink_3_g_open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3565 static char __pyx_doc_6tables_13linkextension_8SoftLink_2_g_open[] = "Open the link in file.";
__pyx_pw_6tables_13linkextension_8SoftLink_3_g_open(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)3566 static PyObject *__pyx_pw_6tables_13linkextension_8SoftLink_3_g_open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3567 PyObject *__pyx_r = 0;
3568 __Pyx_RefNannyDeclarations
3569 __Pyx_RefNannySetupContext("_g_open (wrapper)", 0);
3570 __pyx_r = __pyx_pf_6tables_13linkextension_8SoftLink_2_g_open(((struct __pyx_obj_6tables_13linkextension_SoftLink *)__pyx_v_self));
3571
3572 /* function exit code */
3573 __Pyx_RefNannyFinishContext();
3574 return __pyx_r;
3575 }
3576
__pyx_pf_6tables_13linkextension_8SoftLink_2_g_open(struct __pyx_obj_6tables_13linkextension_SoftLink * __pyx_v_self)3577 static PyObject *__pyx_pf_6tables_13linkextension_8SoftLink_2_g_open(struct __pyx_obj_6tables_13linkextension_SoftLink *__pyx_v_self) {
3578 herr_t __pyx_v_ret;
3579 H5L_info_t __pyx_v_link_buff;
3580 size_t __pyx_v_val_size;
3581 char *__pyx_v_clinkval;
3582 PyObject *__pyx_v_encoded_name = 0;
3583 PyObject *__pyx_r = NULL;
3584 __Pyx_RefNannyDeclarations
3585 PyObject *__pyx_t_1 = NULL;
3586 PyObject *__pyx_t_2 = NULL;
3587 PyObject *__pyx_t_3 = NULL;
3588 char *__pyx_t_4;
3589 int __pyx_t_5;
3590 size_t __pyx_t_6;
3591 __Pyx_RefNannySetupContext("_g_open", 0);
3592
3593 /* "tables/linkextension.pyx":183
3594 * cdef bytes encoded_name
3595 *
3596 * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<<
3597 *
3598 * ret = H5Lget_info(self.parent_id, encoded_name, &link_buff, H5P_DEFAULT)
3599 */
3600 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
3601 __Pyx_GOTREF(__pyx_t_2);
3602 __pyx_t_3 = NULL;
3603 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
3604 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3605 if (likely(__pyx_t_3)) {
3606 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3607 __Pyx_INCREF(__pyx_t_3);
3608 __Pyx_INCREF(function);
3609 __Pyx_DECREF_SET(__pyx_t_2, function);
3610 }
3611 }
3612 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_utf_8);
3613 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3614 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
3615 __Pyx_GOTREF(__pyx_t_1);
3616 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3617 if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 183, __pyx_L1_error)
3618 __pyx_v_encoded_name = ((PyObject*)__pyx_t_1);
3619 __pyx_t_1 = 0;
3620
3621 /* "tables/linkextension.pyx":185
3622 * encoded_name = self.name.encode('utf-8')
3623 *
3624 * ret = H5Lget_info(self.parent_id, encoded_name, &link_buff, H5P_DEFAULT) # <<<<<<<<<<<<<<
3625 * if ret < 0:
3626 * raise HDF5ExtError("failed to get info about soft link")
3627 */
3628 if (unlikely(__pyx_v_encoded_name == Py_None)) {
3629 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
3630 __PYX_ERR(0, 185, __pyx_L1_error)
3631 }
3632 __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_name); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L1_error)
3633 __pyx_v_ret = H5Lget_info(__pyx_v_self->__pyx_base.__pyx_base.parent_id, __pyx_t_4, (&__pyx_v_link_buff), H5P_DEFAULT);
3634
3635 /* "tables/linkextension.pyx":186
3636 *
3637 * ret = H5Lget_info(self.parent_id, encoded_name, &link_buff, H5P_DEFAULT)
3638 * if ret < 0: # <<<<<<<<<<<<<<
3639 * raise HDF5ExtError("failed to get info about soft link")
3640 *
3641 */
3642 __pyx_t_5 = ((__pyx_v_ret < 0) != 0);
3643 if (unlikely(__pyx_t_5)) {
3644
3645 /* "tables/linkextension.pyx":187
3646 * ret = H5Lget_info(self.parent_id, encoded_name, &link_buff, H5P_DEFAULT)
3647 * if ret < 0:
3648 * raise HDF5ExtError("failed to get info about soft link") # <<<<<<<<<<<<<<
3649 *
3650 * val_size = link_buff.u.val_size
3651 */
3652 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
3653 __Pyx_GOTREF(__pyx_t_2);
3654 __pyx_t_3 = NULL;
3655 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3656 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3657 if (likely(__pyx_t_3)) {
3658 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3659 __Pyx_INCREF(__pyx_t_3);
3660 __Pyx_INCREF(function);
3661 __Pyx_DECREF_SET(__pyx_t_2, function);
3662 }
3663 }
3664 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_failed_to_get_info_about_soft_li) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_failed_to_get_info_about_soft_li);
3665 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3666 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
3667 __Pyx_GOTREF(__pyx_t_1);
3668 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3669 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
3670 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3671 __PYX_ERR(0, 187, __pyx_L1_error)
3672
3673 /* "tables/linkextension.pyx":186
3674 *
3675 * ret = H5Lget_info(self.parent_id, encoded_name, &link_buff, H5P_DEFAULT)
3676 * if ret < 0: # <<<<<<<<<<<<<<
3677 * raise HDF5ExtError("failed to get info about soft link")
3678 *
3679 */
3680 }
3681
3682 /* "tables/linkextension.pyx":189
3683 * raise HDF5ExtError("failed to get info about soft link")
3684 *
3685 * val_size = link_buff.u.val_size # <<<<<<<<<<<<<<
3686 * clinkval = <char *>malloc(val_size)
3687 *
3688 */
3689 __pyx_t_6 = __pyx_v_link_buff.u.val_size;
3690 __pyx_v_val_size = __pyx_t_6;
3691
3692 /* "tables/linkextension.pyx":190
3693 *
3694 * val_size = link_buff.u.val_size
3695 * clinkval = <char *>malloc(val_size) # <<<<<<<<<<<<<<
3696 *
3697 * ret = H5Lget_val(self.parent_id, encoded_name, clinkval, val_size,
3698 */
3699 __pyx_v_clinkval = ((char *)malloc(__pyx_v_val_size));
3700
3701 /* "tables/linkextension.pyx":192
3702 * clinkval = <char *>malloc(val_size)
3703 *
3704 * ret = H5Lget_val(self.parent_id, encoded_name, clinkval, val_size, # <<<<<<<<<<<<<<
3705 * H5P_DEFAULT)
3706 * if ret < 0:
3707 */
3708 if (unlikely(__pyx_v_encoded_name == Py_None)) {
3709 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
3710 __PYX_ERR(0, 192, __pyx_L1_error)
3711 }
3712 __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_name); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 192, __pyx_L1_error)
3713
3714 /* "tables/linkextension.pyx":193
3715 *
3716 * ret = H5Lget_val(self.parent_id, encoded_name, clinkval, val_size,
3717 * H5P_DEFAULT) # <<<<<<<<<<<<<<
3718 * if ret < 0:
3719 * raise HDF5ExtError("failed to get target value")
3720 */
3721 __pyx_v_ret = H5Lget_val(__pyx_v_self->__pyx_base.__pyx_base.parent_id, __pyx_t_4, __pyx_v_clinkval, __pyx_v_val_size, H5P_DEFAULT);
3722
3723 /* "tables/linkextension.pyx":194
3724 * ret = H5Lget_val(self.parent_id, encoded_name, clinkval, val_size,
3725 * H5P_DEFAULT)
3726 * if ret < 0: # <<<<<<<<<<<<<<
3727 * raise HDF5ExtError("failed to get target value")
3728 *
3729 */
3730 __pyx_t_5 = ((__pyx_v_ret < 0) != 0);
3731 if (unlikely(__pyx_t_5)) {
3732
3733 /* "tables/linkextension.pyx":195
3734 * H5P_DEFAULT)
3735 * if ret < 0:
3736 * raise HDF5ExtError("failed to get target value") # <<<<<<<<<<<<<<
3737 *
3738 * if PY_MAJOR_VERSION > 2:
3739 */
3740 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
3741 __Pyx_GOTREF(__pyx_t_2);
3742 __pyx_t_3 = NULL;
3743 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3744 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3745 if (likely(__pyx_t_3)) {
3746 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3747 __Pyx_INCREF(__pyx_t_3);
3748 __Pyx_INCREF(function);
3749 __Pyx_DECREF_SET(__pyx_t_2, function);
3750 }
3751 }
3752 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_failed_to_get_target_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_failed_to_get_target_value);
3753 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3754 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
3755 __Pyx_GOTREF(__pyx_t_1);
3756 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3757 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
3758 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3759 __PYX_ERR(0, 195, __pyx_L1_error)
3760
3761 /* "tables/linkextension.pyx":194
3762 * ret = H5Lget_val(self.parent_id, encoded_name, clinkval, val_size,
3763 * H5P_DEFAULT)
3764 * if ret < 0: # <<<<<<<<<<<<<<
3765 * raise HDF5ExtError("failed to get target value")
3766 *
3767 */
3768 }
3769
3770 /* "tables/linkextension.pyx":197
3771 * raise HDF5ExtError("failed to get target value")
3772 *
3773 * if PY_MAJOR_VERSION > 2: # <<<<<<<<<<<<<<
3774 * self.target = PyUnicode_DecodeUTF8(clinkval, strlen(clinkval), NULL)
3775 * else:
3776 */
3777 __pyx_t_5 = ((PY_MAJOR_VERSION > 2) != 0);
3778 if (__pyx_t_5) {
3779
3780 /* "tables/linkextension.pyx":198
3781 *
3782 * if PY_MAJOR_VERSION > 2:
3783 * self.target = PyUnicode_DecodeUTF8(clinkval, strlen(clinkval), NULL) # <<<<<<<<<<<<<<
3784 * else:
3785 * self.target = clinkval
3786 */
3787 __pyx_t_1 = PyUnicode_DecodeUTF8(__pyx_v_clinkval, strlen(__pyx_v_clinkval), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error)
3788 __Pyx_GOTREF(__pyx_t_1);
3789 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target, __pyx_t_1) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
3790 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3791
3792 /* "tables/linkextension.pyx":197
3793 * raise HDF5ExtError("failed to get target value")
3794 *
3795 * if PY_MAJOR_VERSION > 2: # <<<<<<<<<<<<<<
3796 * self.target = PyUnicode_DecodeUTF8(clinkval, strlen(clinkval), NULL)
3797 * else:
3798 */
3799 goto __pyx_L5;
3800 }
3801
3802 /* "tables/linkextension.pyx":200
3803 * self.target = PyUnicode_DecodeUTF8(clinkval, strlen(clinkval), NULL)
3804 * else:
3805 * self.target = clinkval # <<<<<<<<<<<<<<
3806 *
3807 * # Release resources
3808 */
3809 /*else*/ {
3810 __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_clinkval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
3811 __Pyx_GOTREF(__pyx_t_1);
3812 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target, __pyx_t_1) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
3813 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3814 }
3815 __pyx_L5:;
3816
3817 /* "tables/linkextension.pyx":203
3818 *
3819 * # Release resources
3820 * free(clinkval) # <<<<<<<<<<<<<<
3821 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links
3822 *
3823 */
3824 free(__pyx_v_clinkval);
3825
3826 /* "tables/linkextension.pyx":204
3827 * # Release resources
3828 * free(clinkval)
3829 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links # <<<<<<<<<<<<<<
3830 *
3831 *
3832 */
3833 __Pyx_XDECREF(__pyx_r);
3834 __Pyx_INCREF(__pyx_int_0);
3835 __pyx_r = __pyx_int_0;
3836 goto __pyx_L0;
3837
3838 /* "tables/linkextension.pyx":174
3839 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links
3840 *
3841 * def _g_open(self): # <<<<<<<<<<<<<<
3842 * """Open the link in file."""
3843 *
3844 */
3845
3846 /* function exit code */
3847 __pyx_L1_error:;
3848 __Pyx_XDECREF(__pyx_t_1);
3849 __Pyx_XDECREF(__pyx_t_2);
3850 __Pyx_XDECREF(__pyx_t_3);
3851 __Pyx_AddTraceback("tables.linkextension.SoftLink._g_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
3852 __pyx_r = NULL;
3853 __pyx_L0:;
3854 __Pyx_XDECREF(__pyx_v_encoded_name);
3855 __Pyx_XGIVEREF(__pyx_r);
3856 __Pyx_RefNannyFinishContext();
3857 return __pyx_r;
3858 }
3859
3860 /* "(tree fragment)":1
3861 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
3862 * cdef tuple state
3863 * cdef object _dict
3864 */
3865
3866 /* Python wrapper */
3867 static PyObject *__pyx_pw_6tables_13linkextension_8SoftLink_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_6tables_13linkextension_8SoftLink_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)3868 static PyObject *__pyx_pw_6tables_13linkextension_8SoftLink_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3869 PyObject *__pyx_r = 0;
3870 __Pyx_RefNannyDeclarations
3871 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
3872 __pyx_r = __pyx_pf_6tables_13linkextension_8SoftLink_4__reduce_cython__(((struct __pyx_obj_6tables_13linkextension_SoftLink *)__pyx_v_self));
3873
3874 /* function exit code */
3875 __Pyx_RefNannyFinishContext();
3876 return __pyx_r;
3877 }
3878
__pyx_pf_6tables_13linkextension_8SoftLink_4__reduce_cython__(struct __pyx_obj_6tables_13linkextension_SoftLink * __pyx_v_self)3879 static PyObject *__pyx_pf_6tables_13linkextension_8SoftLink_4__reduce_cython__(struct __pyx_obj_6tables_13linkextension_SoftLink *__pyx_v_self) {
3880 PyObject *__pyx_v_state = 0;
3881 PyObject *__pyx_v__dict = 0;
3882 int __pyx_v_use_setstate;
3883 PyObject *__pyx_r = NULL;
3884 __Pyx_RefNannyDeclarations
3885 PyObject *__pyx_t_1 = NULL;
3886 PyObject *__pyx_t_2 = NULL;
3887 int __pyx_t_3;
3888 int __pyx_t_4;
3889 PyObject *__pyx_t_5 = NULL;
3890 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
3891
3892 /* "(tree fragment)":5
3893 * cdef object _dict
3894 * cdef bint use_setstate
3895 * state = (self.name, self.parent_id) # <<<<<<<<<<<<<<
3896 * _dict = getattr(self, '__dict__', None)
3897 * if _dict is not None:
3898 */
3899 __pyx_t_1 = __Pyx_PyInt_From_hid_t(__pyx_v_self->__pyx_base.__pyx_base.parent_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
3900 __Pyx_GOTREF(__pyx_t_1);
3901 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
3902 __Pyx_GOTREF(__pyx_t_2);
3903 __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name);
3904 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name);
3905 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->__pyx_base.__pyx_base.name);
3906 __Pyx_GIVEREF(__pyx_t_1);
3907 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
3908 __pyx_t_1 = 0;
3909 __pyx_v_state = ((PyObject*)__pyx_t_2);
3910 __pyx_t_2 = 0;
3911
3912 /* "(tree fragment)":6
3913 * cdef bint use_setstate
3914 * state = (self.name, self.parent_id)
3915 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
3916 * if _dict is not None:
3917 * state += (_dict,)
3918 */
3919 __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
3920 __Pyx_GOTREF(__pyx_t_2);
3921 __pyx_v__dict = __pyx_t_2;
3922 __pyx_t_2 = 0;
3923
3924 /* "(tree fragment)":7
3925 * state = (self.name, self.parent_id)
3926 * _dict = getattr(self, '__dict__', None)
3927 * if _dict is not None: # <<<<<<<<<<<<<<
3928 * state += (_dict,)
3929 * use_setstate = True
3930 */
3931 __pyx_t_3 = (__pyx_v__dict != Py_None);
3932 __pyx_t_4 = (__pyx_t_3 != 0);
3933 if (__pyx_t_4) {
3934
3935 /* "(tree fragment)":8
3936 * _dict = getattr(self, '__dict__', None)
3937 * if _dict is not None:
3938 * state += (_dict,) # <<<<<<<<<<<<<<
3939 * use_setstate = True
3940 * else:
3941 */
3942 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
3943 __Pyx_GOTREF(__pyx_t_2);
3944 __Pyx_INCREF(__pyx_v__dict);
3945 __Pyx_GIVEREF(__pyx_v__dict);
3946 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
3947 __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
3948 __Pyx_GOTREF(__pyx_t_1);
3949 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3950 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
3951 __pyx_t_1 = 0;
3952
3953 /* "(tree fragment)":9
3954 * if _dict is not None:
3955 * state += (_dict,)
3956 * use_setstate = True # <<<<<<<<<<<<<<
3957 * else:
3958 * use_setstate = self.name is not None
3959 */
3960 __pyx_v_use_setstate = 1;
3961
3962 /* "(tree fragment)":7
3963 * state = (self.name, self.parent_id)
3964 * _dict = getattr(self, '__dict__', None)
3965 * if _dict is not None: # <<<<<<<<<<<<<<
3966 * state += (_dict,)
3967 * use_setstate = True
3968 */
3969 goto __pyx_L3;
3970 }
3971
3972 /* "(tree fragment)":11
3973 * use_setstate = True
3974 * else:
3975 * use_setstate = self.name is not None # <<<<<<<<<<<<<<
3976 * if use_setstate:
3977 * return __pyx_unpickle_SoftLink, (type(self), 0x381b6b9, None), state
3978 */
3979 /*else*/ {
3980 __pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.name != Py_None);
3981 __pyx_v_use_setstate = __pyx_t_4;
3982 }
3983 __pyx_L3:;
3984
3985 /* "(tree fragment)":12
3986 * else:
3987 * use_setstate = self.name is not None
3988 * if use_setstate: # <<<<<<<<<<<<<<
3989 * return __pyx_unpickle_SoftLink, (type(self), 0x381b6b9, None), state
3990 * else:
3991 */
3992 __pyx_t_4 = (__pyx_v_use_setstate != 0);
3993 if (__pyx_t_4) {
3994
3995 /* "(tree fragment)":13
3996 * use_setstate = self.name is not None
3997 * if use_setstate:
3998 * return __pyx_unpickle_SoftLink, (type(self), 0x381b6b9, None), state # <<<<<<<<<<<<<<
3999 * else:
4000 * return __pyx_unpickle_SoftLink, (type(self), 0x381b6b9, state)
4001 */
4002 __Pyx_XDECREF(__pyx_r);
4003 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_SoftLink); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
4004 __Pyx_GOTREF(__pyx_t_1);
4005 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
4006 __Pyx_GOTREF(__pyx_t_2);
4007 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4008 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4009 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4010 __Pyx_INCREF(__pyx_int_58832569);
4011 __Pyx_GIVEREF(__pyx_int_58832569);
4012 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_58832569);
4013 __Pyx_INCREF(Py_None);
4014 __Pyx_GIVEREF(Py_None);
4015 PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
4016 __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
4017 __Pyx_GOTREF(__pyx_t_5);
4018 __Pyx_GIVEREF(__pyx_t_1);
4019 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
4020 __Pyx_GIVEREF(__pyx_t_2);
4021 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
4022 __Pyx_INCREF(__pyx_v_state);
4023 __Pyx_GIVEREF(__pyx_v_state);
4024 PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
4025 __pyx_t_1 = 0;
4026 __pyx_t_2 = 0;
4027 __pyx_r = __pyx_t_5;
4028 __pyx_t_5 = 0;
4029 goto __pyx_L0;
4030
4031 /* "(tree fragment)":12
4032 * else:
4033 * use_setstate = self.name is not None
4034 * if use_setstate: # <<<<<<<<<<<<<<
4035 * return __pyx_unpickle_SoftLink, (type(self), 0x381b6b9, None), state
4036 * else:
4037 */
4038 }
4039
4040 /* "(tree fragment)":15
4041 * return __pyx_unpickle_SoftLink, (type(self), 0x381b6b9, None), state
4042 * else:
4043 * return __pyx_unpickle_SoftLink, (type(self), 0x381b6b9, state) # <<<<<<<<<<<<<<
4044 * def __setstate_cython__(self, __pyx_state):
4045 * __pyx_unpickle_SoftLink__set_state(self, __pyx_state)
4046 */
4047 /*else*/ {
4048 __Pyx_XDECREF(__pyx_r);
4049 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_SoftLink); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
4050 __Pyx_GOTREF(__pyx_t_5);
4051 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
4052 __Pyx_GOTREF(__pyx_t_2);
4053 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4054 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4055 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4056 __Pyx_INCREF(__pyx_int_58832569);
4057 __Pyx_GIVEREF(__pyx_int_58832569);
4058 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_58832569);
4059 __Pyx_INCREF(__pyx_v_state);
4060 __Pyx_GIVEREF(__pyx_v_state);
4061 PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
4062 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
4063 __Pyx_GOTREF(__pyx_t_1);
4064 __Pyx_GIVEREF(__pyx_t_5);
4065 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
4066 __Pyx_GIVEREF(__pyx_t_2);
4067 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
4068 __pyx_t_5 = 0;
4069 __pyx_t_2 = 0;
4070 __pyx_r = __pyx_t_1;
4071 __pyx_t_1 = 0;
4072 goto __pyx_L0;
4073 }
4074
4075 /* "(tree fragment)":1
4076 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
4077 * cdef tuple state
4078 * cdef object _dict
4079 */
4080
4081 /* function exit code */
4082 __pyx_L1_error:;
4083 __Pyx_XDECREF(__pyx_t_1);
4084 __Pyx_XDECREF(__pyx_t_2);
4085 __Pyx_XDECREF(__pyx_t_5);
4086 __Pyx_AddTraceback("tables.linkextension.SoftLink.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4087 __pyx_r = NULL;
4088 __pyx_L0:;
4089 __Pyx_XDECREF(__pyx_v_state);
4090 __Pyx_XDECREF(__pyx_v__dict);
4091 __Pyx_XGIVEREF(__pyx_r);
4092 __Pyx_RefNannyFinishContext();
4093 return __pyx_r;
4094 }
4095
4096 /* "(tree fragment)":16
4097 * else:
4098 * return __pyx_unpickle_SoftLink, (type(self), 0x381b6b9, state)
4099 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
4100 * __pyx_unpickle_SoftLink__set_state(self, __pyx_state)
4101 */
4102
4103 /* Python wrapper */
4104 static PyObject *__pyx_pw_6tables_13linkextension_8SoftLink_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_6tables_13linkextension_8SoftLink_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)4105 static PyObject *__pyx_pw_6tables_13linkextension_8SoftLink_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
4106 PyObject *__pyx_r = 0;
4107 __Pyx_RefNannyDeclarations
4108 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
4109 __pyx_r = __pyx_pf_6tables_13linkextension_8SoftLink_6__setstate_cython__(((struct __pyx_obj_6tables_13linkextension_SoftLink *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
4110
4111 /* function exit code */
4112 __Pyx_RefNannyFinishContext();
4113 return __pyx_r;
4114 }
4115
__pyx_pf_6tables_13linkextension_8SoftLink_6__setstate_cython__(struct __pyx_obj_6tables_13linkextension_SoftLink * __pyx_v_self,PyObject * __pyx_v___pyx_state)4116 static PyObject *__pyx_pf_6tables_13linkextension_8SoftLink_6__setstate_cython__(struct __pyx_obj_6tables_13linkextension_SoftLink *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
4117 PyObject *__pyx_r = NULL;
4118 __Pyx_RefNannyDeclarations
4119 PyObject *__pyx_t_1 = NULL;
4120 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
4121
4122 /* "(tree fragment)":17
4123 * return __pyx_unpickle_SoftLink, (type(self), 0x381b6b9, state)
4124 * def __setstate_cython__(self, __pyx_state):
4125 * __pyx_unpickle_SoftLink__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
4126 */
4127 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
4128 __pyx_t_1 = __pyx_f_6tables_13linkextension___pyx_unpickle_SoftLink__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
4129 __Pyx_GOTREF(__pyx_t_1);
4130 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4131
4132 /* "(tree fragment)":16
4133 * else:
4134 * return __pyx_unpickle_SoftLink, (type(self), 0x381b6b9, state)
4135 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
4136 * __pyx_unpickle_SoftLink__set_state(self, __pyx_state)
4137 */
4138
4139 /* function exit code */
4140 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4141 goto __pyx_L0;
4142 __pyx_L1_error:;
4143 __Pyx_XDECREF(__pyx_t_1);
4144 __Pyx_AddTraceback("tables.linkextension.SoftLink.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4145 __pyx_r = NULL;
4146 __pyx_L0:;
4147 __Pyx_XGIVEREF(__pyx_r);
4148 __Pyx_RefNannyFinishContext();
4149 return __pyx_r;
4150 }
4151
4152 /* "tables/linkextension.pyx":210
4153 * """Extension class representing an external link."""
4154 *
4155 * def _g_create(self): # <<<<<<<<<<<<<<
4156 * """Create the link in file."""
4157 *
4158 */
4159
4160 /* Python wrapper */
4161 static PyObject *__pyx_pw_6tables_13linkextension_12ExternalLink_1_g_create(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4162 static char __pyx_doc_6tables_13linkextension_12ExternalLink__g_create[] = "Create the link in file.";
__pyx_pw_6tables_13linkextension_12ExternalLink_1_g_create(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)4163 static PyObject *__pyx_pw_6tables_13linkextension_12ExternalLink_1_g_create(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4164 PyObject *__pyx_r = 0;
4165 __Pyx_RefNannyDeclarations
4166 __Pyx_RefNannySetupContext("_g_create (wrapper)", 0);
4167 __pyx_r = __pyx_pf_6tables_13linkextension_12ExternalLink__g_create(((struct __pyx_obj_6tables_13linkextension_ExternalLink *)__pyx_v_self));
4168
4169 /* function exit code */
4170 __Pyx_RefNannyFinishContext();
4171 return __pyx_r;
4172 }
4173
__pyx_pf_6tables_13linkextension_12ExternalLink__g_create(struct __pyx_obj_6tables_13linkextension_ExternalLink * __pyx_v_self)4174 static PyObject *__pyx_pf_6tables_13linkextension_12ExternalLink__g_create(struct __pyx_obj_6tables_13linkextension_ExternalLink *__pyx_v_self) {
4175 herr_t __pyx_v_ret;
4176 PyObject *__pyx_v_encoded_name = 0;
4177 PyObject *__pyx_v_encoded_filename = 0;
4178 PyObject *__pyx_v_encoded_target = 0;
4179 PyObject *__pyx_v_filename = NULL;
4180 PyObject *__pyx_v_target = NULL;
4181 PyObject *__pyx_r = NULL;
4182 __Pyx_RefNannyDeclarations
4183 PyObject *__pyx_t_1 = NULL;
4184 PyObject *__pyx_t_2 = NULL;
4185 PyObject *__pyx_t_3 = NULL;
4186 PyObject *__pyx_t_4 = NULL;
4187 PyObject *(*__pyx_t_5)(PyObject *);
4188 char *__pyx_t_6;
4189 char *__pyx_t_7;
4190 char *__pyx_t_8;
4191 int __pyx_t_9;
4192 __Pyx_RefNannySetupContext("_g_create", 0);
4193
4194 /* "tables/linkextension.pyx":216
4195 * cdef bytes encoded_name, encoded_filename, encoded_target
4196 *
4197 * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<<
4198 *
4199 * filename, target = self._get_filename_node()
4200 */
4201 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
4202 __Pyx_GOTREF(__pyx_t_2);
4203 __pyx_t_3 = NULL;
4204 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4205 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4206 if (likely(__pyx_t_3)) {
4207 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4208 __Pyx_INCREF(__pyx_t_3);
4209 __Pyx_INCREF(function);
4210 __Pyx_DECREF_SET(__pyx_t_2, function);
4211 }
4212 }
4213 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_utf_8);
4214 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4215 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
4216 __Pyx_GOTREF(__pyx_t_1);
4217 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4218 if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 216, __pyx_L1_error)
4219 __pyx_v_encoded_name = ((PyObject*)__pyx_t_1);
4220 __pyx_t_1 = 0;
4221
4222 /* "tables/linkextension.pyx":218
4223 * encoded_name = self.name.encode('utf-8')
4224 *
4225 * filename, target = self._get_filename_node() # <<<<<<<<<<<<<<
4226 * encoded_filename = filename.encode('utf-8')
4227 * encoded_target = target.encode('utf-8')
4228 */
4229 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_filename_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
4230 __Pyx_GOTREF(__pyx_t_2);
4231 __pyx_t_3 = NULL;
4232 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4233 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4234 if (likely(__pyx_t_3)) {
4235 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4236 __Pyx_INCREF(__pyx_t_3);
4237 __Pyx_INCREF(function);
4238 __Pyx_DECREF_SET(__pyx_t_2, function);
4239 }
4240 }
4241 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4242 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4243 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
4244 __Pyx_GOTREF(__pyx_t_1);
4245 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4246 if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
4247 PyObject* sequence = __pyx_t_1;
4248 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
4249 if (unlikely(size != 2)) {
4250 if (size > 2) __Pyx_RaiseTooManyValuesError(2);
4251 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
4252 __PYX_ERR(0, 218, __pyx_L1_error)
4253 }
4254 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4255 if (likely(PyTuple_CheckExact(sequence))) {
4256 __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
4257 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
4258 } else {
4259 __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
4260 __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
4261 }
4262 __Pyx_INCREF(__pyx_t_2);
4263 __Pyx_INCREF(__pyx_t_3);
4264 #else
4265 __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
4266 __Pyx_GOTREF(__pyx_t_2);
4267 __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error)
4268 __Pyx_GOTREF(__pyx_t_3);
4269 #endif
4270 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4271 } else {
4272 Py_ssize_t index = -1;
4273 __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error)
4274 __Pyx_GOTREF(__pyx_t_4);
4275 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4276 __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
4277 index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
4278 __Pyx_GOTREF(__pyx_t_2);
4279 index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
4280 __Pyx_GOTREF(__pyx_t_3);
4281 if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
4282 __pyx_t_5 = NULL;
4283 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4284 goto __pyx_L4_unpacking_done;
4285 __pyx_L3_unpacking_failed:;
4286 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4287 __pyx_t_5 = NULL;
4288 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
4289 __PYX_ERR(0, 218, __pyx_L1_error)
4290 __pyx_L4_unpacking_done:;
4291 }
4292 __pyx_v_filename = __pyx_t_2;
4293 __pyx_t_2 = 0;
4294 __pyx_v_target = __pyx_t_3;
4295 __pyx_t_3 = 0;
4296
4297 /* "tables/linkextension.pyx":219
4298 *
4299 * filename, target = self._get_filename_node()
4300 * encoded_filename = filename.encode('utf-8') # <<<<<<<<<<<<<<
4301 * encoded_target = target.encode('utf-8')
4302 *
4303 */
4304 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
4305 __Pyx_GOTREF(__pyx_t_3);
4306 __pyx_t_2 = NULL;
4307 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4308 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4309 if (likely(__pyx_t_2)) {
4310 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4311 __Pyx_INCREF(__pyx_t_2);
4312 __Pyx_INCREF(function);
4313 __Pyx_DECREF_SET(__pyx_t_3, function);
4314 }
4315 }
4316 __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_utf_8);
4317 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4318 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
4319 __Pyx_GOTREF(__pyx_t_1);
4320 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4321 if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 219, __pyx_L1_error)
4322 __pyx_v_encoded_filename = ((PyObject*)__pyx_t_1);
4323 __pyx_t_1 = 0;
4324
4325 /* "tables/linkextension.pyx":220
4326 * filename, target = self._get_filename_node()
4327 * encoded_filename = filename.encode('utf-8')
4328 * encoded_target = target.encode('utf-8') # <<<<<<<<<<<<<<
4329 *
4330 * ret = H5Lcreate_external(<char*>encoded_filename, <char*>encoded_target,
4331 */
4332 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error)
4333 __Pyx_GOTREF(__pyx_t_3);
4334 __pyx_t_2 = NULL;
4335 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4336 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4337 if (likely(__pyx_t_2)) {
4338 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4339 __Pyx_INCREF(__pyx_t_2);
4340 __Pyx_INCREF(function);
4341 __Pyx_DECREF_SET(__pyx_t_3, function);
4342 }
4343 }
4344 __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_utf_8);
4345 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4346 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
4347 __Pyx_GOTREF(__pyx_t_1);
4348 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4349 if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 220, __pyx_L1_error)
4350 __pyx_v_encoded_target = ((PyObject*)__pyx_t_1);
4351 __pyx_t_1 = 0;
4352
4353 /* "tables/linkextension.pyx":222
4354 * encoded_target = target.encode('utf-8')
4355 *
4356 * ret = H5Lcreate_external(<char*>encoded_filename, <char*>encoded_target, # <<<<<<<<<<<<<<
4357 * self.parent_id, <char*>encoded_name,
4358 * H5P_DEFAULT, H5P_DEFAULT)
4359 */
4360 if (unlikely(__pyx_v_encoded_filename == Py_None)) {
4361 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
4362 __PYX_ERR(0, 222, __pyx_L1_error)
4363 }
4364 __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 222, __pyx_L1_error)
4365 if (unlikely(__pyx_v_encoded_target == Py_None)) {
4366 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
4367 __PYX_ERR(0, 222, __pyx_L1_error)
4368 }
4369 __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_target); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 222, __pyx_L1_error)
4370
4371 /* "tables/linkextension.pyx":223
4372 *
4373 * ret = H5Lcreate_external(<char*>encoded_filename, <char*>encoded_target,
4374 * self.parent_id, <char*>encoded_name, # <<<<<<<<<<<<<<
4375 * H5P_DEFAULT, H5P_DEFAULT)
4376 * if ret < 0:
4377 */
4378 if (unlikely(__pyx_v_encoded_name == Py_None)) {
4379 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
4380 __PYX_ERR(0, 223, __pyx_L1_error)
4381 }
4382 __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_name); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 223, __pyx_L1_error)
4383
4384 /* "tables/linkextension.pyx":222
4385 * encoded_target = target.encode('utf-8')
4386 *
4387 * ret = H5Lcreate_external(<char*>encoded_filename, <char*>encoded_target, # <<<<<<<<<<<<<<
4388 * self.parent_id, <char*>encoded_name,
4389 * H5P_DEFAULT, H5P_DEFAULT)
4390 */
4391 __pyx_v_ret = H5Lcreate_external(((char *)__pyx_t_6), ((char *)__pyx_t_7), __pyx_v_self->__pyx_base.__pyx_base.parent_id, ((char *)__pyx_t_8), H5P_DEFAULT, H5P_DEFAULT);
4392
4393 /* "tables/linkextension.pyx":225
4394 * self.parent_id, <char*>encoded_name,
4395 * H5P_DEFAULT, H5P_DEFAULT)
4396 * if ret < 0: # <<<<<<<<<<<<<<
4397 * raise HDF5ExtError("failed to create HDF5 external link")
4398 *
4399 */
4400 __pyx_t_9 = ((__pyx_v_ret < 0) != 0);
4401 if (unlikely(__pyx_t_9)) {
4402
4403 /* "tables/linkextension.pyx":226
4404 * H5P_DEFAULT, H5P_DEFAULT)
4405 * if ret < 0:
4406 * raise HDF5ExtError("failed to create HDF5 external link") # <<<<<<<<<<<<<<
4407 *
4408 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links
4409 */
4410 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error)
4411 __Pyx_GOTREF(__pyx_t_3);
4412 __pyx_t_2 = NULL;
4413 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4414 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4415 if (likely(__pyx_t_2)) {
4416 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4417 __Pyx_INCREF(__pyx_t_2);
4418 __Pyx_INCREF(function);
4419 __Pyx_DECREF_SET(__pyx_t_3, function);
4420 }
4421 }
4422 __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_failed_to_create_HDF5_external_l) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_failed_to_create_HDF5_external_l);
4423 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4424 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
4425 __Pyx_GOTREF(__pyx_t_1);
4426 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4427 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
4428 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4429 __PYX_ERR(0, 226, __pyx_L1_error)
4430
4431 /* "tables/linkextension.pyx":225
4432 * self.parent_id, <char*>encoded_name,
4433 * H5P_DEFAULT, H5P_DEFAULT)
4434 * if ret < 0: # <<<<<<<<<<<<<<
4435 * raise HDF5ExtError("failed to create HDF5 external link")
4436 *
4437 */
4438 }
4439
4440 /* "tables/linkextension.pyx":228
4441 * raise HDF5ExtError("failed to create HDF5 external link")
4442 *
4443 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links # <<<<<<<<<<<<<<
4444 *
4445 * def _g_open(self):
4446 */
4447 __Pyx_XDECREF(__pyx_r);
4448 __Pyx_INCREF(__pyx_int_0);
4449 __pyx_r = __pyx_int_0;
4450 goto __pyx_L0;
4451
4452 /* "tables/linkextension.pyx":210
4453 * """Extension class representing an external link."""
4454 *
4455 * def _g_create(self): # <<<<<<<<<<<<<<
4456 * """Create the link in file."""
4457 *
4458 */
4459
4460 /* function exit code */
4461 __pyx_L1_error:;
4462 __Pyx_XDECREF(__pyx_t_1);
4463 __Pyx_XDECREF(__pyx_t_2);
4464 __Pyx_XDECREF(__pyx_t_3);
4465 __Pyx_XDECREF(__pyx_t_4);
4466 __Pyx_AddTraceback("tables.linkextension.ExternalLink._g_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
4467 __pyx_r = NULL;
4468 __pyx_L0:;
4469 __Pyx_XDECREF(__pyx_v_encoded_name);
4470 __Pyx_XDECREF(__pyx_v_encoded_filename);
4471 __Pyx_XDECREF(__pyx_v_encoded_target);
4472 __Pyx_XDECREF(__pyx_v_filename);
4473 __Pyx_XDECREF(__pyx_v_target);
4474 __Pyx_XGIVEREF(__pyx_r);
4475 __Pyx_RefNannyFinishContext();
4476 return __pyx_r;
4477 }
4478
4479 /* "tables/linkextension.pyx":230
4480 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links
4481 *
4482 * def _g_open(self): # <<<<<<<<<<<<<<
4483 * """Open the link in file."""
4484 *
4485 */
4486
4487 /* Python wrapper */
4488 static PyObject *__pyx_pw_6tables_13linkextension_12ExternalLink_3_g_open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4489 static char __pyx_doc_6tables_13linkextension_12ExternalLink_2_g_open[] = "Open the link in file.";
__pyx_pw_6tables_13linkextension_12ExternalLink_3_g_open(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)4490 static PyObject *__pyx_pw_6tables_13linkextension_12ExternalLink_3_g_open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4491 PyObject *__pyx_r = 0;
4492 __Pyx_RefNannyDeclarations
4493 __Pyx_RefNannySetupContext("_g_open (wrapper)", 0);
4494 __pyx_r = __pyx_pf_6tables_13linkextension_12ExternalLink_2_g_open(((struct __pyx_obj_6tables_13linkextension_ExternalLink *)__pyx_v_self));
4495
4496 /* function exit code */
4497 __Pyx_RefNannyFinishContext();
4498 return __pyx_r;
4499 }
4500
__pyx_pf_6tables_13linkextension_12ExternalLink_2_g_open(struct __pyx_obj_6tables_13linkextension_ExternalLink * __pyx_v_self)4501 static PyObject *__pyx_pf_6tables_13linkextension_12ExternalLink_2_g_open(struct __pyx_obj_6tables_13linkextension_ExternalLink *__pyx_v_self) {
4502 herr_t __pyx_v_ret;
4503 H5L_info_t __pyx_v_link_buff;
4504 size_t __pyx_v_val_size;
4505 char *__pyx_v_clinkval;
4506 char *__pyx_v_cfilename;
4507 char *__pyx_v_c_obj_path;
4508 unsigned int __pyx_v_flags;
4509 PyObject *__pyx_v_encoded_name = 0;
4510 PyObject *__pyx_v_filename = 0;
4511 PyObject *__pyx_v_obj_path = 0;
4512 PyObject *__pyx_r = NULL;
4513 __Pyx_RefNannyDeclarations
4514 PyObject *__pyx_t_1 = NULL;
4515 PyObject *__pyx_t_2 = NULL;
4516 PyObject *__pyx_t_3 = NULL;
4517 char *__pyx_t_4;
4518 int __pyx_t_5;
4519 size_t __pyx_t_6;
4520 __Pyx_RefNannySetupContext("_g_open", 0);
4521
4522 /* "tables/linkextension.pyx":243
4523 * cdef str filename, obj_path
4524 *
4525 * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<<
4526 *
4527 * ret = H5Lget_info(self.parent_id, encoded_name, &link_buff, H5P_DEFAULT)
4528 */
4529 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error)
4530 __Pyx_GOTREF(__pyx_t_2);
4531 __pyx_t_3 = NULL;
4532 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4533 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4534 if (likely(__pyx_t_3)) {
4535 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4536 __Pyx_INCREF(__pyx_t_3);
4537 __Pyx_INCREF(function);
4538 __Pyx_DECREF_SET(__pyx_t_2, function);
4539 }
4540 }
4541 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_utf_8);
4542 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4543 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
4544 __Pyx_GOTREF(__pyx_t_1);
4545 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4546 if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 243, __pyx_L1_error)
4547 __pyx_v_encoded_name = ((PyObject*)__pyx_t_1);
4548 __pyx_t_1 = 0;
4549
4550 /* "tables/linkextension.pyx":245
4551 * encoded_name = self.name.encode('utf-8')
4552 *
4553 * ret = H5Lget_info(self.parent_id, encoded_name, &link_buff, H5P_DEFAULT) # <<<<<<<<<<<<<<
4554 * if ret < 0:
4555 * raise HDF5ExtError("failed to get info about external link")
4556 */
4557 if (unlikely(__pyx_v_encoded_name == Py_None)) {
4558 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
4559 __PYX_ERR(0, 245, __pyx_L1_error)
4560 }
4561 __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_name); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 245, __pyx_L1_error)
4562 __pyx_v_ret = H5Lget_info(__pyx_v_self->__pyx_base.__pyx_base.parent_id, __pyx_t_4, (&__pyx_v_link_buff), H5P_DEFAULT);
4563
4564 /* "tables/linkextension.pyx":246
4565 *
4566 * ret = H5Lget_info(self.parent_id, encoded_name, &link_buff, H5P_DEFAULT)
4567 * if ret < 0: # <<<<<<<<<<<<<<
4568 * raise HDF5ExtError("failed to get info about external link")
4569 *
4570 */
4571 __pyx_t_5 = ((__pyx_v_ret < 0) != 0);
4572 if (unlikely(__pyx_t_5)) {
4573
4574 /* "tables/linkextension.pyx":247
4575 * ret = H5Lget_info(self.parent_id, encoded_name, &link_buff, H5P_DEFAULT)
4576 * if ret < 0:
4577 * raise HDF5ExtError("failed to get info about external link") # <<<<<<<<<<<<<<
4578 *
4579 * val_size = link_buff.u.val_size
4580 */
4581 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
4582 __Pyx_GOTREF(__pyx_t_2);
4583 __pyx_t_3 = NULL;
4584 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4585 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4586 if (likely(__pyx_t_3)) {
4587 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4588 __Pyx_INCREF(__pyx_t_3);
4589 __Pyx_INCREF(function);
4590 __Pyx_DECREF_SET(__pyx_t_2, function);
4591 }
4592 }
4593 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_failed_to_get_info_about_externa) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_failed_to_get_info_about_externa);
4594 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4595 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
4596 __Pyx_GOTREF(__pyx_t_1);
4597 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4598 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
4599 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4600 __PYX_ERR(0, 247, __pyx_L1_error)
4601
4602 /* "tables/linkextension.pyx":246
4603 *
4604 * ret = H5Lget_info(self.parent_id, encoded_name, &link_buff, H5P_DEFAULT)
4605 * if ret < 0: # <<<<<<<<<<<<<<
4606 * raise HDF5ExtError("failed to get info about external link")
4607 *
4608 */
4609 }
4610
4611 /* "tables/linkextension.pyx":249
4612 * raise HDF5ExtError("failed to get info about external link")
4613 *
4614 * val_size = link_buff.u.val_size # <<<<<<<<<<<<<<
4615 * clinkval = <char *>malloc(val_size)
4616 *
4617 */
4618 __pyx_t_6 = __pyx_v_link_buff.u.val_size;
4619 __pyx_v_val_size = __pyx_t_6;
4620
4621 /* "tables/linkextension.pyx":250
4622 *
4623 * val_size = link_buff.u.val_size
4624 * clinkval = <char *>malloc(val_size) # <<<<<<<<<<<<<<
4625 *
4626 * ret = H5Lget_val(self.parent_id, encoded_name, clinkval, val_size,
4627 */
4628 __pyx_v_clinkval = ((char *)malloc(__pyx_v_val_size));
4629
4630 /* "tables/linkextension.pyx":252
4631 * clinkval = <char *>malloc(val_size)
4632 *
4633 * ret = H5Lget_val(self.parent_id, encoded_name, clinkval, val_size, # <<<<<<<<<<<<<<
4634 * H5P_DEFAULT)
4635 * if ret < 0:
4636 */
4637 if (unlikely(__pyx_v_encoded_name == Py_None)) {
4638 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
4639 __PYX_ERR(0, 252, __pyx_L1_error)
4640 }
4641 __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoded_name); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 252, __pyx_L1_error)
4642
4643 /* "tables/linkextension.pyx":253
4644 *
4645 * ret = H5Lget_val(self.parent_id, encoded_name, clinkval, val_size,
4646 * H5P_DEFAULT) # <<<<<<<<<<<<<<
4647 * if ret < 0:
4648 * raise HDF5ExtError("failed to get target value")
4649 */
4650 __pyx_v_ret = H5Lget_val(__pyx_v_self->__pyx_base.__pyx_base.parent_id, __pyx_t_4, __pyx_v_clinkval, __pyx_v_val_size, H5P_DEFAULT);
4651
4652 /* "tables/linkextension.pyx":254
4653 * ret = H5Lget_val(self.parent_id, encoded_name, clinkval, val_size,
4654 * H5P_DEFAULT)
4655 * if ret < 0: # <<<<<<<<<<<<<<
4656 * raise HDF5ExtError("failed to get target value")
4657 *
4658 */
4659 __pyx_t_5 = ((__pyx_v_ret < 0) != 0);
4660 if (unlikely(__pyx_t_5)) {
4661
4662 /* "tables/linkextension.pyx":255
4663 * H5P_DEFAULT)
4664 * if ret < 0:
4665 * raise HDF5ExtError("failed to get target value") # <<<<<<<<<<<<<<
4666 *
4667 * ret = H5Lunpack_elink_val(clinkval, val_size, &flags,
4668 */
4669 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error)
4670 __Pyx_GOTREF(__pyx_t_2);
4671 __pyx_t_3 = NULL;
4672 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4673 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4674 if (likely(__pyx_t_3)) {
4675 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4676 __Pyx_INCREF(__pyx_t_3);
4677 __Pyx_INCREF(function);
4678 __Pyx_DECREF_SET(__pyx_t_2, function);
4679 }
4680 }
4681 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_failed_to_get_target_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_failed_to_get_target_value);
4682 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4683 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error)
4684 __Pyx_GOTREF(__pyx_t_1);
4685 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4686 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
4687 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4688 __PYX_ERR(0, 255, __pyx_L1_error)
4689
4690 /* "tables/linkextension.pyx":254
4691 * ret = H5Lget_val(self.parent_id, encoded_name, clinkval, val_size,
4692 * H5P_DEFAULT)
4693 * if ret < 0: # <<<<<<<<<<<<<<
4694 * raise HDF5ExtError("failed to get target value")
4695 *
4696 */
4697 }
4698
4699 /* "tables/linkextension.pyx":257
4700 * raise HDF5ExtError("failed to get target value")
4701 *
4702 * ret = H5Lunpack_elink_val(clinkval, val_size, &flags, # <<<<<<<<<<<<<<
4703 * <const char **>&cfilename,
4704 * <const char **>&c_obj_path)
4705 */
4706 __pyx_v_ret = H5Lunpack_elink_val(__pyx_v_clinkval, __pyx_v_val_size, (&__pyx_v_flags), ((char const **)(&__pyx_v_cfilename)), ((char const **)(&__pyx_v_c_obj_path)));
4707
4708 /* "tables/linkextension.pyx":260
4709 * <const char **>&cfilename,
4710 * <const char **>&c_obj_path)
4711 * if ret < 0: # <<<<<<<<<<<<<<
4712 * raise HDF5ExtError("failed to unpack external link value")
4713 *
4714 */
4715 __pyx_t_5 = ((__pyx_v_ret < 0) != 0);
4716 if (unlikely(__pyx_t_5)) {
4717
4718 /* "tables/linkextension.pyx":261
4719 * <const char **>&c_obj_path)
4720 * if ret < 0:
4721 * raise HDF5ExtError("failed to unpack external link value") # <<<<<<<<<<<<<<
4722 *
4723 * filename = cstr_to_pystr(cfilename)
4724 */
4725 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error)
4726 __Pyx_GOTREF(__pyx_t_2);
4727 __pyx_t_3 = NULL;
4728 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4729 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4730 if (likely(__pyx_t_3)) {
4731 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4732 __Pyx_INCREF(__pyx_t_3);
4733 __Pyx_INCREF(function);
4734 __Pyx_DECREF_SET(__pyx_t_2, function);
4735 }
4736 }
4737 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_failed_to_unpack_external_link_v) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_failed_to_unpack_external_link_v);
4738 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4739 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
4740 __Pyx_GOTREF(__pyx_t_1);
4741 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4742 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
4743 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4744 __PYX_ERR(0, 261, __pyx_L1_error)
4745
4746 /* "tables/linkextension.pyx":260
4747 * <const char **>&cfilename,
4748 * <const char **>&c_obj_path)
4749 * if ret < 0: # <<<<<<<<<<<<<<
4750 * raise HDF5ExtError("failed to unpack external link value")
4751 *
4752 */
4753 }
4754
4755 /* "tables/linkextension.pyx":263
4756 * raise HDF5ExtError("failed to unpack external link value")
4757 *
4758 * filename = cstr_to_pystr(cfilename) # <<<<<<<<<<<<<<
4759 * obj_path = cstr_to_pystr(c_obj_path)
4760 *
4761 */
4762 __pyx_t_1 = __pyx_f_6tables_14utilsextension_cstr_to_pystr(__pyx_v_cfilename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
4763 __Pyx_GOTREF(__pyx_t_1);
4764 __pyx_v_filename = ((PyObject*)__pyx_t_1);
4765 __pyx_t_1 = 0;
4766
4767 /* "tables/linkextension.pyx":264
4768 *
4769 * filename = cstr_to_pystr(cfilename)
4770 * obj_path = cstr_to_pystr(c_obj_path) # <<<<<<<<<<<<<<
4771 *
4772 * self.target = filename+':'+obj_path
4773 */
4774 __pyx_t_1 = __pyx_f_6tables_14utilsextension_cstr_to_pystr(__pyx_v_c_obj_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
4775 __Pyx_GOTREF(__pyx_t_1);
4776 __pyx_v_obj_path = ((PyObject*)__pyx_t_1);
4777 __pyx_t_1 = 0;
4778
4779 /* "tables/linkextension.pyx":266
4780 * obj_path = cstr_to_pystr(c_obj_path)
4781 *
4782 * self.target = filename+':'+obj_path # <<<<<<<<<<<<<<
4783 *
4784 * # Release resources
4785 */
4786 __pyx_t_1 = PyNumber_Add(__pyx_v_filename, __pyx_kp_s_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
4787 __Pyx_GOTREF(__pyx_t_1);
4788 __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_obj_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error)
4789 __Pyx_GOTREF(__pyx_t_2);
4790 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4791 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target, __pyx_t_2) < 0) __PYX_ERR(0, 266, __pyx_L1_error)
4792 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4793
4794 /* "tables/linkextension.pyx":269
4795 *
4796 * # Release resources
4797 * free(clinkval) # <<<<<<<<<<<<<<
4798 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links
4799 *
4800 */
4801 free(__pyx_v_clinkval);
4802
4803 /* "tables/linkextension.pyx":270
4804 * # Release resources
4805 * free(clinkval)
4806 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links # <<<<<<<<<<<<<<
4807 *
4808 *
4809 */
4810 __Pyx_XDECREF(__pyx_r);
4811 __Pyx_INCREF(__pyx_int_0);
4812 __pyx_r = __pyx_int_0;
4813 goto __pyx_L0;
4814
4815 /* "tables/linkextension.pyx":230
4816 * return 0 # Object ID is zero'ed, as HDF5 does not assign one for links
4817 *
4818 * def _g_open(self): # <<<<<<<<<<<<<<
4819 * """Open the link in file."""
4820 *
4821 */
4822
4823 /* function exit code */
4824 __pyx_L1_error:;
4825 __Pyx_XDECREF(__pyx_t_1);
4826 __Pyx_XDECREF(__pyx_t_2);
4827 __Pyx_XDECREF(__pyx_t_3);
4828 __Pyx_AddTraceback("tables.linkextension.ExternalLink._g_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
4829 __pyx_r = NULL;
4830 __pyx_L0:;
4831 __Pyx_XDECREF(__pyx_v_encoded_name);
4832 __Pyx_XDECREF(__pyx_v_filename);
4833 __Pyx_XDECREF(__pyx_v_obj_path);
4834 __Pyx_XGIVEREF(__pyx_r);
4835 __Pyx_RefNannyFinishContext();
4836 return __pyx_r;
4837 }
4838
4839 /* "(tree fragment)":1
4840 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
4841 * cdef tuple state
4842 * cdef object _dict
4843 */
4844
4845 /* Python wrapper */
4846 static PyObject *__pyx_pw_6tables_13linkextension_12ExternalLink_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_6tables_13linkextension_12ExternalLink_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)4847 static PyObject *__pyx_pw_6tables_13linkextension_12ExternalLink_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4848 PyObject *__pyx_r = 0;
4849 __Pyx_RefNannyDeclarations
4850 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
4851 __pyx_r = __pyx_pf_6tables_13linkextension_12ExternalLink_4__reduce_cython__(((struct __pyx_obj_6tables_13linkextension_ExternalLink *)__pyx_v_self));
4852
4853 /* function exit code */
4854 __Pyx_RefNannyFinishContext();
4855 return __pyx_r;
4856 }
4857
__pyx_pf_6tables_13linkextension_12ExternalLink_4__reduce_cython__(struct __pyx_obj_6tables_13linkextension_ExternalLink * __pyx_v_self)4858 static PyObject *__pyx_pf_6tables_13linkextension_12ExternalLink_4__reduce_cython__(struct __pyx_obj_6tables_13linkextension_ExternalLink *__pyx_v_self) {
4859 PyObject *__pyx_v_state = 0;
4860 PyObject *__pyx_v__dict = 0;
4861 int __pyx_v_use_setstate;
4862 PyObject *__pyx_r = NULL;
4863 __Pyx_RefNannyDeclarations
4864 PyObject *__pyx_t_1 = NULL;
4865 PyObject *__pyx_t_2 = NULL;
4866 int __pyx_t_3;
4867 int __pyx_t_4;
4868 PyObject *__pyx_t_5 = NULL;
4869 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
4870
4871 /* "(tree fragment)":5
4872 * cdef object _dict
4873 * cdef bint use_setstate
4874 * state = (self.name, self.parent_id) # <<<<<<<<<<<<<<
4875 * _dict = getattr(self, '__dict__', None)
4876 * if _dict is not None:
4877 */
4878 __pyx_t_1 = __Pyx_PyInt_From_hid_t(__pyx_v_self->__pyx_base.__pyx_base.parent_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
4879 __Pyx_GOTREF(__pyx_t_1);
4880 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
4881 __Pyx_GOTREF(__pyx_t_2);
4882 __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name);
4883 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name);
4884 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->__pyx_base.__pyx_base.name);
4885 __Pyx_GIVEREF(__pyx_t_1);
4886 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
4887 __pyx_t_1 = 0;
4888 __pyx_v_state = ((PyObject*)__pyx_t_2);
4889 __pyx_t_2 = 0;
4890
4891 /* "(tree fragment)":6
4892 * cdef bint use_setstate
4893 * state = (self.name, self.parent_id)
4894 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
4895 * if _dict is not None:
4896 * state += (_dict,)
4897 */
4898 __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
4899 __Pyx_GOTREF(__pyx_t_2);
4900 __pyx_v__dict = __pyx_t_2;
4901 __pyx_t_2 = 0;
4902
4903 /* "(tree fragment)":7
4904 * state = (self.name, self.parent_id)
4905 * _dict = getattr(self, '__dict__', None)
4906 * if _dict is not None: # <<<<<<<<<<<<<<
4907 * state += (_dict,)
4908 * use_setstate = True
4909 */
4910 __pyx_t_3 = (__pyx_v__dict != Py_None);
4911 __pyx_t_4 = (__pyx_t_3 != 0);
4912 if (__pyx_t_4) {
4913
4914 /* "(tree fragment)":8
4915 * _dict = getattr(self, '__dict__', None)
4916 * if _dict is not None:
4917 * state += (_dict,) # <<<<<<<<<<<<<<
4918 * use_setstate = True
4919 * else:
4920 */
4921 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
4922 __Pyx_GOTREF(__pyx_t_2);
4923 __Pyx_INCREF(__pyx_v__dict);
4924 __Pyx_GIVEREF(__pyx_v__dict);
4925 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
4926 __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
4927 __Pyx_GOTREF(__pyx_t_1);
4928 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4929 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
4930 __pyx_t_1 = 0;
4931
4932 /* "(tree fragment)":9
4933 * if _dict is not None:
4934 * state += (_dict,)
4935 * use_setstate = True # <<<<<<<<<<<<<<
4936 * else:
4937 * use_setstate = self.name is not None
4938 */
4939 __pyx_v_use_setstate = 1;
4940
4941 /* "(tree fragment)":7
4942 * state = (self.name, self.parent_id)
4943 * _dict = getattr(self, '__dict__', None)
4944 * if _dict is not None: # <<<<<<<<<<<<<<
4945 * state += (_dict,)
4946 * use_setstate = True
4947 */
4948 goto __pyx_L3;
4949 }
4950
4951 /* "(tree fragment)":11
4952 * use_setstate = True
4953 * else:
4954 * use_setstate = self.name is not None # <<<<<<<<<<<<<<
4955 * if use_setstate:
4956 * return __pyx_unpickle_ExternalLink, (type(self), 0x381b6b9, None), state
4957 */
4958 /*else*/ {
4959 __pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.name != Py_None);
4960 __pyx_v_use_setstate = __pyx_t_4;
4961 }
4962 __pyx_L3:;
4963
4964 /* "(tree fragment)":12
4965 * else:
4966 * use_setstate = self.name is not None
4967 * if use_setstate: # <<<<<<<<<<<<<<
4968 * return __pyx_unpickle_ExternalLink, (type(self), 0x381b6b9, None), state
4969 * else:
4970 */
4971 __pyx_t_4 = (__pyx_v_use_setstate != 0);
4972 if (__pyx_t_4) {
4973
4974 /* "(tree fragment)":13
4975 * use_setstate = self.name is not None
4976 * if use_setstate:
4977 * return __pyx_unpickle_ExternalLink, (type(self), 0x381b6b9, None), state # <<<<<<<<<<<<<<
4978 * else:
4979 * return __pyx_unpickle_ExternalLink, (type(self), 0x381b6b9, state)
4980 */
4981 __Pyx_XDECREF(__pyx_r);
4982 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ExternalLink); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
4983 __Pyx_GOTREF(__pyx_t_1);
4984 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
4985 __Pyx_GOTREF(__pyx_t_2);
4986 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4987 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4988 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4989 __Pyx_INCREF(__pyx_int_58832569);
4990 __Pyx_GIVEREF(__pyx_int_58832569);
4991 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_58832569);
4992 __Pyx_INCREF(Py_None);
4993 __Pyx_GIVEREF(Py_None);
4994 PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
4995 __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
4996 __Pyx_GOTREF(__pyx_t_5);
4997 __Pyx_GIVEREF(__pyx_t_1);
4998 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
4999 __Pyx_GIVEREF(__pyx_t_2);
5000 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
5001 __Pyx_INCREF(__pyx_v_state);
5002 __Pyx_GIVEREF(__pyx_v_state);
5003 PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
5004 __pyx_t_1 = 0;
5005 __pyx_t_2 = 0;
5006 __pyx_r = __pyx_t_5;
5007 __pyx_t_5 = 0;
5008 goto __pyx_L0;
5009
5010 /* "(tree fragment)":12
5011 * else:
5012 * use_setstate = self.name is not None
5013 * if use_setstate: # <<<<<<<<<<<<<<
5014 * return __pyx_unpickle_ExternalLink, (type(self), 0x381b6b9, None), state
5015 * else:
5016 */
5017 }
5018
5019 /* "(tree fragment)":15
5020 * return __pyx_unpickle_ExternalLink, (type(self), 0x381b6b9, None), state
5021 * else:
5022 * return __pyx_unpickle_ExternalLink, (type(self), 0x381b6b9, state) # <<<<<<<<<<<<<<
5023 * def __setstate_cython__(self, __pyx_state):
5024 * __pyx_unpickle_ExternalLink__set_state(self, __pyx_state)
5025 */
5026 /*else*/ {
5027 __Pyx_XDECREF(__pyx_r);
5028 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_ExternalLink); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
5029 __Pyx_GOTREF(__pyx_t_5);
5030 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
5031 __Pyx_GOTREF(__pyx_t_2);
5032 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
5033 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
5034 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
5035 __Pyx_INCREF(__pyx_int_58832569);
5036 __Pyx_GIVEREF(__pyx_int_58832569);
5037 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_58832569);
5038 __Pyx_INCREF(__pyx_v_state);
5039 __Pyx_GIVEREF(__pyx_v_state);
5040 PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
5041 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
5042 __Pyx_GOTREF(__pyx_t_1);
5043 __Pyx_GIVEREF(__pyx_t_5);
5044 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
5045 __Pyx_GIVEREF(__pyx_t_2);
5046 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
5047 __pyx_t_5 = 0;
5048 __pyx_t_2 = 0;
5049 __pyx_r = __pyx_t_1;
5050 __pyx_t_1 = 0;
5051 goto __pyx_L0;
5052 }
5053
5054 /* "(tree fragment)":1
5055 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5056 * cdef tuple state
5057 * cdef object _dict
5058 */
5059
5060 /* function exit code */
5061 __pyx_L1_error:;
5062 __Pyx_XDECREF(__pyx_t_1);
5063 __Pyx_XDECREF(__pyx_t_2);
5064 __Pyx_XDECREF(__pyx_t_5);
5065 __Pyx_AddTraceback("tables.linkextension.ExternalLink.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5066 __pyx_r = NULL;
5067 __pyx_L0:;
5068 __Pyx_XDECREF(__pyx_v_state);
5069 __Pyx_XDECREF(__pyx_v__dict);
5070 __Pyx_XGIVEREF(__pyx_r);
5071 __Pyx_RefNannyFinishContext();
5072 return __pyx_r;
5073 }
5074
5075 /* "(tree fragment)":16
5076 * else:
5077 * return __pyx_unpickle_ExternalLink, (type(self), 0x381b6b9, state)
5078 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5079 * __pyx_unpickle_ExternalLink__set_state(self, __pyx_state)
5080 */
5081
5082 /* Python wrapper */
5083 static PyObject *__pyx_pw_6tables_13linkextension_12ExternalLink_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_6tables_13linkextension_12ExternalLink_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)5084 static PyObject *__pyx_pw_6tables_13linkextension_12ExternalLink_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5085 PyObject *__pyx_r = 0;
5086 __Pyx_RefNannyDeclarations
5087 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5088 __pyx_r = __pyx_pf_6tables_13linkextension_12ExternalLink_6__setstate_cython__(((struct __pyx_obj_6tables_13linkextension_ExternalLink *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5089
5090 /* function exit code */
5091 __Pyx_RefNannyFinishContext();
5092 return __pyx_r;
5093 }
5094
__pyx_pf_6tables_13linkextension_12ExternalLink_6__setstate_cython__(struct __pyx_obj_6tables_13linkextension_ExternalLink * __pyx_v_self,PyObject * __pyx_v___pyx_state)5095 static PyObject *__pyx_pf_6tables_13linkextension_12ExternalLink_6__setstate_cython__(struct __pyx_obj_6tables_13linkextension_ExternalLink *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5096 PyObject *__pyx_r = NULL;
5097 __Pyx_RefNannyDeclarations
5098 PyObject *__pyx_t_1 = NULL;
5099 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5100
5101 /* "(tree fragment)":17
5102 * return __pyx_unpickle_ExternalLink, (type(self), 0x381b6b9, state)
5103 * def __setstate_cython__(self, __pyx_state):
5104 * __pyx_unpickle_ExternalLink__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
5105 */
5106 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
5107 __pyx_t_1 = __pyx_f_6tables_13linkextension___pyx_unpickle_ExternalLink__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
5108 __Pyx_GOTREF(__pyx_t_1);
5109 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5110
5111 /* "(tree fragment)":16
5112 * else:
5113 * return __pyx_unpickle_ExternalLink, (type(self), 0x381b6b9, state)
5114 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5115 * __pyx_unpickle_ExternalLink__set_state(self, __pyx_state)
5116 */
5117
5118 /* function exit code */
5119 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5120 goto __pyx_L0;
5121 __pyx_L1_error:;
5122 __Pyx_XDECREF(__pyx_t_1);
5123 __Pyx_AddTraceback("tables.linkextension.ExternalLink.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5124 __pyx_r = NULL;
5125 __pyx_L0:;
5126 __Pyx_XGIVEREF(__pyx_r);
5127 __Pyx_RefNannyFinishContext();
5128 return __pyx_r;
5129 }
5130
5131 /* "(tree fragment)":1
5132 * def __pyx_unpickle_Link(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
5133 * cdef object __pyx_PickleError
5134 * cdef object __pyx_result
5135 */
5136
5137 /* Python wrapper */
5138 static PyObject *__pyx_pw_6tables_13linkextension_5__pyx_unpickle_Link(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5139 static PyMethodDef __pyx_mdef_6tables_13linkextension_5__pyx_unpickle_Link = {"__pyx_unpickle_Link", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_13linkextension_5__pyx_unpickle_Link, METH_VARARGS|METH_KEYWORDS, 0};
__pyx_pw_6tables_13linkextension_5__pyx_unpickle_Link(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)5140 static PyObject *__pyx_pw_6tables_13linkextension_5__pyx_unpickle_Link(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5141 PyObject *__pyx_v___pyx_type = 0;
5142 long __pyx_v___pyx_checksum;
5143 PyObject *__pyx_v___pyx_state = 0;
5144 PyObject *__pyx_r = 0;
5145 __Pyx_RefNannyDeclarations
5146 __Pyx_RefNannySetupContext("__pyx_unpickle_Link (wrapper)", 0);
5147 {
5148 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
5149 PyObject* values[3] = {0,0,0};
5150 if (unlikely(__pyx_kwds)) {
5151 Py_ssize_t kw_args;
5152 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5153 switch (pos_args) {
5154 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5155 CYTHON_FALLTHROUGH;
5156 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5157 CYTHON_FALLTHROUGH;
5158 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5159 CYTHON_FALLTHROUGH;
5160 case 0: break;
5161 default: goto __pyx_L5_argtuple_error;
5162 }
5163 kw_args = PyDict_Size(__pyx_kwds);
5164 switch (pos_args) {
5165 case 0:
5166 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
5167 else goto __pyx_L5_argtuple_error;
5168 CYTHON_FALLTHROUGH;
5169 case 1:
5170 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
5171 else {
5172 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Link", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
5173 }
5174 CYTHON_FALLTHROUGH;
5175 case 2:
5176 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
5177 else {
5178 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Link", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
5179 }
5180 }
5181 if (unlikely(kw_args > 0)) {
5182 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Link") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
5183 }
5184 } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
5185 goto __pyx_L5_argtuple_error;
5186 } else {
5187 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5188 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5189 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5190 }
5191 __pyx_v___pyx_type = values[0];
5192 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
5193 __pyx_v___pyx_state = values[2];
5194 }
5195 goto __pyx_L4_argument_unpacking_done;
5196 __pyx_L5_argtuple_error:;
5197 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Link", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
5198 __pyx_L3_error:;
5199 __Pyx_AddTraceback("tables.linkextension.__pyx_unpickle_Link", __pyx_clineno, __pyx_lineno, __pyx_filename);
5200 __Pyx_RefNannyFinishContext();
5201 return NULL;
5202 __pyx_L4_argument_unpacking_done:;
5203 __pyx_r = __pyx_pf_6tables_13linkextension_4__pyx_unpickle_Link(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
5204
5205 /* function exit code */
5206 __Pyx_RefNannyFinishContext();
5207 return __pyx_r;
5208 }
5209
__pyx_pf_6tables_13linkextension_4__pyx_unpickle_Link(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v___pyx_type,long __pyx_v___pyx_checksum,PyObject * __pyx_v___pyx_state)5210 static PyObject *__pyx_pf_6tables_13linkextension_4__pyx_unpickle_Link(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
5211 PyObject *__pyx_v___pyx_PickleError = 0;
5212 PyObject *__pyx_v___pyx_result = 0;
5213 PyObject *__pyx_r = NULL;
5214 __Pyx_RefNannyDeclarations
5215 int __pyx_t_1;
5216 PyObject *__pyx_t_2 = NULL;
5217 PyObject *__pyx_t_3 = NULL;
5218 PyObject *__pyx_t_4 = NULL;
5219 PyObject *__pyx_t_5 = NULL;
5220 int __pyx_t_6;
5221 __Pyx_RefNannySetupContext("__pyx_unpickle_Link", 0);
5222
5223 /* "(tree fragment)":4
5224 * cdef object __pyx_PickleError
5225 * cdef object __pyx_result
5226 * if __pyx_checksum != 0x381b6b9: # <<<<<<<<<<<<<<
5227 * from pickle import PickleError as __pyx_PickleError
5228 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5229 */
5230 __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x381b6b9) != 0);
5231 if (__pyx_t_1) {
5232
5233 /* "(tree fragment)":5
5234 * cdef object __pyx_result
5235 * if __pyx_checksum != 0x381b6b9:
5236 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
5237 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5238 * __pyx_result = Link.__new__(__pyx_type)
5239 */
5240 __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
5241 __Pyx_GOTREF(__pyx_t_2);
5242 __Pyx_INCREF(__pyx_n_s_PickleError);
5243 __Pyx_GIVEREF(__pyx_n_s_PickleError);
5244 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
5245 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
5246 __Pyx_GOTREF(__pyx_t_3);
5247 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5248 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
5249 __Pyx_GOTREF(__pyx_t_2);
5250 __Pyx_INCREF(__pyx_t_2);
5251 __pyx_v___pyx_PickleError = __pyx_t_2;
5252 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5253 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5254
5255 /* "(tree fragment)":6
5256 * if __pyx_checksum != 0x381b6b9:
5257 * from pickle import PickleError as __pyx_PickleError
5258 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum) # <<<<<<<<<<<<<<
5259 * __pyx_result = Link.__new__(__pyx_type)
5260 * if __pyx_state is not None:
5261 */
5262 __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
5263 __Pyx_GOTREF(__pyx_t_2);
5264 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x38, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
5265 __Pyx_GOTREF(__pyx_t_4);
5266 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5267 __Pyx_INCREF(__pyx_v___pyx_PickleError);
5268 __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
5269 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5270 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
5271 if (likely(__pyx_t_5)) {
5272 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5273 __Pyx_INCREF(__pyx_t_5);
5274 __Pyx_INCREF(function);
5275 __Pyx_DECREF_SET(__pyx_t_2, function);
5276 }
5277 }
5278 __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
5279 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
5280 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5281 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
5282 __Pyx_GOTREF(__pyx_t_3);
5283 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5284 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5285 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5286 __PYX_ERR(1, 6, __pyx_L1_error)
5287
5288 /* "(tree fragment)":4
5289 * cdef object __pyx_PickleError
5290 * cdef object __pyx_result
5291 * if __pyx_checksum != 0x381b6b9: # <<<<<<<<<<<<<<
5292 * from pickle import PickleError as __pyx_PickleError
5293 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5294 */
5295 }
5296
5297 /* "(tree fragment)":7
5298 * from pickle import PickleError as __pyx_PickleError
5299 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5300 * __pyx_result = Link.__new__(__pyx_type) # <<<<<<<<<<<<<<
5301 * if __pyx_state is not None:
5302 * __pyx_unpickle_Link__set_state(<Link> __pyx_result, __pyx_state)
5303 */
5304 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6tables_13linkextension_Link), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
5305 __Pyx_GOTREF(__pyx_t_2);
5306 __pyx_t_4 = NULL;
5307 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5308 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
5309 if (likely(__pyx_t_4)) {
5310 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5311 __Pyx_INCREF(__pyx_t_4);
5312 __Pyx_INCREF(function);
5313 __Pyx_DECREF_SET(__pyx_t_2, function);
5314 }
5315 }
5316 __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
5317 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5318 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
5319 __Pyx_GOTREF(__pyx_t_3);
5320 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5321 __pyx_v___pyx_result = __pyx_t_3;
5322 __pyx_t_3 = 0;
5323
5324 /* "(tree fragment)":8
5325 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5326 * __pyx_result = Link.__new__(__pyx_type)
5327 * if __pyx_state is not None: # <<<<<<<<<<<<<<
5328 * __pyx_unpickle_Link__set_state(<Link> __pyx_result, __pyx_state)
5329 * return __pyx_result
5330 */
5331 __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
5332 __pyx_t_6 = (__pyx_t_1 != 0);
5333 if (__pyx_t_6) {
5334
5335 /* "(tree fragment)":9
5336 * __pyx_result = Link.__new__(__pyx_type)
5337 * if __pyx_state is not None:
5338 * __pyx_unpickle_Link__set_state(<Link> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
5339 * return __pyx_result
5340 * cdef __pyx_unpickle_Link__set_state(Link __pyx_result, tuple __pyx_state):
5341 */
5342 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
5343 __pyx_t_3 = __pyx_f_6tables_13linkextension___pyx_unpickle_Link__set_state(((struct __pyx_obj_6tables_13linkextension_Link *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
5344 __Pyx_GOTREF(__pyx_t_3);
5345 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5346
5347 /* "(tree fragment)":8
5348 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5349 * __pyx_result = Link.__new__(__pyx_type)
5350 * if __pyx_state is not None: # <<<<<<<<<<<<<<
5351 * __pyx_unpickle_Link__set_state(<Link> __pyx_result, __pyx_state)
5352 * return __pyx_result
5353 */
5354 }
5355
5356 /* "(tree fragment)":10
5357 * if __pyx_state is not None:
5358 * __pyx_unpickle_Link__set_state(<Link> __pyx_result, __pyx_state)
5359 * return __pyx_result # <<<<<<<<<<<<<<
5360 * cdef __pyx_unpickle_Link__set_state(Link __pyx_result, tuple __pyx_state):
5361 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5362 */
5363 __Pyx_XDECREF(__pyx_r);
5364 __Pyx_INCREF(__pyx_v___pyx_result);
5365 __pyx_r = __pyx_v___pyx_result;
5366 goto __pyx_L0;
5367
5368 /* "(tree fragment)":1
5369 * def __pyx_unpickle_Link(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
5370 * cdef object __pyx_PickleError
5371 * cdef object __pyx_result
5372 */
5373
5374 /* function exit code */
5375 __pyx_L1_error:;
5376 __Pyx_XDECREF(__pyx_t_2);
5377 __Pyx_XDECREF(__pyx_t_3);
5378 __Pyx_XDECREF(__pyx_t_4);
5379 __Pyx_XDECREF(__pyx_t_5);
5380 __Pyx_AddTraceback("tables.linkextension.__pyx_unpickle_Link", __pyx_clineno, __pyx_lineno, __pyx_filename);
5381 __pyx_r = NULL;
5382 __pyx_L0:;
5383 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
5384 __Pyx_XDECREF(__pyx_v___pyx_result);
5385 __Pyx_XGIVEREF(__pyx_r);
5386 __Pyx_RefNannyFinishContext();
5387 return __pyx_r;
5388 }
5389
5390 /* "(tree fragment)":11
5391 * __pyx_unpickle_Link__set_state(<Link> __pyx_result, __pyx_state)
5392 * return __pyx_result
5393 * cdef __pyx_unpickle_Link__set_state(Link __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
5394 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5395 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
5396 */
5397
__pyx_f_6tables_13linkextension___pyx_unpickle_Link__set_state(struct __pyx_obj_6tables_13linkextension_Link * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)5398 static PyObject *__pyx_f_6tables_13linkextension___pyx_unpickle_Link__set_state(struct __pyx_obj_6tables_13linkextension_Link *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
5399 PyObject *__pyx_r = NULL;
5400 __Pyx_RefNannyDeclarations
5401 PyObject *__pyx_t_1 = NULL;
5402 hid_t __pyx_t_2;
5403 int __pyx_t_3;
5404 Py_ssize_t __pyx_t_4;
5405 int __pyx_t_5;
5406 int __pyx_t_6;
5407 PyObject *__pyx_t_7 = NULL;
5408 PyObject *__pyx_t_8 = NULL;
5409 PyObject *__pyx_t_9 = NULL;
5410 __Pyx_RefNannySetupContext("__pyx_unpickle_Link__set_state", 0);
5411
5412 /* "(tree fragment)":12
5413 * return __pyx_result
5414 * cdef __pyx_unpickle_Link__set_state(Link __pyx_result, tuple __pyx_state):
5415 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1] # <<<<<<<<<<<<<<
5416 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
5417 * __pyx_result.__dict__.update(__pyx_state[2])
5418 */
5419 if (unlikely(__pyx_v___pyx_state == Py_None)) {
5420 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
5421 __PYX_ERR(1, 12, __pyx_L1_error)
5422 }
5423 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
5424 __Pyx_GOTREF(__pyx_t_1);
5425 __Pyx_GIVEREF(__pyx_t_1);
5426 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name);
5427 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name);
5428 __pyx_v___pyx_result->__pyx_base.name = __pyx_t_1;
5429 __pyx_t_1 = 0;
5430 if (unlikely(__pyx_v___pyx_state == Py_None)) {
5431 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
5432 __PYX_ERR(1, 12, __pyx_L1_error)
5433 }
5434 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
5435 __Pyx_GOTREF(__pyx_t_1);
5436 __pyx_t_2 = __Pyx_PyInt_As_hid_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((hid_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
5437 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5438 __pyx_v___pyx_result->__pyx_base.parent_id = __pyx_t_2;
5439
5440 /* "(tree fragment)":13
5441 * cdef __pyx_unpickle_Link__set_state(Link __pyx_result, tuple __pyx_state):
5442 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5443 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
5444 * __pyx_result.__dict__.update(__pyx_state[2])
5445 */
5446 if (unlikely(__pyx_v___pyx_state == Py_None)) {
5447 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
5448 __PYX_ERR(1, 13, __pyx_L1_error)
5449 }
5450 __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
5451 __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
5452 if (__pyx_t_5) {
5453 } else {
5454 __pyx_t_3 = __pyx_t_5;
5455 goto __pyx_L4_bool_binop_done;
5456 }
5457 __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
5458 __pyx_t_6 = (__pyx_t_5 != 0);
5459 __pyx_t_3 = __pyx_t_6;
5460 __pyx_L4_bool_binop_done:;
5461 if (__pyx_t_3) {
5462
5463 /* "(tree fragment)":14
5464 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5465 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
5466 * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
5467 */
5468 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
5469 __Pyx_GOTREF(__pyx_t_7);
5470 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
5471 __Pyx_GOTREF(__pyx_t_8);
5472 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5473 if (unlikely(__pyx_v___pyx_state == Py_None)) {
5474 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
5475 __PYX_ERR(1, 14, __pyx_L1_error)
5476 }
5477 __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
5478 __Pyx_GOTREF(__pyx_t_7);
5479 __pyx_t_9 = NULL;
5480 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
5481 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
5482 if (likely(__pyx_t_9)) {
5483 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
5484 __Pyx_INCREF(__pyx_t_9);
5485 __Pyx_INCREF(function);
5486 __Pyx_DECREF_SET(__pyx_t_8, function);
5487 }
5488 }
5489 __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
5490 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5491 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5492 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
5493 __Pyx_GOTREF(__pyx_t_1);
5494 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5495 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5496
5497 /* "(tree fragment)":13
5498 * cdef __pyx_unpickle_Link__set_state(Link __pyx_result, tuple __pyx_state):
5499 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5500 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
5501 * __pyx_result.__dict__.update(__pyx_state[2])
5502 */
5503 }
5504
5505 /* "(tree fragment)":11
5506 * __pyx_unpickle_Link__set_state(<Link> __pyx_result, __pyx_state)
5507 * return __pyx_result
5508 * cdef __pyx_unpickle_Link__set_state(Link __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
5509 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5510 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
5511 */
5512
5513 /* function exit code */
5514 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5515 goto __pyx_L0;
5516 __pyx_L1_error:;
5517 __Pyx_XDECREF(__pyx_t_1);
5518 __Pyx_XDECREF(__pyx_t_7);
5519 __Pyx_XDECREF(__pyx_t_8);
5520 __Pyx_XDECREF(__pyx_t_9);
5521 __Pyx_AddTraceback("tables.linkextension.__pyx_unpickle_Link__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
5522 __pyx_r = 0;
5523 __pyx_L0:;
5524 __Pyx_XGIVEREF(__pyx_r);
5525 __Pyx_RefNannyFinishContext();
5526 return __pyx_r;
5527 }
5528
5529 /* "(tree fragment)":1
5530 * def __pyx_unpickle_SoftLink(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
5531 * cdef object __pyx_PickleError
5532 * cdef object __pyx_result
5533 */
5534
5535 /* Python wrapper */
5536 static PyObject *__pyx_pw_6tables_13linkextension_7__pyx_unpickle_SoftLink(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5537 static PyMethodDef __pyx_mdef_6tables_13linkextension_7__pyx_unpickle_SoftLink = {"__pyx_unpickle_SoftLink", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_13linkextension_7__pyx_unpickle_SoftLink, METH_VARARGS|METH_KEYWORDS, 0};
__pyx_pw_6tables_13linkextension_7__pyx_unpickle_SoftLink(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)5538 static PyObject *__pyx_pw_6tables_13linkextension_7__pyx_unpickle_SoftLink(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5539 PyObject *__pyx_v___pyx_type = 0;
5540 long __pyx_v___pyx_checksum;
5541 PyObject *__pyx_v___pyx_state = 0;
5542 PyObject *__pyx_r = 0;
5543 __Pyx_RefNannyDeclarations
5544 __Pyx_RefNannySetupContext("__pyx_unpickle_SoftLink (wrapper)", 0);
5545 {
5546 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
5547 PyObject* values[3] = {0,0,0};
5548 if (unlikely(__pyx_kwds)) {
5549 Py_ssize_t kw_args;
5550 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5551 switch (pos_args) {
5552 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5553 CYTHON_FALLTHROUGH;
5554 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5555 CYTHON_FALLTHROUGH;
5556 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5557 CYTHON_FALLTHROUGH;
5558 case 0: break;
5559 default: goto __pyx_L5_argtuple_error;
5560 }
5561 kw_args = PyDict_Size(__pyx_kwds);
5562 switch (pos_args) {
5563 case 0:
5564 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
5565 else goto __pyx_L5_argtuple_error;
5566 CYTHON_FALLTHROUGH;
5567 case 1:
5568 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
5569 else {
5570 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SoftLink", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
5571 }
5572 CYTHON_FALLTHROUGH;
5573 case 2:
5574 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
5575 else {
5576 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SoftLink", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
5577 }
5578 }
5579 if (unlikely(kw_args > 0)) {
5580 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SoftLink") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
5581 }
5582 } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
5583 goto __pyx_L5_argtuple_error;
5584 } else {
5585 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5586 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5587 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5588 }
5589 __pyx_v___pyx_type = values[0];
5590 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
5591 __pyx_v___pyx_state = values[2];
5592 }
5593 goto __pyx_L4_argument_unpacking_done;
5594 __pyx_L5_argtuple_error:;
5595 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SoftLink", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
5596 __pyx_L3_error:;
5597 __Pyx_AddTraceback("tables.linkextension.__pyx_unpickle_SoftLink", __pyx_clineno, __pyx_lineno, __pyx_filename);
5598 __Pyx_RefNannyFinishContext();
5599 return NULL;
5600 __pyx_L4_argument_unpacking_done:;
5601 __pyx_r = __pyx_pf_6tables_13linkextension_6__pyx_unpickle_SoftLink(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
5602
5603 /* function exit code */
5604 __Pyx_RefNannyFinishContext();
5605 return __pyx_r;
5606 }
5607
__pyx_pf_6tables_13linkextension_6__pyx_unpickle_SoftLink(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v___pyx_type,long __pyx_v___pyx_checksum,PyObject * __pyx_v___pyx_state)5608 static PyObject *__pyx_pf_6tables_13linkextension_6__pyx_unpickle_SoftLink(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
5609 PyObject *__pyx_v___pyx_PickleError = 0;
5610 PyObject *__pyx_v___pyx_result = 0;
5611 PyObject *__pyx_r = NULL;
5612 __Pyx_RefNannyDeclarations
5613 int __pyx_t_1;
5614 PyObject *__pyx_t_2 = NULL;
5615 PyObject *__pyx_t_3 = NULL;
5616 PyObject *__pyx_t_4 = NULL;
5617 PyObject *__pyx_t_5 = NULL;
5618 int __pyx_t_6;
5619 __Pyx_RefNannySetupContext("__pyx_unpickle_SoftLink", 0);
5620
5621 /* "(tree fragment)":4
5622 * cdef object __pyx_PickleError
5623 * cdef object __pyx_result
5624 * if __pyx_checksum != 0x381b6b9: # <<<<<<<<<<<<<<
5625 * from pickle import PickleError as __pyx_PickleError
5626 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5627 */
5628 __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x381b6b9) != 0);
5629 if (__pyx_t_1) {
5630
5631 /* "(tree fragment)":5
5632 * cdef object __pyx_result
5633 * if __pyx_checksum != 0x381b6b9:
5634 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
5635 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5636 * __pyx_result = SoftLink.__new__(__pyx_type)
5637 */
5638 __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
5639 __Pyx_GOTREF(__pyx_t_2);
5640 __Pyx_INCREF(__pyx_n_s_PickleError);
5641 __Pyx_GIVEREF(__pyx_n_s_PickleError);
5642 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
5643 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
5644 __Pyx_GOTREF(__pyx_t_3);
5645 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5646 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
5647 __Pyx_GOTREF(__pyx_t_2);
5648 __Pyx_INCREF(__pyx_t_2);
5649 __pyx_v___pyx_PickleError = __pyx_t_2;
5650 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5651 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5652
5653 /* "(tree fragment)":6
5654 * if __pyx_checksum != 0x381b6b9:
5655 * from pickle import PickleError as __pyx_PickleError
5656 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum) # <<<<<<<<<<<<<<
5657 * __pyx_result = SoftLink.__new__(__pyx_type)
5658 * if __pyx_state is not None:
5659 */
5660 __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
5661 __Pyx_GOTREF(__pyx_t_2);
5662 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x38, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
5663 __Pyx_GOTREF(__pyx_t_4);
5664 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5665 __Pyx_INCREF(__pyx_v___pyx_PickleError);
5666 __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
5667 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5668 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
5669 if (likely(__pyx_t_5)) {
5670 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5671 __Pyx_INCREF(__pyx_t_5);
5672 __Pyx_INCREF(function);
5673 __Pyx_DECREF_SET(__pyx_t_2, function);
5674 }
5675 }
5676 __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
5677 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
5678 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5679 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
5680 __Pyx_GOTREF(__pyx_t_3);
5681 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5682 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5683 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5684 __PYX_ERR(1, 6, __pyx_L1_error)
5685
5686 /* "(tree fragment)":4
5687 * cdef object __pyx_PickleError
5688 * cdef object __pyx_result
5689 * if __pyx_checksum != 0x381b6b9: # <<<<<<<<<<<<<<
5690 * from pickle import PickleError as __pyx_PickleError
5691 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5692 */
5693 }
5694
5695 /* "(tree fragment)":7
5696 * from pickle import PickleError as __pyx_PickleError
5697 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5698 * __pyx_result = SoftLink.__new__(__pyx_type) # <<<<<<<<<<<<<<
5699 * if __pyx_state is not None:
5700 * __pyx_unpickle_SoftLink__set_state(<SoftLink> __pyx_result, __pyx_state)
5701 */
5702 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6tables_13linkextension_SoftLink), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
5703 __Pyx_GOTREF(__pyx_t_2);
5704 __pyx_t_4 = NULL;
5705 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5706 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
5707 if (likely(__pyx_t_4)) {
5708 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5709 __Pyx_INCREF(__pyx_t_4);
5710 __Pyx_INCREF(function);
5711 __Pyx_DECREF_SET(__pyx_t_2, function);
5712 }
5713 }
5714 __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
5715 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5716 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
5717 __Pyx_GOTREF(__pyx_t_3);
5718 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5719 __pyx_v___pyx_result = __pyx_t_3;
5720 __pyx_t_3 = 0;
5721
5722 /* "(tree fragment)":8
5723 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5724 * __pyx_result = SoftLink.__new__(__pyx_type)
5725 * if __pyx_state is not None: # <<<<<<<<<<<<<<
5726 * __pyx_unpickle_SoftLink__set_state(<SoftLink> __pyx_result, __pyx_state)
5727 * return __pyx_result
5728 */
5729 __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
5730 __pyx_t_6 = (__pyx_t_1 != 0);
5731 if (__pyx_t_6) {
5732
5733 /* "(tree fragment)":9
5734 * __pyx_result = SoftLink.__new__(__pyx_type)
5735 * if __pyx_state is not None:
5736 * __pyx_unpickle_SoftLink__set_state(<SoftLink> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
5737 * return __pyx_result
5738 * cdef __pyx_unpickle_SoftLink__set_state(SoftLink __pyx_result, tuple __pyx_state):
5739 */
5740 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
5741 __pyx_t_3 = __pyx_f_6tables_13linkextension___pyx_unpickle_SoftLink__set_state(((struct __pyx_obj_6tables_13linkextension_SoftLink *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
5742 __Pyx_GOTREF(__pyx_t_3);
5743 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5744
5745 /* "(tree fragment)":8
5746 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
5747 * __pyx_result = SoftLink.__new__(__pyx_type)
5748 * if __pyx_state is not None: # <<<<<<<<<<<<<<
5749 * __pyx_unpickle_SoftLink__set_state(<SoftLink> __pyx_result, __pyx_state)
5750 * return __pyx_result
5751 */
5752 }
5753
5754 /* "(tree fragment)":10
5755 * if __pyx_state is not None:
5756 * __pyx_unpickle_SoftLink__set_state(<SoftLink> __pyx_result, __pyx_state)
5757 * return __pyx_result # <<<<<<<<<<<<<<
5758 * cdef __pyx_unpickle_SoftLink__set_state(SoftLink __pyx_result, tuple __pyx_state):
5759 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5760 */
5761 __Pyx_XDECREF(__pyx_r);
5762 __Pyx_INCREF(__pyx_v___pyx_result);
5763 __pyx_r = __pyx_v___pyx_result;
5764 goto __pyx_L0;
5765
5766 /* "(tree fragment)":1
5767 * def __pyx_unpickle_SoftLink(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
5768 * cdef object __pyx_PickleError
5769 * cdef object __pyx_result
5770 */
5771
5772 /* function exit code */
5773 __pyx_L1_error:;
5774 __Pyx_XDECREF(__pyx_t_2);
5775 __Pyx_XDECREF(__pyx_t_3);
5776 __Pyx_XDECREF(__pyx_t_4);
5777 __Pyx_XDECREF(__pyx_t_5);
5778 __Pyx_AddTraceback("tables.linkextension.__pyx_unpickle_SoftLink", __pyx_clineno, __pyx_lineno, __pyx_filename);
5779 __pyx_r = NULL;
5780 __pyx_L0:;
5781 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
5782 __Pyx_XDECREF(__pyx_v___pyx_result);
5783 __Pyx_XGIVEREF(__pyx_r);
5784 __Pyx_RefNannyFinishContext();
5785 return __pyx_r;
5786 }
5787
5788 /* "(tree fragment)":11
5789 * __pyx_unpickle_SoftLink__set_state(<SoftLink> __pyx_result, __pyx_state)
5790 * return __pyx_result
5791 * cdef __pyx_unpickle_SoftLink__set_state(SoftLink __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
5792 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5793 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
5794 */
5795
__pyx_f_6tables_13linkextension___pyx_unpickle_SoftLink__set_state(struct __pyx_obj_6tables_13linkextension_SoftLink * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)5796 static PyObject *__pyx_f_6tables_13linkextension___pyx_unpickle_SoftLink__set_state(struct __pyx_obj_6tables_13linkextension_SoftLink *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
5797 PyObject *__pyx_r = NULL;
5798 __Pyx_RefNannyDeclarations
5799 PyObject *__pyx_t_1 = NULL;
5800 hid_t __pyx_t_2;
5801 int __pyx_t_3;
5802 Py_ssize_t __pyx_t_4;
5803 int __pyx_t_5;
5804 int __pyx_t_6;
5805 PyObject *__pyx_t_7 = NULL;
5806 PyObject *__pyx_t_8 = NULL;
5807 PyObject *__pyx_t_9 = NULL;
5808 __Pyx_RefNannySetupContext("__pyx_unpickle_SoftLink__set_state", 0);
5809
5810 /* "(tree fragment)":12
5811 * return __pyx_result
5812 * cdef __pyx_unpickle_SoftLink__set_state(SoftLink __pyx_result, tuple __pyx_state):
5813 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1] # <<<<<<<<<<<<<<
5814 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
5815 * __pyx_result.__dict__.update(__pyx_state[2])
5816 */
5817 if (unlikely(__pyx_v___pyx_state == Py_None)) {
5818 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
5819 __PYX_ERR(1, 12, __pyx_L1_error)
5820 }
5821 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
5822 __Pyx_GOTREF(__pyx_t_1);
5823 __Pyx_GIVEREF(__pyx_t_1);
5824 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name);
5825 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name);
5826 __pyx_v___pyx_result->__pyx_base.__pyx_base.name = __pyx_t_1;
5827 __pyx_t_1 = 0;
5828 if (unlikely(__pyx_v___pyx_state == Py_None)) {
5829 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
5830 __PYX_ERR(1, 12, __pyx_L1_error)
5831 }
5832 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
5833 __Pyx_GOTREF(__pyx_t_1);
5834 __pyx_t_2 = __Pyx_PyInt_As_hid_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((hid_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
5835 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5836 __pyx_v___pyx_result->__pyx_base.__pyx_base.parent_id = __pyx_t_2;
5837
5838 /* "(tree fragment)":13
5839 * cdef __pyx_unpickle_SoftLink__set_state(SoftLink __pyx_result, tuple __pyx_state):
5840 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5841 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
5842 * __pyx_result.__dict__.update(__pyx_state[2])
5843 */
5844 if (unlikely(__pyx_v___pyx_state == Py_None)) {
5845 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
5846 __PYX_ERR(1, 13, __pyx_L1_error)
5847 }
5848 __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
5849 __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
5850 if (__pyx_t_5) {
5851 } else {
5852 __pyx_t_3 = __pyx_t_5;
5853 goto __pyx_L4_bool_binop_done;
5854 }
5855 __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
5856 __pyx_t_6 = (__pyx_t_5 != 0);
5857 __pyx_t_3 = __pyx_t_6;
5858 __pyx_L4_bool_binop_done:;
5859 if (__pyx_t_3) {
5860
5861 /* "(tree fragment)":14
5862 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5863 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
5864 * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
5865 */
5866 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
5867 __Pyx_GOTREF(__pyx_t_7);
5868 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
5869 __Pyx_GOTREF(__pyx_t_8);
5870 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5871 if (unlikely(__pyx_v___pyx_state == Py_None)) {
5872 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
5873 __PYX_ERR(1, 14, __pyx_L1_error)
5874 }
5875 __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
5876 __Pyx_GOTREF(__pyx_t_7);
5877 __pyx_t_9 = NULL;
5878 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
5879 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
5880 if (likely(__pyx_t_9)) {
5881 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
5882 __Pyx_INCREF(__pyx_t_9);
5883 __Pyx_INCREF(function);
5884 __Pyx_DECREF_SET(__pyx_t_8, function);
5885 }
5886 }
5887 __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
5888 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5889 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5890 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
5891 __Pyx_GOTREF(__pyx_t_1);
5892 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5893 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5894
5895 /* "(tree fragment)":13
5896 * cdef __pyx_unpickle_SoftLink__set_state(SoftLink __pyx_result, tuple __pyx_state):
5897 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5898 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
5899 * __pyx_result.__dict__.update(__pyx_state[2])
5900 */
5901 }
5902
5903 /* "(tree fragment)":11
5904 * __pyx_unpickle_SoftLink__set_state(<SoftLink> __pyx_result, __pyx_state)
5905 * return __pyx_result
5906 * cdef __pyx_unpickle_SoftLink__set_state(SoftLink __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
5907 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
5908 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
5909 */
5910
5911 /* function exit code */
5912 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5913 goto __pyx_L0;
5914 __pyx_L1_error:;
5915 __Pyx_XDECREF(__pyx_t_1);
5916 __Pyx_XDECREF(__pyx_t_7);
5917 __Pyx_XDECREF(__pyx_t_8);
5918 __Pyx_XDECREF(__pyx_t_9);
5919 __Pyx_AddTraceback("tables.linkextension.__pyx_unpickle_SoftLink__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
5920 __pyx_r = 0;
5921 __pyx_L0:;
5922 __Pyx_XGIVEREF(__pyx_r);
5923 __Pyx_RefNannyFinishContext();
5924 return __pyx_r;
5925 }
5926
5927 /* "(tree fragment)":1
5928 * def __pyx_unpickle_ExternalLink(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
5929 * cdef object __pyx_PickleError
5930 * cdef object __pyx_result
5931 */
5932
5933 /* Python wrapper */
5934 static PyObject *__pyx_pw_6tables_13linkextension_9__pyx_unpickle_ExternalLink(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5935 static PyMethodDef __pyx_mdef_6tables_13linkextension_9__pyx_unpickle_ExternalLink = {"__pyx_unpickle_ExternalLink", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_13linkextension_9__pyx_unpickle_ExternalLink, METH_VARARGS|METH_KEYWORDS, 0};
__pyx_pw_6tables_13linkextension_9__pyx_unpickle_ExternalLink(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)5936 static PyObject *__pyx_pw_6tables_13linkextension_9__pyx_unpickle_ExternalLink(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5937 PyObject *__pyx_v___pyx_type = 0;
5938 long __pyx_v___pyx_checksum;
5939 PyObject *__pyx_v___pyx_state = 0;
5940 PyObject *__pyx_r = 0;
5941 __Pyx_RefNannyDeclarations
5942 __Pyx_RefNannySetupContext("__pyx_unpickle_ExternalLink (wrapper)", 0);
5943 {
5944 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
5945 PyObject* values[3] = {0,0,0};
5946 if (unlikely(__pyx_kwds)) {
5947 Py_ssize_t kw_args;
5948 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5949 switch (pos_args) {
5950 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5951 CYTHON_FALLTHROUGH;
5952 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5953 CYTHON_FALLTHROUGH;
5954 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5955 CYTHON_FALLTHROUGH;
5956 case 0: break;
5957 default: goto __pyx_L5_argtuple_error;
5958 }
5959 kw_args = PyDict_Size(__pyx_kwds);
5960 switch (pos_args) {
5961 case 0:
5962 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
5963 else goto __pyx_L5_argtuple_error;
5964 CYTHON_FALLTHROUGH;
5965 case 1:
5966 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
5967 else {
5968 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ExternalLink", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
5969 }
5970 CYTHON_FALLTHROUGH;
5971 case 2:
5972 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
5973 else {
5974 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ExternalLink", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
5975 }
5976 }
5977 if (unlikely(kw_args > 0)) {
5978 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ExternalLink") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
5979 }
5980 } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
5981 goto __pyx_L5_argtuple_error;
5982 } else {
5983 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5984 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5985 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5986 }
5987 __pyx_v___pyx_type = values[0];
5988 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
5989 __pyx_v___pyx_state = values[2];
5990 }
5991 goto __pyx_L4_argument_unpacking_done;
5992 __pyx_L5_argtuple_error:;
5993 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ExternalLink", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
5994 __pyx_L3_error:;
5995 __Pyx_AddTraceback("tables.linkextension.__pyx_unpickle_ExternalLink", __pyx_clineno, __pyx_lineno, __pyx_filename);
5996 __Pyx_RefNannyFinishContext();
5997 return NULL;
5998 __pyx_L4_argument_unpacking_done:;
5999 __pyx_r = __pyx_pf_6tables_13linkextension_8__pyx_unpickle_ExternalLink(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
6000
6001 /* function exit code */
6002 __Pyx_RefNannyFinishContext();
6003 return __pyx_r;
6004 }
6005
__pyx_pf_6tables_13linkextension_8__pyx_unpickle_ExternalLink(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v___pyx_type,long __pyx_v___pyx_checksum,PyObject * __pyx_v___pyx_state)6006 static PyObject *__pyx_pf_6tables_13linkextension_8__pyx_unpickle_ExternalLink(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
6007 PyObject *__pyx_v___pyx_PickleError = 0;
6008 PyObject *__pyx_v___pyx_result = 0;
6009 PyObject *__pyx_r = NULL;
6010 __Pyx_RefNannyDeclarations
6011 int __pyx_t_1;
6012 PyObject *__pyx_t_2 = NULL;
6013 PyObject *__pyx_t_3 = NULL;
6014 PyObject *__pyx_t_4 = NULL;
6015 PyObject *__pyx_t_5 = NULL;
6016 int __pyx_t_6;
6017 __Pyx_RefNannySetupContext("__pyx_unpickle_ExternalLink", 0);
6018
6019 /* "(tree fragment)":4
6020 * cdef object __pyx_PickleError
6021 * cdef object __pyx_result
6022 * if __pyx_checksum != 0x381b6b9: # <<<<<<<<<<<<<<
6023 * from pickle import PickleError as __pyx_PickleError
6024 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
6025 */
6026 __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x381b6b9) != 0);
6027 if (__pyx_t_1) {
6028
6029 /* "(tree fragment)":5
6030 * cdef object __pyx_result
6031 * if __pyx_checksum != 0x381b6b9:
6032 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
6033 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
6034 * __pyx_result = ExternalLink.__new__(__pyx_type)
6035 */
6036 __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
6037 __Pyx_GOTREF(__pyx_t_2);
6038 __Pyx_INCREF(__pyx_n_s_PickleError);
6039 __Pyx_GIVEREF(__pyx_n_s_PickleError);
6040 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
6041 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
6042 __Pyx_GOTREF(__pyx_t_3);
6043 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6044 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
6045 __Pyx_GOTREF(__pyx_t_2);
6046 __Pyx_INCREF(__pyx_t_2);
6047 __pyx_v___pyx_PickleError = __pyx_t_2;
6048 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6049 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6050
6051 /* "(tree fragment)":6
6052 * if __pyx_checksum != 0x381b6b9:
6053 * from pickle import PickleError as __pyx_PickleError
6054 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum) # <<<<<<<<<<<<<<
6055 * __pyx_result = ExternalLink.__new__(__pyx_type)
6056 * if __pyx_state is not None:
6057 */
6058 __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
6059 __Pyx_GOTREF(__pyx_t_2);
6060 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x38, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
6061 __Pyx_GOTREF(__pyx_t_4);
6062 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6063 __Pyx_INCREF(__pyx_v___pyx_PickleError);
6064 __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
6065 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
6066 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
6067 if (likely(__pyx_t_5)) {
6068 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
6069 __Pyx_INCREF(__pyx_t_5);
6070 __Pyx_INCREF(function);
6071 __Pyx_DECREF_SET(__pyx_t_2, function);
6072 }
6073 }
6074 __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
6075 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6076 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6077 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
6078 __Pyx_GOTREF(__pyx_t_3);
6079 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6080 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6081 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6082 __PYX_ERR(1, 6, __pyx_L1_error)
6083
6084 /* "(tree fragment)":4
6085 * cdef object __pyx_PickleError
6086 * cdef object __pyx_result
6087 * if __pyx_checksum != 0x381b6b9: # <<<<<<<<<<<<<<
6088 * from pickle import PickleError as __pyx_PickleError
6089 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
6090 */
6091 }
6092
6093 /* "(tree fragment)":7
6094 * from pickle import PickleError as __pyx_PickleError
6095 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
6096 * __pyx_result = ExternalLink.__new__(__pyx_type) # <<<<<<<<<<<<<<
6097 * if __pyx_state is not None:
6098 * __pyx_unpickle_ExternalLink__set_state(<ExternalLink> __pyx_result, __pyx_state)
6099 */
6100 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6tables_13linkextension_ExternalLink), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
6101 __Pyx_GOTREF(__pyx_t_2);
6102 __pyx_t_4 = NULL;
6103 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
6104 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
6105 if (likely(__pyx_t_4)) {
6106 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
6107 __Pyx_INCREF(__pyx_t_4);
6108 __Pyx_INCREF(function);
6109 __Pyx_DECREF_SET(__pyx_t_2, function);
6110 }
6111 }
6112 __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
6113 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6114 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
6115 __Pyx_GOTREF(__pyx_t_3);
6116 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6117 __pyx_v___pyx_result = __pyx_t_3;
6118 __pyx_t_3 = 0;
6119
6120 /* "(tree fragment)":8
6121 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
6122 * __pyx_result = ExternalLink.__new__(__pyx_type)
6123 * if __pyx_state is not None: # <<<<<<<<<<<<<<
6124 * __pyx_unpickle_ExternalLink__set_state(<ExternalLink> __pyx_result, __pyx_state)
6125 * return __pyx_result
6126 */
6127 __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
6128 __pyx_t_6 = (__pyx_t_1 != 0);
6129 if (__pyx_t_6) {
6130
6131 /* "(tree fragment)":9
6132 * __pyx_result = ExternalLink.__new__(__pyx_type)
6133 * if __pyx_state is not None:
6134 * __pyx_unpickle_ExternalLink__set_state(<ExternalLink> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
6135 * return __pyx_result
6136 * cdef __pyx_unpickle_ExternalLink__set_state(ExternalLink __pyx_result, tuple __pyx_state):
6137 */
6138 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
6139 __pyx_t_3 = __pyx_f_6tables_13linkextension___pyx_unpickle_ExternalLink__set_state(((struct __pyx_obj_6tables_13linkextension_ExternalLink *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
6140 __Pyx_GOTREF(__pyx_t_3);
6141 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6142
6143 /* "(tree fragment)":8
6144 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x381b6b9 = (name, parent_id))" % __pyx_checksum)
6145 * __pyx_result = ExternalLink.__new__(__pyx_type)
6146 * if __pyx_state is not None: # <<<<<<<<<<<<<<
6147 * __pyx_unpickle_ExternalLink__set_state(<ExternalLink> __pyx_result, __pyx_state)
6148 * return __pyx_result
6149 */
6150 }
6151
6152 /* "(tree fragment)":10
6153 * if __pyx_state is not None:
6154 * __pyx_unpickle_ExternalLink__set_state(<ExternalLink> __pyx_result, __pyx_state)
6155 * return __pyx_result # <<<<<<<<<<<<<<
6156 * cdef __pyx_unpickle_ExternalLink__set_state(ExternalLink __pyx_result, tuple __pyx_state):
6157 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
6158 */
6159 __Pyx_XDECREF(__pyx_r);
6160 __Pyx_INCREF(__pyx_v___pyx_result);
6161 __pyx_r = __pyx_v___pyx_result;
6162 goto __pyx_L0;
6163
6164 /* "(tree fragment)":1
6165 * def __pyx_unpickle_ExternalLink(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
6166 * cdef object __pyx_PickleError
6167 * cdef object __pyx_result
6168 */
6169
6170 /* function exit code */
6171 __pyx_L1_error:;
6172 __Pyx_XDECREF(__pyx_t_2);
6173 __Pyx_XDECREF(__pyx_t_3);
6174 __Pyx_XDECREF(__pyx_t_4);
6175 __Pyx_XDECREF(__pyx_t_5);
6176 __Pyx_AddTraceback("tables.linkextension.__pyx_unpickle_ExternalLink", __pyx_clineno, __pyx_lineno, __pyx_filename);
6177 __pyx_r = NULL;
6178 __pyx_L0:;
6179 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
6180 __Pyx_XDECREF(__pyx_v___pyx_result);
6181 __Pyx_XGIVEREF(__pyx_r);
6182 __Pyx_RefNannyFinishContext();
6183 return __pyx_r;
6184 }
6185
6186 /* "(tree fragment)":11
6187 * __pyx_unpickle_ExternalLink__set_state(<ExternalLink> __pyx_result, __pyx_state)
6188 * return __pyx_result
6189 * cdef __pyx_unpickle_ExternalLink__set_state(ExternalLink __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
6190 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
6191 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
6192 */
6193
__pyx_f_6tables_13linkextension___pyx_unpickle_ExternalLink__set_state(struct __pyx_obj_6tables_13linkextension_ExternalLink * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)6194 static PyObject *__pyx_f_6tables_13linkextension___pyx_unpickle_ExternalLink__set_state(struct __pyx_obj_6tables_13linkextension_ExternalLink *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
6195 PyObject *__pyx_r = NULL;
6196 __Pyx_RefNannyDeclarations
6197 PyObject *__pyx_t_1 = NULL;
6198 hid_t __pyx_t_2;
6199 int __pyx_t_3;
6200 Py_ssize_t __pyx_t_4;
6201 int __pyx_t_5;
6202 int __pyx_t_6;
6203 PyObject *__pyx_t_7 = NULL;
6204 PyObject *__pyx_t_8 = NULL;
6205 PyObject *__pyx_t_9 = NULL;
6206 __Pyx_RefNannySetupContext("__pyx_unpickle_ExternalLink__set_state", 0);
6207
6208 /* "(tree fragment)":12
6209 * return __pyx_result
6210 * cdef __pyx_unpickle_ExternalLink__set_state(ExternalLink __pyx_result, tuple __pyx_state):
6211 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1] # <<<<<<<<<<<<<<
6212 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
6213 * __pyx_result.__dict__.update(__pyx_state[2])
6214 */
6215 if (unlikely(__pyx_v___pyx_state == Py_None)) {
6216 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
6217 __PYX_ERR(1, 12, __pyx_L1_error)
6218 }
6219 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
6220 __Pyx_GOTREF(__pyx_t_1);
6221 __Pyx_GIVEREF(__pyx_t_1);
6222 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name);
6223 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name);
6224 __pyx_v___pyx_result->__pyx_base.__pyx_base.name = __pyx_t_1;
6225 __pyx_t_1 = 0;
6226 if (unlikely(__pyx_v___pyx_state == Py_None)) {
6227 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
6228 __PYX_ERR(1, 12, __pyx_L1_error)
6229 }
6230 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
6231 __Pyx_GOTREF(__pyx_t_1);
6232 __pyx_t_2 = __Pyx_PyInt_As_hid_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((hid_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
6233 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6234 __pyx_v___pyx_result->__pyx_base.__pyx_base.parent_id = __pyx_t_2;
6235
6236 /* "(tree fragment)":13
6237 * cdef __pyx_unpickle_ExternalLink__set_state(ExternalLink __pyx_result, tuple __pyx_state):
6238 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
6239 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
6240 * __pyx_result.__dict__.update(__pyx_state[2])
6241 */
6242 if (unlikely(__pyx_v___pyx_state == Py_None)) {
6243 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
6244 __PYX_ERR(1, 13, __pyx_L1_error)
6245 }
6246 __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
6247 __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
6248 if (__pyx_t_5) {
6249 } else {
6250 __pyx_t_3 = __pyx_t_5;
6251 goto __pyx_L4_bool_binop_done;
6252 }
6253 __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
6254 __pyx_t_6 = (__pyx_t_5 != 0);
6255 __pyx_t_3 = __pyx_t_6;
6256 __pyx_L4_bool_binop_done:;
6257 if (__pyx_t_3) {
6258
6259 /* "(tree fragment)":14
6260 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
6261 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
6262 * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
6263 */
6264 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
6265 __Pyx_GOTREF(__pyx_t_7);
6266 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
6267 __Pyx_GOTREF(__pyx_t_8);
6268 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6269 if (unlikely(__pyx_v___pyx_state == Py_None)) {
6270 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
6271 __PYX_ERR(1, 14, __pyx_L1_error)
6272 }
6273 __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
6274 __Pyx_GOTREF(__pyx_t_7);
6275 __pyx_t_9 = NULL;
6276 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
6277 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
6278 if (likely(__pyx_t_9)) {
6279 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
6280 __Pyx_INCREF(__pyx_t_9);
6281 __Pyx_INCREF(function);
6282 __Pyx_DECREF_SET(__pyx_t_8, function);
6283 }
6284 }
6285 __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
6286 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
6287 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6288 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
6289 __Pyx_GOTREF(__pyx_t_1);
6290 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6291 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6292
6293 /* "(tree fragment)":13
6294 * cdef __pyx_unpickle_ExternalLink__set_state(ExternalLink __pyx_result, tuple __pyx_state):
6295 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
6296 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
6297 * __pyx_result.__dict__.update(__pyx_state[2])
6298 */
6299 }
6300
6301 /* "(tree fragment)":11
6302 * __pyx_unpickle_ExternalLink__set_state(<ExternalLink> __pyx_result, __pyx_state)
6303 * return __pyx_result
6304 * cdef __pyx_unpickle_ExternalLink__set_state(ExternalLink __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
6305 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
6306 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
6307 */
6308
6309 /* function exit code */
6310 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6311 goto __pyx_L0;
6312 __pyx_L1_error:;
6313 __Pyx_XDECREF(__pyx_t_1);
6314 __Pyx_XDECREF(__pyx_t_7);
6315 __Pyx_XDECREF(__pyx_t_8);
6316 __Pyx_XDECREF(__pyx_t_9);
6317 __Pyx_AddTraceback("tables.linkextension.__pyx_unpickle_ExternalLink__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
6318 __pyx_r = 0;
6319 __pyx_L0:;
6320 __Pyx_XGIVEREF(__pyx_r);
6321 __Pyx_RefNannyFinishContext();
6322 return __pyx_r;
6323 }
6324
6325 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
6326 * # experimental exception made for __getbuffer__ and __releasebuffer__
6327 * # -- the details of this may change.
6328 * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
6329 * # This implementation of getbuffer is geared towards Cython
6330 * # requirements, and does not yet fulfill the PEP.
6331 */
6332
6333 /* Python wrapper */
6334 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
__pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)6335 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
6336 int __pyx_r;
6337 __Pyx_RefNannyDeclarations
6338 __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
6339 __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
6340
6341 /* function exit code */
6342 __Pyx_RefNannyFinishContext();
6343 return __pyx_r;
6344 }
6345
__pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)6346 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
6347 int __pyx_v_i;
6348 int __pyx_v_ndim;
6349 int __pyx_v_endian_detector;
6350 int __pyx_v_little_endian;
6351 int __pyx_v_t;
6352 char *__pyx_v_f;
6353 PyArray_Descr *__pyx_v_descr = 0;
6354 int __pyx_v_offset;
6355 int __pyx_r;
6356 __Pyx_RefNannyDeclarations
6357 int __pyx_t_1;
6358 int __pyx_t_2;
6359 PyObject *__pyx_t_3 = NULL;
6360 int __pyx_t_4;
6361 int __pyx_t_5;
6362 int __pyx_t_6;
6363 PyArray_Descr *__pyx_t_7;
6364 PyObject *__pyx_t_8 = NULL;
6365 char *__pyx_t_9;
6366 if (__pyx_v_info == NULL) {
6367 PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
6368 return -1;
6369 }
6370 __Pyx_RefNannySetupContext("__getbuffer__", 0);
6371 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
6372 __Pyx_GIVEREF(__pyx_v_info->obj);
6373
6374 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
6375 *
6376 * cdef int i, ndim
6377 * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
6378 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
6379 *
6380 */
6381 __pyx_v_endian_detector = 1;
6382
6383 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
6384 * cdef int i, ndim
6385 * cdef int endian_detector = 1
6386 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
6387 *
6388 * ndim = PyArray_NDIM(self)
6389 */
6390 __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
6391
6392 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
6393 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
6394 *
6395 * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
6396 *
6397 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
6398 */
6399 __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
6400
6401 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
6402 * ndim = PyArray_NDIM(self)
6403 *
6404 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
6405 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
6406 * raise ValueError(u"ndarray is not C contiguous")
6407 */
6408 __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
6409 if (__pyx_t_2) {
6410 } else {
6411 __pyx_t_1 = __pyx_t_2;
6412 goto __pyx_L4_bool_binop_done;
6413 }
6414
6415 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
6416 *
6417 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
6418 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
6419 * raise ValueError(u"ndarray is not C contiguous")
6420 *
6421 */
6422 __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);
6423 __pyx_t_1 = __pyx_t_2;
6424 __pyx_L4_bool_binop_done:;
6425
6426 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
6427 * ndim = PyArray_NDIM(self)
6428 *
6429 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
6430 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
6431 * raise ValueError(u"ndarray is not C contiguous")
6432 */
6433 if (unlikely(__pyx_t_1)) {
6434
6435 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
6436 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
6437 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
6438 * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
6439 *
6440 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
6441 */
6442 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error)
6443 __Pyx_GOTREF(__pyx_t_3);
6444 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6445 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6446 __PYX_ERR(2, 272, __pyx_L1_error)
6447
6448 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
6449 * ndim = PyArray_NDIM(self)
6450 *
6451 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
6452 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
6453 * raise ValueError(u"ndarray is not C contiguous")
6454 */
6455 }
6456
6457 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
6458 * raise ValueError(u"ndarray is not C contiguous")
6459 *
6460 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
6461 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
6462 * raise ValueError(u"ndarray is not Fortran contiguous")
6463 */
6464 __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
6465 if (__pyx_t_2) {
6466 } else {
6467 __pyx_t_1 = __pyx_t_2;
6468 goto __pyx_L7_bool_binop_done;
6469 }
6470
6471 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
6472 *
6473 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
6474 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
6475 * raise ValueError(u"ndarray is not Fortran contiguous")
6476 *
6477 */
6478 __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);
6479 __pyx_t_1 = __pyx_t_2;
6480 __pyx_L7_bool_binop_done:;
6481
6482 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
6483 * raise ValueError(u"ndarray is not C contiguous")
6484 *
6485 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
6486 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
6487 * raise ValueError(u"ndarray is not Fortran contiguous")
6488 */
6489 if (unlikely(__pyx_t_1)) {
6490
6491 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
6492 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
6493 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
6494 * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
6495 *
6496 * info.buf = PyArray_DATA(self)
6497 */
6498 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error)
6499 __Pyx_GOTREF(__pyx_t_3);
6500 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6501 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6502 __PYX_ERR(2, 276, __pyx_L1_error)
6503
6504 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
6505 * raise ValueError(u"ndarray is not C contiguous")
6506 *
6507 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
6508 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
6509 * raise ValueError(u"ndarray is not Fortran contiguous")
6510 */
6511 }
6512
6513 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
6514 * raise ValueError(u"ndarray is not Fortran contiguous")
6515 *
6516 * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
6517 * info.ndim = ndim
6518 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
6519 */
6520 __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
6521
6522 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
6523 *
6524 * info.buf = PyArray_DATA(self)
6525 * info.ndim = ndim # <<<<<<<<<<<<<<
6526 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
6527 * # Allocate new buffer for strides and shape info.
6528 */
6529 __pyx_v_info->ndim = __pyx_v_ndim;
6530
6531 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
6532 * info.buf = PyArray_DATA(self)
6533 * info.ndim = ndim
6534 * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
6535 * # Allocate new buffer for strides and shape info.
6536 * # This is allocated as one block, strides first.
6537 */
6538 __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
6539 if (__pyx_t_1) {
6540
6541 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
6542 * # Allocate new buffer for strides and shape info.
6543 * # This is allocated as one block, strides first.
6544 * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
6545 * info.shape = info.strides + ndim
6546 * for i in range(ndim):
6547 */
6548 __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
6549
6550 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
6551 * # This is allocated as one block, strides first.
6552 * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
6553 * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
6554 * for i in range(ndim):
6555 * info.strides[i] = PyArray_STRIDES(self)[i]
6556 */
6557 __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
6558
6559 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":285
6560 * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
6561 * info.shape = info.strides + ndim
6562 * for i in range(ndim): # <<<<<<<<<<<<<<
6563 * info.strides[i] = PyArray_STRIDES(self)[i]
6564 * info.shape[i] = PyArray_DIMS(self)[i]
6565 */
6566 __pyx_t_4 = __pyx_v_ndim;
6567 __pyx_t_5 = __pyx_t_4;
6568 for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
6569 __pyx_v_i = __pyx_t_6;
6570
6571 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":286
6572 * info.shape = info.strides + ndim
6573 * for i in range(ndim):
6574 * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
6575 * info.shape[i] = PyArray_DIMS(self)[i]
6576 * else:
6577 */
6578 (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
6579
6580 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":287
6581 * for i in range(ndim):
6582 * info.strides[i] = PyArray_STRIDES(self)[i]
6583 * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
6584 * else:
6585 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
6586 */
6587 (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
6588 }
6589
6590 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
6591 * info.buf = PyArray_DATA(self)
6592 * info.ndim = ndim
6593 * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
6594 * # Allocate new buffer for strides and shape info.
6595 * # This is allocated as one block, strides first.
6596 */
6597 goto __pyx_L9;
6598 }
6599
6600 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":289
6601 * info.shape[i] = PyArray_DIMS(self)[i]
6602 * else:
6603 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
6604 * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
6605 * info.suboffsets = NULL
6606 */
6607 /*else*/ {
6608 __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
6609
6610 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
6611 * else:
6612 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
6613 * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
6614 * info.suboffsets = NULL
6615 * info.itemsize = PyArray_ITEMSIZE(self)
6616 */
6617 __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
6618 }
6619 __pyx_L9:;
6620
6621 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
6622 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
6623 * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
6624 * info.suboffsets = NULL # <<<<<<<<<<<<<<
6625 * info.itemsize = PyArray_ITEMSIZE(self)
6626 * info.readonly = not PyArray_ISWRITEABLE(self)
6627 */
6628 __pyx_v_info->suboffsets = NULL;
6629
6630 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
6631 * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
6632 * info.suboffsets = NULL
6633 * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
6634 * info.readonly = not PyArray_ISWRITEABLE(self)
6635 *
6636 */
6637 __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
6638
6639 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
6640 * info.suboffsets = NULL
6641 * info.itemsize = PyArray_ITEMSIZE(self)
6642 * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
6643 *
6644 * cdef int t
6645 */
6646 __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
6647
6648 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":296
6649 *
6650 * cdef int t
6651 * cdef char* f = NULL # <<<<<<<<<<<<<<
6652 * cdef dtype descr = <dtype>PyArray_DESCR(self)
6653 * cdef int offset
6654 */
6655 __pyx_v_f = NULL;
6656
6657 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":297
6658 * cdef int t
6659 * cdef char* f = NULL
6660 * cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
6661 * cdef int offset
6662 *
6663 */
6664 __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
6665 __pyx_t_3 = ((PyObject *)__pyx_t_7);
6666 __Pyx_INCREF(__pyx_t_3);
6667 __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
6668 __pyx_t_3 = 0;
6669
6670 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":300
6671 * cdef int offset
6672 *
6673 * info.obj = self # <<<<<<<<<<<<<<
6674 *
6675 * if not PyDataType_HASFIELDS(descr):
6676 */
6677 __Pyx_INCREF(((PyObject *)__pyx_v_self));
6678 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6679 __Pyx_GOTREF(__pyx_v_info->obj);
6680 __Pyx_DECREF(__pyx_v_info->obj);
6681 __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
6682
6683 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302
6684 * info.obj = self
6685 *
6686 * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
6687 * t = descr.type_num
6688 * if ((descr.byteorder == c'>' and little_endian) or
6689 */
6690 __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
6691 if (__pyx_t_1) {
6692
6693 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":303
6694 *
6695 * if not PyDataType_HASFIELDS(descr):
6696 * t = descr.type_num # <<<<<<<<<<<<<<
6697 * if ((descr.byteorder == c'>' and little_endian) or
6698 * (descr.byteorder == c'<' and not little_endian)):
6699 */
6700 __pyx_t_4 = __pyx_v_descr->type_num;
6701 __pyx_v_t = __pyx_t_4;
6702
6703 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
6704 * if not PyDataType_HASFIELDS(descr):
6705 * t = descr.type_num
6706 * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
6707 * (descr.byteorder == c'<' and not little_endian)):
6708 * raise ValueError(u"Non-native byte order not supported")
6709 */
6710 __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
6711 if (!__pyx_t_2) {
6712 goto __pyx_L15_next_or;
6713 } else {
6714 }
6715 __pyx_t_2 = (__pyx_v_little_endian != 0);
6716 if (!__pyx_t_2) {
6717 } else {
6718 __pyx_t_1 = __pyx_t_2;
6719 goto __pyx_L14_bool_binop_done;
6720 }
6721 __pyx_L15_next_or:;
6722
6723 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":305
6724 * t = descr.type_num
6725 * if ((descr.byteorder == c'>' and little_endian) or
6726 * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
6727 * raise ValueError(u"Non-native byte order not supported")
6728 * if t == NPY_BYTE: f = "b"
6729 */
6730 __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
6731 if (__pyx_t_2) {
6732 } else {
6733 __pyx_t_1 = __pyx_t_2;
6734 goto __pyx_L14_bool_binop_done;
6735 }
6736 __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
6737 __pyx_t_1 = __pyx_t_2;
6738 __pyx_L14_bool_binop_done:;
6739
6740 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
6741 * if not PyDataType_HASFIELDS(descr):
6742 * t = descr.type_num
6743 * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
6744 * (descr.byteorder == c'<' and not little_endian)):
6745 * raise ValueError(u"Non-native byte order not supported")
6746 */
6747 if (unlikely(__pyx_t_1)) {
6748
6749 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
6750 * if ((descr.byteorder == c'>' and little_endian) or
6751 * (descr.byteorder == c'<' and not little_endian)):
6752 * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
6753 * if t == NPY_BYTE: f = "b"
6754 * elif t == NPY_UBYTE: f = "B"
6755 */
6756 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error)
6757 __Pyx_GOTREF(__pyx_t_3);
6758 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6759 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6760 __PYX_ERR(2, 306, __pyx_L1_error)
6761
6762 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
6763 * if not PyDataType_HASFIELDS(descr):
6764 * t = descr.type_num
6765 * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
6766 * (descr.byteorder == c'<' and not little_endian)):
6767 * raise ValueError(u"Non-native byte order not supported")
6768 */
6769 }
6770
6771 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":307
6772 * (descr.byteorder == c'<' and not little_endian)):
6773 * raise ValueError(u"Non-native byte order not supported")
6774 * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
6775 * elif t == NPY_UBYTE: f = "B"
6776 * elif t == NPY_SHORT: f = "h"
6777 */
6778 switch (__pyx_v_t) {
6779 case NPY_BYTE:
6780 __pyx_v_f = ((char *)"b");
6781 break;
6782 case NPY_UBYTE:
6783
6784 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":308
6785 * raise ValueError(u"Non-native byte order not supported")
6786 * if t == NPY_BYTE: f = "b"
6787 * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
6788 * elif t == NPY_SHORT: f = "h"
6789 * elif t == NPY_USHORT: f = "H"
6790 */
6791 __pyx_v_f = ((char *)"B");
6792 break;
6793 case NPY_SHORT:
6794
6795 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":309
6796 * if t == NPY_BYTE: f = "b"
6797 * elif t == NPY_UBYTE: f = "B"
6798 * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
6799 * elif t == NPY_USHORT: f = "H"
6800 * elif t == NPY_INT: f = "i"
6801 */
6802 __pyx_v_f = ((char *)"h");
6803 break;
6804 case NPY_USHORT:
6805
6806 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":310
6807 * elif t == NPY_UBYTE: f = "B"
6808 * elif t == NPY_SHORT: f = "h"
6809 * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
6810 * elif t == NPY_INT: f = "i"
6811 * elif t == NPY_UINT: f = "I"
6812 */
6813 __pyx_v_f = ((char *)"H");
6814 break;
6815 case NPY_INT:
6816
6817 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":311
6818 * elif t == NPY_SHORT: f = "h"
6819 * elif t == NPY_USHORT: f = "H"
6820 * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
6821 * elif t == NPY_UINT: f = "I"
6822 * elif t == NPY_LONG: f = "l"
6823 */
6824 __pyx_v_f = ((char *)"i");
6825 break;
6826 case NPY_UINT:
6827
6828 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":312
6829 * elif t == NPY_USHORT: f = "H"
6830 * elif t == NPY_INT: f = "i"
6831 * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
6832 * elif t == NPY_LONG: f = "l"
6833 * elif t == NPY_ULONG: f = "L"
6834 */
6835 __pyx_v_f = ((char *)"I");
6836 break;
6837 case NPY_LONG:
6838
6839 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":313
6840 * elif t == NPY_INT: f = "i"
6841 * elif t == NPY_UINT: f = "I"
6842 * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
6843 * elif t == NPY_ULONG: f = "L"
6844 * elif t == NPY_LONGLONG: f = "q"
6845 */
6846 __pyx_v_f = ((char *)"l");
6847 break;
6848 case NPY_ULONG:
6849
6850 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":314
6851 * elif t == NPY_UINT: f = "I"
6852 * elif t == NPY_LONG: f = "l"
6853 * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
6854 * elif t == NPY_LONGLONG: f = "q"
6855 * elif t == NPY_ULONGLONG: f = "Q"
6856 */
6857 __pyx_v_f = ((char *)"L");
6858 break;
6859 case NPY_LONGLONG:
6860
6861 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":315
6862 * elif t == NPY_LONG: f = "l"
6863 * elif t == NPY_ULONG: f = "L"
6864 * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
6865 * elif t == NPY_ULONGLONG: f = "Q"
6866 * elif t == NPY_FLOAT: f = "f"
6867 */
6868 __pyx_v_f = ((char *)"q");
6869 break;
6870 case NPY_ULONGLONG:
6871
6872 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":316
6873 * elif t == NPY_ULONG: f = "L"
6874 * elif t == NPY_LONGLONG: f = "q"
6875 * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
6876 * elif t == NPY_FLOAT: f = "f"
6877 * elif t == NPY_DOUBLE: f = "d"
6878 */
6879 __pyx_v_f = ((char *)"Q");
6880 break;
6881 case NPY_FLOAT:
6882
6883 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":317
6884 * elif t == NPY_LONGLONG: f = "q"
6885 * elif t == NPY_ULONGLONG: f = "Q"
6886 * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
6887 * elif t == NPY_DOUBLE: f = "d"
6888 * elif t == NPY_LONGDOUBLE: f = "g"
6889 */
6890 __pyx_v_f = ((char *)"f");
6891 break;
6892 case NPY_DOUBLE:
6893
6894 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":318
6895 * elif t == NPY_ULONGLONG: f = "Q"
6896 * elif t == NPY_FLOAT: f = "f"
6897 * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
6898 * elif t == NPY_LONGDOUBLE: f = "g"
6899 * elif t == NPY_CFLOAT: f = "Zf"
6900 */
6901 __pyx_v_f = ((char *)"d");
6902 break;
6903 case NPY_LONGDOUBLE:
6904
6905 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":319
6906 * elif t == NPY_FLOAT: f = "f"
6907 * elif t == NPY_DOUBLE: f = "d"
6908 * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
6909 * elif t == NPY_CFLOAT: f = "Zf"
6910 * elif t == NPY_CDOUBLE: f = "Zd"
6911 */
6912 __pyx_v_f = ((char *)"g");
6913 break;
6914 case NPY_CFLOAT:
6915
6916 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":320
6917 * elif t == NPY_DOUBLE: f = "d"
6918 * elif t == NPY_LONGDOUBLE: f = "g"
6919 * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
6920 * elif t == NPY_CDOUBLE: f = "Zd"
6921 * elif t == NPY_CLONGDOUBLE: f = "Zg"
6922 */
6923 __pyx_v_f = ((char *)"Zf");
6924 break;
6925 case NPY_CDOUBLE:
6926
6927 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":321
6928 * elif t == NPY_LONGDOUBLE: f = "g"
6929 * elif t == NPY_CFLOAT: f = "Zf"
6930 * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
6931 * elif t == NPY_CLONGDOUBLE: f = "Zg"
6932 * elif t == NPY_OBJECT: f = "O"
6933 */
6934 __pyx_v_f = ((char *)"Zd");
6935 break;
6936 case NPY_CLONGDOUBLE:
6937
6938 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":322
6939 * elif t == NPY_CFLOAT: f = "Zf"
6940 * elif t == NPY_CDOUBLE: f = "Zd"
6941 * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
6942 * elif t == NPY_OBJECT: f = "O"
6943 * else:
6944 */
6945 __pyx_v_f = ((char *)"Zg");
6946 break;
6947 case NPY_OBJECT:
6948
6949 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":323
6950 * elif t == NPY_CDOUBLE: f = "Zd"
6951 * elif t == NPY_CLONGDOUBLE: f = "Zg"
6952 * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
6953 * else:
6954 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
6955 */
6956 __pyx_v_f = ((char *)"O");
6957 break;
6958 default:
6959
6960 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":325
6961 * elif t == NPY_OBJECT: f = "O"
6962 * else:
6963 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
6964 * info.format = f
6965 * return
6966 */
6967 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
6968 __Pyx_GOTREF(__pyx_t_3);
6969 __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error)
6970 __Pyx_GOTREF(__pyx_t_8);
6971 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6972 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
6973 __Pyx_GOTREF(__pyx_t_3);
6974 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6975 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6976 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6977 __PYX_ERR(2, 325, __pyx_L1_error)
6978 break;
6979 }
6980
6981 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":326
6982 * else:
6983 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
6984 * info.format = f # <<<<<<<<<<<<<<
6985 * return
6986 * else:
6987 */
6988 __pyx_v_info->format = __pyx_v_f;
6989
6990 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":327
6991 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
6992 * info.format = f
6993 * return # <<<<<<<<<<<<<<
6994 * else:
6995 * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
6996 */
6997 __pyx_r = 0;
6998 goto __pyx_L0;
6999
7000 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302
7001 * info.obj = self
7002 *
7003 * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
7004 * t = descr.type_num
7005 * if ((descr.byteorder == c'>' and little_endian) or
7006 */
7007 }
7008
7009 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":329
7010 * return
7011 * else:
7012 * info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
7013 * info.format[0] = c'^' # Native data types, manual alignment
7014 * offset = 0
7015 */
7016 /*else*/ {
7017 __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
7018
7019 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":330
7020 * else:
7021 * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
7022 * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
7023 * offset = 0
7024 * f = _util_dtypestring(descr, info.format + 1,
7025 */
7026 (__pyx_v_info->format[0]) = '^';
7027
7028 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":331
7029 * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
7030 * info.format[0] = c'^' # Native data types, manual alignment
7031 * offset = 0 # <<<<<<<<<<<<<<
7032 * f = _util_dtypestring(descr, info.format + 1,
7033 * info.format + _buffer_format_string_len,
7034 */
7035 __pyx_v_offset = 0;
7036
7037 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":332
7038 * info.format[0] = c'^' # Native data types, manual alignment
7039 * offset = 0
7040 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
7041 * info.format + _buffer_format_string_len,
7042 * &offset)
7043 */
7044 __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error)
7045 __pyx_v_f = __pyx_t_9;
7046
7047 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":335
7048 * info.format + _buffer_format_string_len,
7049 * &offset)
7050 * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
7051 *
7052 * def __releasebuffer__(ndarray self, Py_buffer* info):
7053 */
7054 (__pyx_v_f[0]) = '\x00';
7055 }
7056
7057 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
7058 * # experimental exception made for __getbuffer__ and __releasebuffer__
7059 * # -- the details of this may change.
7060 * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
7061 * # This implementation of getbuffer is geared towards Cython
7062 * # requirements, and does not yet fulfill the PEP.
7063 */
7064
7065 /* function exit code */
7066 __pyx_r = 0;
7067 goto __pyx_L0;
7068 __pyx_L1_error:;
7069 __Pyx_XDECREF(__pyx_t_3);
7070 __Pyx_XDECREF(__pyx_t_8);
7071 __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7072 __pyx_r = -1;
7073 if (__pyx_v_info->obj != NULL) {
7074 __Pyx_GOTREF(__pyx_v_info->obj);
7075 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
7076 }
7077 goto __pyx_L2;
7078 __pyx_L0:;
7079 if (__pyx_v_info->obj == Py_None) {
7080 __Pyx_GOTREF(__pyx_v_info->obj);
7081 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
7082 }
7083 __pyx_L2:;
7084 __Pyx_XDECREF((PyObject *)__pyx_v_descr);
7085 __Pyx_RefNannyFinishContext();
7086 return __pyx_r;
7087 }
7088
7089 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
7090 * f[0] = c'\0' # Terminate format string
7091 *
7092 * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
7093 * if PyArray_HASFIELDS(self):
7094 * PyObject_Free(info.format)
7095 */
7096
7097 /* Python wrapper */
7098 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
__pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject * __pyx_v_self,Py_buffer * __pyx_v_info)7099 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
7100 __Pyx_RefNannyDeclarations
7101 __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
7102 __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
7103
7104 /* function exit code */
7105 __Pyx_RefNannyFinishContext();
7106 }
7107
__pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject * __pyx_v_self,Py_buffer * __pyx_v_info)7108 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
7109 __Pyx_RefNannyDeclarations
7110 int __pyx_t_1;
7111 __Pyx_RefNannySetupContext("__releasebuffer__", 0);
7112
7113 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
7114 *
7115 * def __releasebuffer__(ndarray self, Py_buffer* info):
7116 * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
7117 * PyObject_Free(info.format)
7118 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
7119 */
7120 __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
7121 if (__pyx_t_1) {
7122
7123 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":339
7124 * def __releasebuffer__(ndarray self, Py_buffer* info):
7125 * if PyArray_HASFIELDS(self):
7126 * PyObject_Free(info.format) # <<<<<<<<<<<<<<
7127 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
7128 * PyObject_Free(info.strides)
7129 */
7130 PyObject_Free(__pyx_v_info->format);
7131
7132 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
7133 *
7134 * def __releasebuffer__(ndarray self, Py_buffer* info):
7135 * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
7136 * PyObject_Free(info.format)
7137 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
7138 */
7139 }
7140
7141 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
7142 * if PyArray_HASFIELDS(self):
7143 * PyObject_Free(info.format)
7144 * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
7145 * PyObject_Free(info.strides)
7146 * # info.shape was stored after info.strides in the same block
7147 */
7148 __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
7149 if (__pyx_t_1) {
7150
7151 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":341
7152 * PyObject_Free(info.format)
7153 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
7154 * PyObject_Free(info.strides) # <<<<<<<<<<<<<<
7155 * # info.shape was stored after info.strides in the same block
7156 *
7157 */
7158 PyObject_Free(__pyx_v_info->strides);
7159
7160 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
7161 * if PyArray_HASFIELDS(self):
7162 * PyObject_Free(info.format)
7163 * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
7164 * PyObject_Free(info.strides)
7165 * # info.shape was stored after info.strides in the same block
7166 */
7167 }
7168
7169 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
7170 * f[0] = c'\0' # Terminate format string
7171 *
7172 * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
7173 * if PyArray_HASFIELDS(self):
7174 * PyObject_Free(info.format)
7175 */
7176
7177 /* function exit code */
7178 __Pyx_RefNannyFinishContext();
7179 }
7180
7181 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
7182 * ctypedef npy_cdouble complex_t
7183 *
7184 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
7185 * return PyArray_MultiIterNew(1, <void*>a)
7186 *
7187 */
7188
__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject * __pyx_v_a)7189 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
7190 PyObject *__pyx_r = NULL;
7191 __Pyx_RefNannyDeclarations
7192 PyObject *__pyx_t_1 = NULL;
7193 __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
7194
7195 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
7196 *
7197 * cdef inline object PyArray_MultiIterNew1(a):
7198 * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
7199 *
7200 * cdef inline object PyArray_MultiIterNew2(a, b):
7201 */
7202 __Pyx_XDECREF(__pyx_r);
7203 __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error)
7204 __Pyx_GOTREF(__pyx_t_1);
7205 __pyx_r = __pyx_t_1;
7206 __pyx_t_1 = 0;
7207 goto __pyx_L0;
7208
7209 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
7210 * ctypedef npy_cdouble complex_t
7211 *
7212 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
7213 * return PyArray_MultiIterNew(1, <void*>a)
7214 *
7215 */
7216
7217 /* function exit code */
7218 __pyx_L1_error:;
7219 __Pyx_XDECREF(__pyx_t_1);
7220 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
7221 __pyx_r = 0;
7222 __pyx_L0:;
7223 __Pyx_XGIVEREF(__pyx_r);
7224 __Pyx_RefNannyFinishContext();
7225 return __pyx_r;
7226 }
7227
7228 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
7229 * return PyArray_MultiIterNew(1, <void*>a)
7230 *
7231 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
7232 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
7233 *
7234 */
7235
__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject * __pyx_v_a,PyObject * __pyx_v_b)7236 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
7237 PyObject *__pyx_r = NULL;
7238 __Pyx_RefNannyDeclarations
7239 PyObject *__pyx_t_1 = NULL;
7240 __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
7241
7242 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":825
7243 *
7244 * cdef inline object PyArray_MultiIterNew2(a, b):
7245 * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
7246 *
7247 * cdef inline object PyArray_MultiIterNew3(a, b, c):
7248 */
7249 __Pyx_XDECREF(__pyx_r);
7250 __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error)
7251 __Pyx_GOTREF(__pyx_t_1);
7252 __pyx_r = __pyx_t_1;
7253 __pyx_t_1 = 0;
7254 goto __pyx_L0;
7255
7256 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
7257 * return PyArray_MultiIterNew(1, <void*>a)
7258 *
7259 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
7260 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
7261 *
7262 */
7263
7264 /* function exit code */
7265 __pyx_L1_error:;
7266 __Pyx_XDECREF(__pyx_t_1);
7267 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
7268 __pyx_r = 0;
7269 __pyx_L0:;
7270 __Pyx_XGIVEREF(__pyx_r);
7271 __Pyx_RefNannyFinishContext();
7272 return __pyx_r;
7273 }
7274
7275 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
7276 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
7277 *
7278 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
7279 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
7280 *
7281 */
7282
__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c)7283 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
7284 PyObject *__pyx_r = NULL;
7285 __Pyx_RefNannyDeclarations
7286 PyObject *__pyx_t_1 = NULL;
7287 __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
7288
7289 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
7290 *
7291 * cdef inline object PyArray_MultiIterNew3(a, b, c):
7292 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
7293 *
7294 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
7295 */
7296 __Pyx_XDECREF(__pyx_r);
7297 __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error)
7298 __Pyx_GOTREF(__pyx_t_1);
7299 __pyx_r = __pyx_t_1;
7300 __pyx_t_1 = 0;
7301 goto __pyx_L0;
7302
7303 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
7304 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
7305 *
7306 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
7307 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
7308 *
7309 */
7310
7311 /* function exit code */
7312 __pyx_L1_error:;
7313 __Pyx_XDECREF(__pyx_t_1);
7314 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
7315 __pyx_r = 0;
7316 __pyx_L0:;
7317 __Pyx_XGIVEREF(__pyx_r);
7318 __Pyx_RefNannyFinishContext();
7319 return __pyx_r;
7320 }
7321
7322 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
7323 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
7324 *
7325 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
7326 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
7327 *
7328 */
7329
__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c,PyObject * __pyx_v_d)7330 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
7331 PyObject *__pyx_r = NULL;
7332 __Pyx_RefNannyDeclarations
7333 PyObject *__pyx_t_1 = NULL;
7334 __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
7335
7336 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
7337 *
7338 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
7339 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
7340 *
7341 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
7342 */
7343 __Pyx_XDECREF(__pyx_r);
7344 __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error)
7345 __Pyx_GOTREF(__pyx_t_1);
7346 __pyx_r = __pyx_t_1;
7347 __pyx_t_1 = 0;
7348 goto __pyx_L0;
7349
7350 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
7351 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
7352 *
7353 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
7354 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
7355 *
7356 */
7357
7358 /* function exit code */
7359 __pyx_L1_error:;
7360 __Pyx_XDECREF(__pyx_t_1);
7361 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
7362 __pyx_r = 0;
7363 __pyx_L0:;
7364 __Pyx_XGIVEREF(__pyx_r);
7365 __Pyx_RefNannyFinishContext();
7366 return __pyx_r;
7367 }
7368
7369 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
7370 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
7371 *
7372 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
7373 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
7374 *
7375 */
7376
__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c,PyObject * __pyx_v_d,PyObject * __pyx_v_e)7377 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
7378 PyObject *__pyx_r = NULL;
7379 __Pyx_RefNannyDeclarations
7380 PyObject *__pyx_t_1 = NULL;
7381 __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
7382
7383 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
7384 *
7385 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
7386 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
7387 *
7388 * cdef inline tuple PyDataType_SHAPE(dtype d):
7389 */
7390 __Pyx_XDECREF(__pyx_r);
7391 __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error)
7392 __Pyx_GOTREF(__pyx_t_1);
7393 __pyx_r = __pyx_t_1;
7394 __pyx_t_1 = 0;
7395 goto __pyx_L0;
7396
7397 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
7398 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
7399 *
7400 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
7401 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
7402 *
7403 */
7404
7405 /* function exit code */
7406 __pyx_L1_error:;
7407 __Pyx_XDECREF(__pyx_t_1);
7408 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
7409 __pyx_r = 0;
7410 __pyx_L0:;
7411 __Pyx_XGIVEREF(__pyx_r);
7412 __Pyx_RefNannyFinishContext();
7413 return __pyx_r;
7414 }
7415
7416 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
7417 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
7418 *
7419 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
7420 * if PyDataType_HASSUBARRAY(d):
7421 * return <tuple>d.subarray.shape
7422 */
7423
__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr * __pyx_v_d)7424 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
7425 PyObject *__pyx_r = NULL;
7426 __Pyx_RefNannyDeclarations
7427 int __pyx_t_1;
7428 __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
7429
7430 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
7431 *
7432 * cdef inline tuple PyDataType_SHAPE(dtype d):
7433 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
7434 * return <tuple>d.subarray.shape
7435 * else:
7436 */
7437 __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
7438 if (__pyx_t_1) {
7439
7440 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
7441 * cdef inline tuple PyDataType_SHAPE(dtype d):
7442 * if PyDataType_HASSUBARRAY(d):
7443 * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
7444 * else:
7445 * return ()
7446 */
7447 __Pyx_XDECREF(__pyx_r);
7448 __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
7449 __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
7450 goto __pyx_L0;
7451
7452 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
7453 *
7454 * cdef inline tuple PyDataType_SHAPE(dtype d):
7455 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
7456 * return <tuple>d.subarray.shape
7457 * else:
7458 */
7459 }
7460
7461 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
7462 * return <tuple>d.subarray.shape
7463 * else:
7464 * return () # <<<<<<<<<<<<<<
7465 *
7466 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
7467 */
7468 /*else*/ {
7469 __Pyx_XDECREF(__pyx_r);
7470 __Pyx_INCREF(__pyx_empty_tuple);
7471 __pyx_r = __pyx_empty_tuple;
7472 goto __pyx_L0;
7473 }
7474
7475 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
7476 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
7477 *
7478 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
7479 * if PyDataType_HASSUBARRAY(d):
7480 * return <tuple>d.subarray.shape
7481 */
7482
7483 /* function exit code */
7484 __pyx_L0:;
7485 __Pyx_XGIVEREF(__pyx_r);
7486 __Pyx_RefNannyFinishContext();
7487 return __pyx_r;
7488 }
7489
7490 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
7491 * return ()
7492 *
7493 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
7494 * # Recursive utility function used in __getbuffer__ to get format
7495 * # string. The new location in the format string is returned.
7496 */
7497
__pyx_f_5numpy__util_dtypestring(PyArray_Descr * __pyx_v_descr,char * __pyx_v_f,char * __pyx_v_end,int * __pyx_v_offset)7498 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
7499 PyArray_Descr *__pyx_v_child = 0;
7500 int __pyx_v_endian_detector;
7501 int __pyx_v_little_endian;
7502 PyObject *__pyx_v_fields = 0;
7503 PyObject *__pyx_v_childname = NULL;
7504 PyObject *__pyx_v_new_offset = NULL;
7505 PyObject *__pyx_v_t = NULL;
7506 char *__pyx_r;
7507 __Pyx_RefNannyDeclarations
7508 PyObject *__pyx_t_1 = NULL;
7509 Py_ssize_t __pyx_t_2;
7510 PyObject *__pyx_t_3 = NULL;
7511 PyObject *__pyx_t_4 = NULL;
7512 int __pyx_t_5;
7513 int __pyx_t_6;
7514 int __pyx_t_7;
7515 long __pyx_t_8;
7516 char *__pyx_t_9;
7517 __Pyx_RefNannySetupContext("_util_dtypestring", 0);
7518
7519 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":847
7520 *
7521 * cdef dtype child
7522 * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
7523 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
7524 * cdef tuple fields
7525 */
7526 __pyx_v_endian_detector = 1;
7527
7528 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":848
7529 * cdef dtype child
7530 * cdef int endian_detector = 1
7531 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
7532 * cdef tuple fields
7533 *
7534 */
7535 __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
7536
7537 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
7538 * cdef tuple fields
7539 *
7540 * for childname in descr.names: # <<<<<<<<<<<<<<
7541 * fields = descr.fields[childname]
7542 * child, new_offset = fields
7543 */
7544 if (unlikely(__pyx_v_descr->names == Py_None)) {
7545 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
7546 __PYX_ERR(2, 851, __pyx_L1_error)
7547 }
7548 __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
7549 for (;;) {
7550 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
7551 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7552 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error)
7553 #else
7554 __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error)
7555 __Pyx_GOTREF(__pyx_t_3);
7556 #endif
7557 __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
7558 __pyx_t_3 = 0;
7559
7560 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":852
7561 *
7562 * for childname in descr.names:
7563 * fields = descr.fields[childname] # <<<<<<<<<<<<<<
7564 * child, new_offset = fields
7565 *
7566 */
7567 if (unlikely(__pyx_v_descr->fields == Py_None)) {
7568 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
7569 __PYX_ERR(2, 852, __pyx_L1_error)
7570 }
7571 __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error)
7572 __Pyx_GOTREF(__pyx_t_3);
7573 if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error)
7574 __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
7575 __pyx_t_3 = 0;
7576
7577 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":853
7578 * for childname in descr.names:
7579 * fields = descr.fields[childname]
7580 * child, new_offset = fields # <<<<<<<<<<<<<<
7581 *
7582 * if (end - f) - <int>(new_offset - offset[0]) < 15:
7583 */
7584 if (likely(__pyx_v_fields != Py_None)) {
7585 PyObject* sequence = __pyx_v_fields;
7586 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
7587 if (unlikely(size != 2)) {
7588 if (size > 2) __Pyx_RaiseTooManyValuesError(2);
7589 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
7590 __PYX_ERR(2, 853, __pyx_L1_error)
7591 }
7592 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7593 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
7594 __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
7595 __Pyx_INCREF(__pyx_t_3);
7596 __Pyx_INCREF(__pyx_t_4);
7597 #else
7598 __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error)
7599 __Pyx_GOTREF(__pyx_t_3);
7600 __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error)
7601 __Pyx_GOTREF(__pyx_t_4);
7602 #endif
7603 } else {
7604 __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error)
7605 }
7606 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error)
7607 __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
7608 __pyx_t_3 = 0;
7609 __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
7610 __pyx_t_4 = 0;
7611
7612 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
7613 * child, new_offset = fields
7614 *
7615 * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
7616 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
7617 *
7618 */
7619 __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error)
7620 __Pyx_GOTREF(__pyx_t_4);
7621 __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error)
7622 __Pyx_GOTREF(__pyx_t_3);
7623 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7624 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error)
7625 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7626 __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
7627 if (unlikely(__pyx_t_6)) {
7628
7629 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
7630 *
7631 * if (end - f) - <int>(new_offset - offset[0]) < 15:
7632 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
7633 *
7634 * if ((child.byteorder == c'>' and little_endian) or
7635 */
7636 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error)
7637 __Pyx_GOTREF(__pyx_t_3);
7638 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
7639 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7640 __PYX_ERR(2, 856, __pyx_L1_error)
7641
7642 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
7643 * child, new_offset = fields
7644 *
7645 * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
7646 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
7647 *
7648 */
7649 }
7650
7651 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
7652 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
7653 *
7654 * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
7655 * (child.byteorder == c'<' and not little_endian)):
7656 * raise ValueError(u"Non-native byte order not supported")
7657 */
7658 __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
7659 if (!__pyx_t_7) {
7660 goto __pyx_L8_next_or;
7661 } else {
7662 }
7663 __pyx_t_7 = (__pyx_v_little_endian != 0);
7664 if (!__pyx_t_7) {
7665 } else {
7666 __pyx_t_6 = __pyx_t_7;
7667 goto __pyx_L7_bool_binop_done;
7668 }
7669 __pyx_L8_next_or:;
7670
7671 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":859
7672 *
7673 * if ((child.byteorder == c'>' and little_endian) or
7674 * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
7675 * raise ValueError(u"Non-native byte order not supported")
7676 * # One could encode it in the format string and have Cython
7677 */
7678 __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
7679 if (__pyx_t_7) {
7680 } else {
7681 __pyx_t_6 = __pyx_t_7;
7682 goto __pyx_L7_bool_binop_done;
7683 }
7684 __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
7685 __pyx_t_6 = __pyx_t_7;
7686 __pyx_L7_bool_binop_done:;
7687
7688 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
7689 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
7690 *
7691 * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
7692 * (child.byteorder == c'<' and not little_endian)):
7693 * raise ValueError(u"Non-native byte order not supported")
7694 */
7695 if (unlikely(__pyx_t_6)) {
7696
7697 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":860
7698 * if ((child.byteorder == c'>' and little_endian) or
7699 * (child.byteorder == c'<' and not little_endian)):
7700 * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
7701 * # One could encode it in the format string and have Cython
7702 * # complain instead, BUT: < and > in format strings also imply
7703 */
7704 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error)
7705 __Pyx_GOTREF(__pyx_t_3);
7706 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
7707 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7708 __PYX_ERR(2, 860, __pyx_L1_error)
7709
7710 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
7711 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
7712 *
7713 * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
7714 * (child.byteorder == c'<' and not little_endian)):
7715 * raise ValueError(u"Non-native byte order not supported")
7716 */
7717 }
7718
7719 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":870
7720 *
7721 * # Output padding bytes
7722 * while offset[0] < new_offset: # <<<<<<<<<<<<<<
7723 * f[0] = 120 # "x"; pad byte
7724 * f += 1
7725 */
7726 while (1) {
7727 __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error)
7728 __Pyx_GOTREF(__pyx_t_3);
7729 __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error)
7730 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7731 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error)
7732 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7733 if (!__pyx_t_6) break;
7734
7735 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":871
7736 * # Output padding bytes
7737 * while offset[0] < new_offset:
7738 * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
7739 * f += 1
7740 * offset[0] += 1
7741 */
7742 (__pyx_v_f[0]) = 0x78;
7743
7744 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":872
7745 * while offset[0] < new_offset:
7746 * f[0] = 120 # "x"; pad byte
7747 * f += 1 # <<<<<<<<<<<<<<
7748 * offset[0] += 1
7749 *
7750 */
7751 __pyx_v_f = (__pyx_v_f + 1);
7752
7753 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":873
7754 * f[0] = 120 # "x"; pad byte
7755 * f += 1
7756 * offset[0] += 1 # <<<<<<<<<<<<<<
7757 *
7758 * offset[0] += child.itemsize
7759 */
7760 __pyx_t_8 = 0;
7761 (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
7762 }
7763
7764 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":875
7765 * offset[0] += 1
7766 *
7767 * offset[0] += child.itemsize # <<<<<<<<<<<<<<
7768 *
7769 * if not PyDataType_HASFIELDS(child):
7770 */
7771 __pyx_t_8 = 0;
7772 (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
7773
7774 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
7775 * offset[0] += child.itemsize
7776 *
7777 * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
7778 * t = child.type_num
7779 * if end - f < 5:
7780 */
7781 __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
7782 if (__pyx_t_6) {
7783
7784 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":878
7785 *
7786 * if not PyDataType_HASFIELDS(child):
7787 * t = child.type_num # <<<<<<<<<<<<<<
7788 * if end - f < 5:
7789 * raise RuntimeError(u"Format string allocated too short.")
7790 */
7791 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error)
7792 __Pyx_GOTREF(__pyx_t_4);
7793 __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
7794 __pyx_t_4 = 0;
7795
7796 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
7797 * if not PyDataType_HASFIELDS(child):
7798 * t = child.type_num
7799 * if end - f < 5: # <<<<<<<<<<<<<<
7800 * raise RuntimeError(u"Format string allocated too short.")
7801 *
7802 */
7803 __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
7804 if (unlikely(__pyx_t_6)) {
7805
7806 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
7807 * t = child.type_num
7808 * if end - f < 5:
7809 * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
7810 *
7811 * # Until ticket #99 is fixed, use integers to avoid warnings
7812 */
7813 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error)
7814 __Pyx_GOTREF(__pyx_t_4);
7815 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
7816 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7817 __PYX_ERR(2, 880, __pyx_L1_error)
7818
7819 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
7820 * if not PyDataType_HASFIELDS(child):
7821 * t = child.type_num
7822 * if end - f < 5: # <<<<<<<<<<<<<<
7823 * raise RuntimeError(u"Format string allocated too short.")
7824 *
7825 */
7826 }
7827
7828 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":883
7829 *
7830 * # Until ticket #99 is fixed, use integers to avoid warnings
7831 * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
7832 * elif t == NPY_UBYTE: f[0] = 66 #"B"
7833 * elif t == NPY_SHORT: f[0] = 104 #"h"
7834 */
7835 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error)
7836 __Pyx_GOTREF(__pyx_t_4);
7837 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error)
7838 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7839 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error)
7840 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7841 if (__pyx_t_6) {
7842 (__pyx_v_f[0]) = 98;
7843 goto __pyx_L15;
7844 }
7845
7846 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":884
7847 * # Until ticket #99 is fixed, use integers to avoid warnings
7848 * if t == NPY_BYTE: f[0] = 98 #"b"
7849 * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
7850 * elif t == NPY_SHORT: f[0] = 104 #"h"
7851 * elif t == NPY_USHORT: f[0] = 72 #"H"
7852 */
7853 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error)
7854 __Pyx_GOTREF(__pyx_t_3);
7855 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error)
7856 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7857 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error)
7858 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7859 if (__pyx_t_6) {
7860 (__pyx_v_f[0]) = 66;
7861 goto __pyx_L15;
7862 }
7863
7864 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":885
7865 * if t == NPY_BYTE: f[0] = 98 #"b"
7866 * elif t == NPY_UBYTE: f[0] = 66 #"B"
7867 * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
7868 * elif t == NPY_USHORT: f[0] = 72 #"H"
7869 * elif t == NPY_INT: f[0] = 105 #"i"
7870 */
7871 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error)
7872 __Pyx_GOTREF(__pyx_t_4);
7873 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error)
7874 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7875 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error)
7876 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7877 if (__pyx_t_6) {
7878 (__pyx_v_f[0]) = 0x68;
7879 goto __pyx_L15;
7880 }
7881
7882 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":886
7883 * elif t == NPY_UBYTE: f[0] = 66 #"B"
7884 * elif t == NPY_SHORT: f[0] = 104 #"h"
7885 * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
7886 * elif t == NPY_INT: f[0] = 105 #"i"
7887 * elif t == NPY_UINT: f[0] = 73 #"I"
7888 */
7889 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error)
7890 __Pyx_GOTREF(__pyx_t_3);
7891 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error)
7892 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7893 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error)
7894 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7895 if (__pyx_t_6) {
7896 (__pyx_v_f[0]) = 72;
7897 goto __pyx_L15;
7898 }
7899
7900 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":887
7901 * elif t == NPY_SHORT: f[0] = 104 #"h"
7902 * elif t == NPY_USHORT: f[0] = 72 #"H"
7903 * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
7904 * elif t == NPY_UINT: f[0] = 73 #"I"
7905 * elif t == NPY_LONG: f[0] = 108 #"l"
7906 */
7907 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error)
7908 __Pyx_GOTREF(__pyx_t_4);
7909 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error)
7910 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7911 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error)
7912 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7913 if (__pyx_t_6) {
7914 (__pyx_v_f[0]) = 0x69;
7915 goto __pyx_L15;
7916 }
7917
7918 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":888
7919 * elif t == NPY_USHORT: f[0] = 72 #"H"
7920 * elif t == NPY_INT: f[0] = 105 #"i"
7921 * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
7922 * elif t == NPY_LONG: f[0] = 108 #"l"
7923 * elif t == NPY_ULONG: f[0] = 76 #"L"
7924 */
7925 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error)
7926 __Pyx_GOTREF(__pyx_t_3);
7927 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error)
7928 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7929 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error)
7930 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7931 if (__pyx_t_6) {
7932 (__pyx_v_f[0]) = 73;
7933 goto __pyx_L15;
7934 }
7935
7936 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":889
7937 * elif t == NPY_INT: f[0] = 105 #"i"
7938 * elif t == NPY_UINT: f[0] = 73 #"I"
7939 * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
7940 * elif t == NPY_ULONG: f[0] = 76 #"L"
7941 * elif t == NPY_LONGLONG: f[0] = 113 #"q"
7942 */
7943 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error)
7944 __Pyx_GOTREF(__pyx_t_4);
7945 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error)
7946 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7947 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error)
7948 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7949 if (__pyx_t_6) {
7950 (__pyx_v_f[0]) = 0x6C;
7951 goto __pyx_L15;
7952 }
7953
7954 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":890
7955 * elif t == NPY_UINT: f[0] = 73 #"I"
7956 * elif t == NPY_LONG: f[0] = 108 #"l"
7957 * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
7958 * elif t == NPY_LONGLONG: f[0] = 113 #"q"
7959 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
7960 */
7961 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error)
7962 __Pyx_GOTREF(__pyx_t_3);
7963 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error)
7964 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7965 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error)
7966 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7967 if (__pyx_t_6) {
7968 (__pyx_v_f[0]) = 76;
7969 goto __pyx_L15;
7970 }
7971
7972 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":891
7973 * elif t == NPY_LONG: f[0] = 108 #"l"
7974 * elif t == NPY_ULONG: f[0] = 76 #"L"
7975 * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
7976 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
7977 * elif t == NPY_FLOAT: f[0] = 102 #"f"
7978 */
7979 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error)
7980 __Pyx_GOTREF(__pyx_t_4);
7981 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error)
7982 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7983 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error)
7984 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7985 if (__pyx_t_6) {
7986 (__pyx_v_f[0]) = 0x71;
7987 goto __pyx_L15;
7988 }
7989
7990 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":892
7991 * elif t == NPY_ULONG: f[0] = 76 #"L"
7992 * elif t == NPY_LONGLONG: f[0] = 113 #"q"
7993 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
7994 * elif t == NPY_FLOAT: f[0] = 102 #"f"
7995 * elif t == NPY_DOUBLE: f[0] = 100 #"d"
7996 */
7997 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error)
7998 __Pyx_GOTREF(__pyx_t_3);
7999 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error)
8000 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8001 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error)
8002 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8003 if (__pyx_t_6) {
8004 (__pyx_v_f[0]) = 81;
8005 goto __pyx_L15;
8006 }
8007
8008 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":893
8009 * elif t == NPY_LONGLONG: f[0] = 113 #"q"
8010 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
8011 * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
8012 * elif t == NPY_DOUBLE: f[0] = 100 #"d"
8013 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
8014 */
8015 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error)
8016 __Pyx_GOTREF(__pyx_t_4);
8017 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error)
8018 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8019 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error)
8020 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8021 if (__pyx_t_6) {
8022 (__pyx_v_f[0]) = 0x66;
8023 goto __pyx_L15;
8024 }
8025
8026 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":894
8027 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
8028 * elif t == NPY_FLOAT: f[0] = 102 #"f"
8029 * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
8030 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
8031 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
8032 */
8033 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error)
8034 __Pyx_GOTREF(__pyx_t_3);
8035 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error)
8036 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8037 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error)
8038 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8039 if (__pyx_t_6) {
8040 (__pyx_v_f[0]) = 0x64;
8041 goto __pyx_L15;
8042 }
8043
8044 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":895
8045 * elif t == NPY_FLOAT: f[0] = 102 #"f"
8046 * elif t == NPY_DOUBLE: f[0] = 100 #"d"
8047 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
8048 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
8049 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
8050 */
8051 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error)
8052 __Pyx_GOTREF(__pyx_t_4);
8053 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error)
8054 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8055 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error)
8056 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8057 if (__pyx_t_6) {
8058 (__pyx_v_f[0]) = 0x67;
8059 goto __pyx_L15;
8060 }
8061
8062 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":896
8063 * elif t == NPY_DOUBLE: f[0] = 100 #"d"
8064 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
8065 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
8066 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
8067 * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
8068 */
8069 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error)
8070 __Pyx_GOTREF(__pyx_t_3);
8071 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error)
8072 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8073 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error)
8074 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8075 if (__pyx_t_6) {
8076 (__pyx_v_f[0]) = 90;
8077 (__pyx_v_f[1]) = 0x66;
8078 __pyx_v_f = (__pyx_v_f + 1);
8079 goto __pyx_L15;
8080 }
8081
8082 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":897
8083 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
8084 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
8085 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
8086 * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
8087 * elif t == NPY_OBJECT: f[0] = 79 #"O"
8088 */
8089 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error)
8090 __Pyx_GOTREF(__pyx_t_4);
8091 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error)
8092 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8093 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error)
8094 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8095 if (__pyx_t_6) {
8096 (__pyx_v_f[0]) = 90;
8097 (__pyx_v_f[1]) = 0x64;
8098 __pyx_v_f = (__pyx_v_f + 1);
8099 goto __pyx_L15;
8100 }
8101
8102 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":898
8103 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
8104 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
8105 * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
8106 * elif t == NPY_OBJECT: f[0] = 79 #"O"
8107 * else:
8108 */
8109 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error)
8110 __Pyx_GOTREF(__pyx_t_3);
8111 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error)
8112 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8113 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error)
8114 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8115 if (__pyx_t_6) {
8116 (__pyx_v_f[0]) = 90;
8117 (__pyx_v_f[1]) = 0x67;
8118 __pyx_v_f = (__pyx_v_f + 1);
8119 goto __pyx_L15;
8120 }
8121
8122 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":899
8123 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
8124 * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
8125 * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
8126 * else:
8127 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
8128 */
8129 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error)
8130 __Pyx_GOTREF(__pyx_t_4);
8131 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error)
8132 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8133 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error)
8134 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8135 if (likely(__pyx_t_6)) {
8136 (__pyx_v_f[0]) = 79;
8137 goto __pyx_L15;
8138 }
8139
8140 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":901
8141 * elif t == NPY_OBJECT: f[0] = 79 #"O"
8142 * else:
8143 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
8144 * f += 1
8145 * else:
8146 */
8147 /*else*/ {
8148 __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error)
8149 __Pyx_GOTREF(__pyx_t_3);
8150 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error)
8151 __Pyx_GOTREF(__pyx_t_4);
8152 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8153 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
8154 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8155 __PYX_ERR(2, 901, __pyx_L1_error)
8156 }
8157 __pyx_L15:;
8158
8159 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":902
8160 * else:
8161 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
8162 * f += 1 # <<<<<<<<<<<<<<
8163 * else:
8164 * # Cython ignores struct boundary information ("T{...}"),
8165 */
8166 __pyx_v_f = (__pyx_v_f + 1);
8167
8168 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
8169 * offset[0] += child.itemsize
8170 *
8171 * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
8172 * t = child.type_num
8173 * if end - f < 5:
8174 */
8175 goto __pyx_L13;
8176 }
8177
8178 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":906
8179 * # Cython ignores struct boundary information ("T{...}"),
8180 * # so don't output it
8181 * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
8182 * return f
8183 *
8184 */
8185 /*else*/ {
8186 __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error)
8187 __pyx_v_f = __pyx_t_9;
8188 }
8189 __pyx_L13:;
8190
8191 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
8192 * cdef tuple fields
8193 *
8194 * for childname in descr.names: # <<<<<<<<<<<<<<
8195 * fields = descr.fields[childname]
8196 * child, new_offset = fields
8197 */
8198 }
8199 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8200
8201 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":907
8202 * # so don't output it
8203 * f = _util_dtypestring(child, f, end, offset)
8204 * return f # <<<<<<<<<<<<<<
8205 *
8206 *
8207 */
8208 __pyx_r = __pyx_v_f;
8209 goto __pyx_L0;
8210
8211 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
8212 * return ()
8213 *
8214 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
8215 * # Recursive utility function used in __getbuffer__ to get format
8216 * # string. The new location in the format string is returned.
8217 */
8218
8219 /* function exit code */
8220 __pyx_L1_error:;
8221 __Pyx_XDECREF(__pyx_t_1);
8222 __Pyx_XDECREF(__pyx_t_3);
8223 __Pyx_XDECREF(__pyx_t_4);
8224 __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
8225 __pyx_r = NULL;
8226 __pyx_L0:;
8227 __Pyx_XDECREF((PyObject *)__pyx_v_child);
8228 __Pyx_XDECREF(__pyx_v_fields);
8229 __Pyx_XDECREF(__pyx_v_childname);
8230 __Pyx_XDECREF(__pyx_v_new_offset);
8231 __Pyx_XDECREF(__pyx_v_t);
8232 __Pyx_RefNannyFinishContext();
8233 return __pyx_r;
8234 }
8235
8236 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
8237 * int _import_umath() except -1
8238 *
8239 * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
8240 * Py_INCREF(base) # important to do this before stealing the reference below!
8241 * PyArray_SetBaseObject(arr, base)
8242 */
8243
__pyx_f_5numpy_set_array_base(PyArrayObject * __pyx_v_arr,PyObject * __pyx_v_base)8244 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
8245 __Pyx_RefNannyDeclarations
8246 __Pyx_RefNannySetupContext("set_array_base", 0);
8247
8248 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1023
8249 *
8250 * cdef inline void set_array_base(ndarray arr, object base):
8251 * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
8252 * PyArray_SetBaseObject(arr, base)
8253 *
8254 */
8255 Py_INCREF(__pyx_v_base);
8256
8257 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1024
8258 * cdef inline void set_array_base(ndarray arr, object base):
8259 * Py_INCREF(base) # important to do this before stealing the reference below!
8260 * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
8261 *
8262 * cdef inline object get_array_base(ndarray arr):
8263 */
8264 (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
8265
8266 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
8267 * int _import_umath() except -1
8268 *
8269 * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
8270 * Py_INCREF(base) # important to do this before stealing the reference below!
8271 * PyArray_SetBaseObject(arr, base)
8272 */
8273
8274 /* function exit code */
8275 __Pyx_RefNannyFinishContext();
8276 }
8277
8278 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
8279 * PyArray_SetBaseObject(arr, base)
8280 *
8281 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
8282 * base = PyArray_BASE(arr)
8283 * if base is NULL:
8284 */
8285
__pyx_f_5numpy_get_array_base(PyArrayObject * __pyx_v_arr)8286 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
8287 PyObject *__pyx_v_base;
8288 PyObject *__pyx_r = NULL;
8289 __Pyx_RefNannyDeclarations
8290 int __pyx_t_1;
8291 __Pyx_RefNannySetupContext("get_array_base", 0);
8292
8293 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027
8294 *
8295 * cdef inline object get_array_base(ndarray arr):
8296 * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
8297 * if base is NULL:
8298 * return None
8299 */
8300 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
8301
8302 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
8303 * cdef inline object get_array_base(ndarray arr):
8304 * base = PyArray_BASE(arr)
8305 * if base is NULL: # <<<<<<<<<<<<<<
8306 * return None
8307 * return <object>base
8308 */
8309 __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
8310 if (__pyx_t_1) {
8311
8312 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1029
8313 * base = PyArray_BASE(arr)
8314 * if base is NULL:
8315 * return None # <<<<<<<<<<<<<<
8316 * return <object>base
8317 *
8318 */
8319 __Pyx_XDECREF(__pyx_r);
8320 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8321 goto __pyx_L0;
8322
8323 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
8324 * cdef inline object get_array_base(ndarray arr):
8325 * base = PyArray_BASE(arr)
8326 * if base is NULL: # <<<<<<<<<<<<<<
8327 * return None
8328 * return <object>base
8329 */
8330 }
8331
8332 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1030
8333 * if base is NULL:
8334 * return None
8335 * return <object>base # <<<<<<<<<<<<<<
8336 *
8337 * # Versions of the import_* functions which are more suitable for
8338 */
8339 __Pyx_XDECREF(__pyx_r);
8340 __Pyx_INCREF(((PyObject *)__pyx_v_base));
8341 __pyx_r = ((PyObject *)__pyx_v_base);
8342 goto __pyx_L0;
8343
8344 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
8345 * PyArray_SetBaseObject(arr, base)
8346 *
8347 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
8348 * base = PyArray_BASE(arr)
8349 * if base is NULL:
8350 */
8351
8352 /* function exit code */
8353 __pyx_L0:;
8354 __Pyx_XGIVEREF(__pyx_r);
8355 __Pyx_RefNannyFinishContext();
8356 return __pyx_r;
8357 }
8358
8359 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
8360 * # Versions of the import_* functions which are more suitable for
8361 * # Cython code.
8362 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
8363 * try:
8364 * _import_array()
8365 */
8366
__pyx_f_5numpy_import_array(void)8367 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
8368 int __pyx_r;
8369 __Pyx_RefNannyDeclarations
8370 PyObject *__pyx_t_1 = NULL;
8371 PyObject *__pyx_t_2 = NULL;
8372 PyObject *__pyx_t_3 = NULL;
8373 int __pyx_t_4;
8374 PyObject *__pyx_t_5 = NULL;
8375 PyObject *__pyx_t_6 = NULL;
8376 PyObject *__pyx_t_7 = NULL;
8377 PyObject *__pyx_t_8 = NULL;
8378 __Pyx_RefNannySetupContext("import_array", 0);
8379
8380 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
8381 * # Cython code.
8382 * cdef inline int import_array() except -1:
8383 * try: # <<<<<<<<<<<<<<
8384 * _import_array()
8385 * except Exception:
8386 */
8387 {
8388 __Pyx_PyThreadState_declare
8389 __Pyx_PyThreadState_assign
8390 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
8391 __Pyx_XGOTREF(__pyx_t_1);
8392 __Pyx_XGOTREF(__pyx_t_2);
8393 __Pyx_XGOTREF(__pyx_t_3);
8394 /*try:*/ {
8395
8396 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1036
8397 * cdef inline int import_array() except -1:
8398 * try:
8399 * _import_array() # <<<<<<<<<<<<<<
8400 * except Exception:
8401 * raise ImportError("numpy.core.multiarray failed to import")
8402 */
8403 __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error)
8404
8405 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
8406 * # Cython code.
8407 * cdef inline int import_array() except -1:
8408 * try: # <<<<<<<<<<<<<<
8409 * _import_array()
8410 * except Exception:
8411 */
8412 }
8413 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
8414 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8415 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
8416 goto __pyx_L8_try_end;
8417 __pyx_L3_error:;
8418
8419 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037
8420 * try:
8421 * _import_array()
8422 * except Exception: # <<<<<<<<<<<<<<
8423 * raise ImportError("numpy.core.multiarray failed to import")
8424 *
8425 */
8426 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
8427 if (__pyx_t_4) {
8428 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
8429 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error)
8430 __Pyx_GOTREF(__pyx_t_5);
8431 __Pyx_GOTREF(__pyx_t_6);
8432 __Pyx_GOTREF(__pyx_t_7);
8433
8434 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
8435 * _import_array()
8436 * except Exception:
8437 * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
8438 *
8439 * cdef inline int import_umath() except -1:
8440 */
8441 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error)
8442 __Pyx_GOTREF(__pyx_t_8);
8443 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
8444 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8445 __PYX_ERR(2, 1038, __pyx_L5_except_error)
8446 }
8447 goto __pyx_L5_except_error;
8448 __pyx_L5_except_error:;
8449
8450 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
8451 * # Cython code.
8452 * cdef inline int import_array() except -1:
8453 * try: # <<<<<<<<<<<<<<
8454 * _import_array()
8455 * except Exception:
8456 */
8457 __Pyx_XGIVEREF(__pyx_t_1);
8458 __Pyx_XGIVEREF(__pyx_t_2);
8459 __Pyx_XGIVEREF(__pyx_t_3);
8460 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
8461 goto __pyx_L1_error;
8462 __pyx_L8_try_end:;
8463 }
8464
8465 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
8466 * # Versions of the import_* functions which are more suitable for
8467 * # Cython code.
8468 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
8469 * try:
8470 * _import_array()
8471 */
8472
8473 /* function exit code */
8474 __pyx_r = 0;
8475 goto __pyx_L0;
8476 __pyx_L1_error:;
8477 __Pyx_XDECREF(__pyx_t_5);
8478 __Pyx_XDECREF(__pyx_t_6);
8479 __Pyx_XDECREF(__pyx_t_7);
8480 __Pyx_XDECREF(__pyx_t_8);
8481 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
8482 __pyx_r = -1;
8483 __pyx_L0:;
8484 __Pyx_RefNannyFinishContext();
8485 return __pyx_r;
8486 }
8487
8488 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
8489 * raise ImportError("numpy.core.multiarray failed to import")
8490 *
8491 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
8492 * try:
8493 * _import_umath()
8494 */
8495
__pyx_f_5numpy_import_umath(void)8496 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
8497 int __pyx_r;
8498 __Pyx_RefNannyDeclarations
8499 PyObject *__pyx_t_1 = NULL;
8500 PyObject *__pyx_t_2 = NULL;
8501 PyObject *__pyx_t_3 = NULL;
8502 int __pyx_t_4;
8503 PyObject *__pyx_t_5 = NULL;
8504 PyObject *__pyx_t_6 = NULL;
8505 PyObject *__pyx_t_7 = NULL;
8506 PyObject *__pyx_t_8 = NULL;
8507 __Pyx_RefNannySetupContext("import_umath", 0);
8508
8509 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
8510 *
8511 * cdef inline int import_umath() except -1:
8512 * try: # <<<<<<<<<<<<<<
8513 * _import_umath()
8514 * except Exception:
8515 */
8516 {
8517 __Pyx_PyThreadState_declare
8518 __Pyx_PyThreadState_assign
8519 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
8520 __Pyx_XGOTREF(__pyx_t_1);
8521 __Pyx_XGOTREF(__pyx_t_2);
8522 __Pyx_XGOTREF(__pyx_t_3);
8523 /*try:*/ {
8524
8525 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1042
8526 * cdef inline int import_umath() except -1:
8527 * try:
8528 * _import_umath() # <<<<<<<<<<<<<<
8529 * except Exception:
8530 * raise ImportError("numpy.core.umath failed to import")
8531 */
8532 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error)
8533
8534 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
8535 *
8536 * cdef inline int import_umath() except -1:
8537 * try: # <<<<<<<<<<<<<<
8538 * _import_umath()
8539 * except Exception:
8540 */
8541 }
8542 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
8543 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8544 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
8545 goto __pyx_L8_try_end;
8546 __pyx_L3_error:;
8547
8548 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043
8549 * try:
8550 * _import_umath()
8551 * except Exception: # <<<<<<<<<<<<<<
8552 * raise ImportError("numpy.core.umath failed to import")
8553 *
8554 */
8555 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
8556 if (__pyx_t_4) {
8557 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
8558 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error)
8559 __Pyx_GOTREF(__pyx_t_5);
8560 __Pyx_GOTREF(__pyx_t_6);
8561 __Pyx_GOTREF(__pyx_t_7);
8562
8563 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
8564 * _import_umath()
8565 * except Exception:
8566 * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
8567 *
8568 * cdef inline int import_ufunc() except -1:
8569 */
8570 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error)
8571 __Pyx_GOTREF(__pyx_t_8);
8572 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
8573 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8574 __PYX_ERR(2, 1044, __pyx_L5_except_error)
8575 }
8576 goto __pyx_L5_except_error;
8577 __pyx_L5_except_error:;
8578
8579 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
8580 *
8581 * cdef inline int import_umath() except -1:
8582 * try: # <<<<<<<<<<<<<<
8583 * _import_umath()
8584 * except Exception:
8585 */
8586 __Pyx_XGIVEREF(__pyx_t_1);
8587 __Pyx_XGIVEREF(__pyx_t_2);
8588 __Pyx_XGIVEREF(__pyx_t_3);
8589 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
8590 goto __pyx_L1_error;
8591 __pyx_L8_try_end:;
8592 }
8593
8594 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
8595 * raise ImportError("numpy.core.multiarray failed to import")
8596 *
8597 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
8598 * try:
8599 * _import_umath()
8600 */
8601
8602 /* function exit code */
8603 __pyx_r = 0;
8604 goto __pyx_L0;
8605 __pyx_L1_error:;
8606 __Pyx_XDECREF(__pyx_t_5);
8607 __Pyx_XDECREF(__pyx_t_6);
8608 __Pyx_XDECREF(__pyx_t_7);
8609 __Pyx_XDECREF(__pyx_t_8);
8610 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
8611 __pyx_r = -1;
8612 __pyx_L0:;
8613 __Pyx_RefNannyFinishContext();
8614 return __pyx_r;
8615 }
8616
8617 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
8618 * raise ImportError("numpy.core.umath failed to import")
8619 *
8620 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
8621 * try:
8622 * _import_umath()
8623 */
8624
__pyx_f_5numpy_import_ufunc(void)8625 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
8626 int __pyx_r;
8627 __Pyx_RefNannyDeclarations
8628 PyObject *__pyx_t_1 = NULL;
8629 PyObject *__pyx_t_2 = NULL;
8630 PyObject *__pyx_t_3 = NULL;
8631 int __pyx_t_4;
8632 PyObject *__pyx_t_5 = NULL;
8633 PyObject *__pyx_t_6 = NULL;
8634 PyObject *__pyx_t_7 = NULL;
8635 PyObject *__pyx_t_8 = NULL;
8636 __Pyx_RefNannySetupContext("import_ufunc", 0);
8637
8638 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
8639 *
8640 * cdef inline int import_ufunc() except -1:
8641 * try: # <<<<<<<<<<<<<<
8642 * _import_umath()
8643 * except Exception:
8644 */
8645 {
8646 __Pyx_PyThreadState_declare
8647 __Pyx_PyThreadState_assign
8648 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
8649 __Pyx_XGOTREF(__pyx_t_1);
8650 __Pyx_XGOTREF(__pyx_t_2);
8651 __Pyx_XGOTREF(__pyx_t_3);
8652 /*try:*/ {
8653
8654 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1048
8655 * cdef inline int import_ufunc() except -1:
8656 * try:
8657 * _import_umath() # <<<<<<<<<<<<<<
8658 * except Exception:
8659 * raise ImportError("numpy.core.umath failed to import")
8660 */
8661 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error)
8662
8663 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
8664 *
8665 * cdef inline int import_ufunc() except -1:
8666 * try: # <<<<<<<<<<<<<<
8667 * _import_umath()
8668 * except Exception:
8669 */
8670 }
8671 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
8672 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8673 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
8674 goto __pyx_L8_try_end;
8675 __pyx_L3_error:;
8676
8677 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1049
8678 * try:
8679 * _import_umath()
8680 * except Exception: # <<<<<<<<<<<<<<
8681 * raise ImportError("numpy.core.umath failed to import")
8682 */
8683 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
8684 if (__pyx_t_4) {
8685 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
8686 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error)
8687 __Pyx_GOTREF(__pyx_t_5);
8688 __Pyx_GOTREF(__pyx_t_6);
8689 __Pyx_GOTREF(__pyx_t_7);
8690
8691 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1050
8692 * _import_umath()
8693 * except Exception:
8694 * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
8695 */
8696 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error)
8697 __Pyx_GOTREF(__pyx_t_8);
8698 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
8699 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8700 __PYX_ERR(2, 1050, __pyx_L5_except_error)
8701 }
8702 goto __pyx_L5_except_error;
8703 __pyx_L5_except_error:;
8704
8705 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
8706 *
8707 * cdef inline int import_ufunc() except -1:
8708 * try: # <<<<<<<<<<<<<<
8709 * _import_umath()
8710 * except Exception:
8711 */
8712 __Pyx_XGIVEREF(__pyx_t_1);
8713 __Pyx_XGIVEREF(__pyx_t_2);
8714 __Pyx_XGIVEREF(__pyx_t_3);
8715 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
8716 goto __pyx_L1_error;
8717 __pyx_L8_try_end:;
8718 }
8719
8720 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
8721 * raise ImportError("numpy.core.umath failed to import")
8722 *
8723 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
8724 * try:
8725 * _import_umath()
8726 */
8727
8728 /* function exit code */
8729 __pyx_r = 0;
8730 goto __pyx_L0;
8731 __pyx_L1_error:;
8732 __Pyx_XDECREF(__pyx_t_5);
8733 __Pyx_XDECREF(__pyx_t_6);
8734 __Pyx_XDECREF(__pyx_t_7);
8735 __Pyx_XDECREF(__pyx_t_8);
8736 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
8737 __pyx_r = -1;
8738 __pyx_L0:;
8739 __Pyx_RefNannyFinishContext();
8740 return __pyx_r;
8741 }
8742
__pyx_tp_new_6tables_13linkextension_Link(PyTypeObject * t,PyObject * a,PyObject * k)8743 static PyObject *__pyx_tp_new_6tables_13linkextension_Link(PyTypeObject *t, PyObject *a, PyObject *k) {
8744 PyObject *o = __pyx_ptype_6tables_13hdf5extension_Node->tp_new(t, a, k);
8745 if (unlikely(!o)) return 0;
8746 return o;
8747 }
8748
__pyx_tp_dealloc_6tables_13linkextension_Link(PyObject * o)8749 static void __pyx_tp_dealloc_6tables_13linkextension_Link(PyObject *o) {
8750 #if CYTHON_USE_TP_FINALIZE
8751 if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
8752 if (PyObject_CallFinalizerFromDealloc(o)) return;
8753 }
8754 #endif
8755 PyObject_GC_UnTrack(o);
8756 PyObject_GC_Track(o);
8757 if (likely(__pyx_ptype_6tables_13hdf5extension_Node)) __pyx_ptype_6tables_13hdf5extension_Node->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_6tables_13linkextension_Link);
8758 }
8759
__pyx_tp_traverse_6tables_13linkextension_Link(PyObject * o,visitproc v,void * a)8760 static int __pyx_tp_traverse_6tables_13linkextension_Link(PyObject *o, visitproc v, void *a) {
8761 int e;
8762 e = ((likely(__pyx_ptype_6tables_13hdf5extension_Node)) ? ((__pyx_ptype_6tables_13hdf5extension_Node->tp_traverse) ? __pyx_ptype_6tables_13hdf5extension_Node->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6tables_13linkextension_Link)); if (e) return e;
8763 return 0;
8764 }
8765
__pyx_tp_clear_6tables_13linkextension_Link(PyObject * o)8766 static int __pyx_tp_clear_6tables_13linkextension_Link(PyObject *o) {
8767 if (likely(__pyx_ptype_6tables_13hdf5extension_Node)) { if (__pyx_ptype_6tables_13hdf5extension_Node->tp_clear) __pyx_ptype_6tables_13hdf5extension_Node->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6tables_13linkextension_Link);
8768 return 0;
8769 }
8770
8771 static PyMethodDef __pyx_methods_6tables_13linkextension_Link[] = {
8772 {"_g_copy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_13linkextension_4Link_1_g_copy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6tables_13linkextension_4Link__g_copy},
8773 {"__reduce_cython__", (PyCFunction)__pyx_pw_6tables_13linkextension_4Link_3__reduce_cython__, METH_NOARGS, 0},
8774 {"__setstate_cython__", (PyCFunction)__pyx_pw_6tables_13linkextension_4Link_5__setstate_cython__, METH_O, 0},
8775 {0, 0, 0, 0}
8776 };
8777
8778 static PyTypeObject __pyx_type_6tables_13linkextension_Link = {
8779 PyVarObject_HEAD_INIT(0, 0)
8780 "tables.linkextension.Link", /*tp_name*/
8781 sizeof(struct __pyx_obj_6tables_13linkextension_Link), /*tp_basicsize*/
8782 0, /*tp_itemsize*/
8783 __pyx_tp_dealloc_6tables_13linkextension_Link, /*tp_dealloc*/
8784 0, /*tp_print*/
8785 0, /*tp_getattr*/
8786 0, /*tp_setattr*/
8787 #if PY_MAJOR_VERSION < 3
8788 0, /*tp_compare*/
8789 #endif
8790 #if PY_MAJOR_VERSION >= 3
8791 0, /*tp_as_async*/
8792 #endif
8793 0, /*tp_repr*/
8794 0, /*tp_as_number*/
8795 0, /*tp_as_sequence*/
8796 0, /*tp_as_mapping*/
8797 0, /*tp_hash*/
8798 0, /*tp_call*/
8799 0, /*tp_str*/
8800 0, /*tp_getattro*/
8801 0, /*tp_setattro*/
8802 0, /*tp_as_buffer*/
8803 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
8804 "Extension class from which all link extensions inherits.", /*tp_doc*/
8805 __pyx_tp_traverse_6tables_13linkextension_Link, /*tp_traverse*/
8806 __pyx_tp_clear_6tables_13linkextension_Link, /*tp_clear*/
8807 0, /*tp_richcompare*/
8808 0, /*tp_weaklistoffset*/
8809 0, /*tp_iter*/
8810 0, /*tp_iternext*/
8811 __pyx_methods_6tables_13linkextension_Link, /*tp_methods*/
8812 0, /*tp_members*/
8813 0, /*tp_getset*/
8814 0, /*tp_base*/
8815 0, /*tp_dict*/
8816 0, /*tp_descr_get*/
8817 0, /*tp_descr_set*/
8818 0, /*tp_dictoffset*/
8819 0, /*tp_init*/
8820 0, /*tp_alloc*/
8821 __pyx_tp_new_6tables_13linkextension_Link, /*tp_new*/
8822 0, /*tp_free*/
8823 0, /*tp_is_gc*/
8824 0, /*tp_bases*/
8825 0, /*tp_mro*/
8826 0, /*tp_cache*/
8827 0, /*tp_subclasses*/
8828 0, /*tp_weaklist*/
8829 0, /*tp_del*/
8830 0, /*tp_version_tag*/
8831 #if PY_VERSION_HEX >= 0x030400a1
8832 0, /*tp_finalize*/
8833 #endif
8834 #if PY_VERSION_HEX >= 0x030800b1
8835 0, /*tp_vectorcall*/
8836 #endif
8837 };
8838
__pyx_tp_new_6tables_13linkextension_SoftLink(PyTypeObject * t,PyObject * a,PyObject * k)8839 static PyObject *__pyx_tp_new_6tables_13linkextension_SoftLink(PyTypeObject *t, PyObject *a, PyObject *k) {
8840 PyObject *o = __pyx_tp_new_6tables_13linkextension_Link(t, a, k);
8841 if (unlikely(!o)) return 0;
8842 return o;
8843 }
8844
8845 static PyMethodDef __pyx_methods_6tables_13linkextension_SoftLink[] = {
8846 {"_g_create", (PyCFunction)__pyx_pw_6tables_13linkextension_8SoftLink_1_g_create, METH_NOARGS, __pyx_doc_6tables_13linkextension_8SoftLink__g_create},
8847 {"_g_open", (PyCFunction)__pyx_pw_6tables_13linkextension_8SoftLink_3_g_open, METH_NOARGS, __pyx_doc_6tables_13linkextension_8SoftLink_2_g_open},
8848 {"__reduce_cython__", (PyCFunction)__pyx_pw_6tables_13linkextension_8SoftLink_5__reduce_cython__, METH_NOARGS, 0},
8849 {"__setstate_cython__", (PyCFunction)__pyx_pw_6tables_13linkextension_8SoftLink_7__setstate_cython__, METH_O, 0},
8850 {0, 0, 0, 0}
8851 };
8852
8853 static PyTypeObject __pyx_type_6tables_13linkextension_SoftLink = {
8854 PyVarObject_HEAD_INIT(0, 0)
8855 "tables.linkextension.SoftLink", /*tp_name*/
8856 sizeof(struct __pyx_obj_6tables_13linkextension_SoftLink), /*tp_basicsize*/
8857 0, /*tp_itemsize*/
8858 __pyx_tp_dealloc_6tables_13linkextension_Link, /*tp_dealloc*/
8859 0, /*tp_print*/
8860 0, /*tp_getattr*/
8861 0, /*tp_setattr*/
8862 #if PY_MAJOR_VERSION < 3
8863 0, /*tp_compare*/
8864 #endif
8865 #if PY_MAJOR_VERSION >= 3
8866 0, /*tp_as_async*/
8867 #endif
8868 0, /*tp_repr*/
8869 0, /*tp_as_number*/
8870 0, /*tp_as_sequence*/
8871 0, /*tp_as_mapping*/
8872 0, /*tp_hash*/
8873 0, /*tp_call*/
8874 0, /*tp_str*/
8875 0, /*tp_getattro*/
8876 0, /*tp_setattro*/
8877 0, /*tp_as_buffer*/
8878 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
8879 "Extension class representing a soft link.", /*tp_doc*/
8880 __pyx_tp_traverse_6tables_13linkextension_Link, /*tp_traverse*/
8881 __pyx_tp_clear_6tables_13linkextension_Link, /*tp_clear*/
8882 0, /*tp_richcompare*/
8883 0, /*tp_weaklistoffset*/
8884 0, /*tp_iter*/
8885 0, /*tp_iternext*/
8886 __pyx_methods_6tables_13linkextension_SoftLink, /*tp_methods*/
8887 0, /*tp_members*/
8888 0, /*tp_getset*/
8889 0, /*tp_base*/
8890 0, /*tp_dict*/
8891 0, /*tp_descr_get*/
8892 0, /*tp_descr_set*/
8893 0, /*tp_dictoffset*/
8894 0, /*tp_init*/
8895 0, /*tp_alloc*/
8896 __pyx_tp_new_6tables_13linkextension_SoftLink, /*tp_new*/
8897 0, /*tp_free*/
8898 0, /*tp_is_gc*/
8899 0, /*tp_bases*/
8900 0, /*tp_mro*/
8901 0, /*tp_cache*/
8902 0, /*tp_subclasses*/
8903 0, /*tp_weaklist*/
8904 0, /*tp_del*/
8905 0, /*tp_version_tag*/
8906 #if PY_VERSION_HEX >= 0x030400a1
8907 0, /*tp_finalize*/
8908 #endif
8909 #if PY_VERSION_HEX >= 0x030800b1
8910 0, /*tp_vectorcall*/
8911 #endif
8912 };
8913
__pyx_tp_new_6tables_13linkextension_ExternalLink(PyTypeObject * t,PyObject * a,PyObject * k)8914 static PyObject *__pyx_tp_new_6tables_13linkextension_ExternalLink(PyTypeObject *t, PyObject *a, PyObject *k) {
8915 PyObject *o = __pyx_tp_new_6tables_13linkextension_Link(t, a, k);
8916 if (unlikely(!o)) return 0;
8917 return o;
8918 }
8919
8920 static PyMethodDef __pyx_methods_6tables_13linkextension_ExternalLink[] = {
8921 {"_g_create", (PyCFunction)__pyx_pw_6tables_13linkextension_12ExternalLink_1_g_create, METH_NOARGS, __pyx_doc_6tables_13linkextension_12ExternalLink__g_create},
8922 {"_g_open", (PyCFunction)__pyx_pw_6tables_13linkextension_12ExternalLink_3_g_open, METH_NOARGS, __pyx_doc_6tables_13linkextension_12ExternalLink_2_g_open},
8923 {"__reduce_cython__", (PyCFunction)__pyx_pw_6tables_13linkextension_12ExternalLink_5__reduce_cython__, METH_NOARGS, 0},
8924 {"__setstate_cython__", (PyCFunction)__pyx_pw_6tables_13linkextension_12ExternalLink_7__setstate_cython__, METH_O, 0},
8925 {0, 0, 0, 0}
8926 };
8927
8928 static PyTypeObject __pyx_type_6tables_13linkextension_ExternalLink = {
8929 PyVarObject_HEAD_INIT(0, 0)
8930 "tables.linkextension.ExternalLink", /*tp_name*/
8931 sizeof(struct __pyx_obj_6tables_13linkextension_ExternalLink), /*tp_basicsize*/
8932 0, /*tp_itemsize*/
8933 __pyx_tp_dealloc_6tables_13linkextension_Link, /*tp_dealloc*/
8934 0, /*tp_print*/
8935 0, /*tp_getattr*/
8936 0, /*tp_setattr*/
8937 #if PY_MAJOR_VERSION < 3
8938 0, /*tp_compare*/
8939 #endif
8940 #if PY_MAJOR_VERSION >= 3
8941 0, /*tp_as_async*/
8942 #endif
8943 0, /*tp_repr*/
8944 0, /*tp_as_number*/
8945 0, /*tp_as_sequence*/
8946 0, /*tp_as_mapping*/
8947 0, /*tp_hash*/
8948 0, /*tp_call*/
8949 0, /*tp_str*/
8950 0, /*tp_getattro*/
8951 0, /*tp_setattro*/
8952 0, /*tp_as_buffer*/
8953 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
8954 "Extension class representing an external link.", /*tp_doc*/
8955 __pyx_tp_traverse_6tables_13linkextension_Link, /*tp_traverse*/
8956 __pyx_tp_clear_6tables_13linkextension_Link, /*tp_clear*/
8957 0, /*tp_richcompare*/
8958 0, /*tp_weaklistoffset*/
8959 0, /*tp_iter*/
8960 0, /*tp_iternext*/
8961 __pyx_methods_6tables_13linkextension_ExternalLink, /*tp_methods*/
8962 0, /*tp_members*/
8963 0, /*tp_getset*/
8964 0, /*tp_base*/
8965 0, /*tp_dict*/
8966 0, /*tp_descr_get*/
8967 0, /*tp_descr_set*/
8968 0, /*tp_dictoffset*/
8969 0, /*tp_init*/
8970 0, /*tp_alloc*/
8971 __pyx_tp_new_6tables_13linkextension_ExternalLink, /*tp_new*/
8972 0, /*tp_free*/
8973 0, /*tp_is_gc*/
8974 0, /*tp_bases*/
8975 0, /*tp_mro*/
8976 0, /*tp_cache*/
8977 0, /*tp_subclasses*/
8978 0, /*tp_weaklist*/
8979 0, /*tp_del*/
8980 0, /*tp_version_tag*/
8981 #if PY_VERSION_HEX >= 0x030400a1
8982 0, /*tp_finalize*/
8983 #endif
8984 #if PY_VERSION_HEX >= 0x030800b1
8985 0, /*tp_vectorcall*/
8986 #endif
8987 };
8988
8989 static PyMethodDef __pyx_methods[] = {
8990 {0, 0, 0, 0}
8991 };
8992
8993 #if PY_MAJOR_VERSION >= 3
8994 #if CYTHON_PEP489_MULTI_PHASE_INIT
8995 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
8996 static int __pyx_pymod_exec_linkextension(PyObject* module); /*proto*/
8997 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
8998 {Py_mod_create, (void*)__pyx_pymod_create},
8999 {Py_mod_exec, (void*)__pyx_pymod_exec_linkextension},
9000 {0, NULL}
9001 };
9002 #endif
9003
9004 static struct PyModuleDef __pyx_moduledef = {
9005 PyModuleDef_HEAD_INIT,
9006 "linkextension",
9007 __pyx_k_Cython_functions_and_classes_for, /* m_doc */
9008 #if CYTHON_PEP489_MULTI_PHASE_INIT
9009 0, /* m_size */
9010 #else
9011 -1, /* m_size */
9012 #endif
9013 __pyx_methods /* m_methods */,
9014 #if CYTHON_PEP489_MULTI_PHASE_INIT
9015 __pyx_moduledef_slots, /* m_slots */
9016 #else
9017 NULL, /* m_reload */
9018 #endif
9019 NULL, /* m_traverse */
9020 NULL, /* m_clear */
9021 NULL /* m_free */
9022 };
9023 #endif
9024 #ifndef CYTHON_SMALL_CODE
9025 #if defined(__clang__)
9026 #define CYTHON_SMALL_CODE
9027 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
9028 #define CYTHON_SMALL_CODE __attribute__((cold))
9029 #else
9030 #define CYTHON_SMALL_CODE
9031 #endif
9032 #endif
9033
9034 static __Pyx_StringTabEntry __pyx_string_tab[] = {
9035 {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
9036 {&__pyx_n_s_ExternalLink, __pyx_k_ExternalLink, sizeof(__pyx_k_ExternalLink), 0, 0, 1, 1},
9037 {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
9038 {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
9039 {&__pyx_n_s_HDF5ExtError, __pyx_k_HDF5ExtError, sizeof(__pyx_k_HDF5ExtError), 0, 0, 1, 1},
9040 {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
9041 {&__pyx_kp_s_Incompatible_checksums_s_vs_0x38, __pyx_k_Incompatible_checksums_s_vs_0x38, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x38), 0, 0, 1, 0},
9042 {&__pyx_n_s_Link, __pyx_k_Link, sizeof(__pyx_k_Link), 0, 0, 1, 1},
9043 {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
9044 {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
9045 {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
9046 {&__pyx_n_s_SoftLink, __pyx_k_SoftLink, sizeof(__pyx_k_SoftLink), 0, 0, 1, 1},
9047 {&__pyx_n_s_UnImplemented, __pyx_k_UnImplemented, sizeof(__pyx_k_UnImplemented), 0, 0, 1, 1},
9048 {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
9049 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
9050 {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
9051 {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
9052 {&__pyx_n_s_encoded_name, __pyx_k_encoded_name, sizeof(__pyx_k_encoded_name), 0, 0, 1, 1},
9053 {&__pyx_n_s_encoded_v_name, __pyx_k_encoded_v_name, sizeof(__pyx_k_encoded_v_name), 0, 0, 1, 1},
9054 {&__pyx_n_s_exceptions, __pyx_k_exceptions, sizeof(__pyx_k_exceptions), 0, 0, 1, 1},
9055 {&__pyx_kp_s_failed_to_copy_HDF5_link, __pyx_k_failed_to_copy_HDF5_link, sizeof(__pyx_k_failed_to_copy_HDF5_link), 0, 0, 1, 0},
9056 {&__pyx_kp_s_failed_to_create_HDF5_external_l, __pyx_k_failed_to_create_HDF5_external_l, sizeof(__pyx_k_failed_to_create_HDF5_external_l), 0, 0, 1, 0},
9057 {&__pyx_kp_s_failed_to_create_HDF5_hard_link, __pyx_k_failed_to_create_HDF5_hard_link, sizeof(__pyx_k_failed_to_create_HDF5_hard_link), 0, 0, 1, 0},
9058 {&__pyx_kp_s_failed_to_create_HDF5_soft_link, __pyx_k_failed_to_create_HDF5_soft_link, sizeof(__pyx_k_failed_to_create_HDF5_soft_link), 0, 0, 1, 0},
9059 {&__pyx_kp_s_failed_to_get_info_about_externa, __pyx_k_failed_to_get_info_about_externa, sizeof(__pyx_k_failed_to_get_info_about_externa), 0, 0, 1, 0},
9060 {&__pyx_kp_s_failed_to_get_info_about_link, __pyx_k_failed_to_get_info_about_link, sizeof(__pyx_k_failed_to_get_info_about_link), 0, 0, 1, 0},
9061 {&__pyx_kp_s_failed_to_get_info_about_soft_li, __pyx_k_failed_to_get_info_about_soft_li, sizeof(__pyx_k_failed_to_get_info_about_soft_li), 0, 0, 1, 0},
9062 {&__pyx_kp_s_failed_to_get_target_value, __pyx_k_failed_to_get_target_value, sizeof(__pyx_k_failed_to_get_target_value), 0, 0, 1, 0},
9063 {&__pyx_kp_s_failed_to_unpack_external_link_v, __pyx_k_failed_to_unpack_external_link_v, sizeof(__pyx_k_failed_to_unpack_external_link_v), 0, 0, 1, 0},
9064 {&__pyx_n_s_g_create_hard_link, __pyx_k_g_create_hard_link, sizeof(__pyx_k_g_create_hard_link), 0, 0, 1, 1},
9065 {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
9066 {&__pyx_n_s_get_filename_node, __pyx_k_get_filename_node, sizeof(__pyx_k_get_filename_node), 0, 0, 1, 1},
9067 {&__pyx_n_s_get_link_class, __pyx_k_get_link_class, sizeof(__pyx_k_get_link_class), 0, 0, 1, 1},
9068 {&__pyx_n_s_get_node, __pyx_k_get_node, sizeof(__pyx_k_get_node), 0, 0, 1, 1},
9069 {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
9070 {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
9071 {&__pyx_n_s_link_buff, __pyx_k_link_buff, sizeof(__pyx_k_link_buff), 0, 0, 1, 1},
9072 {&__pyx_n_s_link_type, __pyx_k_link_type, sizeof(__pyx_k_link_type), 0, 0, 1, 1},
9073 {&__pyx_n_s_links, __pyx_k_links, sizeof(__pyx_k_links), 0, 0, 1, 1},
9074 {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
9075 {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
9076 {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
9077 {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
9078 {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
9079 {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
9080 {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
9081 {&__pyx_n_s_newname, __pyx_k_newname, sizeof(__pyx_k_newname), 0, 0, 1, 1},
9082 {&__pyx_n_s_newparent, __pyx_k_newparent, sizeof(__pyx_k_newparent), 0, 0, 1, 1},
9083 {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
9084 {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
9085 {&__pyx_n_s_parent_id, __pyx_k_parent_id, sizeof(__pyx_k_parent_id), 0, 0, 1, 1},
9086 {&__pyx_n_s_parentnode, __pyx_k_parentnode, sizeof(__pyx_k_parentnode), 0, 0, 1, 1},
9087 {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
9088 {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
9089 {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
9090 {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
9091 {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
9092 {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
9093 {&__pyx_n_s_pyx_unpickle_ExternalLink, __pyx_k_pyx_unpickle_ExternalLink, sizeof(__pyx_k_pyx_unpickle_ExternalLink), 0, 0, 1, 1},
9094 {&__pyx_n_s_pyx_unpickle_Link, __pyx_k_pyx_unpickle_Link, sizeof(__pyx_k_pyx_unpickle_Link), 0, 0, 1, 1},
9095 {&__pyx_n_s_pyx_unpickle_SoftLink, __pyx_k_pyx_unpickle_SoftLink, sizeof(__pyx_k_pyx_unpickle_SoftLink), 0, 0, 1, 1},
9096 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
9097 {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
9098 {&__pyx_n_s_recursive, __pyx_k_recursive, sizeof(__pyx_k_recursive), 0, 0, 1, 1},
9099 {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
9100 {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
9101 {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
9102 {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
9103 {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
9104 {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
9105 {&__pyx_n_s_stats, __pyx_k_stats, sizeof(__pyx_k_stats), 0, 0, 1, 1},
9106 {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
9107 {&__pyx_n_s_tables_linkextension, __pyx_k_tables_linkextension, sizeof(__pyx_k_tables_linkextension), 0, 0, 1, 1},
9108 {&__pyx_kp_s_tables_linkextension_pyx, __pyx_k_tables_linkextension_pyx, sizeof(__pyx_k_tables_linkextension_pyx), 0, 0, 1, 0},
9109 {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
9110 {&__pyx_n_s_targetnode, __pyx_k_targetnode, sizeof(__pyx_k_targetnode), 0, 0, 1, 1},
9111 {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
9112 {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
9113 {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
9114 {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
9115 {&__pyx_n_s_v_file, __pyx_k_v_file, sizeof(__pyx_k_v_file), 0, 0, 1, 1},
9116 {&__pyx_n_s_v_name, __pyx_k_v_name, sizeof(__pyx_k_v_name), 0, 0, 1, 1},
9117 {&__pyx_n_s_v_objectid, __pyx_k_v_objectid, sizeof(__pyx_k_v_objectid), 0, 0, 1, 1},
9118 {&__pyx_n_s_v_parent, __pyx_k_v_parent, sizeof(__pyx_k_v_parent), 0, 0, 1, 1},
9119 {0, 0, 0, 0, 0, 0, 0}
9120 };
__Pyx_InitCachedBuiltins(void)9121 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
9122 __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error)
9123 __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error)
9124 __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error)
9125 __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error)
9126 return 0;
9127 __pyx_L1_error:;
9128 return -1;
9129 }
9130
__Pyx_InitCachedConstants(void)9131 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
9132 __Pyx_RefNannyDeclarations
9133 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
9134
9135 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
9136 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
9137 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
9138 * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
9139 *
9140 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
9141 */
9142 __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(2, 272, __pyx_L1_error)
9143 __Pyx_GOTREF(__pyx_tuple__2);
9144 __Pyx_GIVEREF(__pyx_tuple__2);
9145
9146 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
9147 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
9148 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
9149 * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
9150 *
9151 * info.buf = PyArray_DATA(self)
9152 */
9153 __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 276, __pyx_L1_error)
9154 __Pyx_GOTREF(__pyx_tuple__3);
9155 __Pyx_GIVEREF(__pyx_tuple__3);
9156
9157 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
9158 * if ((descr.byteorder == c'>' and little_endian) or
9159 * (descr.byteorder == c'<' and not little_endian)):
9160 * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
9161 * if t == NPY_BYTE: f = "b"
9162 * elif t == NPY_UBYTE: f = "B"
9163 */
9164 __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 306, __pyx_L1_error)
9165 __Pyx_GOTREF(__pyx_tuple__4);
9166 __Pyx_GIVEREF(__pyx_tuple__4);
9167
9168 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
9169 *
9170 * if (end - f) - <int>(new_offset - offset[0]) < 15:
9171 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
9172 *
9173 * if ((child.byteorder == c'>' and little_endian) or
9174 */
9175 __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 856, __pyx_L1_error)
9176 __Pyx_GOTREF(__pyx_tuple__5);
9177 __Pyx_GIVEREF(__pyx_tuple__5);
9178
9179 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
9180 * t = child.type_num
9181 * if end - f < 5:
9182 * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
9183 *
9184 * # Until ticket #99 is fixed, use integers to avoid warnings
9185 */
9186 __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 880, __pyx_L1_error)
9187 __Pyx_GOTREF(__pyx_tuple__6);
9188 __Pyx_GIVEREF(__pyx_tuple__6);
9189
9190 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
9191 * _import_array()
9192 * except Exception:
9193 * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
9194 *
9195 * cdef inline int import_umath() except -1:
9196 */
9197 __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 1038, __pyx_L1_error)
9198 __Pyx_GOTREF(__pyx_tuple__7);
9199 __Pyx_GIVEREF(__pyx_tuple__7);
9200
9201 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
9202 * _import_umath()
9203 * except Exception:
9204 * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
9205 *
9206 * cdef inline int import_ufunc() except -1:
9207 */
9208 __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1044, __pyx_L1_error)
9209 __Pyx_GOTREF(__pyx_tuple__8);
9210 __Pyx_GIVEREF(__pyx_tuple__8);
9211
9212 /* "tables/linkextension.pyx":88
9213 * # Helper functions
9214 *
9215 * def _get_link_class(parent_id, name): # <<<<<<<<<<<<<<
9216 * """Guess the link class."""
9217 *
9218 */
9219 __pyx_tuple__9 = PyTuple_Pack(5, __pyx_n_s_parent_id, __pyx_n_s_name, __pyx_n_s_ret, __pyx_n_s_link_buff, __pyx_n_s_link_type); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 88, __pyx_L1_error)
9220 __Pyx_GOTREF(__pyx_tuple__9);
9221 __Pyx_GIVEREF(__pyx_tuple__9);
9222 __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tables_linkextension_pyx, __pyx_n_s_get_link_class, 88, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 88, __pyx_L1_error)
9223
9224 /* "tables/linkextension.pyx":110
9225 *
9226 *
9227 * def _g_create_hard_link(parentnode, str name, targetnode): # <<<<<<<<<<<<<<
9228 * """Create a hard link in the file."""
9229 *
9230 */
9231 __pyx_tuple__11 = PyTuple_Pack(6, __pyx_n_s_parentnode, __pyx_n_s_name, __pyx_n_s_targetnode, __pyx_n_s_ret, __pyx_n_s_encoded_name, __pyx_n_s_encoded_v_name); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 110, __pyx_L1_error)
9232 __Pyx_GOTREF(__pyx_tuple__11);
9233 __Pyx_GIVEREF(__pyx_tuple__11);
9234 __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tables_linkextension_pyx, __pyx_n_s_g_create_hard_link, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 110, __pyx_L1_error)
9235
9236 /* "(tree fragment)":1
9237 * def __pyx_unpickle_Link(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
9238 * cdef object __pyx_PickleError
9239 * cdef object __pyx_result
9240 */
9241 __pyx_tuple__13 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 1, __pyx_L1_error)
9242 __Pyx_GOTREF(__pyx_tuple__13);
9243 __Pyx_GIVEREF(__pyx_tuple__13);
9244 __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Link, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(1, 1, __pyx_L1_error)
9245 __pyx_tuple__15 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 1, __pyx_L1_error)
9246 __Pyx_GOTREF(__pyx_tuple__15);
9247 __Pyx_GIVEREF(__pyx_tuple__15);
9248 __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SoftLink, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(1, 1, __pyx_L1_error)
9249 __pyx_tuple__17 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 1, __pyx_L1_error)
9250 __Pyx_GOTREF(__pyx_tuple__17);
9251 __Pyx_GIVEREF(__pyx_tuple__17);
9252 __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ExternalLink, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(1, 1, __pyx_L1_error)
9253 __Pyx_RefNannyFinishContext();
9254 return 0;
9255 __pyx_L1_error:;
9256 __Pyx_RefNannyFinishContext();
9257 return -1;
9258 }
9259
__Pyx_InitGlobals(void)9260 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
9261 __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
9262 __pyx_umethod_PyString_Type_encode.type = (PyObject*)&PyString_Type;
9263 if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
9264 __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
9265 __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
9266 __pyx_int_58832569 = PyInt_FromLong(58832569L); if (unlikely(!__pyx_int_58832569)) __PYX_ERR(0, 1, __pyx_L1_error)
9267 return 0;
9268 __pyx_L1_error:;
9269 return -1;
9270 }
9271
9272 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
9273 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
9274 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
9275 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
9276 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
9277 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
9278 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
9279
__Pyx_modinit_global_init_code(void)9280 static int __Pyx_modinit_global_init_code(void) {
9281 __Pyx_RefNannyDeclarations
9282 __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
9283 /*--- Global init code ---*/
9284 __Pyx_RefNannyFinishContext();
9285 return 0;
9286 }
9287
__Pyx_modinit_variable_export_code(void)9288 static int __Pyx_modinit_variable_export_code(void) {
9289 __Pyx_RefNannyDeclarations
9290 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
9291 /*--- Variable export code ---*/
9292 __Pyx_RefNannyFinishContext();
9293 return 0;
9294 }
9295
__Pyx_modinit_function_export_code(void)9296 static int __Pyx_modinit_function_export_code(void) {
9297 __Pyx_RefNannyDeclarations
9298 __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
9299 /*--- Function export code ---*/
9300 __Pyx_RefNannyFinishContext();
9301 return 0;
9302 }
9303
__Pyx_modinit_type_init_code(void)9304 static int __Pyx_modinit_type_init_code(void) {
9305 __Pyx_RefNannyDeclarations
9306 PyObject *__pyx_t_1 = NULL;
9307 __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
9308 /*--- Type init code ---*/
9309 __pyx_t_1 = PyImport_ImportModule("tables.hdf5extension"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
9310 __Pyx_GOTREF(__pyx_t_1);
9311 __pyx_ptype_6tables_13hdf5extension_Node = __Pyx_ImportType(__pyx_t_1, "tables.hdf5extension", "Node", sizeof(struct __pyx_obj_6tables_13hdf5extension_Node), __Pyx_ImportType_CheckSize_Warn);
9312 if (!__pyx_ptype_6tables_13hdf5extension_Node) __PYX_ERR(0, 1, __pyx_L1_error)
9313 __pyx_type_6tables_13linkextension_Link.tp_base = __pyx_ptype_6tables_13hdf5extension_Node;
9314 if (PyType_Ready(&__pyx_type_6tables_13linkextension_Link) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
9315 #if PY_VERSION_HEX < 0x030800B1
9316 __pyx_type_6tables_13linkextension_Link.tp_print = 0;
9317 #endif
9318 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6tables_13linkextension_Link.tp_dictoffset && __pyx_type_6tables_13linkextension_Link.tp_getattro == PyObject_GenericGetAttr)) {
9319 __pyx_type_6tables_13linkextension_Link.tp_getattro = __Pyx_PyObject_GenericGetAttr;
9320 }
9321 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Link, (PyObject *)&__pyx_type_6tables_13linkextension_Link) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
9322 if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6tables_13linkextension_Link) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
9323 __pyx_ptype_6tables_13linkextension_Link = &__pyx_type_6tables_13linkextension_Link;
9324 __pyx_type_6tables_13linkextension_SoftLink.tp_base = __pyx_ptype_6tables_13linkextension_Link;
9325 if (PyType_Ready(&__pyx_type_6tables_13linkextension_SoftLink) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
9326 #if PY_VERSION_HEX < 0x030800B1
9327 __pyx_type_6tables_13linkextension_SoftLink.tp_print = 0;
9328 #endif
9329 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6tables_13linkextension_SoftLink.tp_dictoffset && __pyx_type_6tables_13linkextension_SoftLink.tp_getattro == PyObject_GenericGetAttr)) {
9330 __pyx_type_6tables_13linkextension_SoftLink.tp_getattro = __Pyx_PyObject_GenericGetAttr;
9331 }
9332 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SoftLink, (PyObject *)&__pyx_type_6tables_13linkextension_SoftLink) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
9333 if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6tables_13linkextension_SoftLink) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
9334 __pyx_ptype_6tables_13linkextension_SoftLink = &__pyx_type_6tables_13linkextension_SoftLink;
9335 __pyx_type_6tables_13linkextension_ExternalLink.tp_base = __pyx_ptype_6tables_13linkextension_Link;
9336 if (PyType_Ready(&__pyx_type_6tables_13linkextension_ExternalLink) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
9337 #if PY_VERSION_HEX < 0x030800B1
9338 __pyx_type_6tables_13linkextension_ExternalLink.tp_print = 0;
9339 #endif
9340 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6tables_13linkextension_ExternalLink.tp_dictoffset && __pyx_type_6tables_13linkextension_ExternalLink.tp_getattro == PyObject_GenericGetAttr)) {
9341 __pyx_type_6tables_13linkextension_ExternalLink.tp_getattro = __Pyx_PyObject_GenericGetAttr;
9342 }
9343 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ExternalLink, (PyObject *)&__pyx_type_6tables_13linkextension_ExternalLink) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
9344 if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6tables_13linkextension_ExternalLink) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
9345 __pyx_ptype_6tables_13linkextension_ExternalLink = &__pyx_type_6tables_13linkextension_ExternalLink;
9346 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9347 __Pyx_RefNannyFinishContext();
9348 return 0;
9349 __pyx_L1_error:;
9350 __Pyx_XDECREF(__pyx_t_1);
9351 __Pyx_RefNannyFinishContext();
9352 return -1;
9353 }
9354
__Pyx_modinit_type_import_code(void)9355 static int __Pyx_modinit_type_import_code(void) {
9356 __Pyx_RefNannyDeclarations
9357 PyObject *__pyx_t_1 = NULL;
9358 __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
9359 /*--- Type import code ---*/
9360 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
9361 __Pyx_GOTREF(__pyx_t_1);
9362 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
9363 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
9364 sizeof(PyTypeObject),
9365 #else
9366 sizeof(PyHeapTypeObject),
9367 #endif
9368 __Pyx_ImportType_CheckSize_Warn);
9369 if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
9370 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9371 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
9372 __Pyx_GOTREF(__pyx_t_1);
9373 __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn);
9374 if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(4, 8, __pyx_L1_error)
9375 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9376 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 15, __pyx_L1_error)
9377 __Pyx_GOTREF(__pyx_t_1);
9378 __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn);
9379 if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(5, 15, __pyx_L1_error)
9380 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9381 __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error)
9382 __Pyx_GOTREF(__pyx_t_1);
9383 __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
9384 if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error)
9385 __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn);
9386 if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error)
9387 __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn);
9388 if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error)
9389 __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
9390 if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error)
9391 __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn);
9392 if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error)
9393 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9394 __pyx_t_1 = PyImport_ImportModule("tables.hdf5extension"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 22, __pyx_L1_error)
9395 __Pyx_GOTREF(__pyx_t_1);
9396 __pyx_ptype_6tables_13hdf5extension_Leaf = __Pyx_ImportType(__pyx_t_1, "tables.hdf5extension", "Leaf", sizeof(struct __pyx_obj_6tables_13hdf5extension_Leaf), __Pyx_ImportType_CheckSize_Warn);
9397 if (!__pyx_ptype_6tables_13hdf5extension_Leaf) __PYX_ERR(6, 22, __pyx_L1_error)
9398 __pyx_vtabptr_6tables_13hdf5extension_Leaf = (struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf*)__Pyx_GetVtable(__pyx_ptype_6tables_13hdf5extension_Leaf->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_13hdf5extension_Leaf)) __PYX_ERR(6, 22, __pyx_L1_error)
9399 __pyx_ptype_6tables_13hdf5extension_Array = __Pyx_ImportType(__pyx_t_1, "tables.hdf5extension", "Array", sizeof(struct __pyx_obj_6tables_13hdf5extension_Array), __Pyx_ImportType_CheckSize_Warn);
9400 if (!__pyx_ptype_6tables_13hdf5extension_Array) __PYX_ERR(6, 31, __pyx_L1_error)
9401 __pyx_vtabptr_6tables_13hdf5extension_Array = (struct __pyx_vtabstruct_6tables_13hdf5extension_Array*)__Pyx_GetVtable(__pyx_ptype_6tables_13hdf5extension_Array->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_13hdf5extension_Array)) __PYX_ERR(6, 31, __pyx_L1_error)
9402 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9403 __Pyx_RefNannyFinishContext();
9404 return 0;
9405 __pyx_L1_error:;
9406 __Pyx_XDECREF(__pyx_t_1);
9407 __Pyx_RefNannyFinishContext();
9408 return -1;
9409 }
9410
__Pyx_modinit_variable_import_code(void)9411 static int __Pyx_modinit_variable_import_code(void) {
9412 __Pyx_RefNannyDeclarations
9413 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
9414 /*--- Variable import code ---*/
9415 __Pyx_RefNannyFinishContext();
9416 return 0;
9417 }
9418
__Pyx_modinit_function_import_code(void)9419 static int __Pyx_modinit_function_import_code(void) {
9420 __Pyx_RefNannyDeclarations
9421 PyObject *__pyx_t_1 = NULL;
9422 __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
9423 /*--- Function import code ---*/
9424 __pyx_t_1 = PyImport_ImportModule("tables.utilsextension"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
9425 if (__Pyx_ImportFunction(__pyx_t_1, "cstr_to_pystr", (void (**)(void))&__pyx_f_6tables_14utilsextension_cstr_to_pystr, "PyObject *(char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9426 Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9427 __Pyx_RefNannyFinishContext();
9428 return 0;
9429 __pyx_L1_error:;
9430 __Pyx_XDECREF(__pyx_t_1);
9431 __Pyx_RefNannyFinishContext();
9432 return -1;
9433 }
9434
9435
9436 #if PY_MAJOR_VERSION < 3
9437 #ifdef CYTHON_NO_PYINIT_EXPORT
9438 #define __Pyx_PyMODINIT_FUNC void
9439 #else
9440 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
9441 #endif
9442 #else
9443 #ifdef CYTHON_NO_PYINIT_EXPORT
9444 #define __Pyx_PyMODINIT_FUNC PyObject *
9445 #else
9446 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
9447 #endif
9448 #endif
9449
9450
9451 #if PY_MAJOR_VERSION < 3
9452 __Pyx_PyMODINIT_FUNC initlinkextension(void) CYTHON_SMALL_CODE; /*proto*/
initlinkextension(void)9453 __Pyx_PyMODINIT_FUNC initlinkextension(void)
9454 #else
9455 __Pyx_PyMODINIT_FUNC PyInit_linkextension(void) CYTHON_SMALL_CODE; /*proto*/
9456 __Pyx_PyMODINIT_FUNC PyInit_linkextension(void)
9457 #if CYTHON_PEP489_MULTI_PHASE_INIT
9458 {
9459 return PyModuleDef_Init(&__pyx_moduledef);
9460 }
9461 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
9462 #if PY_VERSION_HEX >= 0x030700A1
9463 static PY_INT64_T main_interpreter_id = -1;
9464 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
9465 if (main_interpreter_id == -1) {
9466 main_interpreter_id = current_id;
9467 return (unlikely(current_id == -1)) ? -1 : 0;
9468 } else if (unlikely(main_interpreter_id != current_id))
9469 #else
9470 static PyInterpreterState *main_interpreter = NULL;
9471 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
9472 if (!main_interpreter) {
9473 main_interpreter = current_interpreter;
9474 } else if (unlikely(main_interpreter != current_interpreter))
9475 #endif
9476 {
9477 PyErr_SetString(
9478 PyExc_ImportError,
9479 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
9480 return -1;
9481 }
9482 return 0;
9483 }
9484 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
9485 PyObject *value = PyObject_GetAttrString(spec, from_name);
9486 int result = 0;
9487 if (likely(value)) {
9488 if (allow_none || value != Py_None) {
9489 result = PyDict_SetItemString(moddict, to_name, value);
9490 }
9491 Py_DECREF(value);
9492 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
9493 PyErr_Clear();
9494 } else {
9495 result = -1;
9496 }
9497 return result;
9498 }
9499 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
9500 PyObject *module = NULL, *moddict, *modname;
9501 if (__Pyx_check_single_interpreter())
9502 return NULL;
9503 if (__pyx_m)
9504 return __Pyx_NewRef(__pyx_m);
9505 modname = PyObject_GetAttrString(spec, "name");
9506 if (unlikely(!modname)) goto bad;
9507 module = PyModule_NewObject(modname);
9508 Py_DECREF(modname);
9509 if (unlikely(!module)) goto bad;
9510 moddict = PyModule_GetDict(module);
9511 if (unlikely(!moddict)) goto bad;
9512 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
9513 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
9514 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
9515 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
9516 return module;
9517 bad:
9518 Py_XDECREF(module);
9519 return NULL;
9520 }
9521
9522
9523 static CYTHON_SMALL_CODE int __pyx_pymod_exec_linkextension(PyObject *__pyx_pyinit_module)
9524 #endif
9525 #endif
9526 {
9527 PyObject *__pyx_t_1 = NULL;
9528 PyObject *__pyx_t_2 = NULL;
9529 __Pyx_RefNannyDeclarations
9530 #if CYTHON_PEP489_MULTI_PHASE_INIT
9531 if (__pyx_m) {
9532 if (__pyx_m == __pyx_pyinit_module) return 0;
9533 PyErr_SetString(PyExc_RuntimeError, "Module 'linkextension' has already been imported. Re-initialisation is not supported.");
9534 return -1;
9535 }
9536 #elif PY_MAJOR_VERSION >= 3
9537 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
9538 #endif
9539 #if CYTHON_REFNANNY
9540 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
9541 if (!__Pyx_RefNanny) {
9542 PyErr_Clear();
9543 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
9544 if (!__Pyx_RefNanny)
9545 Py_FatalError("failed to import 'refnanny' module");
9546 }
9547 #endif
9548 __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_linkextension(void)", 0);
9549 if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9550 #ifdef __Pxy_PyFrame_Initialize_Offsets
9551 __Pxy_PyFrame_Initialize_Offsets();
9552 #endif
9553 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
9554 __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
9555 __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
9556 #ifdef __Pyx_CyFunction_USED
9557 if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9558 #endif
9559 #ifdef __Pyx_FusedFunction_USED
9560 if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9561 #endif
9562 #ifdef __Pyx_Coroutine_USED
9563 if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9564 #endif
9565 #ifdef __Pyx_Generator_USED
9566 if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9567 #endif
9568 #ifdef __Pyx_AsyncGen_USED
9569 if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9570 #endif
9571 #ifdef __Pyx_StopAsyncIteration_USED
9572 if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9573 #endif
9574 /*--- Library function declarations ---*/
9575 /*--- Threads initialization code ---*/
9576 #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
9577 #ifdef WITH_THREAD /* Python build with threading support? */
9578 PyEval_InitThreads();
9579 #endif
9580 #endif
9581 /*--- Module creation code ---*/
9582 #if CYTHON_PEP489_MULTI_PHASE_INIT
9583 __pyx_m = __pyx_pyinit_module;
9584 Py_INCREF(__pyx_m);
9585 #else
9586 #if PY_MAJOR_VERSION < 3
9587 __pyx_m = Py_InitModule4("linkextension", __pyx_methods, __pyx_k_Cython_functions_and_classes_for, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
9588 #else
9589 __pyx_m = PyModule_Create(&__pyx_moduledef);
9590 #endif
9591 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
9592 #endif
9593 __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
9594 Py_INCREF(__pyx_d);
9595 __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
9596 Py_INCREF(__pyx_b);
9597 __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
9598 Py_INCREF(__pyx_cython_runtime);
9599 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
9600 /*--- Initialize various global constants etc. ---*/
9601 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9602 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
9603 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9604 #endif
9605 if (__pyx_module_is_main_tables__linkextension) {
9606 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9607 }
9608 #if PY_MAJOR_VERSION >= 3
9609 {
9610 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
9611 if (!PyDict_GetItemString(modules, "tables.linkextension")) {
9612 if (unlikely(PyDict_SetItemString(modules, "tables.linkextension", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
9613 }
9614 }
9615 #endif
9616 /*--- Builtin init code ---*/
9617 if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
9618 /*--- Constants init code ---*/
9619 if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
9620 /*--- Global type/function init code ---*/
9621 (void)__Pyx_modinit_global_init_code();
9622 (void)__Pyx_modinit_variable_export_code();
9623 (void)__Pyx_modinit_function_export_code();
9624 if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
9625 if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
9626 (void)__Pyx_modinit_variable_import_code();
9627 if (unlikely(__Pyx_modinit_function_import_code() != 0)) goto __pyx_L1_error;
9628 /*--- Execution code ---*/
9629 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
9630 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9631 #endif
9632
9633 /* "tables/linkextension.pyx":15
9634 * """Cython functions and classes for supporting links in HDF5."""
9635 *
9636 * from .exceptions import HDF5ExtError # <<<<<<<<<<<<<<
9637 *
9638 * from hdf5extension cimport Node
9639 */
9640 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
9641 __Pyx_GOTREF(__pyx_t_1);
9642 __Pyx_INCREF(__pyx_n_s_HDF5ExtError);
9643 __Pyx_GIVEREF(__pyx_n_s_HDF5ExtError);
9644 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_HDF5ExtError);
9645 __pyx_t_2 = __Pyx_Import(__pyx_n_s_exceptions, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
9646 __Pyx_GOTREF(__pyx_t_2);
9647 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9648 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
9649 __Pyx_GOTREF(__pyx_t_1);
9650 if (PyDict_SetItem(__pyx_d, __pyx_n_s_HDF5ExtError, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
9651 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9652 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9653
9654 /* "tables/linkextension.pyx":88
9655 * # Helper functions
9656 *
9657 * def _get_link_class(parent_id, name): # <<<<<<<<<<<<<<
9658 * """Guess the link class."""
9659 *
9660 */
9661 __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6tables_13linkextension_1_get_link_class, NULL, __pyx_n_s_tables_linkextension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
9662 __Pyx_GOTREF(__pyx_t_2);
9663 if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_link_class, __pyx_t_2) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
9664 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9665
9666 /* "tables/linkextension.pyx":110
9667 *
9668 *
9669 * def _g_create_hard_link(parentnode, str name, targetnode): # <<<<<<<<<<<<<<
9670 * """Create a hard link in the file."""
9671 *
9672 */
9673 __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6tables_13linkextension_3_g_create_hard_link, NULL, __pyx_n_s_tables_linkextension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
9674 __Pyx_GOTREF(__pyx_t_2);
9675 if (PyDict_SetItem(__pyx_d, __pyx_n_s_g_create_hard_link, __pyx_t_2) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
9676 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9677
9678 /* "(tree fragment)":1
9679 * def __pyx_unpickle_Link(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
9680 * cdef object __pyx_PickleError
9681 * cdef object __pyx_result
9682 */
9683 __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6tables_13linkextension_5__pyx_unpickle_Link, NULL, __pyx_n_s_tables_linkextension); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
9684 __Pyx_GOTREF(__pyx_t_2);
9685 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Link, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9686 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9687
9688 /* "(tree fragment)":11
9689 * __pyx_unpickle_Link__set_state(<Link> __pyx_result, __pyx_state)
9690 * return __pyx_result
9691 * cdef __pyx_unpickle_Link__set_state(Link __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
9692 * __pyx_result.name = __pyx_state[0]; __pyx_result.parent_id = __pyx_state[1]
9693 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
9694 */
9695 __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6tables_13linkextension_7__pyx_unpickle_SoftLink, NULL, __pyx_n_s_tables_linkextension); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
9696 __Pyx_GOTREF(__pyx_t_2);
9697 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SoftLink, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9698 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9699
9700 /* "(tree fragment)":1
9701 * def __pyx_unpickle_ExternalLink(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
9702 * cdef object __pyx_PickleError
9703 * cdef object __pyx_result
9704 */
9705 __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6tables_13linkextension_9__pyx_unpickle_ExternalLink, NULL, __pyx_n_s_tables_linkextension); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
9706 __Pyx_GOTREF(__pyx_t_2);
9707 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ExternalLink, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9708 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9709
9710 /* "tables/linkextension.pyx":1
9711 * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
9712 *
9713 * ########################################################################
9714 */
9715 __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
9716 __Pyx_GOTREF(__pyx_t_2);
9717 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9718 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9719
9720 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
9721 * raise ImportError("numpy.core.umath failed to import")
9722 *
9723 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
9724 * try:
9725 * _import_umath()
9726 */
9727
9728 /*--- Wrapped vars code ---*/
9729
9730 goto __pyx_L0;
9731 __pyx_L1_error:;
9732 __Pyx_XDECREF(__pyx_t_1);
9733 __Pyx_XDECREF(__pyx_t_2);
9734 if (__pyx_m) {
9735 if (__pyx_d) {
9736 __Pyx_AddTraceback("init tables.linkextension", __pyx_clineno, __pyx_lineno, __pyx_filename);
9737 }
9738 Py_CLEAR(__pyx_m);
9739 } else if (!PyErr_Occurred()) {
9740 PyErr_SetString(PyExc_ImportError, "init tables.linkextension");
9741 }
9742 __pyx_L0:;
9743 __Pyx_RefNannyFinishContext();
9744 #if CYTHON_PEP489_MULTI_PHASE_INIT
9745 return (__pyx_m != NULL) ? 0 : -1;
9746 #elif PY_MAJOR_VERSION >= 3
9747 return __pyx_m;
9748 #else
9749 return;
9750 #endif
9751 }
9752
9753 /* --- Runtime support code --- */
9754 /* Refnanny */
9755 #if CYTHON_REFNANNY
__Pyx_RefNannyImportAPI(const char * modname)9756 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
9757 PyObject *m = NULL, *p = NULL;
9758 void *r = NULL;
9759 m = PyImport_ImportModule(modname);
9760 if (!m) goto end;
9761 p = PyObject_GetAttrString(m, "RefNannyAPI");
9762 if (!p) goto end;
9763 r = PyLong_AsVoidPtr(p);
9764 end:
9765 Py_XDECREF(p);
9766 Py_XDECREF(m);
9767 return (__Pyx_RefNannyAPIStruct *)r;
9768 }
9769 #endif
9770
9771 /* RaiseArgTupleInvalid */
__Pyx_RaiseArgtupleInvalid(const char * func_name,int exact,Py_ssize_t num_min,Py_ssize_t num_max,Py_ssize_t num_found)9772 static void __Pyx_RaiseArgtupleInvalid(
9773 const char* func_name,
9774 int exact,
9775 Py_ssize_t num_min,
9776 Py_ssize_t num_max,
9777 Py_ssize_t num_found)
9778 {
9779 Py_ssize_t num_expected;
9780 const char *more_or_less;
9781 if (num_found < num_min) {
9782 num_expected = num_min;
9783 more_or_less = "at least";
9784 } else {
9785 num_expected = num_max;
9786 more_or_less = "at most";
9787 }
9788 if (exact) {
9789 more_or_less = "exactly";
9790 }
9791 PyErr_Format(PyExc_TypeError,
9792 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
9793 func_name, more_or_less, num_expected,
9794 (num_expected == 1) ? "" : "s", num_found);
9795 }
9796
9797 /* RaiseDoubleKeywords */
__Pyx_RaiseDoubleKeywordsError(const char * func_name,PyObject * kw_name)9798 static void __Pyx_RaiseDoubleKeywordsError(
9799 const char* func_name,
9800 PyObject* kw_name)
9801 {
9802 PyErr_Format(PyExc_TypeError,
9803 #if PY_MAJOR_VERSION >= 3
9804 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
9805 #else
9806 "%s() got multiple values for keyword argument '%s'", func_name,
9807 PyString_AsString(kw_name));
9808 #endif
9809 }
9810
9811 /* ParseKeywords */
__Pyx_ParseOptionalKeywords(PyObject * kwds,PyObject ** argnames[],PyObject * kwds2,PyObject * values[],Py_ssize_t num_pos_args,const char * function_name)9812 static int __Pyx_ParseOptionalKeywords(
9813 PyObject *kwds,
9814 PyObject **argnames[],
9815 PyObject *kwds2,
9816 PyObject *values[],
9817 Py_ssize_t num_pos_args,
9818 const char* function_name)
9819 {
9820 PyObject *key = 0, *value = 0;
9821 Py_ssize_t pos = 0;
9822 PyObject*** name;
9823 PyObject*** first_kw_arg = argnames + num_pos_args;
9824 while (PyDict_Next(kwds, &pos, &key, &value)) {
9825 name = first_kw_arg;
9826 while (*name && (**name != key)) name++;
9827 if (*name) {
9828 values[name-argnames] = value;
9829 continue;
9830 }
9831 name = first_kw_arg;
9832 #if PY_MAJOR_VERSION < 3
9833 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
9834 while (*name) {
9835 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
9836 && _PyString_Eq(**name, key)) {
9837 values[name-argnames] = value;
9838 break;
9839 }
9840 name++;
9841 }
9842 if (*name) continue;
9843 else {
9844 PyObject*** argname = argnames;
9845 while (argname != first_kw_arg) {
9846 if ((**argname == key) || (
9847 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
9848 && _PyString_Eq(**argname, key))) {
9849 goto arg_passed_twice;
9850 }
9851 argname++;
9852 }
9853 }
9854 } else
9855 #endif
9856 if (likely(PyUnicode_Check(key))) {
9857 while (*name) {
9858 int cmp = (**name == key) ? 0 :
9859 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
9860 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
9861 #endif
9862 PyUnicode_Compare(**name, key);
9863 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
9864 if (cmp == 0) {
9865 values[name-argnames] = value;
9866 break;
9867 }
9868 name++;
9869 }
9870 if (*name) continue;
9871 else {
9872 PyObject*** argname = argnames;
9873 while (argname != first_kw_arg) {
9874 int cmp = (**argname == key) ? 0 :
9875 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
9876 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
9877 #endif
9878 PyUnicode_Compare(**argname, key);
9879 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
9880 if (cmp == 0) goto arg_passed_twice;
9881 argname++;
9882 }
9883 }
9884 } else
9885 goto invalid_keyword_type;
9886 if (kwds2) {
9887 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
9888 } else {
9889 goto invalid_keyword;
9890 }
9891 }
9892 return 0;
9893 arg_passed_twice:
9894 __Pyx_RaiseDoubleKeywordsError(function_name, key);
9895 goto bad;
9896 invalid_keyword_type:
9897 PyErr_Format(PyExc_TypeError,
9898 "%.200s() keywords must be strings", function_name);
9899 goto bad;
9900 invalid_keyword:
9901 PyErr_Format(PyExc_TypeError,
9902 #if PY_MAJOR_VERSION < 3
9903 "%.200s() got an unexpected keyword argument '%.200s'",
9904 function_name, PyString_AsString(key));
9905 #else
9906 "%s() got an unexpected keyword argument '%U'",
9907 function_name, key);
9908 #endif
9909 bad:
9910 return -1;
9911 }
9912
9913 /* PyObjectGetAttrStr */
9914 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_GetAttrStr(PyObject * obj,PyObject * attr_name)9915 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
9916 PyTypeObject* tp = Py_TYPE(obj);
9917 if (likely(tp->tp_getattro))
9918 return tp->tp_getattro(obj, attr_name);
9919 #if PY_MAJOR_VERSION < 3
9920 if (likely(tp->tp_getattr))
9921 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
9922 #endif
9923 return PyObject_GetAttr(obj, attr_name);
9924 }
9925 #endif
9926
9927 /* GetBuiltinName */
__Pyx_GetBuiltinName(PyObject * name)9928 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
9929 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
9930 if (unlikely(!result)) {
9931 PyErr_Format(PyExc_NameError,
9932 #if PY_MAJOR_VERSION >= 3
9933 "name '%U' is not defined", name);
9934 #else
9935 "name '%.200s' is not defined", PyString_AS_STRING(name));
9936 #endif
9937 }
9938 return result;
9939 }
9940
9941 /* PyDictVersioning */
9942 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
__Pyx_get_tp_dict_version(PyObject * obj)9943 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
9944 PyObject *dict = Py_TYPE(obj)->tp_dict;
9945 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
9946 }
__Pyx_get_object_dict_version(PyObject * obj)9947 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
9948 PyObject **dictptr = NULL;
9949 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
9950 if (offset) {
9951 #if CYTHON_COMPILING_IN_CPYTHON
9952 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
9953 #else
9954 dictptr = _PyObject_GetDictPtr(obj);
9955 #endif
9956 }
9957 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
9958 }
__Pyx_object_dict_version_matches(PyObject * obj,PY_UINT64_T tp_dict_version,PY_UINT64_T obj_dict_version)9959 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
9960 PyObject *dict = Py_TYPE(obj)->tp_dict;
9961 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
9962 return 0;
9963 return obj_dict_version == __Pyx_get_object_dict_version(obj);
9964 }
9965 #endif
9966
9967 /* GetModuleGlobalName */
9968 #if CYTHON_USE_DICT_VERSIONS
__Pyx__GetModuleGlobalName(PyObject * name,PY_UINT64_T * dict_version,PyObject ** dict_cached_value)9969 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
9970 #else
9971 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
9972 #endif
9973 {
9974 PyObject *result;
9975 #if !CYTHON_AVOID_BORROWED_REFS
9976 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
9977 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
9978 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
9979 if (likely(result)) {
9980 return __Pyx_NewRef(result);
9981 } else if (unlikely(PyErr_Occurred())) {
9982 return NULL;
9983 }
9984 #else
9985 result = PyDict_GetItem(__pyx_d, name);
9986 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
9987 if (likely(result)) {
9988 return __Pyx_NewRef(result);
9989 }
9990 #endif
9991 #else
9992 result = PyObject_GetItem(__pyx_d, name);
9993 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
9994 if (likely(result)) {
9995 return __Pyx_NewRef(result);
9996 }
9997 PyErr_Clear();
9998 #endif
9999 return __Pyx_GetBuiltinName(name);
10000 }
10001
10002 /* PyCFunctionFastCall */
10003 #if CYTHON_FAST_PYCCALL
__Pyx_PyCFunction_FastCall(PyObject * func_obj,PyObject ** args,Py_ssize_t nargs)10004 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
10005 PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
10006 PyCFunction meth = PyCFunction_GET_FUNCTION(func);
10007 PyObject *self = PyCFunction_GET_SELF(func);
10008 int flags = PyCFunction_GET_FLAGS(func);
10009 assert(PyCFunction_Check(func));
10010 assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
10011 assert(nargs >= 0);
10012 assert(nargs == 0 || args != NULL);
10013 /* _PyCFunction_FastCallDict() must not be called with an exception set,
10014 because it may clear it (directly or indirectly) and so the
10015 caller loses its exception */
10016 assert(!PyErr_Occurred());
10017 if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
10018 return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
10019 } else {
10020 return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
10021 }
10022 }
10023 #endif
10024
10025 /* PyFunctionFastCall */
10026 #if CYTHON_FAST_PYCALL
__Pyx_PyFunction_FastCallNoKw(PyCodeObject * co,PyObject ** args,Py_ssize_t na,PyObject * globals)10027 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
10028 PyObject *globals) {
10029 PyFrameObject *f;
10030 PyThreadState *tstate = __Pyx_PyThreadState_Current;
10031 PyObject **fastlocals;
10032 Py_ssize_t i;
10033 PyObject *result;
10034 assert(globals != NULL);
10035 /* XXX Perhaps we should create a specialized
10036 PyFrame_New() that doesn't take locals, but does
10037 take builtins without sanity checking them.
10038 */
10039 assert(tstate != NULL);
10040 f = PyFrame_New(tstate, co, globals, NULL);
10041 if (f == NULL) {
10042 return NULL;
10043 }
10044 fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
10045 for (i = 0; i < na; i++) {
10046 Py_INCREF(*args);
10047 fastlocals[i] = *args++;
10048 }
10049 result = PyEval_EvalFrameEx(f,0);
10050 ++tstate->recursion_depth;
10051 Py_DECREF(f);
10052 --tstate->recursion_depth;
10053 return result;
10054 }
10055 #if 1 || PY_VERSION_HEX < 0x030600B1
__Pyx_PyFunction_FastCallDict(PyObject * func,PyObject ** args,Py_ssize_t nargs,PyObject * kwargs)10056 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
10057 PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
10058 PyObject *globals = PyFunction_GET_GLOBALS(func);
10059 PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
10060 PyObject *closure;
10061 #if PY_MAJOR_VERSION >= 3
10062 PyObject *kwdefs;
10063 #endif
10064 PyObject *kwtuple, **k;
10065 PyObject **d;
10066 Py_ssize_t nd;
10067 Py_ssize_t nk;
10068 PyObject *result;
10069 assert(kwargs == NULL || PyDict_Check(kwargs));
10070 nk = kwargs ? PyDict_Size(kwargs) : 0;
10071 if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
10072 return NULL;
10073 }
10074 if (
10075 #if PY_MAJOR_VERSION >= 3
10076 co->co_kwonlyargcount == 0 &&
10077 #endif
10078 likely(kwargs == NULL || nk == 0) &&
10079 co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
10080 if (argdefs == NULL && co->co_argcount == nargs) {
10081 result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
10082 goto done;
10083 }
10084 else if (nargs == 0 && argdefs != NULL
10085 && co->co_argcount == Py_SIZE(argdefs)) {
10086 /* function called with no arguments, but all parameters have
10087 a default value: use default values as arguments .*/
10088 args = &PyTuple_GET_ITEM(argdefs, 0);
10089 result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
10090 goto done;
10091 }
10092 }
10093 if (kwargs != NULL) {
10094 Py_ssize_t pos, i;
10095 kwtuple = PyTuple_New(2 * nk);
10096 if (kwtuple == NULL) {
10097 result = NULL;
10098 goto done;
10099 }
10100 k = &PyTuple_GET_ITEM(kwtuple, 0);
10101 pos = i = 0;
10102 while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
10103 Py_INCREF(k[i]);
10104 Py_INCREF(k[i+1]);
10105 i += 2;
10106 }
10107 nk = i / 2;
10108 }
10109 else {
10110 kwtuple = NULL;
10111 k = NULL;
10112 }
10113 closure = PyFunction_GET_CLOSURE(func);
10114 #if PY_MAJOR_VERSION >= 3
10115 kwdefs = PyFunction_GET_KW_DEFAULTS(func);
10116 #endif
10117 if (argdefs != NULL) {
10118 d = &PyTuple_GET_ITEM(argdefs, 0);
10119 nd = Py_SIZE(argdefs);
10120 }
10121 else {
10122 d = NULL;
10123 nd = 0;
10124 }
10125 #if PY_MAJOR_VERSION >= 3
10126 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
10127 args, (int)nargs,
10128 k, (int)nk,
10129 d, (int)nd, kwdefs, closure);
10130 #else
10131 result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
10132 args, (int)nargs,
10133 k, (int)nk,
10134 d, (int)nd, closure);
10135 #endif
10136 Py_XDECREF(kwtuple);
10137 done:
10138 Py_LeaveRecursiveCall();
10139 return result;
10140 }
10141 #endif
10142 #endif
10143
10144 /* PyObjectCall */
10145 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_Call(PyObject * func,PyObject * arg,PyObject * kw)10146 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
10147 PyObject *result;
10148 ternaryfunc call = func->ob_type->tp_call;
10149 if (unlikely(!call))
10150 return PyObject_Call(func, arg, kw);
10151 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
10152 return NULL;
10153 result = (*call)(func, arg, kw);
10154 Py_LeaveRecursiveCall();
10155 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
10156 PyErr_SetString(
10157 PyExc_SystemError,
10158 "NULL result without error in PyObject_Call");
10159 }
10160 return result;
10161 }
10162 #endif
10163
10164 /* PyObjectCall2Args */
__Pyx_PyObject_Call2Args(PyObject * function,PyObject * arg1,PyObject * arg2)10165 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
10166 PyObject *args, *result = NULL;
10167 #if CYTHON_FAST_PYCALL
10168 if (PyFunction_Check(function)) {
10169 PyObject *args[2] = {arg1, arg2};
10170 return __Pyx_PyFunction_FastCall(function, args, 2);
10171 }
10172 #endif
10173 #if CYTHON_FAST_PYCCALL
10174 if (__Pyx_PyFastCFunction_Check(function)) {
10175 PyObject *args[2] = {arg1, arg2};
10176 return __Pyx_PyCFunction_FastCall(function, args, 2);
10177 }
10178 #endif
10179 args = PyTuple_New(2);
10180 if (unlikely(!args)) goto done;
10181 Py_INCREF(arg1);
10182 PyTuple_SET_ITEM(args, 0, arg1);
10183 Py_INCREF(arg2);
10184 PyTuple_SET_ITEM(args, 1, arg2);
10185 Py_INCREF(function);
10186 result = __Pyx_PyObject_Call(function, args, NULL);
10187 Py_DECREF(args);
10188 Py_DECREF(function);
10189 done:
10190 return result;
10191 }
10192
10193 /* PyObjectCallMethO */
10194 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallMethO(PyObject * func,PyObject * arg)10195 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
10196 PyObject *self, *result;
10197 PyCFunction cfunc;
10198 cfunc = PyCFunction_GET_FUNCTION(func);
10199 self = PyCFunction_GET_SELF(func);
10200 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
10201 return NULL;
10202 result = cfunc(self, arg);
10203 Py_LeaveRecursiveCall();
10204 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
10205 PyErr_SetString(
10206 PyExc_SystemError,
10207 "NULL result without error in PyObject_Call");
10208 }
10209 return result;
10210 }
10211 #endif
10212
10213 /* PyObjectCallOneArg */
10214 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx__PyObject_CallOneArg(PyObject * func,PyObject * arg)10215 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
10216 PyObject *result;
10217 PyObject *args = PyTuple_New(1);
10218 if (unlikely(!args)) return NULL;
10219 Py_INCREF(arg);
10220 PyTuple_SET_ITEM(args, 0, arg);
10221 result = __Pyx_PyObject_Call(func, args, NULL);
10222 Py_DECREF(args);
10223 return result;
10224 }
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)10225 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
10226 #if CYTHON_FAST_PYCALL
10227 if (PyFunction_Check(func)) {
10228 return __Pyx_PyFunction_FastCall(func, &arg, 1);
10229 }
10230 #endif
10231 if (likely(PyCFunction_Check(func))) {
10232 if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
10233 return __Pyx_PyObject_CallMethO(func, arg);
10234 #if CYTHON_FAST_PYCCALL
10235 } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
10236 return __Pyx_PyCFunction_FastCall(func, &arg, 1);
10237 #endif
10238 }
10239 }
10240 return __Pyx__PyObject_CallOneArg(func, arg);
10241 }
10242 #else
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)10243 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
10244 PyObject *result;
10245 PyObject *args = PyTuple_Pack(1, arg);
10246 if (unlikely(!args)) return NULL;
10247 result = __Pyx_PyObject_Call(func, args, NULL);
10248 Py_DECREF(args);
10249 return result;
10250 }
10251 #endif
10252
10253 /* PyErrFetchRestore */
10254 #if CYTHON_FAST_THREAD_STATE
__Pyx_ErrRestoreInState(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)10255 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
10256 PyObject *tmp_type, *tmp_value, *tmp_tb;
10257 tmp_type = tstate->curexc_type;
10258 tmp_value = tstate->curexc_value;
10259 tmp_tb = tstate->curexc_traceback;
10260 tstate->curexc_type = type;
10261 tstate->curexc_value = value;
10262 tstate->curexc_traceback = tb;
10263 Py_XDECREF(tmp_type);
10264 Py_XDECREF(tmp_value);
10265 Py_XDECREF(tmp_tb);
10266 }
__Pyx_ErrFetchInState(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)10267 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
10268 *type = tstate->curexc_type;
10269 *value = tstate->curexc_value;
10270 *tb = tstate->curexc_traceback;
10271 tstate->curexc_type = 0;
10272 tstate->curexc_value = 0;
10273 tstate->curexc_traceback = 0;
10274 }
10275 #endif
10276
10277 /* RaiseException */
10278 #if PY_MAJOR_VERSION < 3
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,CYTHON_UNUSED PyObject * cause)10279 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
10280 CYTHON_UNUSED PyObject *cause) {
10281 __Pyx_PyThreadState_declare
10282 Py_XINCREF(type);
10283 if (!value || value == Py_None)
10284 value = NULL;
10285 else
10286 Py_INCREF(value);
10287 if (!tb || tb == Py_None)
10288 tb = NULL;
10289 else {
10290 Py_INCREF(tb);
10291 if (!PyTraceBack_Check(tb)) {
10292 PyErr_SetString(PyExc_TypeError,
10293 "raise: arg 3 must be a traceback or None");
10294 goto raise_error;
10295 }
10296 }
10297 if (PyType_Check(type)) {
10298 #if CYTHON_COMPILING_IN_PYPY
10299 if (!value) {
10300 Py_INCREF(Py_None);
10301 value = Py_None;
10302 }
10303 #endif
10304 PyErr_NormalizeException(&type, &value, &tb);
10305 } else {
10306 if (value) {
10307 PyErr_SetString(PyExc_TypeError,
10308 "instance exception may not have a separate value");
10309 goto raise_error;
10310 }
10311 value = type;
10312 type = (PyObject*) Py_TYPE(type);
10313 Py_INCREF(type);
10314 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
10315 PyErr_SetString(PyExc_TypeError,
10316 "raise: exception class must be a subclass of BaseException");
10317 goto raise_error;
10318 }
10319 }
10320 __Pyx_PyThreadState_assign
10321 __Pyx_ErrRestore(type, value, tb);
10322 return;
10323 raise_error:
10324 Py_XDECREF(value);
10325 Py_XDECREF(type);
10326 Py_XDECREF(tb);
10327 return;
10328 }
10329 #else
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,PyObject * cause)10330 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
10331 PyObject* owned_instance = NULL;
10332 if (tb == Py_None) {
10333 tb = 0;
10334 } else if (tb && !PyTraceBack_Check(tb)) {
10335 PyErr_SetString(PyExc_TypeError,
10336 "raise: arg 3 must be a traceback or None");
10337 goto bad;
10338 }
10339 if (value == Py_None)
10340 value = 0;
10341 if (PyExceptionInstance_Check(type)) {
10342 if (value) {
10343 PyErr_SetString(PyExc_TypeError,
10344 "instance exception may not have a separate value");
10345 goto bad;
10346 }
10347 value = type;
10348 type = (PyObject*) Py_TYPE(value);
10349 } else if (PyExceptionClass_Check(type)) {
10350 PyObject *instance_class = NULL;
10351 if (value && PyExceptionInstance_Check(value)) {
10352 instance_class = (PyObject*) Py_TYPE(value);
10353 if (instance_class != type) {
10354 int is_subclass = PyObject_IsSubclass(instance_class, type);
10355 if (!is_subclass) {
10356 instance_class = NULL;
10357 } else if (unlikely(is_subclass == -1)) {
10358 goto bad;
10359 } else {
10360 type = instance_class;
10361 }
10362 }
10363 }
10364 if (!instance_class) {
10365 PyObject *args;
10366 if (!value)
10367 args = PyTuple_New(0);
10368 else if (PyTuple_Check(value)) {
10369 Py_INCREF(value);
10370 args = value;
10371 } else
10372 args = PyTuple_Pack(1, value);
10373 if (!args)
10374 goto bad;
10375 owned_instance = PyObject_Call(type, args, NULL);
10376 Py_DECREF(args);
10377 if (!owned_instance)
10378 goto bad;
10379 value = owned_instance;
10380 if (!PyExceptionInstance_Check(value)) {
10381 PyErr_Format(PyExc_TypeError,
10382 "calling %R should have returned an instance of "
10383 "BaseException, not %R",
10384 type, Py_TYPE(value));
10385 goto bad;
10386 }
10387 }
10388 } else {
10389 PyErr_SetString(PyExc_TypeError,
10390 "raise: exception class must be a subclass of BaseException");
10391 goto bad;
10392 }
10393 if (cause) {
10394 PyObject *fixed_cause;
10395 if (cause == Py_None) {
10396 fixed_cause = NULL;
10397 } else if (PyExceptionClass_Check(cause)) {
10398 fixed_cause = PyObject_CallObject(cause, NULL);
10399 if (fixed_cause == NULL)
10400 goto bad;
10401 } else if (PyExceptionInstance_Check(cause)) {
10402 fixed_cause = cause;
10403 Py_INCREF(fixed_cause);
10404 } else {
10405 PyErr_SetString(PyExc_TypeError,
10406 "exception causes must derive from "
10407 "BaseException");
10408 goto bad;
10409 }
10410 PyException_SetCause(value, fixed_cause);
10411 }
10412 PyErr_SetObject(type, value);
10413 if (tb) {
10414 #if CYTHON_COMPILING_IN_PYPY
10415 PyObject *tmp_type, *tmp_value, *tmp_tb;
10416 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
10417 Py_INCREF(tb);
10418 PyErr_Restore(tmp_type, tmp_value, tb);
10419 Py_XDECREF(tmp_tb);
10420 #else
10421 PyThreadState *tstate = __Pyx_PyThreadState_Current;
10422 PyObject* tmp_tb = tstate->curexc_traceback;
10423 if (tb != tmp_tb) {
10424 Py_INCREF(tb);
10425 tstate->curexc_traceback = tb;
10426 Py_XDECREF(tmp_tb);
10427 }
10428 #endif
10429 }
10430 bad:
10431 Py_XDECREF(owned_instance);
10432 return;
10433 }
10434 #endif
10435
10436 /* ArgTypeTest */
__Pyx__ArgTypeTest(PyObject * obj,PyTypeObject * type,const char * name,int exact)10437 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
10438 {
10439 if (unlikely(!type)) {
10440 PyErr_SetString(PyExc_SystemError, "Missing type object");
10441 return 0;
10442 }
10443 else if (exact) {
10444 #if PY_MAJOR_VERSION == 2
10445 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
10446 #endif
10447 }
10448 else {
10449 if (likely(__Pyx_TypeCheck(obj, type))) return 1;
10450 }
10451 PyErr_Format(PyExc_TypeError,
10452 "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
10453 name, type->tp_name, Py_TYPE(obj)->tp_name);
10454 return 0;
10455 }
10456
10457 /* UnpackUnboundCMethod */
__Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction * target)10458 static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
10459 PyObject *method;
10460 method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
10461 if (unlikely(!method))
10462 return -1;
10463 target->method = method;
10464 #if CYTHON_COMPILING_IN_CPYTHON
10465 #if PY_MAJOR_VERSION >= 3
10466 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
10467 #endif
10468 {
10469 PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
10470 target->func = descr->d_method->ml_meth;
10471 target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
10472 }
10473 #endif
10474 return 0;
10475 }
10476
10477 /* CallUnboundCMethod1 */
10478 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction * cfunc,PyObject * self,PyObject * arg)10479 static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
10480 if (likely(cfunc->func)) {
10481 int flag = cfunc->flag;
10482 if (flag == METH_O) {
10483 return (*(cfunc->func))(self, arg);
10484 } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
10485 if (PY_VERSION_HEX >= 0x030700A0) {
10486 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
10487 } else {
10488 return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
10489 }
10490 } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
10491 return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
10492 }
10493 }
10494 return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
10495 }
10496 #endif
__Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction * cfunc,PyObject * self,PyObject * arg)10497 static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
10498 PyObject *args, *result = NULL;
10499 if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
10500 #if CYTHON_COMPILING_IN_CPYTHON
10501 if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
10502 args = PyTuple_New(1);
10503 if (unlikely(!args)) goto bad;
10504 Py_INCREF(arg);
10505 PyTuple_SET_ITEM(args, 0, arg);
10506 if (cfunc->flag & METH_KEYWORDS)
10507 result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
10508 else
10509 result = (*cfunc->func)(self, args);
10510 } else {
10511 args = PyTuple_New(2);
10512 if (unlikely(!args)) goto bad;
10513 Py_INCREF(self);
10514 PyTuple_SET_ITEM(args, 0, self);
10515 Py_INCREF(arg);
10516 PyTuple_SET_ITEM(args, 1, arg);
10517 result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
10518 }
10519 #else
10520 args = PyTuple_Pack(2, self, arg);
10521 if (unlikely(!args)) goto bad;
10522 result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
10523 #endif
10524 bad:
10525 Py_XDECREF(args);
10526 return result;
10527 }
10528
10529 /* CallUnboundCMethod2 */
10530 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction * cfunc,PyObject * self,PyObject * arg1,PyObject * arg2)10531 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
10532 if (likely(cfunc->func)) {
10533 PyObject *args[2] = {arg1, arg2};
10534 if (cfunc->flag == METH_FASTCALL) {
10535 #if PY_VERSION_HEX >= 0x030700A0
10536 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
10537 #else
10538 return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
10539 #endif
10540 }
10541 #if PY_VERSION_HEX >= 0x030700A0
10542 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
10543 return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
10544 #endif
10545 }
10546 return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
10547 }
10548 #endif
__Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction * cfunc,PyObject * self,PyObject * arg1,PyObject * arg2)10549 static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
10550 PyObject *args, *result = NULL;
10551 if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
10552 #if CYTHON_COMPILING_IN_CPYTHON
10553 if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
10554 args = PyTuple_New(2);
10555 if (unlikely(!args)) goto bad;
10556 Py_INCREF(arg1);
10557 PyTuple_SET_ITEM(args, 0, arg1);
10558 Py_INCREF(arg2);
10559 PyTuple_SET_ITEM(args, 1, arg2);
10560 if (cfunc->flag & METH_KEYWORDS)
10561 result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
10562 else
10563 result = (*cfunc->func)(self, args);
10564 } else {
10565 args = PyTuple_New(3);
10566 if (unlikely(!args)) goto bad;
10567 Py_INCREF(self);
10568 PyTuple_SET_ITEM(args, 0, self);
10569 Py_INCREF(arg1);
10570 PyTuple_SET_ITEM(args, 1, arg1);
10571 Py_INCREF(arg2);
10572 PyTuple_SET_ITEM(args, 2, arg2);
10573 result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
10574 }
10575 #else
10576 args = PyTuple_Pack(3, self, arg1, arg2);
10577 if (unlikely(!args)) goto bad;
10578 result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
10579 #endif
10580 bad:
10581 Py_XDECREF(args);
10582 return result;
10583 }
10584
10585 /* dict_getitem_default */
__Pyx_PyDict_GetItemDefault(PyObject * d,PyObject * key,PyObject * default_value)10586 static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
10587 PyObject* value;
10588 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
10589 value = PyDict_GetItemWithError(d, key);
10590 if (unlikely(!value)) {
10591 if (unlikely(PyErr_Occurred()))
10592 return NULL;
10593 value = default_value;
10594 }
10595 Py_INCREF(value);
10596 if ((1));
10597 #else
10598 if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
10599 value = PyDict_GetItem(d, key);
10600 if (unlikely(!value)) {
10601 value = default_value;
10602 }
10603 Py_INCREF(value);
10604 }
10605 #endif
10606 else {
10607 if (default_value == Py_None)
10608 value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
10609 else
10610 value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
10611 }
10612 return value;
10613 }
10614
10615 /* PyIntBinop */
10616 #if !CYTHON_COMPILING_IN_PYPY
__Pyx_PyInt_AddObjC(PyObject * op1,PyObject * op2,CYTHON_UNUSED long intval,int inplace,int zerodivision_check)10617 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
10618 (void)inplace;
10619 (void)zerodivision_check;
10620 #if PY_MAJOR_VERSION < 3
10621 if (likely(PyInt_CheckExact(op1))) {
10622 const long b = intval;
10623 long x;
10624 long a = PyInt_AS_LONG(op1);
10625 x = (long)((unsigned long)a + b);
10626 if (likely((x^a) >= 0 || (x^b) >= 0))
10627 return PyInt_FromLong(x);
10628 return PyLong_Type.tp_as_number->nb_add(op1, op2);
10629 }
10630 #endif
10631 #if CYTHON_USE_PYLONG_INTERNALS
10632 if (likely(PyLong_CheckExact(op1))) {
10633 const long b = intval;
10634 long a, x;
10635 #ifdef HAVE_LONG_LONG
10636 const PY_LONG_LONG llb = intval;
10637 PY_LONG_LONG lla, llx;
10638 #endif
10639 const digit* digits = ((PyLongObject*)op1)->ob_digit;
10640 const Py_ssize_t size = Py_SIZE(op1);
10641 if (likely(__Pyx_sst_abs(size) <= 1)) {
10642 a = likely(size) ? digits[0] : 0;
10643 if (size == -1) a = -a;
10644 } else {
10645 switch (size) {
10646 case -2:
10647 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
10648 a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
10649 break;
10650 #ifdef HAVE_LONG_LONG
10651 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
10652 lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
10653 goto long_long;
10654 #endif
10655 }
10656 CYTHON_FALLTHROUGH;
10657 case 2:
10658 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
10659 a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
10660 break;
10661 #ifdef HAVE_LONG_LONG
10662 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
10663 lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
10664 goto long_long;
10665 #endif
10666 }
10667 CYTHON_FALLTHROUGH;
10668 case -3:
10669 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
10670 a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
10671 break;
10672 #ifdef HAVE_LONG_LONG
10673 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
10674 lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
10675 goto long_long;
10676 #endif
10677 }
10678 CYTHON_FALLTHROUGH;
10679 case 3:
10680 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
10681 a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
10682 break;
10683 #ifdef HAVE_LONG_LONG
10684 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
10685 lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
10686 goto long_long;
10687 #endif
10688 }
10689 CYTHON_FALLTHROUGH;
10690 case -4:
10691 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
10692 a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
10693 break;
10694 #ifdef HAVE_LONG_LONG
10695 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
10696 lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
10697 goto long_long;
10698 #endif
10699 }
10700 CYTHON_FALLTHROUGH;
10701 case 4:
10702 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
10703 a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
10704 break;
10705 #ifdef HAVE_LONG_LONG
10706 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
10707 lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
10708 goto long_long;
10709 #endif
10710 }
10711 CYTHON_FALLTHROUGH;
10712 default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
10713 }
10714 }
10715 x = a + b;
10716 return PyLong_FromLong(x);
10717 #ifdef HAVE_LONG_LONG
10718 long_long:
10719 llx = lla + llb;
10720 return PyLong_FromLongLong(llx);
10721 #endif
10722
10723
10724 }
10725 #endif
10726 if (PyFloat_CheckExact(op1)) {
10727 const long b = intval;
10728 double a = PyFloat_AS_DOUBLE(op1);
10729 double result;
10730 PyFPE_START_PROTECT("add", return NULL)
10731 result = ((double)a) + (double)b;
10732 PyFPE_END_PROTECT(result)
10733 return PyFloat_FromDouble(result);
10734 }
10735 return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
10736 }
10737 #endif
10738
10739 /* DictGetItem */
10740 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
__Pyx_PyDict_GetItem(PyObject * d,PyObject * key)10741 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
10742 PyObject *value;
10743 value = PyDict_GetItemWithError(d, key);
10744 if (unlikely(!value)) {
10745 if (!PyErr_Occurred()) {
10746 if (unlikely(PyTuple_Check(key))) {
10747 PyObject* args = PyTuple_Pack(1, key);
10748 if (likely(args)) {
10749 PyErr_SetObject(PyExc_KeyError, args);
10750 Py_DECREF(args);
10751 }
10752 } else {
10753 PyErr_SetObject(PyExc_KeyError, key);
10754 }
10755 }
10756 return NULL;
10757 }
10758 Py_INCREF(value);
10759 return value;
10760 }
10761 #endif
10762
10763 /* PyErrExceptionMatches */
10764 #if CYTHON_FAST_THREAD_STATE
__Pyx_PyErr_ExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)10765 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
10766 Py_ssize_t i, n;
10767 n = PyTuple_GET_SIZE(tuple);
10768 #if PY_MAJOR_VERSION >= 3
10769 for (i=0; i<n; i++) {
10770 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
10771 }
10772 #endif
10773 for (i=0; i<n; i++) {
10774 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
10775 }
10776 return 0;
10777 }
__Pyx_PyErr_ExceptionMatchesInState(PyThreadState * tstate,PyObject * err)10778 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
10779 PyObject *exc_type = tstate->curexc_type;
10780 if (exc_type == err) return 1;
10781 if (unlikely(!exc_type)) return 0;
10782 if (unlikely(PyTuple_Check(err)))
10783 return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
10784 return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
10785 }
10786 #endif
10787
10788 /* GetAttr */
__Pyx_GetAttr(PyObject * o,PyObject * n)10789 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
10790 #if CYTHON_USE_TYPE_SLOTS
10791 #if PY_MAJOR_VERSION >= 3
10792 if (likely(PyUnicode_Check(n)))
10793 #else
10794 if (likely(PyString_Check(n)))
10795 #endif
10796 return __Pyx_PyObject_GetAttrStr(o, n);
10797 #endif
10798 return PyObject_GetAttr(o, n);
10799 }
10800
10801 /* GetAttr3 */
__Pyx_GetAttr3Default(PyObject * d)10802 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
10803 __Pyx_PyThreadState_declare
10804 __Pyx_PyThreadState_assign
10805 if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
10806 return NULL;
10807 __Pyx_PyErr_Clear();
10808 Py_INCREF(d);
10809 return d;
10810 }
__Pyx_GetAttr3(PyObject * o,PyObject * n,PyObject * d)10811 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
10812 PyObject *r = __Pyx_GetAttr(o, n);
10813 return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
10814 }
10815
10816 /* PyObjectSetAttrStr */
10817 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_SetAttrStr(PyObject * obj,PyObject * attr_name,PyObject * value)10818 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
10819 PyTypeObject* tp = Py_TYPE(obj);
10820 if (likely(tp->tp_setattro))
10821 return tp->tp_setattro(obj, attr_name, value);
10822 #if PY_MAJOR_VERSION < 3
10823 if (likely(tp->tp_setattr))
10824 return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
10825 #endif
10826 return PyObject_SetAttr(obj, attr_name, value);
10827 }
10828 #endif
10829
10830 /* PyObjectCallNoArg */
10831 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallNoArg(PyObject * func)10832 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
10833 #if CYTHON_FAST_PYCALL
10834 if (PyFunction_Check(func)) {
10835 return __Pyx_PyFunction_FastCall(func, NULL, 0);
10836 }
10837 #endif
10838 #ifdef __Pyx_CyFunction_USED
10839 if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
10840 #else
10841 if (likely(PyCFunction_Check(func)))
10842 #endif
10843 {
10844 if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
10845 return __Pyx_PyObject_CallMethO(func, NULL);
10846 }
10847 }
10848 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
10849 }
10850 #endif
10851
10852 /* RaiseTooManyValuesToUnpack */
__Pyx_RaiseTooManyValuesError(Py_ssize_t expected)10853 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
10854 PyErr_Format(PyExc_ValueError,
10855 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
10856 }
10857
10858 /* RaiseNeedMoreValuesToUnpack */
__Pyx_RaiseNeedMoreValuesError(Py_ssize_t index)10859 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
10860 PyErr_Format(PyExc_ValueError,
10861 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
10862 index, (index == 1) ? "" : "s");
10863 }
10864
10865 /* IterFinish */
__Pyx_IterFinish(void)10866 static CYTHON_INLINE int __Pyx_IterFinish(void) {
10867 #if CYTHON_FAST_THREAD_STATE
10868 PyThreadState *tstate = __Pyx_PyThreadState_Current;
10869 PyObject* exc_type = tstate->curexc_type;
10870 if (unlikely(exc_type)) {
10871 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
10872 PyObject *exc_value, *exc_tb;
10873 exc_value = tstate->curexc_value;
10874 exc_tb = tstate->curexc_traceback;
10875 tstate->curexc_type = 0;
10876 tstate->curexc_value = 0;
10877 tstate->curexc_traceback = 0;
10878 Py_DECREF(exc_type);
10879 Py_XDECREF(exc_value);
10880 Py_XDECREF(exc_tb);
10881 return 0;
10882 } else {
10883 return -1;
10884 }
10885 }
10886 return 0;
10887 #else
10888 if (unlikely(PyErr_Occurred())) {
10889 if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
10890 PyErr_Clear();
10891 return 0;
10892 } else {
10893 return -1;
10894 }
10895 }
10896 return 0;
10897 #endif
10898 }
10899
10900 /* UnpackItemEndCheck */
__Pyx_IternextUnpackEndCheck(PyObject * retval,Py_ssize_t expected)10901 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
10902 if (unlikely(retval)) {
10903 Py_DECREF(retval);
10904 __Pyx_RaiseTooManyValuesError(expected);
10905 return -1;
10906 } else {
10907 return __Pyx_IterFinish();
10908 }
10909 return 0;
10910 }
10911
10912 /* Import */
__Pyx_Import(PyObject * name,PyObject * from_list,int level)10913 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
10914 PyObject *empty_list = 0;
10915 PyObject *module = 0;
10916 PyObject *global_dict = 0;
10917 PyObject *empty_dict = 0;
10918 PyObject *list;
10919 #if PY_MAJOR_VERSION < 3
10920 PyObject *py_import;
10921 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
10922 if (!py_import)
10923 goto bad;
10924 #endif
10925 if (from_list)
10926 list = from_list;
10927 else {
10928 empty_list = PyList_New(0);
10929 if (!empty_list)
10930 goto bad;
10931 list = empty_list;
10932 }
10933 global_dict = PyModule_GetDict(__pyx_m);
10934 if (!global_dict)
10935 goto bad;
10936 empty_dict = PyDict_New();
10937 if (!empty_dict)
10938 goto bad;
10939 {
10940 #if PY_MAJOR_VERSION >= 3
10941 if (level == -1) {
10942 if (strchr(__Pyx_MODULE_NAME, '.')) {
10943 module = PyImport_ImportModuleLevelObject(
10944 name, global_dict, empty_dict, list, 1);
10945 if (!module) {
10946 if (!PyErr_ExceptionMatches(PyExc_ImportError))
10947 goto bad;
10948 PyErr_Clear();
10949 }
10950 }
10951 level = 0;
10952 }
10953 #endif
10954 if (!module) {
10955 #if PY_MAJOR_VERSION < 3
10956 PyObject *py_level = PyInt_FromLong(level);
10957 if (!py_level)
10958 goto bad;
10959 module = PyObject_CallFunctionObjArgs(py_import,
10960 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
10961 Py_DECREF(py_level);
10962 #else
10963 module = PyImport_ImportModuleLevelObject(
10964 name, global_dict, empty_dict, list, level);
10965 #endif
10966 }
10967 }
10968 bad:
10969 #if PY_MAJOR_VERSION < 3
10970 Py_XDECREF(py_import);
10971 #endif
10972 Py_XDECREF(empty_list);
10973 Py_XDECREF(empty_dict);
10974 return module;
10975 }
10976
10977 /* ImportFrom */
__Pyx_ImportFrom(PyObject * module,PyObject * name)10978 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
10979 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
10980 if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
10981 PyErr_Format(PyExc_ImportError,
10982 #if PY_MAJOR_VERSION < 3
10983 "cannot import name %.230s", PyString_AS_STRING(name));
10984 #else
10985 "cannot import name %S", name);
10986 #endif
10987 }
10988 return value;
10989 }
10990
10991 /* GetItemInt */
__Pyx_GetItemInt_Generic(PyObject * o,PyObject * j)10992 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
10993 PyObject *r;
10994 if (!j) return NULL;
10995 r = PyObject_GetItem(o, j);
10996 Py_DECREF(j);
10997 return r;
10998 }
__Pyx_GetItemInt_List_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)10999 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
11000 CYTHON_NCP_UNUSED int wraparound,
11001 CYTHON_NCP_UNUSED int boundscheck) {
11002 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11003 Py_ssize_t wrapped_i = i;
11004 if (wraparound & unlikely(i < 0)) {
11005 wrapped_i += PyList_GET_SIZE(o);
11006 }
11007 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
11008 PyObject *r = PyList_GET_ITEM(o, wrapped_i);
11009 Py_INCREF(r);
11010 return r;
11011 }
11012 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
11013 #else
11014 return PySequence_GetItem(o, i);
11015 #endif
11016 }
__Pyx_GetItemInt_Tuple_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)11017 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
11018 CYTHON_NCP_UNUSED int wraparound,
11019 CYTHON_NCP_UNUSED int boundscheck) {
11020 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11021 Py_ssize_t wrapped_i = i;
11022 if (wraparound & unlikely(i < 0)) {
11023 wrapped_i += PyTuple_GET_SIZE(o);
11024 }
11025 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
11026 PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
11027 Py_INCREF(r);
11028 return r;
11029 }
11030 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
11031 #else
11032 return PySequence_GetItem(o, i);
11033 #endif
11034 }
__Pyx_GetItemInt_Fast(PyObject * o,Py_ssize_t i,int is_list,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)11035 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
11036 CYTHON_NCP_UNUSED int wraparound,
11037 CYTHON_NCP_UNUSED int boundscheck) {
11038 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
11039 if (is_list || PyList_CheckExact(o)) {
11040 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
11041 if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
11042 PyObject *r = PyList_GET_ITEM(o, n);
11043 Py_INCREF(r);
11044 return r;
11045 }
11046 }
11047 else if (PyTuple_CheckExact(o)) {
11048 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
11049 if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
11050 PyObject *r = PyTuple_GET_ITEM(o, n);
11051 Py_INCREF(r);
11052 return r;
11053 }
11054 } else {
11055 PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
11056 if (likely(m && m->sq_item)) {
11057 if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
11058 Py_ssize_t l = m->sq_length(o);
11059 if (likely(l >= 0)) {
11060 i += l;
11061 } else {
11062 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
11063 return NULL;
11064 PyErr_Clear();
11065 }
11066 }
11067 return m->sq_item(o, i);
11068 }
11069 }
11070 #else
11071 if (is_list || PySequence_Check(o)) {
11072 return PySequence_GetItem(o, i);
11073 }
11074 #endif
11075 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
11076 }
11077
11078 /* HasAttr */
__Pyx_HasAttr(PyObject * o,PyObject * n)11079 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
11080 PyObject *r;
11081 if (unlikely(!__Pyx_PyBaseString_Check(n))) {
11082 PyErr_SetString(PyExc_TypeError,
11083 "hasattr(): attribute name must be string");
11084 return -1;
11085 }
11086 r = __Pyx_GetAttr(o, n);
11087 if (unlikely(!r)) {
11088 PyErr_Clear();
11089 return 0;
11090 } else {
11091 Py_DECREF(r);
11092 return 1;
11093 }
11094 }
11095
11096 /* RaiseNoneIterError */
__Pyx_RaiseNoneNotIterableError(void)11097 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
11098 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
11099 }
11100
11101 /* ExtTypeTest */
__Pyx_TypeTest(PyObject * obj,PyTypeObject * type)11102 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
11103 if (unlikely(!type)) {
11104 PyErr_SetString(PyExc_SystemError, "Missing type object");
11105 return 0;
11106 }
11107 if (likely(__Pyx_TypeCheck(obj, type)))
11108 return 1;
11109 PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
11110 Py_TYPE(obj)->tp_name, type->tp_name);
11111 return 0;
11112 }
11113
11114 /* GetTopmostException */
11115 #if CYTHON_USE_EXC_INFO_STACK
11116 static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState * tstate)11117 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
11118 {
11119 _PyErr_StackItem *exc_info = tstate->exc_info;
11120 while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
11121 exc_info->previous_item != NULL)
11122 {
11123 exc_info = exc_info->previous_item;
11124 }
11125 return exc_info;
11126 }
11127 #endif
11128
11129 /* SaveResetException */
11130 #if CYTHON_FAST_THREAD_STATE
__Pyx__ExceptionSave(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)11131 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
11132 #if CYTHON_USE_EXC_INFO_STACK
11133 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
11134 *type = exc_info->exc_type;
11135 *value = exc_info->exc_value;
11136 *tb = exc_info->exc_traceback;
11137 #else
11138 *type = tstate->exc_type;
11139 *value = tstate->exc_value;
11140 *tb = tstate->exc_traceback;
11141 #endif
11142 Py_XINCREF(*type);
11143 Py_XINCREF(*value);
11144 Py_XINCREF(*tb);
11145 }
__Pyx__ExceptionReset(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)11146 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
11147 PyObject *tmp_type, *tmp_value, *tmp_tb;
11148 #if CYTHON_USE_EXC_INFO_STACK
11149 _PyErr_StackItem *exc_info = tstate->exc_info;
11150 tmp_type = exc_info->exc_type;
11151 tmp_value = exc_info->exc_value;
11152 tmp_tb = exc_info->exc_traceback;
11153 exc_info->exc_type = type;
11154 exc_info->exc_value = value;
11155 exc_info->exc_traceback = tb;
11156 #else
11157 tmp_type = tstate->exc_type;
11158 tmp_value = tstate->exc_value;
11159 tmp_tb = tstate->exc_traceback;
11160 tstate->exc_type = type;
11161 tstate->exc_value = value;
11162 tstate->exc_traceback = tb;
11163 #endif
11164 Py_XDECREF(tmp_type);
11165 Py_XDECREF(tmp_value);
11166 Py_XDECREF(tmp_tb);
11167 }
11168 #endif
11169
11170 /* GetException */
11171 #if CYTHON_FAST_THREAD_STATE
__Pyx__GetException(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)11172 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
11173 #else
11174 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
11175 #endif
11176 {
11177 PyObject *local_type, *local_value, *local_tb;
11178 #if CYTHON_FAST_THREAD_STATE
11179 PyObject *tmp_type, *tmp_value, *tmp_tb;
11180 local_type = tstate->curexc_type;
11181 local_value = tstate->curexc_value;
11182 local_tb = tstate->curexc_traceback;
11183 tstate->curexc_type = 0;
11184 tstate->curexc_value = 0;
11185 tstate->curexc_traceback = 0;
11186 #else
11187 PyErr_Fetch(&local_type, &local_value, &local_tb);
11188 #endif
11189 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
11190 #if CYTHON_FAST_THREAD_STATE
11191 if (unlikely(tstate->curexc_type))
11192 #else
11193 if (unlikely(PyErr_Occurred()))
11194 #endif
11195 goto bad;
11196 #if PY_MAJOR_VERSION >= 3
11197 if (local_tb) {
11198 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
11199 goto bad;
11200 }
11201 #endif
11202 Py_XINCREF(local_tb);
11203 Py_XINCREF(local_type);
11204 Py_XINCREF(local_value);
11205 *type = local_type;
11206 *value = local_value;
11207 *tb = local_tb;
11208 #if CYTHON_FAST_THREAD_STATE
11209 #if CYTHON_USE_EXC_INFO_STACK
11210 {
11211 _PyErr_StackItem *exc_info = tstate->exc_info;
11212 tmp_type = exc_info->exc_type;
11213 tmp_value = exc_info->exc_value;
11214 tmp_tb = exc_info->exc_traceback;
11215 exc_info->exc_type = local_type;
11216 exc_info->exc_value = local_value;
11217 exc_info->exc_traceback = local_tb;
11218 }
11219 #else
11220 tmp_type = tstate->exc_type;
11221 tmp_value = tstate->exc_value;
11222 tmp_tb = tstate->exc_traceback;
11223 tstate->exc_type = local_type;
11224 tstate->exc_value = local_value;
11225 tstate->exc_traceback = local_tb;
11226 #endif
11227 Py_XDECREF(tmp_type);
11228 Py_XDECREF(tmp_value);
11229 Py_XDECREF(tmp_tb);
11230 #else
11231 PyErr_SetExcInfo(local_type, local_value, local_tb);
11232 #endif
11233 return 0;
11234 bad:
11235 *type = 0;
11236 *value = 0;
11237 *tb = 0;
11238 Py_XDECREF(local_type);
11239 Py_XDECREF(local_value);
11240 Py_XDECREF(local_tb);
11241 return -1;
11242 }
11243
11244 /* CallNextTpDealloc */
__Pyx_call_next_tp_dealloc(PyObject * obj,destructor current_tp_dealloc)11245 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
11246 PyTypeObject* type = Py_TYPE(obj);
11247 while (type && type->tp_dealloc != current_tp_dealloc)
11248 type = type->tp_base;
11249 while (type && type->tp_dealloc == current_tp_dealloc)
11250 type = type->tp_base;
11251 if (type)
11252 type->tp_dealloc(obj);
11253 }
11254
11255 /* CallNextTpTraverse */
__Pyx_call_next_tp_traverse(PyObject * obj,visitproc v,void * a,traverseproc current_tp_traverse)11256 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
11257 PyTypeObject* type = Py_TYPE(obj);
11258 while (type && type->tp_traverse != current_tp_traverse)
11259 type = type->tp_base;
11260 while (type && type->tp_traverse == current_tp_traverse)
11261 type = type->tp_base;
11262 if (type && type->tp_traverse)
11263 return type->tp_traverse(obj, v, a);
11264 return 0;
11265 }
11266
11267 /* CallNextTpClear */
__Pyx_call_next_tp_clear(PyObject * obj,inquiry current_tp_clear)11268 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
11269 PyTypeObject* type = Py_TYPE(obj);
11270 while (type && type->tp_clear != current_tp_clear)
11271 type = type->tp_base;
11272 while (type && type->tp_clear == current_tp_clear)
11273 type = type->tp_base;
11274 if (type && type->tp_clear)
11275 type->tp_clear(obj);
11276 }
11277
11278 /* TypeImport */
11279 #ifndef __PYX_HAVE_RT_ImportType
11280 #define __PYX_HAVE_RT_ImportType
__Pyx_ImportType(PyObject * module,const char * module_name,const char * class_name,size_t size,enum __Pyx_ImportType_CheckSize check_size)11281 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
11282 size_t size, enum __Pyx_ImportType_CheckSize check_size)
11283 {
11284 PyObject *result = 0;
11285 char warning[200];
11286 Py_ssize_t basicsize;
11287 #ifdef Py_LIMITED_API
11288 PyObject *py_basicsize;
11289 #endif
11290 result = PyObject_GetAttrString(module, class_name);
11291 if (!result)
11292 goto bad;
11293 if (!PyType_Check(result)) {
11294 PyErr_Format(PyExc_TypeError,
11295 "%.200s.%.200s is not a type object",
11296 module_name, class_name);
11297 goto bad;
11298 }
11299 #ifndef Py_LIMITED_API
11300 basicsize = ((PyTypeObject *)result)->tp_basicsize;
11301 #else
11302 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
11303 if (!py_basicsize)
11304 goto bad;
11305 basicsize = PyLong_AsSsize_t(py_basicsize);
11306 Py_DECREF(py_basicsize);
11307 py_basicsize = 0;
11308 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
11309 goto bad;
11310 #endif
11311 if ((size_t)basicsize < size) {
11312 PyErr_Format(PyExc_ValueError,
11313 "%.200s.%.200s size changed, may indicate binary incompatibility. "
11314 "Expected %zd from C header, got %zd from PyObject",
11315 module_name, class_name, size, basicsize);
11316 goto bad;
11317 }
11318 if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
11319 PyErr_Format(PyExc_ValueError,
11320 "%.200s.%.200s size changed, may indicate binary incompatibility. "
11321 "Expected %zd from C header, got %zd from PyObject",
11322 module_name, class_name, size, basicsize);
11323 goto bad;
11324 }
11325 else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
11326 PyOS_snprintf(warning, sizeof(warning),
11327 "%s.%s size changed, may indicate binary incompatibility. "
11328 "Expected %zd from C header, got %zd from PyObject",
11329 module_name, class_name, size, basicsize);
11330 if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
11331 }
11332 return (PyTypeObject *)result;
11333 bad:
11334 Py_XDECREF(result);
11335 return NULL;
11336 }
11337 #endif
11338
11339 /* PyObject_GenericGetAttrNoDict */
11340 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_RaiseGenericGetAttributeError(PyTypeObject * tp,PyObject * attr_name)11341 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
11342 PyErr_Format(PyExc_AttributeError,
11343 #if PY_MAJOR_VERSION >= 3
11344 "'%.50s' object has no attribute '%U'",
11345 tp->tp_name, attr_name);
11346 #else
11347 "'%.50s' object has no attribute '%.400s'",
11348 tp->tp_name, PyString_AS_STRING(attr_name));
11349 #endif
11350 return NULL;
11351 }
__Pyx_PyObject_GenericGetAttrNoDict(PyObject * obj,PyObject * attr_name)11352 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
11353 PyObject *descr;
11354 PyTypeObject *tp = Py_TYPE(obj);
11355 if (unlikely(!PyString_Check(attr_name))) {
11356 return PyObject_GenericGetAttr(obj, attr_name);
11357 }
11358 assert(!tp->tp_dictoffset);
11359 descr = _PyType_Lookup(tp, attr_name);
11360 if (unlikely(!descr)) {
11361 return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
11362 }
11363 Py_INCREF(descr);
11364 #if PY_MAJOR_VERSION < 3
11365 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
11366 #endif
11367 {
11368 descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
11369 if (unlikely(f)) {
11370 PyObject *res = f(descr, obj, (PyObject *)tp);
11371 Py_DECREF(descr);
11372 return res;
11373 }
11374 }
11375 return descr;
11376 }
11377 #endif
11378
11379 /* PyObject_GenericGetAttr */
11380 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_PyObject_GenericGetAttr(PyObject * obj,PyObject * attr_name)11381 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
11382 if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
11383 return PyObject_GenericGetAttr(obj, attr_name);
11384 }
11385 return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
11386 }
11387 #endif
11388
11389 /* SetupReduce */
__Pyx_setup_reduce_is_named(PyObject * meth,PyObject * name)11390 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
11391 int ret;
11392 PyObject *name_attr;
11393 name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
11394 if (likely(name_attr)) {
11395 ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
11396 } else {
11397 ret = -1;
11398 }
11399 if (unlikely(ret < 0)) {
11400 PyErr_Clear();
11401 ret = 0;
11402 }
11403 Py_XDECREF(name_attr);
11404 return ret;
11405 }
__Pyx_setup_reduce(PyObject * type_obj)11406 static int __Pyx_setup_reduce(PyObject* type_obj) {
11407 int ret = 0;
11408 PyObject *object_reduce = NULL;
11409 PyObject *object_reduce_ex = NULL;
11410 PyObject *reduce = NULL;
11411 PyObject *reduce_ex = NULL;
11412 PyObject *reduce_cython = NULL;
11413 PyObject *setstate = NULL;
11414 PyObject *setstate_cython = NULL;
11415 #if CYTHON_USE_PYTYPE_LOOKUP
11416 if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
11417 #else
11418 if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
11419 #endif
11420 #if CYTHON_USE_PYTYPE_LOOKUP
11421 object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
11422 #else
11423 object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
11424 #endif
11425 reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
11426 if (reduce_ex == object_reduce_ex) {
11427 #if CYTHON_USE_PYTYPE_LOOKUP
11428 object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
11429 #else
11430 object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
11431 #endif
11432 reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
11433 if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
11434 reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
11435 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
11436 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
11437 setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
11438 if (!setstate) PyErr_Clear();
11439 if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
11440 setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
11441 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
11442 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
11443 }
11444 PyType_Modified((PyTypeObject*)type_obj);
11445 }
11446 }
11447 goto GOOD;
11448 BAD:
11449 if (!PyErr_Occurred())
11450 PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
11451 ret = -1;
11452 GOOD:
11453 #if !CYTHON_USE_PYTYPE_LOOKUP
11454 Py_XDECREF(object_reduce);
11455 Py_XDECREF(object_reduce_ex);
11456 #endif
11457 Py_XDECREF(reduce);
11458 Py_XDECREF(reduce_ex);
11459 Py_XDECREF(reduce_cython);
11460 Py_XDECREF(setstate);
11461 Py_XDECREF(setstate_cython);
11462 return ret;
11463 }
11464
11465 /* GetVTable */
__Pyx_GetVtable(PyObject * dict)11466 static void* __Pyx_GetVtable(PyObject *dict) {
11467 void* ptr;
11468 PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
11469 if (!ob)
11470 goto bad;
11471 #if PY_VERSION_HEX >= 0x02070000
11472 ptr = PyCapsule_GetPointer(ob, 0);
11473 #else
11474 ptr = PyCObject_AsVoidPtr(ob);
11475 #endif
11476 if (!ptr && !PyErr_Occurred())
11477 PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
11478 Py_DECREF(ob);
11479 return ptr;
11480 bad:
11481 Py_XDECREF(ob);
11482 return NULL;
11483 }
11484
11485 /* CLineInTraceback */
11486 #ifndef CYTHON_CLINE_IN_TRACEBACK
__Pyx_CLineForTraceback(PyThreadState * tstate,int c_line)11487 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
11488 PyObject *use_cline;
11489 PyObject *ptype, *pvalue, *ptraceback;
11490 #if CYTHON_COMPILING_IN_CPYTHON
11491 PyObject **cython_runtime_dict;
11492 #endif
11493 if (unlikely(!__pyx_cython_runtime)) {
11494 return c_line;
11495 }
11496 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
11497 #if CYTHON_COMPILING_IN_CPYTHON
11498 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
11499 if (likely(cython_runtime_dict)) {
11500 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
11501 use_cline, *cython_runtime_dict,
11502 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
11503 } else
11504 #endif
11505 {
11506 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
11507 if (use_cline_obj) {
11508 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
11509 Py_DECREF(use_cline_obj);
11510 } else {
11511 PyErr_Clear();
11512 use_cline = NULL;
11513 }
11514 }
11515 if (!use_cline) {
11516 c_line = 0;
11517 PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
11518 }
11519 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
11520 c_line = 0;
11521 }
11522 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
11523 return c_line;
11524 }
11525 #endif
11526
11527 /* CodeObjectCache */
__pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry * entries,int count,int code_line)11528 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
11529 int start = 0, mid = 0, end = count - 1;
11530 if (end >= 0 && code_line > entries[end].code_line) {
11531 return count;
11532 }
11533 while (start < end) {
11534 mid = start + (end - start) / 2;
11535 if (code_line < entries[mid].code_line) {
11536 end = mid;
11537 } else if (code_line > entries[mid].code_line) {
11538 start = mid + 1;
11539 } else {
11540 return mid;
11541 }
11542 }
11543 if (code_line <= entries[mid].code_line) {
11544 return mid;
11545 } else {
11546 return mid + 1;
11547 }
11548 }
__pyx_find_code_object(int code_line)11549 static PyCodeObject *__pyx_find_code_object(int code_line) {
11550 PyCodeObject* code_object;
11551 int pos;
11552 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
11553 return NULL;
11554 }
11555 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
11556 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
11557 return NULL;
11558 }
11559 code_object = __pyx_code_cache.entries[pos].code_object;
11560 Py_INCREF(code_object);
11561 return code_object;
11562 }
__pyx_insert_code_object(int code_line,PyCodeObject * code_object)11563 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
11564 int pos, i;
11565 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
11566 if (unlikely(!code_line)) {
11567 return;
11568 }
11569 if (unlikely(!entries)) {
11570 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
11571 if (likely(entries)) {
11572 __pyx_code_cache.entries = entries;
11573 __pyx_code_cache.max_count = 64;
11574 __pyx_code_cache.count = 1;
11575 entries[0].code_line = code_line;
11576 entries[0].code_object = code_object;
11577 Py_INCREF(code_object);
11578 }
11579 return;
11580 }
11581 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
11582 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
11583 PyCodeObject* tmp = entries[pos].code_object;
11584 entries[pos].code_object = code_object;
11585 Py_DECREF(tmp);
11586 return;
11587 }
11588 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
11589 int new_max = __pyx_code_cache.max_count + 64;
11590 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
11591 __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
11592 if (unlikely(!entries)) {
11593 return;
11594 }
11595 __pyx_code_cache.entries = entries;
11596 __pyx_code_cache.max_count = new_max;
11597 }
11598 for (i=__pyx_code_cache.count; i>pos; i--) {
11599 entries[i] = entries[i-1];
11600 }
11601 entries[pos].code_line = code_line;
11602 entries[pos].code_object = code_object;
11603 __pyx_code_cache.count++;
11604 Py_INCREF(code_object);
11605 }
11606
11607 /* AddTraceback */
11608 #include "compile.h"
11609 #include "frameobject.h"
11610 #include "traceback.h"
__Pyx_CreateCodeObjectForTraceback(const char * funcname,int c_line,int py_line,const char * filename)11611 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
11612 const char *funcname, int c_line,
11613 int py_line, const char *filename) {
11614 PyCodeObject *py_code = 0;
11615 PyObject *py_srcfile = 0;
11616 PyObject *py_funcname = 0;
11617 #if PY_MAJOR_VERSION < 3
11618 py_srcfile = PyString_FromString(filename);
11619 #else
11620 py_srcfile = PyUnicode_FromString(filename);
11621 #endif
11622 if (!py_srcfile) goto bad;
11623 if (c_line) {
11624 #if PY_MAJOR_VERSION < 3
11625 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
11626 #else
11627 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
11628 #endif
11629 }
11630 else {
11631 #if PY_MAJOR_VERSION < 3
11632 py_funcname = PyString_FromString(funcname);
11633 #else
11634 py_funcname = PyUnicode_FromString(funcname);
11635 #endif
11636 }
11637 if (!py_funcname) goto bad;
11638 py_code = __Pyx_PyCode_New(
11639 0,
11640 0,
11641 0,
11642 0,
11643 0,
11644 __pyx_empty_bytes, /*PyObject *code,*/
11645 __pyx_empty_tuple, /*PyObject *consts,*/
11646 __pyx_empty_tuple, /*PyObject *names,*/
11647 __pyx_empty_tuple, /*PyObject *varnames,*/
11648 __pyx_empty_tuple, /*PyObject *freevars,*/
11649 __pyx_empty_tuple, /*PyObject *cellvars,*/
11650 py_srcfile, /*PyObject *filename,*/
11651 py_funcname, /*PyObject *name,*/
11652 py_line,
11653 __pyx_empty_bytes /*PyObject *lnotab*/
11654 );
11655 Py_DECREF(py_srcfile);
11656 Py_DECREF(py_funcname);
11657 return py_code;
11658 bad:
11659 Py_XDECREF(py_srcfile);
11660 Py_XDECREF(py_funcname);
11661 return NULL;
11662 }
__Pyx_AddTraceback(const char * funcname,int c_line,int py_line,const char * filename)11663 static void __Pyx_AddTraceback(const char *funcname, int c_line,
11664 int py_line, const char *filename) {
11665 PyCodeObject *py_code = 0;
11666 PyFrameObject *py_frame = 0;
11667 PyThreadState *tstate = __Pyx_PyThreadState_Current;
11668 if (c_line) {
11669 c_line = __Pyx_CLineForTraceback(tstate, c_line);
11670 }
11671 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
11672 if (!py_code) {
11673 py_code = __Pyx_CreateCodeObjectForTraceback(
11674 funcname, c_line, py_line, filename);
11675 if (!py_code) goto bad;
11676 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
11677 }
11678 py_frame = PyFrame_New(
11679 tstate, /*PyThreadState *tstate,*/
11680 py_code, /*PyCodeObject *code,*/
11681 __pyx_d, /*PyObject *globals,*/
11682 0 /*PyObject *locals*/
11683 );
11684 if (!py_frame) goto bad;
11685 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
11686 PyTraceBack_Here(py_frame);
11687 bad:
11688 Py_XDECREF(py_code);
11689 Py_XDECREF(py_frame);
11690 }
11691
11692 /* CIntToPy */
__Pyx_PyInt_From_hid_t(hid_t value)11693 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_hid_t(hid_t value) {
11694 const hid_t neg_one = (hid_t) ((hid_t) 0 - (hid_t) 1), const_zero = (hid_t) 0;
11695 const int is_unsigned = neg_one > const_zero;
11696 if (is_unsigned) {
11697 if (sizeof(hid_t) < sizeof(long)) {
11698 return PyInt_FromLong((long) value);
11699 } else if (sizeof(hid_t) <= sizeof(unsigned long)) {
11700 return PyLong_FromUnsignedLong((unsigned long) value);
11701 #ifdef HAVE_LONG_LONG
11702 } else if (sizeof(hid_t) <= sizeof(unsigned PY_LONG_LONG)) {
11703 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
11704 #endif
11705 }
11706 } else {
11707 if (sizeof(hid_t) <= sizeof(long)) {
11708 return PyInt_FromLong((long) value);
11709 #ifdef HAVE_LONG_LONG
11710 } else if (sizeof(hid_t) <= sizeof(PY_LONG_LONG)) {
11711 return PyLong_FromLongLong((PY_LONG_LONG) value);
11712 #endif
11713 }
11714 }
11715 {
11716 int one = 1; int little = (int)*(unsigned char *)&one;
11717 unsigned char *bytes = (unsigned char *)&value;
11718 return _PyLong_FromByteArray(bytes, sizeof(hid_t),
11719 little, !is_unsigned);
11720 }
11721 }
11722
11723 /* CIntFromPyVerify */
11724 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
11725 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
11726 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
11727 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
11728 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
11729 {\
11730 func_type value = func_value;\
11731 if (sizeof(target_type) < sizeof(func_type)) {\
11732 if (unlikely(value != (func_type) (target_type) value)) {\
11733 func_type zero = 0;\
11734 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
11735 return (target_type) -1;\
11736 if (is_unsigned && unlikely(value < zero))\
11737 goto raise_neg_overflow;\
11738 else\
11739 goto raise_overflow;\
11740 }\
11741 }\
11742 return (target_type) value;\
11743 }
11744
11745 /* CIntToPy */
__Pyx_PyInt_From_long(long value)11746 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
11747 const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
11748 const int is_unsigned = neg_one > const_zero;
11749 if (is_unsigned) {
11750 if (sizeof(long) < sizeof(long)) {
11751 return PyInt_FromLong((long) value);
11752 } else if (sizeof(long) <= sizeof(unsigned long)) {
11753 return PyLong_FromUnsignedLong((unsigned long) value);
11754 #ifdef HAVE_LONG_LONG
11755 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
11756 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
11757 #endif
11758 }
11759 } else {
11760 if (sizeof(long) <= sizeof(long)) {
11761 return PyInt_FromLong((long) value);
11762 #ifdef HAVE_LONG_LONG
11763 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
11764 return PyLong_FromLongLong((PY_LONG_LONG) value);
11765 #endif
11766 }
11767 }
11768 {
11769 int one = 1; int little = (int)*(unsigned char *)&one;
11770 unsigned char *bytes = (unsigned char *)&value;
11771 return _PyLong_FromByteArray(bytes, sizeof(long),
11772 little, !is_unsigned);
11773 }
11774 }
11775
11776 /* Declarations */
11777 #if CYTHON_CCOMPLEX
11778 #ifdef __cplusplus
__pyx_t_float_complex_from_parts(float x,float y)11779 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
11780 return ::std::complex< float >(x, y);
11781 }
11782 #else
__pyx_t_float_complex_from_parts(float x,float y)11783 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
11784 return x + y*(__pyx_t_float_complex)_Complex_I;
11785 }
11786 #endif
11787 #else
__pyx_t_float_complex_from_parts(float x,float y)11788 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
11789 __pyx_t_float_complex z;
11790 z.real = x;
11791 z.imag = y;
11792 return z;
11793 }
11794 #endif
11795
11796 /* Arithmetic */
11797 #if CYTHON_CCOMPLEX
11798 #else
__Pyx_c_eq_float(__pyx_t_float_complex a,__pyx_t_float_complex b)11799 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
11800 return (a.real == b.real) && (a.imag == b.imag);
11801 }
__Pyx_c_sum_float(__pyx_t_float_complex a,__pyx_t_float_complex b)11802 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
11803 __pyx_t_float_complex z;
11804 z.real = a.real + b.real;
11805 z.imag = a.imag + b.imag;
11806 return z;
11807 }
__Pyx_c_diff_float(__pyx_t_float_complex a,__pyx_t_float_complex b)11808 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
11809 __pyx_t_float_complex z;
11810 z.real = a.real - b.real;
11811 z.imag = a.imag - b.imag;
11812 return z;
11813 }
__Pyx_c_prod_float(__pyx_t_float_complex a,__pyx_t_float_complex b)11814 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
11815 __pyx_t_float_complex z;
11816 z.real = a.real * b.real - a.imag * b.imag;
11817 z.imag = a.real * b.imag + a.imag * b.real;
11818 return z;
11819 }
11820 #if 1
__Pyx_c_quot_float(__pyx_t_float_complex a,__pyx_t_float_complex b)11821 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
11822 if (b.imag == 0) {
11823 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
11824 } else if (fabsf(b.real) >= fabsf(b.imag)) {
11825 if (b.real == 0 && b.imag == 0) {
11826 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
11827 } else {
11828 float r = b.imag / b.real;
11829 float s = (float)(1.0) / (b.real + b.imag * r);
11830 return __pyx_t_float_complex_from_parts(
11831 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
11832 }
11833 } else {
11834 float r = b.real / b.imag;
11835 float s = (float)(1.0) / (b.imag + b.real * r);
11836 return __pyx_t_float_complex_from_parts(
11837 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
11838 }
11839 }
11840 #else
__Pyx_c_quot_float(__pyx_t_float_complex a,__pyx_t_float_complex b)11841 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
11842 if (b.imag == 0) {
11843 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
11844 } else {
11845 float denom = b.real * b.real + b.imag * b.imag;
11846 return __pyx_t_float_complex_from_parts(
11847 (a.real * b.real + a.imag * b.imag) / denom,
11848 (a.imag * b.real - a.real * b.imag) / denom);
11849 }
11850 }
11851 #endif
__Pyx_c_neg_float(__pyx_t_float_complex a)11852 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
11853 __pyx_t_float_complex z;
11854 z.real = -a.real;
11855 z.imag = -a.imag;
11856 return z;
11857 }
__Pyx_c_is_zero_float(__pyx_t_float_complex a)11858 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
11859 return (a.real == 0) && (a.imag == 0);
11860 }
__Pyx_c_conj_float(__pyx_t_float_complex a)11861 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
11862 __pyx_t_float_complex z;
11863 z.real = a.real;
11864 z.imag = -a.imag;
11865 return z;
11866 }
11867 #if 1
__Pyx_c_abs_float(__pyx_t_float_complex z)11868 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
11869 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
11870 return sqrtf(z.real*z.real + z.imag*z.imag);
11871 #else
11872 return hypotf(z.real, z.imag);
11873 #endif
11874 }
__Pyx_c_pow_float(__pyx_t_float_complex a,__pyx_t_float_complex b)11875 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
11876 __pyx_t_float_complex z;
11877 float r, lnr, theta, z_r, z_theta;
11878 if (b.imag == 0 && b.real == (int)b.real) {
11879 if (b.real < 0) {
11880 float denom = a.real * a.real + a.imag * a.imag;
11881 a.real = a.real / denom;
11882 a.imag = -a.imag / denom;
11883 b.real = -b.real;
11884 }
11885 switch ((int)b.real) {
11886 case 0:
11887 z.real = 1;
11888 z.imag = 0;
11889 return z;
11890 case 1:
11891 return a;
11892 case 2:
11893 z = __Pyx_c_prod_float(a, a);
11894 return __Pyx_c_prod_float(a, a);
11895 case 3:
11896 z = __Pyx_c_prod_float(a, a);
11897 return __Pyx_c_prod_float(z, a);
11898 case 4:
11899 z = __Pyx_c_prod_float(a, a);
11900 return __Pyx_c_prod_float(z, z);
11901 }
11902 }
11903 if (a.imag == 0) {
11904 if (a.real == 0) {
11905 return a;
11906 } else if (b.imag == 0) {
11907 z.real = powf(a.real, b.real);
11908 z.imag = 0;
11909 return z;
11910 } else if (a.real > 0) {
11911 r = a.real;
11912 theta = 0;
11913 } else {
11914 r = -a.real;
11915 theta = atan2f(0.0, -1.0);
11916 }
11917 } else {
11918 r = __Pyx_c_abs_float(a);
11919 theta = atan2f(a.imag, a.real);
11920 }
11921 lnr = logf(r);
11922 z_r = expf(lnr * b.real - theta * b.imag);
11923 z_theta = theta * b.real + lnr * b.imag;
11924 z.real = z_r * cosf(z_theta);
11925 z.imag = z_r * sinf(z_theta);
11926 return z;
11927 }
11928 #endif
11929 #endif
11930
11931 /* Declarations */
11932 #if CYTHON_CCOMPLEX
11933 #ifdef __cplusplus
__pyx_t_double_complex_from_parts(double x,double y)11934 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
11935 return ::std::complex< double >(x, y);
11936 }
11937 #else
__pyx_t_double_complex_from_parts(double x,double y)11938 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
11939 return x + y*(__pyx_t_double_complex)_Complex_I;
11940 }
11941 #endif
11942 #else
__pyx_t_double_complex_from_parts(double x,double y)11943 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
11944 __pyx_t_double_complex z;
11945 z.real = x;
11946 z.imag = y;
11947 return z;
11948 }
11949 #endif
11950
11951 /* Arithmetic */
11952 #if CYTHON_CCOMPLEX
11953 #else
__Pyx_c_eq_double(__pyx_t_double_complex a,__pyx_t_double_complex b)11954 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
11955 return (a.real == b.real) && (a.imag == b.imag);
11956 }
__Pyx_c_sum_double(__pyx_t_double_complex a,__pyx_t_double_complex b)11957 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
11958 __pyx_t_double_complex z;
11959 z.real = a.real + b.real;
11960 z.imag = a.imag + b.imag;
11961 return z;
11962 }
__Pyx_c_diff_double(__pyx_t_double_complex a,__pyx_t_double_complex b)11963 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
11964 __pyx_t_double_complex z;
11965 z.real = a.real - b.real;
11966 z.imag = a.imag - b.imag;
11967 return z;
11968 }
__Pyx_c_prod_double(__pyx_t_double_complex a,__pyx_t_double_complex b)11969 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
11970 __pyx_t_double_complex z;
11971 z.real = a.real * b.real - a.imag * b.imag;
11972 z.imag = a.real * b.imag + a.imag * b.real;
11973 return z;
11974 }
11975 #if 1
__Pyx_c_quot_double(__pyx_t_double_complex a,__pyx_t_double_complex b)11976 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
11977 if (b.imag == 0) {
11978 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
11979 } else if (fabs(b.real) >= fabs(b.imag)) {
11980 if (b.real == 0 && b.imag == 0) {
11981 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
11982 } else {
11983 double r = b.imag / b.real;
11984 double s = (double)(1.0) / (b.real + b.imag * r);
11985 return __pyx_t_double_complex_from_parts(
11986 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
11987 }
11988 } else {
11989 double r = b.real / b.imag;
11990 double s = (double)(1.0) / (b.imag + b.real * r);
11991 return __pyx_t_double_complex_from_parts(
11992 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
11993 }
11994 }
11995 #else
__Pyx_c_quot_double(__pyx_t_double_complex a,__pyx_t_double_complex b)11996 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
11997 if (b.imag == 0) {
11998 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
11999 } else {
12000 double denom = b.real * b.real + b.imag * b.imag;
12001 return __pyx_t_double_complex_from_parts(
12002 (a.real * b.real + a.imag * b.imag) / denom,
12003 (a.imag * b.real - a.real * b.imag) / denom);
12004 }
12005 }
12006 #endif
__Pyx_c_neg_double(__pyx_t_double_complex a)12007 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
12008 __pyx_t_double_complex z;
12009 z.real = -a.real;
12010 z.imag = -a.imag;
12011 return z;
12012 }
__Pyx_c_is_zero_double(__pyx_t_double_complex a)12013 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
12014 return (a.real == 0) && (a.imag == 0);
12015 }
__Pyx_c_conj_double(__pyx_t_double_complex a)12016 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
12017 __pyx_t_double_complex z;
12018 z.real = a.real;
12019 z.imag = -a.imag;
12020 return z;
12021 }
12022 #if 1
__Pyx_c_abs_double(__pyx_t_double_complex z)12023 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
12024 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
12025 return sqrt(z.real*z.real + z.imag*z.imag);
12026 #else
12027 return hypot(z.real, z.imag);
12028 #endif
12029 }
__Pyx_c_pow_double(__pyx_t_double_complex a,__pyx_t_double_complex b)12030 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12031 __pyx_t_double_complex z;
12032 double r, lnr, theta, z_r, z_theta;
12033 if (b.imag == 0 && b.real == (int)b.real) {
12034 if (b.real < 0) {
12035 double denom = a.real * a.real + a.imag * a.imag;
12036 a.real = a.real / denom;
12037 a.imag = -a.imag / denom;
12038 b.real = -b.real;
12039 }
12040 switch ((int)b.real) {
12041 case 0:
12042 z.real = 1;
12043 z.imag = 0;
12044 return z;
12045 case 1:
12046 return a;
12047 case 2:
12048 z = __Pyx_c_prod_double(a, a);
12049 return __Pyx_c_prod_double(a, a);
12050 case 3:
12051 z = __Pyx_c_prod_double(a, a);
12052 return __Pyx_c_prod_double(z, a);
12053 case 4:
12054 z = __Pyx_c_prod_double(a, a);
12055 return __Pyx_c_prod_double(z, z);
12056 }
12057 }
12058 if (a.imag == 0) {
12059 if (a.real == 0) {
12060 return a;
12061 } else if (b.imag == 0) {
12062 z.real = pow(a.real, b.real);
12063 z.imag = 0;
12064 return z;
12065 } else if (a.real > 0) {
12066 r = a.real;
12067 theta = 0;
12068 } else {
12069 r = -a.real;
12070 theta = atan2(0.0, -1.0);
12071 }
12072 } else {
12073 r = __Pyx_c_abs_double(a);
12074 theta = atan2(a.imag, a.real);
12075 }
12076 lnr = log(r);
12077 z_r = exp(lnr * b.real - theta * b.imag);
12078 z_theta = theta * b.real + lnr * b.imag;
12079 z.real = z_r * cos(z_theta);
12080 z.imag = z_r * sin(z_theta);
12081 return z;
12082 }
12083 #endif
12084 #endif
12085
12086 /* CIntToPy */
__Pyx_PyInt_From_int(int value)12087 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
12088 const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
12089 const int is_unsigned = neg_one > const_zero;
12090 if (is_unsigned) {
12091 if (sizeof(int) < sizeof(long)) {
12092 return PyInt_FromLong((long) value);
12093 } else if (sizeof(int) <= sizeof(unsigned long)) {
12094 return PyLong_FromUnsignedLong((unsigned long) value);
12095 #ifdef HAVE_LONG_LONG
12096 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
12097 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
12098 #endif
12099 }
12100 } else {
12101 if (sizeof(int) <= sizeof(long)) {
12102 return PyInt_FromLong((long) value);
12103 #ifdef HAVE_LONG_LONG
12104 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
12105 return PyLong_FromLongLong((PY_LONG_LONG) value);
12106 #endif
12107 }
12108 }
12109 {
12110 int one = 1; int little = (int)*(unsigned char *)&one;
12111 unsigned char *bytes = (unsigned char *)&value;
12112 return _PyLong_FromByteArray(bytes, sizeof(int),
12113 little, !is_unsigned);
12114 }
12115 }
12116
12117 /* CIntToPy */
__Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value)12118 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
12119 const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0;
12120 const int is_unsigned = neg_one > const_zero;
12121 if (is_unsigned) {
12122 if (sizeof(enum NPY_TYPES) < sizeof(long)) {
12123 return PyInt_FromLong((long) value);
12124 } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
12125 return PyLong_FromUnsignedLong((unsigned long) value);
12126 #ifdef HAVE_LONG_LONG
12127 } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
12128 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
12129 #endif
12130 }
12131 } else {
12132 if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
12133 return PyInt_FromLong((long) value);
12134 #ifdef HAVE_LONG_LONG
12135 } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
12136 return PyLong_FromLongLong((PY_LONG_LONG) value);
12137 #endif
12138 }
12139 }
12140 {
12141 int one = 1; int little = (int)*(unsigned char *)&one;
12142 unsigned char *bytes = (unsigned char *)&value;
12143 return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
12144 little, !is_unsigned);
12145 }
12146 }
12147
12148 /* CIntFromPy */
__Pyx_PyInt_As_hid_t(PyObject * x)12149 static CYTHON_INLINE hid_t __Pyx_PyInt_As_hid_t(PyObject *x) {
12150 const hid_t neg_one = (hid_t) ((hid_t) 0 - (hid_t) 1), const_zero = (hid_t) 0;
12151 const int is_unsigned = neg_one > const_zero;
12152 #if PY_MAJOR_VERSION < 3
12153 if (likely(PyInt_Check(x))) {
12154 if (sizeof(hid_t) < sizeof(long)) {
12155 __PYX_VERIFY_RETURN_INT(hid_t, long, PyInt_AS_LONG(x))
12156 } else {
12157 long val = PyInt_AS_LONG(x);
12158 if (is_unsigned && unlikely(val < 0)) {
12159 goto raise_neg_overflow;
12160 }
12161 return (hid_t) val;
12162 }
12163 } else
12164 #endif
12165 if (likely(PyLong_Check(x))) {
12166 if (is_unsigned) {
12167 #if CYTHON_USE_PYLONG_INTERNALS
12168 const digit* digits = ((PyLongObject*)x)->ob_digit;
12169 switch (Py_SIZE(x)) {
12170 case 0: return (hid_t) 0;
12171 case 1: __PYX_VERIFY_RETURN_INT(hid_t, digit, digits[0])
12172 case 2:
12173 if (8 * sizeof(hid_t) > 1 * PyLong_SHIFT) {
12174 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
12175 __PYX_VERIFY_RETURN_INT(hid_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12176 } else if (8 * sizeof(hid_t) >= 2 * PyLong_SHIFT) {
12177 return (hid_t) (((((hid_t)digits[1]) << PyLong_SHIFT) | (hid_t)digits[0]));
12178 }
12179 }
12180 break;
12181 case 3:
12182 if (8 * sizeof(hid_t) > 2 * PyLong_SHIFT) {
12183 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
12184 __PYX_VERIFY_RETURN_INT(hid_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12185 } else if (8 * sizeof(hid_t) >= 3 * PyLong_SHIFT) {
12186 return (hid_t) (((((((hid_t)digits[2]) << PyLong_SHIFT) | (hid_t)digits[1]) << PyLong_SHIFT) | (hid_t)digits[0]));
12187 }
12188 }
12189 break;
12190 case 4:
12191 if (8 * sizeof(hid_t) > 3 * PyLong_SHIFT) {
12192 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
12193 __PYX_VERIFY_RETURN_INT(hid_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])))
12194 } else if (8 * sizeof(hid_t) >= 4 * PyLong_SHIFT) {
12195 return (hid_t) (((((((((hid_t)digits[3]) << PyLong_SHIFT) | (hid_t)digits[2]) << PyLong_SHIFT) | (hid_t)digits[1]) << PyLong_SHIFT) | (hid_t)digits[0]));
12196 }
12197 }
12198 break;
12199 }
12200 #endif
12201 #if CYTHON_COMPILING_IN_CPYTHON
12202 if (unlikely(Py_SIZE(x) < 0)) {
12203 goto raise_neg_overflow;
12204 }
12205 #else
12206 {
12207 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
12208 if (unlikely(result < 0))
12209 return (hid_t) -1;
12210 if (unlikely(result == 1))
12211 goto raise_neg_overflow;
12212 }
12213 #endif
12214 if (sizeof(hid_t) <= sizeof(unsigned long)) {
12215 __PYX_VERIFY_RETURN_INT_EXC(hid_t, unsigned long, PyLong_AsUnsignedLong(x))
12216 #ifdef HAVE_LONG_LONG
12217 } else if (sizeof(hid_t) <= sizeof(unsigned PY_LONG_LONG)) {
12218 __PYX_VERIFY_RETURN_INT_EXC(hid_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
12219 #endif
12220 }
12221 } else {
12222 #if CYTHON_USE_PYLONG_INTERNALS
12223 const digit* digits = ((PyLongObject*)x)->ob_digit;
12224 switch (Py_SIZE(x)) {
12225 case 0: return (hid_t) 0;
12226 case -1: __PYX_VERIFY_RETURN_INT(hid_t, sdigit, (sdigit) (-(sdigit)digits[0]))
12227 case 1: __PYX_VERIFY_RETURN_INT(hid_t, digit, +digits[0])
12228 case -2:
12229 if (8 * sizeof(hid_t) - 1 > 1 * PyLong_SHIFT) {
12230 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
12231 __PYX_VERIFY_RETURN_INT(hid_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12232 } else if (8 * sizeof(hid_t) - 1 > 2 * PyLong_SHIFT) {
12233 return (hid_t) (((hid_t)-1)*(((((hid_t)digits[1]) << PyLong_SHIFT) | (hid_t)digits[0])));
12234 }
12235 }
12236 break;
12237 case 2:
12238 if (8 * sizeof(hid_t) > 1 * PyLong_SHIFT) {
12239 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
12240 __PYX_VERIFY_RETURN_INT(hid_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12241 } else if (8 * sizeof(hid_t) - 1 > 2 * PyLong_SHIFT) {
12242 return (hid_t) ((((((hid_t)digits[1]) << PyLong_SHIFT) | (hid_t)digits[0])));
12243 }
12244 }
12245 break;
12246 case -3:
12247 if (8 * sizeof(hid_t) - 1 > 2 * PyLong_SHIFT) {
12248 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
12249 __PYX_VERIFY_RETURN_INT(hid_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12250 } else if (8 * sizeof(hid_t) - 1 > 3 * PyLong_SHIFT) {
12251 return (hid_t) (((hid_t)-1)*(((((((hid_t)digits[2]) << PyLong_SHIFT) | (hid_t)digits[1]) << PyLong_SHIFT) | (hid_t)digits[0])));
12252 }
12253 }
12254 break;
12255 case 3:
12256 if (8 * sizeof(hid_t) > 2 * PyLong_SHIFT) {
12257 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
12258 __PYX_VERIFY_RETURN_INT(hid_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12259 } else if (8 * sizeof(hid_t) - 1 > 3 * PyLong_SHIFT) {
12260 return (hid_t) ((((((((hid_t)digits[2]) << PyLong_SHIFT) | (hid_t)digits[1]) << PyLong_SHIFT) | (hid_t)digits[0])));
12261 }
12262 }
12263 break;
12264 case -4:
12265 if (8 * sizeof(hid_t) - 1 > 3 * PyLong_SHIFT) {
12266 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
12267 __PYX_VERIFY_RETURN_INT(hid_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])))
12268 } else if (8 * sizeof(hid_t) - 1 > 4 * PyLong_SHIFT) {
12269 return (hid_t) (((hid_t)-1)*(((((((((hid_t)digits[3]) << PyLong_SHIFT) | (hid_t)digits[2]) << PyLong_SHIFT) | (hid_t)digits[1]) << PyLong_SHIFT) | (hid_t)digits[0])));
12270 }
12271 }
12272 break;
12273 case 4:
12274 if (8 * sizeof(hid_t) > 3 * PyLong_SHIFT) {
12275 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
12276 __PYX_VERIFY_RETURN_INT(hid_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])))
12277 } else if (8 * sizeof(hid_t) - 1 > 4 * PyLong_SHIFT) {
12278 return (hid_t) ((((((((((hid_t)digits[3]) << PyLong_SHIFT) | (hid_t)digits[2]) << PyLong_SHIFT) | (hid_t)digits[1]) << PyLong_SHIFT) | (hid_t)digits[0])));
12279 }
12280 }
12281 break;
12282 }
12283 #endif
12284 if (sizeof(hid_t) <= sizeof(long)) {
12285 __PYX_VERIFY_RETURN_INT_EXC(hid_t, long, PyLong_AsLong(x))
12286 #ifdef HAVE_LONG_LONG
12287 } else if (sizeof(hid_t) <= sizeof(PY_LONG_LONG)) {
12288 __PYX_VERIFY_RETURN_INT_EXC(hid_t, PY_LONG_LONG, PyLong_AsLongLong(x))
12289 #endif
12290 }
12291 }
12292 {
12293 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
12294 PyErr_SetString(PyExc_RuntimeError,
12295 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
12296 #else
12297 hid_t val;
12298 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
12299 #if PY_MAJOR_VERSION < 3
12300 if (likely(v) && !PyLong_Check(v)) {
12301 PyObject *tmp = v;
12302 v = PyNumber_Long(tmp);
12303 Py_DECREF(tmp);
12304 }
12305 #endif
12306 if (likely(v)) {
12307 int one = 1; int is_little = (int)*(unsigned char *)&one;
12308 unsigned char *bytes = (unsigned char *)&val;
12309 int ret = _PyLong_AsByteArray((PyLongObject *)v,
12310 bytes, sizeof(val),
12311 is_little, !is_unsigned);
12312 Py_DECREF(v);
12313 if (likely(!ret))
12314 return val;
12315 }
12316 #endif
12317 return (hid_t) -1;
12318 }
12319 } else {
12320 hid_t val;
12321 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
12322 if (!tmp) return (hid_t) -1;
12323 val = __Pyx_PyInt_As_hid_t(tmp);
12324 Py_DECREF(tmp);
12325 return val;
12326 }
12327 raise_overflow:
12328 PyErr_SetString(PyExc_OverflowError,
12329 "value too large to convert to hid_t");
12330 return (hid_t) -1;
12331 raise_neg_overflow:
12332 PyErr_SetString(PyExc_OverflowError,
12333 "can't convert negative value to hid_t");
12334 return (hid_t) -1;
12335 }
12336
12337 /* CIntFromPy */
__Pyx_PyInt_As_long(PyObject * x)12338 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
12339 const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
12340 const int is_unsigned = neg_one > const_zero;
12341 #if PY_MAJOR_VERSION < 3
12342 if (likely(PyInt_Check(x))) {
12343 if (sizeof(long) < sizeof(long)) {
12344 __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
12345 } else {
12346 long val = PyInt_AS_LONG(x);
12347 if (is_unsigned && unlikely(val < 0)) {
12348 goto raise_neg_overflow;
12349 }
12350 return (long) val;
12351 }
12352 } else
12353 #endif
12354 if (likely(PyLong_Check(x))) {
12355 if (is_unsigned) {
12356 #if CYTHON_USE_PYLONG_INTERNALS
12357 const digit* digits = ((PyLongObject*)x)->ob_digit;
12358 switch (Py_SIZE(x)) {
12359 case 0: return (long) 0;
12360 case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
12361 case 2:
12362 if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
12363 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
12364 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12365 } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
12366 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
12367 }
12368 }
12369 break;
12370 case 3:
12371 if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
12372 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
12373 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12374 } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
12375 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
12376 }
12377 }
12378 break;
12379 case 4:
12380 if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
12381 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
12382 __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])))
12383 } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
12384 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
12385 }
12386 }
12387 break;
12388 }
12389 #endif
12390 #if CYTHON_COMPILING_IN_CPYTHON
12391 if (unlikely(Py_SIZE(x) < 0)) {
12392 goto raise_neg_overflow;
12393 }
12394 #else
12395 {
12396 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
12397 if (unlikely(result < 0))
12398 return (long) -1;
12399 if (unlikely(result == 1))
12400 goto raise_neg_overflow;
12401 }
12402 #endif
12403 if (sizeof(long) <= sizeof(unsigned long)) {
12404 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
12405 #ifdef HAVE_LONG_LONG
12406 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
12407 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
12408 #endif
12409 }
12410 } else {
12411 #if CYTHON_USE_PYLONG_INTERNALS
12412 const digit* digits = ((PyLongObject*)x)->ob_digit;
12413 switch (Py_SIZE(x)) {
12414 case 0: return (long) 0;
12415 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
12416 case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
12417 case -2:
12418 if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
12419 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
12420 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12421 } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
12422 return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
12423 }
12424 }
12425 break;
12426 case 2:
12427 if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
12428 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
12429 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12430 } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
12431 return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
12432 }
12433 }
12434 break;
12435 case -3:
12436 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
12437 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
12438 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12439 } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
12440 return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
12441 }
12442 }
12443 break;
12444 case 3:
12445 if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
12446 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
12447 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12448 } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
12449 return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
12450 }
12451 }
12452 break;
12453 case -4:
12454 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
12455 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
12456 __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])))
12457 } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
12458 return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
12459 }
12460 }
12461 break;
12462 case 4:
12463 if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
12464 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
12465 __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])))
12466 } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
12467 return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
12468 }
12469 }
12470 break;
12471 }
12472 #endif
12473 if (sizeof(long) <= sizeof(long)) {
12474 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
12475 #ifdef HAVE_LONG_LONG
12476 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
12477 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
12478 #endif
12479 }
12480 }
12481 {
12482 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
12483 PyErr_SetString(PyExc_RuntimeError,
12484 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
12485 #else
12486 long val;
12487 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
12488 #if PY_MAJOR_VERSION < 3
12489 if (likely(v) && !PyLong_Check(v)) {
12490 PyObject *tmp = v;
12491 v = PyNumber_Long(tmp);
12492 Py_DECREF(tmp);
12493 }
12494 #endif
12495 if (likely(v)) {
12496 int one = 1; int is_little = (int)*(unsigned char *)&one;
12497 unsigned char *bytes = (unsigned char *)&val;
12498 int ret = _PyLong_AsByteArray((PyLongObject *)v,
12499 bytes, sizeof(val),
12500 is_little, !is_unsigned);
12501 Py_DECREF(v);
12502 if (likely(!ret))
12503 return val;
12504 }
12505 #endif
12506 return (long) -1;
12507 }
12508 } else {
12509 long val;
12510 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
12511 if (!tmp) return (long) -1;
12512 val = __Pyx_PyInt_As_long(tmp);
12513 Py_DECREF(tmp);
12514 return val;
12515 }
12516 raise_overflow:
12517 PyErr_SetString(PyExc_OverflowError,
12518 "value too large to convert to long");
12519 return (long) -1;
12520 raise_neg_overflow:
12521 PyErr_SetString(PyExc_OverflowError,
12522 "can't convert negative value to long");
12523 return (long) -1;
12524 }
12525
12526 /* CIntFromPy */
__Pyx_PyInt_As_int(PyObject * x)12527 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
12528 const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
12529 const int is_unsigned = neg_one > const_zero;
12530 #if PY_MAJOR_VERSION < 3
12531 if (likely(PyInt_Check(x))) {
12532 if (sizeof(int) < sizeof(long)) {
12533 __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
12534 } else {
12535 long val = PyInt_AS_LONG(x);
12536 if (is_unsigned && unlikely(val < 0)) {
12537 goto raise_neg_overflow;
12538 }
12539 return (int) val;
12540 }
12541 } else
12542 #endif
12543 if (likely(PyLong_Check(x))) {
12544 if (is_unsigned) {
12545 #if CYTHON_USE_PYLONG_INTERNALS
12546 const digit* digits = ((PyLongObject*)x)->ob_digit;
12547 switch (Py_SIZE(x)) {
12548 case 0: return (int) 0;
12549 case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
12550 case 2:
12551 if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
12552 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
12553 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12554 } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
12555 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
12556 }
12557 }
12558 break;
12559 case 3:
12560 if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
12561 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
12562 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12563 } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
12564 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
12565 }
12566 }
12567 break;
12568 case 4:
12569 if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
12570 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
12571 __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])))
12572 } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
12573 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
12574 }
12575 }
12576 break;
12577 }
12578 #endif
12579 #if CYTHON_COMPILING_IN_CPYTHON
12580 if (unlikely(Py_SIZE(x) < 0)) {
12581 goto raise_neg_overflow;
12582 }
12583 #else
12584 {
12585 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
12586 if (unlikely(result < 0))
12587 return (int) -1;
12588 if (unlikely(result == 1))
12589 goto raise_neg_overflow;
12590 }
12591 #endif
12592 if (sizeof(int) <= sizeof(unsigned long)) {
12593 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
12594 #ifdef HAVE_LONG_LONG
12595 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
12596 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
12597 #endif
12598 }
12599 } else {
12600 #if CYTHON_USE_PYLONG_INTERNALS
12601 const digit* digits = ((PyLongObject*)x)->ob_digit;
12602 switch (Py_SIZE(x)) {
12603 case 0: return (int) 0;
12604 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
12605 case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
12606 case -2:
12607 if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
12608 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
12609 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12610 } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
12611 return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
12612 }
12613 }
12614 break;
12615 case 2:
12616 if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
12617 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
12618 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12619 } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
12620 return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
12621 }
12622 }
12623 break;
12624 case -3:
12625 if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
12626 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
12627 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12628 } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
12629 return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
12630 }
12631 }
12632 break;
12633 case 3:
12634 if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
12635 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
12636 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12637 } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
12638 return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
12639 }
12640 }
12641 break;
12642 case -4:
12643 if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
12644 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
12645 __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])))
12646 } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
12647 return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
12648 }
12649 }
12650 break;
12651 case 4:
12652 if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
12653 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
12654 __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])))
12655 } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
12656 return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
12657 }
12658 }
12659 break;
12660 }
12661 #endif
12662 if (sizeof(int) <= sizeof(long)) {
12663 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
12664 #ifdef HAVE_LONG_LONG
12665 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
12666 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
12667 #endif
12668 }
12669 }
12670 {
12671 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
12672 PyErr_SetString(PyExc_RuntimeError,
12673 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
12674 #else
12675 int val;
12676 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
12677 #if PY_MAJOR_VERSION < 3
12678 if (likely(v) && !PyLong_Check(v)) {
12679 PyObject *tmp = v;
12680 v = PyNumber_Long(tmp);
12681 Py_DECREF(tmp);
12682 }
12683 #endif
12684 if (likely(v)) {
12685 int one = 1; int is_little = (int)*(unsigned char *)&one;
12686 unsigned char *bytes = (unsigned char *)&val;
12687 int ret = _PyLong_AsByteArray((PyLongObject *)v,
12688 bytes, sizeof(val),
12689 is_little, !is_unsigned);
12690 Py_DECREF(v);
12691 if (likely(!ret))
12692 return val;
12693 }
12694 #endif
12695 return (int) -1;
12696 }
12697 } else {
12698 int val;
12699 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
12700 if (!tmp) return (int) -1;
12701 val = __Pyx_PyInt_As_int(tmp);
12702 Py_DECREF(tmp);
12703 return val;
12704 }
12705 raise_overflow:
12706 PyErr_SetString(PyExc_OverflowError,
12707 "value too large to convert to int");
12708 return (int) -1;
12709 raise_neg_overflow:
12710 PyErr_SetString(PyExc_OverflowError,
12711 "can't convert negative value to int");
12712 return (int) -1;
12713 }
12714
12715 /* FastTypeChecks */
12716 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_InBases(PyTypeObject * a,PyTypeObject * b)12717 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
12718 while (a) {
12719 a = a->tp_base;
12720 if (a == b)
12721 return 1;
12722 }
12723 return b == &PyBaseObject_Type;
12724 }
__Pyx_IsSubtype(PyTypeObject * a,PyTypeObject * b)12725 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
12726 PyObject *mro;
12727 if (a == b) return 1;
12728 mro = a->tp_mro;
12729 if (likely(mro)) {
12730 Py_ssize_t i, n;
12731 n = PyTuple_GET_SIZE(mro);
12732 for (i = 0; i < n; i++) {
12733 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
12734 return 1;
12735 }
12736 return 0;
12737 }
12738 return __Pyx_InBases(a, b);
12739 }
12740 #if PY_MAJOR_VERSION == 2
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)12741 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
12742 PyObject *exception, *value, *tb;
12743 int res;
12744 __Pyx_PyThreadState_declare
12745 __Pyx_PyThreadState_assign
12746 __Pyx_ErrFetch(&exception, &value, &tb);
12747 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
12748 if (unlikely(res == -1)) {
12749 PyErr_WriteUnraisable(err);
12750 res = 0;
12751 }
12752 if (!res) {
12753 res = PyObject_IsSubclass(err, exc_type2);
12754 if (unlikely(res == -1)) {
12755 PyErr_WriteUnraisable(err);
12756 res = 0;
12757 }
12758 }
12759 __Pyx_ErrRestore(exception, value, tb);
12760 return res;
12761 }
12762 #else
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)12763 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
12764 int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
12765 if (!res) {
12766 res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
12767 }
12768 return res;
12769 }
12770 #endif
__Pyx_PyErr_GivenExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)12771 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
12772 Py_ssize_t i, n;
12773 assert(PyExceptionClass_Check(exc_type));
12774 n = PyTuple_GET_SIZE(tuple);
12775 #if PY_MAJOR_VERSION >= 3
12776 for (i=0; i<n; i++) {
12777 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
12778 }
12779 #endif
12780 for (i=0; i<n; i++) {
12781 PyObject *t = PyTuple_GET_ITEM(tuple, i);
12782 #if PY_MAJOR_VERSION < 3
12783 if (likely(exc_type == t)) return 1;
12784 #endif
12785 if (likely(PyExceptionClass_Check(t))) {
12786 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
12787 } else {
12788 }
12789 }
12790 return 0;
12791 }
__Pyx_PyErr_GivenExceptionMatches(PyObject * err,PyObject * exc_type)12792 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
12793 if (likely(err == exc_type)) return 1;
12794 if (likely(PyExceptionClass_Check(err))) {
12795 if (likely(PyExceptionClass_Check(exc_type))) {
12796 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
12797 } else if (likely(PyTuple_Check(exc_type))) {
12798 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
12799 } else {
12800 }
12801 }
12802 return PyErr_GivenExceptionMatches(err, exc_type);
12803 }
__Pyx_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)12804 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
12805 assert(PyExceptionClass_Check(exc_type1));
12806 assert(PyExceptionClass_Check(exc_type2));
12807 if (likely(err == exc_type1 || err == exc_type2)) return 1;
12808 if (likely(PyExceptionClass_Check(err))) {
12809 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
12810 }
12811 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
12812 }
12813 #endif
12814
12815 /* CheckBinaryVersion */
__Pyx_check_binary_version(void)12816 static int __Pyx_check_binary_version(void) {
12817 char ctversion[4], rtversion[4];
12818 PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
12819 PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
12820 if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
12821 char message[200];
12822 PyOS_snprintf(message, sizeof(message),
12823 "compiletime version %s of module '%.100s' "
12824 "does not match runtime version %s",
12825 ctversion, __Pyx_MODULE_NAME, rtversion);
12826 return PyErr_WarnEx(NULL, message, 1);
12827 }
12828 return 0;
12829 }
12830
12831 /* FunctionImport */
12832 #ifndef __PYX_HAVE_RT_ImportFunction
12833 #define __PYX_HAVE_RT_ImportFunction
__Pyx_ImportFunction(PyObject * module,const char * funcname,void (** f)(void),const char * sig)12834 static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
12835 PyObject *d = 0;
12836 PyObject *cobj = 0;
12837 union {
12838 void (*fp)(void);
12839 void *p;
12840 } tmp;
12841 d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
12842 if (!d)
12843 goto bad;
12844 cobj = PyDict_GetItemString(d, funcname);
12845 if (!cobj) {
12846 PyErr_Format(PyExc_ImportError,
12847 "%.200s does not export expected C function %.200s",
12848 PyModule_GetName(module), funcname);
12849 goto bad;
12850 }
12851 #if PY_VERSION_HEX >= 0x02070000
12852 if (!PyCapsule_IsValid(cobj, sig)) {
12853 PyErr_Format(PyExc_TypeError,
12854 "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
12855 PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
12856 goto bad;
12857 }
12858 tmp.p = PyCapsule_GetPointer(cobj, sig);
12859 #else
12860 {const char *desc, *s1, *s2;
12861 desc = (const char *)PyCObject_GetDesc(cobj);
12862 if (!desc)
12863 goto bad;
12864 s1 = desc; s2 = sig;
12865 while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
12866 if (*s1 != *s2) {
12867 PyErr_Format(PyExc_TypeError,
12868 "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
12869 PyModule_GetName(module), funcname, sig, desc);
12870 goto bad;
12871 }
12872 tmp.p = PyCObject_AsVoidPtr(cobj);}
12873 #endif
12874 *f = tmp.fp;
12875 if (!(*f))
12876 goto bad;
12877 Py_DECREF(d);
12878 return 0;
12879 bad:
12880 Py_XDECREF(d);
12881 return -1;
12882 }
12883 #endif
12884
12885 /* InitStrings */
__Pyx_InitStrings(__Pyx_StringTabEntry * t)12886 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
12887 while (t->p) {
12888 #if PY_MAJOR_VERSION < 3
12889 if (t->is_unicode) {
12890 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
12891 } else if (t->intern) {
12892 *t->p = PyString_InternFromString(t->s);
12893 } else {
12894 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
12895 }
12896 #else
12897 if (t->is_unicode | t->is_str) {
12898 if (t->intern) {
12899 *t->p = PyUnicode_InternFromString(t->s);
12900 } else if (t->encoding) {
12901 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
12902 } else {
12903 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
12904 }
12905 } else {
12906 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
12907 }
12908 #endif
12909 if (!*t->p)
12910 return -1;
12911 if (PyObject_Hash(*t->p) == -1)
12912 return -1;
12913 ++t;
12914 }
12915 return 0;
12916 }
12917
__Pyx_PyUnicode_FromString(const char * c_str)12918 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
12919 return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
12920 }
__Pyx_PyObject_AsString(PyObject * o)12921 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
12922 Py_ssize_t ignore;
12923 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
12924 }
12925 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
12926 #if !CYTHON_PEP393_ENABLED
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)12927 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
12928 char* defenc_c;
12929 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
12930 if (!defenc) return NULL;
12931 defenc_c = PyBytes_AS_STRING(defenc);
12932 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
12933 {
12934 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
12935 char* c;
12936 for (c = defenc_c; c < end; c++) {
12937 if ((unsigned char) (*c) >= 128) {
12938 PyUnicode_AsASCIIString(o);
12939 return NULL;
12940 }
12941 }
12942 }
12943 #endif
12944 *length = PyBytes_GET_SIZE(defenc);
12945 return defenc_c;
12946 }
12947 #else
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)12948 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
12949 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
12950 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
12951 if (likely(PyUnicode_IS_ASCII(o))) {
12952 *length = PyUnicode_GET_LENGTH(o);
12953 return PyUnicode_AsUTF8(o);
12954 } else {
12955 PyUnicode_AsASCIIString(o);
12956 return NULL;
12957 }
12958 #else
12959 return PyUnicode_AsUTF8AndSize(o, length);
12960 #endif
12961 }
12962 #endif
12963 #endif
__Pyx_PyObject_AsStringAndSize(PyObject * o,Py_ssize_t * length)12964 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
12965 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
12966 if (
12967 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
12968 __Pyx_sys_getdefaultencoding_not_ascii &&
12969 #endif
12970 PyUnicode_Check(o)) {
12971 return __Pyx_PyUnicode_AsStringAndSize(o, length);
12972 } else
12973 #endif
12974 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
12975 if (PyByteArray_Check(o)) {
12976 *length = PyByteArray_GET_SIZE(o);
12977 return PyByteArray_AS_STRING(o);
12978 } else
12979 #endif
12980 {
12981 char* result;
12982 int r = PyBytes_AsStringAndSize(o, &result, length);
12983 if (unlikely(r < 0)) {
12984 return NULL;
12985 } else {
12986 return result;
12987 }
12988 }
12989 }
__Pyx_PyObject_IsTrue(PyObject * x)12990 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
12991 int is_true = x == Py_True;
12992 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
12993 else return PyObject_IsTrue(x);
12994 }
__Pyx_PyObject_IsTrueAndDecref(PyObject * x)12995 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
12996 int retval;
12997 if (unlikely(!x)) return -1;
12998 retval = __Pyx_PyObject_IsTrue(x);
12999 Py_DECREF(x);
13000 return retval;
13001 }
__Pyx_PyNumber_IntOrLongWrongResultType(PyObject * result,const char * type_name)13002 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
13003 #if PY_MAJOR_VERSION >= 3
13004 if (PyLong_Check(result)) {
13005 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
13006 "__int__ returned non-int (type %.200s). "
13007 "The ability to return an instance of a strict subclass of int "
13008 "is deprecated, and may be removed in a future version of Python.",
13009 Py_TYPE(result)->tp_name)) {
13010 Py_DECREF(result);
13011 return NULL;
13012 }
13013 return result;
13014 }
13015 #endif
13016 PyErr_Format(PyExc_TypeError,
13017 "__%.4s__ returned non-%.4s (type %.200s)",
13018 type_name, type_name, Py_TYPE(result)->tp_name);
13019 Py_DECREF(result);
13020 return NULL;
13021 }
__Pyx_PyNumber_IntOrLong(PyObject * x)13022 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
13023 #if CYTHON_USE_TYPE_SLOTS
13024 PyNumberMethods *m;
13025 #endif
13026 const char *name = NULL;
13027 PyObject *res = NULL;
13028 #if PY_MAJOR_VERSION < 3
13029 if (likely(PyInt_Check(x) || PyLong_Check(x)))
13030 #else
13031 if (likely(PyLong_Check(x)))
13032 #endif
13033 return __Pyx_NewRef(x);
13034 #if CYTHON_USE_TYPE_SLOTS
13035 m = Py_TYPE(x)->tp_as_number;
13036 #if PY_MAJOR_VERSION < 3
13037 if (m && m->nb_int) {
13038 name = "int";
13039 res = m->nb_int(x);
13040 }
13041 else if (m && m->nb_long) {
13042 name = "long";
13043 res = m->nb_long(x);
13044 }
13045 #else
13046 if (likely(m && m->nb_int)) {
13047 name = "int";
13048 res = m->nb_int(x);
13049 }
13050 #endif
13051 #else
13052 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
13053 res = PyNumber_Int(x);
13054 }
13055 #endif
13056 if (likely(res)) {
13057 #if PY_MAJOR_VERSION < 3
13058 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
13059 #else
13060 if (unlikely(!PyLong_CheckExact(res))) {
13061 #endif
13062 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
13063 }
13064 }
13065 else if (!PyErr_Occurred()) {
13066 PyErr_SetString(PyExc_TypeError,
13067 "an integer is required");
13068 }
13069 return res;
13070 }
13071 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
13072 Py_ssize_t ival;
13073 PyObject *x;
13074 #if PY_MAJOR_VERSION < 3
13075 if (likely(PyInt_CheckExact(b))) {
13076 if (sizeof(Py_ssize_t) >= sizeof(long))
13077 return PyInt_AS_LONG(b);
13078 else
13079 return PyInt_AsSsize_t(b);
13080 }
13081 #endif
13082 if (likely(PyLong_CheckExact(b))) {
13083 #if CYTHON_USE_PYLONG_INTERNALS
13084 const digit* digits = ((PyLongObject*)b)->ob_digit;
13085 const Py_ssize_t size = Py_SIZE(b);
13086 if (likely(__Pyx_sst_abs(size) <= 1)) {
13087 ival = likely(size) ? digits[0] : 0;
13088 if (size == -1) ival = -ival;
13089 return ival;
13090 } else {
13091 switch (size) {
13092 case 2:
13093 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
13094 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
13095 }
13096 break;
13097 case -2:
13098 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
13099 return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
13100 }
13101 break;
13102 case 3:
13103 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
13104 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
13105 }
13106 break;
13107 case -3:
13108 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
13109 return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
13110 }
13111 break;
13112 case 4:
13113 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
13114 return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
13115 }
13116 break;
13117 case -4:
13118 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
13119 return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
13120 }
13121 break;
13122 }
13123 }
13124 #endif
13125 return PyLong_AsSsize_t(b);
13126 }
13127 x = PyNumber_Index(b);
13128 if (!x) return -1;
13129 ival = PyInt_AsSsize_t(x);
13130 Py_DECREF(x);
13131 return ival;
13132 }
13133 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
13134 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
13135 }
13136 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
13137 return PyInt_FromSize_t(ival);
13138 }
13139
13140
13141 #endif /* Py_PYTHON_H */
13142