Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/site-packages/pysam/libctabixproxies.c @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
1 /* Generated by Cython 3.0.11 */ | |
2 | |
3 /* BEGIN: Cython Metadata | |
4 { | |
5 "distutils": { | |
6 "define_macros": [ | |
7 [ | |
8 "BUILDING_WHEEL", | |
9 null | |
10 ] | |
11 ], | |
12 "depends": [], | |
13 "extra_compile_args": [ | |
14 "-Wno-unused", | |
15 "-Wno-strict-prototypes", | |
16 "-Wno-sign-compare", | |
17 "-Wno-error=declaration-after-statement" | |
18 ], | |
19 "extra_link_args": [ | |
20 "-Wl,-rpath,$ORIGIN" | |
21 ], | |
22 "include_dirs": [ | |
23 "/project/pysam", | |
24 "/project/htslib", | |
25 "/project/samtools", | |
26 "/project/samtools/lz4", | |
27 "/project/bcftools", | |
28 "/project" | |
29 ], | |
30 "language": "c", | |
31 "libraries": [ | |
32 "z", | |
33 "lzma", | |
34 "bz2", | |
35 "z", | |
36 "m", | |
37 "curl", | |
38 "crypto", | |
39 "chtslib.cpython-37m-x86_64-linux-gnu", | |
40 "cutils.cpython-37m-x86_64-linux-gnu" | |
41 ], | |
42 "library_dirs": [ | |
43 "/project/pysam", | |
44 "/project", | |
45 "build/lib.linux-x86_64-cpython-37/pysam", | |
46 "build/lib.linux-x86_64-cpython-37/pysam", | |
47 "build/lib.linux-x86_64-cpython-37/pysam", | |
48 "build/lib.linux-x86_64-cpython-37/pysam", | |
49 "build/lib.linux-x86_64-cpython-37/pysam", | |
50 "build/lib.linux-x86_64-cpython-37/pysam", | |
51 "build/lib.linux-x86_64-cpython-37/pysam", | |
52 "build/lib.linux-x86_64-cpython-37/pysam", | |
53 "build/lib.linux-x86_64-cpython-37/pysam", | |
54 "build/lib.linux-x86_64-cpython-37/pysam", | |
55 "build/lib.linux-x86_64-cpython-37/pysam", | |
56 "build/lib.linux-x86_64-cpython-37/pysam" | |
57 ], | |
58 "name": "pysam.libctabixproxies", | |
59 "sources": [ | |
60 "pysam/libctabixproxies.pyx" | |
61 ] | |
62 }, | |
63 "module_name": "pysam.libctabixproxies" | |
64 } | |
65 END: Cython Metadata */ | |
66 | |
67 #ifndef PY_SSIZE_T_CLEAN | |
68 #define PY_SSIZE_T_CLEAN | |
69 #endif /* PY_SSIZE_T_CLEAN */ | |
70 #if defined(CYTHON_LIMITED_API) && 0 | |
71 #ifndef Py_LIMITED_API | |
72 #if CYTHON_LIMITED_API+0 > 0x03030000 | |
73 #define Py_LIMITED_API CYTHON_LIMITED_API | |
74 #else | |
75 #define Py_LIMITED_API 0x03030000 | |
76 #endif | |
77 #endif | |
78 #endif | |
79 | |
80 #include "Python.h" | |
81 | |
82 #if PY_MAJOR_VERSION >= 3 | |
83 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj) | |
84 #else | |
85 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL) | |
86 #endif | |
87 | |
88 | |
89 #if PY_MAJOR_VERSION <= 2 | |
90 #define PyDict_GetItemWithError _PyDict_GetItemWithError | |
91 #endif | |
92 | |
93 | |
94 #if (PY_VERSION_HEX < 0x030700b1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600)) && !defined(PyContextVar_Get) | |
95 #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) ) | |
96 #endif | |
97 | |
98 #ifndef Py_PYTHON_H | |
99 #error Python headers needed to compile C extensions, please install development version of Python. | |
100 #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) | |
101 #error Cython requires Python 2.7+ or Python 3.3+. | |
102 #else | |
103 #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API | |
104 #define __PYX_EXTRA_ABI_MODULE_NAME "limited" | |
105 #else | |
106 #define __PYX_EXTRA_ABI_MODULE_NAME "" | |
107 #endif | |
108 #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME | |
109 #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI | |
110 #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." | |
111 #define CYTHON_HEX_VERSION 0x03000BF0 | |
112 #define CYTHON_FUTURE_DIVISION 1 | |
113 #include <stddef.h> | |
114 #ifndef offsetof | |
115 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) | |
116 #endif | |
117 #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) | |
118 #ifndef __stdcall | |
119 #define __stdcall | |
120 #endif | |
121 #ifndef __cdecl | |
122 #define __cdecl | |
123 #endif | |
124 #ifndef __fastcall | |
125 #define __fastcall | |
126 #endif | |
127 #endif | |
128 #ifndef DL_IMPORT | |
129 #define DL_IMPORT(t) t | |
130 #endif | |
131 #ifndef DL_EXPORT | |
132 #define DL_EXPORT(t) t | |
133 #endif | |
134 #define __PYX_COMMA , | |
135 #ifndef HAVE_LONG_LONG | |
136 #define HAVE_LONG_LONG | |
137 #endif | |
138 #ifndef PY_LONG_LONG | |
139 #define PY_LONG_LONG LONG_LONG | |
140 #endif | |
141 #ifndef Py_HUGE_VAL | |
142 #define Py_HUGE_VAL HUGE_VAL | |
143 #endif | |
144 #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX | |
145 #if defined(GRAALVM_PYTHON) | |
146 /* For very preliminary testing purposes. Most variables are set the same as PyPy. | |
147 The existence of this section does not imply that anything works or is even tested */ | |
148 #define CYTHON_COMPILING_IN_PYPY 0 | |
149 #define CYTHON_COMPILING_IN_CPYTHON 0 | |
150 #define CYTHON_COMPILING_IN_LIMITED_API 0 | |
151 #define CYTHON_COMPILING_IN_GRAAL 1 | |
152 #define CYTHON_COMPILING_IN_NOGIL 0 | |
153 #undef CYTHON_USE_TYPE_SLOTS | |
154 #define CYTHON_USE_TYPE_SLOTS 0 | |
155 #undef CYTHON_USE_TYPE_SPECS | |
156 #define CYTHON_USE_TYPE_SPECS 0 | |
157 #undef CYTHON_USE_PYTYPE_LOOKUP | |
158 #define CYTHON_USE_PYTYPE_LOOKUP 0 | |
159 #if PY_VERSION_HEX < 0x03050000 | |
160 #undef CYTHON_USE_ASYNC_SLOTS | |
161 #define CYTHON_USE_ASYNC_SLOTS 0 | |
162 #elif !defined(CYTHON_USE_ASYNC_SLOTS) | |
163 #define CYTHON_USE_ASYNC_SLOTS 1 | |
164 #endif | |
165 #undef CYTHON_USE_PYLIST_INTERNALS | |
166 #define CYTHON_USE_PYLIST_INTERNALS 0 | |
167 #undef CYTHON_USE_UNICODE_INTERNALS | |
168 #define CYTHON_USE_UNICODE_INTERNALS 0 | |
169 #undef CYTHON_USE_UNICODE_WRITER | |
170 #define CYTHON_USE_UNICODE_WRITER 0 | |
171 #undef CYTHON_USE_PYLONG_INTERNALS | |
172 #define CYTHON_USE_PYLONG_INTERNALS 0 | |
173 #undef CYTHON_AVOID_BORROWED_REFS | |
174 #define CYTHON_AVOID_BORROWED_REFS 1 | |
175 #undef CYTHON_ASSUME_SAFE_MACROS | |
176 #define CYTHON_ASSUME_SAFE_MACROS 0 | |
177 #undef CYTHON_UNPACK_METHODS | |
178 #define CYTHON_UNPACK_METHODS 0 | |
179 #undef CYTHON_FAST_THREAD_STATE | |
180 #define CYTHON_FAST_THREAD_STATE 0 | |
181 #undef CYTHON_FAST_GIL | |
182 #define CYTHON_FAST_GIL 0 | |
183 #undef CYTHON_METH_FASTCALL | |
184 #define CYTHON_METH_FASTCALL 0 | |
185 #undef CYTHON_FAST_PYCALL | |
186 #define CYTHON_FAST_PYCALL 0 | |
187 #ifndef CYTHON_PEP487_INIT_SUBCLASS | |
188 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) | |
189 #endif | |
190 #undef CYTHON_PEP489_MULTI_PHASE_INIT | |
191 #define CYTHON_PEP489_MULTI_PHASE_INIT 1 | |
192 #undef CYTHON_USE_MODULE_STATE | |
193 #define CYTHON_USE_MODULE_STATE 0 | |
194 #undef CYTHON_USE_TP_FINALIZE | |
195 #define CYTHON_USE_TP_FINALIZE 0 | |
196 #undef CYTHON_USE_DICT_VERSIONS | |
197 #define CYTHON_USE_DICT_VERSIONS 0 | |
198 #undef CYTHON_USE_EXC_INFO_STACK | |
199 #define CYTHON_USE_EXC_INFO_STACK 0 | |
200 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC | |
201 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 | |
202 #endif | |
203 #undef CYTHON_USE_FREELISTS | |
204 #define CYTHON_USE_FREELISTS 0 | |
205 #elif defined(PYPY_VERSION) | |
206 #define CYTHON_COMPILING_IN_PYPY 1 | |
207 #define CYTHON_COMPILING_IN_CPYTHON 0 | |
208 #define CYTHON_COMPILING_IN_LIMITED_API 0 | |
209 #define CYTHON_COMPILING_IN_GRAAL 0 | |
210 #define CYTHON_COMPILING_IN_NOGIL 0 | |
211 #undef CYTHON_USE_TYPE_SLOTS | |
212 #define CYTHON_USE_TYPE_SLOTS 0 | |
213 #ifndef CYTHON_USE_TYPE_SPECS | |
214 #define CYTHON_USE_TYPE_SPECS 0 | |
215 #endif | |
216 #undef CYTHON_USE_PYTYPE_LOOKUP | |
217 #define CYTHON_USE_PYTYPE_LOOKUP 0 | |
218 #if PY_VERSION_HEX < 0x03050000 | |
219 #undef CYTHON_USE_ASYNC_SLOTS | |
220 #define CYTHON_USE_ASYNC_SLOTS 0 | |
221 #elif !defined(CYTHON_USE_ASYNC_SLOTS) | |
222 #define CYTHON_USE_ASYNC_SLOTS 1 | |
223 #endif | |
224 #undef CYTHON_USE_PYLIST_INTERNALS | |
225 #define CYTHON_USE_PYLIST_INTERNALS 0 | |
226 #undef CYTHON_USE_UNICODE_INTERNALS | |
227 #define CYTHON_USE_UNICODE_INTERNALS 0 | |
228 #undef CYTHON_USE_UNICODE_WRITER | |
229 #define CYTHON_USE_UNICODE_WRITER 0 | |
230 #undef CYTHON_USE_PYLONG_INTERNALS | |
231 #define CYTHON_USE_PYLONG_INTERNALS 0 | |
232 #undef CYTHON_AVOID_BORROWED_REFS | |
233 #define CYTHON_AVOID_BORROWED_REFS 1 | |
234 #undef CYTHON_ASSUME_SAFE_MACROS | |
235 #define CYTHON_ASSUME_SAFE_MACROS 0 | |
236 #undef CYTHON_UNPACK_METHODS | |
237 #define CYTHON_UNPACK_METHODS 0 | |
238 #undef CYTHON_FAST_THREAD_STATE | |
239 #define CYTHON_FAST_THREAD_STATE 0 | |
240 #undef CYTHON_FAST_GIL | |
241 #define CYTHON_FAST_GIL 0 | |
242 #undef CYTHON_METH_FASTCALL | |
243 #define CYTHON_METH_FASTCALL 0 | |
244 #undef CYTHON_FAST_PYCALL | |
245 #define CYTHON_FAST_PYCALL 0 | |
246 #ifndef CYTHON_PEP487_INIT_SUBCLASS | |
247 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) | |
248 #endif | |
249 #if PY_VERSION_HEX < 0x03090000 | |
250 #undef CYTHON_PEP489_MULTI_PHASE_INIT | |
251 #define CYTHON_PEP489_MULTI_PHASE_INIT 0 | |
252 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) | |
253 #define CYTHON_PEP489_MULTI_PHASE_INIT 1 | |
254 #endif | |
255 #undef CYTHON_USE_MODULE_STATE | |
256 #define CYTHON_USE_MODULE_STATE 0 | |
257 #undef CYTHON_USE_TP_FINALIZE | |
258 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) | |
259 #undef CYTHON_USE_DICT_VERSIONS | |
260 #define CYTHON_USE_DICT_VERSIONS 0 | |
261 #undef CYTHON_USE_EXC_INFO_STACK | |
262 #define CYTHON_USE_EXC_INFO_STACK 0 | |
263 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC | |
264 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 | |
265 #endif | |
266 #undef CYTHON_USE_FREELISTS | |
267 #define CYTHON_USE_FREELISTS 0 | |
268 #elif defined(CYTHON_LIMITED_API) | |
269 #ifdef Py_LIMITED_API | |
270 #undef __PYX_LIMITED_VERSION_HEX | |
271 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API | |
272 #endif | |
273 #define CYTHON_COMPILING_IN_PYPY 0 | |
274 #define CYTHON_COMPILING_IN_CPYTHON 0 | |
275 #define CYTHON_COMPILING_IN_LIMITED_API 1 | |
276 #define CYTHON_COMPILING_IN_GRAAL 0 | |
277 #define CYTHON_COMPILING_IN_NOGIL 0 | |
278 #undef CYTHON_CLINE_IN_TRACEBACK | |
279 #define CYTHON_CLINE_IN_TRACEBACK 0 | |
280 #undef CYTHON_USE_TYPE_SLOTS | |
281 #define CYTHON_USE_TYPE_SLOTS 0 | |
282 #undef CYTHON_USE_TYPE_SPECS | |
283 #define CYTHON_USE_TYPE_SPECS 1 | |
284 #undef CYTHON_USE_PYTYPE_LOOKUP | |
285 #define CYTHON_USE_PYTYPE_LOOKUP 0 | |
286 #undef CYTHON_USE_ASYNC_SLOTS | |
287 #define CYTHON_USE_ASYNC_SLOTS 0 | |
288 #undef CYTHON_USE_PYLIST_INTERNALS | |
289 #define CYTHON_USE_PYLIST_INTERNALS 0 | |
290 #undef CYTHON_USE_UNICODE_INTERNALS | |
291 #define CYTHON_USE_UNICODE_INTERNALS 0 | |
292 #ifndef CYTHON_USE_UNICODE_WRITER | |
293 #define CYTHON_USE_UNICODE_WRITER 0 | |
294 #endif | |
295 #undef CYTHON_USE_PYLONG_INTERNALS | |
296 #define CYTHON_USE_PYLONG_INTERNALS 0 | |
297 #ifndef CYTHON_AVOID_BORROWED_REFS | |
298 #define CYTHON_AVOID_BORROWED_REFS 0 | |
299 #endif | |
300 #undef CYTHON_ASSUME_SAFE_MACROS | |
301 #define CYTHON_ASSUME_SAFE_MACROS 0 | |
302 #undef CYTHON_UNPACK_METHODS | |
303 #define CYTHON_UNPACK_METHODS 0 | |
304 #undef CYTHON_FAST_THREAD_STATE | |
305 #define CYTHON_FAST_THREAD_STATE 0 | |
306 #undef CYTHON_FAST_GIL | |
307 #define CYTHON_FAST_GIL 0 | |
308 #undef CYTHON_METH_FASTCALL | |
309 #define CYTHON_METH_FASTCALL 0 | |
310 #undef CYTHON_FAST_PYCALL | |
311 #define CYTHON_FAST_PYCALL 0 | |
312 #ifndef CYTHON_PEP487_INIT_SUBCLASS | |
313 #define CYTHON_PEP487_INIT_SUBCLASS 1 | |
314 #endif | |
315 #undef CYTHON_PEP489_MULTI_PHASE_INIT | |
316 #define CYTHON_PEP489_MULTI_PHASE_INIT 0 | |
317 #undef CYTHON_USE_MODULE_STATE | |
318 #define CYTHON_USE_MODULE_STATE 1 | |
319 #ifndef CYTHON_USE_TP_FINALIZE | |
320 #define CYTHON_USE_TP_FINALIZE 0 | |
321 #endif | |
322 #undef CYTHON_USE_DICT_VERSIONS | |
323 #define CYTHON_USE_DICT_VERSIONS 0 | |
324 #undef CYTHON_USE_EXC_INFO_STACK | |
325 #define CYTHON_USE_EXC_INFO_STACK 0 | |
326 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC | |
327 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 | |
328 #endif | |
329 #undef CYTHON_USE_FREELISTS | |
330 #define CYTHON_USE_FREELISTS 0 | |
331 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) | |
332 #define CYTHON_COMPILING_IN_PYPY 0 | |
333 #define CYTHON_COMPILING_IN_CPYTHON 0 | |
334 #define CYTHON_COMPILING_IN_LIMITED_API 0 | |
335 #define CYTHON_COMPILING_IN_GRAAL 0 | |
336 #define CYTHON_COMPILING_IN_NOGIL 1 | |
337 #ifndef CYTHON_USE_TYPE_SLOTS | |
338 #define CYTHON_USE_TYPE_SLOTS 1 | |
339 #endif | |
340 #ifndef CYTHON_USE_TYPE_SPECS | |
341 #define CYTHON_USE_TYPE_SPECS 0 | |
342 #endif | |
343 #undef CYTHON_USE_PYTYPE_LOOKUP | |
344 #define CYTHON_USE_PYTYPE_LOOKUP 0 | |
345 #ifndef CYTHON_USE_ASYNC_SLOTS | |
346 #define CYTHON_USE_ASYNC_SLOTS 1 | |
347 #endif | |
348 #ifndef CYTHON_USE_PYLONG_INTERNALS | |
349 #define CYTHON_USE_PYLONG_INTERNALS 0 | |
350 #endif | |
351 #undef CYTHON_USE_PYLIST_INTERNALS | |
352 #define CYTHON_USE_PYLIST_INTERNALS 0 | |
353 #ifndef CYTHON_USE_UNICODE_INTERNALS | |
354 #define CYTHON_USE_UNICODE_INTERNALS 1 | |
355 #endif | |
356 #undef CYTHON_USE_UNICODE_WRITER | |
357 #define CYTHON_USE_UNICODE_WRITER 0 | |
358 #ifndef CYTHON_AVOID_BORROWED_REFS | |
359 #define CYTHON_AVOID_BORROWED_REFS 0 | |
360 #endif | |
361 #ifndef CYTHON_ASSUME_SAFE_MACROS | |
362 #define CYTHON_ASSUME_SAFE_MACROS 1 | |
363 #endif | |
364 #ifndef CYTHON_UNPACK_METHODS | |
365 #define CYTHON_UNPACK_METHODS 1 | |
366 #endif | |
367 #undef CYTHON_FAST_THREAD_STATE | |
368 #define CYTHON_FAST_THREAD_STATE 0 | |
369 #undef CYTHON_FAST_GIL | |
370 #define CYTHON_FAST_GIL 0 | |
371 #ifndef CYTHON_METH_FASTCALL | |
372 #define CYTHON_METH_FASTCALL 1 | |
373 #endif | |
374 #undef CYTHON_FAST_PYCALL | |
375 #define CYTHON_FAST_PYCALL 0 | |
376 #ifndef CYTHON_PEP487_INIT_SUBCLASS | |
377 #define CYTHON_PEP487_INIT_SUBCLASS 1 | |
378 #endif | |
379 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT | |
380 #define CYTHON_PEP489_MULTI_PHASE_INIT 1 | |
381 #endif | |
382 #ifndef CYTHON_USE_MODULE_STATE | |
383 #define CYTHON_USE_MODULE_STATE 0 | |
384 #endif | |
385 #ifndef CYTHON_USE_TP_FINALIZE | |
386 #define CYTHON_USE_TP_FINALIZE 1 | |
387 #endif | |
388 #undef CYTHON_USE_DICT_VERSIONS | |
389 #define CYTHON_USE_DICT_VERSIONS 0 | |
390 #undef CYTHON_USE_EXC_INFO_STACK | |
391 #define CYTHON_USE_EXC_INFO_STACK 0 | |
392 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC | |
393 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 | |
394 #endif | |
395 #ifndef CYTHON_USE_FREELISTS | |
396 #define CYTHON_USE_FREELISTS 0 | |
397 #endif | |
398 #else | |
399 #define CYTHON_COMPILING_IN_PYPY 0 | |
400 #define CYTHON_COMPILING_IN_CPYTHON 1 | |
401 #define CYTHON_COMPILING_IN_LIMITED_API 0 | |
402 #define CYTHON_COMPILING_IN_GRAAL 0 | |
403 #define CYTHON_COMPILING_IN_NOGIL 0 | |
404 #ifndef CYTHON_USE_TYPE_SLOTS | |
405 #define CYTHON_USE_TYPE_SLOTS 1 | |
406 #endif | |
407 #ifndef CYTHON_USE_TYPE_SPECS | |
408 #define CYTHON_USE_TYPE_SPECS 0 | |
409 #endif | |
410 #ifndef CYTHON_USE_PYTYPE_LOOKUP | |
411 #define CYTHON_USE_PYTYPE_LOOKUP 1 | |
412 #endif | |
413 #if PY_MAJOR_VERSION < 3 | |
414 #undef CYTHON_USE_ASYNC_SLOTS | |
415 #define CYTHON_USE_ASYNC_SLOTS 0 | |
416 #elif !defined(CYTHON_USE_ASYNC_SLOTS) | |
417 #define CYTHON_USE_ASYNC_SLOTS 1 | |
418 #endif | |
419 #ifndef CYTHON_USE_PYLONG_INTERNALS | |
420 #define CYTHON_USE_PYLONG_INTERNALS 1 | |
421 #endif | |
422 #ifndef CYTHON_USE_PYLIST_INTERNALS | |
423 #define CYTHON_USE_PYLIST_INTERNALS 1 | |
424 #endif | |
425 #ifndef CYTHON_USE_UNICODE_INTERNALS | |
426 #define CYTHON_USE_UNICODE_INTERNALS 1 | |
427 #endif | |
428 #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 | |
429 #undef CYTHON_USE_UNICODE_WRITER | |
430 #define CYTHON_USE_UNICODE_WRITER 0 | |
431 #elif !defined(CYTHON_USE_UNICODE_WRITER) | |
432 #define CYTHON_USE_UNICODE_WRITER 1 | |
433 #endif | |
434 #ifndef CYTHON_AVOID_BORROWED_REFS | |
435 #define CYTHON_AVOID_BORROWED_REFS 0 | |
436 #endif | |
437 #ifndef CYTHON_ASSUME_SAFE_MACROS | |
438 #define CYTHON_ASSUME_SAFE_MACROS 1 | |
439 #endif | |
440 #ifndef CYTHON_UNPACK_METHODS | |
441 #define CYTHON_UNPACK_METHODS 1 | |
442 #endif | |
443 #ifndef CYTHON_FAST_THREAD_STATE | |
444 #define CYTHON_FAST_THREAD_STATE 1 | |
445 #endif | |
446 #ifndef CYTHON_FAST_GIL | |
447 #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) | |
448 #endif | |
449 #ifndef CYTHON_METH_FASTCALL | |
450 #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) | |
451 #endif | |
452 #ifndef CYTHON_FAST_PYCALL | |
453 #define CYTHON_FAST_PYCALL 1 | |
454 #endif | |
455 #ifndef CYTHON_PEP487_INIT_SUBCLASS | |
456 #define CYTHON_PEP487_INIT_SUBCLASS 1 | |
457 #endif | |
458 #if PY_VERSION_HEX < 0x03050000 | |
459 #undef CYTHON_PEP489_MULTI_PHASE_INIT | |
460 #define CYTHON_PEP489_MULTI_PHASE_INIT 0 | |
461 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) | |
462 #define CYTHON_PEP489_MULTI_PHASE_INIT 1 | |
463 #endif | |
464 #ifndef CYTHON_USE_MODULE_STATE | |
465 #define CYTHON_USE_MODULE_STATE 0 | |
466 #endif | |
467 #if PY_VERSION_HEX < 0x030400a1 | |
468 #undef CYTHON_USE_TP_FINALIZE | |
469 #define CYTHON_USE_TP_FINALIZE 0 | |
470 #elif !defined(CYTHON_USE_TP_FINALIZE) | |
471 #define CYTHON_USE_TP_FINALIZE 1 | |
472 #endif | |
473 #if PY_VERSION_HEX < 0x030600B1 | |
474 #undef CYTHON_USE_DICT_VERSIONS | |
475 #define CYTHON_USE_DICT_VERSIONS 0 | |
476 #elif !defined(CYTHON_USE_DICT_VERSIONS) | |
477 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) | |
478 #endif | |
479 #if PY_VERSION_HEX < 0x030700A3 | |
480 #undef CYTHON_USE_EXC_INFO_STACK | |
481 #define CYTHON_USE_EXC_INFO_STACK 0 | |
482 #elif !defined(CYTHON_USE_EXC_INFO_STACK) | |
483 #define CYTHON_USE_EXC_INFO_STACK 1 | |
484 #endif | |
485 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC | |
486 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 | |
487 #endif | |
488 #ifndef CYTHON_USE_FREELISTS | |
489 #define CYTHON_USE_FREELISTS 1 | |
490 #endif | |
491 #endif | |
492 #if !defined(CYTHON_FAST_PYCCALL) | |
493 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) | |
494 #endif | |
495 #if !defined(CYTHON_VECTORCALL) | |
496 #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) | |
497 #endif | |
498 #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) | |
499 #if CYTHON_USE_PYLONG_INTERNALS | |
500 #if PY_MAJOR_VERSION < 3 | |
501 #include "longintrepr.h" | |
502 #endif | |
503 #undef SHIFT | |
504 #undef BASE | |
505 #undef MASK | |
506 #ifdef SIZEOF_VOID_P | |
507 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; | |
508 #endif | |
509 #endif | |
510 #ifndef __has_attribute | |
511 #define __has_attribute(x) 0 | |
512 #endif | |
513 #ifndef __has_cpp_attribute | |
514 #define __has_cpp_attribute(x) 0 | |
515 #endif | |
516 #ifndef CYTHON_RESTRICT | |
517 #if defined(__GNUC__) | |
518 #define CYTHON_RESTRICT __restrict__ | |
519 #elif defined(_MSC_VER) && _MSC_VER >= 1400 | |
520 #define CYTHON_RESTRICT __restrict | |
521 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L | |
522 #define CYTHON_RESTRICT restrict | |
523 #else | |
524 #define CYTHON_RESTRICT | |
525 #endif | |
526 #endif | |
527 #ifndef CYTHON_UNUSED | |
528 #if defined(__cplusplus) | |
529 /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 | |
530 * but leads to warnings with -pedantic, since it is a C++17 feature */ | |
531 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) | |
532 #if __has_cpp_attribute(maybe_unused) | |
533 #define CYTHON_UNUSED [[maybe_unused]] | |
534 #endif | |
535 #endif | |
536 #endif | |
537 #endif | |
538 #ifndef CYTHON_UNUSED | |
539 # if defined(__GNUC__) | |
540 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) | |
541 # define CYTHON_UNUSED __attribute__ ((__unused__)) | |
542 # else | |
543 # define CYTHON_UNUSED | |
544 # endif | |
545 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) | |
546 # define CYTHON_UNUSED __attribute__ ((__unused__)) | |
547 # else | |
548 # define CYTHON_UNUSED | |
549 # endif | |
550 #endif | |
551 #ifndef CYTHON_UNUSED_VAR | |
552 # if defined(__cplusplus) | |
553 template<class T> void CYTHON_UNUSED_VAR( const T& ) { } | |
554 # else | |
555 # define CYTHON_UNUSED_VAR(x) (void)(x) | |
556 # endif | |
557 #endif | |
558 #ifndef CYTHON_MAYBE_UNUSED_VAR | |
559 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) | |
560 #endif | |
561 #ifndef CYTHON_NCP_UNUSED | |
562 # if CYTHON_COMPILING_IN_CPYTHON | |
563 # define CYTHON_NCP_UNUSED | |
564 # else | |
565 # define CYTHON_NCP_UNUSED CYTHON_UNUSED | |
566 # endif | |
567 #endif | |
568 #ifndef CYTHON_USE_CPP_STD_MOVE | |
569 #if defined(__cplusplus) && (\ | |
570 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) | |
571 #define CYTHON_USE_CPP_STD_MOVE 1 | |
572 #else | |
573 #define CYTHON_USE_CPP_STD_MOVE 0 | |
574 #endif | |
575 #endif | |
576 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) | |
577 #ifdef _MSC_VER | |
578 #ifndef _MSC_STDINT_H_ | |
579 #if _MSC_VER < 1300 | |
580 typedef unsigned char uint8_t; | |
581 typedef unsigned short uint16_t; | |
582 typedef unsigned int uint32_t; | |
583 #else | |
584 typedef unsigned __int8 uint8_t; | |
585 typedef unsigned __int16 uint16_t; | |
586 typedef unsigned __int32 uint32_t; | |
587 #endif | |
588 #endif | |
589 #if _MSC_VER < 1300 | |
590 #ifdef _WIN64 | |
591 typedef unsigned long long __pyx_uintptr_t; | |
592 #else | |
593 typedef unsigned int __pyx_uintptr_t; | |
594 #endif | |
595 #else | |
596 #ifdef _WIN64 | |
597 typedef unsigned __int64 __pyx_uintptr_t; | |
598 #else | |
599 typedef unsigned __int32 __pyx_uintptr_t; | |
600 #endif | |
601 #endif | |
602 #else | |
603 #include <stdint.h> | |
604 typedef uintptr_t __pyx_uintptr_t; | |
605 #endif | |
606 #ifndef CYTHON_FALLTHROUGH | |
607 #if defined(__cplusplus) | |
608 /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 | |
609 * but leads to warnings with -pedantic, since it is a C++17 feature */ | |
610 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) | |
611 #if __has_cpp_attribute(fallthrough) | |
612 #define CYTHON_FALLTHROUGH [[fallthrough]] | |
613 #endif | |
614 #endif | |
615 #ifndef CYTHON_FALLTHROUGH | |
616 #if __has_cpp_attribute(clang::fallthrough) | |
617 #define CYTHON_FALLTHROUGH [[clang::fallthrough]] | |
618 #elif __has_cpp_attribute(gnu::fallthrough) | |
619 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] | |
620 #endif | |
621 #endif | |
622 #endif | |
623 #ifndef CYTHON_FALLTHROUGH | |
624 #if __has_attribute(fallthrough) | |
625 #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) | |
626 #else | |
627 #define CYTHON_FALLTHROUGH | |
628 #endif | |
629 #endif | |
630 #if defined(__clang__) && defined(__apple_build_version__) | |
631 #if __apple_build_version__ < 7000000 | |
632 #undef CYTHON_FALLTHROUGH | |
633 #define CYTHON_FALLTHROUGH | |
634 #endif | |
635 #endif | |
636 #endif | |
637 #ifdef __cplusplus | |
638 template <typename T> | |
639 struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; | |
640 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value) | |
641 #else | |
642 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) | |
643 #endif | |
644 #if CYTHON_COMPILING_IN_PYPY == 1 | |
645 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) | |
646 #else | |
647 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) | |
648 #endif | |
649 #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) | |
650 | |
651 #ifndef CYTHON_INLINE | |
652 #if defined(__clang__) | |
653 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) | |
654 #elif defined(__GNUC__) | |
655 #define CYTHON_INLINE __inline__ | |
656 #elif defined(_MSC_VER) | |
657 #define CYTHON_INLINE __inline | |
658 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L | |
659 #define CYTHON_INLINE inline | |
660 #else | |
661 #define CYTHON_INLINE | |
662 #endif | |
663 #endif | |
664 | |
665 #define __PYX_BUILD_PY_SSIZE_T "n" | |
666 #define CYTHON_FORMAT_SSIZE_T "z" | |
667 #if PY_MAJOR_VERSION < 3 | |
668 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" | |
669 #define __Pyx_DefaultClassType PyClass_Type | |
670 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ | |
671 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) | |
672 #else | |
673 #define __Pyx_BUILTIN_MODULE_NAME "builtins" | |
674 #define __Pyx_DefaultClassType PyType_Type | |
675 #if CYTHON_COMPILING_IN_LIMITED_API | |
676 static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, | |
677 PyObject *code, PyObject *c, PyObject* n, PyObject *v, | |
678 PyObject *fv, PyObject *cell, PyObject* fn, | |
679 PyObject *name, int fline, PyObject *lnos) { | |
680 PyObject *exception_table = NULL; | |
681 PyObject *types_module=NULL, *code_type=NULL, *result=NULL; | |
682 #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 | |
683 PyObject *version_info; | |
684 PyObject *py_minor_version = NULL; | |
685 #endif | |
686 long minor_version = 0; | |
687 PyObject *type, *value, *traceback; | |
688 PyErr_Fetch(&type, &value, &traceback); | |
689 #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 | |
690 minor_version = 11; | |
691 #else | |
692 if (!(version_info = PySys_GetObject("version_info"))) goto end; | |
693 if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; | |
694 minor_version = PyLong_AsLong(py_minor_version); | |
695 Py_DECREF(py_minor_version); | |
696 if (minor_version == -1 && PyErr_Occurred()) goto end; | |
697 #endif | |
698 if (!(types_module = PyImport_ImportModule("types"))) goto end; | |
699 if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; | |
700 if (minor_version <= 7) { | |
701 (void)p; | |
702 result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, | |
703 c, n, v, fn, name, fline, lnos, fv, cell); | |
704 } else if (minor_version <= 10) { | |
705 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, | |
706 c, n, v, fn, name, fline, lnos, fv, cell); | |
707 } else { | |
708 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; | |
709 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, | |
710 c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); | |
711 } | |
712 end: | |
713 Py_XDECREF(code_type); | |
714 Py_XDECREF(exception_table); | |
715 Py_XDECREF(types_module); | |
716 if (type) { | |
717 PyErr_Restore(type, value, traceback); | |
718 } | |
719 return result; | |
720 } | |
721 #ifndef CO_OPTIMIZED | |
722 #define CO_OPTIMIZED 0x0001 | |
723 #endif | |
724 #ifndef CO_NEWLOCALS | |
725 #define CO_NEWLOCALS 0x0002 | |
726 #endif | |
727 #ifndef CO_VARARGS | |
728 #define CO_VARARGS 0x0004 | |
729 #endif | |
730 #ifndef CO_VARKEYWORDS | |
731 #define CO_VARKEYWORDS 0x0008 | |
732 #endif | |
733 #ifndef CO_ASYNC_GENERATOR | |
734 #define CO_ASYNC_GENERATOR 0x0200 | |
735 #endif | |
736 #ifndef CO_GENERATOR | |
737 #define CO_GENERATOR 0x0020 | |
738 #endif | |
739 #ifndef CO_COROUTINE | |
740 #define CO_COROUTINE 0x0080 | |
741 #endif | |
742 #elif PY_VERSION_HEX >= 0x030B0000 | |
743 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, | |
744 PyObject *code, PyObject *c, PyObject* n, PyObject *v, | |
745 PyObject *fv, PyObject *cell, PyObject* fn, | |
746 PyObject *name, int fline, PyObject *lnos) { | |
747 PyCodeObject *result; | |
748 PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); | |
749 if (!empty_bytes) return NULL; | |
750 result = | |
751 #if PY_VERSION_HEX >= 0x030C0000 | |
752 PyUnstable_Code_NewWithPosOnlyArgs | |
753 #else | |
754 PyCode_NewWithPosOnlyArgs | |
755 #endif | |
756 (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes); | |
757 Py_DECREF(empty_bytes); | |
758 return result; | |
759 } | |
760 #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY | |
761 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ | |
762 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) | |
763 #else | |
764 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ | |
765 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) | |
766 #endif | |
767 #endif | |
768 #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) | |
769 #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) | |
770 #else | |
771 #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) | |
772 #endif | |
773 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) | |
774 #define __Pyx_Py_Is(x, y) Py_Is(x, y) | |
775 #else | |
776 #define __Pyx_Py_Is(x, y) ((x) == (y)) | |
777 #endif | |
778 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) | |
779 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) | |
780 #else | |
781 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) | |
782 #endif | |
783 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) | |
784 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) | |
785 #else | |
786 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) | |
787 #endif | |
788 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) | |
789 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) | |
790 #else | |
791 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) | |
792 #endif | |
793 #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) | |
794 #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY | |
795 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) | |
796 #else | |
797 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) | |
798 #endif | |
799 #ifndef CO_COROUTINE | |
800 #define CO_COROUTINE 0x80 | |
801 #endif | |
802 #ifndef CO_ASYNC_GENERATOR | |
803 #define CO_ASYNC_GENERATOR 0x200 | |
804 #endif | |
805 #ifndef Py_TPFLAGS_CHECKTYPES | |
806 #define Py_TPFLAGS_CHECKTYPES 0 | |
807 #endif | |
808 #ifndef Py_TPFLAGS_HAVE_INDEX | |
809 #define Py_TPFLAGS_HAVE_INDEX 0 | |
810 #endif | |
811 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER | |
812 #define Py_TPFLAGS_HAVE_NEWBUFFER 0 | |
813 #endif | |
814 #ifndef Py_TPFLAGS_HAVE_FINALIZE | |
815 #define Py_TPFLAGS_HAVE_FINALIZE 0 | |
816 #endif | |
817 #ifndef Py_TPFLAGS_SEQUENCE | |
818 #define Py_TPFLAGS_SEQUENCE 0 | |
819 #endif | |
820 #ifndef Py_TPFLAGS_MAPPING | |
821 #define Py_TPFLAGS_MAPPING 0 | |
822 #endif | |
823 #ifndef METH_STACKLESS | |
824 #define METH_STACKLESS 0 | |
825 #endif | |
826 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) | |
827 #ifndef METH_FASTCALL | |
828 #define METH_FASTCALL 0x80 | |
829 #endif | |
830 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); | |
831 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, | |
832 Py_ssize_t nargs, PyObject *kwnames); | |
833 #else | |
834 #if PY_VERSION_HEX >= 0x030d00A4 | |
835 # define __Pyx_PyCFunctionFast PyCFunctionFast | |
836 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords | |
837 #else | |
838 # define __Pyx_PyCFunctionFast _PyCFunctionFast | |
839 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords | |
840 #endif | |
841 #endif | |
842 #if CYTHON_METH_FASTCALL | |
843 #define __Pyx_METH_FASTCALL METH_FASTCALL | |
844 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast | |
845 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords | |
846 #else | |
847 #define __Pyx_METH_FASTCALL METH_VARARGS | |
848 #define __Pyx_PyCFunction_FastCall PyCFunction | |
849 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords | |
850 #endif | |
851 #if CYTHON_VECTORCALL | |
852 #define __pyx_vectorcallfunc vectorcallfunc | |
853 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET | |
854 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) | |
855 #elif CYTHON_BACKPORT_VECTORCALL | |
856 typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, | |
857 size_t nargsf, PyObject *kwnames); | |
858 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) | |
859 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) | |
860 #else | |
861 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 | |
862 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) | |
863 #endif | |
864 #if PY_MAJOR_VERSION >= 0x030900B1 | |
865 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) | |
866 #else | |
867 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) | |
868 #endif | |
869 #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) | |
870 #if CYTHON_COMPILING_IN_CPYTHON | |
871 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) | |
872 #elif !CYTHON_COMPILING_IN_LIMITED_API | |
873 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) | |
874 #endif | |
875 #if CYTHON_COMPILING_IN_CPYTHON | |
876 #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) | |
877 static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { | |
878 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; | |
879 } | |
880 #endif | |
881 static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { | |
882 #if CYTHON_COMPILING_IN_LIMITED_API | |
883 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; | |
884 #else | |
885 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; | |
886 #endif | |
887 } | |
888 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) | |
889 #if __PYX_LIMITED_VERSION_HEX < 0x030900B1 | |
890 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) | |
891 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); | |
892 #else | |
893 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) | |
894 #define __Pyx_PyCMethod PyCMethod | |
895 #endif | |
896 #ifndef METH_METHOD | |
897 #define METH_METHOD 0x200 | |
898 #endif | |
899 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) | |
900 #define PyObject_Malloc(s) PyMem_Malloc(s) | |
901 #define PyObject_Free(p) PyMem_Free(p) | |
902 #define PyObject_Realloc(p) PyMem_Realloc(p) | |
903 #endif | |
904 #if CYTHON_COMPILING_IN_LIMITED_API | |
905 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) | |
906 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) | |
907 #else | |
908 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) | |
909 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) | |
910 #endif | |
911 #if CYTHON_COMPILING_IN_LIMITED_API | |
912 #define __Pyx_PyThreadState_Current PyThreadState_Get() | |
913 #elif !CYTHON_FAST_THREAD_STATE | |
914 #define __Pyx_PyThreadState_Current PyThreadState_GET() | |
915 #elif PY_VERSION_HEX >= 0x030d00A1 | |
916 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() | |
917 #elif PY_VERSION_HEX >= 0x03060000 | |
918 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() | |
919 #elif PY_VERSION_HEX >= 0x03000000 | |
920 #define __Pyx_PyThreadState_Current PyThreadState_GET() | |
921 #else | |
922 #define __Pyx_PyThreadState_Current _PyThreadState_Current | |
923 #endif | |
924 #if CYTHON_COMPILING_IN_LIMITED_API | |
925 static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) | |
926 { | |
927 void *result; | |
928 result = PyModule_GetState(op); | |
929 if (!result) | |
930 Py_FatalError("Couldn't find the module state"); | |
931 return result; | |
932 } | |
933 #endif | |
934 #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) | |
935 #if CYTHON_COMPILING_IN_LIMITED_API | |
936 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) | |
937 #else | |
938 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) | |
939 #endif | |
940 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) | |
941 #include "pythread.h" | |
942 #define Py_tss_NEEDS_INIT 0 | |
943 typedef int Py_tss_t; | |
944 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { | |
945 *key = PyThread_create_key(); | |
946 return 0; | |
947 } | |
948 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { | |
949 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); | |
950 *key = Py_tss_NEEDS_INIT; | |
951 return key; | |
952 } | |
953 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { | |
954 PyObject_Free(key); | |
955 } | |
956 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { | |
957 return *key != Py_tss_NEEDS_INIT; | |
958 } | |
959 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { | |
960 PyThread_delete_key(*key); | |
961 *key = Py_tss_NEEDS_INIT; | |
962 } | |
963 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { | |
964 return PyThread_set_key_value(*key, value); | |
965 } | |
966 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { | |
967 return PyThread_get_key_value(*key); | |
968 } | |
969 #endif | |
970 #if PY_MAJOR_VERSION < 3 | |
971 #if CYTHON_COMPILING_IN_PYPY | |
972 #if PYPY_VERSION_NUM < 0x07030600 | |
973 #if defined(__cplusplus) && __cplusplus >= 201402L | |
974 [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] | |
975 #elif defined(__GNUC__) || defined(__clang__) | |
976 __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) | |
977 #elif defined(_MSC_VER) | |
978 __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) | |
979 #endif | |
980 static CYTHON_INLINE int PyGILState_Check(void) { | |
981 return 0; | |
982 } | |
983 #else // PYPY_VERSION_NUM < 0x07030600 | |
984 #endif // PYPY_VERSION_NUM < 0x07030600 | |
985 #else | |
986 static CYTHON_INLINE int PyGILState_Check(void) { | |
987 PyThreadState * tstate = _PyThreadState_Current; | |
988 return tstate && (tstate == PyGILState_GetThisThreadState()); | |
989 } | |
990 #endif | |
991 #endif | |
992 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) | |
993 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) | |
994 #else | |
995 #define __Pyx_PyDict_NewPresized(n) PyDict_New() | |
996 #endif | |
997 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION | |
998 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) | |
999 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) | |
1000 #else | |
1001 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) | |
1002 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) | |
1003 #endif | |
1004 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS | |
1005 #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) | |
1006 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { | |
1007 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); | |
1008 if (res == NULL) PyErr_Clear(); | |
1009 return res; | |
1010 } | |
1011 #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) | |
1012 #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError | |
1013 #define __Pyx_PyDict_GetItemStr PyDict_GetItem | |
1014 #else | |
1015 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { | |
1016 #if CYTHON_COMPILING_IN_PYPY | |
1017 return PyDict_GetItem(dict, name); | |
1018 #else | |
1019 PyDictEntry *ep; | |
1020 PyDictObject *mp = (PyDictObject*) dict; | |
1021 long hash = ((PyStringObject *) name)->ob_shash; | |
1022 assert(hash != -1); | |
1023 ep = (mp->ma_lookup)(mp, name, hash); | |
1024 if (ep == NULL) { | |
1025 return NULL; | |
1026 } | |
1027 return ep->me_value; | |
1028 #endif | |
1029 } | |
1030 #define __Pyx_PyDict_GetItemStr PyDict_GetItem | |
1031 #endif | |
1032 #if CYTHON_USE_TYPE_SLOTS | |
1033 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) | |
1034 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) | |
1035 #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) | |
1036 #else | |
1037 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) | |
1038 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) | |
1039 #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next | |
1040 #endif | |
1041 #if CYTHON_COMPILING_IN_LIMITED_API | |
1042 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) | |
1043 #else | |
1044 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) | |
1045 #endif | |
1046 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 | |
1047 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ | |
1048 PyTypeObject *type = Py_TYPE((PyObject*)obj);\ | |
1049 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ | |
1050 PyObject_GC_Del(obj);\ | |
1051 Py_DECREF(type);\ | |
1052 } | |
1053 #else | |
1054 #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) | |
1055 #endif | |
1056 #if CYTHON_COMPILING_IN_LIMITED_API | |
1057 #define CYTHON_PEP393_ENABLED 1 | |
1058 #define __Pyx_PyUnicode_READY(op) (0) | |
1059 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) | |
1060 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) | |
1061 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) | |
1062 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) | |
1063 #define __Pyx_PyUnicode_DATA(u) ((void*)u) | |
1064 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) | |
1065 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) | |
1066 #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) | |
1067 #define CYTHON_PEP393_ENABLED 1 | |
1068 #if PY_VERSION_HEX >= 0x030C0000 | |
1069 #define __Pyx_PyUnicode_READY(op) (0) | |
1070 #else | |
1071 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ | |
1072 0 : _PyUnicode_Ready((PyObject *)(op))) | |
1073 #endif | |
1074 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) | |
1075 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) | |
1076 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) | |
1077 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) | |
1078 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) | |
1079 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) | |
1080 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) | |
1081 #if PY_VERSION_HEX >= 0x030C0000 | |
1082 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) | |
1083 #else | |
1084 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 | |
1085 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) | |
1086 #else | |
1087 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) | |
1088 #endif | |
1089 #endif | |
1090 #else | |
1091 #define CYTHON_PEP393_ENABLED 0 | |
1092 #define PyUnicode_1BYTE_KIND 1 | |
1093 #define PyUnicode_2BYTE_KIND 2 | |
1094 #define PyUnicode_4BYTE_KIND 4 | |
1095 #define __Pyx_PyUnicode_READY(op) (0) | |
1096 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) | |
1097 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) | |
1098 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) | |
1099 #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) | |
1100 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) | |
1101 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) | |
1102 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) | |
1103 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) | |
1104 #endif | |
1105 #if CYTHON_COMPILING_IN_PYPY | |
1106 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) | |
1107 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) | |
1108 #else | |
1109 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) | |
1110 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ | |
1111 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) | |
1112 #endif | |
1113 #if CYTHON_COMPILING_IN_PYPY | |
1114 #if !defined(PyUnicode_DecodeUnicodeEscape) | |
1115 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) | |
1116 #endif | |
1117 #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) | |
1118 #undef PyUnicode_Contains | |
1119 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) | |
1120 #endif | |
1121 #if !defined(PyByteArray_Check) | |
1122 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) | |
1123 #endif | |
1124 #if !defined(PyObject_Format) | |
1125 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) | |
1126 #endif | |
1127 #endif | |
1128 #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)) | |
1129 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) | |
1130 #if PY_MAJOR_VERSION >= 3 | |
1131 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) | |
1132 #else | |
1133 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) | |
1134 #endif | |
1135 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) | |
1136 #define PyObject_ASCII(o) PyObject_Repr(o) | |
1137 #endif | |
1138 #if PY_MAJOR_VERSION >= 3 | |
1139 #define PyBaseString_Type PyUnicode_Type | |
1140 #define PyStringObject PyUnicodeObject | |
1141 #define PyString_Type PyUnicode_Type | |
1142 #define PyString_Check PyUnicode_Check | |
1143 #define PyString_CheckExact PyUnicode_CheckExact | |
1144 #ifndef PyObject_Unicode | |
1145 #define PyObject_Unicode PyObject_Str | |
1146 #endif | |
1147 #endif | |
1148 #if PY_MAJOR_VERSION >= 3 | |
1149 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) | |
1150 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) | |
1151 #else | |
1152 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) | |
1153 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) | |
1154 #endif | |
1155 #if CYTHON_COMPILING_IN_CPYTHON | |
1156 #define __Pyx_PySequence_ListKeepNew(obj)\ | |
1157 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) | |
1158 #else | |
1159 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) | |
1160 #endif | |
1161 #ifndef PySet_CheckExact | |
1162 #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) | |
1163 #endif | |
1164 #if PY_VERSION_HEX >= 0x030900A4 | |
1165 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) | |
1166 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) | |
1167 #else | |
1168 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) | |
1169 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) | |
1170 #endif | |
1171 #if CYTHON_ASSUME_SAFE_MACROS | |
1172 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) | |
1173 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) | |
1174 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) | |
1175 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) | |
1176 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) | |
1177 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) | |
1178 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) | |
1179 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) | |
1180 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) | |
1181 #else | |
1182 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) | |
1183 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) | |
1184 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) | |
1185 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) | |
1186 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) | |
1187 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) | |
1188 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) | |
1189 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) | |
1190 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) | |
1191 #endif | |
1192 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 | |
1193 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) | |
1194 #else | |
1195 static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { | |
1196 PyObject *module = PyImport_AddModule(name); | |
1197 Py_XINCREF(module); | |
1198 return module; | |
1199 } | |
1200 #endif | |
1201 #if PY_MAJOR_VERSION >= 3 | |
1202 #define PyIntObject PyLongObject | |
1203 #define PyInt_Type PyLong_Type | |
1204 #define PyInt_Check(op) PyLong_Check(op) | |
1205 #define PyInt_CheckExact(op) PyLong_CheckExact(op) | |
1206 #define __Pyx_Py3Int_Check(op) PyLong_Check(op) | |
1207 #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) | |
1208 #define PyInt_FromString PyLong_FromString | |
1209 #define PyInt_FromUnicode PyLong_FromUnicode | |
1210 #define PyInt_FromLong PyLong_FromLong | |
1211 #define PyInt_FromSize_t PyLong_FromSize_t | |
1212 #define PyInt_FromSsize_t PyLong_FromSsize_t | |
1213 #define PyInt_AsLong PyLong_AsLong | |
1214 #define PyInt_AS_LONG PyLong_AS_LONG | |
1215 #define PyInt_AsSsize_t PyLong_AsSsize_t | |
1216 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask | |
1217 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask | |
1218 #define PyNumber_Int PyNumber_Long | |
1219 #else | |
1220 #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) | |
1221 #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) | |
1222 #endif | |
1223 #if PY_MAJOR_VERSION >= 3 | |
1224 #define PyBoolObject PyLongObject | |
1225 #endif | |
1226 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY | |
1227 #ifndef PyUnicode_InternFromString | |
1228 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) | |
1229 #endif | |
1230 #endif | |
1231 #if PY_VERSION_HEX < 0x030200A4 | |
1232 typedef long Py_hash_t; | |
1233 #define __Pyx_PyInt_FromHash_t PyInt_FromLong | |
1234 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t | |
1235 #else | |
1236 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t | |
1237 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t | |
1238 #endif | |
1239 #if CYTHON_USE_ASYNC_SLOTS | |
1240 #if PY_VERSION_HEX >= 0x030500B1 | |
1241 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods | |
1242 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) | |
1243 #else | |
1244 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) | |
1245 #endif | |
1246 #else | |
1247 #define __Pyx_PyType_AsAsync(obj) NULL | |
1248 #endif | |
1249 #ifndef __Pyx_PyAsyncMethodsStruct | |
1250 typedef struct { | |
1251 unaryfunc am_await; | |
1252 unaryfunc am_aiter; | |
1253 unaryfunc am_anext; | |
1254 } __Pyx_PyAsyncMethodsStruct; | |
1255 #endif | |
1256 | |
1257 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) | |
1258 #if !defined(_USE_MATH_DEFINES) | |
1259 #define _USE_MATH_DEFINES | |
1260 #endif | |
1261 #endif | |
1262 #include <math.h> | |
1263 #ifdef NAN | |
1264 #define __PYX_NAN() ((float) NAN) | |
1265 #else | |
1266 static CYTHON_INLINE float __PYX_NAN() { | |
1267 float value; | |
1268 memset(&value, 0xFF, sizeof(value)); | |
1269 return value; | |
1270 } | |
1271 #endif | |
1272 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) | |
1273 #define __Pyx_truncl trunc | |
1274 #else | |
1275 #define __Pyx_truncl truncl | |
1276 #endif | |
1277 | |
1278 #define __PYX_MARK_ERR_POS(f_index, lineno) \ | |
1279 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } | |
1280 #define __PYX_ERR(f_index, lineno, Ln_error) \ | |
1281 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } | |
1282 | |
1283 #ifdef CYTHON_EXTERN_C | |
1284 #undef __PYX_EXTERN_C | |
1285 #define __PYX_EXTERN_C CYTHON_EXTERN_C | |
1286 #elif defined(__PYX_EXTERN_C) | |
1287 #ifdef _MSC_VER | |
1288 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") | |
1289 #else | |
1290 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. | |
1291 #endif | |
1292 #else | |
1293 #ifdef __cplusplus | |
1294 #define __PYX_EXTERN_C extern "C" | |
1295 #else | |
1296 #define __PYX_EXTERN_C extern | |
1297 #endif | |
1298 #endif | |
1299 | |
1300 #define __PYX_HAVE__pysam__libctabixproxies | |
1301 #define __PYX_HAVE_API__pysam__libctabixproxies | |
1302 /* Early includes */ | |
1303 #include <stdint.h> | |
1304 #include <string.h> | |
1305 #include <stdio.h> | |
1306 #include <stddef.h> | |
1307 #include "pythread.h" | |
1308 #include <stdlib.h> | |
1309 | |
1310 #if CYTHON_COMPILING_IN_PYPY | |
1311 #ifdef _MSC_VER | |
1312 #pragma message ("This module uses CPython specific internals of 'array.array', which are not available in PyPy.") | |
1313 #else | |
1314 #warning This module uses CPython specific internals of 'array.array', which are not available in PyPy. | |
1315 #endif | |
1316 #endif | |
1317 | |
1318 #ifdef _OPENMP | |
1319 #include <omp.h> | |
1320 #endif /* _OPENMP */ | |
1321 | |
1322 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) | |
1323 #define CYTHON_WITHOUT_ASSERTIONS | |
1324 #endif | |
1325 | |
1326 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; | |
1327 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; | |
1328 | |
1329 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 | |
1330 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 | |
1331 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) | |
1332 #define __PYX_DEFAULT_STRING_ENCODING "" | |
1333 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString | |
1334 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize | |
1335 #define __Pyx_uchar_cast(c) ((unsigned char)c) | |
1336 #define __Pyx_long_cast(x) ((long)x) | |
1337 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ | |
1338 (sizeof(type) < sizeof(Py_ssize_t)) ||\ | |
1339 (sizeof(type) > sizeof(Py_ssize_t) &&\ | |
1340 likely(v < (type)PY_SSIZE_T_MAX ||\ | |
1341 v == (type)PY_SSIZE_T_MAX) &&\ | |
1342 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ | |
1343 v == (type)PY_SSIZE_T_MIN))) ||\ | |
1344 (sizeof(type) == sizeof(Py_ssize_t) &&\ | |
1345 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ | |
1346 v == (type)PY_SSIZE_T_MAX))) ) | |
1347 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { | |
1348 return (size_t) i < (size_t) limit; | |
1349 } | |
1350 #if defined (__cplusplus) && __cplusplus >= 201103L | |
1351 #include <cstdlib> | |
1352 #define __Pyx_sst_abs(value) std::abs(value) | |
1353 #elif SIZEOF_INT >= SIZEOF_SIZE_T | |
1354 #define __Pyx_sst_abs(value) abs(value) | |
1355 #elif SIZEOF_LONG >= SIZEOF_SIZE_T | |
1356 #define __Pyx_sst_abs(value) labs(value) | |
1357 #elif defined (_MSC_VER) | |
1358 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) | |
1359 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L | |
1360 #define __Pyx_sst_abs(value) llabs(value) | |
1361 #elif defined (__GNUC__) | |
1362 #define __Pyx_sst_abs(value) __builtin_llabs(value) | |
1363 #else | |
1364 #define __Pyx_sst_abs(value) ((value<0) ? -value : value) | |
1365 #endif | |
1366 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); | |
1367 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); | |
1368 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); | |
1369 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); | |
1370 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) | |
1371 #define __Pyx_PyBytes_FromString PyBytes_FromString | |
1372 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize | |
1373 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); | |
1374 #if PY_MAJOR_VERSION < 3 | |
1375 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString | |
1376 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize | |
1377 #else | |
1378 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString | |
1379 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize | |
1380 #endif | |
1381 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) | |
1382 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) | |
1383 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) | |
1384 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) | |
1385 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) | |
1386 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) | |
1387 #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) | |
1388 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) | |
1389 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) | |
1390 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) | |
1391 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) | |
1392 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) | |
1393 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) | |
1394 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) | |
1395 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) | |
1396 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) | |
1397 #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) | |
1398 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode | |
1399 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) | |
1400 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) | |
1401 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); | |
1402 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); | |
1403 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); | |
1404 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); | |
1405 #define __Pyx_PySequence_Tuple(obj)\ | |
1406 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) | |
1407 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); | |
1408 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); | |
1409 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); | |
1410 #if CYTHON_ASSUME_SAFE_MACROS | |
1411 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) | |
1412 #else | |
1413 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) | |
1414 #endif | |
1415 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) | |
1416 #if PY_MAJOR_VERSION >= 3 | |
1417 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) | |
1418 #else | |
1419 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) | |
1420 #endif | |
1421 #if CYTHON_USE_PYLONG_INTERNALS | |
1422 #if PY_VERSION_HEX >= 0x030C00A7 | |
1423 #ifndef _PyLong_SIGN_MASK | |
1424 #define _PyLong_SIGN_MASK 3 | |
1425 #endif | |
1426 #ifndef _PyLong_NON_SIZE_BITS | |
1427 #define _PyLong_NON_SIZE_BITS 3 | |
1428 #endif | |
1429 #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) | |
1430 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) | |
1431 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) | |
1432 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) | |
1433 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) | |
1434 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) | |
1435 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) | |
1436 #define __Pyx_PyLong_SignedDigitCount(x)\ | |
1437 ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) | |
1438 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) | |
1439 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) | |
1440 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) | |
1441 #else | |
1442 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) | |
1443 #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) | |
1444 #endif | |
1445 typedef Py_ssize_t __Pyx_compact_pylong; | |
1446 typedef size_t __Pyx_compact_upylong; | |
1447 #else | |
1448 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) | |
1449 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) | |
1450 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) | |
1451 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) | |
1452 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) | |
1453 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) | |
1454 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) | |
1455 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) | |
1456 #define __Pyx_PyLong_CompactValue(x)\ | |
1457 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) | |
1458 typedef sdigit __Pyx_compact_pylong; | |
1459 typedef digit __Pyx_compact_upylong; | |
1460 #endif | |
1461 #if PY_VERSION_HEX >= 0x030C00A5 | |
1462 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) | |
1463 #else | |
1464 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) | |
1465 #endif | |
1466 #endif | |
1467 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII | |
1468 #include <string.h> | |
1469 static int __Pyx_sys_getdefaultencoding_not_ascii; | |
1470 static int __Pyx_init_sys_getdefaultencoding_params(void) { | |
1471 PyObject* sys; | |
1472 PyObject* default_encoding = NULL; | |
1473 PyObject* ascii_chars_u = NULL; | |
1474 PyObject* ascii_chars_b = NULL; | |
1475 const char* default_encoding_c; | |
1476 sys = PyImport_ImportModule("sys"); | |
1477 if (!sys) goto bad; | |
1478 default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); | |
1479 Py_DECREF(sys); | |
1480 if (!default_encoding) goto bad; | |
1481 default_encoding_c = PyBytes_AsString(default_encoding); | |
1482 if (!default_encoding_c) goto bad; | |
1483 if (strcmp(default_encoding_c, "ascii") == 0) { | |
1484 __Pyx_sys_getdefaultencoding_not_ascii = 0; | |
1485 } else { | |
1486 char ascii_chars[128]; | |
1487 int c; | |
1488 for (c = 0; c < 128; c++) { | |
1489 ascii_chars[c] = (char) c; | |
1490 } | |
1491 __Pyx_sys_getdefaultencoding_not_ascii = 1; | |
1492 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); | |
1493 if (!ascii_chars_u) goto bad; | |
1494 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); | |
1495 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { | |
1496 PyErr_Format( | |
1497 PyExc_ValueError, | |
1498 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", | |
1499 default_encoding_c); | |
1500 goto bad; | |
1501 } | |
1502 Py_DECREF(ascii_chars_u); | |
1503 Py_DECREF(ascii_chars_b); | |
1504 } | |
1505 Py_DECREF(default_encoding); | |
1506 return 0; | |
1507 bad: | |
1508 Py_XDECREF(default_encoding); | |
1509 Py_XDECREF(ascii_chars_u); | |
1510 Py_XDECREF(ascii_chars_b); | |
1511 return -1; | |
1512 } | |
1513 #endif | |
1514 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 | |
1515 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) | |
1516 #else | |
1517 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) | |
1518 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT | |
1519 #include <string.h> | |
1520 static char* __PYX_DEFAULT_STRING_ENCODING; | |
1521 static int __Pyx_init_sys_getdefaultencoding_params(void) { | |
1522 PyObject* sys; | |
1523 PyObject* default_encoding = NULL; | |
1524 char* default_encoding_c; | |
1525 sys = PyImport_ImportModule("sys"); | |
1526 if (!sys) goto bad; | |
1527 default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); | |
1528 Py_DECREF(sys); | |
1529 if (!default_encoding) goto bad; | |
1530 default_encoding_c = PyBytes_AsString(default_encoding); | |
1531 if (!default_encoding_c) goto bad; | |
1532 __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); | |
1533 if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; | |
1534 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); | |
1535 Py_DECREF(default_encoding); | |
1536 return 0; | |
1537 bad: | |
1538 Py_XDECREF(default_encoding); | |
1539 return -1; | |
1540 } | |
1541 #endif | |
1542 #endif | |
1543 | |
1544 | |
1545 /* Test for GCC > 2.95 */ | |
1546 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) | |
1547 #define likely(x) __builtin_expect(!!(x), 1) | |
1548 #define unlikely(x) __builtin_expect(!!(x), 0) | |
1549 #else /* !__GNUC__ or GCC < 2.95 */ | |
1550 #define likely(x) (x) | |
1551 #define unlikely(x) (x) | |
1552 #endif /* __GNUC__ */ | |
1553 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } | |
1554 | |
1555 #if !CYTHON_USE_MODULE_STATE | |
1556 static PyObject *__pyx_m = NULL; | |
1557 #endif | |
1558 static int __pyx_lineno; | |
1559 static int __pyx_clineno = 0; | |
1560 static const char * __pyx_cfilenm = __FILE__; | |
1561 static const char *__pyx_filename; | |
1562 | |
1563 /* #### Code section: filename_table ### */ | |
1564 | |
1565 static const char *__pyx_f[] = { | |
1566 "pysam/libctabixproxies.pyx", | |
1567 "<stringsource>", | |
1568 "contextvars.pxd", | |
1569 "array.pxd", | |
1570 "type.pxd", | |
1571 "bool.pxd", | |
1572 "complex.pxd", | |
1573 }; | |
1574 /* #### Code section: utility_code_proto_before_types ### */ | |
1575 /* ForceInitThreads.proto */ | |
1576 #ifndef __PYX_FORCE_INIT_THREADS | |
1577 #define __PYX_FORCE_INIT_THREADS 0 | |
1578 #endif | |
1579 | |
1580 /* #### Code section: numeric_typedefs ### */ | |
1581 /* #### Code section: complex_type_declarations ### */ | |
1582 /* #### Code section: type_declarations ### */ | |
1583 | |
1584 /*--- Type declarations ---*/ | |
1585 #ifndef _ARRAYARRAY_H | |
1586 struct arrayobject; | |
1587 typedef struct arrayobject arrayobject; | |
1588 #endif | |
1589 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy; | |
1590 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator; | |
1591 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy; | |
1592 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy; | |
1593 struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy; | |
1594 struct __pyx_obj_5pysam_16libctabixproxies_BedProxy; | |
1595 struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy; | |
1596 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator; | |
1597 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator; | |
1598 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr; | |
1599 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v; | |
1600 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v; | |
1601 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v; | |
1602 struct __pyx_opt_args_7cpython_11contextvars_get_value; | |
1603 struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default; | |
1604 | |
1605 /* "cpython/contextvars.pxd":112 | |
1606 * | |
1607 * | |
1608 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< | |
1609 * """Return a new reference to the value of the context variable, | |
1610 * or the default value of the context variable, | |
1611 */ | |
1612 struct __pyx_opt_args_7cpython_11contextvars_get_value { | |
1613 int __pyx_n; | |
1614 PyObject *default_value; | |
1615 }; | |
1616 | |
1617 /* "cpython/contextvars.pxd":129 | |
1618 * | |
1619 * | |
1620 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< | |
1621 * """Return a new reference to the value of the context variable, | |
1622 * or the provided default value if no such value was found. | |
1623 */ | |
1624 struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default { | |
1625 int __pyx_n; | |
1626 PyObject *default_value; | |
1627 }; | |
1628 struct __pyx_opt_args_5pysam_9libcutils_parse_region; | |
1629 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array; | |
1630 struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring; | |
1631 struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring; | |
1632 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str; | |
1633 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes; | |
1634 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len; | |
1635 struct __pyx_opt_args_5pysam_9libcutils_force_str; | |
1636 struct __pyx_opt_args_5pysam_9libcutils_force_bytes; | |
1637 struct __pyx_opt_args_5pysam_9libcutils_decode_bytes; | |
1638 | |
1639 /* "pysam/libcutils.pxd":8 | |
1640 * from cpython cimport array as c_array | |
1641 * | |
1642 * cpdef parse_region(contig=*, start=*, stop=*, region=*, reference=*, end=*) # <<<<<<<<<<<<<< | |
1643 * | |
1644 * cdef int libc_whence_from_io(int whence) | |
1645 */ | |
1646 struct __pyx_opt_args_5pysam_9libcutils_parse_region { | |
1647 int __pyx_n; | |
1648 PyObject *contig; | |
1649 PyObject *start; | |
1650 PyObject *stop; | |
1651 PyObject *region; | |
1652 PyObject *reference; | |
1653 PyObject *end; | |
1654 }; | |
1655 | |
1656 /* "pysam/libcutils.pxd":15 | |
1657 * # Utility functions for quality string conversions | |
1658 * | |
1659 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*) # <<<<<<<<<<<<<< | |
1660 * cpdef array_to_qualitystring(c_array.array arr, int offset=*) | |
1661 * cpdef qualities_to_qualitystring(qualities, int offset=*) | |
1662 */ | |
1663 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array { | |
1664 int __pyx_n; | |
1665 int offset; | |
1666 }; | |
1667 | |
1668 /* "pysam/libcutils.pxd":16 | |
1669 * | |
1670 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*) | |
1671 * cpdef array_to_qualitystring(c_array.array arr, int offset=*) # <<<<<<<<<<<<<< | |
1672 * cpdef qualities_to_qualitystring(qualities, int offset=*) | |
1673 * | |
1674 */ | |
1675 struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring { | |
1676 int __pyx_n; | |
1677 int offset; | |
1678 }; | |
1679 | |
1680 /* "pysam/libcutils.pxd":17 | |
1681 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*) | |
1682 * cpdef array_to_qualitystring(c_array.array arr, int offset=*) | |
1683 * cpdef qualities_to_qualitystring(qualities, int offset=*) # <<<<<<<<<<<<<< | |
1684 * | |
1685 * ######################################################################## | |
1686 */ | |
1687 struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring { | |
1688 int __pyx_n; | |
1689 int offset; | |
1690 }; | |
1691 | |
1692 /* "pysam/libcutils.pxd":29 | |
1693 * ## Python 3 compatibility functions | |
1694 * ######################################################################## | |
1695 * cdef charptr_to_str(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<< | |
1696 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) | |
1697 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) | |
1698 */ | |
1699 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str { | |
1700 int __pyx_n; | |
1701 PyObject *encoding; | |
1702 PyObject *errors; | |
1703 }; | |
1704 | |
1705 /* "pysam/libcutils.pxd":30 | |
1706 * ######################################################################## | |
1707 * cdef charptr_to_str(const char *s, encoding=*, errors=*) | |
1708 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<< | |
1709 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) | |
1710 * cdef force_str(object s, encoding=*, errors=*) | |
1711 */ | |
1712 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes { | |
1713 int __pyx_n; | |
1714 PyObject *encoding; | |
1715 PyObject *errors; | |
1716 }; | |
1717 | |
1718 /* "pysam/libcutils.pxd":31 | |
1719 * cdef charptr_to_str(const char *s, encoding=*, errors=*) | |
1720 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) | |
1721 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) # <<<<<<<<<<<<<< | |
1722 * cdef force_str(object s, encoding=*, errors=*) | |
1723 * cdef bytes force_bytes(object s, encoding=*, errors=*) | |
1724 */ | |
1725 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len { | |
1726 int __pyx_n; | |
1727 PyObject *encoding; | |
1728 PyObject *errors; | |
1729 }; | |
1730 | |
1731 /* "pysam/libcutils.pxd":32 | |
1732 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) | |
1733 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) | |
1734 * cdef force_str(object s, encoding=*, errors=*) # <<<<<<<<<<<<<< | |
1735 * cdef bytes force_bytes(object s, encoding=*, errors=*) | |
1736 * cdef decode_bytes(bytes s, encoding=*, errors=*) | |
1737 */ | |
1738 struct __pyx_opt_args_5pysam_9libcutils_force_str { | |
1739 int __pyx_n; | |
1740 PyObject *encoding; | |
1741 PyObject *errors; | |
1742 }; | |
1743 | |
1744 /* "pysam/libcutils.pxd":33 | |
1745 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) | |
1746 * cdef force_str(object s, encoding=*, errors=*) | |
1747 * cdef bytes force_bytes(object s, encoding=*, errors=*) # <<<<<<<<<<<<<< | |
1748 * cdef decode_bytes(bytes s, encoding=*, errors=*) | |
1749 * cdef bytes encode_filename(object filename) | |
1750 */ | |
1751 struct __pyx_opt_args_5pysam_9libcutils_force_bytes { | |
1752 int __pyx_n; | |
1753 PyObject *encoding; | |
1754 PyObject *errors; | |
1755 }; | |
1756 | |
1757 /* "pysam/libcutils.pxd":34 | |
1758 * cdef force_str(object s, encoding=*, errors=*) | |
1759 * cdef bytes force_bytes(object s, encoding=*, errors=*) | |
1760 * cdef decode_bytes(bytes s, encoding=*, errors=*) # <<<<<<<<<<<<<< | |
1761 * cdef bytes encode_filename(object filename) | |
1762 * cdef from_string_and_size(const char *s, size_t length) | |
1763 */ | |
1764 struct __pyx_opt_args_5pysam_9libcutils_decode_bytes { | |
1765 int __pyx_n; | |
1766 PyObject *encoding; | |
1767 PyObject *errors; | |
1768 }; | |
1769 struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy; | |
1770 | |
1771 /* "pysam/libctabixproxies.pxd":23 | |
1772 * cdef take(self, char * buffer, size_t nbytes) | |
1773 * cdef present(self, char * buffer, size_t nbytes) | |
1774 * cdef copy(self, char * buffer, size_t nbytes, bint reset=*) # <<<<<<<<<<<<<< | |
1775 * cdef update(self, char * buffer, size_t nbytes) | |
1776 * | |
1777 */ | |
1778 struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy { | |
1779 int __pyx_n; | |
1780 int reset; | |
1781 }; | |
1782 | |
1783 /* "pysam/libctabixproxies.pxd":5 | |
1784 * from libc.stdint cimport uint8_t, int32_t, uint32_t, int64_t, uint64_t | |
1785 * | |
1786 * cdef class TupleProxy: # <<<<<<<<<<<<<< | |
1787 * | |
1788 * cdef: | |
1789 */ | |
1790 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy { | |
1791 PyObject_HEAD | |
1792 struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *__pyx_vtab; | |
1793 char *data; | |
1794 char **fields; | |
1795 int nfields; | |
1796 int nbytes; | |
1797 int offset; | |
1798 int is_modified; | |
1799 PyObject *encoding; | |
1800 }; | |
1801 | |
1802 | |
1803 /* "pysam/libctabixproxies.pxd":27 | |
1804 * | |
1805 * | |
1806 * cdef class TupleProxyIterator: # <<<<<<<<<<<<<< | |
1807 * cdef TupleProxy proxy | |
1808 * cdef int index | |
1809 */ | |
1810 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator { | |
1811 PyObject_HEAD | |
1812 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *proxy; | |
1813 int index; | |
1814 }; | |
1815 | |
1816 | |
1817 /* "pysam/libctabixproxies.pxd":32 | |
1818 * | |
1819 * | |
1820 * cdef class NamedTupleProxy(TupleProxy): # <<<<<<<<<<<<<< | |
1821 * pass | |
1822 * | |
1823 */ | |
1824 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy { | |
1825 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy __pyx_base; | |
1826 }; | |
1827 | |
1828 | |
1829 /* "pysam/libctabixproxies.pxd":36 | |
1830 * | |
1831 * | |
1832 * cdef class GTFProxy(NamedTupleProxy): # <<<<<<<<<<<<<< | |
1833 * cdef object attribute_dict | |
1834 * cpdef int getMaxFields(self) | |
1835 */ | |
1836 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy { | |
1837 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; | |
1838 PyObject *attribute_dict; | |
1839 }; | |
1840 | |
1841 | |
1842 /* "pysam/libctabixproxies.pxd":42 | |
1843 * | |
1844 * | |
1845 * cdef class GFF3Proxy(GTFProxy): # <<<<<<<<<<<<<< | |
1846 * pass | |
1847 * | |
1848 */ | |
1849 struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy { | |
1850 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy __pyx_base; | |
1851 }; | |
1852 | |
1853 | |
1854 /* "pysam/libctabixproxies.pxd":46 | |
1855 * | |
1856 * | |
1857 * cdef class BedProxy(NamedTupleProxy): # <<<<<<<<<<<<<< | |
1858 * | |
1859 * cdef: | |
1860 */ | |
1861 struct __pyx_obj_5pysam_16libctabixproxies_BedProxy { | |
1862 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; | |
1863 char *contig; | |
1864 uint32_t start; | |
1865 uint32_t end; | |
1866 int bedfields; | |
1867 }; | |
1868 | |
1869 | |
1870 /* "pysam/libctabixproxies.pxd":58 | |
1871 * cdef update(self, char * buffer, size_t nbytes) | |
1872 * | |
1873 * cdef class VCFProxy(NamedTupleProxy) : # <<<<<<<<<<<<<< | |
1874 * | |
1875 * cdef: | |
1876 */ | |
1877 struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy { | |
1878 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; | |
1879 char *contig; | |
1880 uint32_t pos; | |
1881 }; | |
1882 | |
1883 | |
1884 /* "pysam/libctabixproxies.pyx":566 | |
1885 * return self.separator.join(aa) + ";" | |
1886 * | |
1887 * def attribute_string2iterator(self, s): # <<<<<<<<<<<<<< | |
1888 * """convert attribute string in GTF format to records | |
1889 * and iterate over key, value pairs. | |
1890 */ | |
1891 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator { | |
1892 PyObject_HEAD | |
1893 PyObject *__pyx_v_attributes; | |
1894 PyObject *__pyx_v_d; | |
1895 PyObject *__pyx_v_f; | |
1896 PyObject *__pyx_v_fields; | |
1897 PyObject *__pyx_v_n; | |
1898 PyObject *__pyx_v_s; | |
1899 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self; | |
1900 PyObject *__pyx_v_v; | |
1901 PyObject *__pyx_7genexpr__pyx_v_x; | |
1902 PyObject *__pyx_8genexpr1__pyx_v_x; | |
1903 PyObject *__pyx_t_0; | |
1904 Py_ssize_t __pyx_t_1; | |
1905 }; | |
1906 | |
1907 | |
1908 /* "pysam/libctabixproxies.pyx":679 | |
1909 * return ";".join(["{}={}".format(k, v) for k, v in d.items()]) | |
1910 * | |
1911 * def attribute_string2iterator(self, s): # <<<<<<<<<<<<<< | |
1912 * """convert attribute string in GFF3 format to records | |
1913 * and iterate over key, value pairs. | |
1914 */ | |
1915 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator { | |
1916 PyObject_HEAD | |
1917 PyObject *__pyx_v_f; | |
1918 PyObject *__pyx_v_genexpr; | |
1919 PyObject *__pyx_v_key; | |
1920 PyObject *__pyx_v_s; | |
1921 struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *__pyx_v_self; | |
1922 PyObject *__pyx_v_value; | |
1923 PyObject *__pyx_t_0; | |
1924 Py_ssize_t __pyx_t_1; | |
1925 PyObject *(*__pyx_t_2)(PyObject *); | |
1926 }; | |
1927 | |
1928 | |
1929 /* "pysam/libctabixproxies.pyx":684 | |
1930 * """ | |
1931 * | |
1932 * for f in (x.strip() for x in s.split(";")): # <<<<<<<<<<<<<< | |
1933 * if not f: | |
1934 * continue | |
1935 */ | |
1936 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr { | |
1937 PyObject_HEAD | |
1938 PyObject *__pyx_genexpr_arg_0; | |
1939 PyObject *__pyx_v_x; | |
1940 PyObject *__pyx_t_0; | |
1941 Py_ssize_t __pyx_t_1; | |
1942 PyObject *(*__pyx_t_2)(PyObject *); | |
1943 }; | |
1944 | |
1945 | |
1946 /* "cfunc.to_py":66 | |
1947 * | |
1948 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v") | |
1949 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(object (*f)(object) ): # <<<<<<<<<<<<<< | |
1950 * def wrap(object v): | |
1951 * """wrap(v)""" | |
1952 */ | |
1953 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v { | |
1954 PyObject_HEAD | |
1955 PyObject *(*__pyx_v_f)(PyObject *); | |
1956 }; | |
1957 | |
1958 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v { | |
1959 PyObject_HEAD | |
1960 int (*__pyx_v_f)(PyObject *); | |
1961 }; | |
1962 | |
1963 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v { | |
1964 PyObject_HEAD | |
1965 PyObject *(*__pyx_v_f)(int); | |
1966 }; | |
1967 | |
1968 | |
1969 | |
1970 /* "pysam/libctabixproxies.pyx":31 | |
1971 * | |
1972 * | |
1973 * cdef class TupleProxy: # <<<<<<<<<<<<<< | |
1974 * '''Proxy class for access to parsed row as a tuple. | |
1975 * | |
1976 */ | |
1977 | |
1978 struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy { | |
1979 int (*getMaxFields)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch); | |
1980 int (*getMinFields)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch); | |
1981 PyObject *(*take)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t); | |
1982 PyObject *(*present)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t); | |
1983 PyObject *(*copy)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t, struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy *__pyx_optional_args); | |
1984 PyObject *(*update)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t); | |
1985 }; | |
1986 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *__pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy; | |
1987 | |
1988 | |
1989 /* "pysam/libctabixproxies.pyx":360 | |
1990 * | |
1991 * | |
1992 * cdef class NamedTupleProxy(TupleProxy): # <<<<<<<<<<<<<< | |
1993 * | |
1994 * map_key2field = {} | |
1995 */ | |
1996 | |
1997 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy { | |
1998 struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy __pyx_base; | |
1999 }; | |
2000 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy; | |
2001 | |
2002 | |
2003 /* "pysam/libctabixproxies.pyx":415 | |
2004 * | |
2005 * | |
2006 * cdef class GTFProxy(NamedTupleProxy): # <<<<<<<<<<<<<< | |
2007 * '''Proxy class for access to GTF fields. | |
2008 * | |
2009 */ | |
2010 | |
2011 struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy { | |
2012 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; | |
2013 }; | |
2014 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy *__pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy; | |
2015 | |
2016 | |
2017 /* "pysam/libctabixproxies.pyx":673 | |
2018 * | |
2019 * | |
2020 * cdef class GFF3Proxy(GTFProxy): # <<<<<<<<<<<<<< | |
2021 * | |
2022 * def dict2attribute_string(self, d): | |
2023 */ | |
2024 | |
2025 struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy { | |
2026 struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy __pyx_base; | |
2027 }; | |
2028 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy *__pyx_vtabptr_5pysam_16libctabixproxies_GFF3Proxy; | |
2029 | |
2030 | |
2031 /* "pysam/libctabixproxies.pyx":703 | |
2032 * | |
2033 * | |
2034 * cdef class BedProxy(NamedTupleProxy): # <<<<<<<<<<<<<< | |
2035 * '''Proxy class for access to Bed fields. | |
2036 * | |
2037 */ | |
2038 | |
2039 struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy { | |
2040 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; | |
2041 }; | |
2042 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy *__pyx_vtabptr_5pysam_16libctabixproxies_BedProxy; | |
2043 | |
2044 | |
2045 /* "pysam/libctabixproxies.pyx":776 | |
2046 * | |
2047 * | |
2048 * cdef class VCFProxy(NamedTupleProxy): # <<<<<<<<<<<<<< | |
2049 * '''Proxy class for access to VCF fields. | |
2050 * | |
2051 */ | |
2052 | |
2053 struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy { | |
2054 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; | |
2055 }; | |
2056 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy *__pyx_vtabptr_5pysam_16libctabixproxies_VCFProxy; | |
2057 /* #### Code section: utility_code_proto ### */ | |
2058 | |
2059 /* --- Runtime support code (head) --- */ | |
2060 /* Refnanny.proto */ | |
2061 #ifndef CYTHON_REFNANNY | |
2062 #define CYTHON_REFNANNY 0 | |
2063 #endif | |
2064 #if CYTHON_REFNANNY | |
2065 typedef struct { | |
2066 void (*INCREF)(void*, PyObject*, Py_ssize_t); | |
2067 void (*DECREF)(void*, PyObject*, Py_ssize_t); | |
2068 void (*GOTREF)(void*, PyObject*, Py_ssize_t); | |
2069 void (*GIVEREF)(void*, PyObject*, Py_ssize_t); | |
2070 void* (*SetupContext)(const char*, Py_ssize_t, const char*); | |
2071 void (*FinishContext)(void**); | |
2072 } __Pyx_RefNannyAPIStruct; | |
2073 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; | |
2074 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); | |
2075 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; | |
2076 #ifdef WITH_THREAD | |
2077 #define __Pyx_RefNannySetupContext(name, acquire_gil)\ | |
2078 if (acquire_gil) {\ | |
2079 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ | |
2080 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ | |
2081 PyGILState_Release(__pyx_gilstate_save);\ | |
2082 } else {\ | |
2083 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ | |
2084 } | |
2085 #define __Pyx_RefNannyFinishContextNogil() {\ | |
2086 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ | |
2087 __Pyx_RefNannyFinishContext();\ | |
2088 PyGILState_Release(__pyx_gilstate_save);\ | |
2089 } | |
2090 #else | |
2091 #define __Pyx_RefNannySetupContext(name, acquire_gil)\ | |
2092 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) | |
2093 #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() | |
2094 #endif | |
2095 #define __Pyx_RefNannyFinishContextNogil() {\ | |
2096 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ | |
2097 __Pyx_RefNannyFinishContext();\ | |
2098 PyGILState_Release(__pyx_gilstate_save);\ | |
2099 } | |
2100 #define __Pyx_RefNannyFinishContext()\ | |
2101 __Pyx_RefNanny->FinishContext(&__pyx_refnanny) | |
2102 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) | |
2103 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) | |
2104 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) | |
2105 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) | |
2106 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) | |
2107 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) | |
2108 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) | |
2109 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) | |
2110 #else | |
2111 #define __Pyx_RefNannyDeclarations | |
2112 #define __Pyx_RefNannySetupContext(name, acquire_gil) | |
2113 #define __Pyx_RefNannyFinishContextNogil() | |
2114 #define __Pyx_RefNannyFinishContext() | |
2115 #define __Pyx_INCREF(r) Py_INCREF(r) | |
2116 #define __Pyx_DECREF(r) Py_DECREF(r) | |
2117 #define __Pyx_GOTREF(r) | |
2118 #define __Pyx_GIVEREF(r) | |
2119 #define __Pyx_XINCREF(r) Py_XINCREF(r) | |
2120 #define __Pyx_XDECREF(r) Py_XDECREF(r) | |
2121 #define __Pyx_XGOTREF(r) | |
2122 #define __Pyx_XGIVEREF(r) | |
2123 #endif | |
2124 #define __Pyx_Py_XDECREF_SET(r, v) do {\ | |
2125 PyObject *tmp = (PyObject *) r;\ | |
2126 r = v; Py_XDECREF(tmp);\ | |
2127 } while (0) | |
2128 #define __Pyx_XDECREF_SET(r, v) do {\ | |
2129 PyObject *tmp = (PyObject *) r;\ | |
2130 r = v; __Pyx_XDECREF(tmp);\ | |
2131 } while (0) | |
2132 #define __Pyx_DECREF_SET(r, v) do {\ | |
2133 PyObject *tmp = (PyObject *) r;\ | |
2134 r = v; __Pyx_DECREF(tmp);\ | |
2135 } while (0) | |
2136 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) | |
2137 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) | |
2138 | |
2139 /* PyErrExceptionMatches.proto */ | |
2140 #if CYTHON_FAST_THREAD_STATE | |
2141 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) | |
2142 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); | |
2143 #else | |
2144 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) | |
2145 #endif | |
2146 | |
2147 /* PyThreadStateGet.proto */ | |
2148 #if CYTHON_FAST_THREAD_STATE | |
2149 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; | |
2150 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; | |
2151 #if PY_VERSION_HEX >= 0x030C00A6 | |
2152 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) | |
2153 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) | |
2154 #else | |
2155 #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) | |
2156 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) | |
2157 #endif | |
2158 #else | |
2159 #define __Pyx_PyThreadState_declare | |
2160 #define __Pyx_PyThreadState_assign | |
2161 #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) | |
2162 #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() | |
2163 #endif | |
2164 | |
2165 /* PyErrFetchRestore.proto */ | |
2166 #if CYTHON_FAST_THREAD_STATE | |
2167 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) | |
2168 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) | |
2169 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) | |
2170 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) | |
2171 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) | |
2172 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); | |
2173 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); | |
2174 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 | |
2175 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) | |
2176 #else | |
2177 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) | |
2178 #endif | |
2179 #else | |
2180 #define __Pyx_PyErr_Clear() PyErr_Clear() | |
2181 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) | |
2182 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) | |
2183 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) | |
2184 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) | |
2185 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) | |
2186 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) | |
2187 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) | |
2188 #endif | |
2189 | |
2190 /* PyObjectGetAttrStr.proto */ | |
2191 #if CYTHON_USE_TYPE_SLOTS | |
2192 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); | |
2193 #else | |
2194 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) | |
2195 #endif | |
2196 | |
2197 /* PyObjectGetAttrStrNoError.proto */ | |
2198 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); | |
2199 | |
2200 /* GetBuiltinName.proto */ | |
2201 static PyObject *__Pyx_GetBuiltinName(PyObject *name); | |
2202 | |
2203 /* TupleAndListFromArray.proto */ | |
2204 #if CYTHON_COMPILING_IN_CPYTHON | |
2205 static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); | |
2206 static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); | |
2207 #endif | |
2208 | |
2209 /* IncludeStringH.proto */ | |
2210 #include <string.h> | |
2211 | |
2212 /* BytesEquals.proto */ | |
2213 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); | |
2214 | |
2215 /* UnicodeEquals.proto */ | |
2216 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); | |
2217 | |
2218 /* fastcall.proto */ | |
2219 #if CYTHON_AVOID_BORROWED_REFS | |
2220 #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) | |
2221 #elif CYTHON_ASSUME_SAFE_MACROS | |
2222 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) | |
2223 #else | |
2224 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) | |
2225 #endif | |
2226 #if CYTHON_AVOID_BORROWED_REFS | |
2227 #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) | |
2228 #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) | |
2229 #else | |
2230 #define __Pyx_Arg_NewRef_VARARGS(arg) arg | |
2231 #define __Pyx_Arg_XDECREF_VARARGS(arg) | |
2232 #endif | |
2233 #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) | |
2234 #define __Pyx_KwValues_VARARGS(args, nargs) NULL | |
2235 #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) | |
2236 #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) | |
2237 #if CYTHON_METH_FASTCALL | |
2238 #define __Pyx_Arg_FASTCALL(args, i) args[i] | |
2239 #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) | |
2240 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) | |
2241 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); | |
2242 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 | |
2243 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); | |
2244 #else | |
2245 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) | |
2246 #endif | |
2247 #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs | |
2248 to have the same reference counting */ | |
2249 #define __Pyx_Arg_XDECREF_FASTCALL(arg) | |
2250 #else | |
2251 #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS | |
2252 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS | |
2253 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS | |
2254 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS | |
2255 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS | |
2256 #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) | |
2257 #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) | |
2258 #endif | |
2259 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
2260 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) | |
2261 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) | |
2262 #else | |
2263 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) | |
2264 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) | |
2265 #endif | |
2266 | |
2267 /* RaiseDoubleKeywords.proto */ | |
2268 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); | |
2269 | |
2270 /* ParseKeywords.proto */ | |
2271 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, | |
2272 PyObject **argnames[], | |
2273 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, | |
2274 const char* function_name); | |
2275 | |
2276 /* RaiseArgTupleInvalid.proto */ | |
2277 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, | |
2278 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); | |
2279 | |
2280 /* IncludeStructmemberH.proto */ | |
2281 #include <structmember.h> | |
2282 | |
2283 /* FixUpExtensionType.proto */ | |
2284 #if CYTHON_USE_TYPE_SPECS | |
2285 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); | |
2286 #endif | |
2287 | |
2288 /* FetchSharedCythonModule.proto */ | |
2289 static PyObject *__Pyx_FetchSharedCythonABIModule(void); | |
2290 | |
2291 /* FetchCommonType.proto */ | |
2292 #if !CYTHON_USE_TYPE_SPECS | |
2293 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); | |
2294 #else | |
2295 static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); | |
2296 #endif | |
2297 | |
2298 /* PyMethodNew.proto */ | |
2299 #if CYTHON_COMPILING_IN_LIMITED_API | |
2300 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { | |
2301 PyObject *typesModule=NULL, *methodType=NULL, *result=NULL; | |
2302 CYTHON_UNUSED_VAR(typ); | |
2303 if (!self) | |
2304 return __Pyx_NewRef(func); | |
2305 typesModule = PyImport_ImportModule("types"); | |
2306 if (!typesModule) return NULL; | |
2307 methodType = PyObject_GetAttrString(typesModule, "MethodType"); | |
2308 Py_DECREF(typesModule); | |
2309 if (!methodType) return NULL; | |
2310 result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL); | |
2311 Py_DECREF(methodType); | |
2312 return result; | |
2313 } | |
2314 #elif PY_MAJOR_VERSION >= 3 | |
2315 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { | |
2316 CYTHON_UNUSED_VAR(typ); | |
2317 if (!self) | |
2318 return __Pyx_NewRef(func); | |
2319 return PyMethod_New(func, self); | |
2320 } | |
2321 #else | |
2322 #define __Pyx_PyMethod_New PyMethod_New | |
2323 #endif | |
2324 | |
2325 /* PyVectorcallFastCallDict.proto */ | |
2326 #if CYTHON_METH_FASTCALL | |
2327 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); | |
2328 #endif | |
2329 | |
2330 /* CythonFunctionShared.proto */ | |
2331 #define __Pyx_CyFunction_USED | |
2332 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 | |
2333 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 | |
2334 #define __Pyx_CYFUNCTION_CCLASS 0x04 | |
2335 #define __Pyx_CYFUNCTION_COROUTINE 0x08 | |
2336 #define __Pyx_CyFunction_GetClosure(f)\ | |
2337 (((__pyx_CyFunctionObject *) (f))->func_closure) | |
2338 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API | |
2339 #define __Pyx_CyFunction_GetClassObj(f)\ | |
2340 (((__pyx_CyFunctionObject *) (f))->func_classobj) | |
2341 #else | |
2342 #define __Pyx_CyFunction_GetClassObj(f)\ | |
2343 ((PyObject*) ((PyCMethodObject *) (f))->mm_class) | |
2344 #endif | |
2345 #define __Pyx_CyFunction_SetClassObj(f, classobj)\ | |
2346 __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) | |
2347 #define __Pyx_CyFunction_Defaults(type, f)\ | |
2348 ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) | |
2349 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ | |
2350 ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) | |
2351 typedef struct { | |
2352 #if CYTHON_COMPILING_IN_LIMITED_API | |
2353 PyObject_HEAD | |
2354 PyObject *func; | |
2355 #elif PY_VERSION_HEX < 0x030900B1 | |
2356 PyCFunctionObject func; | |
2357 #else | |
2358 PyCMethodObject func; | |
2359 #endif | |
2360 #if CYTHON_BACKPORT_VECTORCALL | |
2361 __pyx_vectorcallfunc func_vectorcall; | |
2362 #endif | |
2363 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API | |
2364 PyObject *func_weakreflist; | |
2365 #endif | |
2366 PyObject *func_dict; | |
2367 PyObject *func_name; | |
2368 PyObject *func_qualname; | |
2369 PyObject *func_doc; | |
2370 PyObject *func_globals; | |
2371 PyObject *func_code; | |
2372 PyObject *func_closure; | |
2373 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API | |
2374 PyObject *func_classobj; | |
2375 #endif | |
2376 void *defaults; | |
2377 int defaults_pyobjects; | |
2378 size_t defaults_size; | |
2379 int flags; | |
2380 PyObject *defaults_tuple; | |
2381 PyObject *defaults_kwdict; | |
2382 PyObject *(*defaults_getter)(PyObject *); | |
2383 PyObject *func_annotations; | |
2384 PyObject *func_is_coroutine; | |
2385 } __pyx_CyFunctionObject; | |
2386 #undef __Pyx_CyOrPyCFunction_Check | |
2387 #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) | |
2388 #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) | |
2389 #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) | |
2390 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); | |
2391 #undef __Pyx_IsSameCFunction | |
2392 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) | |
2393 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, | |
2394 int flags, PyObject* qualname, | |
2395 PyObject *closure, | |
2396 PyObject *module, PyObject *globals, | |
2397 PyObject* code); | |
2398 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); | |
2399 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, | |
2400 size_t size, | |
2401 int pyobjects); | |
2402 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, | |
2403 PyObject *tuple); | |
2404 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, | |
2405 PyObject *dict); | |
2406 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, | |
2407 PyObject *dict); | |
2408 static int __pyx_CyFunction_init(PyObject *module); | |
2409 #if CYTHON_METH_FASTCALL | |
2410 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); | |
2411 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); | |
2412 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); | |
2413 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); | |
2414 #if CYTHON_BACKPORT_VECTORCALL | |
2415 #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) | |
2416 #else | |
2417 #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) | |
2418 #endif | |
2419 #endif | |
2420 | |
2421 /* CythonFunction.proto */ | |
2422 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, | |
2423 int flags, PyObject* qualname, | |
2424 PyObject *closure, | |
2425 PyObject *module, PyObject *globals, | |
2426 PyObject* code); | |
2427 | |
2428 /* WriteUnraisableException.proto */ | |
2429 static void __Pyx_WriteUnraisable(const char *name, int clineno, | |
2430 int lineno, const char *filename, | |
2431 int full_traceback, int nogil); | |
2432 | |
2433 /* KeywordStringCheck.proto */ | |
2434 static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed); | |
2435 | |
2436 /* PyObjectCall.proto */ | |
2437 #if CYTHON_COMPILING_IN_CPYTHON | |
2438 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); | |
2439 #else | |
2440 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) | |
2441 #endif | |
2442 | |
2443 /* RaiseException.proto */ | |
2444 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); | |
2445 | |
2446 /* PyFunctionFastCall.proto */ | |
2447 #if CYTHON_FAST_PYCALL | |
2448 #if !CYTHON_VECTORCALL | |
2449 #define __Pyx_PyFunction_FastCall(func, args, nargs)\ | |
2450 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) | |
2451 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); | |
2452 #endif | |
2453 #define __Pyx_BUILD_ASSERT_EXPR(cond)\ | |
2454 (sizeof(char [1 - 2*!(cond)]) - 1) | |
2455 #ifndef Py_MEMBER_SIZE | |
2456 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) | |
2457 #endif | |
2458 #if !CYTHON_VECTORCALL | |
2459 #if PY_VERSION_HEX >= 0x03080000 | |
2460 #include "frameobject.h" | |
2461 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API | |
2462 #ifndef Py_BUILD_CORE | |
2463 #define Py_BUILD_CORE 1 | |
2464 #endif | |
2465 #include "internal/pycore_frame.h" | |
2466 #endif | |
2467 #define __Pxy_PyFrame_Initialize_Offsets() | |
2468 #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) | |
2469 #else | |
2470 static size_t __pyx_pyframe_localsplus_offset = 0; | |
2471 #include "frameobject.h" | |
2472 #define __Pxy_PyFrame_Initialize_Offsets()\ | |
2473 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ | |
2474 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) | |
2475 #define __Pyx_PyFrame_GetLocalsplus(frame)\ | |
2476 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) | |
2477 #endif | |
2478 #endif | |
2479 #endif | |
2480 | |
2481 /* PyObjectCallMethO.proto */ | |
2482 #if CYTHON_COMPILING_IN_CPYTHON | |
2483 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); | |
2484 #endif | |
2485 | |
2486 /* PyObjectFastCall.proto */ | |
2487 #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) | |
2488 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); | |
2489 | |
2490 /* ExtTypeTest.proto */ | |
2491 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); | |
2492 | |
2493 /* ArgTypeTest.proto */ | |
2494 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ | |
2495 ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ | |
2496 __Pyx__ArgTypeTest(obj, type, name, exact)) | |
2497 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); | |
2498 | |
2499 /* PyIntCompare.proto */ | |
2500 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); | |
2501 | |
2502 /* PyIntCompare.proto */ | |
2503 static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace); | |
2504 | |
2505 /* PyObjectCallOneArg.proto */ | |
2506 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); | |
2507 | |
2508 /* PyDictVersioning.proto */ | |
2509 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS | |
2510 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) | |
2511 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) | |
2512 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ | |
2513 (version_var) = __PYX_GET_DICT_VERSION(dict);\ | |
2514 (cache_var) = (value); | |
2515 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ | |
2516 static PY_UINT64_T __pyx_dict_version = 0;\ | |
2517 static PyObject *__pyx_dict_cached_value = NULL;\ | |
2518 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ | |
2519 (VAR) = __pyx_dict_cached_value;\ | |
2520 } else {\ | |
2521 (VAR) = __pyx_dict_cached_value = (LOOKUP);\ | |
2522 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ | |
2523 }\ | |
2524 } | |
2525 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); | |
2526 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); | |
2527 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); | |
2528 #else | |
2529 #define __PYX_GET_DICT_VERSION(dict) (0) | |
2530 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) | |
2531 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); | |
2532 #endif | |
2533 | |
2534 /* AssertionsEnabled.proto */ | |
2535 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) | |
2536 #define __Pyx_init_assertions_enabled() (0) | |
2537 #define __pyx_assertions_enabled() (1) | |
2538 #elif CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000) | |
2539 static int __pyx_assertions_enabled_flag; | |
2540 #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) | |
2541 static int __Pyx_init_assertions_enabled(void) { | |
2542 PyObject *builtins, *debug, *debug_str; | |
2543 int flag; | |
2544 builtins = PyEval_GetBuiltins(); | |
2545 if (!builtins) goto bad; | |
2546 debug_str = PyUnicode_FromStringAndSize("__debug__", 9); | |
2547 if (!debug_str) goto bad; | |
2548 debug = PyObject_GetItem(builtins, debug_str); | |
2549 Py_DECREF(debug_str); | |
2550 if (!debug) goto bad; | |
2551 flag = PyObject_IsTrue(debug); | |
2552 Py_DECREF(debug); | |
2553 if (flag == -1) goto bad; | |
2554 __pyx_assertions_enabled_flag = flag; | |
2555 return 0; | |
2556 bad: | |
2557 __pyx_assertions_enabled_flag = 1; | |
2558 return -1; | |
2559 } | |
2560 #else | |
2561 #define __Pyx_init_assertions_enabled() (0) | |
2562 #define __pyx_assertions_enabled() (!Py_OptimizeFlag) | |
2563 #endif | |
2564 | |
2565 /* RaiseTooManyValuesToUnpack.proto */ | |
2566 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); | |
2567 | |
2568 /* RaiseNeedMoreValuesToUnpack.proto */ | |
2569 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); | |
2570 | |
2571 /* IterFinish.proto */ | |
2572 static CYTHON_INLINE int __Pyx_IterFinish(void); | |
2573 | |
2574 /* UnpackItemEndCheck.proto */ | |
2575 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); | |
2576 | |
2577 /* ListAppend.proto */ | |
2578 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS | |
2579 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { | |
2580 PyListObject* L = (PyListObject*) list; | |
2581 Py_ssize_t len = Py_SIZE(list); | |
2582 if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { | |
2583 Py_INCREF(x); | |
2584 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 | |
2585 L->ob_item[len] = x; | |
2586 #else | |
2587 PyList_SET_ITEM(list, len, x); | |
2588 #endif | |
2589 __Pyx_SET_SIZE(list, len + 1); | |
2590 return 0; | |
2591 } | |
2592 return PyList_Append(list, x); | |
2593 } | |
2594 #else | |
2595 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) | |
2596 #endif | |
2597 | |
2598 /* PyObjectCall2Args.proto */ | |
2599 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); | |
2600 | |
2601 /* PyObjectGetMethod.proto */ | |
2602 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); | |
2603 | |
2604 /* PyObjectCallMethod1.proto */ | |
2605 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); | |
2606 | |
2607 /* append.proto */ | |
2608 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); | |
2609 | |
2610 /* GetAttr3.proto */ | |
2611 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); | |
2612 | |
2613 /* GetModuleGlobalName.proto */ | |
2614 #if CYTHON_USE_DICT_VERSIONS | |
2615 #define __Pyx_GetModuleGlobalName(var, name) do {\ | |
2616 static PY_UINT64_T __pyx_dict_version = 0;\ | |
2617 static PyObject *__pyx_dict_cached_value = NULL;\ | |
2618 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ | |
2619 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ | |
2620 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ | |
2621 } while(0) | |
2622 #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ | |
2623 PY_UINT64_T __pyx_dict_version;\ | |
2624 PyObject *__pyx_dict_cached_value;\ | |
2625 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ | |
2626 } while(0) | |
2627 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); | |
2628 #else | |
2629 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) | |
2630 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) | |
2631 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); | |
2632 #endif | |
2633 | |
2634 /* RaiseUnexpectedTypeError.proto */ | |
2635 static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); | |
2636 | |
2637 /* PyObject_Unicode.proto */ | |
2638 #if PY_MAJOR_VERSION >= 3 | |
2639 #define __Pyx_PyObject_Unicode(obj)\ | |
2640 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) | |
2641 #else | |
2642 #define __Pyx_PyObject_Unicode(obj)\ | |
2643 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj)) | |
2644 #endif | |
2645 | |
2646 /* GetItemInt.proto */ | |
2647 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ | |
2648 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ | |
2649 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ | |
2650 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ | |
2651 __Pyx_GetItemInt_Generic(o, to_py_func(i)))) | |
2652 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ | |
2653 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ | |
2654 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ | |
2655 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) | |
2656 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, | |
2657 int wraparound, int boundscheck); | |
2658 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ | |
2659 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ | |
2660 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ | |
2661 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) | |
2662 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, | |
2663 int wraparound, int boundscheck); | |
2664 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); | |
2665 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, | |
2666 int is_list, int wraparound, int boundscheck); | |
2667 | |
2668 /* ObjectGetItem.proto */ | |
2669 #if CYTHON_USE_TYPE_SLOTS | |
2670 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); | |
2671 #else | |
2672 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) | |
2673 #endif | |
2674 | |
2675 /* GetTopmostException.proto */ | |
2676 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE | |
2677 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); | |
2678 #endif | |
2679 | |
2680 /* SaveResetException.proto */ | |
2681 #if CYTHON_FAST_THREAD_STATE | |
2682 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) | |
2683 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); | |
2684 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) | |
2685 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); | |
2686 #else | |
2687 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) | |
2688 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) | |
2689 #endif | |
2690 | |
2691 /* GetException.proto */ | |
2692 #if CYTHON_FAST_THREAD_STATE | |
2693 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) | |
2694 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); | |
2695 #else | |
2696 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); | |
2697 #endif | |
2698 | |
2699 /* pybytes_as_double.proto */ | |
2700 static double __Pyx_SlowPyString_AsDouble(PyObject *obj); | |
2701 static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length); | |
2702 static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) { | |
2703 char* as_c_string; | |
2704 Py_ssize_t size; | |
2705 #if CYTHON_ASSUME_SAFE_MACROS | |
2706 as_c_string = PyBytes_AS_STRING(obj); | |
2707 size = PyBytes_GET_SIZE(obj); | |
2708 #else | |
2709 if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) { | |
2710 return (double)-1; | |
2711 } | |
2712 #endif | |
2713 return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); | |
2714 } | |
2715 static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) { | |
2716 char* as_c_string; | |
2717 Py_ssize_t size; | |
2718 #if CYTHON_ASSUME_SAFE_MACROS | |
2719 as_c_string = PyByteArray_AS_STRING(obj); | |
2720 size = PyByteArray_GET_SIZE(obj); | |
2721 #else | |
2722 as_c_string = PyByteArray_AsString(obj); | |
2723 if (as_c_string == NULL) { | |
2724 return (double)-1; | |
2725 } | |
2726 size = PyByteArray_Size(obj); | |
2727 #endif | |
2728 return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); | |
2729 } | |
2730 | |
2731 /* pyunicode_as_double.proto */ | |
2732 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS | |
2733 static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) { | |
2734 int last_was_punctuation; | |
2735 Py_ssize_t i; | |
2736 last_was_punctuation = 1; | |
2737 for (i=start; i <= end; i++) { | |
2738 Py_UCS4 chr = PyUnicode_READ(kind, data, i); | |
2739 int is_punctuation = (chr == '_') | (chr == '.'); | |
2740 *buffer = (char)chr; | |
2741 buffer += (chr != '_'); | |
2742 if (unlikely(chr > 127)) goto parse_failure; | |
2743 if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure; | |
2744 last_was_punctuation = is_punctuation; | |
2745 } | |
2746 if (unlikely(last_was_punctuation)) goto parse_failure; | |
2747 *buffer = '\0'; | |
2748 return buffer; | |
2749 parse_failure: | |
2750 return NULL; | |
2751 } | |
2752 static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) { | |
2753 int matches = 1; | |
2754 Py_UCS4 chr; | |
2755 Py_UCS4 sign = PyUnicode_READ(kind, data, start); | |
2756 int is_signed = (sign == '-') | (sign == '+'); | |
2757 start += is_signed; | |
2758 length -= is_signed; | |
2759 switch (PyUnicode_READ(kind, data, start)) { | |
2760 #ifdef Py_NAN | |
2761 case 'n': | |
2762 case 'N': | |
2763 if (unlikely(length != 3)) goto parse_failure; | |
2764 chr = PyUnicode_READ(kind, data, start+1); | |
2765 matches &= (chr == 'a') | (chr == 'A'); | |
2766 chr = PyUnicode_READ(kind, data, start+2); | |
2767 matches &= (chr == 'n') | (chr == 'N'); | |
2768 if (unlikely(!matches)) goto parse_failure; | |
2769 return (sign == '-') ? -Py_NAN : Py_NAN; | |
2770 #endif | |
2771 case 'i': | |
2772 case 'I': | |
2773 if (unlikely(length < 3)) goto parse_failure; | |
2774 chr = PyUnicode_READ(kind, data, start+1); | |
2775 matches &= (chr == 'n') | (chr == 'N'); | |
2776 chr = PyUnicode_READ(kind, data, start+2); | |
2777 matches &= (chr == 'f') | (chr == 'F'); | |
2778 if (likely(length == 3 && matches)) | |
2779 return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; | |
2780 if (unlikely(length != 8)) goto parse_failure; | |
2781 chr = PyUnicode_READ(kind, data, start+3); | |
2782 matches &= (chr == 'i') | (chr == 'I'); | |
2783 chr = PyUnicode_READ(kind, data, start+4); | |
2784 matches &= (chr == 'n') | (chr == 'N'); | |
2785 chr = PyUnicode_READ(kind, data, start+5); | |
2786 matches &= (chr == 'i') | (chr == 'I'); | |
2787 chr = PyUnicode_READ(kind, data, start+6); | |
2788 matches &= (chr == 't') | (chr == 'T'); | |
2789 chr = PyUnicode_READ(kind, data, start+7); | |
2790 matches &= (chr == 'y') | (chr == 'Y'); | |
2791 if (unlikely(!matches)) goto parse_failure; | |
2792 return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; | |
2793 case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': | |
2794 break; | |
2795 default: | |
2796 goto parse_failure; | |
2797 } | |
2798 return 0.0; | |
2799 parse_failure: | |
2800 return -1.0; | |
2801 } | |
2802 static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) { | |
2803 double value; | |
2804 const char *last; | |
2805 char *end; | |
2806 Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj); | |
2807 const int kind = PyUnicode_KIND(obj); | |
2808 const void* data = PyUnicode_DATA(obj); | |
2809 start = 0; | |
2810 while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start))) | |
2811 start++; | |
2812 while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1))) | |
2813 length--; | |
2814 length -= start; | |
2815 if (unlikely(length <= 0)) goto fallback; | |
2816 value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length); | |
2817 if (unlikely(value == -1.0)) goto fallback; | |
2818 if (value != 0.0) return value; | |
2819 if (length < 40) { | |
2820 char number[40]; | |
2821 last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); | |
2822 if (unlikely(!last)) goto fallback; | |
2823 value = PyOS_string_to_double(number, &end, NULL); | |
2824 } else { | |
2825 char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char)); | |
2826 if (unlikely(!number)) goto fallback; | |
2827 last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); | |
2828 if (unlikely(!last)) { | |
2829 PyMem_Free(number); | |
2830 goto fallback; | |
2831 } | |
2832 value = PyOS_string_to_double(number, &end, NULL); | |
2833 PyMem_Free(number); | |
2834 } | |
2835 if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { | |
2836 return value; | |
2837 } | |
2838 fallback: | |
2839 return __Pyx_SlowPyString_AsDouble(obj); | |
2840 } | |
2841 #endif | |
2842 static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) { | |
2843 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS | |
2844 if (unlikely(__Pyx_PyUnicode_READY(obj) == -1)) | |
2845 return (double)-1; | |
2846 if (likely(PyUnicode_IS_ASCII(obj))) { | |
2847 const char *s; | |
2848 Py_ssize_t length; | |
2849 s = PyUnicode_AsUTF8AndSize(obj, &length); | |
2850 return __Pyx__PyBytes_AsDouble(obj, s, length); | |
2851 } | |
2852 return __Pyx_PyUnicode_AsDouble_WithSpaces(obj); | |
2853 #else | |
2854 return __Pyx_SlowPyString_AsDouble(obj); | |
2855 #endif | |
2856 } | |
2857 | |
2858 /* pynumber_float.proto */ | |
2859 static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj); | |
2860 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x)) | |
2861 | |
2862 /* PyIntBinop.proto */ | |
2863 #if !CYTHON_COMPILING_IN_PYPY | |
2864 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); | |
2865 #else | |
2866 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ | |
2867 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) | |
2868 #endif | |
2869 | |
2870 /* PyObjectSetAttrStr.proto */ | |
2871 #if CYTHON_USE_TYPE_SLOTS | |
2872 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) | |
2873 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); | |
2874 #else | |
2875 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) | |
2876 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) | |
2877 #endif | |
2878 | |
2879 /* PyObjectCallNoArg.proto */ | |
2880 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); | |
2881 | |
2882 /* PyObjectCallMethod0.proto */ | |
2883 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); | |
2884 | |
2885 /* RaiseNoneIterError.proto */ | |
2886 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); | |
2887 | |
2888 /* UnpackTupleError.proto */ | |
2889 static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); | |
2890 | |
2891 /* UnpackTuple2.proto */ | |
2892 #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ | |
2893 (likely(is_tuple || PyTuple_Check(tuple)) ?\ | |
2894 (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ | |
2895 __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ | |
2896 (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ | |
2897 __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) | |
2898 static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( | |
2899 PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); | |
2900 static int __Pyx_unpack_tuple2_generic( | |
2901 PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); | |
2902 | |
2903 /* dict_iter.proto */ | |
2904 static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, | |
2905 Py_ssize_t* p_orig_length, int* p_is_dict); | |
2906 static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, | |
2907 PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); | |
2908 | |
2909 /* ListCompAppend.proto */ | |
2910 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS | |
2911 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { | |
2912 PyListObject* L = (PyListObject*) list; | |
2913 Py_ssize_t len = Py_SIZE(list); | |
2914 if (likely(L->allocated > len)) { | |
2915 Py_INCREF(x); | |
2916 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 | |
2917 L->ob_item[len] = x; | |
2918 #else | |
2919 PyList_SET_ITEM(list, len, x); | |
2920 #endif | |
2921 __Pyx_SET_SIZE(list, len + 1); | |
2922 return 0; | |
2923 } | |
2924 return PyList_Append(list, x); | |
2925 } | |
2926 #else | |
2927 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) | |
2928 #endif | |
2929 | |
2930 /* SliceObject.proto */ | |
2931 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( | |
2932 PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, | |
2933 PyObject** py_start, PyObject** py_stop, PyObject** py_slice, | |
2934 int has_cstart, int has_cstop, int wraparound); | |
2935 | |
2936 /* SliceTupleAndList.proto */ | |
2937 #if CYTHON_COMPILING_IN_CPYTHON | |
2938 static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); | |
2939 static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); | |
2940 #else | |
2941 #define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) | |
2942 #define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) | |
2943 #endif | |
2944 | |
2945 /* pep479.proto */ | |
2946 static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); | |
2947 | |
2948 /* RaiseUnboundLocalError.proto */ | |
2949 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); | |
2950 | |
2951 /* PySequenceContains.proto */ | |
2952 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { | |
2953 int result = PySequence_Contains(seq, item); | |
2954 return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); | |
2955 } | |
2956 | |
2957 /* Import.proto */ | |
2958 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); | |
2959 | |
2960 /* ImportFrom.proto */ | |
2961 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); | |
2962 | |
2963 /* GetAttr.proto */ | |
2964 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); | |
2965 | |
2966 /* HasAttr.proto */ | |
2967 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); | |
2968 | |
2969 /* PyObject_GenericGetAttrNoDict.proto */ | |
2970 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 | |
2971 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); | |
2972 #else | |
2973 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr | |
2974 #endif | |
2975 | |
2976 /* PyObject_GenericGetAttr.proto */ | |
2977 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 | |
2978 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); | |
2979 #else | |
2980 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr | |
2981 #endif | |
2982 | |
2983 /* ValidateBasesTuple.proto */ | |
2984 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS | |
2985 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); | |
2986 #endif | |
2987 | |
2988 /* PyType_Ready.proto */ | |
2989 CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); | |
2990 | |
2991 /* SetVTable.proto */ | |
2992 static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); | |
2993 | |
2994 /* GetVTable.proto */ | |
2995 static void* __Pyx_GetVtable(PyTypeObject *type); | |
2996 | |
2997 /* MergeVTables.proto */ | |
2998 #if !CYTHON_COMPILING_IN_LIMITED_API | |
2999 static int __Pyx_MergeVtables(PyTypeObject *type); | |
3000 #endif | |
3001 | |
3002 /* SetupReduce.proto */ | |
3003 #if !CYTHON_COMPILING_IN_LIMITED_API | |
3004 static int __Pyx_setup_reduce(PyObject* type_obj); | |
3005 #endif | |
3006 | |
3007 /* TypeImport.proto */ | |
3008 #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11 | |
3009 #define __PYX_HAVE_RT_ImportType_proto_3_0_11 | |
3010 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L | |
3011 #include <stdalign.h> | |
3012 #endif | |
3013 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L | |
3014 #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s) | |
3015 #else | |
3016 #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*) | |
3017 #endif | |
3018 enum __Pyx_ImportType_CheckSize_3_0_11 { | |
3019 __Pyx_ImportType_CheckSize_Error_3_0_11 = 0, | |
3020 __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1, | |
3021 __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2 | |
3022 }; | |
3023 static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size); | |
3024 #endif | |
3025 | |
3026 /* ImportDottedModule.proto */ | |
3027 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); | |
3028 #if PY_MAJOR_VERSION >= 3 | |
3029 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); | |
3030 #endif | |
3031 | |
3032 /* CLineInTraceback.proto */ | |
3033 #ifdef CYTHON_CLINE_IN_TRACEBACK | |
3034 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) | |
3035 #else | |
3036 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); | |
3037 #endif | |
3038 | |
3039 /* CodeObjectCache.proto */ | |
3040 #if !CYTHON_COMPILING_IN_LIMITED_API | |
3041 typedef struct { | |
3042 PyCodeObject* code_object; | |
3043 int code_line; | |
3044 } __Pyx_CodeObjectCacheEntry; | |
3045 struct __Pyx_CodeObjectCache { | |
3046 int count; | |
3047 int max_count; | |
3048 __Pyx_CodeObjectCacheEntry* entries; | |
3049 }; | |
3050 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; | |
3051 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); | |
3052 static PyCodeObject *__pyx_find_code_object(int code_line); | |
3053 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); | |
3054 #endif | |
3055 | |
3056 /* AddTraceback.proto */ | |
3057 static void __Pyx_AddTraceback(const char *funcname, int c_line, | |
3058 int py_line, const char *filename); | |
3059 | |
3060 /* GCCDiagnostics.proto */ | |
3061 #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) | |
3062 #define __Pyx_HAS_GCC_DIAGNOSTIC | |
3063 #endif | |
3064 | |
3065 /* ArrayAPI.proto */ | |
3066 #ifndef _ARRAYARRAY_H | |
3067 #define _ARRAYARRAY_H | |
3068 typedef struct arraydescr { | |
3069 int typecode; | |
3070 int itemsize; | |
3071 PyObject * (*getitem)(struct arrayobject *, Py_ssize_t); | |
3072 int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *); | |
3073 #if PY_MAJOR_VERSION >= 3 | |
3074 char *formats; | |
3075 #endif | |
3076 } arraydescr; | |
3077 struct arrayobject { | |
3078 PyObject_HEAD | |
3079 Py_ssize_t ob_size; | |
3080 union { | |
3081 char *ob_item; | |
3082 float *as_floats; | |
3083 double *as_doubles; | |
3084 int *as_ints; | |
3085 unsigned int *as_uints; | |
3086 unsigned char *as_uchars; | |
3087 signed char *as_schars; | |
3088 char *as_chars; | |
3089 unsigned long *as_ulongs; | |
3090 long *as_longs; | |
3091 #if PY_MAJOR_VERSION >= 3 | |
3092 unsigned long long *as_ulonglongs; | |
3093 long long *as_longlongs; | |
3094 #endif | |
3095 short *as_shorts; | |
3096 unsigned short *as_ushorts; | |
3097 Py_UNICODE *as_pyunicodes; | |
3098 void *as_voidptr; | |
3099 } data; | |
3100 Py_ssize_t allocated; | |
3101 struct arraydescr *ob_descr; | |
3102 PyObject *weakreflist; | |
3103 #if PY_MAJOR_VERSION >= 3 | |
3104 int ob_exports; | |
3105 #endif | |
3106 }; | |
3107 #ifndef NO_NEWARRAY_INLINE | |
3108 static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size, | |
3109 struct arraydescr *descr) { | |
3110 arrayobject *op; | |
3111 size_t nbytes; | |
3112 if (size < 0) { | |
3113 PyErr_BadInternalCall(); | |
3114 return NULL; | |
3115 } | |
3116 nbytes = size * descr->itemsize; | |
3117 if (nbytes / descr->itemsize != (size_t)size) { | |
3118 return PyErr_NoMemory(); | |
3119 } | |
3120 op = (arrayobject *) type->tp_alloc(type, 0); | |
3121 if (op == NULL) { | |
3122 return NULL; | |
3123 } | |
3124 op->ob_descr = descr; | |
3125 op->allocated = size; | |
3126 op->weakreflist = NULL; | |
3127 __Pyx_SET_SIZE(op, size); | |
3128 if (size <= 0) { | |
3129 op->data.ob_item = NULL; | |
3130 } | |
3131 else { | |
3132 op->data.ob_item = PyMem_NEW(char, nbytes); | |
3133 if (op->data.ob_item == NULL) { | |
3134 Py_DECREF(op); | |
3135 return PyErr_NoMemory(); | |
3136 } | |
3137 } | |
3138 return (PyObject *) op; | |
3139 } | |
3140 #else | |
3141 PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size, | |
3142 struct arraydescr *descr); | |
3143 #endif | |
3144 static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) { | |
3145 void *items = (void*) self->data.ob_item; | |
3146 PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize)); | |
3147 if (items == NULL) { | |
3148 PyErr_NoMemory(); | |
3149 return -1; | |
3150 } | |
3151 self->data.ob_item = (char*) items; | |
3152 __Pyx_SET_SIZE(self, n); | |
3153 self->allocated = n; | |
3154 return 0; | |
3155 } | |
3156 static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) { | |
3157 void *items = (void*) self->data.ob_item; | |
3158 Py_ssize_t newsize; | |
3159 if (n < self->allocated && n*4 > self->allocated) { | |
3160 __Pyx_SET_SIZE(self, n); | |
3161 return 0; | |
3162 } | |
3163 newsize = n + (n / 2) + 1; | |
3164 if (newsize <= n) { | |
3165 PyErr_NoMemory(); | |
3166 return -1; | |
3167 } | |
3168 PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize)); | |
3169 if (items == NULL) { | |
3170 PyErr_NoMemory(); | |
3171 return -1; | |
3172 } | |
3173 self->data.ob_item = (char*) items; | |
3174 __Pyx_SET_SIZE(self, n); | |
3175 self->allocated = newsize; | |
3176 return 0; | |
3177 } | |
3178 #endif | |
3179 | |
3180 /* CIntToPy.proto */ | |
3181 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); | |
3182 | |
3183 /* CIntFromPy.proto */ | |
3184 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); | |
3185 | |
3186 /* CIntFromPy.proto */ | |
3187 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); | |
3188 | |
3189 /* CIntToPy.proto */ | |
3190 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); | |
3191 | |
3192 /* CIntFromPy.proto */ | |
3193 static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *); | |
3194 | |
3195 /* CIntToPy.proto */ | |
3196 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value); | |
3197 | |
3198 /* FormatTypeName.proto */ | |
3199 #if CYTHON_COMPILING_IN_LIMITED_API | |
3200 typedef PyObject *__Pyx_TypeName; | |
3201 #define __Pyx_FMT_TYPENAME "%U" | |
3202 static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); | |
3203 #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) | |
3204 #else | |
3205 typedef const char *__Pyx_TypeName; | |
3206 #define __Pyx_FMT_TYPENAME "%.200s" | |
3207 #define __Pyx_PyType_GetName(tp) ((tp)->tp_name) | |
3208 #define __Pyx_DECREF_TypeName(obj) | |
3209 #endif | |
3210 | |
3211 /* FastTypeChecks.proto */ | |
3212 #if CYTHON_COMPILING_IN_CPYTHON | |
3213 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) | |
3214 #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) | |
3215 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); | |
3216 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); | |
3217 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); | |
3218 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); | |
3219 #else | |
3220 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) | |
3221 #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) | |
3222 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) | |
3223 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) | |
3224 #endif | |
3225 #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) | |
3226 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) | |
3227 | |
3228 /* SwapException.proto */ | |
3229 #if CYTHON_FAST_THREAD_STATE | |
3230 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) | |
3231 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); | |
3232 #else | |
3233 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); | |
3234 #endif | |
3235 | |
3236 /* CoroutineBase.proto */ | |
3237 struct __pyx_CoroutineObject; | |
3238 typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); | |
3239 #if CYTHON_USE_EXC_INFO_STACK | |
3240 #define __Pyx_ExcInfoStruct _PyErr_StackItem | |
3241 #else | |
3242 typedef struct { | |
3243 PyObject *exc_type; | |
3244 PyObject *exc_value; | |
3245 PyObject *exc_traceback; | |
3246 } __Pyx_ExcInfoStruct; | |
3247 #endif | |
3248 typedef struct __pyx_CoroutineObject { | |
3249 PyObject_HEAD | |
3250 __pyx_coroutine_body_t body; | |
3251 PyObject *closure; | |
3252 __Pyx_ExcInfoStruct gi_exc_state; | |
3253 PyObject *gi_weakreflist; | |
3254 PyObject *classobj; | |
3255 PyObject *yieldfrom; | |
3256 PyObject *gi_name; | |
3257 PyObject *gi_qualname; | |
3258 PyObject *gi_modulename; | |
3259 PyObject *gi_code; | |
3260 PyObject *gi_frame; | |
3261 int resume_label; | |
3262 char is_running; | |
3263 } __pyx_CoroutineObject; | |
3264 static __pyx_CoroutineObject *__Pyx__Coroutine_New( | |
3265 PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, | |
3266 PyObject *name, PyObject *qualname, PyObject *module_name); | |
3267 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( | |
3268 __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, | |
3269 PyObject *name, PyObject *qualname, PyObject *module_name); | |
3270 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); | |
3271 static int __Pyx_Coroutine_clear(PyObject *self); | |
3272 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); | |
3273 static PyObject *__Pyx_Coroutine_Close(PyObject *self); | |
3274 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); | |
3275 #if CYTHON_USE_EXC_INFO_STACK | |
3276 #define __Pyx_Coroutine_SwapException(self) | |
3277 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) | |
3278 #else | |
3279 #define __Pyx_Coroutine_SwapException(self) {\ | |
3280 __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ | |
3281 __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ | |
3282 } | |
3283 #define __Pyx_Coroutine_ResetAndClearException(self) {\ | |
3284 __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ | |
3285 (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ | |
3286 } | |
3287 #endif | |
3288 #if CYTHON_FAST_THREAD_STATE | |
3289 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ | |
3290 __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) | |
3291 #else | |
3292 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ | |
3293 __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) | |
3294 #endif | |
3295 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); | |
3296 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); | |
3297 | |
3298 /* PatchModuleWithCoroutine.proto */ | |
3299 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); | |
3300 | |
3301 /* PatchGeneratorABC.proto */ | |
3302 static int __Pyx_patch_abc(void); | |
3303 | |
3304 /* Generator.proto */ | |
3305 #define __Pyx_Generator_USED | |
3306 #define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_GeneratorType) | |
3307 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ | |
3308 __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name) | |
3309 static PyObject *__Pyx_Generator_Next(PyObject *self); | |
3310 static int __pyx_Generator_init(PyObject *module); | |
3311 | |
3312 /* CheckBinaryVersion.proto */ | |
3313 static unsigned long __Pyx_get_runtime_version(void); | |
3314 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); | |
3315 | |
3316 /* FunctionImport.proto */ | |
3317 static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig); | |
3318 | |
3319 /* InitStrings.proto */ | |
3320 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); | |
3321 | |
3322 /* #### Code section: module_declarations ### */ | |
3323 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/ | |
3324 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/ | |
3325 static PyObject *__pyx_f_5pysam_16libctabixproxies_10TupleProxy_take(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes); /* proto*/ | |
3326 static PyObject *__pyx_f_5pysam_16libctabixproxies_10TupleProxy_present(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes); /* proto*/ | |
3327 static PyObject *__pyx_f_5pysam_16libctabixproxies_10TupleProxy_copy(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes, struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy *__pyx_optional_args); /* proto*/ | |
3328 static int __pyx_f_5pysam_16libctabixproxies_10TupleProxy_getMinFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ | |
3329 static int __pyx_f_5pysam_16libctabixproxies_10TupleProxy_getMaxFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ | |
3330 static PyObject *__pyx_f_5pysam_16libctabixproxies_10TupleProxy_update(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes); /* proto*/ | |
3331 static int __pyx_f_5pysam_16libctabixproxies_8GTFProxy_getMinFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ | |
3332 static int __pyx_f_5pysam_16libctabixproxies_8GTFProxy_getMaxFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ | |
3333 static int __pyx_f_5pysam_16libctabixproxies_8BedProxy_getMinFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ | |
3334 static int __pyx_f_5pysam_16libctabixproxies_8BedProxy_getMaxFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ | |
3335 static PyObject *__pyx_f_5pysam_16libctabixproxies_8BedProxy_update(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes); /* proto*/ | |
3336 static PyObject *__pyx_f_5pysam_16libctabixproxies_8VCFProxy_update(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes); /* proto*/ | |
3337 | |
3338 /* Module declarations from "libc.stdint" */ | |
3339 | |
3340 /* Module declarations from "cpython.version" */ | |
3341 | |
3342 /* Module declarations from "__builtin__" */ | |
3343 | |
3344 /* Module declarations from "cpython.type" */ | |
3345 | |
3346 /* Module declarations from "libc.string" */ | |
3347 | |
3348 /* Module declarations from "libc.stdio" */ | |
3349 | |
3350 /* Module declarations from "cpython.object" */ | |
3351 | |
3352 /* Module declarations from "cpython.ref" */ | |
3353 | |
3354 /* Module declarations from "cpython.exc" */ | |
3355 | |
3356 /* Module declarations from "cpython.module" */ | |
3357 | |
3358 /* Module declarations from "cpython.mem" */ | |
3359 | |
3360 /* Module declarations from "cpython.tuple" */ | |
3361 | |
3362 /* Module declarations from "cpython.list" */ | |
3363 | |
3364 /* Module declarations from "cpython.sequence" */ | |
3365 | |
3366 /* Module declarations from "cpython.mapping" */ | |
3367 | |
3368 /* Module declarations from "cpython.iterator" */ | |
3369 | |
3370 /* Module declarations from "cpython.number" */ | |
3371 | |
3372 /* Module declarations from "cpython.int" */ | |
3373 | |
3374 /* Module declarations from "__builtin__" */ | |
3375 | |
3376 /* Module declarations from "cpython.bool" */ | |
3377 | |
3378 /* Module declarations from "cpython.long" */ | |
3379 | |
3380 /* Module declarations from "cpython.float" */ | |
3381 | |
3382 /* Module declarations from "__builtin__" */ | |
3383 | |
3384 /* Module declarations from "cpython.complex" */ | |
3385 | |
3386 /* Module declarations from "cpython.string" */ | |
3387 | |
3388 /* Module declarations from "libc.stddef" */ | |
3389 | |
3390 /* Module declarations from "cpython.unicode" */ | |
3391 | |
3392 /* Module declarations from "cpython.pyport" */ | |
3393 | |
3394 /* Module declarations from "cpython.dict" */ | |
3395 | |
3396 /* Module declarations from "cpython.instance" */ | |
3397 | |
3398 /* Module declarations from "cpython.function" */ | |
3399 | |
3400 /* Module declarations from "cpython.method" */ | |
3401 | |
3402 /* Module declarations from "cpython.weakref" */ | |
3403 | |
3404 /* Module declarations from "cpython.getargs" */ | |
3405 | |
3406 /* Module declarations from "cpython.pythread" */ | |
3407 | |
3408 /* Module declarations from "cpython.pystate" */ | |
3409 | |
3410 /* Module declarations from "cpython.cobject" */ | |
3411 | |
3412 /* Module declarations from "cpython.oldbuffer" */ | |
3413 | |
3414 /* Module declarations from "cpython.set" */ | |
3415 | |
3416 /* Module declarations from "cpython.buffer" */ | |
3417 | |
3418 /* Module declarations from "cpython.bytes" */ | |
3419 | |
3420 /* Module declarations from "cpython.pycapsule" */ | |
3421 | |
3422 /* Module declarations from "cpython.contextvars" */ | |
3423 | |
3424 /* Module declarations from "cpython" */ | |
3425 | |
3426 /* Module declarations from "libc.stdlib" */ | |
3427 | |
3428 /* Module declarations from "cython" */ | |
3429 | |
3430 /* Module declarations from "array" */ | |
3431 | |
3432 /* Module declarations from "cpython.array" */ | |
3433 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/ | |
3434 | |
3435 /* Module declarations from "pysam.libcutils" */ | |
3436 static PyObject *(*__pyx_f_5pysam_9libcutils_charptr_to_str)(char const *, struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str *__pyx_optional_args); /*proto*/ | |
3437 static PyObject *(*__pyx_f_5pysam_9libcutils_force_str)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_str *__pyx_optional_args); /*proto*/ | |
3438 static PyObject *(*__pyx_f_5pysam_9libcutils_force_bytes)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_bytes *__pyx_optional_args); /*proto*/ | |
3439 static PyObject *(*__pyx_f_5pysam_9libcutils_encode_filename)(PyObject *); /*proto*/ | |
3440 static PyObject *(*__pyx_f_5pysam_9libcutils_from_string_and_size)(char const *, size_t); /*proto*/ | |
3441 | |
3442 /* Module declarations from "pysam.libctabixproxies" */ | |
3443 static char *__pyx_f_5pysam_16libctabixproxies_StrOrEmpty(char *); /*proto*/ | |
3444 static int __pyx_f_5pysam_16libctabixproxies_isNew(char *, char *, size_t); /*proto*/ | |
3445 static PyObject *__pyx_f_5pysam_16libctabixproxies_dot_or_float(PyObject *); /*proto*/ | |
3446 static PyObject *__pyx_f_5pysam_16libctabixproxies_dot_or_int(PyObject *); /*proto*/ | |
3447 static PyObject *__pyx_f_5pysam_16libctabixproxies_dot_or_str(PyObject *); /*proto*/ | |
3448 static int __pyx_f_5pysam_16libctabixproxies_from1based(PyObject *); /*proto*/ | |
3449 static PyObject *__pyx_f_5pysam_16libctabixproxies_to1based(int); /*proto*/ | |
3450 static PyObject *__pyx_f_5pysam_16libctabixproxies___pyx_unpickle_TupleProxyIterator__set_state(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *, PyObject *); /*proto*/ | |
3451 static PyObject *__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(PyObject *(*)(PyObject *)); /*proto*/ | |
3452 static PyObject *__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(int (*)(PyObject *)); /*proto*/ | |
3453 static PyObject *__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(PyObject *(*)(int)); /*proto*/ | |
3454 /* #### Code section: typeinfo ### */ | |
3455 /* #### Code section: before_global_var ### */ | |
3456 #define __Pyx_MODULE_NAME "pysam.libctabixproxies" | |
3457 extern int __pyx_module_is_main_pysam__libctabixproxies; | |
3458 int __pyx_module_is_main_pysam__libctabixproxies = 0; | |
3459 | |
3460 /* Implementation of "pysam.libctabixproxies" */ | |
3461 /* #### Code section: global_var ### */ | |
3462 static PyObject *__pyx_builtin_NotImplementedError; | |
3463 static PyObject *__pyx_builtin_ValueError; | |
3464 static PyObject *__pyx_builtin_AssertionError; | |
3465 static PyObject *__pyx_builtin_IndexError; | |
3466 static PyObject *__pyx_builtin_range; | |
3467 static PyObject *__pyx_builtin_xrange; | |
3468 static PyObject *__pyx_builtin_TypeError; | |
3469 static PyObject *__pyx_builtin_StopIteration; | |
3470 static PyObject *__pyx_builtin_KeyError; | |
3471 static PyObject *__pyx_builtin_super; | |
3472 static PyObject *__pyx_builtin_MemoryError; | |
3473 /* #### Code section: string_decls ### */ | |
3474 static const char __pyx_k_d[] = "d"; | |
3475 static const char __pyx_k_f[] = "f"; | |
3476 static const char __pyx_k_i[] = "i"; | |
3477 static const char __pyx_k_k[] = "k"; | |
3478 static const char __pyx_k_n[] = "n"; | |
3479 static const char __pyx_k_s[] = "\"%s\""; | |
3480 static const char __pyx_k_v[] = "v"; | |
3481 static const char __pyx_k_x[] = "x"; | |
3482 static const char __pyx_k_aa[] = "aa"; | |
3483 static const char __pyx_k_gc[] = "gc"; | |
3484 static const char __pyx_k_id[] = "id"; | |
3485 static const char __pyx_k__11[] = "\t"; | |
3486 static const char __pyx_k__12[] = "."; | |
3487 static const char __pyx_k__13[] = ""; | |
3488 static const char __pyx_k__14[] = "-"; | |
3489 static const char __pyx_k__15[] = "{} \"{}\""; | |
3490 static const char __pyx_k__16[] = "{} {}"; | |
3491 static const char __pyx_k__17[] = ";"; | |
3492 static const char __pyx_k__19[] = "; "; | |
3493 static const char __pyx_k__21[] = " "; | |
3494 static const char __pyx_k__23[] = "\""; | |
3495 static const char __pyx_k__26[] = "{}={}"; | |
3496 static const char __pyx_k__28[] = "="; | |
3497 static const char __pyx_k__32[] = "*"; | |
3498 static const char __pyx_k__88[] = "?"; | |
3499 static const char __pyx_k_all[] = "__all__"; | |
3500 static const char __pyx_k_alt[] = "alt"; | |
3501 static const char __pyx_k_end[] = "end"; | |
3502 static const char __pyx_k_get[] = "get"; | |
3503 static const char __pyx_k_idx[] = "idx"; | |
3504 static const char __pyx_k_key[] = "key"; | |
3505 static const char __pyx_k_new[] = "__new__"; | |
3506 static const char __pyx_k_pos[] = "pos"; | |
3507 static const char __pyx_k_ref[] = "ref"; | |
3508 static const char __pyx_k_s_2[] = "s"; | |
3509 static const char __pyx_k_str[] = "__str__"; | |
3510 static const char __pyx_k_tmp[] = "tmp"; | |
3511 static const char __pyx_k_args[] = "args"; | |
3512 static const char __pyx_k_copy[] = "copy"; | |
3513 static const char __pyx_k_dict[] = "__dict__"; | |
3514 static const char __pyx_k_info[] = "info"; | |
3515 static const char __pyx_k_join[] = "join"; | |
3516 static const char __pyx_k_keys[] = "keys"; | |
3517 static const char __pyx_k_main[] = "__main__"; | |
3518 static const char __pyx_k_name[] = "name"; | |
3519 static const char __pyx_k_qual[] = "qual"; | |
3520 static const char __pyx_k_self[] = "self"; | |
3521 static const char __pyx_k_send[] = "send"; | |
3522 static const char __pyx_k_spec[] = "__spec__"; | |
3523 static const char __pyx_k_test[] = "__test__"; | |
3524 static const char __pyx_k_wrap[] = "wrap"; | |
3525 static const char __pyx_k_ascii[] = "ascii"; | |
3526 static const char __pyx_k_close[] = "close"; | |
3527 static const char __pyx_k_frame[] = "frame"; | |
3528 static const char __pyx_k_index[] = "index"; | |
3529 static const char __pyx_k_items[] = "items"; | |
3530 static const char __pyx_k_other[] = "other"; | |
3531 static const char __pyx_k_proxy[] = "proxy"; | |
3532 static const char __pyx_k_quote[] = "quote"; | |
3533 static const char __pyx_k_range[] = "range"; | |
3534 static const char __pyx_k_score[] = "score"; | |
3535 static const char __pyx_k_split[] = "split"; | |
3536 static const char __pyx_k_start[] = "start"; | |
3537 static const char __pyx_k_state[] = "state"; | |
3538 static const char __pyx_k_strip[] = "strip"; | |
3539 static const char __pyx_k_super[] = "super"; | |
3540 static const char __pyx_k_throw[] = "throw"; | |
3541 static const char __pyx_k_toDot[] = "toDot"; | |
3542 static const char __pyx_k_value[] = "value"; | |
3543 static const char __pyx_k_append[] = "append"; | |
3544 static const char __pyx_k_asDict[] = "asDict"; | |
3545 static const char __pyx_k_contig[] = "contig"; | |
3546 static const char __pyx_k_copy_2[] = "__copy__"; | |
3547 static const char __pyx_k_decode[] = "decode"; | |
3548 static const char __pyx_k_dict_2[] = "_dict"; | |
3549 static const char __pyx_k_enable[] = "enable"; | |
3550 static const char __pyx_k_fields[] = "fields"; | |
3551 static const char __pyx_k_filter[] = "filter"; | |
3552 static const char __pyx_k_format[] = "format"; | |
3553 static const char __pyx_k_import[] = "__import__"; | |
3554 static const char __pyx_k_invert[] = "invert"; | |
3555 static const char __pyx_k_kwargs[] = "kwargs"; | |
3556 static const char __pyx_k_name_2[] = "__name__"; | |
3557 static const char __pyx_k_pickle[] = "pickle"; | |
3558 static const char __pyx_k_reduce[] = "__reduce__"; | |
3559 static const char __pyx_k_source[] = "source"; | |
3560 static const char __pyx_k_strand[] = "strand"; | |
3561 static const char __pyx_k_update[] = "update"; | |
3562 static const char __pyx_k_xrange[] = "xrange"; | |
3563 static const char __pyx_k_as_dict[] = "as_dict"; | |
3564 static const char __pyx_k_compare[] = "compare"; | |
3565 static const char __pyx_k_disable[] = "disable"; | |
3566 static const char __pyx_k_feature[] = "feature"; | |
3567 static const char __pyx_k_genexpr[] = "genexpr"; | |
3568 static const char __pyx_k_getattr[] = "__getattr__"; | |
3569 static const char __pyx_k_indices[] = "indices"; | |
3570 static const char __pyx_k_itemRGB[] = "itemRGB"; | |
3571 static const char __pyx_k_lcontig[] = "lcontig"; | |
3572 static const char __pyx_k_setitem[] = "__setitem__"; | |
3573 static const char __pyx_k_to_dict[] = "to_dict"; | |
3574 static const char __pyx_k_BedProxy[] = "BedProxy"; | |
3575 static const char __pyx_k_GTFProxy[] = "GTFProxy"; | |
3576 static const char __pyx_k_KeyError[] = "KeyError"; | |
3577 static const char __pyx_k_VCFProxy[] = "VCFProxy"; | |
3578 static const char __pyx_k_encoding[] = "encoding"; | |
3579 static const char __pyx_k_endswith[] = "endswith"; | |
3580 static const char __pyx_k_fromDict[] = "fromDict"; | |
3581 static const char __pyx_k_getindex[] = "_getindex"; | |
3582 static const char __pyx_k_getstate[] = "__getstate__"; | |
3583 static const char __pyx_k_pyx_type[] = "__pyx_type"; | |
3584 static const char __pyx_k_setindex[] = "_setindex"; | |
3585 static const char __pyx_k_setstate[] = "__setstate__"; | |
3586 static const char __pyx_k_thickEnd[] = "thickEnd"; | |
3587 static const char __pyx_k_GFF3Proxy[] = "GFF3Proxy"; | |
3588 static const char __pyx_k_TypeError[] = "TypeError"; | |
3589 static const char __pyx_k_from_dict[] = "from_dict"; | |
3590 static const char __pyx_k_isenabled[] = "isenabled"; | |
3591 static const char __pyx_k_pyx_state[] = "__pyx_state"; | |
3592 static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; | |
3593 static const char __pyx_k_separator[] = "separator"; | |
3594 static const char __pyx_k_IndexError[] = "IndexError"; | |
3595 static const char __pyx_k_TupleProxy[] = "TupleProxy"; | |
3596 static const char __pyx_k_ValueError[] = "ValueError"; | |
3597 static const char __pyx_k_attributes[] = "attributes"; | |
3598 static const char __pyx_k_blockCount[] = "blockCount"; | |
3599 static const char __pyx_k_blockSizes[] = "blockSizes"; | |
3600 static const char __pyx_k_pyx_result[] = "__pyx_result"; | |
3601 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; | |
3602 static const char __pyx_k_thickStart[] = "thickStart"; | |
3603 static const char __pyx_k_MemoryError[] = "MemoryError"; | |
3604 static const char __pyx_k_OrderedDict[] = "OrderedDict"; | |
3605 static const char __pyx_k_PickleError[] = "PickleError"; | |
3606 static const char __pyx_k_blockStarts[] = "blockStarts"; | |
3607 static const char __pyx_k_cfunc_to_py[] = "cfunc.to_py"; | |
3608 static const char __pyx_k_collections[] = "collections"; | |
3609 static const char __pyx_k_getMaxFields[] = "getMaxFields"; | |
3610 static const char __pyx_k_getMinFields[] = "getMinFields"; | |
3611 static const char __pyx_k_initializing[] = "_initializing"; | |
3612 static const char __pyx_k_is_coroutine[] = "_is_coroutine"; | |
3613 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; | |
3614 static const char __pyx_k_setAttribute[] = "setAttribute"; | |
3615 static const char __pyx_k_stringsource[] = "<stringsource>"; | |
3616 static const char __pyx_k_use_setstate[] = "use_setstate"; | |
3617 static const char __pyx_k_GTFProxy_keys[] = "GTFProxy.keys"; | |
3618 static const char __pyx_k_StopIteration[] = "StopIteration"; | |
3619 static const char __pyx_k_class_getitem[] = "__class_getitem__"; | |
3620 static const char __pyx_k_map_key2field[] = "map_key2field"; | |
3621 static const char __pyx_k_out_of_memory[] = "out of memory"; | |
3622 static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; | |
3623 static const char __pyx_k_AssertionError[] = "AssertionError"; | |
3624 static const char __pyx_k_GTFProxy_asDict[] = "GTFProxy.asDict"; | |
3625 static const char __pyx_k_GTFProxy_invert[] = "GTFProxy.invert"; | |
3626 static const char __pyx_k_NamedTupleProxy[] = "NamedTupleProxy"; | |
3627 static const char __pyx_k_field_s_not_set[] = "field %s not set"; | |
3628 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; | |
3629 static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; | |
3630 static const char __pyx_k_GTFProxy_as_dict[] = "GTFProxy.as_dict"; | |
3631 static const char __pyx_k_GTFProxy_to_dict[] = "GTFProxy.to_dict"; | |
3632 static const char __pyx_k_attribute_string[] = "attribute_string"; | |
3633 static const char __pyx_k_GTFProxy_fromDict[] = "GTFProxy.fromDict"; | |
3634 static const char __pyx_k_TupleProxy___copy[] = "TupleProxy.__copy__"; | |
3635 static const char __pyx_k_GTFProxy_from_dict[] = "GTFProxy.from_dict"; | |
3636 static const char __pyx_k_TupleProxyIterator[] = "TupleProxyIterator"; | |
3637 static const char __pyx_k_TupleProxy_compare[] = "TupleProxy.compare"; | |
3638 static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; | |
3639 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; | |
3640 static const char __pyx_k_NotImplementedError[] = "NotImplementedError"; | |
3641 static const char __pyx_k_TupleProxy__getindex[] = "TupleProxy._getindex"; | |
3642 static const char __pyx_k_TupleProxy__setindex[] = "TupleProxy._setindex"; | |
3643 static const char __pyx_k_incomplete_line_at_s[] = "incomplete line at %s"; | |
3644 static const char __pyx_k_BedProxy_getMaxFields[] = "BedProxy.getMaxFields"; | |
3645 static const char __pyx_k_BedProxy_getMinFields[] = "BedProxy.getMinFields"; | |
3646 static const char __pyx_k_GTFProxy_getMaxFields[] = "GTFProxy.getMaxFields"; | |
3647 static const char __pyx_k_GTFProxy_getMinFields[] = "GTFProxy.getMinFields"; | |
3648 static const char __pyx_k_GTFProxy_setAttribute[] = "GTFProxy.setAttribute"; | |
3649 static const char __pyx_k_attribute_dict2string[] = "attribute_dict2string"; | |
3650 static const char __pyx_k_attribute_string2dict[] = "attribute_string2dict"; | |
3651 static const char __pyx_k_dict2attribute_string[] = "dict2attribute_string"; | |
3652 static const char __pyx_k_pysam_libctabixproxies[] = "pysam.libctabixproxies"; | |
3653 static const char __pyx_k_TupleProxy_getMaxFields[] = "TupleProxy.getMaxFields"; | |
3654 static const char __pyx_k_TupleProxy_getMinFields[] = "TupleProxy.getMinFields"; | |
3655 static const char __pyx_k_list_index_out_of_range[] = "list index out of range"; | |
3656 static const char __pyx_k_BedProxy___reduce_cython[] = "BedProxy.__reduce_cython__"; | |
3657 static const char __pyx_k_GTFProxy___reduce_cython[] = "GTFProxy.__reduce_cython__"; | |
3658 static const char __pyx_k_VCFProxy___reduce_cython[] = "VCFProxy.__reduce_cython__"; | |
3659 static const char __pyx_k_GFF3Proxy___reduce_cython[] = "GFF3Proxy.__reduce_cython__"; | |
3660 static const char __pyx_k_attribute_string2iterator[] = "attribute_string2iterator"; | |
3661 static const char __pyx_k_BedProxy___setstate_cython[] = "BedProxy.__setstate_cython__"; | |
3662 static const char __pyx_k_GTFProxy___setstate_cython[] = "GTFProxy.__setstate_cython__"; | |
3663 static const char __pyx_k_TupleProxy___reduce_cython[] = "TupleProxy.__reduce_cython__"; | |
3664 static const char __pyx_k_VCFProxy___setstate_cython[] = "VCFProxy.__setstate_cython__"; | |
3665 static const char __pyx_k_op_0_isn_t_implemented_yet[] = "op {0} isn't implemented yet"; | |
3666 static const char __pyx_k_pysam_libctabixproxies_pyx[] = "pysam/libctabixproxies.pyx"; | |
3667 static const char __pyx_k_GFF3Proxy___setstate_cython[] = "GFF3Proxy.__setstate_cython__"; | |
3668 static const char __pyx_k_list_index_out_of_range_i_i[] = "list index out of range %i >= %i"; | |
3669 static const char __pyx_k_TupleProxy___setstate_cython[] = "TupleProxy.__setstate_cython__"; | |
3670 static const char __pyx_k_GTFProxy_attribute_string2dict[] = "GTFProxy.attribute_string2dict"; | |
3671 static const char __pyx_k_GTFProxy_dict2attribute_string[] = "GTFProxy.dict2attribute_string"; | |
3672 static const char __pyx_k_Pyx_CFunc_5pysam_16libctabixpr[] = "__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v.<locals>.wrap"; | |
3673 static const char __pyx_k_Pyx_CFunc_e2acea__5pysam_16lib[] = "__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v.<locals>.wrap"; | |
3674 static const char __pyx_k_pyx_unpickle_TupleProxyIterato[] = "__pyx_unpickle_TupleProxyIterator"; | |
3675 static const char __pyx_k_GFF3Proxy_dict2attribute_string[] = "GFF3Proxy.dict2attribute_string"; | |
3676 static const char __pyx_k_NamedTupleProxy___reduce_cython[] = "NamedTupleProxy.__reduce_cython__"; | |
3677 static const char __pyx_k_GFF3Proxy_attribute_string2itera[] = "GFF3Proxy.attribute_string2iterator"; | |
3678 static const char __pyx_k_GTFProxy_attribute_string2iterat[] = "GTFProxy.attribute_string2iterator"; | |
3679 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x0eb9d08, 0x60f8e6c, 0xd13f98c) = (index, proxy))"; | |
3680 static const char __pyx_k_NamedTupleProxy___setstate_cytho[] = "NamedTupleProxy.__setstate_cython__"; | |
3681 static const char __pyx_k_Pyx_CFunc_5pysam_16libctabixpr_2[] = "__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v.<locals>.wrap"; | |
3682 static const char __pyx_k_TupleProxyIterator___reduce_cyth[] = "TupleProxyIterator.__reduce_cython__"; | |
3683 static const char __pyx_k_TupleProxyIterator___setstate_cy[] = "TupleProxyIterator.__setstate_cython__"; | |
3684 static const char __pyx_k_attribute_string2iterator_locals[] = "attribute_string2iterator.<locals>.genexpr"; | |
3685 static const char __pyx_k_bed_format_requires_at_least_thr[] = "bed format requires at least three columns"; | |
3686 static const char __pyx_k_comparison_of_modified_TupleProx[] = "comparison of modified TupleProxies is not implemented"; | |
3687 static const char __pyx_k_copying_modified_tuples_is_not_i[] = "copying modified tuples is not implemented"; | |
3688 static const char __pyx_k_length_of_buffer_i_number_of_byt[] = "length of buffer (%i) != number of bytes (%i)"; | |
3689 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; | |
3690 static const char __pyx_k_out_of_memory_in_TupleProxy_copy[] = "out of memory in TupleProxy.copy()"; | |
3691 static const char __pyx_k_out_of_memory_in_TupleProxy_upda[] = "out of memory in TupleProxy.update()"; | |
3692 static const char __pyx_k_parsing_error_fewer_than_i_field[] = "parsing error: fewer than %i fields in line: %s"; | |
3693 static const char __pyx_k_parsing_error_more_than_i_fields[] = "parsing error: more than %i fields in line: %s"; | |
3694 /* #### Code section: decls ### */ | |
3695 static PyObject *__pyx_pf_11cfunc_dot_to_py_75__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_wrap(PyObject *__pyx_self, PyObject *__pyx_v_v); /* proto */ | |
3696 static PyObject *__pyx_pf_11cfunc_dot_to_py_80__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_wrap(PyObject *__pyx_self, PyObject *__pyx_v_v); /* proto */ | |
3697 static PyObject *__pyx_pf_11cfunc_dot_to_py_73__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_wrap(PyObject *__pyx_self, int __pyx_v_v); /* proto */ | |
3698 static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags); /* proto */ | |
3699 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ | |
3700 static int __pyx_pf_5pysam_16libctabixproxies_10TupleProxy___cinit__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, PyObject *__pyx_v_encoding); /* proto */ | |
3701 static void __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_2__dealloc__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self); /* proto */ | |
3702 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_4__copy__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self); /* proto */ | |
3703 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_6compare(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_other); /* proto */ | |
3704 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_8__richcmp__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_other, int __pyx_v_op); /* proto */ | |
3705 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_10getMinFields(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self); /* proto */ | |
3706 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_12getMaxFields(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self); /* proto */ | |
3707 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_14_getindex(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, int __pyx_v_index); /* proto */ | |
3708 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_16__getitem__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ | |
3709 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_18_setindex(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */ | |
3710 static int __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_20__setitem__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */ | |
3711 static Py_ssize_t __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_22__len__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self); /* proto */ | |
3712 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_24__iter__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self); /* proto */ | |
3713 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_26__str__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self); /* proto */ | |
3714 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self); /* proto */ | |
3715 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ | |
3716 static int __pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator___init__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *__pyx_v_self, PyObject *__pyx_v_proxy); /* proto */ | |
3717 static PyObject *__pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_2__iter__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *__pyx_v_self); /* proto */ | |
3718 static PyObject *__pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_4__next__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *__pyx_v_self); /* proto */ | |
3719 static PyObject *__pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_6__reduce_cython__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *__pyx_v_self); /* proto */ | |
3720 static PyObject *__pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_8__setstate_cython__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ | |
3721 static PyObject *__pyx_pf_5pysam_16libctabixproxies_toDot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v); /* proto */ | |
3722 static PyObject *__pyx_pf_5pysam_16libctabixproxies_2quote(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v); /* proto */ | |
3723 static int __pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy___setattr__(struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */ | |
3724 static PyObject *__pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy_2__getattr__(struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ | |
3725 static PyObject *__pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_v_self); /* proto */ | |
3726 static PyObject *__pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ | |
3727 static int __pyx_pf_5pysam_16libctabixproxies_8GTFProxy___cinit__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self); /* proto */ | |
3728 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_2getMinFields(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self); /* proto */ | |
3729 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_4getMaxFields(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self); /* proto */ | |
3730 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_6to_dict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self); /* proto */ | |
3731 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_8as_dict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self); /* proto */ | |
3732 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_10from_dict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_d); /* proto */ | |
3733 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_12__str__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self); /* proto */ | |
3734 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_14invert(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, int __pyx_v_lcontig); /* proto */ | |
3735 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_16keys(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self); /* proto */ | |
3736 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_18__getitem__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ | |
3737 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_20setAttribute(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ | |
3738 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_22attribute_string2dict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_s); /* proto */ | |
3739 #if PY_MAJOR_VERSION < 3 | |
3740 static int __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_24__cmp__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ | |
3741 #endif | |
3742 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_26__richcmp__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_other, int __pyx_v_op); /* proto */ | |
3743 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_28dict2attribute_string(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_d); /* proto */ | |
3744 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_30attribute_string2iterator(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_s); /* proto */ | |
3745 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_33__getattr__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ | |
3746 static int __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_35__setattr__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */ | |
3747 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_37asDict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ | |
3748 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_39fromDict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ | |
3749 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_41__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self); /* proto */ | |
3750 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_43__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ | |
3751 static PyObject *__pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_dict2attribute_string(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *__pyx_v_self, PyObject *__pyx_v_d); /* proto */ | |
3752 static PyObject *__pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_25attribute_string2iterator_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ | |
3753 static PyObject *__pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_2attribute_string2iterator(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *__pyx_v_self, PyObject *__pyx_v_s); /* proto */ | |
3754 static PyObject *__pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_5__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *__pyx_v_self); /* proto */ | |
3755 static PyObject *__pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_7__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ | |
3756 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8BedProxy_getMinFields(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self); /* proto */ | |
3757 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8BedProxy_2getMaxFields(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self); /* proto */ | |
3758 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8BedProxy_4__str__(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self); /* proto */ | |
3759 static int __pyx_pf_5pysam_16libctabixproxies_8BedProxy_6__setattr__(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */ | |
3760 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8BedProxy_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self); /* proto */ | |
3761 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8BedProxy_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ | |
3762 static int __pyx_pf_5pysam_16libctabixproxies_8VCFProxy___cinit__(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self); /* proto */ | |
3763 static Py_ssize_t __pyx_pf_5pysam_16libctabixproxies_8VCFProxy_2__len__(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self); /* proto */ | |
3764 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8VCFProxy_3pos___get__(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self); /* proto */ | |
3765 static int __pyx_pf_5pysam_16libctabixproxies_8VCFProxy_4__setattr__(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */ | |
3766 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8VCFProxy_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self); /* proto */ | |
3767 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8VCFProxy_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ | |
3768 static PyObject *__pyx_pf_5pysam_16libctabixproxies_4__pyx_unpickle_TupleProxyIterator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ | |
3769 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_TupleProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3770 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_TupleProxyIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3771 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_NamedTupleProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3772 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_GTFProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3773 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_GFF3Proxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3774 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_BedProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3775 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_VCFProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3776 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3777 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3778 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3779 static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3780 static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3781 static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ | |
3782 /* #### Code section: late_includes ### */ | |
3783 /* #### Code section: module_state ### */ | |
3784 typedef struct { | |
3785 PyObject *__pyx_d; | |
3786 PyObject *__pyx_b; | |
3787 PyObject *__pyx_cython_runtime; | |
3788 PyObject *__pyx_empty_tuple; | |
3789 PyObject *__pyx_empty_bytes; | |
3790 PyObject *__pyx_empty_unicode; | |
3791 #ifdef __Pyx_CyFunction_USED | |
3792 PyTypeObject *__pyx_CyFunctionType; | |
3793 #endif | |
3794 #ifdef __Pyx_FusedFunction_USED | |
3795 PyTypeObject *__pyx_FusedFunctionType; | |
3796 #endif | |
3797 #ifdef __Pyx_Generator_USED | |
3798 PyTypeObject *__pyx_GeneratorType; | |
3799 #endif | |
3800 #ifdef __Pyx_IterableCoroutine_USED | |
3801 PyTypeObject *__pyx_IterableCoroutineType; | |
3802 #endif | |
3803 #ifdef __Pyx_Coroutine_USED | |
3804 PyTypeObject *__pyx_CoroutineAwaitType; | |
3805 #endif | |
3806 #ifdef __Pyx_Coroutine_USED | |
3807 PyTypeObject *__pyx_CoroutineType; | |
3808 #endif | |
3809 #if CYTHON_USE_MODULE_STATE | |
3810 #endif | |
3811 #if CYTHON_USE_MODULE_STATE | |
3812 #endif | |
3813 #if CYTHON_USE_MODULE_STATE | |
3814 #endif | |
3815 #if CYTHON_USE_MODULE_STATE | |
3816 #endif | |
3817 PyTypeObject *__pyx_ptype_7cpython_4type_type; | |
3818 #if CYTHON_USE_MODULE_STATE | |
3819 #endif | |
3820 #if CYTHON_USE_MODULE_STATE | |
3821 #endif | |
3822 #if CYTHON_USE_MODULE_STATE | |
3823 #endif | |
3824 #if CYTHON_USE_MODULE_STATE | |
3825 #endif | |
3826 #if CYTHON_USE_MODULE_STATE | |
3827 #endif | |
3828 #if CYTHON_USE_MODULE_STATE | |
3829 #endif | |
3830 #if CYTHON_USE_MODULE_STATE | |
3831 #endif | |
3832 #if CYTHON_USE_MODULE_STATE | |
3833 #endif | |
3834 #if CYTHON_USE_MODULE_STATE | |
3835 #endif | |
3836 #if CYTHON_USE_MODULE_STATE | |
3837 #endif | |
3838 #if CYTHON_USE_MODULE_STATE | |
3839 #endif | |
3840 #if CYTHON_USE_MODULE_STATE | |
3841 #endif | |
3842 #if CYTHON_USE_MODULE_STATE | |
3843 #endif | |
3844 #if CYTHON_USE_MODULE_STATE | |
3845 #endif | |
3846 #if CYTHON_USE_MODULE_STATE | |
3847 #endif | |
3848 #if CYTHON_USE_MODULE_STATE | |
3849 #endif | |
3850 PyTypeObject *__pyx_ptype_7cpython_4bool_bool; | |
3851 #if CYTHON_USE_MODULE_STATE | |
3852 #endif | |
3853 #if CYTHON_USE_MODULE_STATE | |
3854 #endif | |
3855 #if CYTHON_USE_MODULE_STATE | |
3856 #endif | |
3857 #if CYTHON_USE_MODULE_STATE | |
3858 #endif | |
3859 PyTypeObject *__pyx_ptype_7cpython_7complex_complex; | |
3860 #if CYTHON_USE_MODULE_STATE | |
3861 #endif | |
3862 #if CYTHON_USE_MODULE_STATE | |
3863 #endif | |
3864 #if CYTHON_USE_MODULE_STATE | |
3865 #endif | |
3866 #if CYTHON_USE_MODULE_STATE | |
3867 #endif | |
3868 #if CYTHON_USE_MODULE_STATE | |
3869 #endif | |
3870 #if CYTHON_USE_MODULE_STATE | |
3871 #endif | |
3872 #if CYTHON_USE_MODULE_STATE | |
3873 #endif | |
3874 #if CYTHON_USE_MODULE_STATE | |
3875 #endif | |
3876 #if CYTHON_USE_MODULE_STATE | |
3877 #endif | |
3878 #if CYTHON_USE_MODULE_STATE | |
3879 #endif | |
3880 #if CYTHON_USE_MODULE_STATE | |
3881 #endif | |
3882 #if CYTHON_USE_MODULE_STATE | |
3883 #endif | |
3884 #if CYTHON_USE_MODULE_STATE | |
3885 #endif | |
3886 #if CYTHON_USE_MODULE_STATE | |
3887 #endif | |
3888 #if CYTHON_USE_MODULE_STATE | |
3889 #endif | |
3890 #if CYTHON_USE_MODULE_STATE | |
3891 #endif | |
3892 #if CYTHON_USE_MODULE_STATE | |
3893 #endif | |
3894 #if CYTHON_USE_MODULE_STATE | |
3895 #endif | |
3896 #if CYTHON_USE_MODULE_STATE | |
3897 #endif | |
3898 #if CYTHON_USE_MODULE_STATE | |
3899 #endif | |
3900 #if CYTHON_USE_MODULE_STATE | |
3901 #endif | |
3902 #if CYTHON_USE_MODULE_STATE | |
3903 #endif | |
3904 #if CYTHON_USE_MODULE_STATE | |
3905 #endif | |
3906 #if CYTHON_USE_MODULE_STATE | |
3907 #endif | |
3908 PyTypeObject *__pyx_ptype_7cpython_5array_array; | |
3909 #if CYTHON_USE_MODULE_STATE | |
3910 #endif | |
3911 #if CYTHON_USE_MODULE_STATE | |
3912 PyObject *__pyx_type_5pysam_16libctabixproxies_TupleProxy; | |
3913 PyObject *__pyx_type_5pysam_16libctabixproxies_TupleProxyIterator; | |
3914 PyObject *__pyx_type_5pysam_16libctabixproxies_NamedTupleProxy; | |
3915 PyObject *__pyx_type_5pysam_16libctabixproxies_GTFProxy; | |
3916 PyObject *__pyx_type_5pysam_16libctabixproxies_GFF3Proxy; | |
3917 PyObject *__pyx_type_5pysam_16libctabixproxies_BedProxy; | |
3918 PyObject *__pyx_type_5pysam_16libctabixproxies_VCFProxy; | |
3919 PyObject *__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator; | |
3920 PyObject *__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator; | |
3921 PyObject *__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr; | |
3922 PyObject *__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v; | |
3923 PyObject *__pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v; | |
3924 PyObject *__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v; | |
3925 #endif | |
3926 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_TupleProxy; | |
3927 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator; | |
3928 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy; | |
3929 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_GTFProxy; | |
3930 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy; | |
3931 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_BedProxy; | |
3932 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_VCFProxy; | |
3933 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator; | |
3934 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator; | |
3935 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr; | |
3936 PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v; | |
3937 PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v; | |
3938 PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v; | |
3939 PyObject *__pyx_n_s_AssertionError; | |
3940 PyObject *__pyx_n_s_BedProxy; | |
3941 PyObject *__pyx_n_u_BedProxy; | |
3942 PyObject *__pyx_n_s_BedProxy___reduce_cython; | |
3943 PyObject *__pyx_n_s_BedProxy___setstate_cython; | |
3944 PyObject *__pyx_n_s_BedProxy_getMaxFields; | |
3945 PyObject *__pyx_n_s_BedProxy_getMinFields; | |
3946 PyObject *__pyx_n_s_GFF3Proxy; | |
3947 PyObject *__pyx_n_u_GFF3Proxy; | |
3948 PyObject *__pyx_n_s_GFF3Proxy___reduce_cython; | |
3949 PyObject *__pyx_n_s_GFF3Proxy___setstate_cython; | |
3950 PyObject *__pyx_n_s_GFF3Proxy_attribute_string2itera; | |
3951 PyObject *__pyx_n_s_GFF3Proxy_dict2attribute_string; | |
3952 PyObject *__pyx_n_s_GTFProxy; | |
3953 PyObject *__pyx_n_u_GTFProxy; | |
3954 PyObject *__pyx_n_s_GTFProxy___reduce_cython; | |
3955 PyObject *__pyx_n_s_GTFProxy___setstate_cython; | |
3956 PyObject *__pyx_n_s_GTFProxy_asDict; | |
3957 PyObject *__pyx_n_s_GTFProxy_as_dict; | |
3958 PyObject *__pyx_n_s_GTFProxy_attribute_string2dict; | |
3959 PyObject *__pyx_n_s_GTFProxy_attribute_string2iterat; | |
3960 PyObject *__pyx_n_s_GTFProxy_dict2attribute_string; | |
3961 PyObject *__pyx_n_s_GTFProxy_fromDict; | |
3962 PyObject *__pyx_n_s_GTFProxy_from_dict; | |
3963 PyObject *__pyx_n_s_GTFProxy_getMaxFields; | |
3964 PyObject *__pyx_n_s_GTFProxy_getMinFields; | |
3965 PyObject *__pyx_n_s_GTFProxy_invert; | |
3966 PyObject *__pyx_n_s_GTFProxy_keys; | |
3967 PyObject *__pyx_n_s_GTFProxy_setAttribute; | |
3968 PyObject *__pyx_n_s_GTFProxy_to_dict; | |
3969 PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0; | |
3970 PyObject *__pyx_n_s_IndexError; | |
3971 PyObject *__pyx_n_s_KeyError; | |
3972 PyObject *__pyx_n_s_MemoryError; | |
3973 PyObject *__pyx_n_s_NamedTupleProxy; | |
3974 PyObject *__pyx_n_u_NamedTupleProxy; | |
3975 PyObject *__pyx_n_s_NamedTupleProxy___reduce_cython; | |
3976 PyObject *__pyx_n_s_NamedTupleProxy___setstate_cytho; | |
3977 PyObject *__pyx_n_s_NotImplementedError; | |
3978 PyObject *__pyx_n_s_OrderedDict; | |
3979 PyObject *__pyx_n_s_PickleError; | |
3980 PyObject *__pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr; | |
3981 PyObject *__pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr_2; | |
3982 PyObject *__pyx_n_s_Pyx_CFunc_e2acea__5pysam_16lib; | |
3983 PyObject *__pyx_n_s_StopIteration; | |
3984 PyObject *__pyx_n_s_TupleProxy; | |
3985 PyObject *__pyx_n_u_TupleProxy; | |
3986 PyObject *__pyx_n_s_TupleProxyIterator; | |
3987 PyObject *__pyx_n_s_TupleProxyIterator___reduce_cyth; | |
3988 PyObject *__pyx_n_s_TupleProxyIterator___setstate_cy; | |
3989 PyObject *__pyx_n_s_TupleProxy___copy; | |
3990 PyObject *__pyx_n_s_TupleProxy___reduce_cython; | |
3991 PyObject *__pyx_n_s_TupleProxy___setstate_cython; | |
3992 PyObject *__pyx_n_s_TupleProxy__getindex; | |
3993 PyObject *__pyx_n_s_TupleProxy__setindex; | |
3994 PyObject *__pyx_n_s_TupleProxy_compare; | |
3995 PyObject *__pyx_n_s_TupleProxy_getMaxFields; | |
3996 PyObject *__pyx_n_s_TupleProxy_getMinFields; | |
3997 PyObject *__pyx_n_s_TypeError; | |
3998 PyObject *__pyx_n_s_VCFProxy; | |
3999 PyObject *__pyx_n_u_VCFProxy; | |
4000 PyObject *__pyx_n_s_VCFProxy___reduce_cython; | |
4001 PyObject *__pyx_n_s_VCFProxy___setstate_cython; | |
4002 PyObject *__pyx_n_s_ValueError; | |
4003 PyObject *__pyx_kp_u__11; | |
4004 PyObject *__pyx_kp_b__12; | |
4005 PyObject *__pyx_kp_u__12; | |
4006 PyObject *__pyx_kp_u__13; | |
4007 PyObject *__pyx_kp_u__14; | |
4008 PyObject *__pyx_kp_u__15; | |
4009 PyObject *__pyx_kp_u__16; | |
4010 PyObject *__pyx_kp_u__17; | |
4011 PyObject *__pyx_kp_u__19; | |
4012 PyObject *__pyx_kp_u__21; | |
4013 PyObject *__pyx_kp_u__23; | |
4014 PyObject *__pyx_kp_u__26; | |
4015 PyObject *__pyx_kp_u__28; | |
4016 PyObject *__pyx_n_s__32; | |
4017 PyObject *__pyx_n_s__88; | |
4018 PyObject *__pyx_n_s_aa; | |
4019 PyObject *__pyx_n_s_all; | |
4020 PyObject *__pyx_n_u_alt; | |
4021 PyObject *__pyx_n_s_append; | |
4022 PyObject *__pyx_n_s_args; | |
4023 PyObject *__pyx_n_s_asDict; | |
4024 PyObject *__pyx_n_s_as_dict; | |
4025 PyObject *__pyx_n_u_ascii; | |
4026 PyObject *__pyx_n_s_asyncio_coroutines; | |
4027 PyObject *__pyx_n_s_attribute_dict2string; | |
4028 PyObject *__pyx_n_s_attribute_string; | |
4029 PyObject *__pyx_n_s_attribute_string2dict; | |
4030 PyObject *__pyx_n_s_attribute_string2iterator; | |
4031 PyObject *__pyx_n_s_attribute_string2iterator_locals; | |
4032 PyObject *__pyx_n_s_attributes; | |
4033 PyObject *__pyx_n_u_attributes; | |
4034 PyObject *__pyx_kp_u_bed_format_requires_at_least_thr; | |
4035 PyObject *__pyx_n_u_blockCount; | |
4036 PyObject *__pyx_n_u_blockSizes; | |
4037 PyObject *__pyx_n_u_blockStarts; | |
4038 PyObject *__pyx_n_s_cfunc_to_py; | |
4039 PyObject *__pyx_n_s_class_getitem; | |
4040 PyObject *__pyx_n_s_cline_in_traceback; | |
4041 PyObject *__pyx_n_s_close; | |
4042 PyObject *__pyx_n_s_collections; | |
4043 PyObject *__pyx_n_s_compare; | |
4044 PyObject *__pyx_kp_u_comparison_of_modified_TupleProx; | |
4045 PyObject *__pyx_n_s_contig; | |
4046 PyObject *__pyx_n_u_contig; | |
4047 PyObject *__pyx_n_s_copy; | |
4048 PyObject *__pyx_n_s_copy_2; | |
4049 PyObject *__pyx_kp_u_copying_modified_tuples_is_not_i; | |
4050 PyObject *__pyx_n_s_d; | |
4051 PyObject *__pyx_n_s_decode; | |
4052 PyObject *__pyx_n_s_dict; | |
4053 PyObject *__pyx_n_s_dict2attribute_string; | |
4054 PyObject *__pyx_n_s_dict_2; | |
4055 PyObject *__pyx_kp_u_disable; | |
4056 PyObject *__pyx_kp_u_enable; | |
4057 PyObject *__pyx_n_s_encoding; | |
4058 PyObject *__pyx_n_s_end; | |
4059 PyObject *__pyx_n_u_end; | |
4060 PyObject *__pyx_n_s_endswith; | |
4061 PyObject *__pyx_n_s_f; | |
4062 PyObject *__pyx_n_s_feature; | |
4063 PyObject *__pyx_n_u_feature; | |
4064 PyObject *__pyx_kp_u_field_s_not_set; | |
4065 PyObject *__pyx_n_s_fields; | |
4066 PyObject *__pyx_n_u_filter; | |
4067 PyObject *__pyx_n_s_format; | |
4068 PyObject *__pyx_n_u_format; | |
4069 PyObject *__pyx_n_s_frame; | |
4070 PyObject *__pyx_n_u_frame; | |
4071 PyObject *__pyx_n_s_fromDict; | |
4072 PyObject *__pyx_n_s_from_dict; | |
4073 PyObject *__pyx_kp_u_gc; | |
4074 PyObject *__pyx_n_s_genexpr; | |
4075 PyObject *__pyx_n_s_get; | |
4076 PyObject *__pyx_n_s_getMaxFields; | |
4077 PyObject *__pyx_n_s_getMinFields; | |
4078 PyObject *__pyx_n_s_getattr; | |
4079 PyObject *__pyx_n_s_getindex; | |
4080 PyObject *__pyx_n_s_getstate; | |
4081 PyObject *__pyx_n_s_i; | |
4082 PyObject *__pyx_n_u_id; | |
4083 PyObject *__pyx_n_s_idx; | |
4084 PyObject *__pyx_n_s_import; | |
4085 PyObject *__pyx_kp_u_incomplete_line_at_s; | |
4086 PyObject *__pyx_n_s_index; | |
4087 PyObject *__pyx_n_s_indices; | |
4088 PyObject *__pyx_n_u_info; | |
4089 PyObject *__pyx_n_s_initializing; | |
4090 PyObject *__pyx_n_s_invert; | |
4091 PyObject *__pyx_n_s_is_coroutine; | |
4092 PyObject *__pyx_kp_u_isenabled; | |
4093 PyObject *__pyx_n_u_itemRGB; | |
4094 PyObject *__pyx_n_s_items; | |
4095 PyObject *__pyx_n_s_join; | |
4096 PyObject *__pyx_n_s_k; | |
4097 PyObject *__pyx_n_s_key; | |
4098 PyObject *__pyx_n_s_keys; | |
4099 PyObject *__pyx_n_s_kwargs; | |
4100 PyObject *__pyx_n_s_lcontig; | |
4101 PyObject *__pyx_kp_u_length_of_buffer_i_number_of_byt; | |
4102 PyObject *__pyx_kp_u_list_index_out_of_range; | |
4103 PyObject *__pyx_kp_u_list_index_out_of_range_i_i; | |
4104 PyObject *__pyx_n_s_main; | |
4105 PyObject *__pyx_n_s_map_key2field; | |
4106 PyObject *__pyx_n_s_n; | |
4107 PyObject *__pyx_n_s_name; | |
4108 PyObject *__pyx_n_u_name; | |
4109 PyObject *__pyx_n_s_name_2; | |
4110 PyObject *__pyx_n_s_new; | |
4111 PyObject *__pyx_kp_s_no_default___reduce___due_to_non; | |
4112 PyObject *__pyx_kp_u_op_0_isn_t_implemented_yet; | |
4113 PyObject *__pyx_n_s_other; | |
4114 PyObject *__pyx_kp_u_out_of_memory; | |
4115 PyObject *__pyx_kp_u_out_of_memory_in_TupleProxy_copy; | |
4116 PyObject *__pyx_kp_u_out_of_memory_in_TupleProxy_upda; | |
4117 PyObject *__pyx_kp_u_parsing_error_fewer_than_i_field; | |
4118 PyObject *__pyx_kp_u_parsing_error_more_than_i_fields; | |
4119 PyObject *__pyx_n_s_pickle; | |
4120 PyObject *__pyx_n_u_pos; | |
4121 PyObject *__pyx_n_s_proxy; | |
4122 PyObject *__pyx_n_s_pysam_libctabixproxies; | |
4123 PyObject *__pyx_kp_s_pysam_libctabixproxies_pyx; | |
4124 PyObject *__pyx_n_s_pyx_PickleError; | |
4125 PyObject *__pyx_n_s_pyx_checksum; | |
4126 PyObject *__pyx_n_s_pyx_result; | |
4127 PyObject *__pyx_n_s_pyx_state; | |
4128 PyObject *__pyx_n_s_pyx_type; | |
4129 PyObject *__pyx_n_s_pyx_unpickle_TupleProxyIterato; | |
4130 PyObject *__pyx_n_s_pyx_vtable; | |
4131 PyObject *__pyx_n_u_qual; | |
4132 PyObject *__pyx_n_s_quote; | |
4133 PyObject *__pyx_n_s_range; | |
4134 PyObject *__pyx_n_s_reduce; | |
4135 PyObject *__pyx_n_s_reduce_cython; | |
4136 PyObject *__pyx_n_s_reduce_ex; | |
4137 PyObject *__pyx_n_u_ref; | |
4138 PyObject *__pyx_kp_u_s; | |
4139 PyObject *__pyx_n_s_s_2; | |
4140 PyObject *__pyx_n_s_score; | |
4141 PyObject *__pyx_n_u_score; | |
4142 PyObject *__pyx_n_s_self; | |
4143 PyObject *__pyx_n_s_send; | |
4144 PyObject *__pyx_n_s_separator; | |
4145 PyObject *__pyx_n_s_setAttribute; | |
4146 PyObject *__pyx_n_s_setindex; | |
4147 PyObject *__pyx_n_s_setitem; | |
4148 PyObject *__pyx_n_s_setstate; | |
4149 PyObject *__pyx_n_s_setstate_cython; | |
4150 PyObject *__pyx_n_s_source; | |
4151 PyObject *__pyx_n_u_source; | |
4152 PyObject *__pyx_n_s_spec; | |
4153 PyObject *__pyx_n_s_split; | |
4154 PyObject *__pyx_n_s_start; | |
4155 PyObject *__pyx_n_u_start; | |
4156 PyObject *__pyx_n_s_state; | |
4157 PyObject *__pyx_n_s_str; | |
4158 PyObject *__pyx_n_s_strand; | |
4159 PyObject *__pyx_n_u_strand; | |
4160 PyObject *__pyx_kp_s_stringsource; | |
4161 PyObject *__pyx_n_s_strip; | |
4162 PyObject *__pyx_n_s_super; | |
4163 PyObject *__pyx_n_s_test; | |
4164 PyObject *__pyx_n_u_thickEnd; | |
4165 PyObject *__pyx_n_u_thickStart; | |
4166 PyObject *__pyx_n_s_throw; | |
4167 PyObject *__pyx_n_s_tmp; | |
4168 PyObject *__pyx_n_s_toDot; | |
4169 PyObject *__pyx_n_s_to_dict; | |
4170 PyObject *__pyx_n_s_update; | |
4171 PyObject *__pyx_n_s_use_setstate; | |
4172 PyObject *__pyx_n_s_v; | |
4173 PyObject *__pyx_n_s_value; | |
4174 PyObject *__pyx_n_s_wrap; | |
4175 PyObject *__pyx_n_s_x; | |
4176 PyObject *__pyx_n_s_xrange; | |
4177 PyObject *__pyx_int_0; | |
4178 PyObject *__pyx_int_1; | |
4179 PyObject *__pyx_int_2; | |
4180 PyObject *__pyx_int_3; | |
4181 PyObject *__pyx_int_4; | |
4182 PyObject *__pyx_int_5; | |
4183 PyObject *__pyx_int_6; | |
4184 PyObject *__pyx_int_7; | |
4185 PyObject *__pyx_int_8; | |
4186 PyObject *__pyx_int_9; | |
4187 PyObject *__pyx_int_10; | |
4188 PyObject *__pyx_int_11; | |
4189 PyObject *__pyx_int_15441160; | |
4190 PyObject *__pyx_int_101682796; | |
4191 PyObject *__pyx_int_219412876; | |
4192 PyObject *__pyx_int_neg_1; | |
4193 PyObject *__pyx_tuple_; | |
4194 PyObject *__pyx_tuple__5; | |
4195 PyObject *__pyx_tuple__6; | |
4196 PyObject *__pyx_tuple__7; | |
4197 PyObject *__pyx_tuple__8; | |
4198 PyObject *__pyx_tuple__9; | |
4199 PyObject *__pyx_slice__20; | |
4200 PyObject *__pyx_slice__24; | |
4201 PyObject *__pyx_tuple__10; | |
4202 PyObject *__pyx_tuple__22; | |
4203 PyObject *__pyx_tuple__25; | |
4204 PyObject *__pyx_tuple__29; | |
4205 PyObject *__pyx_tuple__30; | |
4206 PyObject *__pyx_tuple__31; | |
4207 PyObject *__pyx_tuple__33; | |
4208 PyObject *__pyx_tuple__35; | |
4209 PyObject *__pyx_tuple__37; | |
4210 PyObject *__pyx_tuple__40; | |
4211 PyObject *__pyx_tuple__42; | |
4212 PyObject *__pyx_tuple__45; | |
4213 PyObject *__pyx_tuple__47; | |
4214 PyObject *__pyx_tuple__58; | |
4215 PyObject *__pyx_tuple__60; | |
4216 PyObject *__pyx_tuple__63; | |
4217 PyObject *__pyx_tuple__65; | |
4218 PyObject *__pyx_tuple__67; | |
4219 PyObject *__pyx_tuple__69; | |
4220 PyObject *__pyx_tuple__70; | |
4221 PyObject *__pyx_tuple__75; | |
4222 PyObject *__pyx_tuple__77; | |
4223 PyObject *__pyx_tuple__86; | |
4224 PyObject *__pyx_codeobj__2; | |
4225 PyObject *__pyx_codeobj__3; | |
4226 PyObject *__pyx_codeobj__4; | |
4227 PyObject *__pyx_codeobj__18; | |
4228 PyObject *__pyx_codeobj__27; | |
4229 PyObject *__pyx_codeobj__34; | |
4230 PyObject *__pyx_codeobj__36; | |
4231 PyObject *__pyx_codeobj__38; | |
4232 PyObject *__pyx_codeobj__39; | |
4233 PyObject *__pyx_codeobj__41; | |
4234 PyObject *__pyx_codeobj__43; | |
4235 PyObject *__pyx_codeobj__44; | |
4236 PyObject *__pyx_codeobj__46; | |
4237 PyObject *__pyx_codeobj__48; | |
4238 PyObject *__pyx_codeobj__49; | |
4239 PyObject *__pyx_codeobj__50; | |
4240 PyObject *__pyx_codeobj__51; | |
4241 PyObject *__pyx_codeobj__52; | |
4242 PyObject *__pyx_codeobj__53; | |
4243 PyObject *__pyx_codeobj__54; | |
4244 PyObject *__pyx_codeobj__55; | |
4245 PyObject *__pyx_codeobj__56; | |
4246 PyObject *__pyx_codeobj__57; | |
4247 PyObject *__pyx_codeobj__59; | |
4248 PyObject *__pyx_codeobj__61; | |
4249 PyObject *__pyx_codeobj__62; | |
4250 PyObject *__pyx_codeobj__64; | |
4251 PyObject *__pyx_codeobj__66; | |
4252 PyObject *__pyx_codeobj__68; | |
4253 PyObject *__pyx_codeobj__71; | |
4254 PyObject *__pyx_codeobj__72; | |
4255 PyObject *__pyx_codeobj__73; | |
4256 PyObject *__pyx_codeobj__74; | |
4257 PyObject *__pyx_codeobj__76; | |
4258 PyObject *__pyx_codeobj__78; | |
4259 PyObject *__pyx_codeobj__79; | |
4260 PyObject *__pyx_codeobj__80; | |
4261 PyObject *__pyx_codeobj__81; | |
4262 PyObject *__pyx_codeobj__82; | |
4263 PyObject *__pyx_codeobj__83; | |
4264 PyObject *__pyx_codeobj__84; | |
4265 PyObject *__pyx_codeobj__85; | |
4266 PyObject *__pyx_codeobj__87; | |
4267 } __pyx_mstate; | |
4268 | |
4269 #if CYTHON_USE_MODULE_STATE | |
4270 #ifdef __cplusplus | |
4271 namespace { | |
4272 extern struct PyModuleDef __pyx_moduledef; | |
4273 } /* anonymous namespace */ | |
4274 #else | |
4275 static struct PyModuleDef __pyx_moduledef; | |
4276 #endif | |
4277 | |
4278 #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o)) | |
4279 | |
4280 #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef))) | |
4281 | |
4282 #define __pyx_m (PyState_FindModule(&__pyx_moduledef)) | |
4283 #else | |
4284 static __pyx_mstate __pyx_mstate_global_static = | |
4285 #ifdef __cplusplus | |
4286 {}; | |
4287 #else | |
4288 {0}; | |
4289 #endif | |
4290 static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static; | |
4291 #endif | |
4292 /* #### Code section: module_state_clear ### */ | |
4293 #if CYTHON_USE_MODULE_STATE | |
4294 static int __pyx_m_clear(PyObject *m) { | |
4295 __pyx_mstate *clear_module_state = __pyx_mstate(m); | |
4296 if (!clear_module_state) return 0; | |
4297 Py_CLEAR(clear_module_state->__pyx_d); | |
4298 Py_CLEAR(clear_module_state->__pyx_b); | |
4299 Py_CLEAR(clear_module_state->__pyx_cython_runtime); | |
4300 Py_CLEAR(clear_module_state->__pyx_empty_tuple); | |
4301 Py_CLEAR(clear_module_state->__pyx_empty_bytes); | |
4302 Py_CLEAR(clear_module_state->__pyx_empty_unicode); | |
4303 #ifdef __Pyx_CyFunction_USED | |
4304 Py_CLEAR(clear_module_state->__pyx_CyFunctionType); | |
4305 #endif | |
4306 #ifdef __Pyx_FusedFunction_USED | |
4307 Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); | |
4308 #endif | |
4309 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); | |
4310 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool); | |
4311 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex); | |
4312 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_5array_array); | |
4313 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); | |
4314 Py_CLEAR(clear_module_state->__pyx_type_5pysam_16libctabixproxies_TupleProxy); | |
4315 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator); | |
4316 Py_CLEAR(clear_module_state->__pyx_type_5pysam_16libctabixproxies_TupleProxyIterator); | |
4317 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy); | |
4318 Py_CLEAR(clear_module_state->__pyx_type_5pysam_16libctabixproxies_NamedTupleProxy); | |
4319 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
4320 Py_CLEAR(clear_module_state->__pyx_type_5pysam_16libctabixproxies_GTFProxy); | |
4321 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy); | |
4322 Py_CLEAR(clear_module_state->__pyx_type_5pysam_16libctabixproxies_GFF3Proxy); | |
4323 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_BedProxy); | |
4324 Py_CLEAR(clear_module_state->__pyx_type_5pysam_16libctabixproxies_BedProxy); | |
4325 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy); | |
4326 Py_CLEAR(clear_module_state->__pyx_type_5pysam_16libctabixproxies_VCFProxy); | |
4327 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator); | |
4328 Py_CLEAR(clear_module_state->__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator); | |
4329 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator); | |
4330 Py_CLEAR(clear_module_state->__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator); | |
4331 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr); | |
4332 Py_CLEAR(clear_module_state->__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr); | |
4333 Py_CLEAR(clear_module_state->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v); | |
4334 Py_CLEAR(clear_module_state->__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v); | |
4335 Py_CLEAR(clear_module_state->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v); | |
4336 Py_CLEAR(clear_module_state->__pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v); | |
4337 Py_CLEAR(clear_module_state->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v); | |
4338 Py_CLEAR(clear_module_state->__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v); | |
4339 Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError); | |
4340 Py_CLEAR(clear_module_state->__pyx_n_s_BedProxy); | |
4341 Py_CLEAR(clear_module_state->__pyx_n_u_BedProxy); | |
4342 Py_CLEAR(clear_module_state->__pyx_n_s_BedProxy___reduce_cython); | |
4343 Py_CLEAR(clear_module_state->__pyx_n_s_BedProxy___setstate_cython); | |
4344 Py_CLEAR(clear_module_state->__pyx_n_s_BedProxy_getMaxFields); | |
4345 Py_CLEAR(clear_module_state->__pyx_n_s_BedProxy_getMinFields); | |
4346 Py_CLEAR(clear_module_state->__pyx_n_s_GFF3Proxy); | |
4347 Py_CLEAR(clear_module_state->__pyx_n_u_GFF3Proxy); | |
4348 Py_CLEAR(clear_module_state->__pyx_n_s_GFF3Proxy___reduce_cython); | |
4349 Py_CLEAR(clear_module_state->__pyx_n_s_GFF3Proxy___setstate_cython); | |
4350 Py_CLEAR(clear_module_state->__pyx_n_s_GFF3Proxy_attribute_string2itera); | |
4351 Py_CLEAR(clear_module_state->__pyx_n_s_GFF3Proxy_dict2attribute_string); | |
4352 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy); | |
4353 Py_CLEAR(clear_module_state->__pyx_n_u_GTFProxy); | |
4354 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy___reduce_cython); | |
4355 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy___setstate_cython); | |
4356 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_asDict); | |
4357 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_as_dict); | |
4358 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_attribute_string2dict); | |
4359 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_attribute_string2iterat); | |
4360 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_dict2attribute_string); | |
4361 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_fromDict); | |
4362 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_from_dict); | |
4363 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_getMaxFields); | |
4364 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_getMinFields); | |
4365 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_invert); | |
4366 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_keys); | |
4367 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_setAttribute); | |
4368 Py_CLEAR(clear_module_state->__pyx_n_s_GTFProxy_to_dict); | |
4369 Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); | |
4370 Py_CLEAR(clear_module_state->__pyx_n_s_IndexError); | |
4371 Py_CLEAR(clear_module_state->__pyx_n_s_KeyError); | |
4372 Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError); | |
4373 Py_CLEAR(clear_module_state->__pyx_n_s_NamedTupleProxy); | |
4374 Py_CLEAR(clear_module_state->__pyx_n_u_NamedTupleProxy); | |
4375 Py_CLEAR(clear_module_state->__pyx_n_s_NamedTupleProxy___reduce_cython); | |
4376 Py_CLEAR(clear_module_state->__pyx_n_s_NamedTupleProxy___setstate_cytho); | |
4377 Py_CLEAR(clear_module_state->__pyx_n_s_NotImplementedError); | |
4378 Py_CLEAR(clear_module_state->__pyx_n_s_OrderedDict); | |
4379 Py_CLEAR(clear_module_state->__pyx_n_s_PickleError); | |
4380 Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr); | |
4381 Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr_2); | |
4382 Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_CFunc_e2acea__5pysam_16lib); | |
4383 Py_CLEAR(clear_module_state->__pyx_n_s_StopIteration); | |
4384 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxy); | |
4385 Py_CLEAR(clear_module_state->__pyx_n_u_TupleProxy); | |
4386 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxyIterator); | |
4387 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxyIterator___reduce_cyth); | |
4388 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxyIterator___setstate_cy); | |
4389 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxy___copy); | |
4390 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxy___reduce_cython); | |
4391 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxy___setstate_cython); | |
4392 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxy__getindex); | |
4393 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxy__setindex); | |
4394 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxy_compare); | |
4395 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxy_getMaxFields); | |
4396 Py_CLEAR(clear_module_state->__pyx_n_s_TupleProxy_getMinFields); | |
4397 Py_CLEAR(clear_module_state->__pyx_n_s_TypeError); | |
4398 Py_CLEAR(clear_module_state->__pyx_n_s_VCFProxy); | |
4399 Py_CLEAR(clear_module_state->__pyx_n_u_VCFProxy); | |
4400 Py_CLEAR(clear_module_state->__pyx_n_s_VCFProxy___reduce_cython); | |
4401 Py_CLEAR(clear_module_state->__pyx_n_s_VCFProxy___setstate_cython); | |
4402 Py_CLEAR(clear_module_state->__pyx_n_s_ValueError); | |
4403 Py_CLEAR(clear_module_state->__pyx_kp_u__11); | |
4404 Py_CLEAR(clear_module_state->__pyx_kp_b__12); | |
4405 Py_CLEAR(clear_module_state->__pyx_kp_u__12); | |
4406 Py_CLEAR(clear_module_state->__pyx_kp_u__13); | |
4407 Py_CLEAR(clear_module_state->__pyx_kp_u__14); | |
4408 Py_CLEAR(clear_module_state->__pyx_kp_u__15); | |
4409 Py_CLEAR(clear_module_state->__pyx_kp_u__16); | |
4410 Py_CLEAR(clear_module_state->__pyx_kp_u__17); | |
4411 Py_CLEAR(clear_module_state->__pyx_kp_u__19); | |
4412 Py_CLEAR(clear_module_state->__pyx_kp_u__21); | |
4413 Py_CLEAR(clear_module_state->__pyx_kp_u__23); | |
4414 Py_CLEAR(clear_module_state->__pyx_kp_u__26); | |
4415 Py_CLEAR(clear_module_state->__pyx_kp_u__28); | |
4416 Py_CLEAR(clear_module_state->__pyx_n_s__32); | |
4417 Py_CLEAR(clear_module_state->__pyx_n_s__88); | |
4418 Py_CLEAR(clear_module_state->__pyx_n_s_aa); | |
4419 Py_CLEAR(clear_module_state->__pyx_n_s_all); | |
4420 Py_CLEAR(clear_module_state->__pyx_n_u_alt); | |
4421 Py_CLEAR(clear_module_state->__pyx_n_s_append); | |
4422 Py_CLEAR(clear_module_state->__pyx_n_s_args); | |
4423 Py_CLEAR(clear_module_state->__pyx_n_s_asDict); | |
4424 Py_CLEAR(clear_module_state->__pyx_n_s_as_dict); | |
4425 Py_CLEAR(clear_module_state->__pyx_n_u_ascii); | |
4426 Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); | |
4427 Py_CLEAR(clear_module_state->__pyx_n_s_attribute_dict2string); | |
4428 Py_CLEAR(clear_module_state->__pyx_n_s_attribute_string); | |
4429 Py_CLEAR(clear_module_state->__pyx_n_s_attribute_string2dict); | |
4430 Py_CLEAR(clear_module_state->__pyx_n_s_attribute_string2iterator); | |
4431 Py_CLEAR(clear_module_state->__pyx_n_s_attribute_string2iterator_locals); | |
4432 Py_CLEAR(clear_module_state->__pyx_n_s_attributes); | |
4433 Py_CLEAR(clear_module_state->__pyx_n_u_attributes); | |
4434 Py_CLEAR(clear_module_state->__pyx_kp_u_bed_format_requires_at_least_thr); | |
4435 Py_CLEAR(clear_module_state->__pyx_n_u_blockCount); | |
4436 Py_CLEAR(clear_module_state->__pyx_n_u_blockSizes); | |
4437 Py_CLEAR(clear_module_state->__pyx_n_u_blockStarts); | |
4438 Py_CLEAR(clear_module_state->__pyx_n_s_cfunc_to_py); | |
4439 Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem); | |
4440 Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); | |
4441 Py_CLEAR(clear_module_state->__pyx_n_s_close); | |
4442 Py_CLEAR(clear_module_state->__pyx_n_s_collections); | |
4443 Py_CLEAR(clear_module_state->__pyx_n_s_compare); | |
4444 Py_CLEAR(clear_module_state->__pyx_kp_u_comparison_of_modified_TupleProx); | |
4445 Py_CLEAR(clear_module_state->__pyx_n_s_contig); | |
4446 Py_CLEAR(clear_module_state->__pyx_n_u_contig); | |
4447 Py_CLEAR(clear_module_state->__pyx_n_s_copy); | |
4448 Py_CLEAR(clear_module_state->__pyx_n_s_copy_2); | |
4449 Py_CLEAR(clear_module_state->__pyx_kp_u_copying_modified_tuples_is_not_i); | |
4450 Py_CLEAR(clear_module_state->__pyx_n_s_d); | |
4451 Py_CLEAR(clear_module_state->__pyx_n_s_decode); | |
4452 Py_CLEAR(clear_module_state->__pyx_n_s_dict); | |
4453 Py_CLEAR(clear_module_state->__pyx_n_s_dict2attribute_string); | |
4454 Py_CLEAR(clear_module_state->__pyx_n_s_dict_2); | |
4455 Py_CLEAR(clear_module_state->__pyx_kp_u_disable); | |
4456 Py_CLEAR(clear_module_state->__pyx_kp_u_enable); | |
4457 Py_CLEAR(clear_module_state->__pyx_n_s_encoding); | |
4458 Py_CLEAR(clear_module_state->__pyx_n_s_end); | |
4459 Py_CLEAR(clear_module_state->__pyx_n_u_end); | |
4460 Py_CLEAR(clear_module_state->__pyx_n_s_endswith); | |
4461 Py_CLEAR(clear_module_state->__pyx_n_s_f); | |
4462 Py_CLEAR(clear_module_state->__pyx_n_s_feature); | |
4463 Py_CLEAR(clear_module_state->__pyx_n_u_feature); | |
4464 Py_CLEAR(clear_module_state->__pyx_kp_u_field_s_not_set); | |
4465 Py_CLEAR(clear_module_state->__pyx_n_s_fields); | |
4466 Py_CLEAR(clear_module_state->__pyx_n_u_filter); | |
4467 Py_CLEAR(clear_module_state->__pyx_n_s_format); | |
4468 Py_CLEAR(clear_module_state->__pyx_n_u_format); | |
4469 Py_CLEAR(clear_module_state->__pyx_n_s_frame); | |
4470 Py_CLEAR(clear_module_state->__pyx_n_u_frame); | |
4471 Py_CLEAR(clear_module_state->__pyx_n_s_fromDict); | |
4472 Py_CLEAR(clear_module_state->__pyx_n_s_from_dict); | |
4473 Py_CLEAR(clear_module_state->__pyx_kp_u_gc); | |
4474 Py_CLEAR(clear_module_state->__pyx_n_s_genexpr); | |
4475 Py_CLEAR(clear_module_state->__pyx_n_s_get); | |
4476 Py_CLEAR(clear_module_state->__pyx_n_s_getMaxFields); | |
4477 Py_CLEAR(clear_module_state->__pyx_n_s_getMinFields); | |
4478 Py_CLEAR(clear_module_state->__pyx_n_s_getattr); | |
4479 Py_CLEAR(clear_module_state->__pyx_n_s_getindex); | |
4480 Py_CLEAR(clear_module_state->__pyx_n_s_getstate); | |
4481 Py_CLEAR(clear_module_state->__pyx_n_s_i); | |
4482 Py_CLEAR(clear_module_state->__pyx_n_u_id); | |
4483 Py_CLEAR(clear_module_state->__pyx_n_s_idx); | |
4484 Py_CLEAR(clear_module_state->__pyx_n_s_import); | |
4485 Py_CLEAR(clear_module_state->__pyx_kp_u_incomplete_line_at_s); | |
4486 Py_CLEAR(clear_module_state->__pyx_n_s_index); | |
4487 Py_CLEAR(clear_module_state->__pyx_n_s_indices); | |
4488 Py_CLEAR(clear_module_state->__pyx_n_u_info); | |
4489 Py_CLEAR(clear_module_state->__pyx_n_s_initializing); | |
4490 Py_CLEAR(clear_module_state->__pyx_n_s_invert); | |
4491 Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); | |
4492 Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); | |
4493 Py_CLEAR(clear_module_state->__pyx_n_u_itemRGB); | |
4494 Py_CLEAR(clear_module_state->__pyx_n_s_items); | |
4495 Py_CLEAR(clear_module_state->__pyx_n_s_join); | |
4496 Py_CLEAR(clear_module_state->__pyx_n_s_k); | |
4497 Py_CLEAR(clear_module_state->__pyx_n_s_key); | |
4498 Py_CLEAR(clear_module_state->__pyx_n_s_keys); | |
4499 Py_CLEAR(clear_module_state->__pyx_n_s_kwargs); | |
4500 Py_CLEAR(clear_module_state->__pyx_n_s_lcontig); | |
4501 Py_CLEAR(clear_module_state->__pyx_kp_u_length_of_buffer_i_number_of_byt); | |
4502 Py_CLEAR(clear_module_state->__pyx_kp_u_list_index_out_of_range); | |
4503 Py_CLEAR(clear_module_state->__pyx_kp_u_list_index_out_of_range_i_i); | |
4504 Py_CLEAR(clear_module_state->__pyx_n_s_main); | |
4505 Py_CLEAR(clear_module_state->__pyx_n_s_map_key2field); | |
4506 Py_CLEAR(clear_module_state->__pyx_n_s_n); | |
4507 Py_CLEAR(clear_module_state->__pyx_n_s_name); | |
4508 Py_CLEAR(clear_module_state->__pyx_n_u_name); | |
4509 Py_CLEAR(clear_module_state->__pyx_n_s_name_2); | |
4510 Py_CLEAR(clear_module_state->__pyx_n_s_new); | |
4511 Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non); | |
4512 Py_CLEAR(clear_module_state->__pyx_kp_u_op_0_isn_t_implemented_yet); | |
4513 Py_CLEAR(clear_module_state->__pyx_n_s_other); | |
4514 Py_CLEAR(clear_module_state->__pyx_kp_u_out_of_memory); | |
4515 Py_CLEAR(clear_module_state->__pyx_kp_u_out_of_memory_in_TupleProxy_copy); | |
4516 Py_CLEAR(clear_module_state->__pyx_kp_u_out_of_memory_in_TupleProxy_upda); | |
4517 Py_CLEAR(clear_module_state->__pyx_kp_u_parsing_error_fewer_than_i_field); | |
4518 Py_CLEAR(clear_module_state->__pyx_kp_u_parsing_error_more_than_i_fields); | |
4519 Py_CLEAR(clear_module_state->__pyx_n_s_pickle); | |
4520 Py_CLEAR(clear_module_state->__pyx_n_u_pos); | |
4521 Py_CLEAR(clear_module_state->__pyx_n_s_proxy); | |
4522 Py_CLEAR(clear_module_state->__pyx_n_s_pysam_libctabixproxies); | |
4523 Py_CLEAR(clear_module_state->__pyx_kp_s_pysam_libctabixproxies_pyx); | |
4524 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError); | |
4525 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum); | |
4526 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result); | |
4527 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state); | |
4528 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type); | |
4529 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TupleProxyIterato); | |
4530 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable); | |
4531 Py_CLEAR(clear_module_state->__pyx_n_u_qual); | |
4532 Py_CLEAR(clear_module_state->__pyx_n_s_quote); | |
4533 Py_CLEAR(clear_module_state->__pyx_n_s_range); | |
4534 Py_CLEAR(clear_module_state->__pyx_n_s_reduce); | |
4535 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython); | |
4536 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); | |
4537 Py_CLEAR(clear_module_state->__pyx_n_u_ref); | |
4538 Py_CLEAR(clear_module_state->__pyx_kp_u_s); | |
4539 Py_CLEAR(clear_module_state->__pyx_n_s_s_2); | |
4540 Py_CLEAR(clear_module_state->__pyx_n_s_score); | |
4541 Py_CLEAR(clear_module_state->__pyx_n_u_score); | |
4542 Py_CLEAR(clear_module_state->__pyx_n_s_self); | |
4543 Py_CLEAR(clear_module_state->__pyx_n_s_send); | |
4544 Py_CLEAR(clear_module_state->__pyx_n_s_separator); | |
4545 Py_CLEAR(clear_module_state->__pyx_n_s_setAttribute); | |
4546 Py_CLEAR(clear_module_state->__pyx_n_s_setindex); | |
4547 Py_CLEAR(clear_module_state->__pyx_n_s_setitem); | |
4548 Py_CLEAR(clear_module_state->__pyx_n_s_setstate); | |
4549 Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); | |
4550 Py_CLEAR(clear_module_state->__pyx_n_s_source); | |
4551 Py_CLEAR(clear_module_state->__pyx_n_u_source); | |
4552 Py_CLEAR(clear_module_state->__pyx_n_s_spec); | |
4553 Py_CLEAR(clear_module_state->__pyx_n_s_split); | |
4554 Py_CLEAR(clear_module_state->__pyx_n_s_start); | |
4555 Py_CLEAR(clear_module_state->__pyx_n_u_start); | |
4556 Py_CLEAR(clear_module_state->__pyx_n_s_state); | |
4557 Py_CLEAR(clear_module_state->__pyx_n_s_str); | |
4558 Py_CLEAR(clear_module_state->__pyx_n_s_strand); | |
4559 Py_CLEAR(clear_module_state->__pyx_n_u_strand); | |
4560 Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); | |
4561 Py_CLEAR(clear_module_state->__pyx_n_s_strip); | |
4562 Py_CLEAR(clear_module_state->__pyx_n_s_super); | |
4563 Py_CLEAR(clear_module_state->__pyx_n_s_test); | |
4564 Py_CLEAR(clear_module_state->__pyx_n_u_thickEnd); | |
4565 Py_CLEAR(clear_module_state->__pyx_n_u_thickStart); | |
4566 Py_CLEAR(clear_module_state->__pyx_n_s_throw); | |
4567 Py_CLEAR(clear_module_state->__pyx_n_s_tmp); | |
4568 Py_CLEAR(clear_module_state->__pyx_n_s_toDot); | |
4569 Py_CLEAR(clear_module_state->__pyx_n_s_to_dict); | |
4570 Py_CLEAR(clear_module_state->__pyx_n_s_update); | |
4571 Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate); | |
4572 Py_CLEAR(clear_module_state->__pyx_n_s_v); | |
4573 Py_CLEAR(clear_module_state->__pyx_n_s_value); | |
4574 Py_CLEAR(clear_module_state->__pyx_n_s_wrap); | |
4575 Py_CLEAR(clear_module_state->__pyx_n_s_x); | |
4576 Py_CLEAR(clear_module_state->__pyx_n_s_xrange); | |
4577 Py_CLEAR(clear_module_state->__pyx_int_0); | |
4578 Py_CLEAR(clear_module_state->__pyx_int_1); | |
4579 Py_CLEAR(clear_module_state->__pyx_int_2); | |
4580 Py_CLEAR(clear_module_state->__pyx_int_3); | |
4581 Py_CLEAR(clear_module_state->__pyx_int_4); | |
4582 Py_CLEAR(clear_module_state->__pyx_int_5); | |
4583 Py_CLEAR(clear_module_state->__pyx_int_6); | |
4584 Py_CLEAR(clear_module_state->__pyx_int_7); | |
4585 Py_CLEAR(clear_module_state->__pyx_int_8); | |
4586 Py_CLEAR(clear_module_state->__pyx_int_9); | |
4587 Py_CLEAR(clear_module_state->__pyx_int_10); | |
4588 Py_CLEAR(clear_module_state->__pyx_int_11); | |
4589 Py_CLEAR(clear_module_state->__pyx_int_15441160); | |
4590 Py_CLEAR(clear_module_state->__pyx_int_101682796); | |
4591 Py_CLEAR(clear_module_state->__pyx_int_219412876); | |
4592 Py_CLEAR(clear_module_state->__pyx_int_neg_1); | |
4593 Py_CLEAR(clear_module_state->__pyx_tuple_); | |
4594 Py_CLEAR(clear_module_state->__pyx_tuple__5); | |
4595 Py_CLEAR(clear_module_state->__pyx_tuple__6); | |
4596 Py_CLEAR(clear_module_state->__pyx_tuple__7); | |
4597 Py_CLEAR(clear_module_state->__pyx_tuple__8); | |
4598 Py_CLEAR(clear_module_state->__pyx_tuple__9); | |
4599 Py_CLEAR(clear_module_state->__pyx_slice__20); | |
4600 Py_CLEAR(clear_module_state->__pyx_slice__24); | |
4601 Py_CLEAR(clear_module_state->__pyx_tuple__10); | |
4602 Py_CLEAR(clear_module_state->__pyx_tuple__22); | |
4603 Py_CLEAR(clear_module_state->__pyx_tuple__25); | |
4604 Py_CLEAR(clear_module_state->__pyx_tuple__29); | |
4605 Py_CLEAR(clear_module_state->__pyx_tuple__30); | |
4606 Py_CLEAR(clear_module_state->__pyx_tuple__31); | |
4607 Py_CLEAR(clear_module_state->__pyx_tuple__33); | |
4608 Py_CLEAR(clear_module_state->__pyx_tuple__35); | |
4609 Py_CLEAR(clear_module_state->__pyx_tuple__37); | |
4610 Py_CLEAR(clear_module_state->__pyx_tuple__40); | |
4611 Py_CLEAR(clear_module_state->__pyx_tuple__42); | |
4612 Py_CLEAR(clear_module_state->__pyx_tuple__45); | |
4613 Py_CLEAR(clear_module_state->__pyx_tuple__47); | |
4614 Py_CLEAR(clear_module_state->__pyx_tuple__58); | |
4615 Py_CLEAR(clear_module_state->__pyx_tuple__60); | |
4616 Py_CLEAR(clear_module_state->__pyx_tuple__63); | |
4617 Py_CLEAR(clear_module_state->__pyx_tuple__65); | |
4618 Py_CLEAR(clear_module_state->__pyx_tuple__67); | |
4619 Py_CLEAR(clear_module_state->__pyx_tuple__69); | |
4620 Py_CLEAR(clear_module_state->__pyx_tuple__70); | |
4621 Py_CLEAR(clear_module_state->__pyx_tuple__75); | |
4622 Py_CLEAR(clear_module_state->__pyx_tuple__77); | |
4623 Py_CLEAR(clear_module_state->__pyx_tuple__86); | |
4624 Py_CLEAR(clear_module_state->__pyx_codeobj__2); | |
4625 Py_CLEAR(clear_module_state->__pyx_codeobj__3); | |
4626 Py_CLEAR(clear_module_state->__pyx_codeobj__4); | |
4627 Py_CLEAR(clear_module_state->__pyx_codeobj__18); | |
4628 Py_CLEAR(clear_module_state->__pyx_codeobj__27); | |
4629 Py_CLEAR(clear_module_state->__pyx_codeobj__34); | |
4630 Py_CLEAR(clear_module_state->__pyx_codeobj__36); | |
4631 Py_CLEAR(clear_module_state->__pyx_codeobj__38); | |
4632 Py_CLEAR(clear_module_state->__pyx_codeobj__39); | |
4633 Py_CLEAR(clear_module_state->__pyx_codeobj__41); | |
4634 Py_CLEAR(clear_module_state->__pyx_codeobj__43); | |
4635 Py_CLEAR(clear_module_state->__pyx_codeobj__44); | |
4636 Py_CLEAR(clear_module_state->__pyx_codeobj__46); | |
4637 Py_CLEAR(clear_module_state->__pyx_codeobj__48); | |
4638 Py_CLEAR(clear_module_state->__pyx_codeobj__49); | |
4639 Py_CLEAR(clear_module_state->__pyx_codeobj__50); | |
4640 Py_CLEAR(clear_module_state->__pyx_codeobj__51); | |
4641 Py_CLEAR(clear_module_state->__pyx_codeobj__52); | |
4642 Py_CLEAR(clear_module_state->__pyx_codeobj__53); | |
4643 Py_CLEAR(clear_module_state->__pyx_codeobj__54); | |
4644 Py_CLEAR(clear_module_state->__pyx_codeobj__55); | |
4645 Py_CLEAR(clear_module_state->__pyx_codeobj__56); | |
4646 Py_CLEAR(clear_module_state->__pyx_codeobj__57); | |
4647 Py_CLEAR(clear_module_state->__pyx_codeobj__59); | |
4648 Py_CLEAR(clear_module_state->__pyx_codeobj__61); | |
4649 Py_CLEAR(clear_module_state->__pyx_codeobj__62); | |
4650 Py_CLEAR(clear_module_state->__pyx_codeobj__64); | |
4651 Py_CLEAR(clear_module_state->__pyx_codeobj__66); | |
4652 Py_CLEAR(clear_module_state->__pyx_codeobj__68); | |
4653 Py_CLEAR(clear_module_state->__pyx_codeobj__71); | |
4654 Py_CLEAR(clear_module_state->__pyx_codeobj__72); | |
4655 Py_CLEAR(clear_module_state->__pyx_codeobj__73); | |
4656 Py_CLEAR(clear_module_state->__pyx_codeobj__74); | |
4657 Py_CLEAR(clear_module_state->__pyx_codeobj__76); | |
4658 Py_CLEAR(clear_module_state->__pyx_codeobj__78); | |
4659 Py_CLEAR(clear_module_state->__pyx_codeobj__79); | |
4660 Py_CLEAR(clear_module_state->__pyx_codeobj__80); | |
4661 Py_CLEAR(clear_module_state->__pyx_codeobj__81); | |
4662 Py_CLEAR(clear_module_state->__pyx_codeobj__82); | |
4663 Py_CLEAR(clear_module_state->__pyx_codeobj__83); | |
4664 Py_CLEAR(clear_module_state->__pyx_codeobj__84); | |
4665 Py_CLEAR(clear_module_state->__pyx_codeobj__85); | |
4666 Py_CLEAR(clear_module_state->__pyx_codeobj__87); | |
4667 return 0; | |
4668 } | |
4669 #endif | |
4670 /* #### Code section: module_state_traverse ### */ | |
4671 #if CYTHON_USE_MODULE_STATE | |
4672 static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { | |
4673 __pyx_mstate *traverse_module_state = __pyx_mstate(m); | |
4674 if (!traverse_module_state) return 0; | |
4675 Py_VISIT(traverse_module_state->__pyx_d); | |
4676 Py_VISIT(traverse_module_state->__pyx_b); | |
4677 Py_VISIT(traverse_module_state->__pyx_cython_runtime); | |
4678 Py_VISIT(traverse_module_state->__pyx_empty_tuple); | |
4679 Py_VISIT(traverse_module_state->__pyx_empty_bytes); | |
4680 Py_VISIT(traverse_module_state->__pyx_empty_unicode); | |
4681 #ifdef __Pyx_CyFunction_USED | |
4682 Py_VISIT(traverse_module_state->__pyx_CyFunctionType); | |
4683 #endif | |
4684 #ifdef __Pyx_FusedFunction_USED | |
4685 Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); | |
4686 #endif | |
4687 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); | |
4688 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool); | |
4689 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex); | |
4690 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_5array_array); | |
4691 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); | |
4692 Py_VISIT(traverse_module_state->__pyx_type_5pysam_16libctabixproxies_TupleProxy); | |
4693 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator); | |
4694 Py_VISIT(traverse_module_state->__pyx_type_5pysam_16libctabixproxies_TupleProxyIterator); | |
4695 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy); | |
4696 Py_VISIT(traverse_module_state->__pyx_type_5pysam_16libctabixproxies_NamedTupleProxy); | |
4697 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
4698 Py_VISIT(traverse_module_state->__pyx_type_5pysam_16libctabixproxies_GTFProxy); | |
4699 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy); | |
4700 Py_VISIT(traverse_module_state->__pyx_type_5pysam_16libctabixproxies_GFF3Proxy); | |
4701 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_BedProxy); | |
4702 Py_VISIT(traverse_module_state->__pyx_type_5pysam_16libctabixproxies_BedProxy); | |
4703 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy); | |
4704 Py_VISIT(traverse_module_state->__pyx_type_5pysam_16libctabixproxies_VCFProxy); | |
4705 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator); | |
4706 Py_VISIT(traverse_module_state->__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator); | |
4707 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator); | |
4708 Py_VISIT(traverse_module_state->__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator); | |
4709 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr); | |
4710 Py_VISIT(traverse_module_state->__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr); | |
4711 Py_VISIT(traverse_module_state->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v); | |
4712 Py_VISIT(traverse_module_state->__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v); | |
4713 Py_VISIT(traverse_module_state->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v); | |
4714 Py_VISIT(traverse_module_state->__pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v); | |
4715 Py_VISIT(traverse_module_state->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v); | |
4716 Py_VISIT(traverse_module_state->__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v); | |
4717 Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError); | |
4718 Py_VISIT(traverse_module_state->__pyx_n_s_BedProxy); | |
4719 Py_VISIT(traverse_module_state->__pyx_n_u_BedProxy); | |
4720 Py_VISIT(traverse_module_state->__pyx_n_s_BedProxy___reduce_cython); | |
4721 Py_VISIT(traverse_module_state->__pyx_n_s_BedProxy___setstate_cython); | |
4722 Py_VISIT(traverse_module_state->__pyx_n_s_BedProxy_getMaxFields); | |
4723 Py_VISIT(traverse_module_state->__pyx_n_s_BedProxy_getMinFields); | |
4724 Py_VISIT(traverse_module_state->__pyx_n_s_GFF3Proxy); | |
4725 Py_VISIT(traverse_module_state->__pyx_n_u_GFF3Proxy); | |
4726 Py_VISIT(traverse_module_state->__pyx_n_s_GFF3Proxy___reduce_cython); | |
4727 Py_VISIT(traverse_module_state->__pyx_n_s_GFF3Proxy___setstate_cython); | |
4728 Py_VISIT(traverse_module_state->__pyx_n_s_GFF3Proxy_attribute_string2itera); | |
4729 Py_VISIT(traverse_module_state->__pyx_n_s_GFF3Proxy_dict2attribute_string); | |
4730 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy); | |
4731 Py_VISIT(traverse_module_state->__pyx_n_u_GTFProxy); | |
4732 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy___reduce_cython); | |
4733 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy___setstate_cython); | |
4734 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_asDict); | |
4735 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_as_dict); | |
4736 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_attribute_string2dict); | |
4737 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_attribute_string2iterat); | |
4738 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_dict2attribute_string); | |
4739 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_fromDict); | |
4740 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_from_dict); | |
4741 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_getMaxFields); | |
4742 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_getMinFields); | |
4743 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_invert); | |
4744 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_keys); | |
4745 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_setAttribute); | |
4746 Py_VISIT(traverse_module_state->__pyx_n_s_GTFProxy_to_dict); | |
4747 Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); | |
4748 Py_VISIT(traverse_module_state->__pyx_n_s_IndexError); | |
4749 Py_VISIT(traverse_module_state->__pyx_n_s_KeyError); | |
4750 Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError); | |
4751 Py_VISIT(traverse_module_state->__pyx_n_s_NamedTupleProxy); | |
4752 Py_VISIT(traverse_module_state->__pyx_n_u_NamedTupleProxy); | |
4753 Py_VISIT(traverse_module_state->__pyx_n_s_NamedTupleProxy___reduce_cython); | |
4754 Py_VISIT(traverse_module_state->__pyx_n_s_NamedTupleProxy___setstate_cytho); | |
4755 Py_VISIT(traverse_module_state->__pyx_n_s_NotImplementedError); | |
4756 Py_VISIT(traverse_module_state->__pyx_n_s_OrderedDict); | |
4757 Py_VISIT(traverse_module_state->__pyx_n_s_PickleError); | |
4758 Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr); | |
4759 Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr_2); | |
4760 Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_CFunc_e2acea__5pysam_16lib); | |
4761 Py_VISIT(traverse_module_state->__pyx_n_s_StopIteration); | |
4762 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxy); | |
4763 Py_VISIT(traverse_module_state->__pyx_n_u_TupleProxy); | |
4764 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxyIterator); | |
4765 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxyIterator___reduce_cyth); | |
4766 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxyIterator___setstate_cy); | |
4767 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxy___copy); | |
4768 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxy___reduce_cython); | |
4769 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxy___setstate_cython); | |
4770 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxy__getindex); | |
4771 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxy__setindex); | |
4772 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxy_compare); | |
4773 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxy_getMaxFields); | |
4774 Py_VISIT(traverse_module_state->__pyx_n_s_TupleProxy_getMinFields); | |
4775 Py_VISIT(traverse_module_state->__pyx_n_s_TypeError); | |
4776 Py_VISIT(traverse_module_state->__pyx_n_s_VCFProxy); | |
4777 Py_VISIT(traverse_module_state->__pyx_n_u_VCFProxy); | |
4778 Py_VISIT(traverse_module_state->__pyx_n_s_VCFProxy___reduce_cython); | |
4779 Py_VISIT(traverse_module_state->__pyx_n_s_VCFProxy___setstate_cython); | |
4780 Py_VISIT(traverse_module_state->__pyx_n_s_ValueError); | |
4781 Py_VISIT(traverse_module_state->__pyx_kp_u__11); | |
4782 Py_VISIT(traverse_module_state->__pyx_kp_b__12); | |
4783 Py_VISIT(traverse_module_state->__pyx_kp_u__12); | |
4784 Py_VISIT(traverse_module_state->__pyx_kp_u__13); | |
4785 Py_VISIT(traverse_module_state->__pyx_kp_u__14); | |
4786 Py_VISIT(traverse_module_state->__pyx_kp_u__15); | |
4787 Py_VISIT(traverse_module_state->__pyx_kp_u__16); | |
4788 Py_VISIT(traverse_module_state->__pyx_kp_u__17); | |
4789 Py_VISIT(traverse_module_state->__pyx_kp_u__19); | |
4790 Py_VISIT(traverse_module_state->__pyx_kp_u__21); | |
4791 Py_VISIT(traverse_module_state->__pyx_kp_u__23); | |
4792 Py_VISIT(traverse_module_state->__pyx_kp_u__26); | |
4793 Py_VISIT(traverse_module_state->__pyx_kp_u__28); | |
4794 Py_VISIT(traverse_module_state->__pyx_n_s__32); | |
4795 Py_VISIT(traverse_module_state->__pyx_n_s__88); | |
4796 Py_VISIT(traverse_module_state->__pyx_n_s_aa); | |
4797 Py_VISIT(traverse_module_state->__pyx_n_s_all); | |
4798 Py_VISIT(traverse_module_state->__pyx_n_u_alt); | |
4799 Py_VISIT(traverse_module_state->__pyx_n_s_append); | |
4800 Py_VISIT(traverse_module_state->__pyx_n_s_args); | |
4801 Py_VISIT(traverse_module_state->__pyx_n_s_asDict); | |
4802 Py_VISIT(traverse_module_state->__pyx_n_s_as_dict); | |
4803 Py_VISIT(traverse_module_state->__pyx_n_u_ascii); | |
4804 Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); | |
4805 Py_VISIT(traverse_module_state->__pyx_n_s_attribute_dict2string); | |
4806 Py_VISIT(traverse_module_state->__pyx_n_s_attribute_string); | |
4807 Py_VISIT(traverse_module_state->__pyx_n_s_attribute_string2dict); | |
4808 Py_VISIT(traverse_module_state->__pyx_n_s_attribute_string2iterator); | |
4809 Py_VISIT(traverse_module_state->__pyx_n_s_attribute_string2iterator_locals); | |
4810 Py_VISIT(traverse_module_state->__pyx_n_s_attributes); | |
4811 Py_VISIT(traverse_module_state->__pyx_n_u_attributes); | |
4812 Py_VISIT(traverse_module_state->__pyx_kp_u_bed_format_requires_at_least_thr); | |
4813 Py_VISIT(traverse_module_state->__pyx_n_u_blockCount); | |
4814 Py_VISIT(traverse_module_state->__pyx_n_u_blockSizes); | |
4815 Py_VISIT(traverse_module_state->__pyx_n_u_blockStarts); | |
4816 Py_VISIT(traverse_module_state->__pyx_n_s_cfunc_to_py); | |
4817 Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem); | |
4818 Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); | |
4819 Py_VISIT(traverse_module_state->__pyx_n_s_close); | |
4820 Py_VISIT(traverse_module_state->__pyx_n_s_collections); | |
4821 Py_VISIT(traverse_module_state->__pyx_n_s_compare); | |
4822 Py_VISIT(traverse_module_state->__pyx_kp_u_comparison_of_modified_TupleProx); | |
4823 Py_VISIT(traverse_module_state->__pyx_n_s_contig); | |
4824 Py_VISIT(traverse_module_state->__pyx_n_u_contig); | |
4825 Py_VISIT(traverse_module_state->__pyx_n_s_copy); | |
4826 Py_VISIT(traverse_module_state->__pyx_n_s_copy_2); | |
4827 Py_VISIT(traverse_module_state->__pyx_kp_u_copying_modified_tuples_is_not_i); | |
4828 Py_VISIT(traverse_module_state->__pyx_n_s_d); | |
4829 Py_VISIT(traverse_module_state->__pyx_n_s_decode); | |
4830 Py_VISIT(traverse_module_state->__pyx_n_s_dict); | |
4831 Py_VISIT(traverse_module_state->__pyx_n_s_dict2attribute_string); | |
4832 Py_VISIT(traverse_module_state->__pyx_n_s_dict_2); | |
4833 Py_VISIT(traverse_module_state->__pyx_kp_u_disable); | |
4834 Py_VISIT(traverse_module_state->__pyx_kp_u_enable); | |
4835 Py_VISIT(traverse_module_state->__pyx_n_s_encoding); | |
4836 Py_VISIT(traverse_module_state->__pyx_n_s_end); | |
4837 Py_VISIT(traverse_module_state->__pyx_n_u_end); | |
4838 Py_VISIT(traverse_module_state->__pyx_n_s_endswith); | |
4839 Py_VISIT(traverse_module_state->__pyx_n_s_f); | |
4840 Py_VISIT(traverse_module_state->__pyx_n_s_feature); | |
4841 Py_VISIT(traverse_module_state->__pyx_n_u_feature); | |
4842 Py_VISIT(traverse_module_state->__pyx_kp_u_field_s_not_set); | |
4843 Py_VISIT(traverse_module_state->__pyx_n_s_fields); | |
4844 Py_VISIT(traverse_module_state->__pyx_n_u_filter); | |
4845 Py_VISIT(traverse_module_state->__pyx_n_s_format); | |
4846 Py_VISIT(traverse_module_state->__pyx_n_u_format); | |
4847 Py_VISIT(traverse_module_state->__pyx_n_s_frame); | |
4848 Py_VISIT(traverse_module_state->__pyx_n_u_frame); | |
4849 Py_VISIT(traverse_module_state->__pyx_n_s_fromDict); | |
4850 Py_VISIT(traverse_module_state->__pyx_n_s_from_dict); | |
4851 Py_VISIT(traverse_module_state->__pyx_kp_u_gc); | |
4852 Py_VISIT(traverse_module_state->__pyx_n_s_genexpr); | |
4853 Py_VISIT(traverse_module_state->__pyx_n_s_get); | |
4854 Py_VISIT(traverse_module_state->__pyx_n_s_getMaxFields); | |
4855 Py_VISIT(traverse_module_state->__pyx_n_s_getMinFields); | |
4856 Py_VISIT(traverse_module_state->__pyx_n_s_getattr); | |
4857 Py_VISIT(traverse_module_state->__pyx_n_s_getindex); | |
4858 Py_VISIT(traverse_module_state->__pyx_n_s_getstate); | |
4859 Py_VISIT(traverse_module_state->__pyx_n_s_i); | |
4860 Py_VISIT(traverse_module_state->__pyx_n_u_id); | |
4861 Py_VISIT(traverse_module_state->__pyx_n_s_idx); | |
4862 Py_VISIT(traverse_module_state->__pyx_n_s_import); | |
4863 Py_VISIT(traverse_module_state->__pyx_kp_u_incomplete_line_at_s); | |
4864 Py_VISIT(traverse_module_state->__pyx_n_s_index); | |
4865 Py_VISIT(traverse_module_state->__pyx_n_s_indices); | |
4866 Py_VISIT(traverse_module_state->__pyx_n_u_info); | |
4867 Py_VISIT(traverse_module_state->__pyx_n_s_initializing); | |
4868 Py_VISIT(traverse_module_state->__pyx_n_s_invert); | |
4869 Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); | |
4870 Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); | |
4871 Py_VISIT(traverse_module_state->__pyx_n_u_itemRGB); | |
4872 Py_VISIT(traverse_module_state->__pyx_n_s_items); | |
4873 Py_VISIT(traverse_module_state->__pyx_n_s_join); | |
4874 Py_VISIT(traverse_module_state->__pyx_n_s_k); | |
4875 Py_VISIT(traverse_module_state->__pyx_n_s_key); | |
4876 Py_VISIT(traverse_module_state->__pyx_n_s_keys); | |
4877 Py_VISIT(traverse_module_state->__pyx_n_s_kwargs); | |
4878 Py_VISIT(traverse_module_state->__pyx_n_s_lcontig); | |
4879 Py_VISIT(traverse_module_state->__pyx_kp_u_length_of_buffer_i_number_of_byt); | |
4880 Py_VISIT(traverse_module_state->__pyx_kp_u_list_index_out_of_range); | |
4881 Py_VISIT(traverse_module_state->__pyx_kp_u_list_index_out_of_range_i_i); | |
4882 Py_VISIT(traverse_module_state->__pyx_n_s_main); | |
4883 Py_VISIT(traverse_module_state->__pyx_n_s_map_key2field); | |
4884 Py_VISIT(traverse_module_state->__pyx_n_s_n); | |
4885 Py_VISIT(traverse_module_state->__pyx_n_s_name); | |
4886 Py_VISIT(traverse_module_state->__pyx_n_u_name); | |
4887 Py_VISIT(traverse_module_state->__pyx_n_s_name_2); | |
4888 Py_VISIT(traverse_module_state->__pyx_n_s_new); | |
4889 Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non); | |
4890 Py_VISIT(traverse_module_state->__pyx_kp_u_op_0_isn_t_implemented_yet); | |
4891 Py_VISIT(traverse_module_state->__pyx_n_s_other); | |
4892 Py_VISIT(traverse_module_state->__pyx_kp_u_out_of_memory); | |
4893 Py_VISIT(traverse_module_state->__pyx_kp_u_out_of_memory_in_TupleProxy_copy); | |
4894 Py_VISIT(traverse_module_state->__pyx_kp_u_out_of_memory_in_TupleProxy_upda); | |
4895 Py_VISIT(traverse_module_state->__pyx_kp_u_parsing_error_fewer_than_i_field); | |
4896 Py_VISIT(traverse_module_state->__pyx_kp_u_parsing_error_more_than_i_fields); | |
4897 Py_VISIT(traverse_module_state->__pyx_n_s_pickle); | |
4898 Py_VISIT(traverse_module_state->__pyx_n_u_pos); | |
4899 Py_VISIT(traverse_module_state->__pyx_n_s_proxy); | |
4900 Py_VISIT(traverse_module_state->__pyx_n_s_pysam_libctabixproxies); | |
4901 Py_VISIT(traverse_module_state->__pyx_kp_s_pysam_libctabixproxies_pyx); | |
4902 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError); | |
4903 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum); | |
4904 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result); | |
4905 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state); | |
4906 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type); | |
4907 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TupleProxyIterato); | |
4908 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable); | |
4909 Py_VISIT(traverse_module_state->__pyx_n_u_qual); | |
4910 Py_VISIT(traverse_module_state->__pyx_n_s_quote); | |
4911 Py_VISIT(traverse_module_state->__pyx_n_s_range); | |
4912 Py_VISIT(traverse_module_state->__pyx_n_s_reduce); | |
4913 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython); | |
4914 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); | |
4915 Py_VISIT(traverse_module_state->__pyx_n_u_ref); | |
4916 Py_VISIT(traverse_module_state->__pyx_kp_u_s); | |
4917 Py_VISIT(traverse_module_state->__pyx_n_s_s_2); | |
4918 Py_VISIT(traverse_module_state->__pyx_n_s_score); | |
4919 Py_VISIT(traverse_module_state->__pyx_n_u_score); | |
4920 Py_VISIT(traverse_module_state->__pyx_n_s_self); | |
4921 Py_VISIT(traverse_module_state->__pyx_n_s_send); | |
4922 Py_VISIT(traverse_module_state->__pyx_n_s_separator); | |
4923 Py_VISIT(traverse_module_state->__pyx_n_s_setAttribute); | |
4924 Py_VISIT(traverse_module_state->__pyx_n_s_setindex); | |
4925 Py_VISIT(traverse_module_state->__pyx_n_s_setitem); | |
4926 Py_VISIT(traverse_module_state->__pyx_n_s_setstate); | |
4927 Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); | |
4928 Py_VISIT(traverse_module_state->__pyx_n_s_source); | |
4929 Py_VISIT(traverse_module_state->__pyx_n_u_source); | |
4930 Py_VISIT(traverse_module_state->__pyx_n_s_spec); | |
4931 Py_VISIT(traverse_module_state->__pyx_n_s_split); | |
4932 Py_VISIT(traverse_module_state->__pyx_n_s_start); | |
4933 Py_VISIT(traverse_module_state->__pyx_n_u_start); | |
4934 Py_VISIT(traverse_module_state->__pyx_n_s_state); | |
4935 Py_VISIT(traverse_module_state->__pyx_n_s_str); | |
4936 Py_VISIT(traverse_module_state->__pyx_n_s_strand); | |
4937 Py_VISIT(traverse_module_state->__pyx_n_u_strand); | |
4938 Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); | |
4939 Py_VISIT(traverse_module_state->__pyx_n_s_strip); | |
4940 Py_VISIT(traverse_module_state->__pyx_n_s_super); | |
4941 Py_VISIT(traverse_module_state->__pyx_n_s_test); | |
4942 Py_VISIT(traverse_module_state->__pyx_n_u_thickEnd); | |
4943 Py_VISIT(traverse_module_state->__pyx_n_u_thickStart); | |
4944 Py_VISIT(traverse_module_state->__pyx_n_s_throw); | |
4945 Py_VISIT(traverse_module_state->__pyx_n_s_tmp); | |
4946 Py_VISIT(traverse_module_state->__pyx_n_s_toDot); | |
4947 Py_VISIT(traverse_module_state->__pyx_n_s_to_dict); | |
4948 Py_VISIT(traverse_module_state->__pyx_n_s_update); | |
4949 Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate); | |
4950 Py_VISIT(traverse_module_state->__pyx_n_s_v); | |
4951 Py_VISIT(traverse_module_state->__pyx_n_s_value); | |
4952 Py_VISIT(traverse_module_state->__pyx_n_s_wrap); | |
4953 Py_VISIT(traverse_module_state->__pyx_n_s_x); | |
4954 Py_VISIT(traverse_module_state->__pyx_n_s_xrange); | |
4955 Py_VISIT(traverse_module_state->__pyx_int_0); | |
4956 Py_VISIT(traverse_module_state->__pyx_int_1); | |
4957 Py_VISIT(traverse_module_state->__pyx_int_2); | |
4958 Py_VISIT(traverse_module_state->__pyx_int_3); | |
4959 Py_VISIT(traverse_module_state->__pyx_int_4); | |
4960 Py_VISIT(traverse_module_state->__pyx_int_5); | |
4961 Py_VISIT(traverse_module_state->__pyx_int_6); | |
4962 Py_VISIT(traverse_module_state->__pyx_int_7); | |
4963 Py_VISIT(traverse_module_state->__pyx_int_8); | |
4964 Py_VISIT(traverse_module_state->__pyx_int_9); | |
4965 Py_VISIT(traverse_module_state->__pyx_int_10); | |
4966 Py_VISIT(traverse_module_state->__pyx_int_11); | |
4967 Py_VISIT(traverse_module_state->__pyx_int_15441160); | |
4968 Py_VISIT(traverse_module_state->__pyx_int_101682796); | |
4969 Py_VISIT(traverse_module_state->__pyx_int_219412876); | |
4970 Py_VISIT(traverse_module_state->__pyx_int_neg_1); | |
4971 Py_VISIT(traverse_module_state->__pyx_tuple_); | |
4972 Py_VISIT(traverse_module_state->__pyx_tuple__5); | |
4973 Py_VISIT(traverse_module_state->__pyx_tuple__6); | |
4974 Py_VISIT(traverse_module_state->__pyx_tuple__7); | |
4975 Py_VISIT(traverse_module_state->__pyx_tuple__8); | |
4976 Py_VISIT(traverse_module_state->__pyx_tuple__9); | |
4977 Py_VISIT(traverse_module_state->__pyx_slice__20); | |
4978 Py_VISIT(traverse_module_state->__pyx_slice__24); | |
4979 Py_VISIT(traverse_module_state->__pyx_tuple__10); | |
4980 Py_VISIT(traverse_module_state->__pyx_tuple__22); | |
4981 Py_VISIT(traverse_module_state->__pyx_tuple__25); | |
4982 Py_VISIT(traverse_module_state->__pyx_tuple__29); | |
4983 Py_VISIT(traverse_module_state->__pyx_tuple__30); | |
4984 Py_VISIT(traverse_module_state->__pyx_tuple__31); | |
4985 Py_VISIT(traverse_module_state->__pyx_tuple__33); | |
4986 Py_VISIT(traverse_module_state->__pyx_tuple__35); | |
4987 Py_VISIT(traverse_module_state->__pyx_tuple__37); | |
4988 Py_VISIT(traverse_module_state->__pyx_tuple__40); | |
4989 Py_VISIT(traverse_module_state->__pyx_tuple__42); | |
4990 Py_VISIT(traverse_module_state->__pyx_tuple__45); | |
4991 Py_VISIT(traverse_module_state->__pyx_tuple__47); | |
4992 Py_VISIT(traverse_module_state->__pyx_tuple__58); | |
4993 Py_VISIT(traverse_module_state->__pyx_tuple__60); | |
4994 Py_VISIT(traverse_module_state->__pyx_tuple__63); | |
4995 Py_VISIT(traverse_module_state->__pyx_tuple__65); | |
4996 Py_VISIT(traverse_module_state->__pyx_tuple__67); | |
4997 Py_VISIT(traverse_module_state->__pyx_tuple__69); | |
4998 Py_VISIT(traverse_module_state->__pyx_tuple__70); | |
4999 Py_VISIT(traverse_module_state->__pyx_tuple__75); | |
5000 Py_VISIT(traverse_module_state->__pyx_tuple__77); | |
5001 Py_VISIT(traverse_module_state->__pyx_tuple__86); | |
5002 Py_VISIT(traverse_module_state->__pyx_codeobj__2); | |
5003 Py_VISIT(traverse_module_state->__pyx_codeobj__3); | |
5004 Py_VISIT(traverse_module_state->__pyx_codeobj__4); | |
5005 Py_VISIT(traverse_module_state->__pyx_codeobj__18); | |
5006 Py_VISIT(traverse_module_state->__pyx_codeobj__27); | |
5007 Py_VISIT(traverse_module_state->__pyx_codeobj__34); | |
5008 Py_VISIT(traverse_module_state->__pyx_codeobj__36); | |
5009 Py_VISIT(traverse_module_state->__pyx_codeobj__38); | |
5010 Py_VISIT(traverse_module_state->__pyx_codeobj__39); | |
5011 Py_VISIT(traverse_module_state->__pyx_codeobj__41); | |
5012 Py_VISIT(traverse_module_state->__pyx_codeobj__43); | |
5013 Py_VISIT(traverse_module_state->__pyx_codeobj__44); | |
5014 Py_VISIT(traverse_module_state->__pyx_codeobj__46); | |
5015 Py_VISIT(traverse_module_state->__pyx_codeobj__48); | |
5016 Py_VISIT(traverse_module_state->__pyx_codeobj__49); | |
5017 Py_VISIT(traverse_module_state->__pyx_codeobj__50); | |
5018 Py_VISIT(traverse_module_state->__pyx_codeobj__51); | |
5019 Py_VISIT(traverse_module_state->__pyx_codeobj__52); | |
5020 Py_VISIT(traverse_module_state->__pyx_codeobj__53); | |
5021 Py_VISIT(traverse_module_state->__pyx_codeobj__54); | |
5022 Py_VISIT(traverse_module_state->__pyx_codeobj__55); | |
5023 Py_VISIT(traverse_module_state->__pyx_codeobj__56); | |
5024 Py_VISIT(traverse_module_state->__pyx_codeobj__57); | |
5025 Py_VISIT(traverse_module_state->__pyx_codeobj__59); | |
5026 Py_VISIT(traverse_module_state->__pyx_codeobj__61); | |
5027 Py_VISIT(traverse_module_state->__pyx_codeobj__62); | |
5028 Py_VISIT(traverse_module_state->__pyx_codeobj__64); | |
5029 Py_VISIT(traverse_module_state->__pyx_codeobj__66); | |
5030 Py_VISIT(traverse_module_state->__pyx_codeobj__68); | |
5031 Py_VISIT(traverse_module_state->__pyx_codeobj__71); | |
5032 Py_VISIT(traverse_module_state->__pyx_codeobj__72); | |
5033 Py_VISIT(traverse_module_state->__pyx_codeobj__73); | |
5034 Py_VISIT(traverse_module_state->__pyx_codeobj__74); | |
5035 Py_VISIT(traverse_module_state->__pyx_codeobj__76); | |
5036 Py_VISIT(traverse_module_state->__pyx_codeobj__78); | |
5037 Py_VISIT(traverse_module_state->__pyx_codeobj__79); | |
5038 Py_VISIT(traverse_module_state->__pyx_codeobj__80); | |
5039 Py_VISIT(traverse_module_state->__pyx_codeobj__81); | |
5040 Py_VISIT(traverse_module_state->__pyx_codeobj__82); | |
5041 Py_VISIT(traverse_module_state->__pyx_codeobj__83); | |
5042 Py_VISIT(traverse_module_state->__pyx_codeobj__84); | |
5043 Py_VISIT(traverse_module_state->__pyx_codeobj__85); | |
5044 Py_VISIT(traverse_module_state->__pyx_codeobj__87); | |
5045 return 0; | |
5046 } | |
5047 #endif | |
5048 /* #### Code section: module_state_defines ### */ | |
5049 #define __pyx_d __pyx_mstate_global->__pyx_d | |
5050 #define __pyx_b __pyx_mstate_global->__pyx_b | |
5051 #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime | |
5052 #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple | |
5053 #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes | |
5054 #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode | |
5055 #ifdef __Pyx_CyFunction_USED | |
5056 #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType | |
5057 #endif | |
5058 #ifdef __Pyx_FusedFunction_USED | |
5059 #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType | |
5060 #endif | |
5061 #ifdef __Pyx_Generator_USED | |
5062 #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType | |
5063 #endif | |
5064 #ifdef __Pyx_IterableCoroutine_USED | |
5065 #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType | |
5066 #endif | |
5067 #ifdef __Pyx_Coroutine_USED | |
5068 #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType | |
5069 #endif | |
5070 #ifdef __Pyx_Coroutine_USED | |
5071 #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType | |
5072 #endif | |
5073 #if CYTHON_USE_MODULE_STATE | |
5074 #endif | |
5075 #if CYTHON_USE_MODULE_STATE | |
5076 #endif | |
5077 #if CYTHON_USE_MODULE_STATE | |
5078 #endif | |
5079 #if CYTHON_USE_MODULE_STATE | |
5080 #endif | |
5081 #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type | |
5082 #if CYTHON_USE_MODULE_STATE | |
5083 #endif | |
5084 #if CYTHON_USE_MODULE_STATE | |
5085 #endif | |
5086 #if CYTHON_USE_MODULE_STATE | |
5087 #endif | |
5088 #if CYTHON_USE_MODULE_STATE | |
5089 #endif | |
5090 #if CYTHON_USE_MODULE_STATE | |
5091 #endif | |
5092 #if CYTHON_USE_MODULE_STATE | |
5093 #endif | |
5094 #if CYTHON_USE_MODULE_STATE | |
5095 #endif | |
5096 #if CYTHON_USE_MODULE_STATE | |
5097 #endif | |
5098 #if CYTHON_USE_MODULE_STATE | |
5099 #endif | |
5100 #if CYTHON_USE_MODULE_STATE | |
5101 #endif | |
5102 #if CYTHON_USE_MODULE_STATE | |
5103 #endif | |
5104 #if CYTHON_USE_MODULE_STATE | |
5105 #endif | |
5106 #if CYTHON_USE_MODULE_STATE | |
5107 #endif | |
5108 #if CYTHON_USE_MODULE_STATE | |
5109 #endif | |
5110 #if CYTHON_USE_MODULE_STATE | |
5111 #endif | |
5112 #if CYTHON_USE_MODULE_STATE | |
5113 #endif | |
5114 #define __pyx_ptype_7cpython_4bool_bool __pyx_mstate_global->__pyx_ptype_7cpython_4bool_bool | |
5115 #if CYTHON_USE_MODULE_STATE | |
5116 #endif | |
5117 #if CYTHON_USE_MODULE_STATE | |
5118 #endif | |
5119 #if CYTHON_USE_MODULE_STATE | |
5120 #endif | |
5121 #if CYTHON_USE_MODULE_STATE | |
5122 #endif | |
5123 #define __pyx_ptype_7cpython_7complex_complex __pyx_mstate_global->__pyx_ptype_7cpython_7complex_complex | |
5124 #if CYTHON_USE_MODULE_STATE | |
5125 #endif | |
5126 #if CYTHON_USE_MODULE_STATE | |
5127 #endif | |
5128 #if CYTHON_USE_MODULE_STATE | |
5129 #endif | |
5130 #if CYTHON_USE_MODULE_STATE | |
5131 #endif | |
5132 #if CYTHON_USE_MODULE_STATE | |
5133 #endif | |
5134 #if CYTHON_USE_MODULE_STATE | |
5135 #endif | |
5136 #if CYTHON_USE_MODULE_STATE | |
5137 #endif | |
5138 #if CYTHON_USE_MODULE_STATE | |
5139 #endif | |
5140 #if CYTHON_USE_MODULE_STATE | |
5141 #endif | |
5142 #if CYTHON_USE_MODULE_STATE | |
5143 #endif | |
5144 #if CYTHON_USE_MODULE_STATE | |
5145 #endif | |
5146 #if CYTHON_USE_MODULE_STATE | |
5147 #endif | |
5148 #if CYTHON_USE_MODULE_STATE | |
5149 #endif | |
5150 #if CYTHON_USE_MODULE_STATE | |
5151 #endif | |
5152 #if CYTHON_USE_MODULE_STATE | |
5153 #endif | |
5154 #if CYTHON_USE_MODULE_STATE | |
5155 #endif | |
5156 #if CYTHON_USE_MODULE_STATE | |
5157 #endif | |
5158 #if CYTHON_USE_MODULE_STATE | |
5159 #endif | |
5160 #if CYTHON_USE_MODULE_STATE | |
5161 #endif | |
5162 #if CYTHON_USE_MODULE_STATE | |
5163 #endif | |
5164 #if CYTHON_USE_MODULE_STATE | |
5165 #endif | |
5166 #if CYTHON_USE_MODULE_STATE | |
5167 #endif | |
5168 #if CYTHON_USE_MODULE_STATE | |
5169 #endif | |
5170 #if CYTHON_USE_MODULE_STATE | |
5171 #endif | |
5172 #define __pyx_ptype_7cpython_5array_array __pyx_mstate_global->__pyx_ptype_7cpython_5array_array | |
5173 #if CYTHON_USE_MODULE_STATE | |
5174 #endif | |
5175 #if CYTHON_USE_MODULE_STATE | |
5176 #define __pyx_type_5pysam_16libctabixproxies_TupleProxy __pyx_mstate_global->__pyx_type_5pysam_16libctabixproxies_TupleProxy | |
5177 #define __pyx_type_5pysam_16libctabixproxies_TupleProxyIterator __pyx_mstate_global->__pyx_type_5pysam_16libctabixproxies_TupleProxyIterator | |
5178 #define __pyx_type_5pysam_16libctabixproxies_NamedTupleProxy __pyx_mstate_global->__pyx_type_5pysam_16libctabixproxies_NamedTupleProxy | |
5179 #define __pyx_type_5pysam_16libctabixproxies_GTFProxy __pyx_mstate_global->__pyx_type_5pysam_16libctabixproxies_GTFProxy | |
5180 #define __pyx_type_5pysam_16libctabixproxies_GFF3Proxy __pyx_mstate_global->__pyx_type_5pysam_16libctabixproxies_GFF3Proxy | |
5181 #define __pyx_type_5pysam_16libctabixproxies_BedProxy __pyx_mstate_global->__pyx_type_5pysam_16libctabixproxies_BedProxy | |
5182 #define __pyx_type_5pysam_16libctabixproxies_VCFProxy __pyx_mstate_global->__pyx_type_5pysam_16libctabixproxies_VCFProxy | |
5183 #define __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator __pyx_mstate_global->__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator | |
5184 #define __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator __pyx_mstate_global->__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator | |
5185 #define __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr __pyx_mstate_global->__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr | |
5186 #define __pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v __pyx_mstate_global->__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v | |
5187 #define __pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v __pyx_mstate_global->__pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v | |
5188 #define __pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v __pyx_mstate_global->__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v | |
5189 #endif | |
5190 #define __pyx_ptype_5pysam_16libctabixproxies_TupleProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy | |
5191 #define __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator | |
5192 #define __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy | |
5193 #define __pyx_ptype_5pysam_16libctabixproxies_GTFProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy | |
5194 #define __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy | |
5195 #define __pyx_ptype_5pysam_16libctabixproxies_BedProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_BedProxy | |
5196 #define __pyx_ptype_5pysam_16libctabixproxies_VCFProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy | |
5197 #define __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator | |
5198 #define __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator | |
5199 #define __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr | |
5200 #define __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v __pyx_mstate_global->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v | |
5201 #define __pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v __pyx_mstate_global->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v | |
5202 #define __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v __pyx_mstate_global->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v | |
5203 #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError | |
5204 #define __pyx_n_s_BedProxy __pyx_mstate_global->__pyx_n_s_BedProxy | |
5205 #define __pyx_n_u_BedProxy __pyx_mstate_global->__pyx_n_u_BedProxy | |
5206 #define __pyx_n_s_BedProxy___reduce_cython __pyx_mstate_global->__pyx_n_s_BedProxy___reduce_cython | |
5207 #define __pyx_n_s_BedProxy___setstate_cython __pyx_mstate_global->__pyx_n_s_BedProxy___setstate_cython | |
5208 #define __pyx_n_s_BedProxy_getMaxFields __pyx_mstate_global->__pyx_n_s_BedProxy_getMaxFields | |
5209 #define __pyx_n_s_BedProxy_getMinFields __pyx_mstate_global->__pyx_n_s_BedProxy_getMinFields | |
5210 #define __pyx_n_s_GFF3Proxy __pyx_mstate_global->__pyx_n_s_GFF3Proxy | |
5211 #define __pyx_n_u_GFF3Proxy __pyx_mstate_global->__pyx_n_u_GFF3Proxy | |
5212 #define __pyx_n_s_GFF3Proxy___reduce_cython __pyx_mstate_global->__pyx_n_s_GFF3Proxy___reduce_cython | |
5213 #define __pyx_n_s_GFF3Proxy___setstate_cython __pyx_mstate_global->__pyx_n_s_GFF3Proxy___setstate_cython | |
5214 #define __pyx_n_s_GFF3Proxy_attribute_string2itera __pyx_mstate_global->__pyx_n_s_GFF3Proxy_attribute_string2itera | |
5215 #define __pyx_n_s_GFF3Proxy_dict2attribute_string __pyx_mstate_global->__pyx_n_s_GFF3Proxy_dict2attribute_string | |
5216 #define __pyx_n_s_GTFProxy __pyx_mstate_global->__pyx_n_s_GTFProxy | |
5217 #define __pyx_n_u_GTFProxy __pyx_mstate_global->__pyx_n_u_GTFProxy | |
5218 #define __pyx_n_s_GTFProxy___reduce_cython __pyx_mstate_global->__pyx_n_s_GTFProxy___reduce_cython | |
5219 #define __pyx_n_s_GTFProxy___setstate_cython __pyx_mstate_global->__pyx_n_s_GTFProxy___setstate_cython | |
5220 #define __pyx_n_s_GTFProxy_asDict __pyx_mstate_global->__pyx_n_s_GTFProxy_asDict | |
5221 #define __pyx_n_s_GTFProxy_as_dict __pyx_mstate_global->__pyx_n_s_GTFProxy_as_dict | |
5222 #define __pyx_n_s_GTFProxy_attribute_string2dict __pyx_mstate_global->__pyx_n_s_GTFProxy_attribute_string2dict | |
5223 #define __pyx_n_s_GTFProxy_attribute_string2iterat __pyx_mstate_global->__pyx_n_s_GTFProxy_attribute_string2iterat | |
5224 #define __pyx_n_s_GTFProxy_dict2attribute_string __pyx_mstate_global->__pyx_n_s_GTFProxy_dict2attribute_string | |
5225 #define __pyx_n_s_GTFProxy_fromDict __pyx_mstate_global->__pyx_n_s_GTFProxy_fromDict | |
5226 #define __pyx_n_s_GTFProxy_from_dict __pyx_mstate_global->__pyx_n_s_GTFProxy_from_dict | |
5227 #define __pyx_n_s_GTFProxy_getMaxFields __pyx_mstate_global->__pyx_n_s_GTFProxy_getMaxFields | |
5228 #define __pyx_n_s_GTFProxy_getMinFields __pyx_mstate_global->__pyx_n_s_GTFProxy_getMinFields | |
5229 #define __pyx_n_s_GTFProxy_invert __pyx_mstate_global->__pyx_n_s_GTFProxy_invert | |
5230 #define __pyx_n_s_GTFProxy_keys __pyx_mstate_global->__pyx_n_s_GTFProxy_keys | |
5231 #define __pyx_n_s_GTFProxy_setAttribute __pyx_mstate_global->__pyx_n_s_GTFProxy_setAttribute | |
5232 #define __pyx_n_s_GTFProxy_to_dict __pyx_mstate_global->__pyx_n_s_GTFProxy_to_dict | |
5233 #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0 | |
5234 #define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError | |
5235 #define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError | |
5236 #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError | |
5237 #define __pyx_n_s_NamedTupleProxy __pyx_mstate_global->__pyx_n_s_NamedTupleProxy | |
5238 #define __pyx_n_u_NamedTupleProxy __pyx_mstate_global->__pyx_n_u_NamedTupleProxy | |
5239 #define __pyx_n_s_NamedTupleProxy___reduce_cython __pyx_mstate_global->__pyx_n_s_NamedTupleProxy___reduce_cython | |
5240 #define __pyx_n_s_NamedTupleProxy___setstate_cytho __pyx_mstate_global->__pyx_n_s_NamedTupleProxy___setstate_cytho | |
5241 #define __pyx_n_s_NotImplementedError __pyx_mstate_global->__pyx_n_s_NotImplementedError | |
5242 #define __pyx_n_s_OrderedDict __pyx_mstate_global->__pyx_n_s_OrderedDict | |
5243 #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError | |
5244 #define __pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr __pyx_mstate_global->__pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr | |
5245 #define __pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr_2 __pyx_mstate_global->__pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr_2 | |
5246 #define __pyx_n_s_Pyx_CFunc_e2acea__5pysam_16lib __pyx_mstate_global->__pyx_n_s_Pyx_CFunc_e2acea__5pysam_16lib | |
5247 #define __pyx_n_s_StopIteration __pyx_mstate_global->__pyx_n_s_StopIteration | |
5248 #define __pyx_n_s_TupleProxy __pyx_mstate_global->__pyx_n_s_TupleProxy | |
5249 #define __pyx_n_u_TupleProxy __pyx_mstate_global->__pyx_n_u_TupleProxy | |
5250 #define __pyx_n_s_TupleProxyIterator __pyx_mstate_global->__pyx_n_s_TupleProxyIterator | |
5251 #define __pyx_n_s_TupleProxyIterator___reduce_cyth __pyx_mstate_global->__pyx_n_s_TupleProxyIterator___reduce_cyth | |
5252 #define __pyx_n_s_TupleProxyIterator___setstate_cy __pyx_mstate_global->__pyx_n_s_TupleProxyIterator___setstate_cy | |
5253 #define __pyx_n_s_TupleProxy___copy __pyx_mstate_global->__pyx_n_s_TupleProxy___copy | |
5254 #define __pyx_n_s_TupleProxy___reduce_cython __pyx_mstate_global->__pyx_n_s_TupleProxy___reduce_cython | |
5255 #define __pyx_n_s_TupleProxy___setstate_cython __pyx_mstate_global->__pyx_n_s_TupleProxy___setstate_cython | |
5256 #define __pyx_n_s_TupleProxy__getindex __pyx_mstate_global->__pyx_n_s_TupleProxy__getindex | |
5257 #define __pyx_n_s_TupleProxy__setindex __pyx_mstate_global->__pyx_n_s_TupleProxy__setindex | |
5258 #define __pyx_n_s_TupleProxy_compare __pyx_mstate_global->__pyx_n_s_TupleProxy_compare | |
5259 #define __pyx_n_s_TupleProxy_getMaxFields __pyx_mstate_global->__pyx_n_s_TupleProxy_getMaxFields | |
5260 #define __pyx_n_s_TupleProxy_getMinFields __pyx_mstate_global->__pyx_n_s_TupleProxy_getMinFields | |
5261 #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError | |
5262 #define __pyx_n_s_VCFProxy __pyx_mstate_global->__pyx_n_s_VCFProxy | |
5263 #define __pyx_n_u_VCFProxy __pyx_mstate_global->__pyx_n_u_VCFProxy | |
5264 #define __pyx_n_s_VCFProxy___reduce_cython __pyx_mstate_global->__pyx_n_s_VCFProxy___reduce_cython | |
5265 #define __pyx_n_s_VCFProxy___setstate_cython __pyx_mstate_global->__pyx_n_s_VCFProxy___setstate_cython | |
5266 #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError | |
5267 #define __pyx_kp_u__11 __pyx_mstate_global->__pyx_kp_u__11 | |
5268 #define __pyx_kp_b__12 __pyx_mstate_global->__pyx_kp_b__12 | |
5269 #define __pyx_kp_u__12 __pyx_mstate_global->__pyx_kp_u__12 | |
5270 #define __pyx_kp_u__13 __pyx_mstate_global->__pyx_kp_u__13 | |
5271 #define __pyx_kp_u__14 __pyx_mstate_global->__pyx_kp_u__14 | |
5272 #define __pyx_kp_u__15 __pyx_mstate_global->__pyx_kp_u__15 | |
5273 #define __pyx_kp_u__16 __pyx_mstate_global->__pyx_kp_u__16 | |
5274 #define __pyx_kp_u__17 __pyx_mstate_global->__pyx_kp_u__17 | |
5275 #define __pyx_kp_u__19 __pyx_mstate_global->__pyx_kp_u__19 | |
5276 #define __pyx_kp_u__21 __pyx_mstate_global->__pyx_kp_u__21 | |
5277 #define __pyx_kp_u__23 __pyx_mstate_global->__pyx_kp_u__23 | |
5278 #define __pyx_kp_u__26 __pyx_mstate_global->__pyx_kp_u__26 | |
5279 #define __pyx_kp_u__28 __pyx_mstate_global->__pyx_kp_u__28 | |
5280 #define __pyx_n_s__32 __pyx_mstate_global->__pyx_n_s__32 | |
5281 #define __pyx_n_s__88 __pyx_mstate_global->__pyx_n_s__88 | |
5282 #define __pyx_n_s_aa __pyx_mstate_global->__pyx_n_s_aa | |
5283 #define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all | |
5284 #define __pyx_n_u_alt __pyx_mstate_global->__pyx_n_u_alt | |
5285 #define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append | |
5286 #define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args | |
5287 #define __pyx_n_s_asDict __pyx_mstate_global->__pyx_n_s_asDict | |
5288 #define __pyx_n_s_as_dict __pyx_mstate_global->__pyx_n_s_as_dict | |
5289 #define __pyx_n_u_ascii __pyx_mstate_global->__pyx_n_u_ascii | |
5290 #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines | |
5291 #define __pyx_n_s_attribute_dict2string __pyx_mstate_global->__pyx_n_s_attribute_dict2string | |
5292 #define __pyx_n_s_attribute_string __pyx_mstate_global->__pyx_n_s_attribute_string | |
5293 #define __pyx_n_s_attribute_string2dict __pyx_mstate_global->__pyx_n_s_attribute_string2dict | |
5294 #define __pyx_n_s_attribute_string2iterator __pyx_mstate_global->__pyx_n_s_attribute_string2iterator | |
5295 #define __pyx_n_s_attribute_string2iterator_locals __pyx_mstate_global->__pyx_n_s_attribute_string2iterator_locals | |
5296 #define __pyx_n_s_attributes __pyx_mstate_global->__pyx_n_s_attributes | |
5297 #define __pyx_n_u_attributes __pyx_mstate_global->__pyx_n_u_attributes | |
5298 #define __pyx_kp_u_bed_format_requires_at_least_thr __pyx_mstate_global->__pyx_kp_u_bed_format_requires_at_least_thr | |
5299 #define __pyx_n_u_blockCount __pyx_mstate_global->__pyx_n_u_blockCount | |
5300 #define __pyx_n_u_blockSizes __pyx_mstate_global->__pyx_n_u_blockSizes | |
5301 #define __pyx_n_u_blockStarts __pyx_mstate_global->__pyx_n_u_blockStarts | |
5302 #define __pyx_n_s_cfunc_to_py __pyx_mstate_global->__pyx_n_s_cfunc_to_py | |
5303 #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem | |
5304 #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback | |
5305 #define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close | |
5306 #define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections | |
5307 #define __pyx_n_s_compare __pyx_mstate_global->__pyx_n_s_compare | |
5308 #define __pyx_kp_u_comparison_of_modified_TupleProx __pyx_mstate_global->__pyx_kp_u_comparison_of_modified_TupleProx | |
5309 #define __pyx_n_s_contig __pyx_mstate_global->__pyx_n_s_contig | |
5310 #define __pyx_n_u_contig __pyx_mstate_global->__pyx_n_u_contig | |
5311 #define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy | |
5312 #define __pyx_n_s_copy_2 __pyx_mstate_global->__pyx_n_s_copy_2 | |
5313 #define __pyx_kp_u_copying_modified_tuples_is_not_i __pyx_mstate_global->__pyx_kp_u_copying_modified_tuples_is_not_i | |
5314 #define __pyx_n_s_d __pyx_mstate_global->__pyx_n_s_d | |
5315 #define __pyx_n_s_decode __pyx_mstate_global->__pyx_n_s_decode | |
5316 #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict | |
5317 #define __pyx_n_s_dict2attribute_string __pyx_mstate_global->__pyx_n_s_dict2attribute_string | |
5318 #define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2 | |
5319 #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable | |
5320 #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable | |
5321 #define __pyx_n_s_encoding __pyx_mstate_global->__pyx_n_s_encoding | |
5322 #define __pyx_n_s_end __pyx_mstate_global->__pyx_n_s_end | |
5323 #define __pyx_n_u_end __pyx_mstate_global->__pyx_n_u_end | |
5324 #define __pyx_n_s_endswith __pyx_mstate_global->__pyx_n_s_endswith | |
5325 #define __pyx_n_s_f __pyx_mstate_global->__pyx_n_s_f | |
5326 #define __pyx_n_s_feature __pyx_mstate_global->__pyx_n_s_feature | |
5327 #define __pyx_n_u_feature __pyx_mstate_global->__pyx_n_u_feature | |
5328 #define __pyx_kp_u_field_s_not_set __pyx_mstate_global->__pyx_kp_u_field_s_not_set | |
5329 #define __pyx_n_s_fields __pyx_mstate_global->__pyx_n_s_fields | |
5330 #define __pyx_n_u_filter __pyx_mstate_global->__pyx_n_u_filter | |
5331 #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format | |
5332 #define __pyx_n_u_format __pyx_mstate_global->__pyx_n_u_format | |
5333 #define __pyx_n_s_frame __pyx_mstate_global->__pyx_n_s_frame | |
5334 #define __pyx_n_u_frame __pyx_mstate_global->__pyx_n_u_frame | |
5335 #define __pyx_n_s_fromDict __pyx_mstate_global->__pyx_n_s_fromDict | |
5336 #define __pyx_n_s_from_dict __pyx_mstate_global->__pyx_n_s_from_dict | |
5337 #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc | |
5338 #define __pyx_n_s_genexpr __pyx_mstate_global->__pyx_n_s_genexpr | |
5339 #define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get | |
5340 #define __pyx_n_s_getMaxFields __pyx_mstate_global->__pyx_n_s_getMaxFields | |
5341 #define __pyx_n_s_getMinFields __pyx_mstate_global->__pyx_n_s_getMinFields | |
5342 #define __pyx_n_s_getattr __pyx_mstate_global->__pyx_n_s_getattr | |
5343 #define __pyx_n_s_getindex __pyx_mstate_global->__pyx_n_s_getindex | |
5344 #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate | |
5345 #define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i | |
5346 #define __pyx_n_u_id __pyx_mstate_global->__pyx_n_u_id | |
5347 #define __pyx_n_s_idx __pyx_mstate_global->__pyx_n_s_idx | |
5348 #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import | |
5349 #define __pyx_kp_u_incomplete_line_at_s __pyx_mstate_global->__pyx_kp_u_incomplete_line_at_s | |
5350 #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index | |
5351 #define __pyx_n_s_indices __pyx_mstate_global->__pyx_n_s_indices | |
5352 #define __pyx_n_u_info __pyx_mstate_global->__pyx_n_u_info | |
5353 #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing | |
5354 #define __pyx_n_s_invert __pyx_mstate_global->__pyx_n_s_invert | |
5355 #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine | |
5356 #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled | |
5357 #define __pyx_n_u_itemRGB __pyx_mstate_global->__pyx_n_u_itemRGB | |
5358 #define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items | |
5359 #define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join | |
5360 #define __pyx_n_s_k __pyx_mstate_global->__pyx_n_s_k | |
5361 #define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key | |
5362 #define __pyx_n_s_keys __pyx_mstate_global->__pyx_n_s_keys | |
5363 #define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs | |
5364 #define __pyx_n_s_lcontig __pyx_mstate_global->__pyx_n_s_lcontig | |
5365 #define __pyx_kp_u_length_of_buffer_i_number_of_byt __pyx_mstate_global->__pyx_kp_u_length_of_buffer_i_number_of_byt | |
5366 #define __pyx_kp_u_list_index_out_of_range __pyx_mstate_global->__pyx_kp_u_list_index_out_of_range | |
5367 #define __pyx_kp_u_list_index_out_of_range_i_i __pyx_mstate_global->__pyx_kp_u_list_index_out_of_range_i_i | |
5368 #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main | |
5369 #define __pyx_n_s_map_key2field __pyx_mstate_global->__pyx_n_s_map_key2field | |
5370 #define __pyx_n_s_n __pyx_mstate_global->__pyx_n_s_n | |
5371 #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name | |
5372 #define __pyx_n_u_name __pyx_mstate_global->__pyx_n_u_name | |
5373 #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2 | |
5374 #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new | |
5375 #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non | |
5376 #define __pyx_kp_u_op_0_isn_t_implemented_yet __pyx_mstate_global->__pyx_kp_u_op_0_isn_t_implemented_yet | |
5377 #define __pyx_n_s_other __pyx_mstate_global->__pyx_n_s_other | |
5378 #define __pyx_kp_u_out_of_memory __pyx_mstate_global->__pyx_kp_u_out_of_memory | |
5379 #define __pyx_kp_u_out_of_memory_in_TupleProxy_copy __pyx_mstate_global->__pyx_kp_u_out_of_memory_in_TupleProxy_copy | |
5380 #define __pyx_kp_u_out_of_memory_in_TupleProxy_upda __pyx_mstate_global->__pyx_kp_u_out_of_memory_in_TupleProxy_upda | |
5381 #define __pyx_kp_u_parsing_error_fewer_than_i_field __pyx_mstate_global->__pyx_kp_u_parsing_error_fewer_than_i_field | |
5382 #define __pyx_kp_u_parsing_error_more_than_i_fields __pyx_mstate_global->__pyx_kp_u_parsing_error_more_than_i_fields | |
5383 #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle | |
5384 #define __pyx_n_u_pos __pyx_mstate_global->__pyx_n_u_pos | |
5385 #define __pyx_n_s_proxy __pyx_mstate_global->__pyx_n_s_proxy | |
5386 #define __pyx_n_s_pysam_libctabixproxies __pyx_mstate_global->__pyx_n_s_pysam_libctabixproxies | |
5387 #define __pyx_kp_s_pysam_libctabixproxies_pyx __pyx_mstate_global->__pyx_kp_s_pysam_libctabixproxies_pyx | |
5388 #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError | |
5389 #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum | |
5390 #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result | |
5391 #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state | |
5392 #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type | |
5393 #define __pyx_n_s_pyx_unpickle_TupleProxyIterato __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TupleProxyIterato | |
5394 #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable | |
5395 #define __pyx_n_u_qual __pyx_mstate_global->__pyx_n_u_qual | |
5396 #define __pyx_n_s_quote __pyx_mstate_global->__pyx_n_s_quote | |
5397 #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range | |
5398 #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce | |
5399 #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython | |
5400 #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex | |
5401 #define __pyx_n_u_ref __pyx_mstate_global->__pyx_n_u_ref | |
5402 #define __pyx_kp_u_s __pyx_mstate_global->__pyx_kp_u_s | |
5403 #define __pyx_n_s_s_2 __pyx_mstate_global->__pyx_n_s_s_2 | |
5404 #define __pyx_n_s_score __pyx_mstate_global->__pyx_n_s_score | |
5405 #define __pyx_n_u_score __pyx_mstate_global->__pyx_n_u_score | |
5406 #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self | |
5407 #define __pyx_n_s_send __pyx_mstate_global->__pyx_n_s_send | |
5408 #define __pyx_n_s_separator __pyx_mstate_global->__pyx_n_s_separator | |
5409 #define __pyx_n_s_setAttribute __pyx_mstate_global->__pyx_n_s_setAttribute | |
5410 #define __pyx_n_s_setindex __pyx_mstate_global->__pyx_n_s_setindex | |
5411 #define __pyx_n_s_setitem __pyx_mstate_global->__pyx_n_s_setitem | |
5412 #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate | |
5413 #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython | |
5414 #define __pyx_n_s_source __pyx_mstate_global->__pyx_n_s_source | |
5415 #define __pyx_n_u_source __pyx_mstate_global->__pyx_n_u_source | |
5416 #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec | |
5417 #define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split | |
5418 #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start | |
5419 #define __pyx_n_u_start __pyx_mstate_global->__pyx_n_u_start | |
5420 #define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state | |
5421 #define __pyx_n_s_str __pyx_mstate_global->__pyx_n_s_str | |
5422 #define __pyx_n_s_strand __pyx_mstate_global->__pyx_n_s_strand | |
5423 #define __pyx_n_u_strand __pyx_mstate_global->__pyx_n_u_strand | |
5424 #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource | |
5425 #define __pyx_n_s_strip __pyx_mstate_global->__pyx_n_s_strip | |
5426 #define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super | |
5427 #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test | |
5428 #define __pyx_n_u_thickEnd __pyx_mstate_global->__pyx_n_u_thickEnd | |
5429 #define __pyx_n_u_thickStart __pyx_mstate_global->__pyx_n_u_thickStart | |
5430 #define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw | |
5431 #define __pyx_n_s_tmp __pyx_mstate_global->__pyx_n_s_tmp | |
5432 #define __pyx_n_s_toDot __pyx_mstate_global->__pyx_n_s_toDot | |
5433 #define __pyx_n_s_to_dict __pyx_mstate_global->__pyx_n_s_to_dict | |
5434 #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update | |
5435 #define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate | |
5436 #define __pyx_n_s_v __pyx_mstate_global->__pyx_n_s_v | |
5437 #define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value | |
5438 #define __pyx_n_s_wrap __pyx_mstate_global->__pyx_n_s_wrap | |
5439 #define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x | |
5440 #define __pyx_n_s_xrange __pyx_mstate_global->__pyx_n_s_xrange | |
5441 #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 | |
5442 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 | |
5443 #define __pyx_int_2 __pyx_mstate_global->__pyx_int_2 | |
5444 #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3 | |
5445 #define __pyx_int_4 __pyx_mstate_global->__pyx_int_4 | |
5446 #define __pyx_int_5 __pyx_mstate_global->__pyx_int_5 | |
5447 #define __pyx_int_6 __pyx_mstate_global->__pyx_int_6 | |
5448 #define __pyx_int_7 __pyx_mstate_global->__pyx_int_7 | |
5449 #define __pyx_int_8 __pyx_mstate_global->__pyx_int_8 | |
5450 #define __pyx_int_9 __pyx_mstate_global->__pyx_int_9 | |
5451 #define __pyx_int_10 __pyx_mstate_global->__pyx_int_10 | |
5452 #define __pyx_int_11 __pyx_mstate_global->__pyx_int_11 | |
5453 #define __pyx_int_15441160 __pyx_mstate_global->__pyx_int_15441160 | |
5454 #define __pyx_int_101682796 __pyx_mstate_global->__pyx_int_101682796 | |
5455 #define __pyx_int_219412876 __pyx_mstate_global->__pyx_int_219412876 | |
5456 #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1 | |
5457 #define __pyx_tuple_ __pyx_mstate_global->__pyx_tuple_ | |
5458 #define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5 | |
5459 #define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6 | |
5460 #define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7 | |
5461 #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8 | |
5462 #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9 | |
5463 #define __pyx_slice__20 __pyx_mstate_global->__pyx_slice__20 | |
5464 #define __pyx_slice__24 __pyx_mstate_global->__pyx_slice__24 | |
5465 #define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10 | |
5466 #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22 | |
5467 #define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25 | |
5468 #define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29 | |
5469 #define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30 | |
5470 #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31 | |
5471 #define __pyx_tuple__33 __pyx_mstate_global->__pyx_tuple__33 | |
5472 #define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35 | |
5473 #define __pyx_tuple__37 __pyx_mstate_global->__pyx_tuple__37 | |
5474 #define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40 | |
5475 #define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42 | |
5476 #define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45 | |
5477 #define __pyx_tuple__47 __pyx_mstate_global->__pyx_tuple__47 | |
5478 #define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58 | |
5479 #define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60 | |
5480 #define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63 | |
5481 #define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65 | |
5482 #define __pyx_tuple__67 __pyx_mstate_global->__pyx_tuple__67 | |
5483 #define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69 | |
5484 #define __pyx_tuple__70 __pyx_mstate_global->__pyx_tuple__70 | |
5485 #define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75 | |
5486 #define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77 | |
5487 #define __pyx_tuple__86 __pyx_mstate_global->__pyx_tuple__86 | |
5488 #define __pyx_codeobj__2 __pyx_mstate_global->__pyx_codeobj__2 | |
5489 #define __pyx_codeobj__3 __pyx_mstate_global->__pyx_codeobj__3 | |
5490 #define __pyx_codeobj__4 __pyx_mstate_global->__pyx_codeobj__4 | |
5491 #define __pyx_codeobj__18 __pyx_mstate_global->__pyx_codeobj__18 | |
5492 #define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27 | |
5493 #define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34 | |
5494 #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36 | |
5495 #define __pyx_codeobj__38 __pyx_mstate_global->__pyx_codeobj__38 | |
5496 #define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39 | |
5497 #define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41 | |
5498 #define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43 | |
5499 #define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44 | |
5500 #define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46 | |
5501 #define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48 | |
5502 #define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49 | |
5503 #define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50 | |
5504 #define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51 | |
5505 #define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52 | |
5506 #define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53 | |
5507 #define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54 | |
5508 #define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55 | |
5509 #define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56 | |
5510 #define __pyx_codeobj__57 __pyx_mstate_global->__pyx_codeobj__57 | |
5511 #define __pyx_codeobj__59 __pyx_mstate_global->__pyx_codeobj__59 | |
5512 #define __pyx_codeobj__61 __pyx_mstate_global->__pyx_codeobj__61 | |
5513 #define __pyx_codeobj__62 __pyx_mstate_global->__pyx_codeobj__62 | |
5514 #define __pyx_codeobj__64 __pyx_mstate_global->__pyx_codeobj__64 | |
5515 #define __pyx_codeobj__66 __pyx_mstate_global->__pyx_codeobj__66 | |
5516 #define __pyx_codeobj__68 __pyx_mstate_global->__pyx_codeobj__68 | |
5517 #define __pyx_codeobj__71 __pyx_mstate_global->__pyx_codeobj__71 | |
5518 #define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72 | |
5519 #define __pyx_codeobj__73 __pyx_mstate_global->__pyx_codeobj__73 | |
5520 #define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74 | |
5521 #define __pyx_codeobj__76 __pyx_mstate_global->__pyx_codeobj__76 | |
5522 #define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78 | |
5523 #define __pyx_codeobj__79 __pyx_mstate_global->__pyx_codeobj__79 | |
5524 #define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80 | |
5525 #define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81 | |
5526 #define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82 | |
5527 #define __pyx_codeobj__83 __pyx_mstate_global->__pyx_codeobj__83 | |
5528 #define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84 | |
5529 #define __pyx_codeobj__85 __pyx_mstate_global->__pyx_codeobj__85 | |
5530 #define __pyx_codeobj__87 __pyx_mstate_global->__pyx_codeobj__87 | |
5531 /* #### Code section: module_code ### */ | |
5532 | |
5533 /* "cfunc.to_py":67 | |
5534 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v") | |
5535 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(object (*f)(object) ): | |
5536 * def wrap(object v): # <<<<<<<<<<<<<< | |
5537 * """wrap(v)""" | |
5538 * return f(v) | |
5539 */ | |
5540 | |
5541 /* Python wrapper */ | |
5542 static PyObject *__pyx_pw_11cfunc_dot_to_py_75__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_1wrap(PyObject *__pyx_self, | |
5543 #if CYTHON_METH_FASTCALL | |
5544 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
5545 #else | |
5546 PyObject *__pyx_args, PyObject *__pyx_kwds | |
5547 #endif | |
5548 ); /*proto*/ | |
5549 PyDoc_STRVAR(__pyx_doc_11cfunc_dot_to_py_75__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_wrap, "wrap(v)"); | |
5550 static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_75__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_1wrap = {"wrap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11cfunc_dot_to_py_75__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_1wrap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_75__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_wrap}; | |
5551 static PyObject *__pyx_pw_11cfunc_dot_to_py_75__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_1wrap(PyObject *__pyx_self, | |
5552 #if CYTHON_METH_FASTCALL | |
5553 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
5554 #else | |
5555 PyObject *__pyx_args, PyObject *__pyx_kwds | |
5556 #endif | |
5557 ) { | |
5558 PyObject *__pyx_v_v = 0; | |
5559 #if !CYTHON_METH_FASTCALL | |
5560 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
5561 #endif | |
5562 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
5563 PyObject* values[1] = {0}; | |
5564 int __pyx_lineno = 0; | |
5565 const char *__pyx_filename = NULL; | |
5566 int __pyx_clineno = 0; | |
5567 PyObject *__pyx_r = 0; | |
5568 __Pyx_RefNannyDeclarations | |
5569 __Pyx_RefNannySetupContext("wrap (wrapper)", 0); | |
5570 #if !CYTHON_METH_FASTCALL | |
5571 #if CYTHON_ASSUME_SAFE_MACROS | |
5572 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
5573 #else | |
5574 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
5575 #endif | |
5576 #endif | |
5577 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
5578 { | |
5579 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,0}; | |
5580 if (__pyx_kwds) { | |
5581 Py_ssize_t kw_args; | |
5582 switch (__pyx_nargs) { | |
5583 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
5584 CYTHON_FALLTHROUGH; | |
5585 case 0: break; | |
5586 default: goto __pyx_L5_argtuple_error; | |
5587 } | |
5588 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
5589 switch (__pyx_nargs) { | |
5590 case 0: | |
5591 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_v)) != 0)) { | |
5592 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
5593 kw_args--; | |
5594 } | |
5595 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L3_error) | |
5596 else goto __pyx_L5_argtuple_error; | |
5597 } | |
5598 if (unlikely(kw_args > 0)) { | |
5599 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
5600 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "wrap") < 0)) __PYX_ERR(1, 67, __pyx_L3_error) | |
5601 } | |
5602 } else if (unlikely(__pyx_nargs != 1)) { | |
5603 goto __pyx_L5_argtuple_error; | |
5604 } else { | |
5605 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
5606 } | |
5607 __pyx_v_v = values[0]; | |
5608 } | |
5609 goto __pyx_L6_skip; | |
5610 __pyx_L5_argtuple_error:; | |
5611 __Pyx_RaiseArgtupleInvalid("wrap", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 67, __pyx_L3_error) | |
5612 __pyx_L6_skip:; | |
5613 goto __pyx_L4_argument_unpacking_done; | |
5614 __pyx_L3_error:; | |
5615 { | |
5616 Py_ssize_t __pyx_temp; | |
5617 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
5618 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
5619 } | |
5620 } | |
5621 __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
5622 __Pyx_RefNannyFinishContext(); | |
5623 return NULL; | |
5624 __pyx_L4_argument_unpacking_done:; | |
5625 __pyx_r = __pyx_pf_11cfunc_dot_to_py_75__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_wrap(__pyx_self, __pyx_v_v); | |
5626 | |
5627 /* function exit code */ | |
5628 { | |
5629 Py_ssize_t __pyx_temp; | |
5630 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
5631 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
5632 } | |
5633 } | |
5634 __Pyx_RefNannyFinishContext(); | |
5635 return __pyx_r; | |
5636 } | |
5637 | |
5638 static PyObject *__pyx_pf_11cfunc_dot_to_py_75__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_wrap(PyObject *__pyx_self, PyObject *__pyx_v_v) { | |
5639 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v *__pyx_cur_scope; | |
5640 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v *__pyx_outer_scope; | |
5641 PyObject *__pyx_r = NULL; | |
5642 __Pyx_RefNannyDeclarations | |
5643 PyObject *__pyx_t_1 = NULL; | |
5644 int __pyx_lineno = 0; | |
5645 const char *__pyx_filename = NULL; | |
5646 int __pyx_clineno = 0; | |
5647 __Pyx_RefNannySetupContext("wrap", 1); | |
5648 __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v *) __Pyx_CyFunction_GetClosure(__pyx_self); | |
5649 __pyx_cur_scope = __pyx_outer_scope; | |
5650 | |
5651 /* "cfunc.to_py":69 | |
5652 * def wrap(object v): | |
5653 * """wrap(v)""" | |
5654 * return f(v) # <<<<<<<<<<<<<< | |
5655 * return wrap | |
5656 * | |
5657 */ | |
5658 __Pyx_XDECREF(__pyx_r); | |
5659 __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 69, __pyx_L1_error) | |
5660 __Pyx_GOTREF(__pyx_t_1); | |
5661 __pyx_r = __pyx_t_1; | |
5662 __pyx_t_1 = 0; | |
5663 goto __pyx_L0; | |
5664 | |
5665 /* "cfunc.to_py":67 | |
5666 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v") | |
5667 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(object (*f)(object) ): | |
5668 * def wrap(object v): # <<<<<<<<<<<<<< | |
5669 * """wrap(v)""" | |
5670 * return f(v) | |
5671 */ | |
5672 | |
5673 /* function exit code */ | |
5674 __pyx_L1_error:; | |
5675 __Pyx_XDECREF(__pyx_t_1); | |
5676 __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
5677 __pyx_r = NULL; | |
5678 __pyx_L0:; | |
5679 __Pyx_XGIVEREF(__pyx_r); | |
5680 __Pyx_RefNannyFinishContext(); | |
5681 return __pyx_r; | |
5682 } | |
5683 | |
5684 /* "cfunc.to_py":66 | |
5685 * | |
5686 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v") | |
5687 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(object (*f)(object) ): # <<<<<<<<<<<<<< | |
5688 * def wrap(object v): | |
5689 * """wrap(v)""" | |
5690 */ | |
5691 | |
5692 static PyObject *__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(PyObject *(*__pyx_v_f)(PyObject *)) { | |
5693 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v *__pyx_cur_scope; | |
5694 PyObject *__pyx_v_wrap = 0; | |
5695 PyObject *__pyx_r = NULL; | |
5696 __Pyx_RefNannyDeclarations | |
5697 PyObject *__pyx_t_1 = NULL; | |
5698 int __pyx_lineno = 0; | |
5699 const char *__pyx_filename = NULL; | |
5700 int __pyx_clineno = 0; | |
5701 __Pyx_RefNannySetupContext("__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v", 0); | |
5702 __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v, __pyx_empty_tuple, NULL); | |
5703 if (unlikely(!__pyx_cur_scope)) { | |
5704 __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v *)Py_None); | |
5705 __Pyx_INCREF(Py_None); | |
5706 __PYX_ERR(1, 66, __pyx_L1_error) | |
5707 } else { | |
5708 __Pyx_GOTREF((PyObject *)__pyx_cur_scope); | |
5709 } | |
5710 __pyx_cur_scope->__pyx_v_f = __pyx_v_f; | |
5711 | |
5712 /* "cfunc.to_py":67 | |
5713 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v") | |
5714 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(object (*f)(object) ): | |
5715 * def wrap(object v): # <<<<<<<<<<<<<< | |
5716 * """wrap(v)""" | |
5717 * return f(v) | |
5718 */ | |
5719 __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_75__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_1wrap, 0, __pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error) | |
5720 __Pyx_GOTREF(__pyx_t_1); | |
5721 __pyx_v_wrap = __pyx_t_1; | |
5722 __pyx_t_1 = 0; | |
5723 | |
5724 /* "cfunc.to_py":70 | |
5725 * """wrap(v)""" | |
5726 * return f(v) | |
5727 * return wrap # <<<<<<<<<<<<<< | |
5728 * | |
5729 * | |
5730 */ | |
5731 __Pyx_XDECREF(__pyx_r); | |
5732 __Pyx_INCREF(__pyx_v_wrap); | |
5733 __pyx_r = __pyx_v_wrap; | |
5734 goto __pyx_L0; | |
5735 | |
5736 /* "cfunc.to_py":66 | |
5737 * | |
5738 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v") | |
5739 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(object (*f)(object) ): # <<<<<<<<<<<<<< | |
5740 * def wrap(object v): | |
5741 * """wrap(v)""" | |
5742 */ | |
5743 | |
5744 /* function exit code */ | |
5745 __pyx_L1_error:; | |
5746 __Pyx_XDECREF(__pyx_t_1); | |
5747 __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
5748 __pyx_r = 0; | |
5749 __pyx_L0:; | |
5750 __Pyx_XDECREF(__pyx_v_wrap); | |
5751 __Pyx_DECREF((PyObject *)__pyx_cur_scope); | |
5752 __Pyx_XGIVEREF(__pyx_r); | |
5753 __Pyx_RefNannyFinishContext(); | |
5754 return __pyx_r; | |
5755 } | |
5756 | |
5757 /* "cfunc.to_py":67 | |
5758 * @cname("__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v") | |
5759 * cdef object __Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(int (*f)(object) except? -1): | |
5760 * def wrap(object v): # <<<<<<<<<<<<<< | |
5761 * """wrap(v) -> 'int'""" | |
5762 * return f(v) | |
5763 */ | |
5764 | |
5765 /* Python wrapper */ | |
5766 static PyObject *__pyx_pw_11cfunc_dot_to_py_80__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_1wrap(PyObject *__pyx_self, | |
5767 #if CYTHON_METH_FASTCALL | |
5768 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
5769 #else | |
5770 PyObject *__pyx_args, PyObject *__pyx_kwds | |
5771 #endif | |
5772 ); /*proto*/ | |
5773 PyDoc_STRVAR(__pyx_doc_11cfunc_dot_to_py_80__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_wrap, "wrap(v) -> 'int'"); | |
5774 static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_80__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_1wrap = {"wrap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11cfunc_dot_to_py_80__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_1wrap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_80__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_wrap}; | |
5775 static PyObject *__pyx_pw_11cfunc_dot_to_py_80__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_1wrap(PyObject *__pyx_self, | |
5776 #if CYTHON_METH_FASTCALL | |
5777 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
5778 #else | |
5779 PyObject *__pyx_args, PyObject *__pyx_kwds | |
5780 #endif | |
5781 ) { | |
5782 PyObject *__pyx_v_v = 0; | |
5783 #if !CYTHON_METH_FASTCALL | |
5784 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
5785 #endif | |
5786 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
5787 PyObject* values[1] = {0}; | |
5788 int __pyx_lineno = 0; | |
5789 const char *__pyx_filename = NULL; | |
5790 int __pyx_clineno = 0; | |
5791 PyObject *__pyx_r = 0; | |
5792 __Pyx_RefNannyDeclarations | |
5793 __Pyx_RefNannySetupContext("wrap (wrapper)", 0); | |
5794 #if !CYTHON_METH_FASTCALL | |
5795 #if CYTHON_ASSUME_SAFE_MACROS | |
5796 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
5797 #else | |
5798 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
5799 #endif | |
5800 #endif | |
5801 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
5802 { | |
5803 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,0}; | |
5804 if (__pyx_kwds) { | |
5805 Py_ssize_t kw_args; | |
5806 switch (__pyx_nargs) { | |
5807 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
5808 CYTHON_FALLTHROUGH; | |
5809 case 0: break; | |
5810 default: goto __pyx_L5_argtuple_error; | |
5811 } | |
5812 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
5813 switch (__pyx_nargs) { | |
5814 case 0: | |
5815 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_v)) != 0)) { | |
5816 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
5817 kw_args--; | |
5818 } | |
5819 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L3_error) | |
5820 else goto __pyx_L5_argtuple_error; | |
5821 } | |
5822 if (unlikely(kw_args > 0)) { | |
5823 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
5824 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "wrap") < 0)) __PYX_ERR(1, 67, __pyx_L3_error) | |
5825 } | |
5826 } else if (unlikely(__pyx_nargs != 1)) { | |
5827 goto __pyx_L5_argtuple_error; | |
5828 } else { | |
5829 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
5830 } | |
5831 __pyx_v_v = values[0]; | |
5832 } | |
5833 goto __pyx_L6_skip; | |
5834 __pyx_L5_argtuple_error:; | |
5835 __Pyx_RaiseArgtupleInvalid("wrap", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 67, __pyx_L3_error) | |
5836 __pyx_L6_skip:; | |
5837 goto __pyx_L4_argument_unpacking_done; | |
5838 __pyx_L3_error:; | |
5839 { | |
5840 Py_ssize_t __pyx_temp; | |
5841 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
5842 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
5843 } | |
5844 } | |
5845 __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
5846 __Pyx_RefNannyFinishContext(); | |
5847 return NULL; | |
5848 __pyx_L4_argument_unpacking_done:; | |
5849 __pyx_r = __pyx_pf_11cfunc_dot_to_py_80__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_wrap(__pyx_self, __pyx_v_v); | |
5850 | |
5851 /* function exit code */ | |
5852 { | |
5853 Py_ssize_t __pyx_temp; | |
5854 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
5855 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
5856 } | |
5857 } | |
5858 __Pyx_RefNannyFinishContext(); | |
5859 return __pyx_r; | |
5860 } | |
5861 | |
5862 static PyObject *__pyx_pf_11cfunc_dot_to_py_80__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_wrap(PyObject *__pyx_self, PyObject *__pyx_v_v) { | |
5863 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v *__pyx_cur_scope; | |
5864 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v *__pyx_outer_scope; | |
5865 PyObject *__pyx_r = NULL; | |
5866 __Pyx_RefNannyDeclarations | |
5867 int __pyx_t_1; | |
5868 PyObject *__pyx_t_2 = NULL; | |
5869 int __pyx_lineno = 0; | |
5870 const char *__pyx_filename = NULL; | |
5871 int __pyx_clineno = 0; | |
5872 __Pyx_RefNannySetupContext("wrap", 1); | |
5873 __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v *) __Pyx_CyFunction_GetClosure(__pyx_self); | |
5874 __pyx_cur_scope = __pyx_outer_scope; | |
5875 | |
5876 /* "cfunc.to_py":69 | |
5877 * def wrap(object v): | |
5878 * """wrap(v) -> 'int'""" | |
5879 * return f(v) # <<<<<<<<<<<<<< | |
5880 * return wrap | |
5881 * | |
5882 */ | |
5883 __Pyx_XDECREF(__pyx_r); | |
5884 __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_v); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(1, 69, __pyx_L1_error) | |
5885 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 69, __pyx_L1_error) | |
5886 __Pyx_GOTREF(__pyx_t_2); | |
5887 __pyx_r = __pyx_t_2; | |
5888 __pyx_t_2 = 0; | |
5889 goto __pyx_L0; | |
5890 | |
5891 /* "cfunc.to_py":67 | |
5892 * @cname("__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v") | |
5893 * cdef object __Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(int (*f)(object) except? -1): | |
5894 * def wrap(object v): # <<<<<<<<<<<<<< | |
5895 * """wrap(v) -> 'int'""" | |
5896 * return f(v) | |
5897 */ | |
5898 | |
5899 /* function exit code */ | |
5900 __pyx_L1_error:; | |
5901 __Pyx_XDECREF(__pyx_t_2); | |
5902 __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
5903 __pyx_r = NULL; | |
5904 __pyx_L0:; | |
5905 __Pyx_XGIVEREF(__pyx_r); | |
5906 __Pyx_RefNannyFinishContext(); | |
5907 return __pyx_r; | |
5908 } | |
5909 | |
5910 /* "cfunc.to_py":66 | |
5911 * | |
5912 * @cname("__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v") | |
5913 * cdef object __Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(int (*f)(object) except? -1): # <<<<<<<<<<<<<< | |
5914 * def wrap(object v): | |
5915 * """wrap(v) -> 'int'""" | |
5916 */ | |
5917 | |
5918 static PyObject *__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(int (*__pyx_v_f)(PyObject *)) { | |
5919 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v *__pyx_cur_scope; | |
5920 PyObject *__pyx_v_wrap = 0; | |
5921 PyObject *__pyx_r = NULL; | |
5922 __Pyx_RefNannyDeclarations | |
5923 PyObject *__pyx_t_1 = NULL; | |
5924 int __pyx_lineno = 0; | |
5925 const char *__pyx_filename = NULL; | |
5926 int __pyx_clineno = 0; | |
5927 __Pyx_RefNannySetupContext("__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v", 0); | |
5928 __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v, __pyx_empty_tuple, NULL); | |
5929 if (unlikely(!__pyx_cur_scope)) { | |
5930 __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v *)Py_None); | |
5931 __Pyx_INCREF(Py_None); | |
5932 __PYX_ERR(1, 66, __pyx_L1_error) | |
5933 } else { | |
5934 __Pyx_GOTREF((PyObject *)__pyx_cur_scope); | |
5935 } | |
5936 __pyx_cur_scope->__pyx_v_f = __pyx_v_f; | |
5937 | |
5938 /* "cfunc.to_py":67 | |
5939 * @cname("__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v") | |
5940 * cdef object __Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(int (*f)(object) except? -1): | |
5941 * def wrap(object v): # <<<<<<<<<<<<<< | |
5942 * """wrap(v) -> 'int'""" | |
5943 * return f(v) | |
5944 */ | |
5945 __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_80__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_1wrap, 0, __pyx_n_s_Pyx_CFunc_e2acea__5pysam_16lib, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error) | |
5946 __Pyx_GOTREF(__pyx_t_1); | |
5947 __pyx_v_wrap = __pyx_t_1; | |
5948 __pyx_t_1 = 0; | |
5949 | |
5950 /* "cfunc.to_py":70 | |
5951 * """wrap(v) -> 'int'""" | |
5952 * return f(v) | |
5953 * return wrap # <<<<<<<<<<<<<< | |
5954 * | |
5955 * | |
5956 */ | |
5957 __Pyx_XDECREF(__pyx_r); | |
5958 __Pyx_INCREF(__pyx_v_wrap); | |
5959 __pyx_r = __pyx_v_wrap; | |
5960 goto __pyx_L0; | |
5961 | |
5962 /* "cfunc.to_py":66 | |
5963 * | |
5964 * @cname("__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v") | |
5965 * cdef object __Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(int (*f)(object) except? -1): # <<<<<<<<<<<<<< | |
5966 * def wrap(object v): | |
5967 * """wrap(v) -> 'int'""" | |
5968 */ | |
5969 | |
5970 /* function exit code */ | |
5971 __pyx_L1_error:; | |
5972 __Pyx_XDECREF(__pyx_t_1); | |
5973 __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
5974 __pyx_r = 0; | |
5975 __pyx_L0:; | |
5976 __Pyx_XDECREF(__pyx_v_wrap); | |
5977 __Pyx_DECREF((PyObject *)__pyx_cur_scope); | |
5978 __Pyx_XGIVEREF(__pyx_r); | |
5979 __Pyx_RefNannyFinishContext(); | |
5980 return __pyx_r; | |
5981 } | |
5982 | |
5983 /* "cfunc.to_py":67 | |
5984 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v") | |
5985 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(unicode (*f)(int) ): | |
5986 * def wrap(int v): # <<<<<<<<<<<<<< | |
5987 * """wrap(v: 'int') -> unicode""" | |
5988 * return f(v) | |
5989 */ | |
5990 | |
5991 /* Python wrapper */ | |
5992 static PyObject *__pyx_pw_11cfunc_dot_to_py_73__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_1wrap(PyObject *__pyx_self, | |
5993 #if CYTHON_METH_FASTCALL | |
5994 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
5995 #else | |
5996 PyObject *__pyx_args, PyObject *__pyx_kwds | |
5997 #endif | |
5998 ); /*proto*/ | |
5999 PyDoc_STRVAR(__pyx_doc_11cfunc_dot_to_py_73__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_wrap, "wrap(v: 'int') -> unicode"); | |
6000 static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_73__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_1wrap = {"wrap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11cfunc_dot_to_py_73__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_1wrap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_73__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_wrap}; | |
6001 static PyObject *__pyx_pw_11cfunc_dot_to_py_73__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_1wrap(PyObject *__pyx_self, | |
6002 #if CYTHON_METH_FASTCALL | |
6003 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
6004 #else | |
6005 PyObject *__pyx_args, PyObject *__pyx_kwds | |
6006 #endif | |
6007 ) { | |
6008 int __pyx_v_v; | |
6009 #if !CYTHON_METH_FASTCALL | |
6010 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
6011 #endif | |
6012 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
6013 PyObject* values[1] = {0}; | |
6014 int __pyx_lineno = 0; | |
6015 const char *__pyx_filename = NULL; | |
6016 int __pyx_clineno = 0; | |
6017 PyObject *__pyx_r = 0; | |
6018 __Pyx_RefNannyDeclarations | |
6019 __Pyx_RefNannySetupContext("wrap (wrapper)", 0); | |
6020 #if !CYTHON_METH_FASTCALL | |
6021 #if CYTHON_ASSUME_SAFE_MACROS | |
6022 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
6023 #else | |
6024 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
6025 #endif | |
6026 #endif | |
6027 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
6028 { | |
6029 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,0}; | |
6030 if (__pyx_kwds) { | |
6031 Py_ssize_t kw_args; | |
6032 switch (__pyx_nargs) { | |
6033 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
6034 CYTHON_FALLTHROUGH; | |
6035 case 0: break; | |
6036 default: goto __pyx_L5_argtuple_error; | |
6037 } | |
6038 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
6039 switch (__pyx_nargs) { | |
6040 case 0: | |
6041 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_v)) != 0)) { | |
6042 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
6043 kw_args--; | |
6044 } | |
6045 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L3_error) | |
6046 else goto __pyx_L5_argtuple_error; | |
6047 } | |
6048 if (unlikely(kw_args > 0)) { | |
6049 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
6050 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "wrap") < 0)) __PYX_ERR(1, 67, __pyx_L3_error) | |
6051 } | |
6052 } else if (unlikely(__pyx_nargs != 1)) { | |
6053 goto __pyx_L5_argtuple_error; | |
6054 } else { | |
6055 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
6056 } | |
6057 __pyx_v_v = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_v == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L3_error) | |
6058 } | |
6059 goto __pyx_L6_skip; | |
6060 __pyx_L5_argtuple_error:; | |
6061 __Pyx_RaiseArgtupleInvalid("wrap", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 67, __pyx_L3_error) | |
6062 __pyx_L6_skip:; | |
6063 goto __pyx_L4_argument_unpacking_done; | |
6064 __pyx_L3_error:; | |
6065 { | |
6066 Py_ssize_t __pyx_temp; | |
6067 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
6068 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
6069 } | |
6070 } | |
6071 __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
6072 __Pyx_RefNannyFinishContext(); | |
6073 return NULL; | |
6074 __pyx_L4_argument_unpacking_done:; | |
6075 __pyx_r = __pyx_pf_11cfunc_dot_to_py_73__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_wrap(__pyx_self, __pyx_v_v); | |
6076 | |
6077 /* function exit code */ | |
6078 { | |
6079 Py_ssize_t __pyx_temp; | |
6080 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
6081 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
6082 } | |
6083 } | |
6084 __Pyx_RefNannyFinishContext(); | |
6085 return __pyx_r; | |
6086 } | |
6087 | |
6088 static PyObject *__pyx_pf_11cfunc_dot_to_py_73__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_wrap(PyObject *__pyx_self, int __pyx_v_v) { | |
6089 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v *__pyx_cur_scope; | |
6090 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v *__pyx_outer_scope; | |
6091 PyObject *__pyx_r = NULL; | |
6092 __Pyx_RefNannyDeclarations | |
6093 PyObject *__pyx_t_1 = NULL; | |
6094 int __pyx_lineno = 0; | |
6095 const char *__pyx_filename = NULL; | |
6096 int __pyx_clineno = 0; | |
6097 __Pyx_RefNannySetupContext("wrap", 1); | |
6098 __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v *) __Pyx_CyFunction_GetClosure(__pyx_self); | |
6099 __pyx_cur_scope = __pyx_outer_scope; | |
6100 | |
6101 /* "cfunc.to_py":69 | |
6102 * def wrap(int v): | |
6103 * """wrap(v: 'int') -> unicode""" | |
6104 * return f(v) # <<<<<<<<<<<<<< | |
6105 * return wrap | |
6106 * | |
6107 */ | |
6108 __Pyx_XDECREF(__pyx_r); | |
6109 __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 69, __pyx_L1_error) | |
6110 __Pyx_GOTREF(__pyx_t_1); | |
6111 __pyx_r = __pyx_t_1; | |
6112 __pyx_t_1 = 0; | |
6113 goto __pyx_L0; | |
6114 | |
6115 /* "cfunc.to_py":67 | |
6116 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v") | |
6117 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(unicode (*f)(int) ): | |
6118 * def wrap(int v): # <<<<<<<<<<<<<< | |
6119 * """wrap(v: 'int') -> unicode""" | |
6120 * return f(v) | |
6121 */ | |
6122 | |
6123 /* function exit code */ | |
6124 __pyx_L1_error:; | |
6125 __Pyx_XDECREF(__pyx_t_1); | |
6126 __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
6127 __pyx_r = NULL; | |
6128 __pyx_L0:; | |
6129 __Pyx_XGIVEREF(__pyx_r); | |
6130 __Pyx_RefNannyFinishContext(); | |
6131 return __pyx_r; | |
6132 } | |
6133 | |
6134 /* "cfunc.to_py":66 | |
6135 * | |
6136 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v") | |
6137 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(unicode (*f)(int) ): # <<<<<<<<<<<<<< | |
6138 * def wrap(int v): | |
6139 * """wrap(v: 'int') -> unicode""" | |
6140 */ | |
6141 | |
6142 static PyObject *__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(PyObject *(*__pyx_v_f)(int)) { | |
6143 struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v *__pyx_cur_scope; | |
6144 PyObject *__pyx_v_wrap = 0; | |
6145 PyObject *__pyx_r = NULL; | |
6146 __Pyx_RefNannyDeclarations | |
6147 PyObject *__pyx_t_1 = NULL; | |
6148 int __pyx_lineno = 0; | |
6149 const char *__pyx_filename = NULL; | |
6150 int __pyx_clineno = 0; | |
6151 __Pyx_RefNannySetupContext("__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v", 0); | |
6152 __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v, __pyx_empty_tuple, NULL); | |
6153 if (unlikely(!__pyx_cur_scope)) { | |
6154 __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v *)Py_None); | |
6155 __Pyx_INCREF(Py_None); | |
6156 __PYX_ERR(1, 66, __pyx_L1_error) | |
6157 } else { | |
6158 __Pyx_GOTREF((PyObject *)__pyx_cur_scope); | |
6159 } | |
6160 __pyx_cur_scope->__pyx_v_f = __pyx_v_f; | |
6161 | |
6162 /* "cfunc.to_py":67 | |
6163 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v") | |
6164 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(unicode (*f)(int) ): | |
6165 * def wrap(int v): # <<<<<<<<<<<<<< | |
6166 * """wrap(v: 'int') -> unicode""" | |
6167 * return f(v) | |
6168 */ | |
6169 __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_73__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_1wrap, 0, __pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error) | |
6170 __Pyx_GOTREF(__pyx_t_1); | |
6171 __pyx_v_wrap = __pyx_t_1; | |
6172 __pyx_t_1 = 0; | |
6173 | |
6174 /* "cfunc.to_py":70 | |
6175 * """wrap(v: 'int') -> unicode""" | |
6176 * return f(v) | |
6177 * return wrap # <<<<<<<<<<<<<< | |
6178 * | |
6179 * | |
6180 */ | |
6181 __Pyx_XDECREF(__pyx_r); | |
6182 __Pyx_INCREF(__pyx_v_wrap); | |
6183 __pyx_r = __pyx_v_wrap; | |
6184 goto __pyx_L0; | |
6185 | |
6186 /* "cfunc.to_py":66 | |
6187 * | |
6188 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v") | |
6189 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(unicode (*f)(int) ): # <<<<<<<<<<<<<< | |
6190 * def wrap(int v): | |
6191 * """wrap(v: 'int') -> unicode""" | |
6192 */ | |
6193 | |
6194 /* function exit code */ | |
6195 __pyx_L1_error:; | |
6196 __Pyx_XDECREF(__pyx_t_1); | |
6197 __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
6198 __pyx_r = 0; | |
6199 __pyx_L0:; | |
6200 __Pyx_XDECREF(__pyx_v_wrap); | |
6201 __Pyx_DECREF((PyObject *)__pyx_cur_scope); | |
6202 __Pyx_XGIVEREF(__pyx_r); | |
6203 __Pyx_RefNannyFinishContext(); | |
6204 return __pyx_r; | |
6205 } | |
6206 | |
6207 /* "cpython/complex.pxd":19 | |
6208 * | |
6209 * @property | |
6210 * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<< | |
6211 * return self.cval.real | |
6212 * | |
6213 */ | |
6214 | |
6215 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) { | |
6216 double __pyx_r; | |
6217 | |
6218 /* "cpython/complex.pxd":20 | |
6219 * @property | |
6220 * cdef inline double real(self) noexcept: | |
6221 * return self.cval.real # <<<<<<<<<<<<<< | |
6222 * | |
6223 * @property | |
6224 */ | |
6225 __pyx_r = __pyx_v_self->cval.real; | |
6226 goto __pyx_L0; | |
6227 | |
6228 /* "cpython/complex.pxd":19 | |
6229 * | |
6230 * @property | |
6231 * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<< | |
6232 * return self.cval.real | |
6233 * | |
6234 */ | |
6235 | |
6236 /* function exit code */ | |
6237 __pyx_L0:; | |
6238 return __pyx_r; | |
6239 } | |
6240 | |
6241 /* "cpython/complex.pxd":23 | |
6242 * | |
6243 * @property | |
6244 * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<< | |
6245 * return self.cval.imag | |
6246 * | |
6247 */ | |
6248 | |
6249 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) { | |
6250 double __pyx_r; | |
6251 | |
6252 /* "cpython/complex.pxd":24 | |
6253 * @property | |
6254 * cdef inline double imag(self) noexcept: | |
6255 * return self.cval.imag # <<<<<<<<<<<<<< | |
6256 * | |
6257 * # PyTypeObject PyComplex_Type | |
6258 */ | |
6259 __pyx_r = __pyx_v_self->cval.imag; | |
6260 goto __pyx_L0; | |
6261 | |
6262 /* "cpython/complex.pxd":23 | |
6263 * | |
6264 * @property | |
6265 * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<< | |
6266 * return self.cval.imag | |
6267 * | |
6268 */ | |
6269 | |
6270 /* function exit code */ | |
6271 __pyx_L0:; | |
6272 return __pyx_r; | |
6273 } | |
6274 | |
6275 /* "cpython/contextvars.pxd":112 | |
6276 * | |
6277 * | |
6278 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< | |
6279 * """Return a new reference to the value of the context variable, | |
6280 * or the default value of the context variable, | |
6281 */ | |
6282 | |
6283 static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) { | |
6284 PyObject *__pyx_v_default_value = ((PyObject *)Py_None); | |
6285 PyObject *__pyx_v_value; | |
6286 PyObject *__pyx_v_pyvalue = NULL; | |
6287 PyObject *__pyx_r = NULL; | |
6288 __Pyx_RefNannyDeclarations | |
6289 int __pyx_t_1; | |
6290 int __pyx_t_2; | |
6291 PyObject *__pyx_t_3 = NULL; | |
6292 int __pyx_lineno = 0; | |
6293 const char *__pyx_filename = NULL; | |
6294 int __pyx_clineno = 0; | |
6295 __Pyx_RefNannySetupContext("get_value", 1); | |
6296 if (__pyx_optional_args) { | |
6297 if (__pyx_optional_args->__pyx_n > 0) { | |
6298 __pyx_v_default_value = __pyx_optional_args->default_value; | |
6299 } | |
6300 } | |
6301 | |
6302 /* "cpython/contextvars.pxd":117 | |
6303 * or None if no such value or default was found. | |
6304 * """ | |
6305 * cdef PyObject *value = NULL # <<<<<<<<<<<<<< | |
6306 * PyContextVar_Get(var, NULL, &value) | |
6307 * if value is NULL: | |
6308 */ | |
6309 __pyx_v_value = NULL; | |
6310 | |
6311 /* "cpython/contextvars.pxd":118 | |
6312 * """ | |
6313 * cdef PyObject *value = NULL | |
6314 * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<< | |
6315 * if value is NULL: | |
6316 * # context variable does not have a default | |
6317 */ | |
6318 __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 118, __pyx_L1_error) | |
6319 | |
6320 /* "cpython/contextvars.pxd":119 | |
6321 * cdef PyObject *value = NULL | |
6322 * PyContextVar_Get(var, NULL, &value) | |
6323 * if value is NULL: # <<<<<<<<<<<<<< | |
6324 * # context variable does not have a default | |
6325 * pyvalue = default_value | |
6326 */ | |
6327 __pyx_t_2 = (__pyx_v_value == NULL); | |
6328 if (__pyx_t_2) { | |
6329 | |
6330 /* "cpython/contextvars.pxd":121 | |
6331 * if value is NULL: | |
6332 * # context variable does not have a default | |
6333 * pyvalue = default_value # <<<<<<<<<<<<<< | |
6334 * else: | |
6335 * # value or default value of context variable | |
6336 */ | |
6337 __Pyx_INCREF(__pyx_v_default_value); | |
6338 __pyx_v_pyvalue = __pyx_v_default_value; | |
6339 | |
6340 /* "cpython/contextvars.pxd":119 | |
6341 * cdef PyObject *value = NULL | |
6342 * PyContextVar_Get(var, NULL, &value) | |
6343 * if value is NULL: # <<<<<<<<<<<<<< | |
6344 * # context variable does not have a default | |
6345 * pyvalue = default_value | |
6346 */ | |
6347 goto __pyx_L3; | |
6348 } | |
6349 | |
6350 /* "cpython/contextvars.pxd":124 | |
6351 * else: | |
6352 * # value or default value of context variable | |
6353 * pyvalue = <object>value # <<<<<<<<<<<<<< | |
6354 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' | |
6355 * return pyvalue | |
6356 */ | |
6357 /*else*/ { | |
6358 __pyx_t_3 = ((PyObject *)__pyx_v_value); | |
6359 __Pyx_INCREF(__pyx_t_3); | |
6360 __pyx_v_pyvalue = __pyx_t_3; | |
6361 __pyx_t_3 = 0; | |
6362 | |
6363 /* "cpython/contextvars.pxd":125 | |
6364 * # value or default value of context variable | |
6365 * pyvalue = <object>value | |
6366 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< | |
6367 * return pyvalue | |
6368 * | |
6369 */ | |
6370 Py_XDECREF(__pyx_v_value); | |
6371 } | |
6372 __pyx_L3:; | |
6373 | |
6374 /* "cpython/contextvars.pxd":126 | |
6375 * pyvalue = <object>value | |
6376 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' | |
6377 * return pyvalue # <<<<<<<<<<<<<< | |
6378 * | |
6379 * | |
6380 */ | |
6381 __Pyx_XDECREF(__pyx_r); | |
6382 __Pyx_INCREF(__pyx_v_pyvalue); | |
6383 __pyx_r = __pyx_v_pyvalue; | |
6384 goto __pyx_L0; | |
6385 | |
6386 /* "cpython/contextvars.pxd":112 | |
6387 * | |
6388 * | |
6389 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< | |
6390 * """Return a new reference to the value of the context variable, | |
6391 * or the default value of the context variable, | |
6392 */ | |
6393 | |
6394 /* function exit code */ | |
6395 __pyx_L1_error:; | |
6396 __Pyx_XDECREF(__pyx_t_3); | |
6397 __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
6398 __pyx_r = 0; | |
6399 __pyx_L0:; | |
6400 __Pyx_XDECREF(__pyx_v_pyvalue); | |
6401 __Pyx_XGIVEREF(__pyx_r); | |
6402 __Pyx_RefNannyFinishContext(); | |
6403 return __pyx_r; | |
6404 } | |
6405 | |
6406 /* "cpython/contextvars.pxd":129 | |
6407 * | |
6408 * | |
6409 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< | |
6410 * """Return a new reference to the value of the context variable, | |
6411 * or the provided default value if no such value was found. | |
6412 */ | |
6413 | |
6414 static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) { | |
6415 PyObject *__pyx_v_default_value = ((PyObject *)Py_None); | |
6416 PyObject *__pyx_v_value; | |
6417 PyObject *__pyx_v_pyvalue = NULL; | |
6418 PyObject *__pyx_r = NULL; | |
6419 __Pyx_RefNannyDeclarations | |
6420 int __pyx_t_1; | |
6421 PyObject *__pyx_t_2 = NULL; | |
6422 int __pyx_lineno = 0; | |
6423 const char *__pyx_filename = NULL; | |
6424 int __pyx_clineno = 0; | |
6425 __Pyx_RefNannySetupContext("get_value_no_default", 1); | |
6426 if (__pyx_optional_args) { | |
6427 if (__pyx_optional_args->__pyx_n > 0) { | |
6428 __pyx_v_default_value = __pyx_optional_args->default_value; | |
6429 } | |
6430 } | |
6431 | |
6432 /* "cpython/contextvars.pxd":135 | |
6433 * Ignores the default value of the context variable, if any. | |
6434 * """ | |
6435 * cdef PyObject *value = NULL # <<<<<<<<<<<<<< | |
6436 * PyContextVar_Get(var, <PyObject*>default_value, &value) | |
6437 * # value of context variable or 'default_value' | |
6438 */ | |
6439 __pyx_v_value = NULL; | |
6440 | |
6441 /* "cpython/contextvars.pxd":136 | |
6442 * """ | |
6443 * cdef PyObject *value = NULL | |
6444 * PyContextVar_Get(var, <PyObject*>default_value, &value) # <<<<<<<<<<<<<< | |
6445 * # value of context variable or 'default_value' | |
6446 * pyvalue = <object>value | |
6447 */ | |
6448 __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 136, __pyx_L1_error) | |
6449 | |
6450 /* "cpython/contextvars.pxd":138 | |
6451 * PyContextVar_Get(var, <PyObject*>default_value, &value) | |
6452 * # value of context variable or 'default_value' | |
6453 * pyvalue = <object>value # <<<<<<<<<<<<<< | |
6454 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' | |
6455 * return pyvalue | |
6456 */ | |
6457 __pyx_t_2 = ((PyObject *)__pyx_v_value); | |
6458 __Pyx_INCREF(__pyx_t_2); | |
6459 __pyx_v_pyvalue = __pyx_t_2; | |
6460 __pyx_t_2 = 0; | |
6461 | |
6462 /* "cpython/contextvars.pxd":139 | |
6463 * # value of context variable or 'default_value' | |
6464 * pyvalue = <object>value | |
6465 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< | |
6466 * return pyvalue | |
6467 */ | |
6468 Py_XDECREF(__pyx_v_value); | |
6469 | |
6470 /* "cpython/contextvars.pxd":140 | |
6471 * pyvalue = <object>value | |
6472 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' | |
6473 * return pyvalue # <<<<<<<<<<<<<< | |
6474 */ | |
6475 __Pyx_XDECREF(__pyx_r); | |
6476 __Pyx_INCREF(__pyx_v_pyvalue); | |
6477 __pyx_r = __pyx_v_pyvalue; | |
6478 goto __pyx_L0; | |
6479 | |
6480 /* "cpython/contextvars.pxd":129 | |
6481 * | |
6482 * | |
6483 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< | |
6484 * """Return a new reference to the value of the context variable, | |
6485 * or the provided default value if no such value was found. | |
6486 */ | |
6487 | |
6488 /* function exit code */ | |
6489 __pyx_L1_error:; | |
6490 __Pyx_XDECREF(__pyx_t_2); | |
6491 __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
6492 __pyx_r = 0; | |
6493 __pyx_L0:; | |
6494 __Pyx_XDECREF(__pyx_v_pyvalue); | |
6495 __Pyx_XGIVEREF(__pyx_r); | |
6496 __Pyx_RefNannyFinishContext(); | |
6497 return __pyx_r; | |
6498 } | |
6499 | |
6500 /* "array.pxd":104 | |
6501 * __data_union data | |
6502 * | |
6503 * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< | |
6504 * # This implementation of getbuffer is geared towards Cython | |
6505 * # requirements, and does not yet fulfill the PEP. | |
6506 */ | |
6507 | |
6508 /* Python wrapper */ | |
6509 CYTHON_UNUSED static int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ | |
6510 CYTHON_UNUSED static int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { | |
6511 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
6512 int __pyx_r; | |
6513 __Pyx_RefNannyDeclarations | |
6514 __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); | |
6515 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
6516 __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); | |
6517 | |
6518 /* function exit code */ | |
6519 __Pyx_RefNannyFinishContext(); | |
6520 return __pyx_r; | |
6521 } | |
6522 | |
6523 static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags) { | |
6524 PyObject *__pyx_v_item_count = NULL; | |
6525 int __pyx_r; | |
6526 __Pyx_RefNannyDeclarations | |
6527 PyObject *__pyx_t_1 = NULL; | |
6528 char *__pyx_t_2; | |
6529 int __pyx_t_3; | |
6530 PyObject *__pyx_t_4 = NULL; | |
6531 Py_ssize_t __pyx_t_5; | |
6532 int __pyx_t_6; | |
6533 char __pyx_t_7; | |
6534 int __pyx_lineno = 0; | |
6535 const char *__pyx_filename = NULL; | |
6536 int __pyx_clineno = 0; | |
6537 if (unlikely(__pyx_v_info == NULL)) { | |
6538 PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); | |
6539 return -1; | |
6540 } | |
6541 __Pyx_RefNannySetupContext("__getbuffer__", 0); | |
6542 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); | |
6543 __Pyx_GIVEREF(__pyx_v_info->obj); | |
6544 | |
6545 /* "array.pxd":109 | |
6546 * # In particular strided access is always provided regardless | |
6547 * # of flags | |
6548 * item_count = Py_SIZE(self) # <<<<<<<<<<<<<< | |
6549 * | |
6550 * info.suboffsets = NULL | |
6551 */ | |
6552 __pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 109, __pyx_L1_error) | |
6553 __Pyx_GOTREF(__pyx_t_1); | |
6554 __pyx_v_item_count = __pyx_t_1; | |
6555 __pyx_t_1 = 0; | |
6556 | |
6557 /* "array.pxd":111 | |
6558 * item_count = Py_SIZE(self) | |
6559 * | |
6560 * info.suboffsets = NULL # <<<<<<<<<<<<<< | |
6561 * info.buf = self.data.as_chars | |
6562 * info.readonly = 0 | |
6563 */ | |
6564 __pyx_v_info->suboffsets = NULL; | |
6565 | |
6566 /* "array.pxd":112 | |
6567 * | |
6568 * info.suboffsets = NULL | |
6569 * info.buf = self.data.as_chars # <<<<<<<<<<<<<< | |
6570 * info.readonly = 0 | |
6571 * info.ndim = 1 | |
6572 */ | |
6573 __pyx_t_2 = __pyx_v_self->data.as_chars; | |
6574 __pyx_v_info->buf = __pyx_t_2; | |
6575 | |
6576 /* "array.pxd":113 | |
6577 * info.suboffsets = NULL | |
6578 * info.buf = self.data.as_chars | |
6579 * info.readonly = 0 # <<<<<<<<<<<<<< | |
6580 * info.ndim = 1 | |
6581 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) | |
6582 */ | |
6583 __pyx_v_info->readonly = 0; | |
6584 | |
6585 /* "array.pxd":114 | |
6586 * info.buf = self.data.as_chars | |
6587 * info.readonly = 0 | |
6588 * info.ndim = 1 # <<<<<<<<<<<<<< | |
6589 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) | |
6590 * info.len = info.itemsize * item_count | |
6591 */ | |
6592 __pyx_v_info->ndim = 1; | |
6593 | |
6594 /* "array.pxd":115 | |
6595 * info.readonly = 0 | |
6596 * info.ndim = 1 | |
6597 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) # <<<<<<<<<<<<<< | |
6598 * info.len = info.itemsize * item_count | |
6599 * | |
6600 */ | |
6601 __pyx_t_3 = __pyx_v_self->ob_descr->itemsize; | |
6602 __pyx_v_info->itemsize = __pyx_t_3; | |
6603 | |
6604 /* "array.pxd":116 | |
6605 * info.ndim = 1 | |
6606 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) | |
6607 * info.len = info.itemsize * item_count # <<<<<<<<<<<<<< | |
6608 * | |
6609 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2) | |
6610 */ | |
6611 __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 116, __pyx_L1_error) | |
6612 __Pyx_GOTREF(__pyx_t_1); | |
6613 __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 116, __pyx_L1_error) | |
6614 __Pyx_GOTREF(__pyx_t_4); | |
6615 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
6616 __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 116, __pyx_L1_error) | |
6617 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
6618 __pyx_v_info->len = __pyx_t_5; | |
6619 | |
6620 /* "array.pxd":118 | |
6621 * info.len = info.itemsize * item_count | |
6622 * | |
6623 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2) # <<<<<<<<<<<<<< | |
6624 * if not info.shape: | |
6625 * raise MemoryError() | |
6626 */ | |
6627 __pyx_v_info->shape = ((Py_ssize_t *)PyObject_Malloc(((sizeof(Py_ssize_t)) + 2))); | |
6628 | |
6629 /* "array.pxd":119 | |
6630 * | |
6631 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2) | |
6632 * if not info.shape: # <<<<<<<<<<<<<< | |
6633 * raise MemoryError() | |
6634 * info.shape[0] = item_count # constant regardless of resizing | |
6635 */ | |
6636 __pyx_t_6 = (!(__pyx_v_info->shape != 0)); | |
6637 if (unlikely(__pyx_t_6)) { | |
6638 | |
6639 /* "array.pxd":120 | |
6640 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2) | |
6641 * if not info.shape: | |
6642 * raise MemoryError() # <<<<<<<<<<<<<< | |
6643 * info.shape[0] = item_count # constant regardless of resizing | |
6644 * info.strides = &info.itemsize | |
6645 */ | |
6646 PyErr_NoMemory(); __PYX_ERR(3, 120, __pyx_L1_error) | |
6647 | |
6648 /* "array.pxd":119 | |
6649 * | |
6650 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2) | |
6651 * if not info.shape: # <<<<<<<<<<<<<< | |
6652 * raise MemoryError() | |
6653 * info.shape[0] = item_count # constant regardless of resizing | |
6654 */ | |
6655 } | |
6656 | |
6657 /* "array.pxd":121 | |
6658 * if not info.shape: | |
6659 * raise MemoryError() | |
6660 * info.shape[0] = item_count # constant regardless of resizing # <<<<<<<<<<<<<< | |
6661 * info.strides = &info.itemsize | |
6662 * | |
6663 */ | |
6664 __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item_count); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 121, __pyx_L1_error) | |
6665 (__pyx_v_info->shape[0]) = __pyx_t_5; | |
6666 | |
6667 /* "array.pxd":122 | |
6668 * raise MemoryError() | |
6669 * info.shape[0] = item_count # constant regardless of resizing | |
6670 * info.strides = &info.itemsize # <<<<<<<<<<<<<< | |
6671 * | |
6672 * info.format = <char*> (info.shape + 1) | |
6673 */ | |
6674 __pyx_v_info->strides = (&__pyx_v_info->itemsize); | |
6675 | |
6676 /* "array.pxd":124 | |
6677 * info.strides = &info.itemsize | |
6678 * | |
6679 * info.format = <char*> (info.shape + 1) # <<<<<<<<<<<<<< | |
6680 * info.format[0] = self.ob_descr.typecode | |
6681 * info.format[1] = 0 | |
6682 */ | |
6683 __pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1)); | |
6684 | |
6685 /* "array.pxd":125 | |
6686 * | |
6687 * info.format = <char*> (info.shape + 1) | |
6688 * info.format[0] = self.ob_descr.typecode # <<<<<<<<<<<<<< | |
6689 * info.format[1] = 0 | |
6690 * info.obj = self | |
6691 */ | |
6692 __pyx_t_7 = __pyx_v_self->ob_descr->typecode; | |
6693 (__pyx_v_info->format[0]) = __pyx_t_7; | |
6694 | |
6695 /* "array.pxd":126 | |
6696 * info.format = <char*> (info.shape + 1) | |
6697 * info.format[0] = self.ob_descr.typecode | |
6698 * info.format[1] = 0 # <<<<<<<<<<<<<< | |
6699 * info.obj = self | |
6700 * | |
6701 */ | |
6702 (__pyx_v_info->format[1]) = 0; | |
6703 | |
6704 /* "array.pxd":127 | |
6705 * info.format[0] = self.ob_descr.typecode | |
6706 * info.format[1] = 0 | |
6707 * info.obj = self # <<<<<<<<<<<<<< | |
6708 * | |
6709 * def __releasebuffer__(self, Py_buffer* info): | |
6710 */ | |
6711 __Pyx_INCREF((PyObject *)__pyx_v_self); | |
6712 __Pyx_GIVEREF((PyObject *)__pyx_v_self); | |
6713 __Pyx_GOTREF(__pyx_v_info->obj); | |
6714 __Pyx_DECREF(__pyx_v_info->obj); | |
6715 __pyx_v_info->obj = ((PyObject *)__pyx_v_self); | |
6716 | |
6717 /* "array.pxd":104 | |
6718 * __data_union data | |
6719 * | |
6720 * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< | |
6721 * # This implementation of getbuffer is geared towards Cython | |
6722 * # requirements, and does not yet fulfill the PEP. | |
6723 */ | |
6724 | |
6725 /* function exit code */ | |
6726 __pyx_r = 0; | |
6727 goto __pyx_L0; | |
6728 __pyx_L1_error:; | |
6729 __Pyx_XDECREF(__pyx_t_1); | |
6730 __Pyx_XDECREF(__pyx_t_4); | |
6731 __Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
6732 __pyx_r = -1; | |
6733 if (__pyx_v_info->obj != NULL) { | |
6734 __Pyx_GOTREF(__pyx_v_info->obj); | |
6735 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; | |
6736 } | |
6737 goto __pyx_L2; | |
6738 __pyx_L0:; | |
6739 if (__pyx_v_info->obj == Py_None) { | |
6740 __Pyx_GOTREF(__pyx_v_info->obj); | |
6741 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; | |
6742 } | |
6743 __pyx_L2:; | |
6744 __Pyx_XDECREF(__pyx_v_item_count); | |
6745 __Pyx_RefNannyFinishContext(); | |
6746 return __pyx_r; | |
6747 } | |
6748 | |
6749 /* "array.pxd":129 | |
6750 * info.obj = self | |
6751 * | |
6752 * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<< | |
6753 * PyObject_Free(info.shape) | |
6754 * | |
6755 */ | |
6756 | |
6757 /* Python wrapper */ | |
6758 CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ | |
6759 CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { | |
6760 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
6761 __Pyx_RefNannyDeclarations | |
6762 __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); | |
6763 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
6764 __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); | |
6765 | |
6766 /* function exit code */ | |
6767 __Pyx_RefNannyFinishContext(); | |
6768 } | |
6769 | |
6770 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) { | |
6771 | |
6772 /* "array.pxd":130 | |
6773 * | |
6774 * def __releasebuffer__(self, Py_buffer* info): | |
6775 * PyObject_Free(info.shape) # <<<<<<<<<<<<<< | |
6776 * | |
6777 * array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr) | |
6778 */ | |
6779 PyObject_Free(__pyx_v_info->shape); | |
6780 | |
6781 /* "array.pxd":129 | |
6782 * info.obj = self | |
6783 * | |
6784 * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<< | |
6785 * PyObject_Free(info.shape) | |
6786 * | |
6787 */ | |
6788 | |
6789 /* function exit code */ | |
6790 } | |
6791 | |
6792 /* "array.pxd":141 | |
6793 * | |
6794 * | |
6795 * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<< | |
6796 * """ fast creation of a new array, given a template array. | |
6797 * type will be same as template. | |
6798 */ | |
6799 | |
6800 static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, int __pyx_v_zero) { | |
6801 arrayobject *__pyx_v_op = 0; | |
6802 arrayobject *__pyx_r = NULL; | |
6803 __Pyx_RefNannyDeclarations | |
6804 PyObject *__pyx_t_1 = NULL; | |
6805 int __pyx_t_2; | |
6806 int __pyx_t_3; | |
6807 int __pyx_lineno = 0; | |
6808 const char *__pyx_filename = NULL; | |
6809 int __pyx_clineno = 0; | |
6810 __Pyx_RefNannySetupContext("clone", 1); | |
6811 | |
6812 /* "array.pxd":145 | |
6813 * type will be same as template. | |
6814 * if zero is true, new array will be initialized with zeroes.""" | |
6815 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) # <<<<<<<<<<<<<< | |
6816 * if zero and op is not None: | |
6817 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) | |
6818 */ | |
6819 __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_template)), __pyx_v_length, __pyx_v_template->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 145, __pyx_L1_error) | |
6820 __Pyx_GOTREF(__pyx_t_1); | |
6821 __pyx_v_op = ((arrayobject *)__pyx_t_1); | |
6822 __pyx_t_1 = 0; | |
6823 | |
6824 /* "array.pxd":146 | |
6825 * if zero is true, new array will be initialized with zeroes.""" | |
6826 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) | |
6827 * if zero and op is not None: # <<<<<<<<<<<<<< | |
6828 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) | |
6829 * return op | |
6830 */ | |
6831 if (__pyx_v_zero) { | |
6832 } else { | |
6833 __pyx_t_2 = __pyx_v_zero; | |
6834 goto __pyx_L4_bool_binop_done; | |
6835 } | |
6836 __pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None); | |
6837 __pyx_t_2 = __pyx_t_3; | |
6838 __pyx_L4_bool_binop_done:; | |
6839 if (__pyx_t_2) { | |
6840 | |
6841 /* "array.pxd":147 | |
6842 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) | |
6843 * if zero and op is not None: | |
6844 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) # <<<<<<<<<<<<<< | |
6845 * return op | |
6846 * | |
6847 */ | |
6848 (void)(memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize))); | |
6849 | |
6850 /* "array.pxd":146 | |
6851 * if zero is true, new array will be initialized with zeroes.""" | |
6852 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) | |
6853 * if zero and op is not None: # <<<<<<<<<<<<<< | |
6854 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) | |
6855 * return op | |
6856 */ | |
6857 } | |
6858 | |
6859 /* "array.pxd":148 | |
6860 * if zero and op is not None: | |
6861 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) | |
6862 * return op # <<<<<<<<<<<<<< | |
6863 * | |
6864 * cdef inline array copy(array self): | |
6865 */ | |
6866 __Pyx_XDECREF((PyObject *)__pyx_r); | |
6867 __Pyx_INCREF((PyObject *)__pyx_v_op); | |
6868 __pyx_r = __pyx_v_op; | |
6869 goto __pyx_L0; | |
6870 | |
6871 /* "array.pxd":141 | |
6872 * | |
6873 * | |
6874 * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<< | |
6875 * """ fast creation of a new array, given a template array. | |
6876 * type will be same as template. | |
6877 */ | |
6878 | |
6879 /* function exit code */ | |
6880 __pyx_L1_error:; | |
6881 __Pyx_XDECREF(__pyx_t_1); | |
6882 __Pyx_AddTraceback("cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
6883 __pyx_r = 0; | |
6884 __pyx_L0:; | |
6885 __Pyx_XDECREF((PyObject *)__pyx_v_op); | |
6886 __Pyx_XGIVEREF((PyObject *)__pyx_r); | |
6887 __Pyx_RefNannyFinishContext(); | |
6888 return __pyx_r; | |
6889 } | |
6890 | |
6891 /* "array.pxd":150 | |
6892 * return op | |
6893 * | |
6894 * cdef inline array copy(array self): # <<<<<<<<<<<<<< | |
6895 * """ make a copy of an array. """ | |
6896 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) | |
6897 */ | |
6898 | |
6899 static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) { | |
6900 arrayobject *__pyx_v_op = 0; | |
6901 arrayobject *__pyx_r = NULL; | |
6902 __Pyx_RefNannyDeclarations | |
6903 PyObject *__pyx_t_1 = NULL; | |
6904 int __pyx_lineno = 0; | |
6905 const char *__pyx_filename = NULL; | |
6906 int __pyx_clineno = 0; | |
6907 __Pyx_RefNannySetupContext("copy", 1); | |
6908 | |
6909 /* "array.pxd":152 | |
6910 * cdef inline array copy(array self): | |
6911 * """ make a copy of an array. """ | |
6912 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) # <<<<<<<<<<<<<< | |
6913 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) | |
6914 * return op | |
6915 */ | |
6916 __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_self)), Py_SIZE(((PyObject *)__pyx_v_self)), __pyx_v_self->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 152, __pyx_L1_error) | |
6917 __Pyx_GOTREF(__pyx_t_1); | |
6918 __pyx_v_op = ((arrayobject *)__pyx_t_1); | |
6919 __pyx_t_1 = 0; | |
6920 | |
6921 /* "array.pxd":153 | |
6922 * """ make a copy of an array. """ | |
6923 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) | |
6924 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) # <<<<<<<<<<<<<< | |
6925 * return op | |
6926 * | |
6927 */ | |
6928 (void)(memcpy(__pyx_v_op->data.as_chars, __pyx_v_self->data.as_chars, (Py_SIZE(((PyObject *)__pyx_v_op)) * __pyx_v_op->ob_descr->itemsize))); | |
6929 | |
6930 /* "array.pxd":154 | |
6931 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) | |
6932 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) | |
6933 * return op # <<<<<<<<<<<<<< | |
6934 * | |
6935 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: | |
6936 */ | |
6937 __Pyx_XDECREF((PyObject *)__pyx_r); | |
6938 __Pyx_INCREF((PyObject *)__pyx_v_op); | |
6939 __pyx_r = __pyx_v_op; | |
6940 goto __pyx_L0; | |
6941 | |
6942 /* "array.pxd":150 | |
6943 * return op | |
6944 * | |
6945 * cdef inline array copy(array self): # <<<<<<<<<<<<<< | |
6946 * """ make a copy of an array. """ | |
6947 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) | |
6948 */ | |
6949 | |
6950 /* function exit code */ | |
6951 __pyx_L1_error:; | |
6952 __Pyx_XDECREF(__pyx_t_1); | |
6953 __Pyx_AddTraceback("cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
6954 __pyx_r = 0; | |
6955 __pyx_L0:; | |
6956 __Pyx_XDECREF((PyObject *)__pyx_v_op); | |
6957 __Pyx_XGIVEREF((PyObject *)__pyx_r); | |
6958 __Pyx_RefNannyFinishContext(); | |
6959 return __pyx_r; | |
6960 } | |
6961 | |
6962 /* "array.pxd":156 | |
6963 * return op | |
6964 * | |
6965 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<< | |
6966 * """ efficient appending of new stuff of same type | |
6967 * (e.g. of same array type) | |
6968 */ | |
6969 | |
6970 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) { | |
6971 Py_ssize_t __pyx_v_itemsize; | |
6972 Py_ssize_t __pyx_v_origsize; | |
6973 int __pyx_r; | |
6974 int __pyx_t_1; | |
6975 int __pyx_lineno = 0; | |
6976 const char *__pyx_filename = NULL; | |
6977 int __pyx_clineno = 0; | |
6978 | |
6979 /* "array.pxd":160 | |
6980 * (e.g. of same array type) | |
6981 * n: number of elements (not number of bytes!) """ | |
6982 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize # <<<<<<<<<<<<<< | |
6983 * cdef Py_ssize_t origsize = Py_SIZE(self) | |
6984 * resize_smart(self, origsize + n) | |
6985 */ | |
6986 __pyx_t_1 = __pyx_v_self->ob_descr->itemsize; | |
6987 __pyx_v_itemsize = __pyx_t_1; | |
6988 | |
6989 /* "array.pxd":161 | |
6990 * n: number of elements (not number of bytes!) """ | |
6991 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize | |
6992 * cdef Py_ssize_t origsize = Py_SIZE(self) # <<<<<<<<<<<<<< | |
6993 * resize_smart(self, origsize + n) | |
6994 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) | |
6995 */ | |
6996 __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self)); | |
6997 | |
6998 /* "array.pxd":162 | |
6999 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize | |
7000 * cdef Py_ssize_t origsize = Py_SIZE(self) | |
7001 * resize_smart(self, origsize + n) # <<<<<<<<<<<<<< | |
7002 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) | |
7003 * return 0 | |
7004 */ | |
7005 __pyx_t_1 = resize_smart(__pyx_v_self, (__pyx_v_origsize + __pyx_v_n)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 162, __pyx_L1_error) | |
7006 | |
7007 /* "array.pxd":163 | |
7008 * cdef Py_ssize_t origsize = Py_SIZE(self) | |
7009 * resize_smart(self, origsize + n) | |
7010 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) # <<<<<<<<<<<<<< | |
7011 * return 0 | |
7012 * | |
7013 */ | |
7014 (void)(memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize))); | |
7015 | |
7016 /* "array.pxd":164 | |
7017 * resize_smart(self, origsize + n) | |
7018 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) | |
7019 * return 0 # <<<<<<<<<<<<<< | |
7020 * | |
7021 * cdef inline int extend(array self, array other) except -1: | |
7022 */ | |
7023 __pyx_r = 0; | |
7024 goto __pyx_L0; | |
7025 | |
7026 /* "array.pxd":156 | |
7027 * return op | |
7028 * | |
7029 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<< | |
7030 * """ efficient appending of new stuff of same type | |
7031 * (e.g. of same array type) | |
7032 */ | |
7033 | |
7034 /* function exit code */ | |
7035 __pyx_L1_error:; | |
7036 __Pyx_AddTraceback("cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
7037 __pyx_r = -1; | |
7038 __pyx_L0:; | |
7039 return __pyx_r; | |
7040 } | |
7041 | |
7042 /* "array.pxd":166 | |
7043 * return 0 | |
7044 * | |
7045 * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<< | |
7046 * """ extend array with data from another array; types must match. """ | |
7047 * if self.ob_descr.typecode != other.ob_descr.typecode: | |
7048 */ | |
7049 | |
7050 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) { | |
7051 int __pyx_r; | |
7052 int __pyx_t_1; | |
7053 int __pyx_t_2; | |
7054 int __pyx_lineno = 0; | |
7055 const char *__pyx_filename = NULL; | |
7056 int __pyx_clineno = 0; | |
7057 | |
7058 /* "array.pxd":168 | |
7059 * cdef inline int extend(array self, array other) except -1: | |
7060 * """ extend array with data from another array; types must match. """ | |
7061 * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<< | |
7062 * PyErr_BadArgument() | |
7063 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) | |
7064 */ | |
7065 __pyx_t_1 = (__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode); | |
7066 if (__pyx_t_1) { | |
7067 | |
7068 /* "array.pxd":169 | |
7069 * """ extend array with data from another array; types must match. """ | |
7070 * if self.ob_descr.typecode != other.ob_descr.typecode: | |
7071 * PyErr_BadArgument() # <<<<<<<<<<<<<< | |
7072 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) | |
7073 * | |
7074 */ | |
7075 __pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(3, 169, __pyx_L1_error) | |
7076 | |
7077 /* "array.pxd":168 | |
7078 * cdef inline int extend(array self, array other) except -1: | |
7079 * """ extend array with data from another array; types must match. """ | |
7080 * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<< | |
7081 * PyErr_BadArgument() | |
7082 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) | |
7083 */ | |
7084 } | |
7085 | |
7086 /* "array.pxd":170 | |
7087 * if self.ob_descr.typecode != other.ob_descr.typecode: | |
7088 * PyErr_BadArgument() | |
7089 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) # <<<<<<<<<<<<<< | |
7090 * | |
7091 * cdef inline void zero(array self) noexcept: | |
7092 */ | |
7093 __pyx_t_2 = __pyx_f_7cpython_5array_extend_buffer(__pyx_v_self, __pyx_v_other->data.as_chars, Py_SIZE(((PyObject *)__pyx_v_other))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 170, __pyx_L1_error) | |
7094 __pyx_r = __pyx_t_2; | |
7095 goto __pyx_L0; | |
7096 | |
7097 /* "array.pxd":166 | |
7098 * return 0 | |
7099 * | |
7100 * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<< | |
7101 * """ extend array with data from another array; types must match. """ | |
7102 * if self.ob_descr.typecode != other.ob_descr.typecode: | |
7103 */ | |
7104 | |
7105 /* function exit code */ | |
7106 __pyx_L1_error:; | |
7107 __Pyx_AddTraceback("cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
7108 __pyx_r = -1; | |
7109 __pyx_L0:; | |
7110 return __pyx_r; | |
7111 } | |
7112 | |
7113 /* "array.pxd":172 | |
7114 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) | |
7115 * | |
7116 * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<< | |
7117 * """ set all elements of array to zero. """ | |
7118 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) | |
7119 */ | |
7120 | |
7121 static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) { | |
7122 | |
7123 /* "array.pxd":174 | |
7124 * cdef inline void zero(array self) noexcept: | |
7125 * """ set all elements of array to zero. """ | |
7126 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) # <<<<<<<<<<<<<< | |
7127 */ | |
7128 (void)(memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize))); | |
7129 | |
7130 /* "array.pxd":172 | |
7131 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) | |
7132 * | |
7133 * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<< | |
7134 * """ set all elements of array to zero. """ | |
7135 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) | |
7136 */ | |
7137 | |
7138 /* function exit code */ | |
7139 } | |
7140 | |
7141 /* "pysam/libctabixproxies.pyx":15 | |
7142 * | |
7143 * | |
7144 * cdef char *StrOrEmpty(char * buffer): # <<<<<<<<<<<<<< | |
7145 * if buffer == NULL: | |
7146 * return "" | |
7147 */ | |
7148 | |
7149 static char *__pyx_f_5pysam_16libctabixproxies_StrOrEmpty(char *__pyx_v_buffer) { | |
7150 char *__pyx_r; | |
7151 int __pyx_t_1; | |
7152 | |
7153 /* "pysam/libctabixproxies.pyx":16 | |
7154 * | |
7155 * cdef char *StrOrEmpty(char * buffer): | |
7156 * if buffer == NULL: # <<<<<<<<<<<<<< | |
7157 * return "" | |
7158 * else: return buffer | |
7159 */ | |
7160 __pyx_t_1 = (__pyx_v_buffer == NULL); | |
7161 if (__pyx_t_1) { | |
7162 | |
7163 /* "pysam/libctabixproxies.pyx":17 | |
7164 * cdef char *StrOrEmpty(char * buffer): | |
7165 * if buffer == NULL: | |
7166 * return "" # <<<<<<<<<<<<<< | |
7167 * else: return buffer | |
7168 * | |
7169 */ | |
7170 __pyx_r = ((char *)""); | |
7171 goto __pyx_L0; | |
7172 | |
7173 /* "pysam/libctabixproxies.pyx":16 | |
7174 * | |
7175 * cdef char *StrOrEmpty(char * buffer): | |
7176 * if buffer == NULL: # <<<<<<<<<<<<<< | |
7177 * return "" | |
7178 * else: return buffer | |
7179 */ | |
7180 } | |
7181 | |
7182 /* "pysam/libctabixproxies.pyx":18 | |
7183 * if buffer == NULL: | |
7184 * return "" | |
7185 * else: return buffer # <<<<<<<<<<<<<< | |
7186 * | |
7187 * | |
7188 */ | |
7189 /*else*/ { | |
7190 __pyx_r = __pyx_v_buffer; | |
7191 goto __pyx_L0; | |
7192 } | |
7193 | |
7194 /* "pysam/libctabixproxies.pyx":15 | |
7195 * | |
7196 * | |
7197 * cdef char *StrOrEmpty(char * buffer): # <<<<<<<<<<<<<< | |
7198 * if buffer == NULL: | |
7199 * return "" | |
7200 */ | |
7201 | |
7202 /* function exit code */ | |
7203 __pyx_L0:; | |
7204 return __pyx_r; | |
7205 } | |
7206 | |
7207 /* "pysam/libctabixproxies.pyx":21 | |
7208 * | |
7209 * | |
7210 * cdef int isNew(char * p, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
7211 * """return True if `p` is located within `buffer` of size | |
7212 * `nbytes` | |
7213 */ | |
7214 | |
7215 static int __pyx_f_5pysam_16libctabixproxies_isNew(char *__pyx_v_p, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { | |
7216 int __pyx_r; | |
7217 int __pyx_t_1; | |
7218 | |
7219 /* "pysam/libctabixproxies.pyx":25 | |
7220 * `nbytes` | |
7221 * """ | |
7222 * if p == NULL: # <<<<<<<<<<<<<< | |
7223 * return 0 | |
7224 * | |
7225 */ | |
7226 __pyx_t_1 = (__pyx_v_p == NULL); | |
7227 if (__pyx_t_1) { | |
7228 | |
7229 /* "pysam/libctabixproxies.pyx":26 | |
7230 * """ | |
7231 * if p == NULL: | |
7232 * return 0 # <<<<<<<<<<<<<< | |
7233 * | |
7234 * return not (buffer <= p <= buffer + nbytes) | |
7235 */ | |
7236 __pyx_r = 0; | |
7237 goto __pyx_L0; | |
7238 | |
7239 /* "pysam/libctabixproxies.pyx":25 | |
7240 * `nbytes` | |
7241 * """ | |
7242 * if p == NULL: # <<<<<<<<<<<<<< | |
7243 * return 0 | |
7244 * | |
7245 */ | |
7246 } | |
7247 | |
7248 /* "pysam/libctabixproxies.pyx":28 | |
7249 * return 0 | |
7250 * | |
7251 * return not (buffer <= p <= buffer + nbytes) # <<<<<<<<<<<<<< | |
7252 * | |
7253 * | |
7254 */ | |
7255 __pyx_t_1 = (__pyx_v_buffer <= __pyx_v_p); | |
7256 if (__pyx_t_1) { | |
7257 __pyx_t_1 = (__pyx_v_p <= (__pyx_v_buffer + __pyx_v_nbytes)); | |
7258 } | |
7259 __pyx_r = (!__pyx_t_1); | |
7260 goto __pyx_L0; | |
7261 | |
7262 /* "pysam/libctabixproxies.pyx":21 | |
7263 * | |
7264 * | |
7265 * cdef int isNew(char * p, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
7266 * """return True if `p` is located within `buffer` of size | |
7267 * `nbytes` | |
7268 */ | |
7269 | |
7270 /* function exit code */ | |
7271 __pyx_L0:; | |
7272 return __pyx_r; | |
7273 } | |
7274 | |
7275 /* "pysam/libctabixproxies.pyx":42 | |
7276 * ''' | |
7277 * | |
7278 * def __cinit__(self, encoding="ascii"): # <<<<<<<<<<<<<< | |
7279 * self.data = NULL | |
7280 * self.fields = NULL | |
7281 */ | |
7282 | |
7283 /* Python wrapper */ | |
7284 static int __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ | |
7285 static int __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { | |
7286 PyObject *__pyx_v_encoding = 0; | |
7287 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
7288 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
7289 PyObject* values[1] = {0}; | |
7290 int __pyx_lineno = 0; | |
7291 const char *__pyx_filename = NULL; | |
7292 int __pyx_clineno = 0; | |
7293 int __pyx_r; | |
7294 __Pyx_RefNannyDeclarations | |
7295 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); | |
7296 #if CYTHON_ASSUME_SAFE_MACROS | |
7297 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
7298 #else | |
7299 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; | |
7300 #endif | |
7301 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
7302 { | |
7303 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_encoding,0}; | |
7304 values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_u_ascii)); | |
7305 if (__pyx_kwds) { | |
7306 Py_ssize_t kw_args; | |
7307 switch (__pyx_nargs) { | |
7308 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); | |
7309 CYTHON_FALLTHROUGH; | |
7310 case 0: break; | |
7311 default: goto __pyx_L5_argtuple_error; | |
7312 } | |
7313 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); | |
7314 switch (__pyx_nargs) { | |
7315 case 0: | |
7316 if (kw_args > 0) { | |
7317 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding); | |
7318 if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } | |
7319 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 42, __pyx_L3_error) | |
7320 } | |
7321 } | |
7322 if (unlikely(kw_args > 0)) { | |
7323 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
7324 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 42, __pyx_L3_error) | |
7325 } | |
7326 } else { | |
7327 switch (__pyx_nargs) { | |
7328 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); | |
7329 CYTHON_FALLTHROUGH; | |
7330 case 0: break; | |
7331 default: goto __pyx_L5_argtuple_error; | |
7332 } | |
7333 } | |
7334 __pyx_v_encoding = values[0]; | |
7335 } | |
7336 goto __pyx_L6_skip; | |
7337 __pyx_L5_argtuple_error:; | |
7338 __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 42, __pyx_L3_error) | |
7339 __pyx_L6_skip:; | |
7340 goto __pyx_L4_argument_unpacking_done; | |
7341 __pyx_L3_error:; | |
7342 { | |
7343 Py_ssize_t __pyx_temp; | |
7344 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
7345 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); | |
7346 } | |
7347 } | |
7348 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
7349 __Pyx_RefNannyFinishContext(); | |
7350 return -1; | |
7351 __pyx_L4_argument_unpacking_done:; | |
7352 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy___cinit__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self), __pyx_v_encoding); | |
7353 | |
7354 /* function exit code */ | |
7355 { | |
7356 Py_ssize_t __pyx_temp; | |
7357 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
7358 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); | |
7359 } | |
7360 } | |
7361 __Pyx_RefNannyFinishContext(); | |
7362 return __pyx_r; | |
7363 } | |
7364 | |
7365 static int __pyx_pf_5pysam_16libctabixproxies_10TupleProxy___cinit__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, PyObject *__pyx_v_encoding) { | |
7366 int __pyx_r; | |
7367 __Pyx_RefNannyDeclarations | |
7368 __Pyx_RefNannySetupContext("__cinit__", 1); | |
7369 | |
7370 /* "pysam/libctabixproxies.pyx":43 | |
7371 * | |
7372 * def __cinit__(self, encoding="ascii"): | |
7373 * self.data = NULL # <<<<<<<<<<<<<< | |
7374 * self.fields = NULL | |
7375 * self.nbytes = 0 | |
7376 */ | |
7377 __pyx_v_self->data = NULL; | |
7378 | |
7379 /* "pysam/libctabixproxies.pyx":44 | |
7380 * def __cinit__(self, encoding="ascii"): | |
7381 * self.data = NULL | |
7382 * self.fields = NULL # <<<<<<<<<<<<<< | |
7383 * self.nbytes = 0 | |
7384 * self.is_modified = 0 | |
7385 */ | |
7386 __pyx_v_self->fields = NULL; | |
7387 | |
7388 /* "pysam/libctabixproxies.pyx":45 | |
7389 * self.data = NULL | |
7390 * self.fields = NULL | |
7391 * self.nbytes = 0 # <<<<<<<<<<<<<< | |
7392 * self.is_modified = 0 | |
7393 * self.nfields = 0 | |
7394 */ | |
7395 __pyx_v_self->nbytes = 0; | |
7396 | |
7397 /* "pysam/libctabixproxies.pyx":46 | |
7398 * self.fields = NULL | |
7399 * self.nbytes = 0 | |
7400 * self.is_modified = 0 # <<<<<<<<<<<<<< | |
7401 * self.nfields = 0 | |
7402 * # start counting at field offset | |
7403 */ | |
7404 __pyx_v_self->is_modified = 0; | |
7405 | |
7406 /* "pysam/libctabixproxies.pyx":47 | |
7407 * self.nbytes = 0 | |
7408 * self.is_modified = 0 | |
7409 * self.nfields = 0 # <<<<<<<<<<<<<< | |
7410 * # start counting at field offset | |
7411 * self.offset = 0 | |
7412 */ | |
7413 __pyx_v_self->nfields = 0; | |
7414 | |
7415 /* "pysam/libctabixproxies.pyx":49 | |
7416 * self.nfields = 0 | |
7417 * # start counting at field offset | |
7418 * self.offset = 0 # <<<<<<<<<<<<<< | |
7419 * self.encoding = encoding | |
7420 * | |
7421 */ | |
7422 __pyx_v_self->offset = 0; | |
7423 | |
7424 /* "pysam/libctabixproxies.pyx":50 | |
7425 * # start counting at field offset | |
7426 * self.offset = 0 | |
7427 * self.encoding = encoding # <<<<<<<<<<<<<< | |
7428 * | |
7429 * def __dealloc__(self): | |
7430 */ | |
7431 __Pyx_INCREF(__pyx_v_encoding); | |
7432 __Pyx_GIVEREF(__pyx_v_encoding); | |
7433 __Pyx_GOTREF(__pyx_v_self->encoding); | |
7434 __Pyx_DECREF(__pyx_v_self->encoding); | |
7435 __pyx_v_self->encoding = __pyx_v_encoding; | |
7436 | |
7437 /* "pysam/libctabixproxies.pyx":42 | |
7438 * ''' | |
7439 * | |
7440 * def __cinit__(self, encoding="ascii"): # <<<<<<<<<<<<<< | |
7441 * self.data = NULL | |
7442 * self.fields = NULL | |
7443 */ | |
7444 | |
7445 /* function exit code */ | |
7446 __pyx_r = 0; | |
7447 __Pyx_RefNannyFinishContext(); | |
7448 return __pyx_r; | |
7449 } | |
7450 | |
7451 /* "pysam/libctabixproxies.pyx":52 | |
7452 * self.encoding = encoding | |
7453 * | |
7454 * def __dealloc__(self): # <<<<<<<<<<<<<< | |
7455 * cdef int x | |
7456 * if self.is_modified: | |
7457 */ | |
7458 | |
7459 /* Python wrapper */ | |
7460 static void __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ | |
7461 static void __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_3__dealloc__(PyObject *__pyx_v_self) { | |
7462 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
7463 __Pyx_RefNannyDeclarations | |
7464 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); | |
7465 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
7466 __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_2__dealloc__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self)); | |
7467 | |
7468 /* function exit code */ | |
7469 __Pyx_RefNannyFinishContext(); | |
7470 } | |
7471 | |
7472 static void __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_2__dealloc__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self) { | |
7473 int __pyx_v_x; | |
7474 int __pyx_t_1; | |
7475 int __pyx_t_2; | |
7476 int __pyx_t_3; | |
7477 int __pyx_lineno = 0; | |
7478 const char *__pyx_filename = NULL; | |
7479 int __pyx_clineno = 0; | |
7480 | |
7481 /* "pysam/libctabixproxies.pyx":54 | |
7482 * def __dealloc__(self): | |
7483 * cdef int x | |
7484 * if self.is_modified: # <<<<<<<<<<<<<< | |
7485 * for x from 0 <= x < self.nfields: | |
7486 * if isNew(self.fields[x], self.data, self.nbytes): | |
7487 */ | |
7488 if (__pyx_v_self->is_modified) { | |
7489 | |
7490 /* "pysam/libctabixproxies.pyx":55 | |
7491 * cdef int x | |
7492 * if self.is_modified: | |
7493 * for x from 0 <= x < self.nfields: # <<<<<<<<<<<<<< | |
7494 * if isNew(self.fields[x], self.data, self.nbytes): | |
7495 * free(self.fields[x]) | |
7496 */ | |
7497 __pyx_t_1 = __pyx_v_self->nfields; | |
7498 for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_1; __pyx_v_x++) { | |
7499 | |
7500 /* "pysam/libctabixproxies.pyx":56 | |
7501 * if self.is_modified: | |
7502 * for x from 0 <= x < self.nfields: | |
7503 * if isNew(self.fields[x], self.data, self.nbytes): # <<<<<<<<<<<<<< | |
7504 * free(self.fields[x]) | |
7505 * self.fields[x] = NULL | |
7506 */ | |
7507 __pyx_t_2 = __pyx_f_5pysam_16libctabixproxies_isNew((__pyx_v_self->fields[__pyx_v_x]), __pyx_v_self->data, __pyx_v_self->nbytes); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 56, __pyx_L1_error) | |
7508 __pyx_t_3 = (__pyx_t_2 != 0); | |
7509 if (__pyx_t_3) { | |
7510 | |
7511 /* "pysam/libctabixproxies.pyx":57 | |
7512 * for x from 0 <= x < self.nfields: | |
7513 * if isNew(self.fields[x], self.data, self.nbytes): | |
7514 * free(self.fields[x]) # <<<<<<<<<<<<<< | |
7515 * self.fields[x] = NULL | |
7516 * | |
7517 */ | |
7518 free((__pyx_v_self->fields[__pyx_v_x])); | |
7519 | |
7520 /* "pysam/libctabixproxies.pyx":58 | |
7521 * if isNew(self.fields[x], self.data, self.nbytes): | |
7522 * free(self.fields[x]) | |
7523 * self.fields[x] = NULL # <<<<<<<<<<<<<< | |
7524 * | |
7525 * if self.data != NULL: | |
7526 */ | |
7527 (__pyx_v_self->fields[__pyx_v_x]) = NULL; | |
7528 | |
7529 /* "pysam/libctabixproxies.pyx":56 | |
7530 * if self.is_modified: | |
7531 * for x from 0 <= x < self.nfields: | |
7532 * if isNew(self.fields[x], self.data, self.nbytes): # <<<<<<<<<<<<<< | |
7533 * free(self.fields[x]) | |
7534 * self.fields[x] = NULL | |
7535 */ | |
7536 } | |
7537 } | |
7538 | |
7539 /* "pysam/libctabixproxies.pyx":54 | |
7540 * def __dealloc__(self): | |
7541 * cdef int x | |
7542 * if self.is_modified: # <<<<<<<<<<<<<< | |
7543 * for x from 0 <= x < self.nfields: | |
7544 * if isNew(self.fields[x], self.data, self.nbytes): | |
7545 */ | |
7546 } | |
7547 | |
7548 /* "pysam/libctabixproxies.pyx":60 | |
7549 * self.fields[x] = NULL | |
7550 * | |
7551 * if self.data != NULL: # <<<<<<<<<<<<<< | |
7552 * free(self.data) | |
7553 * if self.fields != NULL: | |
7554 */ | |
7555 __pyx_t_3 = (__pyx_v_self->data != NULL); | |
7556 if (__pyx_t_3) { | |
7557 | |
7558 /* "pysam/libctabixproxies.pyx":61 | |
7559 * | |
7560 * if self.data != NULL: | |
7561 * free(self.data) # <<<<<<<<<<<<<< | |
7562 * if self.fields != NULL: | |
7563 * free(self.fields) | |
7564 */ | |
7565 free(__pyx_v_self->data); | |
7566 | |
7567 /* "pysam/libctabixproxies.pyx":60 | |
7568 * self.fields[x] = NULL | |
7569 * | |
7570 * if self.data != NULL: # <<<<<<<<<<<<<< | |
7571 * free(self.data) | |
7572 * if self.fields != NULL: | |
7573 */ | |
7574 } | |
7575 | |
7576 /* "pysam/libctabixproxies.pyx":62 | |
7577 * if self.data != NULL: | |
7578 * free(self.data) | |
7579 * if self.fields != NULL: # <<<<<<<<<<<<<< | |
7580 * free(self.fields) | |
7581 * | |
7582 */ | |
7583 __pyx_t_3 = (__pyx_v_self->fields != NULL); | |
7584 if (__pyx_t_3) { | |
7585 | |
7586 /* "pysam/libctabixproxies.pyx":63 | |
7587 * free(self.data) | |
7588 * if self.fields != NULL: | |
7589 * free(self.fields) # <<<<<<<<<<<<<< | |
7590 * | |
7591 * def __copy__(self): | |
7592 */ | |
7593 free(__pyx_v_self->fields); | |
7594 | |
7595 /* "pysam/libctabixproxies.pyx":62 | |
7596 * if self.data != NULL: | |
7597 * free(self.data) | |
7598 * if self.fields != NULL: # <<<<<<<<<<<<<< | |
7599 * free(self.fields) | |
7600 * | |
7601 */ | |
7602 } | |
7603 | |
7604 /* "pysam/libctabixproxies.pyx":52 | |
7605 * self.encoding = encoding | |
7606 * | |
7607 * def __dealloc__(self): # <<<<<<<<<<<<<< | |
7608 * cdef int x | |
7609 * if self.is_modified: | |
7610 */ | |
7611 | |
7612 /* function exit code */ | |
7613 goto __pyx_L0; | |
7614 __pyx_L1_error:; | |
7615 __Pyx_WriteUnraisable("pysam.libctabixproxies.TupleProxy.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); | |
7616 __pyx_L0:; | |
7617 } | |
7618 | |
7619 /* "pysam/libctabixproxies.pyx":65 | |
7620 * free(self.fields) | |
7621 * | |
7622 * def __copy__(self): # <<<<<<<<<<<<<< | |
7623 * if self.is_modified: | |
7624 * raise NotImplementedError( | |
7625 */ | |
7626 | |
7627 /* Python wrapper */ | |
7628 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_5__copy__(PyObject *__pyx_v_self, | |
7629 #if CYTHON_METH_FASTCALL | |
7630 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
7631 #else | |
7632 PyObject *__pyx_args, PyObject *__pyx_kwds | |
7633 #endif | |
7634 ); /*proto*/ | |
7635 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_5__copy__ = {"__copy__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_5__copy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
7636 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_5__copy__(PyObject *__pyx_v_self, | |
7637 #if CYTHON_METH_FASTCALL | |
7638 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
7639 #else | |
7640 PyObject *__pyx_args, PyObject *__pyx_kwds | |
7641 #endif | |
7642 ) { | |
7643 #if !CYTHON_METH_FASTCALL | |
7644 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
7645 #endif | |
7646 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
7647 PyObject *__pyx_r = 0; | |
7648 __Pyx_RefNannyDeclarations | |
7649 __Pyx_RefNannySetupContext("__copy__ (wrapper)", 0); | |
7650 #if !CYTHON_METH_FASTCALL | |
7651 #if CYTHON_ASSUME_SAFE_MACROS | |
7652 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
7653 #else | |
7654 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
7655 #endif | |
7656 #endif | |
7657 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
7658 if (unlikely(__pyx_nargs > 0)) { | |
7659 __Pyx_RaiseArgtupleInvalid("__copy__", 1, 0, 0, __pyx_nargs); return NULL;} | |
7660 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__copy__", 0))) return NULL; | |
7661 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_4__copy__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self)); | |
7662 | |
7663 /* function exit code */ | |
7664 __Pyx_RefNannyFinishContext(); | |
7665 return __pyx_r; | |
7666 } | |
7667 | |
7668 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_4__copy__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self) { | |
7669 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_n = 0; | |
7670 PyObject *__pyx_r = NULL; | |
7671 __Pyx_RefNannyDeclarations | |
7672 PyObject *__pyx_t_1 = NULL; | |
7673 PyObject *__pyx_t_2 = NULL; | |
7674 PyObject *__pyx_t_3 = NULL; | |
7675 unsigned int __pyx_t_4; | |
7676 struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy __pyx_t_5; | |
7677 int __pyx_lineno = 0; | |
7678 const char *__pyx_filename = NULL; | |
7679 int __pyx_clineno = 0; | |
7680 __Pyx_RefNannySetupContext("__copy__", 1); | |
7681 | |
7682 /* "pysam/libctabixproxies.pyx":66 | |
7683 * | |
7684 * def __copy__(self): | |
7685 * if self.is_modified: # <<<<<<<<<<<<<< | |
7686 * raise NotImplementedError( | |
7687 * "copying modified tuples is not implemented") | |
7688 */ | |
7689 if (unlikely(__pyx_v_self->is_modified)) { | |
7690 | |
7691 /* "pysam/libctabixproxies.pyx":67 | |
7692 * def __copy__(self): | |
7693 * if self.is_modified: | |
7694 * raise NotImplementedError( # <<<<<<<<<<<<<< | |
7695 * "copying modified tuples is not implemented") | |
7696 * cdef TupleProxy n = type(self)() | |
7697 */ | |
7698 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) | |
7699 __Pyx_GOTREF(__pyx_t_1); | |
7700 __Pyx_Raise(__pyx_t_1, 0, 0, 0); | |
7701 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
7702 __PYX_ERR(0, 67, __pyx_L1_error) | |
7703 | |
7704 /* "pysam/libctabixproxies.pyx":66 | |
7705 * | |
7706 * def __copy__(self): | |
7707 * if self.is_modified: # <<<<<<<<<<<<<< | |
7708 * raise NotImplementedError( | |
7709 * "copying modified tuples is not implemented") | |
7710 */ | |
7711 } | |
7712 | |
7713 /* "pysam/libctabixproxies.pyx":69 | |
7714 * raise NotImplementedError( | |
7715 * "copying modified tuples is not implemented") | |
7716 * cdef TupleProxy n = type(self)() # <<<<<<<<<<<<<< | |
7717 * n.copy(self.data, self.nbytes, reset=True) | |
7718 * return n | |
7719 */ | |
7720 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); | |
7721 __pyx_t_2 = ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))); __pyx_t_3 = NULL; | |
7722 __pyx_t_4 = 0; | |
7723 #if CYTHON_UNPACK_METHODS | |
7724 if (unlikely(PyMethod_Check(__pyx_t_2))) { | |
7725 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); | |
7726 if (likely(__pyx_t_3)) { | |
7727 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
7728 __Pyx_INCREF(__pyx_t_3); | |
7729 __Pyx_INCREF(function); | |
7730 __Pyx_DECREF_SET(__pyx_t_2, function); | |
7731 __pyx_t_4 = 1; | |
7732 } | |
7733 } | |
7734 #endif | |
7735 { | |
7736 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; | |
7737 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); | |
7738 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; | |
7739 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) | |
7740 __Pyx_GOTREF(__pyx_t_1); | |
7741 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
7742 } | |
7743 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_16libctabixproxies_TupleProxy))))) __PYX_ERR(0, 69, __pyx_L1_error) | |
7744 __pyx_v_n = ((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_t_1); | |
7745 __pyx_t_1 = 0; | |
7746 | |
7747 /* "pysam/libctabixproxies.pyx":70 | |
7748 * "copying modified tuples is not implemented") | |
7749 * cdef TupleProxy n = type(self)() | |
7750 * n.copy(self.data, self.nbytes, reset=True) # <<<<<<<<<<<<<< | |
7751 * return n | |
7752 * | |
7753 */ | |
7754 __pyx_t_5.__pyx_n = 1; | |
7755 __pyx_t_5.reset = 1; | |
7756 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_n->__pyx_vtab)->copy(__pyx_v_n, __pyx_v_self->data, __pyx_v_self->nbytes, &__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) | |
7757 __Pyx_GOTREF(__pyx_t_1); | |
7758 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
7759 | |
7760 /* "pysam/libctabixproxies.pyx":71 | |
7761 * cdef TupleProxy n = type(self)() | |
7762 * n.copy(self.data, self.nbytes, reset=True) | |
7763 * return n # <<<<<<<<<<<<<< | |
7764 * | |
7765 * def compare(self, TupleProxy other): | |
7766 */ | |
7767 __Pyx_XDECREF(__pyx_r); | |
7768 __Pyx_INCREF((PyObject *)__pyx_v_n); | |
7769 __pyx_r = ((PyObject *)__pyx_v_n); | |
7770 goto __pyx_L0; | |
7771 | |
7772 /* "pysam/libctabixproxies.pyx":65 | |
7773 * free(self.fields) | |
7774 * | |
7775 * def __copy__(self): # <<<<<<<<<<<<<< | |
7776 * if self.is_modified: | |
7777 * raise NotImplementedError( | |
7778 */ | |
7779 | |
7780 /* function exit code */ | |
7781 __pyx_L1_error:; | |
7782 __Pyx_XDECREF(__pyx_t_1); | |
7783 __Pyx_XDECREF(__pyx_t_2); | |
7784 __Pyx_XDECREF(__pyx_t_3); | |
7785 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.__copy__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
7786 __pyx_r = NULL; | |
7787 __pyx_L0:; | |
7788 __Pyx_XDECREF((PyObject *)__pyx_v_n); | |
7789 __Pyx_XGIVEREF(__pyx_r); | |
7790 __Pyx_RefNannyFinishContext(); | |
7791 return __pyx_r; | |
7792 } | |
7793 | |
7794 /* "pysam/libctabixproxies.pyx":73 | |
7795 * return n | |
7796 * | |
7797 * def compare(self, TupleProxy other): # <<<<<<<<<<<<<< | |
7798 * '''return -1,0,1, if contents in this are binary | |
7799 * <,=,> to *other* | |
7800 */ | |
7801 | |
7802 /* Python wrapper */ | |
7803 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_7compare(PyObject *__pyx_v_self, | |
7804 #if CYTHON_METH_FASTCALL | |
7805 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
7806 #else | |
7807 PyObject *__pyx_args, PyObject *__pyx_kwds | |
7808 #endif | |
7809 ); /*proto*/ | |
7810 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_10TupleProxy_6compare, "return -1,0,1, if contents in this are binary\n <,=,> to *other*\n\n "); | |
7811 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_7compare = {"compare", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_7compare, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_10TupleProxy_6compare}; | |
7812 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_7compare(PyObject *__pyx_v_self, | |
7813 #if CYTHON_METH_FASTCALL | |
7814 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
7815 #else | |
7816 PyObject *__pyx_args, PyObject *__pyx_kwds | |
7817 #endif | |
7818 ) { | |
7819 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_other = 0; | |
7820 #if !CYTHON_METH_FASTCALL | |
7821 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
7822 #endif | |
7823 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
7824 PyObject* values[1] = {0}; | |
7825 int __pyx_lineno = 0; | |
7826 const char *__pyx_filename = NULL; | |
7827 int __pyx_clineno = 0; | |
7828 PyObject *__pyx_r = 0; | |
7829 __Pyx_RefNannyDeclarations | |
7830 __Pyx_RefNannySetupContext("compare (wrapper)", 0); | |
7831 #if !CYTHON_METH_FASTCALL | |
7832 #if CYTHON_ASSUME_SAFE_MACROS | |
7833 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
7834 #else | |
7835 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
7836 #endif | |
7837 #endif | |
7838 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
7839 { | |
7840 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0}; | |
7841 if (__pyx_kwds) { | |
7842 Py_ssize_t kw_args; | |
7843 switch (__pyx_nargs) { | |
7844 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
7845 CYTHON_FALLTHROUGH; | |
7846 case 0: break; | |
7847 default: goto __pyx_L5_argtuple_error; | |
7848 } | |
7849 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
7850 switch (__pyx_nargs) { | |
7851 case 0: | |
7852 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_other)) != 0)) { | |
7853 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
7854 kw_args--; | |
7855 } | |
7856 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) | |
7857 else goto __pyx_L5_argtuple_error; | |
7858 } | |
7859 if (unlikely(kw_args > 0)) { | |
7860 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
7861 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "compare") < 0)) __PYX_ERR(0, 73, __pyx_L3_error) | |
7862 } | |
7863 } else if (unlikely(__pyx_nargs != 1)) { | |
7864 goto __pyx_L5_argtuple_error; | |
7865 } else { | |
7866 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
7867 } | |
7868 __pyx_v_other = ((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)values[0]); | |
7869 } | |
7870 goto __pyx_L6_skip; | |
7871 __pyx_L5_argtuple_error:; | |
7872 __Pyx_RaiseArgtupleInvalid("compare", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 73, __pyx_L3_error) | |
7873 __pyx_L6_skip:; | |
7874 goto __pyx_L4_argument_unpacking_done; | |
7875 __pyx_L3_error:; | |
7876 { | |
7877 Py_ssize_t __pyx_temp; | |
7878 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
7879 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
7880 } | |
7881 } | |
7882 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.compare", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
7883 __Pyx_RefNannyFinishContext(); | |
7884 return NULL; | |
7885 __pyx_L4_argument_unpacking_done:; | |
7886 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_16libctabixproxies_TupleProxy, 1, "other", 0))) __PYX_ERR(0, 73, __pyx_L1_error) | |
7887 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_6compare(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self), __pyx_v_other); | |
7888 | |
7889 /* function exit code */ | |
7890 goto __pyx_L0; | |
7891 __pyx_L1_error:; | |
7892 __pyx_r = NULL; | |
7893 __pyx_L0:; | |
7894 { | |
7895 Py_ssize_t __pyx_temp; | |
7896 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
7897 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
7898 } | |
7899 } | |
7900 __Pyx_RefNannyFinishContext(); | |
7901 return __pyx_r; | |
7902 } | |
7903 | |
7904 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_6compare(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_other) { | |
7905 PyObject *__pyx_r = NULL; | |
7906 __Pyx_RefNannyDeclarations | |
7907 int __pyx_t_1; | |
7908 PyObject *__pyx_t_2 = NULL; | |
7909 int __pyx_lineno = 0; | |
7910 const char *__pyx_filename = NULL; | |
7911 int __pyx_clineno = 0; | |
7912 __Pyx_RefNannySetupContext("compare", 1); | |
7913 | |
7914 /* "pysam/libctabixproxies.pyx":78 | |
7915 * | |
7916 * ''' | |
7917 * if self.is_modified or other.is_modified: # <<<<<<<<<<<<<< | |
7918 * raise NotImplementedError( | |
7919 * 'comparison of modified TupleProxies is not implemented') | |
7920 */ | |
7921 if (!__pyx_v_self->is_modified) { | |
7922 } else { | |
7923 __pyx_t_1 = __pyx_v_self->is_modified; | |
7924 goto __pyx_L4_bool_binop_done; | |
7925 } | |
7926 __pyx_t_1 = __pyx_v_other->is_modified; | |
7927 __pyx_L4_bool_binop_done:; | |
7928 if (unlikely(__pyx_t_1)) { | |
7929 | |
7930 /* "pysam/libctabixproxies.pyx":79 | |
7931 * ''' | |
7932 * if self.is_modified or other.is_modified: | |
7933 * raise NotImplementedError( # <<<<<<<<<<<<<< | |
7934 * 'comparison of modified TupleProxies is not implemented') | |
7935 * if self.data == other.data: | |
7936 */ | |
7937 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) | |
7938 __Pyx_GOTREF(__pyx_t_2); | |
7939 __Pyx_Raise(__pyx_t_2, 0, 0, 0); | |
7940 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
7941 __PYX_ERR(0, 79, __pyx_L1_error) | |
7942 | |
7943 /* "pysam/libctabixproxies.pyx":78 | |
7944 * | |
7945 * ''' | |
7946 * if self.is_modified or other.is_modified: # <<<<<<<<<<<<<< | |
7947 * raise NotImplementedError( | |
7948 * 'comparison of modified TupleProxies is not implemented') | |
7949 */ | |
7950 } | |
7951 | |
7952 /* "pysam/libctabixproxies.pyx":81 | |
7953 * raise NotImplementedError( | |
7954 * 'comparison of modified TupleProxies is not implemented') | |
7955 * if self.data == other.data: # <<<<<<<<<<<<<< | |
7956 * return 0 | |
7957 * | |
7958 */ | |
7959 __pyx_t_1 = (__pyx_v_self->data == __pyx_v_other->data); | |
7960 if (__pyx_t_1) { | |
7961 | |
7962 /* "pysam/libctabixproxies.pyx":82 | |
7963 * 'comparison of modified TupleProxies is not implemented') | |
7964 * if self.data == other.data: | |
7965 * return 0 # <<<<<<<<<<<<<< | |
7966 * | |
7967 * if self.nbytes < other.nbytes: | |
7968 */ | |
7969 __Pyx_XDECREF(__pyx_r); | |
7970 __Pyx_INCREF(__pyx_int_0); | |
7971 __pyx_r = __pyx_int_0; | |
7972 goto __pyx_L0; | |
7973 | |
7974 /* "pysam/libctabixproxies.pyx":81 | |
7975 * raise NotImplementedError( | |
7976 * 'comparison of modified TupleProxies is not implemented') | |
7977 * if self.data == other.data: # <<<<<<<<<<<<<< | |
7978 * return 0 | |
7979 * | |
7980 */ | |
7981 } | |
7982 | |
7983 /* "pysam/libctabixproxies.pyx":84 | |
7984 * return 0 | |
7985 * | |
7986 * if self.nbytes < other.nbytes: # <<<<<<<<<<<<<< | |
7987 * return -1 | |
7988 * elif self.nbytes > other.nbytes: | |
7989 */ | |
7990 __pyx_t_1 = (__pyx_v_self->nbytes < __pyx_v_other->nbytes); | |
7991 if (__pyx_t_1) { | |
7992 | |
7993 /* "pysam/libctabixproxies.pyx":85 | |
7994 * | |
7995 * if self.nbytes < other.nbytes: | |
7996 * return -1 # <<<<<<<<<<<<<< | |
7997 * elif self.nbytes > other.nbytes: | |
7998 * return 1 | |
7999 */ | |
8000 __Pyx_XDECREF(__pyx_r); | |
8001 __Pyx_INCREF(__pyx_int_neg_1); | |
8002 __pyx_r = __pyx_int_neg_1; | |
8003 goto __pyx_L0; | |
8004 | |
8005 /* "pysam/libctabixproxies.pyx":84 | |
8006 * return 0 | |
8007 * | |
8008 * if self.nbytes < other.nbytes: # <<<<<<<<<<<<<< | |
8009 * return -1 | |
8010 * elif self.nbytes > other.nbytes: | |
8011 */ | |
8012 } | |
8013 | |
8014 /* "pysam/libctabixproxies.pyx":86 | |
8015 * if self.nbytes < other.nbytes: | |
8016 * return -1 | |
8017 * elif self.nbytes > other.nbytes: # <<<<<<<<<<<<<< | |
8018 * return 1 | |
8019 * return memcmp(self.data, other.data, self.nbytes) | |
8020 */ | |
8021 __pyx_t_1 = (__pyx_v_self->nbytes > __pyx_v_other->nbytes); | |
8022 if (__pyx_t_1) { | |
8023 | |
8024 /* "pysam/libctabixproxies.pyx":87 | |
8025 * return -1 | |
8026 * elif self.nbytes > other.nbytes: | |
8027 * return 1 # <<<<<<<<<<<<<< | |
8028 * return memcmp(self.data, other.data, self.nbytes) | |
8029 * | |
8030 */ | |
8031 __Pyx_XDECREF(__pyx_r); | |
8032 __Pyx_INCREF(__pyx_int_1); | |
8033 __pyx_r = __pyx_int_1; | |
8034 goto __pyx_L0; | |
8035 | |
8036 /* "pysam/libctabixproxies.pyx":86 | |
8037 * if self.nbytes < other.nbytes: | |
8038 * return -1 | |
8039 * elif self.nbytes > other.nbytes: # <<<<<<<<<<<<<< | |
8040 * return 1 | |
8041 * return memcmp(self.data, other.data, self.nbytes) | |
8042 */ | |
8043 } | |
8044 | |
8045 /* "pysam/libctabixproxies.pyx":88 | |
8046 * elif self.nbytes > other.nbytes: | |
8047 * return 1 | |
8048 * return memcmp(self.data, other.data, self.nbytes) # <<<<<<<<<<<<<< | |
8049 * | |
8050 * def __richcmp__(self, TupleProxy other, int op): | |
8051 */ | |
8052 __Pyx_XDECREF(__pyx_r); | |
8053 __pyx_t_2 = __Pyx_PyInt_From_int(memcmp(__pyx_v_self->data, __pyx_v_other->data, __pyx_v_self->nbytes)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) | |
8054 __Pyx_GOTREF(__pyx_t_2); | |
8055 __pyx_r = __pyx_t_2; | |
8056 __pyx_t_2 = 0; | |
8057 goto __pyx_L0; | |
8058 | |
8059 /* "pysam/libctabixproxies.pyx":73 | |
8060 * return n | |
8061 * | |
8062 * def compare(self, TupleProxy other): # <<<<<<<<<<<<<< | |
8063 * '''return -1,0,1, if contents in this are binary | |
8064 * <,=,> to *other* | |
8065 */ | |
8066 | |
8067 /* function exit code */ | |
8068 __pyx_L1_error:; | |
8069 __Pyx_XDECREF(__pyx_t_2); | |
8070 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.compare", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
8071 __pyx_r = NULL; | |
8072 __pyx_L0:; | |
8073 __Pyx_XGIVEREF(__pyx_r); | |
8074 __Pyx_RefNannyFinishContext(); | |
8075 return __pyx_r; | |
8076 } | |
8077 | |
8078 /* "pysam/libctabixproxies.pyx":90 | |
8079 * return memcmp(self.data, other.data, self.nbytes) | |
8080 * | |
8081 * def __richcmp__(self, TupleProxy other, int op): # <<<<<<<<<<<<<< | |
8082 * if op == 2: # == operator | |
8083 * return self.compare(other) == 0 | |
8084 */ | |
8085 | |
8086 /* Python wrapper */ | |
8087 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_9__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ | |
8088 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_9__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { | |
8089 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
8090 int __pyx_lineno = 0; | |
8091 const char *__pyx_filename = NULL; | |
8092 int __pyx_clineno = 0; | |
8093 PyObject *__pyx_r = 0; | |
8094 __Pyx_RefNannyDeclarations | |
8095 __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); | |
8096 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
8097 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_16libctabixproxies_TupleProxy, 1, "other", 0))) __PYX_ERR(0, 90, __pyx_L1_error) | |
8098 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_8__richcmp__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self), ((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_other), ((int)__pyx_v_op)); | |
8099 | |
8100 /* function exit code */ | |
8101 goto __pyx_L0; | |
8102 __pyx_L1_error:; | |
8103 __pyx_r = NULL; | |
8104 __pyx_L0:; | |
8105 __Pyx_RefNannyFinishContext(); | |
8106 return __pyx_r; | |
8107 } | |
8108 | |
8109 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_8__richcmp__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_other, int __pyx_v_op) { | |
8110 PyObject *__pyx_v_err_msg = NULL; | |
8111 PyObject *__pyx_r = NULL; | |
8112 __Pyx_RefNannyDeclarations | |
8113 PyObject *__pyx_t_1 = NULL; | |
8114 PyObject *__pyx_t_2 = NULL; | |
8115 PyObject *__pyx_t_3 = NULL; | |
8116 unsigned int __pyx_t_4; | |
8117 PyObject *__pyx_t_5 = NULL; | |
8118 int __pyx_lineno = 0; | |
8119 const char *__pyx_filename = NULL; | |
8120 int __pyx_clineno = 0; | |
8121 __Pyx_RefNannySetupContext("__richcmp__", 1); | |
8122 | |
8123 /* "pysam/libctabixproxies.pyx":91 | |
8124 * | |
8125 * def __richcmp__(self, TupleProxy other, int op): | |
8126 * if op == 2: # == operator # <<<<<<<<<<<<<< | |
8127 * return self.compare(other) == 0 | |
8128 * elif op == 3: # != operator | |
8129 */ | |
8130 switch (__pyx_v_op) { | |
8131 case 2: | |
8132 | |
8133 /* "pysam/libctabixproxies.pyx":92 | |
8134 * def __richcmp__(self, TupleProxy other, int op): | |
8135 * if op == 2: # == operator | |
8136 * return self.compare(other) == 0 # <<<<<<<<<<<<<< | |
8137 * elif op == 3: # != operator | |
8138 * return self.compare(other) != 0 | |
8139 */ | |
8140 __Pyx_XDECREF(__pyx_r); | |
8141 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compare); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) | |
8142 __Pyx_GOTREF(__pyx_t_2); | |
8143 __pyx_t_3 = NULL; | |
8144 __pyx_t_4 = 0; | |
8145 #if CYTHON_UNPACK_METHODS | |
8146 if (likely(PyMethod_Check(__pyx_t_2))) { | |
8147 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); | |
8148 if (likely(__pyx_t_3)) { | |
8149 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
8150 __Pyx_INCREF(__pyx_t_3); | |
8151 __Pyx_INCREF(function); | |
8152 __Pyx_DECREF_SET(__pyx_t_2, function); | |
8153 __pyx_t_4 = 1; | |
8154 } | |
8155 } | |
8156 #endif | |
8157 { | |
8158 PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_other)}; | |
8159 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); | |
8160 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; | |
8161 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) | |
8162 __Pyx_GOTREF(__pyx_t_1); | |
8163 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
8164 } | |
8165 __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) | |
8166 __Pyx_GOTREF(__pyx_t_2); | |
8167 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
8168 __pyx_r = __pyx_t_2; | |
8169 __pyx_t_2 = 0; | |
8170 goto __pyx_L0; | |
8171 | |
8172 /* "pysam/libctabixproxies.pyx":91 | |
8173 * | |
8174 * def __richcmp__(self, TupleProxy other, int op): | |
8175 * if op == 2: # == operator # <<<<<<<<<<<<<< | |
8176 * return self.compare(other) == 0 | |
8177 * elif op == 3: # != operator | |
8178 */ | |
8179 break; | |
8180 case 3: | |
8181 | |
8182 /* "pysam/libctabixproxies.pyx":94 | |
8183 * return self.compare(other) == 0 | |
8184 * elif op == 3: # != operator | |
8185 * return self.compare(other) != 0 # <<<<<<<<<<<<<< | |
8186 * else: | |
8187 * err_msg = "op {0} isn't implemented yet".format(op) | |
8188 */ | |
8189 __Pyx_XDECREF(__pyx_r); | |
8190 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compare); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) | |
8191 __Pyx_GOTREF(__pyx_t_1); | |
8192 __pyx_t_3 = NULL; | |
8193 __pyx_t_4 = 0; | |
8194 #if CYTHON_UNPACK_METHODS | |
8195 if (likely(PyMethod_Check(__pyx_t_1))) { | |
8196 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); | |
8197 if (likely(__pyx_t_3)) { | |
8198 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); | |
8199 __Pyx_INCREF(__pyx_t_3); | |
8200 __Pyx_INCREF(function); | |
8201 __Pyx_DECREF_SET(__pyx_t_1, function); | |
8202 __pyx_t_4 = 1; | |
8203 } | |
8204 } | |
8205 #endif | |
8206 { | |
8207 PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_other)}; | |
8208 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); | |
8209 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; | |
8210 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) | |
8211 __Pyx_GOTREF(__pyx_t_2); | |
8212 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
8213 } | |
8214 __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) | |
8215 __Pyx_GOTREF(__pyx_t_1); | |
8216 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
8217 __pyx_r = __pyx_t_1; | |
8218 __pyx_t_1 = 0; | |
8219 goto __pyx_L0; | |
8220 | |
8221 /* "pysam/libctabixproxies.pyx":93 | |
8222 * if op == 2: # == operator | |
8223 * return self.compare(other) == 0 | |
8224 * elif op == 3: # != operator # <<<<<<<<<<<<<< | |
8225 * return self.compare(other) != 0 | |
8226 * else: | |
8227 */ | |
8228 break; | |
8229 default: | |
8230 | |
8231 /* "pysam/libctabixproxies.pyx":96 | |
8232 * return self.compare(other) != 0 | |
8233 * else: | |
8234 * err_msg = "op {0} isn't implemented yet".format(op) # <<<<<<<<<<<<<< | |
8235 * raise NotImplementedError(err_msg) | |
8236 * | |
8237 */ | |
8238 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_op_0_isn_t_implemented_yet, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) | |
8239 __Pyx_GOTREF(__pyx_t_2); | |
8240 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_op); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error) | |
8241 __Pyx_GOTREF(__pyx_t_3); | |
8242 __pyx_t_5 = NULL; | |
8243 __pyx_t_4 = 0; | |
8244 #if CYTHON_UNPACK_METHODS | |
8245 if (likely(PyMethod_Check(__pyx_t_2))) { | |
8246 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); | |
8247 if (likely(__pyx_t_5)) { | |
8248 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
8249 __Pyx_INCREF(__pyx_t_5); | |
8250 __Pyx_INCREF(function); | |
8251 __Pyx_DECREF_SET(__pyx_t_2, function); | |
8252 __pyx_t_4 = 1; | |
8253 } | |
8254 } | |
8255 #endif | |
8256 { | |
8257 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3}; | |
8258 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); | |
8259 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; | |
8260 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
8261 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) | |
8262 __Pyx_GOTREF(__pyx_t_1); | |
8263 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
8264 } | |
8265 __pyx_v_err_msg = __pyx_t_1; | |
8266 __pyx_t_1 = 0; | |
8267 | |
8268 /* "pysam/libctabixproxies.pyx":97 | |
8269 * else: | |
8270 * err_msg = "op {0} isn't implemented yet".format(op) | |
8271 * raise NotImplementedError(err_msg) # <<<<<<<<<<<<<< | |
8272 * | |
8273 * cdef take(self, char * buffer, size_t nbytes): | |
8274 */ | |
8275 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_v_err_msg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) | |
8276 __Pyx_GOTREF(__pyx_t_1); | |
8277 __Pyx_Raise(__pyx_t_1, 0, 0, 0); | |
8278 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
8279 __PYX_ERR(0, 97, __pyx_L1_error) | |
8280 break; | |
8281 } | |
8282 | |
8283 /* "pysam/libctabixproxies.pyx":90 | |
8284 * return memcmp(self.data, other.data, self.nbytes) | |
8285 * | |
8286 * def __richcmp__(self, TupleProxy other, int op): # <<<<<<<<<<<<<< | |
8287 * if op == 2: # == operator | |
8288 * return self.compare(other) == 0 | |
8289 */ | |
8290 | |
8291 /* function exit code */ | |
8292 __pyx_L1_error:; | |
8293 __Pyx_XDECREF(__pyx_t_1); | |
8294 __Pyx_XDECREF(__pyx_t_2); | |
8295 __Pyx_XDECREF(__pyx_t_3); | |
8296 __Pyx_XDECREF(__pyx_t_5); | |
8297 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
8298 __pyx_r = NULL; | |
8299 __pyx_L0:; | |
8300 __Pyx_XDECREF(__pyx_v_err_msg); | |
8301 __Pyx_XGIVEREF(__pyx_r); | |
8302 __Pyx_RefNannyFinishContext(); | |
8303 return __pyx_r; | |
8304 } | |
8305 | |
8306 /* "pysam/libctabixproxies.pyx":99 | |
8307 * raise NotImplementedError(err_msg) | |
8308 * | |
8309 * cdef take(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
8310 * '''start presenting buffer. | |
8311 * | |
8312 */ | |
8313 | |
8314 static PyObject *__pyx_f_5pysam_16libctabixproxies_10TupleProxy_take(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { | |
8315 PyObject *__pyx_r = NULL; | |
8316 __Pyx_RefNannyDeclarations | |
8317 PyObject *__pyx_t_1 = NULL; | |
8318 int __pyx_lineno = 0; | |
8319 const char *__pyx_filename = NULL; | |
8320 int __pyx_clineno = 0; | |
8321 __Pyx_RefNannySetupContext("take", 1); | |
8322 | |
8323 /* "pysam/libctabixproxies.pyx":104 | |
8324 * Take ownership of the pointer. | |
8325 * ''' | |
8326 * self.data = buffer # <<<<<<<<<<<<<< | |
8327 * self.nbytes = nbytes | |
8328 * self.update(buffer, nbytes) | |
8329 */ | |
8330 __pyx_v_self->data = __pyx_v_buffer; | |
8331 | |
8332 /* "pysam/libctabixproxies.pyx":105 | |
8333 * ''' | |
8334 * self.data = buffer | |
8335 * self.nbytes = nbytes # <<<<<<<<<<<<<< | |
8336 * self.update(buffer, nbytes) | |
8337 * | |
8338 */ | |
8339 __pyx_v_self->nbytes = __pyx_v_nbytes; | |
8340 | |
8341 /* "pysam/libctabixproxies.pyx":106 | |
8342 * self.data = buffer | |
8343 * self.nbytes = nbytes | |
8344 * self.update(buffer, nbytes) # <<<<<<<<<<<<<< | |
8345 * | |
8346 * cdef present(self, char * buffer, size_t nbytes): | |
8347 */ | |
8348 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) | |
8349 __Pyx_GOTREF(__pyx_t_1); | |
8350 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
8351 | |
8352 /* "pysam/libctabixproxies.pyx":99 | |
8353 * raise NotImplementedError(err_msg) | |
8354 * | |
8355 * cdef take(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
8356 * '''start presenting buffer. | |
8357 * | |
8358 */ | |
8359 | |
8360 /* function exit code */ | |
8361 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
8362 goto __pyx_L0; | |
8363 __pyx_L1_error:; | |
8364 __Pyx_XDECREF(__pyx_t_1); | |
8365 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.take", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
8366 __pyx_r = 0; | |
8367 __pyx_L0:; | |
8368 __Pyx_XGIVEREF(__pyx_r); | |
8369 __Pyx_RefNannyFinishContext(); | |
8370 return __pyx_r; | |
8371 } | |
8372 | |
8373 /* "pysam/libctabixproxies.pyx":108 | |
8374 * self.update(buffer, nbytes) | |
8375 * | |
8376 * cdef present(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
8377 * '''start presenting buffer. | |
8378 * | |
8379 */ | |
8380 | |
8381 static PyObject *__pyx_f_5pysam_16libctabixproxies_10TupleProxy_present(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { | |
8382 PyObject *__pyx_r = NULL; | |
8383 __Pyx_RefNannyDeclarations | |
8384 PyObject *__pyx_t_1 = NULL; | |
8385 int __pyx_lineno = 0; | |
8386 const char *__pyx_filename = NULL; | |
8387 int __pyx_clineno = 0; | |
8388 __Pyx_RefNannySetupContext("present", 1); | |
8389 | |
8390 /* "pysam/libctabixproxies.pyx":113 | |
8391 * Do not take ownership of the pointer. | |
8392 * ''' | |
8393 * self.update(buffer, nbytes) # <<<<<<<<<<<<<< | |
8394 * | |
8395 * cdef copy(self, char * buffer, size_t nbytes, bint reset=False): | |
8396 */ | |
8397 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) | |
8398 __Pyx_GOTREF(__pyx_t_1); | |
8399 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
8400 | |
8401 /* "pysam/libctabixproxies.pyx":108 | |
8402 * self.update(buffer, nbytes) | |
8403 * | |
8404 * cdef present(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
8405 * '''start presenting buffer. | |
8406 * | |
8407 */ | |
8408 | |
8409 /* function exit code */ | |
8410 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
8411 goto __pyx_L0; | |
8412 __pyx_L1_error:; | |
8413 __Pyx_XDECREF(__pyx_t_1); | |
8414 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.present", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
8415 __pyx_r = 0; | |
8416 __pyx_L0:; | |
8417 __Pyx_XGIVEREF(__pyx_r); | |
8418 __Pyx_RefNannyFinishContext(); | |
8419 return __pyx_r; | |
8420 } | |
8421 | |
8422 /* "pysam/libctabixproxies.pyx":115 | |
8423 * self.update(buffer, nbytes) | |
8424 * | |
8425 * cdef copy(self, char * buffer, size_t nbytes, bint reset=False): # <<<<<<<<<<<<<< | |
8426 * '''start presenting buffer of size *nbytes*. | |
8427 * | |
8428 */ | |
8429 | |
8430 static PyObject *__pyx_f_5pysam_16libctabixproxies_10TupleProxy_copy(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes, struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy *__pyx_optional_args) { | |
8431 int __pyx_v_reset = ((int)0); | |
8432 int __pyx_v_s; | |
8433 long __pyx_v_x; | |
8434 PyObject *__pyx_r = NULL; | |
8435 __Pyx_RefNannyDeclarations | |
8436 int __pyx_t_1; | |
8437 PyObject *__pyx_t_2 = NULL; | |
8438 size_t __pyx_t_3; | |
8439 int __pyx_lineno = 0; | |
8440 const char *__pyx_filename = NULL; | |
8441 int __pyx_clineno = 0; | |
8442 __Pyx_RefNannySetupContext("copy", 1); | |
8443 if (__pyx_optional_args) { | |
8444 if (__pyx_optional_args->__pyx_n > 0) { | |
8445 __pyx_v_reset = __pyx_optional_args->reset; | |
8446 } | |
8447 } | |
8448 | |
8449 /* "pysam/libctabixproxies.pyx":123 | |
8450 * ''' | |
8451 * # +1 for '\0' | |
8452 * cdef int s = sizeof(char) * (nbytes + 1) # <<<<<<<<<<<<<< | |
8453 * self.data = <char*>malloc(s) | |
8454 * if self.data == NULL: | |
8455 */ | |
8456 __pyx_v_s = ((sizeof(char)) * (__pyx_v_nbytes + 1)); | |
8457 | |
8458 /* "pysam/libctabixproxies.pyx":124 | |
8459 * # +1 for '\0' | |
8460 * cdef int s = sizeof(char) * (nbytes + 1) | |
8461 * self.data = <char*>malloc(s) # <<<<<<<<<<<<<< | |
8462 * if self.data == NULL: | |
8463 * raise ValueError("out of memory in TupleProxy.copy()") | |
8464 */ | |
8465 __pyx_v_self->data = ((char *)malloc(__pyx_v_s)); | |
8466 | |
8467 /* "pysam/libctabixproxies.pyx":125 | |
8468 * cdef int s = sizeof(char) * (nbytes + 1) | |
8469 * self.data = <char*>malloc(s) | |
8470 * if self.data == NULL: # <<<<<<<<<<<<<< | |
8471 * raise ValueError("out of memory in TupleProxy.copy()") | |
8472 * memcpy(<char*>self.data, buffer, s) | |
8473 */ | |
8474 __pyx_t_1 = (__pyx_v_self->data == NULL); | |
8475 if (unlikely(__pyx_t_1)) { | |
8476 | |
8477 /* "pysam/libctabixproxies.pyx":126 | |
8478 * self.data = <char*>malloc(s) | |
8479 * if self.data == NULL: | |
8480 * raise ValueError("out of memory in TupleProxy.copy()") # <<<<<<<<<<<<<< | |
8481 * memcpy(<char*>self.data, buffer, s) | |
8482 * | |
8483 */ | |
8484 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error) | |
8485 __Pyx_GOTREF(__pyx_t_2); | |
8486 __Pyx_Raise(__pyx_t_2, 0, 0, 0); | |
8487 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
8488 __PYX_ERR(0, 126, __pyx_L1_error) | |
8489 | |
8490 /* "pysam/libctabixproxies.pyx":125 | |
8491 * cdef int s = sizeof(char) * (nbytes + 1) | |
8492 * self.data = <char*>malloc(s) | |
8493 * if self.data == NULL: # <<<<<<<<<<<<<< | |
8494 * raise ValueError("out of memory in TupleProxy.copy()") | |
8495 * memcpy(<char*>self.data, buffer, s) | |
8496 */ | |
8497 } | |
8498 | |
8499 /* "pysam/libctabixproxies.pyx":127 | |
8500 * if self.data == NULL: | |
8501 * raise ValueError("out of memory in TupleProxy.copy()") | |
8502 * memcpy(<char*>self.data, buffer, s) # <<<<<<<<<<<<<< | |
8503 * | |
8504 * if reset: | |
8505 */ | |
8506 (void)(memcpy(((char *)__pyx_v_self->data), __pyx_v_buffer, __pyx_v_s)); | |
8507 | |
8508 /* "pysam/libctabixproxies.pyx":129 | |
8509 * memcpy(<char*>self.data, buffer, s) | |
8510 * | |
8511 * if reset: # <<<<<<<<<<<<<< | |
8512 * for x from 0 <= x < nbytes: | |
8513 * if self.data[x] == b'\0': | |
8514 */ | |
8515 if (__pyx_v_reset) { | |
8516 | |
8517 /* "pysam/libctabixproxies.pyx":130 | |
8518 * | |
8519 * if reset: | |
8520 * for x from 0 <= x < nbytes: # <<<<<<<<<<<<<< | |
8521 * if self.data[x] == b'\0': | |
8522 * self.data[x] = b'\t' | |
8523 */ | |
8524 __pyx_t_3 = __pyx_v_nbytes; | |
8525 for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) { | |
8526 | |
8527 /* "pysam/libctabixproxies.pyx":131 | |
8528 * if reset: | |
8529 * for x from 0 <= x < nbytes: | |
8530 * if self.data[x] == b'\0': # <<<<<<<<<<<<<< | |
8531 * self.data[x] = b'\t' | |
8532 * | |
8533 */ | |
8534 __pyx_t_1 = ((__pyx_v_self->data[__pyx_v_x]) == '\x00'); | |
8535 if (__pyx_t_1) { | |
8536 | |
8537 /* "pysam/libctabixproxies.pyx":132 | |
8538 * for x from 0 <= x < nbytes: | |
8539 * if self.data[x] == b'\0': | |
8540 * self.data[x] = b'\t' # <<<<<<<<<<<<<< | |
8541 * | |
8542 * self.update(self.data, nbytes) | |
8543 */ | |
8544 (__pyx_v_self->data[__pyx_v_x]) = '\t'; | |
8545 | |
8546 /* "pysam/libctabixproxies.pyx":131 | |
8547 * if reset: | |
8548 * for x from 0 <= x < nbytes: | |
8549 * if self.data[x] == b'\0': # <<<<<<<<<<<<<< | |
8550 * self.data[x] = b'\t' | |
8551 * | |
8552 */ | |
8553 } | |
8554 } | |
8555 | |
8556 /* "pysam/libctabixproxies.pyx":129 | |
8557 * memcpy(<char*>self.data, buffer, s) | |
8558 * | |
8559 * if reset: # <<<<<<<<<<<<<< | |
8560 * for x from 0 <= x < nbytes: | |
8561 * if self.data[x] == b'\0': | |
8562 */ | |
8563 } | |
8564 | |
8565 /* "pysam/libctabixproxies.pyx":134 | |
8566 * self.data[x] = b'\t' | |
8567 * | |
8568 * self.update(self.data, nbytes) # <<<<<<<<<<<<<< | |
8569 * | |
8570 * cpdef int getMinFields(self): | |
8571 */ | |
8572 __pyx_t_2 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_self->data, __pyx_v_nbytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) | |
8573 __Pyx_GOTREF(__pyx_t_2); | |
8574 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
8575 | |
8576 /* "pysam/libctabixproxies.pyx":115 | |
8577 * self.update(buffer, nbytes) | |
8578 * | |
8579 * cdef copy(self, char * buffer, size_t nbytes, bint reset=False): # <<<<<<<<<<<<<< | |
8580 * '''start presenting buffer of size *nbytes*. | |
8581 * | |
8582 */ | |
8583 | |
8584 /* function exit code */ | |
8585 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
8586 goto __pyx_L0; | |
8587 __pyx_L1_error:; | |
8588 __Pyx_XDECREF(__pyx_t_2); | |
8589 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
8590 __pyx_r = 0; | |
8591 __pyx_L0:; | |
8592 __Pyx_XGIVEREF(__pyx_r); | |
8593 __Pyx_RefNannyFinishContext(); | |
8594 return __pyx_r; | |
8595 } | |
8596 | |
8597 /* "pysam/libctabixproxies.pyx":136 | |
8598 * self.update(self.data, nbytes) | |
8599 * | |
8600 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
8601 * '''return minimum number of fields.''' | |
8602 * # 1 is not a valid tabix entry, but TupleProxy | |
8603 */ | |
8604 | |
8605 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_11getMinFields(PyObject *__pyx_v_self, | |
8606 #if CYTHON_METH_FASTCALL | |
8607 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
8608 #else | |
8609 PyObject *__pyx_args, PyObject *__pyx_kwds | |
8610 #endif | |
8611 ); /*proto*/ | |
8612 static int __pyx_f_5pysam_16libctabixproxies_10TupleProxy_getMinFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, int __pyx_skip_dispatch) { | |
8613 int __pyx_r; | |
8614 __Pyx_RefNannyDeclarations | |
8615 PyObject *__pyx_t_1 = NULL; | |
8616 PyObject *__pyx_t_2 = NULL; | |
8617 PyObject *__pyx_t_3 = NULL; | |
8618 PyObject *__pyx_t_4 = NULL; | |
8619 unsigned int __pyx_t_5; | |
8620 int __pyx_t_6; | |
8621 int __pyx_lineno = 0; | |
8622 const char *__pyx_filename = NULL; | |
8623 int __pyx_clineno = 0; | |
8624 __Pyx_RefNannySetupContext("getMinFields", 1); | |
8625 /* Check if called by wrapper */ | |
8626 if (unlikely(__pyx_skip_dispatch)) ; | |
8627 /* Check if overridden in Python */ | |
8628 else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { | |
8629 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
8630 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
8631 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { | |
8632 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
8633 #endif | |
8634 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMinFields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) | |
8635 __Pyx_GOTREF(__pyx_t_1); | |
8636 if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_11getMinFields)) { | |
8637 __Pyx_INCREF(__pyx_t_1); | |
8638 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; | |
8639 __pyx_t_5 = 0; | |
8640 #if CYTHON_UNPACK_METHODS | |
8641 if (unlikely(PyMethod_Check(__pyx_t_3))) { | |
8642 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); | |
8643 if (likely(__pyx_t_4)) { | |
8644 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
8645 __Pyx_INCREF(__pyx_t_4); | |
8646 __Pyx_INCREF(function); | |
8647 __Pyx_DECREF_SET(__pyx_t_3, function); | |
8648 __pyx_t_5 = 1; | |
8649 } | |
8650 } | |
8651 #endif | |
8652 { | |
8653 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; | |
8654 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); | |
8655 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
8656 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) | |
8657 __Pyx_GOTREF(__pyx_t_2); | |
8658 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
8659 } | |
8660 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L1_error) | |
8661 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
8662 __pyx_r = __pyx_t_6; | |
8663 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
8664 goto __pyx_L0; | |
8665 } | |
8666 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
8667 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
8668 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); | |
8669 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { | |
8670 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
8671 } | |
8672 #endif | |
8673 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
8674 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
8675 } | |
8676 #endif | |
8677 } | |
8678 | |
8679 /* "pysam/libctabixproxies.pyx":140 | |
8680 * # 1 is not a valid tabix entry, but TupleProxy | |
8681 * # could be more generic. | |
8682 * return 1 # <<<<<<<<<<<<<< | |
8683 * | |
8684 * cpdef int getMaxFields(self): | |
8685 */ | |
8686 __pyx_r = 1; | |
8687 goto __pyx_L0; | |
8688 | |
8689 /* "pysam/libctabixproxies.pyx":136 | |
8690 * self.update(self.data, nbytes) | |
8691 * | |
8692 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
8693 * '''return minimum number of fields.''' | |
8694 * # 1 is not a valid tabix entry, but TupleProxy | |
8695 */ | |
8696 | |
8697 /* function exit code */ | |
8698 __pyx_L1_error:; | |
8699 __Pyx_XDECREF(__pyx_t_1); | |
8700 __Pyx_XDECREF(__pyx_t_2); | |
8701 __Pyx_XDECREF(__pyx_t_3); | |
8702 __Pyx_XDECREF(__pyx_t_4); | |
8703 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.getMinFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
8704 __pyx_r = 0; | |
8705 __pyx_L0:; | |
8706 __Pyx_RefNannyFinishContext(); | |
8707 return __pyx_r; | |
8708 } | |
8709 | |
8710 /* Python wrapper */ | |
8711 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_11getMinFields(PyObject *__pyx_v_self, | |
8712 #if CYTHON_METH_FASTCALL | |
8713 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
8714 #else | |
8715 PyObject *__pyx_args, PyObject *__pyx_kwds | |
8716 #endif | |
8717 ); /*proto*/ | |
8718 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_10TupleProxy_10getMinFields, "return minimum number of fields."); | |
8719 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_11getMinFields = {"getMinFields", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_11getMinFields, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_10TupleProxy_10getMinFields}; | |
8720 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_11getMinFields(PyObject *__pyx_v_self, | |
8721 #if CYTHON_METH_FASTCALL | |
8722 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
8723 #else | |
8724 PyObject *__pyx_args, PyObject *__pyx_kwds | |
8725 #endif | |
8726 ) { | |
8727 #if !CYTHON_METH_FASTCALL | |
8728 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
8729 #endif | |
8730 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
8731 PyObject *__pyx_r = 0; | |
8732 __Pyx_RefNannyDeclarations | |
8733 __Pyx_RefNannySetupContext("getMinFields (wrapper)", 0); | |
8734 #if !CYTHON_METH_FASTCALL | |
8735 #if CYTHON_ASSUME_SAFE_MACROS | |
8736 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
8737 #else | |
8738 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
8739 #endif | |
8740 #endif | |
8741 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
8742 if (unlikely(__pyx_nargs > 0)) { | |
8743 __Pyx_RaiseArgtupleInvalid("getMinFields", 1, 0, 0, __pyx_nargs); return NULL;} | |
8744 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMinFields", 0))) return NULL; | |
8745 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_10getMinFields(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self)); | |
8746 | |
8747 /* function exit code */ | |
8748 __Pyx_RefNannyFinishContext(); | |
8749 return __pyx_r; | |
8750 } | |
8751 | |
8752 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_10getMinFields(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self) { | |
8753 PyObject *__pyx_r = NULL; | |
8754 __Pyx_RefNannyDeclarations | |
8755 int __pyx_t_1; | |
8756 PyObject *__pyx_t_2 = NULL; | |
8757 int __pyx_lineno = 0; | |
8758 const char *__pyx_filename = NULL; | |
8759 int __pyx_clineno = 0; | |
8760 __Pyx_RefNannySetupContext("getMinFields", 1); | |
8761 __Pyx_XDECREF(__pyx_r); | |
8762 __pyx_t_1 = __pyx_f_5pysam_16libctabixproxies_10TupleProxy_getMinFields(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L1_error) | |
8763 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) | |
8764 __Pyx_GOTREF(__pyx_t_2); | |
8765 __pyx_r = __pyx_t_2; | |
8766 __pyx_t_2 = 0; | |
8767 goto __pyx_L0; | |
8768 | |
8769 /* function exit code */ | |
8770 __pyx_L1_error:; | |
8771 __Pyx_XDECREF(__pyx_t_2); | |
8772 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.getMinFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
8773 __pyx_r = NULL; | |
8774 __pyx_L0:; | |
8775 __Pyx_XGIVEREF(__pyx_r); | |
8776 __Pyx_RefNannyFinishContext(); | |
8777 return __pyx_r; | |
8778 } | |
8779 | |
8780 /* "pysam/libctabixproxies.pyx":142 | |
8781 * return 1 | |
8782 * | |
8783 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
8784 * '''return maximum number of fields. Return | |
8785 * 0 for unknown length.''' | |
8786 */ | |
8787 | |
8788 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_13getMaxFields(PyObject *__pyx_v_self, | |
8789 #if CYTHON_METH_FASTCALL | |
8790 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
8791 #else | |
8792 PyObject *__pyx_args, PyObject *__pyx_kwds | |
8793 #endif | |
8794 ); /*proto*/ | |
8795 static int __pyx_f_5pysam_16libctabixproxies_10TupleProxy_getMaxFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, int __pyx_skip_dispatch) { | |
8796 int __pyx_r; | |
8797 __Pyx_RefNannyDeclarations | |
8798 PyObject *__pyx_t_1 = NULL; | |
8799 PyObject *__pyx_t_2 = NULL; | |
8800 PyObject *__pyx_t_3 = NULL; | |
8801 PyObject *__pyx_t_4 = NULL; | |
8802 unsigned int __pyx_t_5; | |
8803 int __pyx_t_6; | |
8804 int __pyx_lineno = 0; | |
8805 const char *__pyx_filename = NULL; | |
8806 int __pyx_clineno = 0; | |
8807 __Pyx_RefNannySetupContext("getMaxFields", 1); | |
8808 /* Check if called by wrapper */ | |
8809 if (unlikely(__pyx_skip_dispatch)) ; | |
8810 /* Check if overridden in Python */ | |
8811 else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { | |
8812 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
8813 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
8814 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { | |
8815 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
8816 #endif | |
8817 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMaxFields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) | |
8818 __Pyx_GOTREF(__pyx_t_1); | |
8819 if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_13getMaxFields)) { | |
8820 __Pyx_INCREF(__pyx_t_1); | |
8821 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; | |
8822 __pyx_t_5 = 0; | |
8823 #if CYTHON_UNPACK_METHODS | |
8824 if (unlikely(PyMethod_Check(__pyx_t_3))) { | |
8825 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); | |
8826 if (likely(__pyx_t_4)) { | |
8827 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
8828 __Pyx_INCREF(__pyx_t_4); | |
8829 __Pyx_INCREF(function); | |
8830 __Pyx_DECREF_SET(__pyx_t_3, function); | |
8831 __pyx_t_5 = 1; | |
8832 } | |
8833 } | |
8834 #endif | |
8835 { | |
8836 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; | |
8837 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); | |
8838 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
8839 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) | |
8840 __Pyx_GOTREF(__pyx_t_2); | |
8841 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
8842 } | |
8843 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L1_error) | |
8844 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
8845 __pyx_r = __pyx_t_6; | |
8846 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
8847 goto __pyx_L0; | |
8848 } | |
8849 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
8850 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
8851 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); | |
8852 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { | |
8853 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
8854 } | |
8855 #endif | |
8856 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
8857 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
8858 } | |
8859 #endif | |
8860 } | |
8861 | |
8862 /* "pysam/libctabixproxies.pyx":145 | |
8863 * '''return maximum number of fields. Return | |
8864 * 0 for unknown length.''' | |
8865 * return 0 # <<<<<<<<<<<<<< | |
8866 * | |
8867 * cdef update(self, char * buffer, size_t nbytes): | |
8868 */ | |
8869 __pyx_r = 0; | |
8870 goto __pyx_L0; | |
8871 | |
8872 /* "pysam/libctabixproxies.pyx":142 | |
8873 * return 1 | |
8874 * | |
8875 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
8876 * '''return maximum number of fields. Return | |
8877 * 0 for unknown length.''' | |
8878 */ | |
8879 | |
8880 /* function exit code */ | |
8881 __pyx_L1_error:; | |
8882 __Pyx_XDECREF(__pyx_t_1); | |
8883 __Pyx_XDECREF(__pyx_t_2); | |
8884 __Pyx_XDECREF(__pyx_t_3); | |
8885 __Pyx_XDECREF(__pyx_t_4); | |
8886 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.getMaxFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
8887 __pyx_r = 0; | |
8888 __pyx_L0:; | |
8889 __Pyx_RefNannyFinishContext(); | |
8890 return __pyx_r; | |
8891 } | |
8892 | |
8893 /* Python wrapper */ | |
8894 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_13getMaxFields(PyObject *__pyx_v_self, | |
8895 #if CYTHON_METH_FASTCALL | |
8896 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
8897 #else | |
8898 PyObject *__pyx_args, PyObject *__pyx_kwds | |
8899 #endif | |
8900 ); /*proto*/ | |
8901 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_10TupleProxy_12getMaxFields, "return maximum number of fields. Return \n 0 for unknown length."); | |
8902 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_13getMaxFields = {"getMaxFields", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_13getMaxFields, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_10TupleProxy_12getMaxFields}; | |
8903 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_13getMaxFields(PyObject *__pyx_v_self, | |
8904 #if CYTHON_METH_FASTCALL | |
8905 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
8906 #else | |
8907 PyObject *__pyx_args, PyObject *__pyx_kwds | |
8908 #endif | |
8909 ) { | |
8910 #if !CYTHON_METH_FASTCALL | |
8911 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
8912 #endif | |
8913 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
8914 PyObject *__pyx_r = 0; | |
8915 __Pyx_RefNannyDeclarations | |
8916 __Pyx_RefNannySetupContext("getMaxFields (wrapper)", 0); | |
8917 #if !CYTHON_METH_FASTCALL | |
8918 #if CYTHON_ASSUME_SAFE_MACROS | |
8919 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
8920 #else | |
8921 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
8922 #endif | |
8923 #endif | |
8924 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
8925 if (unlikely(__pyx_nargs > 0)) { | |
8926 __Pyx_RaiseArgtupleInvalid("getMaxFields", 1, 0, 0, __pyx_nargs); return NULL;} | |
8927 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMaxFields", 0))) return NULL; | |
8928 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_12getMaxFields(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self)); | |
8929 | |
8930 /* function exit code */ | |
8931 __Pyx_RefNannyFinishContext(); | |
8932 return __pyx_r; | |
8933 } | |
8934 | |
8935 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_12getMaxFields(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self) { | |
8936 PyObject *__pyx_r = NULL; | |
8937 __Pyx_RefNannyDeclarations | |
8938 int __pyx_t_1; | |
8939 PyObject *__pyx_t_2 = NULL; | |
8940 int __pyx_lineno = 0; | |
8941 const char *__pyx_filename = NULL; | |
8942 int __pyx_clineno = 0; | |
8943 __Pyx_RefNannySetupContext("getMaxFields", 1); | |
8944 __Pyx_XDECREF(__pyx_r); | |
8945 __pyx_t_1 = __pyx_f_5pysam_16libctabixproxies_10TupleProxy_getMaxFields(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L1_error) | |
8946 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) | |
8947 __Pyx_GOTREF(__pyx_t_2); | |
8948 __pyx_r = __pyx_t_2; | |
8949 __pyx_t_2 = 0; | |
8950 goto __pyx_L0; | |
8951 | |
8952 /* function exit code */ | |
8953 __pyx_L1_error:; | |
8954 __Pyx_XDECREF(__pyx_t_2); | |
8955 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.getMaxFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
8956 __pyx_r = NULL; | |
8957 __pyx_L0:; | |
8958 __Pyx_XGIVEREF(__pyx_r); | |
8959 __Pyx_RefNannyFinishContext(); | |
8960 return __pyx_r; | |
8961 } | |
8962 | |
8963 /* "pysam/libctabixproxies.pyx":147 | |
8964 * return 0 | |
8965 * | |
8966 * cdef update(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
8967 * '''update internal data. | |
8968 * | |
8969 */ | |
8970 | |
8971 static PyObject *__pyx_f_5pysam_16libctabixproxies_10TupleProxy_update(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { | |
8972 char *__pyx_v_pos; | |
8973 char *__pyx_v_old_pos; | |
8974 int __pyx_v_field; | |
8975 int __pyx_v_max_fields; | |
8976 int __pyx_v_x; | |
8977 PyObject *__pyx_r = NULL; | |
8978 __Pyx_RefNannyDeclarations | |
8979 int __pyx_t_1; | |
8980 PyObject *__pyx_t_2 = NULL; | |
8981 PyObject *__pyx_t_3 = NULL; | |
8982 PyObject *__pyx_t_4 = NULL; | |
8983 int __pyx_t_5; | |
8984 int __pyx_t_6; | |
8985 int __pyx_t_7; | |
8986 size_t __pyx_t_8; | |
8987 int __pyx_lineno = 0; | |
8988 const char *__pyx_filename = NULL; | |
8989 int __pyx_clineno = 0; | |
8990 __Pyx_RefNannySetupContext("update", 1); | |
8991 | |
8992 /* "pysam/libctabixproxies.pyx":168 | |
8993 * cdef int max_fields, min_fields, x | |
8994 * | |
8995 * assert strlen(buffer) == nbytes, \ # <<<<<<<<<<<<<< | |
8996 * "length of buffer (%i) != number of bytes (%i)" % ( | |
8997 * strlen(buffer), nbytes) | |
8998 */ | |
8999 #ifndef CYTHON_WITHOUT_ASSERTIONS | |
9000 if (unlikely(__pyx_assertions_enabled())) { | |
9001 __pyx_t_1 = (strlen(__pyx_v_buffer) == __pyx_v_nbytes); | |
9002 if (unlikely(!__pyx_t_1)) { | |
9003 | |
9004 /* "pysam/libctabixproxies.pyx":170 | |
9005 * assert strlen(buffer) == nbytes, \ | |
9006 * "length of buffer (%i) != number of bytes (%i)" % ( | |
9007 * strlen(buffer), nbytes) # <<<<<<<<<<<<<< | |
9008 * | |
9009 * if buffer[nbytes] != 0: | |
9010 */ | |
9011 __pyx_t_2 = __Pyx_PyInt_FromSize_t(strlen(__pyx_v_buffer)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) | |
9012 __Pyx_GOTREF(__pyx_t_2); | |
9013 __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_nbytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error) | |
9014 __Pyx_GOTREF(__pyx_t_3); | |
9015 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error) | |
9016 __Pyx_GOTREF(__pyx_t_4); | |
9017 __Pyx_GIVEREF(__pyx_t_2); | |
9018 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error); | |
9019 __Pyx_GIVEREF(__pyx_t_3); | |
9020 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error); | |
9021 __pyx_t_2 = 0; | |
9022 __pyx_t_3 = 0; | |
9023 | |
9024 /* "pysam/libctabixproxies.pyx":169 | |
9025 * | |
9026 * assert strlen(buffer) == nbytes, \ | |
9027 * "length of buffer (%i) != number of bytes (%i)" % ( # <<<<<<<<<<<<<< | |
9028 * strlen(buffer), nbytes) | |
9029 * | |
9030 */ | |
9031 __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_length_of_buffer_i_number_of_byt, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) | |
9032 __Pyx_GOTREF(__pyx_t_3); | |
9033 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
9034 __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_t_3, 0, 0); | |
9035 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
9036 __PYX_ERR(0, 168, __pyx_L1_error) | |
9037 } | |
9038 } | |
9039 #else | |
9040 if ((1)); else __PYX_ERR(0, 168, __pyx_L1_error) | |
9041 #endif | |
9042 | |
9043 /* "pysam/libctabixproxies.pyx":172 | |
9044 * strlen(buffer), nbytes) | |
9045 * | |
9046 * if buffer[nbytes] != 0: # <<<<<<<<<<<<<< | |
9047 * raise ValueError("incomplete line at %s" % buffer) | |
9048 * | |
9049 */ | |
9050 __pyx_t_1 = ((__pyx_v_buffer[__pyx_v_nbytes]) != 0); | |
9051 if (unlikely(__pyx_t_1)) { | |
9052 | |
9053 /* "pysam/libctabixproxies.pyx":173 | |
9054 * | |
9055 * if buffer[nbytes] != 0: | |
9056 * raise ValueError("incomplete line at %s" % buffer) # <<<<<<<<<<<<<< | |
9057 * | |
9058 * ################################# | |
9059 */ | |
9060 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) | |
9061 __Pyx_GOTREF(__pyx_t_3); | |
9062 __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_incomplete_line_at_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error) | |
9063 __Pyx_GOTREF(__pyx_t_4); | |
9064 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
9065 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) | |
9066 __Pyx_GOTREF(__pyx_t_3); | |
9067 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
9068 __Pyx_Raise(__pyx_t_3, 0, 0, 0); | |
9069 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
9070 __PYX_ERR(0, 173, __pyx_L1_error) | |
9071 | |
9072 /* "pysam/libctabixproxies.pyx":172 | |
9073 * strlen(buffer), nbytes) | |
9074 * | |
9075 * if buffer[nbytes] != 0: # <<<<<<<<<<<<<< | |
9076 * raise ValueError("incomplete line at %s" % buffer) | |
9077 * | |
9078 */ | |
9079 } | |
9080 | |
9081 /* "pysam/libctabixproxies.pyx":177 | |
9082 * ################################# | |
9083 * # remove line breaks and feeds and update number of bytes | |
9084 * x = nbytes - 1 # <<<<<<<<<<<<<< | |
9085 * while x > 0 and (buffer[x] == b'\n' or buffer[x] == b'\r'): | |
9086 * buffer[x] = b'\0' | |
9087 */ | |
9088 __pyx_v_x = (__pyx_v_nbytes - 1); | |
9089 | |
9090 /* "pysam/libctabixproxies.pyx":178 | |
9091 * # remove line breaks and feeds and update number of bytes | |
9092 * x = nbytes - 1 | |
9093 * while x > 0 and (buffer[x] == b'\n' or buffer[x] == b'\r'): # <<<<<<<<<<<<<< | |
9094 * buffer[x] = b'\0' | |
9095 * x -= 1 | |
9096 */ | |
9097 while (1) { | |
9098 __pyx_t_5 = (__pyx_v_x > 0); | |
9099 if (__pyx_t_5) { | |
9100 } else { | |
9101 __pyx_t_1 = __pyx_t_5; | |
9102 goto __pyx_L6_bool_binop_done; | |
9103 } | |
9104 __pyx_t_5 = ((__pyx_v_buffer[__pyx_v_x]) == '\n'); | |
9105 if (!__pyx_t_5) { | |
9106 } else { | |
9107 __pyx_t_1 = __pyx_t_5; | |
9108 goto __pyx_L6_bool_binop_done; | |
9109 } | |
9110 __pyx_t_5 = ((__pyx_v_buffer[__pyx_v_x]) == '\r'); | |
9111 __pyx_t_1 = __pyx_t_5; | |
9112 __pyx_L6_bool_binop_done:; | |
9113 if (!__pyx_t_1) break; | |
9114 | |
9115 /* "pysam/libctabixproxies.pyx":179 | |
9116 * x = nbytes - 1 | |
9117 * while x > 0 and (buffer[x] == b'\n' or buffer[x] == b'\r'): | |
9118 * buffer[x] = b'\0' # <<<<<<<<<<<<<< | |
9119 * x -= 1 | |
9120 * self.nbytes = x + 1 | |
9121 */ | |
9122 (__pyx_v_buffer[__pyx_v_x]) = '\x00'; | |
9123 | |
9124 /* "pysam/libctabixproxies.pyx":180 | |
9125 * while x > 0 and (buffer[x] == b'\n' or buffer[x] == b'\r'): | |
9126 * buffer[x] = b'\0' | |
9127 * x -= 1 # <<<<<<<<<<<<<< | |
9128 * self.nbytes = x + 1 | |
9129 * | |
9130 */ | |
9131 __pyx_v_x = (__pyx_v_x - 1); | |
9132 } | |
9133 | |
9134 /* "pysam/libctabixproxies.pyx":181 | |
9135 * buffer[x] = b'\0' | |
9136 * x -= 1 | |
9137 * self.nbytes = x + 1 # <<<<<<<<<<<<<< | |
9138 * | |
9139 * ################################# | |
9140 */ | |
9141 __pyx_v_self->nbytes = (__pyx_v_x + 1); | |
9142 | |
9143 /* "pysam/libctabixproxies.pyx":185 | |
9144 * ################################# | |
9145 * # clear data | |
9146 * if self.fields != NULL: # <<<<<<<<<<<<<< | |
9147 * free(self.fields) | |
9148 * | |
9149 */ | |
9150 __pyx_t_1 = (__pyx_v_self->fields != NULL); | |
9151 if (__pyx_t_1) { | |
9152 | |
9153 /* "pysam/libctabixproxies.pyx":186 | |
9154 * # clear data | |
9155 * if self.fields != NULL: | |
9156 * free(self.fields) # <<<<<<<<<<<<<< | |
9157 * | |
9158 * for field from 0 <= field < self.nfields: | |
9159 */ | |
9160 free(__pyx_v_self->fields); | |
9161 | |
9162 /* "pysam/libctabixproxies.pyx":185 | |
9163 * ################################# | |
9164 * # clear data | |
9165 * if self.fields != NULL: # <<<<<<<<<<<<<< | |
9166 * free(self.fields) | |
9167 * | |
9168 */ | |
9169 } | |
9170 | |
9171 /* "pysam/libctabixproxies.pyx":188 | |
9172 * free(self.fields) | |
9173 * | |
9174 * for field from 0 <= field < self.nfields: # <<<<<<<<<<<<<< | |
9175 * if isNew(self.fields[field], self.data, self.nbytes): | |
9176 * free(self.fields[field]) | |
9177 */ | |
9178 __pyx_t_6 = __pyx_v_self->nfields; | |
9179 for (__pyx_v_field = 0; __pyx_v_field < __pyx_t_6; __pyx_v_field++) { | |
9180 | |
9181 /* "pysam/libctabixproxies.pyx":189 | |
9182 * | |
9183 * for field from 0 <= field < self.nfields: | |
9184 * if isNew(self.fields[field], self.data, self.nbytes): # <<<<<<<<<<<<<< | |
9185 * free(self.fields[field]) | |
9186 * | |
9187 */ | |
9188 __pyx_t_7 = __pyx_f_5pysam_16libctabixproxies_isNew((__pyx_v_self->fields[__pyx_v_field]), __pyx_v_self->data, __pyx_v_self->nbytes); if (unlikely(__pyx_t_7 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L1_error) | |
9189 __pyx_t_1 = (__pyx_t_7 != 0); | |
9190 if (__pyx_t_1) { | |
9191 | |
9192 /* "pysam/libctabixproxies.pyx":190 | |
9193 * for field from 0 <= field < self.nfields: | |
9194 * if isNew(self.fields[field], self.data, self.nbytes): | |
9195 * free(self.fields[field]) # <<<<<<<<<<<<<< | |
9196 * | |
9197 * self.is_modified = self.nfields = 0 | |
9198 */ | |
9199 free((__pyx_v_self->fields[__pyx_v_field])); | |
9200 | |
9201 /* "pysam/libctabixproxies.pyx":189 | |
9202 * | |
9203 * for field from 0 <= field < self.nfields: | |
9204 * if isNew(self.fields[field], self.data, self.nbytes): # <<<<<<<<<<<<<< | |
9205 * free(self.fields[field]) | |
9206 * | |
9207 */ | |
9208 } | |
9209 } | |
9210 | |
9211 /* "pysam/libctabixproxies.pyx":192 | |
9212 * free(self.fields[field]) | |
9213 * | |
9214 * self.is_modified = self.nfields = 0 # <<<<<<<<<<<<<< | |
9215 * | |
9216 * ################################# | |
9217 */ | |
9218 __pyx_v_self->is_modified = 0; | |
9219 __pyx_v_self->nfields = 0; | |
9220 | |
9221 /* "pysam/libctabixproxies.pyx":196 | |
9222 * ################################# | |
9223 * # allocate new | |
9224 * max_fields = self.getMaxFields() # <<<<<<<<<<<<<< | |
9225 * # pre-count fields - better would be | |
9226 * # to guess or dynamically grow | |
9227 */ | |
9228 __pyx_t_6 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->getMaxFields(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 196, __pyx_L1_error) | |
9229 __pyx_v_max_fields = __pyx_t_6; | |
9230 | |
9231 /* "pysam/libctabixproxies.pyx":199 | |
9232 * # pre-count fields - better would be | |
9233 * # to guess or dynamically grow | |
9234 * if max_fields == 0: # <<<<<<<<<<<<<< | |
9235 * for x from 0 <= x < nbytes: | |
9236 * if buffer[x] == b'\t': | |
9237 */ | |
9238 __pyx_t_1 = (__pyx_v_max_fields == 0); | |
9239 if (__pyx_t_1) { | |
9240 | |
9241 /* "pysam/libctabixproxies.pyx":200 | |
9242 * # to guess or dynamically grow | |
9243 * if max_fields == 0: | |
9244 * for x from 0 <= x < nbytes: # <<<<<<<<<<<<<< | |
9245 * if buffer[x] == b'\t': | |
9246 * max_fields += 1 | |
9247 */ | |
9248 __pyx_t_8 = __pyx_v_nbytes; | |
9249 for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_8; __pyx_v_x++) { | |
9250 | |
9251 /* "pysam/libctabixproxies.pyx":201 | |
9252 * if max_fields == 0: | |
9253 * for x from 0 <= x < nbytes: | |
9254 * if buffer[x] == b'\t': # <<<<<<<<<<<<<< | |
9255 * max_fields += 1 | |
9256 * max_fields += 1 | |
9257 */ | |
9258 __pyx_t_1 = ((__pyx_v_buffer[__pyx_v_x]) == '\t'); | |
9259 if (__pyx_t_1) { | |
9260 | |
9261 /* "pysam/libctabixproxies.pyx":202 | |
9262 * for x from 0 <= x < nbytes: | |
9263 * if buffer[x] == b'\t': | |
9264 * max_fields += 1 # <<<<<<<<<<<<<< | |
9265 * max_fields += 1 | |
9266 * | |
9267 */ | |
9268 __pyx_v_max_fields = (__pyx_v_max_fields + 1); | |
9269 | |
9270 /* "pysam/libctabixproxies.pyx":201 | |
9271 * if max_fields == 0: | |
9272 * for x from 0 <= x < nbytes: | |
9273 * if buffer[x] == b'\t': # <<<<<<<<<<<<<< | |
9274 * max_fields += 1 | |
9275 * max_fields += 1 | |
9276 */ | |
9277 } | |
9278 } | |
9279 | |
9280 /* "pysam/libctabixproxies.pyx":203 | |
9281 * if buffer[x] == b'\t': | |
9282 * max_fields += 1 | |
9283 * max_fields += 1 # <<<<<<<<<<<<<< | |
9284 * | |
9285 * self.fields = <char **>calloc(max_fields, sizeof(char *)) | |
9286 */ | |
9287 __pyx_v_max_fields = (__pyx_v_max_fields + 1); | |
9288 | |
9289 /* "pysam/libctabixproxies.pyx":199 | |
9290 * # pre-count fields - better would be | |
9291 * # to guess or dynamically grow | |
9292 * if max_fields == 0: # <<<<<<<<<<<<<< | |
9293 * for x from 0 <= x < nbytes: | |
9294 * if buffer[x] == b'\t': | |
9295 */ | |
9296 } | |
9297 | |
9298 /* "pysam/libctabixproxies.pyx":205 | |
9299 * max_fields += 1 | |
9300 * | |
9301 * self.fields = <char **>calloc(max_fields, sizeof(char *)) # <<<<<<<<<<<<<< | |
9302 * if self.fields == NULL: | |
9303 * raise ValueError("out of memory in TupleProxy.update()") | |
9304 */ | |
9305 __pyx_v_self->fields = ((char **)calloc(__pyx_v_max_fields, (sizeof(char *)))); | |
9306 | |
9307 /* "pysam/libctabixproxies.pyx":206 | |
9308 * | |
9309 * self.fields = <char **>calloc(max_fields, sizeof(char *)) | |
9310 * if self.fields == NULL: # <<<<<<<<<<<<<< | |
9311 * raise ValueError("out of memory in TupleProxy.update()") | |
9312 * | |
9313 */ | |
9314 __pyx_t_1 = (__pyx_v_self->fields == NULL); | |
9315 if (unlikely(__pyx_t_1)) { | |
9316 | |
9317 /* "pysam/libctabixproxies.pyx":207 | |
9318 * self.fields = <char **>calloc(max_fields, sizeof(char *)) | |
9319 * if self.fields == NULL: | |
9320 * raise ValueError("out of memory in TupleProxy.update()") # <<<<<<<<<<<<<< | |
9321 * | |
9322 * ################################# | |
9323 */ | |
9324 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error) | |
9325 __Pyx_GOTREF(__pyx_t_3); | |
9326 __Pyx_Raise(__pyx_t_3, 0, 0, 0); | |
9327 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
9328 __PYX_ERR(0, 207, __pyx_L1_error) | |
9329 | |
9330 /* "pysam/libctabixproxies.pyx":206 | |
9331 * | |
9332 * self.fields = <char **>calloc(max_fields, sizeof(char *)) | |
9333 * if self.fields == NULL: # <<<<<<<<<<<<<< | |
9334 * raise ValueError("out of memory in TupleProxy.update()") | |
9335 * | |
9336 */ | |
9337 } | |
9338 | |
9339 /* "pysam/libctabixproxies.pyx":211 | |
9340 * ################################# | |
9341 * # start filling | |
9342 * field = 0 # <<<<<<<<<<<<<< | |
9343 * self.fields[field] = pos = buffer | |
9344 * field += 1 | |
9345 */ | |
9346 __pyx_v_field = 0; | |
9347 | |
9348 /* "pysam/libctabixproxies.pyx":212 | |
9349 * # start filling | |
9350 * field = 0 | |
9351 * self.fields[field] = pos = buffer # <<<<<<<<<<<<<< | |
9352 * field += 1 | |
9353 * old_pos = pos | |
9354 */ | |
9355 (__pyx_v_self->fields[__pyx_v_field]) = __pyx_v_buffer; | |
9356 __pyx_v_pos = __pyx_v_buffer; | |
9357 | |
9358 /* "pysam/libctabixproxies.pyx":213 | |
9359 * field = 0 | |
9360 * self.fields[field] = pos = buffer | |
9361 * field += 1 # <<<<<<<<<<<<<< | |
9362 * old_pos = pos | |
9363 * while 1: | |
9364 */ | |
9365 __pyx_v_field = (__pyx_v_field + 1); | |
9366 | |
9367 /* "pysam/libctabixproxies.pyx":214 | |
9368 * self.fields[field] = pos = buffer | |
9369 * field += 1 | |
9370 * old_pos = pos # <<<<<<<<<<<<<< | |
9371 * while 1: | |
9372 * | |
9373 */ | |
9374 __pyx_v_old_pos = __pyx_v_pos; | |
9375 | |
9376 /* "pysam/libctabixproxies.pyx":215 | |
9377 * field += 1 | |
9378 * old_pos = pos | |
9379 * while 1: # <<<<<<<<<<<<<< | |
9380 * | |
9381 * pos = <char*>memchr(pos, b'\t', nbytes) | |
9382 */ | |
9383 while (1) { | |
9384 | |
9385 /* "pysam/libctabixproxies.pyx":217 | |
9386 * while 1: | |
9387 * | |
9388 * pos = <char*>memchr(pos, b'\t', nbytes) # <<<<<<<<<<<<<< | |
9389 * if pos == NULL: | |
9390 * break | |
9391 */ | |
9392 __pyx_v_pos = ((char *)memchr(__pyx_v_pos, '\t', __pyx_v_nbytes)); | |
9393 | |
9394 /* "pysam/libctabixproxies.pyx":218 | |
9395 * | |
9396 * pos = <char*>memchr(pos, b'\t', nbytes) | |
9397 * if pos == NULL: # <<<<<<<<<<<<<< | |
9398 * break | |
9399 * if field >= max_fields: | |
9400 */ | |
9401 __pyx_t_1 = (__pyx_v_pos == NULL); | |
9402 if (__pyx_t_1) { | |
9403 | |
9404 /* "pysam/libctabixproxies.pyx":219 | |
9405 * pos = <char*>memchr(pos, b'\t', nbytes) | |
9406 * if pos == NULL: | |
9407 * break # <<<<<<<<<<<<<< | |
9408 * if field >= max_fields: | |
9409 * raise ValueError( | |
9410 */ | |
9411 goto __pyx_L19_break; | |
9412 | |
9413 /* "pysam/libctabixproxies.pyx":218 | |
9414 * | |
9415 * pos = <char*>memchr(pos, b'\t', nbytes) | |
9416 * if pos == NULL: # <<<<<<<<<<<<<< | |
9417 * break | |
9418 * if field >= max_fields: | |
9419 */ | |
9420 } | |
9421 | |
9422 /* "pysam/libctabixproxies.pyx":220 | |
9423 * if pos == NULL: | |
9424 * break | |
9425 * if field >= max_fields: # <<<<<<<<<<<<<< | |
9426 * raise ValueError( | |
9427 * "parsing error: more than %i fields in line: %s" % | |
9428 */ | |
9429 __pyx_t_1 = (__pyx_v_field >= __pyx_v_max_fields); | |
9430 if (unlikely(__pyx_t_1)) { | |
9431 | |
9432 /* "pysam/libctabixproxies.pyx":223 | |
9433 * raise ValueError( | |
9434 * "parsing error: more than %i fields in line: %s" % | |
9435 * (max_fields, buffer)) # <<<<<<<<<<<<<< | |
9436 * | |
9437 * pos[0] = b'\0' | |
9438 */ | |
9439 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_max_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) | |
9440 __Pyx_GOTREF(__pyx_t_3); | |
9441 __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error) | |
9442 __Pyx_GOTREF(__pyx_t_4); | |
9443 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) | |
9444 __Pyx_GOTREF(__pyx_t_2); | |
9445 __Pyx_GIVEREF(__pyx_t_3); | |
9446 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error); | |
9447 __Pyx_GIVEREF(__pyx_t_4); | |
9448 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error); | |
9449 __pyx_t_3 = 0; | |
9450 __pyx_t_4 = 0; | |
9451 | |
9452 /* "pysam/libctabixproxies.pyx":222 | |
9453 * if field >= max_fields: | |
9454 * raise ValueError( | |
9455 * "parsing error: more than %i fields in line: %s" % # <<<<<<<<<<<<<< | |
9456 * (max_fields, buffer)) | |
9457 * | |
9458 */ | |
9459 __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_parsing_error_more_than_i_fields, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L1_error) | |
9460 __Pyx_GOTREF(__pyx_t_4); | |
9461 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
9462 | |
9463 /* "pysam/libctabixproxies.pyx":221 | |
9464 * break | |
9465 * if field >= max_fields: | |
9466 * raise ValueError( # <<<<<<<<<<<<<< | |
9467 * "parsing error: more than %i fields in line: %s" % | |
9468 * (max_fields, buffer)) | |
9469 */ | |
9470 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error) | |
9471 __Pyx_GOTREF(__pyx_t_2); | |
9472 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
9473 __Pyx_Raise(__pyx_t_2, 0, 0, 0); | |
9474 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
9475 __PYX_ERR(0, 221, __pyx_L1_error) | |
9476 | |
9477 /* "pysam/libctabixproxies.pyx":220 | |
9478 * if pos == NULL: | |
9479 * break | |
9480 * if field >= max_fields: # <<<<<<<<<<<<<< | |
9481 * raise ValueError( | |
9482 * "parsing error: more than %i fields in line: %s" % | |
9483 */ | |
9484 } | |
9485 | |
9486 /* "pysam/libctabixproxies.pyx":225 | |
9487 * (max_fields, buffer)) | |
9488 * | |
9489 * pos[0] = b'\0' # <<<<<<<<<<<<<< | |
9490 * pos += 1 | |
9491 * self.fields[field] = pos | |
9492 */ | |
9493 (__pyx_v_pos[0]) = '\x00'; | |
9494 | |
9495 /* "pysam/libctabixproxies.pyx":226 | |
9496 * | |
9497 * pos[0] = b'\0' | |
9498 * pos += 1 # <<<<<<<<<<<<<< | |
9499 * self.fields[field] = pos | |
9500 * field += 1 | |
9501 */ | |
9502 __pyx_v_pos = (__pyx_v_pos + 1); | |
9503 | |
9504 /* "pysam/libctabixproxies.pyx":227 | |
9505 * pos[0] = b'\0' | |
9506 * pos += 1 | |
9507 * self.fields[field] = pos # <<<<<<<<<<<<<< | |
9508 * field += 1 | |
9509 * nbytes -= pos - old_pos | |
9510 */ | |
9511 (__pyx_v_self->fields[__pyx_v_field]) = __pyx_v_pos; | |
9512 | |
9513 /* "pysam/libctabixproxies.pyx":228 | |
9514 * pos += 1 | |
9515 * self.fields[field] = pos | |
9516 * field += 1 # <<<<<<<<<<<<<< | |
9517 * nbytes -= pos - old_pos | |
9518 * if nbytes < 0: | |
9519 */ | |
9520 __pyx_v_field = (__pyx_v_field + 1); | |
9521 | |
9522 /* "pysam/libctabixproxies.pyx":229 | |
9523 * self.fields[field] = pos | |
9524 * field += 1 | |
9525 * nbytes -= pos - old_pos # <<<<<<<<<<<<<< | |
9526 * if nbytes < 0: | |
9527 * break | |
9528 */ | |
9529 __pyx_v_nbytes = (__pyx_v_nbytes - (__pyx_v_pos - __pyx_v_old_pos)); | |
9530 | |
9531 /* "pysam/libctabixproxies.pyx":230 | |
9532 * field += 1 | |
9533 * nbytes -= pos - old_pos | |
9534 * if nbytes < 0: # <<<<<<<<<<<<<< | |
9535 * break | |
9536 * old_pos = pos | |
9537 */ | |
9538 __pyx_t_1 = (__pyx_v_nbytes < 0); | |
9539 if (__pyx_t_1) { | |
9540 | |
9541 /* "pysam/libctabixproxies.pyx":231 | |
9542 * nbytes -= pos - old_pos | |
9543 * if nbytes < 0: | |
9544 * break # <<<<<<<<<<<<<< | |
9545 * old_pos = pos | |
9546 * self.nfields = field | |
9547 */ | |
9548 goto __pyx_L19_break; | |
9549 | |
9550 /* "pysam/libctabixproxies.pyx":230 | |
9551 * field += 1 | |
9552 * nbytes -= pos - old_pos | |
9553 * if nbytes < 0: # <<<<<<<<<<<<<< | |
9554 * break | |
9555 * old_pos = pos | |
9556 */ | |
9557 } | |
9558 | |
9559 /* "pysam/libctabixproxies.pyx":232 | |
9560 * if nbytes < 0: | |
9561 * break | |
9562 * old_pos = pos # <<<<<<<<<<<<<< | |
9563 * self.nfields = field | |
9564 * if self.nfields < self.getMinFields(): | |
9565 */ | |
9566 __pyx_v_old_pos = __pyx_v_pos; | |
9567 } | |
9568 __pyx_L19_break:; | |
9569 | |
9570 /* "pysam/libctabixproxies.pyx":233 | |
9571 * break | |
9572 * old_pos = pos | |
9573 * self.nfields = field # <<<<<<<<<<<<<< | |
9574 * if self.nfields < self.getMinFields(): | |
9575 * raise ValueError( | |
9576 */ | |
9577 __pyx_v_self->nfields = __pyx_v_field; | |
9578 | |
9579 /* "pysam/libctabixproxies.pyx":234 | |
9580 * old_pos = pos | |
9581 * self.nfields = field | |
9582 * if self.nfields < self.getMinFields(): # <<<<<<<<<<<<<< | |
9583 * raise ValueError( | |
9584 * "parsing error: fewer than %i fields in line: %s" % | |
9585 */ | |
9586 __pyx_t_6 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->getMinFields(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L1_error) | |
9587 __pyx_t_1 = (__pyx_v_self->nfields < __pyx_t_6); | |
9588 if (unlikely(__pyx_t_1)) { | |
9589 | |
9590 /* "pysam/libctabixproxies.pyx":237 | |
9591 * raise ValueError( | |
9592 * "parsing error: fewer than %i fields in line: %s" % | |
9593 * (self.getMinFields(), buffer)) # <<<<<<<<<<<<<< | |
9594 * | |
9595 * def _getindex(self, int index): | |
9596 */ | |
9597 __pyx_t_6 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->getMinFields(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 237, __pyx_L1_error) | |
9598 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) | |
9599 __Pyx_GOTREF(__pyx_t_2); | |
9600 __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error) | |
9601 __Pyx_GOTREF(__pyx_t_4); | |
9602 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error) | |
9603 __Pyx_GOTREF(__pyx_t_3); | |
9604 __Pyx_GIVEREF(__pyx_t_2); | |
9605 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error); | |
9606 __Pyx_GIVEREF(__pyx_t_4); | |
9607 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error); | |
9608 __pyx_t_2 = 0; | |
9609 __pyx_t_4 = 0; | |
9610 | |
9611 /* "pysam/libctabixproxies.pyx":236 | |
9612 * if self.nfields < self.getMinFields(): | |
9613 * raise ValueError( | |
9614 * "parsing error: fewer than %i fields in line: %s" % # <<<<<<<<<<<<<< | |
9615 * (self.getMinFields(), buffer)) | |
9616 * | |
9617 */ | |
9618 __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_parsing_error_fewer_than_i_field, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error) | |
9619 __Pyx_GOTREF(__pyx_t_4); | |
9620 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
9621 | |
9622 /* "pysam/libctabixproxies.pyx":235 | |
9623 * self.nfields = field | |
9624 * if self.nfields < self.getMinFields(): | |
9625 * raise ValueError( # <<<<<<<<<<<<<< | |
9626 * "parsing error: fewer than %i fields in line: %s" % | |
9627 * (self.getMinFields(), buffer)) | |
9628 */ | |
9629 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) | |
9630 __Pyx_GOTREF(__pyx_t_3); | |
9631 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
9632 __Pyx_Raise(__pyx_t_3, 0, 0, 0); | |
9633 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
9634 __PYX_ERR(0, 235, __pyx_L1_error) | |
9635 | |
9636 /* "pysam/libctabixproxies.pyx":234 | |
9637 * old_pos = pos | |
9638 * self.nfields = field | |
9639 * if self.nfields < self.getMinFields(): # <<<<<<<<<<<<<< | |
9640 * raise ValueError( | |
9641 * "parsing error: fewer than %i fields in line: %s" % | |
9642 */ | |
9643 } | |
9644 | |
9645 /* "pysam/libctabixproxies.pyx":147 | |
9646 * return 0 | |
9647 * | |
9648 * cdef update(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
9649 * '''update internal data. | |
9650 * | |
9651 */ | |
9652 | |
9653 /* function exit code */ | |
9654 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
9655 goto __pyx_L0; | |
9656 __pyx_L1_error:; | |
9657 __Pyx_XDECREF(__pyx_t_2); | |
9658 __Pyx_XDECREF(__pyx_t_3); | |
9659 __Pyx_XDECREF(__pyx_t_4); | |
9660 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.update", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
9661 __pyx_r = 0; | |
9662 __pyx_L0:; | |
9663 __Pyx_XGIVEREF(__pyx_r); | |
9664 __Pyx_RefNannyFinishContext(); | |
9665 return __pyx_r; | |
9666 } | |
9667 | |
9668 /* "pysam/libctabixproxies.pyx":239 | |
9669 * (self.getMinFields(), buffer)) | |
9670 * | |
9671 * def _getindex(self, int index): # <<<<<<<<<<<<<< | |
9672 * '''return item at idx index''' | |
9673 * cdef int i = index | |
9674 */ | |
9675 | |
9676 /* Python wrapper */ | |
9677 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_15_getindex(PyObject *__pyx_v_self, | |
9678 #if CYTHON_METH_FASTCALL | |
9679 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
9680 #else | |
9681 PyObject *__pyx_args, PyObject *__pyx_kwds | |
9682 #endif | |
9683 ); /*proto*/ | |
9684 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_10TupleProxy_14_getindex, "return item at idx index"); | |
9685 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_15_getindex = {"_getindex", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_15_getindex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_10TupleProxy_14_getindex}; | |
9686 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_15_getindex(PyObject *__pyx_v_self, | |
9687 #if CYTHON_METH_FASTCALL | |
9688 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
9689 #else | |
9690 PyObject *__pyx_args, PyObject *__pyx_kwds | |
9691 #endif | |
9692 ) { | |
9693 int __pyx_v_index; | |
9694 #if !CYTHON_METH_FASTCALL | |
9695 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
9696 #endif | |
9697 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
9698 PyObject* values[1] = {0}; | |
9699 int __pyx_lineno = 0; | |
9700 const char *__pyx_filename = NULL; | |
9701 int __pyx_clineno = 0; | |
9702 PyObject *__pyx_r = 0; | |
9703 __Pyx_RefNannyDeclarations | |
9704 __Pyx_RefNannySetupContext("_getindex (wrapper)", 0); | |
9705 #if !CYTHON_METH_FASTCALL | |
9706 #if CYTHON_ASSUME_SAFE_MACROS | |
9707 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
9708 #else | |
9709 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
9710 #endif | |
9711 #endif | |
9712 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
9713 { | |
9714 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,0}; | |
9715 if (__pyx_kwds) { | |
9716 Py_ssize_t kw_args; | |
9717 switch (__pyx_nargs) { | |
9718 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
9719 CYTHON_FALLTHROUGH; | |
9720 case 0: break; | |
9721 default: goto __pyx_L5_argtuple_error; | |
9722 } | |
9723 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
9724 switch (__pyx_nargs) { | |
9725 case 0: | |
9726 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index)) != 0)) { | |
9727 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
9728 kw_args--; | |
9729 } | |
9730 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 239, __pyx_L3_error) | |
9731 else goto __pyx_L5_argtuple_error; | |
9732 } | |
9733 if (unlikely(kw_args > 0)) { | |
9734 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
9735 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_getindex") < 0)) __PYX_ERR(0, 239, __pyx_L3_error) | |
9736 } | |
9737 } else if (unlikely(__pyx_nargs != 1)) { | |
9738 goto __pyx_L5_argtuple_error; | |
9739 } else { | |
9740 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
9741 } | |
9742 __pyx_v_index = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 239, __pyx_L3_error) | |
9743 } | |
9744 goto __pyx_L6_skip; | |
9745 __pyx_L5_argtuple_error:; | |
9746 __Pyx_RaiseArgtupleInvalid("_getindex", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 239, __pyx_L3_error) | |
9747 __pyx_L6_skip:; | |
9748 goto __pyx_L4_argument_unpacking_done; | |
9749 __pyx_L3_error:; | |
9750 { | |
9751 Py_ssize_t __pyx_temp; | |
9752 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
9753 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
9754 } | |
9755 } | |
9756 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy._getindex", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
9757 __Pyx_RefNannyFinishContext(); | |
9758 return NULL; | |
9759 __pyx_L4_argument_unpacking_done:; | |
9760 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_14_getindex(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self), __pyx_v_index); | |
9761 | |
9762 /* function exit code */ | |
9763 { | |
9764 Py_ssize_t __pyx_temp; | |
9765 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
9766 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
9767 } | |
9768 } | |
9769 __Pyx_RefNannyFinishContext(); | |
9770 return __pyx_r; | |
9771 } | |
9772 | |
9773 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_14_getindex(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, int __pyx_v_index) { | |
9774 int __pyx_v_i; | |
9775 PyObject *__pyx_r = NULL; | |
9776 __Pyx_RefNannyDeclarations | |
9777 int __pyx_t_1; | |
9778 PyObject *__pyx_t_2 = NULL; | |
9779 PyObject *__pyx_t_3 = NULL; | |
9780 PyObject *__pyx_t_4 = NULL; | |
9781 struct __pyx_opt_args_5pysam_9libcutils_force_str __pyx_t_5; | |
9782 int __pyx_lineno = 0; | |
9783 const char *__pyx_filename = NULL; | |
9784 int __pyx_clineno = 0; | |
9785 __Pyx_RefNannySetupContext("_getindex", 1); | |
9786 | |
9787 /* "pysam/libctabixproxies.pyx":241 | |
9788 * def _getindex(self, int index): | |
9789 * '''return item at idx index''' | |
9790 * cdef int i = index # <<<<<<<<<<<<<< | |
9791 * if i < 0: | |
9792 * i += self.nfields | |
9793 */ | |
9794 __pyx_v_i = __pyx_v_index; | |
9795 | |
9796 /* "pysam/libctabixproxies.pyx":242 | |
9797 * '''return item at idx index''' | |
9798 * cdef int i = index | |
9799 * if i < 0: # <<<<<<<<<<<<<< | |
9800 * i += self.nfields | |
9801 * if i < 0: | |
9802 */ | |
9803 __pyx_t_1 = (__pyx_v_i < 0); | |
9804 if (__pyx_t_1) { | |
9805 | |
9806 /* "pysam/libctabixproxies.pyx":243 | |
9807 * cdef int i = index | |
9808 * if i < 0: | |
9809 * i += self.nfields # <<<<<<<<<<<<<< | |
9810 * if i < 0: | |
9811 * raise IndexError("list index out of range") | |
9812 */ | |
9813 __pyx_v_i = (__pyx_v_i + __pyx_v_self->nfields); | |
9814 | |
9815 /* "pysam/libctabixproxies.pyx":242 | |
9816 * '''return item at idx index''' | |
9817 * cdef int i = index | |
9818 * if i < 0: # <<<<<<<<<<<<<< | |
9819 * i += self.nfields | |
9820 * if i < 0: | |
9821 */ | |
9822 } | |
9823 | |
9824 /* "pysam/libctabixproxies.pyx":244 | |
9825 * if i < 0: | |
9826 * i += self.nfields | |
9827 * if i < 0: # <<<<<<<<<<<<<< | |
9828 * raise IndexError("list index out of range") | |
9829 * # apply offset - separating a fixed number | |
9830 */ | |
9831 __pyx_t_1 = (__pyx_v_i < 0); | |
9832 if (unlikely(__pyx_t_1)) { | |
9833 | |
9834 /* "pysam/libctabixproxies.pyx":245 | |
9835 * i += self.nfields | |
9836 * if i < 0: | |
9837 * raise IndexError("list index out of range") # <<<<<<<<<<<<<< | |
9838 * # apply offset - separating a fixed number | |
9839 * # of fields from a variable number such as in VCF | |
9840 */ | |
9841 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) | |
9842 __Pyx_GOTREF(__pyx_t_2); | |
9843 __Pyx_Raise(__pyx_t_2, 0, 0, 0); | |
9844 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
9845 __PYX_ERR(0, 245, __pyx_L1_error) | |
9846 | |
9847 /* "pysam/libctabixproxies.pyx":244 | |
9848 * if i < 0: | |
9849 * i += self.nfields | |
9850 * if i < 0: # <<<<<<<<<<<<<< | |
9851 * raise IndexError("list index out of range") | |
9852 * # apply offset - separating a fixed number | |
9853 */ | |
9854 } | |
9855 | |
9856 /* "pysam/libctabixproxies.pyx":248 | |
9857 * # apply offset - separating a fixed number | |
9858 * # of fields from a variable number such as in VCF | |
9859 * i += self.offset # <<<<<<<<<<<<<< | |
9860 * if i >= self.nfields: | |
9861 * raise IndexError( | |
9862 */ | |
9863 __pyx_v_i = (__pyx_v_i + __pyx_v_self->offset); | |
9864 | |
9865 /* "pysam/libctabixproxies.pyx":249 | |
9866 * # of fields from a variable number such as in VCF | |
9867 * i += self.offset | |
9868 * if i >= self.nfields: # <<<<<<<<<<<<<< | |
9869 * raise IndexError( | |
9870 * "list index out of range %i >= %i" % | |
9871 */ | |
9872 __pyx_t_1 = (__pyx_v_i >= __pyx_v_self->nfields); | |
9873 if (unlikely(__pyx_t_1)) { | |
9874 | |
9875 /* "pysam/libctabixproxies.pyx":252 | |
9876 * raise IndexError( | |
9877 * "list index out of range %i >= %i" % | |
9878 * (i, self.nfields)) # <<<<<<<<<<<<<< | |
9879 * return force_str(self.fields[i], self.encoding) | |
9880 * | |
9881 */ | |
9882 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error) | |
9883 __Pyx_GOTREF(__pyx_t_2); | |
9884 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nfields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) | |
9885 __Pyx_GOTREF(__pyx_t_3); | |
9886 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error) | |
9887 __Pyx_GOTREF(__pyx_t_4); | |
9888 __Pyx_GIVEREF(__pyx_t_2); | |
9889 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error); | |
9890 __Pyx_GIVEREF(__pyx_t_3); | |
9891 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error); | |
9892 __pyx_t_2 = 0; | |
9893 __pyx_t_3 = 0; | |
9894 | |
9895 /* "pysam/libctabixproxies.pyx":251 | |
9896 * if i >= self.nfields: | |
9897 * raise IndexError( | |
9898 * "list index out of range %i >= %i" % # <<<<<<<<<<<<<< | |
9899 * (i, self.nfields)) | |
9900 * return force_str(self.fields[i], self.encoding) | |
9901 */ | |
9902 __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_list_index_out_of_range_i_i, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error) | |
9903 __Pyx_GOTREF(__pyx_t_3); | |
9904 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
9905 | |
9906 /* "pysam/libctabixproxies.pyx":250 | |
9907 * i += self.offset | |
9908 * if i >= self.nfields: | |
9909 * raise IndexError( # <<<<<<<<<<<<<< | |
9910 * "list index out of range %i >= %i" % | |
9911 * (i, self.nfields)) | |
9912 */ | |
9913 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error) | |
9914 __Pyx_GOTREF(__pyx_t_4); | |
9915 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
9916 __Pyx_Raise(__pyx_t_4, 0, 0, 0); | |
9917 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
9918 __PYX_ERR(0, 250, __pyx_L1_error) | |
9919 | |
9920 /* "pysam/libctabixproxies.pyx":249 | |
9921 * # of fields from a variable number such as in VCF | |
9922 * i += self.offset | |
9923 * if i >= self.nfields: # <<<<<<<<<<<<<< | |
9924 * raise IndexError( | |
9925 * "list index out of range %i >= %i" % | |
9926 */ | |
9927 } | |
9928 | |
9929 /* "pysam/libctabixproxies.pyx":253 | |
9930 * "list index out of range %i >= %i" % | |
9931 * (i, self.nfields)) | |
9932 * return force_str(self.fields[i], self.encoding) # <<<<<<<<<<<<<< | |
9933 * | |
9934 * def __getitem__(self, key): | |
9935 */ | |
9936 __Pyx_XDECREF(__pyx_r); | |
9937 __pyx_t_4 = __Pyx_PyBytes_FromString((__pyx_v_self->fields[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error) | |
9938 __Pyx_GOTREF(__pyx_t_4); | |
9939 __pyx_t_3 = __pyx_v_self->encoding; | |
9940 __Pyx_INCREF(__pyx_t_3); | |
9941 __pyx_t_5.__pyx_n = 1; | |
9942 __pyx_t_5.encoding = __pyx_t_3; | |
9943 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_4, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error) | |
9944 __Pyx_GOTREF(__pyx_t_2); | |
9945 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
9946 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
9947 __pyx_r = __pyx_t_2; | |
9948 __pyx_t_2 = 0; | |
9949 goto __pyx_L0; | |
9950 | |
9951 /* "pysam/libctabixproxies.pyx":239 | |
9952 * (self.getMinFields(), buffer)) | |
9953 * | |
9954 * def _getindex(self, int index): # <<<<<<<<<<<<<< | |
9955 * '''return item at idx index''' | |
9956 * cdef int i = index | |
9957 */ | |
9958 | |
9959 /* function exit code */ | |
9960 __pyx_L1_error:; | |
9961 __Pyx_XDECREF(__pyx_t_2); | |
9962 __Pyx_XDECREF(__pyx_t_3); | |
9963 __Pyx_XDECREF(__pyx_t_4); | |
9964 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy._getindex", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
9965 __pyx_r = NULL; | |
9966 __pyx_L0:; | |
9967 __Pyx_XGIVEREF(__pyx_r); | |
9968 __Pyx_RefNannyFinishContext(); | |
9969 return __pyx_r; | |
9970 } | |
9971 | |
9972 /* "pysam/libctabixproxies.pyx":255 | |
9973 * return force_str(self.fields[i], self.encoding) | |
9974 * | |
9975 * def __getitem__(self, key): # <<<<<<<<<<<<<< | |
9976 * if type(key) == int: | |
9977 * return self._getindex(key) | |
9978 */ | |
9979 | |
9980 /* Python wrapper */ | |
9981 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_17__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ | |
9982 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_17__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { | |
9983 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
9984 PyObject *__pyx_r = 0; | |
9985 __Pyx_RefNannyDeclarations | |
9986 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); | |
9987 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
9988 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_16__getitem__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key)); | |
9989 | |
9990 /* function exit code */ | |
9991 __Pyx_RefNannyFinishContext(); | |
9992 return __pyx_r; | |
9993 } | |
9994 | |
9995 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_16__getitem__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, PyObject *__pyx_v_key) { | |
9996 PyObject *__pyx_v_start = NULL; | |
9997 PyObject *__pyx_v_end = NULL; | |
9998 PyObject *__pyx_v_step = NULL; | |
9999 PyObject *__pyx_v_result = NULL; | |
10000 PyObject *__pyx_v_index = NULL; | |
10001 PyObject *__pyx_r = NULL; | |
10002 __Pyx_RefNannyDeclarations | |
10003 PyObject *__pyx_t_1 = NULL; | |
10004 int __pyx_t_2; | |
10005 PyObject *__pyx_t_3 = NULL; | |
10006 PyObject *__pyx_t_4 = NULL; | |
10007 unsigned int __pyx_t_5; | |
10008 PyObject *__pyx_t_6 = NULL; | |
10009 PyObject *__pyx_t_7 = NULL; | |
10010 PyObject *(*__pyx_t_8)(PyObject *); | |
10011 Py_ssize_t __pyx_t_9; | |
10012 PyObject *(*__pyx_t_10)(PyObject *); | |
10013 int __pyx_t_11; | |
10014 int __pyx_lineno = 0; | |
10015 const char *__pyx_filename = NULL; | |
10016 int __pyx_clineno = 0; | |
10017 __Pyx_RefNannySetupContext("__getitem__", 1); | |
10018 | |
10019 /* "pysam/libctabixproxies.pyx":256 | |
10020 * | |
10021 * def __getitem__(self, key): | |
10022 * if type(key) == int: # <<<<<<<<<<<<<< | |
10023 * return self._getindex(key) | |
10024 * # slice object | |
10025 */ | |
10026 __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_key)), ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) | |
10027 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 256, __pyx_L1_error) | |
10028 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
10029 if (__pyx_t_2) { | |
10030 | |
10031 /* "pysam/libctabixproxies.pyx":257 | |
10032 * def __getitem__(self, key): | |
10033 * if type(key) == int: | |
10034 * return self._getindex(key) # <<<<<<<<<<<<<< | |
10035 * # slice object | |
10036 * start, end, step = key.indices(self.nfields) | |
10037 */ | |
10038 __Pyx_XDECREF(__pyx_r); | |
10039 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error) | |
10040 __Pyx_GOTREF(__pyx_t_3); | |
10041 __pyx_t_4 = NULL; | |
10042 __pyx_t_5 = 0; | |
10043 #if CYTHON_UNPACK_METHODS | |
10044 if (likely(PyMethod_Check(__pyx_t_3))) { | |
10045 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); | |
10046 if (likely(__pyx_t_4)) { | |
10047 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
10048 __Pyx_INCREF(__pyx_t_4); | |
10049 __Pyx_INCREF(function); | |
10050 __Pyx_DECREF_SET(__pyx_t_3, function); | |
10051 __pyx_t_5 = 1; | |
10052 } | |
10053 } | |
10054 #endif | |
10055 { | |
10056 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_key}; | |
10057 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); | |
10058 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
10059 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) | |
10060 __Pyx_GOTREF(__pyx_t_1); | |
10061 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
10062 } | |
10063 __pyx_r = __pyx_t_1; | |
10064 __pyx_t_1 = 0; | |
10065 goto __pyx_L0; | |
10066 | |
10067 /* "pysam/libctabixproxies.pyx":256 | |
10068 * | |
10069 * def __getitem__(self, key): | |
10070 * if type(key) == int: # <<<<<<<<<<<<<< | |
10071 * return self._getindex(key) | |
10072 * # slice object | |
10073 */ | |
10074 } | |
10075 | |
10076 /* "pysam/libctabixproxies.pyx":259 | |
10077 * return self._getindex(key) | |
10078 * # slice object | |
10079 * start, end, step = key.indices(self.nfields) # <<<<<<<<<<<<<< | |
10080 * result = [] | |
10081 * for index in range(start, end, step): | |
10082 */ | |
10083 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error) | |
10084 __Pyx_GOTREF(__pyx_t_3); | |
10085 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->nfields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error) | |
10086 __Pyx_GOTREF(__pyx_t_4); | |
10087 __pyx_t_6 = NULL; | |
10088 __pyx_t_5 = 0; | |
10089 #if CYTHON_UNPACK_METHODS | |
10090 if (likely(PyMethod_Check(__pyx_t_3))) { | |
10091 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); | |
10092 if (likely(__pyx_t_6)) { | |
10093 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
10094 __Pyx_INCREF(__pyx_t_6); | |
10095 __Pyx_INCREF(function); | |
10096 __Pyx_DECREF_SET(__pyx_t_3, function); | |
10097 __pyx_t_5 = 1; | |
10098 } | |
10099 } | |
10100 #endif | |
10101 { | |
10102 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4}; | |
10103 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); | |
10104 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
10105 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
10106 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) | |
10107 __Pyx_GOTREF(__pyx_t_1); | |
10108 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
10109 } | |
10110 if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { | |
10111 PyObject* sequence = __pyx_t_1; | |
10112 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); | |
10113 if (unlikely(size != 3)) { | |
10114 if (size > 3) __Pyx_RaiseTooManyValuesError(3); | |
10115 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); | |
10116 __PYX_ERR(0, 259, __pyx_L1_error) | |
10117 } | |
10118 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
10119 if (likely(PyTuple_CheckExact(sequence))) { | |
10120 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); | |
10121 __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); | |
10122 __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); | |
10123 } else { | |
10124 __pyx_t_3 = PyList_GET_ITEM(sequence, 0); | |
10125 __pyx_t_4 = PyList_GET_ITEM(sequence, 1); | |
10126 __pyx_t_6 = PyList_GET_ITEM(sequence, 2); | |
10127 } | |
10128 __Pyx_INCREF(__pyx_t_3); | |
10129 __Pyx_INCREF(__pyx_t_4); | |
10130 __Pyx_INCREF(__pyx_t_6); | |
10131 #else | |
10132 __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error) | |
10133 __Pyx_GOTREF(__pyx_t_3); | |
10134 __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error) | |
10135 __Pyx_GOTREF(__pyx_t_4); | |
10136 __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 259, __pyx_L1_error) | |
10137 __Pyx_GOTREF(__pyx_t_6); | |
10138 #endif | |
10139 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
10140 } else { | |
10141 Py_ssize_t index = -1; | |
10142 __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L1_error) | |
10143 __Pyx_GOTREF(__pyx_t_7); | |
10144 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
10145 __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); | |
10146 index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; | |
10147 __Pyx_GOTREF(__pyx_t_3); | |
10148 index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; | |
10149 __Pyx_GOTREF(__pyx_t_4); | |
10150 index = 2; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; | |
10151 __Pyx_GOTREF(__pyx_t_6); | |
10152 if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 3) < 0) __PYX_ERR(0, 259, __pyx_L1_error) | |
10153 __pyx_t_8 = NULL; | |
10154 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; | |
10155 goto __pyx_L5_unpacking_done; | |
10156 __pyx_L4_unpacking_failed:; | |
10157 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; | |
10158 __pyx_t_8 = NULL; | |
10159 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); | |
10160 __PYX_ERR(0, 259, __pyx_L1_error) | |
10161 __pyx_L5_unpacking_done:; | |
10162 } | |
10163 __pyx_v_start = __pyx_t_3; | |
10164 __pyx_t_3 = 0; | |
10165 __pyx_v_end = __pyx_t_4; | |
10166 __pyx_t_4 = 0; | |
10167 __pyx_v_step = __pyx_t_6; | |
10168 __pyx_t_6 = 0; | |
10169 | |
10170 /* "pysam/libctabixproxies.pyx":260 | |
10171 * # slice object | |
10172 * start, end, step = key.indices(self.nfields) | |
10173 * result = [] # <<<<<<<<<<<<<< | |
10174 * for index in range(start, end, step): | |
10175 * result.append(self._getindex(index)) | |
10176 */ | |
10177 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error) | |
10178 __Pyx_GOTREF(__pyx_t_1); | |
10179 __pyx_v_result = ((PyObject*)__pyx_t_1); | |
10180 __pyx_t_1 = 0; | |
10181 | |
10182 /* "pysam/libctabixproxies.pyx":261 | |
10183 * start, end, step = key.indices(self.nfields) | |
10184 * result = [] | |
10185 * for index in range(start, end, step): # <<<<<<<<<<<<<< | |
10186 * result.append(self._getindex(index)) | |
10187 * return result | |
10188 */ | |
10189 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error) | |
10190 __Pyx_GOTREF(__pyx_t_1); | |
10191 __Pyx_INCREF(__pyx_v_start); | |
10192 __Pyx_GIVEREF(__pyx_v_start); | |
10193 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_start)) __PYX_ERR(0, 261, __pyx_L1_error); | |
10194 __Pyx_INCREF(__pyx_v_end); | |
10195 __Pyx_GIVEREF(__pyx_v_end); | |
10196 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_end)) __PYX_ERR(0, 261, __pyx_L1_error); | |
10197 __Pyx_INCREF(__pyx_v_step); | |
10198 __Pyx_GIVEREF(__pyx_v_step); | |
10199 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_step)) __PYX_ERR(0, 261, __pyx_L1_error); | |
10200 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 261, __pyx_L1_error) | |
10201 __Pyx_GOTREF(__pyx_t_6); | |
10202 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
10203 if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { | |
10204 __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); | |
10205 __pyx_t_9 = 0; | |
10206 __pyx_t_10 = NULL; | |
10207 } else { | |
10208 __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error) | |
10209 __Pyx_GOTREF(__pyx_t_1); | |
10210 __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 261, __pyx_L1_error) | |
10211 } | |
10212 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
10213 for (;;) { | |
10214 if (likely(!__pyx_t_10)) { | |
10215 if (likely(PyList_CheckExact(__pyx_t_1))) { | |
10216 { | |
10217 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); | |
10218 #if !CYTHON_ASSUME_SAFE_MACROS | |
10219 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 261, __pyx_L1_error) | |
10220 #endif | |
10221 if (__pyx_t_9 >= __pyx_temp) break; | |
10222 } | |
10223 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
10224 __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 261, __pyx_L1_error) | |
10225 #else | |
10226 __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 261, __pyx_L1_error) | |
10227 __Pyx_GOTREF(__pyx_t_6); | |
10228 #endif | |
10229 } else { | |
10230 { | |
10231 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); | |
10232 #if !CYTHON_ASSUME_SAFE_MACROS | |
10233 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 261, __pyx_L1_error) | |
10234 #endif | |
10235 if (__pyx_t_9 >= __pyx_temp) break; | |
10236 } | |
10237 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
10238 __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 261, __pyx_L1_error) | |
10239 #else | |
10240 __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 261, __pyx_L1_error) | |
10241 __Pyx_GOTREF(__pyx_t_6); | |
10242 #endif | |
10243 } | |
10244 } else { | |
10245 __pyx_t_6 = __pyx_t_10(__pyx_t_1); | |
10246 if (unlikely(!__pyx_t_6)) { | |
10247 PyObject* exc_type = PyErr_Occurred(); | |
10248 if (exc_type) { | |
10249 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); | |
10250 else __PYX_ERR(0, 261, __pyx_L1_error) | |
10251 } | |
10252 break; | |
10253 } | |
10254 __Pyx_GOTREF(__pyx_t_6); | |
10255 } | |
10256 __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_6); | |
10257 __pyx_t_6 = 0; | |
10258 | |
10259 /* "pysam/libctabixproxies.pyx":262 | |
10260 * result = [] | |
10261 * for index in range(start, end, step): | |
10262 * result.append(self._getindex(index)) # <<<<<<<<<<<<<< | |
10263 * return result | |
10264 * | |
10265 */ | |
10266 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getindex); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L1_error) | |
10267 __Pyx_GOTREF(__pyx_t_4); | |
10268 __pyx_t_3 = NULL; | |
10269 __pyx_t_5 = 0; | |
10270 #if CYTHON_UNPACK_METHODS | |
10271 if (likely(PyMethod_Check(__pyx_t_4))) { | |
10272 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); | |
10273 if (likely(__pyx_t_3)) { | |
10274 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); | |
10275 __Pyx_INCREF(__pyx_t_3); | |
10276 __Pyx_INCREF(function); | |
10277 __Pyx_DECREF_SET(__pyx_t_4, function); | |
10278 __pyx_t_5 = 1; | |
10279 } | |
10280 } | |
10281 #endif | |
10282 { | |
10283 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_index}; | |
10284 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); | |
10285 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; | |
10286 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 262, __pyx_L1_error) | |
10287 __Pyx_GOTREF(__pyx_t_6); | |
10288 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
10289 } | |
10290 __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 262, __pyx_L1_error) | |
10291 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
10292 | |
10293 /* "pysam/libctabixproxies.pyx":261 | |
10294 * start, end, step = key.indices(self.nfields) | |
10295 * result = [] | |
10296 * for index in range(start, end, step): # <<<<<<<<<<<<<< | |
10297 * result.append(self._getindex(index)) | |
10298 * return result | |
10299 */ | |
10300 } | |
10301 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
10302 | |
10303 /* "pysam/libctabixproxies.pyx":263 | |
10304 * for index in range(start, end, step): | |
10305 * result.append(self._getindex(index)) | |
10306 * return result # <<<<<<<<<<<<<< | |
10307 * | |
10308 * def _setindex(self, index, value): | |
10309 */ | |
10310 __Pyx_XDECREF(__pyx_r); | |
10311 __Pyx_INCREF(__pyx_v_result); | |
10312 __pyx_r = __pyx_v_result; | |
10313 goto __pyx_L0; | |
10314 | |
10315 /* "pysam/libctabixproxies.pyx":255 | |
10316 * return force_str(self.fields[i], self.encoding) | |
10317 * | |
10318 * def __getitem__(self, key): # <<<<<<<<<<<<<< | |
10319 * if type(key) == int: | |
10320 * return self._getindex(key) | |
10321 */ | |
10322 | |
10323 /* function exit code */ | |
10324 __pyx_L1_error:; | |
10325 __Pyx_XDECREF(__pyx_t_1); | |
10326 __Pyx_XDECREF(__pyx_t_3); | |
10327 __Pyx_XDECREF(__pyx_t_4); | |
10328 __Pyx_XDECREF(__pyx_t_6); | |
10329 __Pyx_XDECREF(__pyx_t_7); | |
10330 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
10331 __pyx_r = NULL; | |
10332 __pyx_L0:; | |
10333 __Pyx_XDECREF(__pyx_v_start); | |
10334 __Pyx_XDECREF(__pyx_v_end); | |
10335 __Pyx_XDECREF(__pyx_v_step); | |
10336 __Pyx_XDECREF(__pyx_v_result); | |
10337 __Pyx_XDECREF(__pyx_v_index); | |
10338 __Pyx_XGIVEREF(__pyx_r); | |
10339 __Pyx_RefNannyFinishContext(); | |
10340 return __pyx_r; | |
10341 } | |
10342 | |
10343 /* "pysam/libctabixproxies.pyx":265 | |
10344 * return result | |
10345 * | |
10346 * def _setindex(self, index, value): # <<<<<<<<<<<<<< | |
10347 * '''set item at idx index.''' | |
10348 * cdef int idx = index | |
10349 */ | |
10350 | |
10351 /* Python wrapper */ | |
10352 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_19_setindex(PyObject *__pyx_v_self, | |
10353 #if CYTHON_METH_FASTCALL | |
10354 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
10355 #else | |
10356 PyObject *__pyx_args, PyObject *__pyx_kwds | |
10357 #endif | |
10358 ); /*proto*/ | |
10359 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_10TupleProxy_18_setindex, "set item at idx index."); | |
10360 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_19_setindex = {"_setindex", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_19_setindex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_10TupleProxy_18_setindex}; | |
10361 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_19_setindex(PyObject *__pyx_v_self, | |
10362 #if CYTHON_METH_FASTCALL | |
10363 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
10364 #else | |
10365 PyObject *__pyx_args, PyObject *__pyx_kwds | |
10366 #endif | |
10367 ) { | |
10368 PyObject *__pyx_v_index = 0; | |
10369 PyObject *__pyx_v_value = 0; | |
10370 #if !CYTHON_METH_FASTCALL | |
10371 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
10372 #endif | |
10373 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
10374 PyObject* values[2] = {0,0}; | |
10375 int __pyx_lineno = 0; | |
10376 const char *__pyx_filename = NULL; | |
10377 int __pyx_clineno = 0; | |
10378 PyObject *__pyx_r = 0; | |
10379 __Pyx_RefNannyDeclarations | |
10380 __Pyx_RefNannySetupContext("_setindex (wrapper)", 0); | |
10381 #if !CYTHON_METH_FASTCALL | |
10382 #if CYTHON_ASSUME_SAFE_MACROS | |
10383 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
10384 #else | |
10385 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
10386 #endif | |
10387 #endif | |
10388 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
10389 { | |
10390 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_value,0}; | |
10391 if (__pyx_kwds) { | |
10392 Py_ssize_t kw_args; | |
10393 switch (__pyx_nargs) { | |
10394 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); | |
10395 CYTHON_FALLTHROUGH; | |
10396 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
10397 CYTHON_FALLTHROUGH; | |
10398 case 0: break; | |
10399 default: goto __pyx_L5_argtuple_error; | |
10400 } | |
10401 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
10402 switch (__pyx_nargs) { | |
10403 case 0: | |
10404 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index)) != 0)) { | |
10405 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
10406 kw_args--; | |
10407 } | |
10408 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 265, __pyx_L3_error) | |
10409 else goto __pyx_L5_argtuple_error; | |
10410 CYTHON_FALLTHROUGH; | |
10411 case 1: | |
10412 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) { | |
10413 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); | |
10414 kw_args--; | |
10415 } | |
10416 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 265, __pyx_L3_error) | |
10417 else { | |
10418 __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, 1); __PYX_ERR(0, 265, __pyx_L3_error) | |
10419 } | |
10420 } | |
10421 if (unlikely(kw_args > 0)) { | |
10422 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
10423 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_setindex") < 0)) __PYX_ERR(0, 265, __pyx_L3_error) | |
10424 } | |
10425 } else if (unlikely(__pyx_nargs != 2)) { | |
10426 goto __pyx_L5_argtuple_error; | |
10427 } else { | |
10428 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
10429 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); | |
10430 } | |
10431 __pyx_v_index = values[0]; | |
10432 __pyx_v_value = values[1]; | |
10433 } | |
10434 goto __pyx_L6_skip; | |
10435 __pyx_L5_argtuple_error:; | |
10436 __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 265, __pyx_L3_error) | |
10437 __pyx_L6_skip:; | |
10438 goto __pyx_L4_argument_unpacking_done; | |
10439 __pyx_L3_error:; | |
10440 { | |
10441 Py_ssize_t __pyx_temp; | |
10442 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
10443 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
10444 } | |
10445 } | |
10446 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy._setindex", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
10447 __Pyx_RefNannyFinishContext(); | |
10448 return NULL; | |
10449 __pyx_L4_argument_unpacking_done:; | |
10450 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_18_setindex(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self), __pyx_v_index, __pyx_v_value); | |
10451 | |
10452 /* function exit code */ | |
10453 { | |
10454 Py_ssize_t __pyx_temp; | |
10455 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
10456 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
10457 } | |
10458 } | |
10459 __Pyx_RefNannyFinishContext(); | |
10460 return __pyx_r; | |
10461 } | |
10462 | |
10463 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_18_setindex(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { | |
10464 int __pyx_v_idx; | |
10465 char *__pyx_v_tmp; | |
10466 PyObject *__pyx_r = NULL; | |
10467 __Pyx_RefNannyDeclarations | |
10468 int __pyx_t_1; | |
10469 int __pyx_t_2; | |
10470 PyObject *__pyx_t_3 = NULL; | |
10471 char *__pyx_t_4; | |
10472 int __pyx_lineno = 0; | |
10473 const char *__pyx_filename = NULL; | |
10474 int __pyx_clineno = 0; | |
10475 __Pyx_RefNannySetupContext("_setindex", 0); | |
10476 __Pyx_INCREF(__pyx_v_value); | |
10477 | |
10478 /* "pysam/libctabixproxies.pyx":267 | |
10479 * def _setindex(self, index, value): | |
10480 * '''set item at idx index.''' | |
10481 * cdef int idx = index # <<<<<<<<<<<<<< | |
10482 * if idx < 0: | |
10483 * raise IndexError("list index out of range") | |
10484 */ | |
10485 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) | |
10486 __pyx_v_idx = __pyx_t_1; | |
10487 | |
10488 /* "pysam/libctabixproxies.pyx":268 | |
10489 * '''set item at idx index.''' | |
10490 * cdef int idx = index | |
10491 * if idx < 0: # <<<<<<<<<<<<<< | |
10492 * raise IndexError("list index out of range") | |
10493 * if idx >= self.nfields: | |
10494 */ | |
10495 __pyx_t_2 = (__pyx_v_idx < 0); | |
10496 if (unlikely(__pyx_t_2)) { | |
10497 | |
10498 /* "pysam/libctabixproxies.pyx":269 | |
10499 * cdef int idx = index | |
10500 * if idx < 0: | |
10501 * raise IndexError("list index out of range") # <<<<<<<<<<<<<< | |
10502 * if idx >= self.nfields: | |
10503 * raise IndexError("list index out of range") | |
10504 */ | |
10505 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error) | |
10506 __Pyx_GOTREF(__pyx_t_3); | |
10507 __Pyx_Raise(__pyx_t_3, 0, 0, 0); | |
10508 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
10509 __PYX_ERR(0, 269, __pyx_L1_error) | |
10510 | |
10511 /* "pysam/libctabixproxies.pyx":268 | |
10512 * '''set item at idx index.''' | |
10513 * cdef int idx = index | |
10514 * if idx < 0: # <<<<<<<<<<<<<< | |
10515 * raise IndexError("list index out of range") | |
10516 * if idx >= self.nfields: | |
10517 */ | |
10518 } | |
10519 | |
10520 /* "pysam/libctabixproxies.pyx":270 | |
10521 * if idx < 0: | |
10522 * raise IndexError("list index out of range") | |
10523 * if idx >= self.nfields: # <<<<<<<<<<<<<< | |
10524 * raise IndexError("list index out of range") | |
10525 * | |
10526 */ | |
10527 __pyx_t_2 = (__pyx_v_idx >= __pyx_v_self->nfields); | |
10528 if (unlikely(__pyx_t_2)) { | |
10529 | |
10530 /* "pysam/libctabixproxies.pyx":271 | |
10531 * raise IndexError("list index out of range") | |
10532 * if idx >= self.nfields: | |
10533 * raise IndexError("list index out of range") # <<<<<<<<<<<<<< | |
10534 * | |
10535 * if isNew(self.fields[idx], self.data, self.nbytes): | |
10536 */ | |
10537 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error) | |
10538 __Pyx_GOTREF(__pyx_t_3); | |
10539 __Pyx_Raise(__pyx_t_3, 0, 0, 0); | |
10540 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
10541 __PYX_ERR(0, 271, __pyx_L1_error) | |
10542 | |
10543 /* "pysam/libctabixproxies.pyx":270 | |
10544 * if idx < 0: | |
10545 * raise IndexError("list index out of range") | |
10546 * if idx >= self.nfields: # <<<<<<<<<<<<<< | |
10547 * raise IndexError("list index out of range") | |
10548 * | |
10549 */ | |
10550 } | |
10551 | |
10552 /* "pysam/libctabixproxies.pyx":273 | |
10553 * raise IndexError("list index out of range") | |
10554 * | |
10555 * if isNew(self.fields[idx], self.data, self.nbytes): # <<<<<<<<<<<<<< | |
10556 * free(self.fields[idx]) | |
10557 * | |
10558 */ | |
10559 __pyx_t_1 = __pyx_f_5pysam_16libctabixproxies_isNew((__pyx_v_self->fields[__pyx_v_idx]), __pyx_v_self->data, __pyx_v_self->nbytes); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 273, __pyx_L1_error) | |
10560 __pyx_t_2 = (__pyx_t_1 != 0); | |
10561 if (__pyx_t_2) { | |
10562 | |
10563 /* "pysam/libctabixproxies.pyx":274 | |
10564 * | |
10565 * if isNew(self.fields[idx], self.data, self.nbytes): | |
10566 * free(self.fields[idx]) # <<<<<<<<<<<<<< | |
10567 * | |
10568 * self.is_modified = 1 | |
10569 */ | |
10570 free((__pyx_v_self->fields[__pyx_v_idx])); | |
10571 | |
10572 /* "pysam/libctabixproxies.pyx":273 | |
10573 * raise IndexError("list index out of range") | |
10574 * | |
10575 * if isNew(self.fields[idx], self.data, self.nbytes): # <<<<<<<<<<<<<< | |
10576 * free(self.fields[idx]) | |
10577 * | |
10578 */ | |
10579 } | |
10580 | |
10581 /* "pysam/libctabixproxies.pyx":276 | |
10582 * free(self.fields[idx]) | |
10583 * | |
10584 * self.is_modified = 1 # <<<<<<<<<<<<<< | |
10585 * | |
10586 * if value is None: | |
10587 */ | |
10588 __pyx_v_self->is_modified = 1; | |
10589 | |
10590 /* "pysam/libctabixproxies.pyx":278 | |
10591 * self.is_modified = 1 | |
10592 * | |
10593 * if value is None: # <<<<<<<<<<<<<< | |
10594 * self.fields[idx] = NULL | |
10595 * return | |
10596 */ | |
10597 __pyx_t_2 = (__pyx_v_value == Py_None); | |
10598 if (__pyx_t_2) { | |
10599 | |
10600 /* "pysam/libctabixproxies.pyx":279 | |
10601 * | |
10602 * if value is None: | |
10603 * self.fields[idx] = NULL # <<<<<<<<<<<<<< | |
10604 * return | |
10605 * | |
10606 */ | |
10607 (__pyx_v_self->fields[__pyx_v_idx]) = NULL; | |
10608 | |
10609 /* "pysam/libctabixproxies.pyx":280 | |
10610 * if value is None: | |
10611 * self.fields[idx] = NULL | |
10612 * return # <<<<<<<<<<<<<< | |
10613 * | |
10614 * # conversion with error checking | |
10615 */ | |
10616 __Pyx_XDECREF(__pyx_r); | |
10617 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
10618 goto __pyx_L0; | |
10619 | |
10620 /* "pysam/libctabixproxies.pyx":278 | |
10621 * self.is_modified = 1 | |
10622 * | |
10623 * if value is None: # <<<<<<<<<<<<<< | |
10624 * self.fields[idx] = NULL | |
10625 * return | |
10626 */ | |
10627 } | |
10628 | |
10629 /* "pysam/libctabixproxies.pyx":283 | |
10630 * | |
10631 * # conversion with error checking | |
10632 * value = force_bytes(value) # <<<<<<<<<<<<<< | |
10633 * cdef char * tmp = <char*>value | |
10634 * self.fields[idx] = <char*>malloc((strlen( tmp ) + 1) * sizeof(char)) | |
10635 */ | |
10636 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_value, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error) | |
10637 __Pyx_GOTREF(__pyx_t_3); | |
10638 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3); | |
10639 __pyx_t_3 = 0; | |
10640 | |
10641 /* "pysam/libctabixproxies.pyx":284 | |
10642 * # conversion with error checking | |
10643 * value = force_bytes(value) | |
10644 * cdef char * tmp = <char*>value # <<<<<<<<<<<<<< | |
10645 * self.fields[idx] = <char*>malloc((strlen( tmp ) + 1) * sizeof(char)) | |
10646 * if self.fields[idx] == NULL: | |
10647 */ | |
10648 __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_value); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L1_error) | |
10649 __pyx_v_tmp = ((char *)__pyx_t_4); | |
10650 | |
10651 /* "pysam/libctabixproxies.pyx":285 | |
10652 * value = force_bytes(value) | |
10653 * cdef char * tmp = <char*>value | |
10654 * self.fields[idx] = <char*>malloc((strlen( tmp ) + 1) * sizeof(char)) # <<<<<<<<<<<<<< | |
10655 * if self.fields[idx] == NULL: | |
10656 * raise ValueError("out of memory" ) | |
10657 */ | |
10658 (__pyx_v_self->fields[__pyx_v_idx]) = ((char *)malloc(((strlen(__pyx_v_tmp) + 1) * (sizeof(char))))); | |
10659 | |
10660 /* "pysam/libctabixproxies.pyx":286 | |
10661 * cdef char * tmp = <char*>value | |
10662 * self.fields[idx] = <char*>malloc((strlen( tmp ) + 1) * sizeof(char)) | |
10663 * if self.fields[idx] == NULL: # <<<<<<<<<<<<<< | |
10664 * raise ValueError("out of memory" ) | |
10665 * strcpy(self.fields[idx], tmp) | |
10666 */ | |
10667 __pyx_t_2 = ((__pyx_v_self->fields[__pyx_v_idx]) == NULL); | |
10668 if (unlikely(__pyx_t_2)) { | |
10669 | |
10670 /* "pysam/libctabixproxies.pyx":287 | |
10671 * self.fields[idx] = <char*>malloc((strlen( tmp ) + 1) * sizeof(char)) | |
10672 * if self.fields[idx] == NULL: | |
10673 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<< | |
10674 * strcpy(self.fields[idx], tmp) | |
10675 * | |
10676 */ | |
10677 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) | |
10678 __Pyx_GOTREF(__pyx_t_3); | |
10679 __Pyx_Raise(__pyx_t_3, 0, 0, 0); | |
10680 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
10681 __PYX_ERR(0, 287, __pyx_L1_error) | |
10682 | |
10683 /* "pysam/libctabixproxies.pyx":286 | |
10684 * cdef char * tmp = <char*>value | |
10685 * self.fields[idx] = <char*>malloc((strlen( tmp ) + 1) * sizeof(char)) | |
10686 * if self.fields[idx] == NULL: # <<<<<<<<<<<<<< | |
10687 * raise ValueError("out of memory" ) | |
10688 * strcpy(self.fields[idx], tmp) | |
10689 */ | |
10690 } | |
10691 | |
10692 /* "pysam/libctabixproxies.pyx":288 | |
10693 * if self.fields[idx] == NULL: | |
10694 * raise ValueError("out of memory" ) | |
10695 * strcpy(self.fields[idx], tmp) # <<<<<<<<<<<<<< | |
10696 * | |
10697 * def __setitem__(self, index, value): | |
10698 */ | |
10699 (void)(strcpy((__pyx_v_self->fields[__pyx_v_idx]), __pyx_v_tmp)); | |
10700 | |
10701 /* "pysam/libctabixproxies.pyx":265 | |
10702 * return result | |
10703 * | |
10704 * def _setindex(self, index, value): # <<<<<<<<<<<<<< | |
10705 * '''set item at idx index.''' | |
10706 * cdef int idx = index | |
10707 */ | |
10708 | |
10709 /* function exit code */ | |
10710 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
10711 goto __pyx_L0; | |
10712 __pyx_L1_error:; | |
10713 __Pyx_XDECREF(__pyx_t_3); | |
10714 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy._setindex", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
10715 __pyx_r = NULL; | |
10716 __pyx_L0:; | |
10717 __Pyx_XDECREF(__pyx_v_value); | |
10718 __Pyx_XGIVEREF(__pyx_r); | |
10719 __Pyx_RefNannyFinishContext(); | |
10720 return __pyx_r; | |
10721 } | |
10722 | |
10723 /* "pysam/libctabixproxies.pyx":290 | |
10724 * strcpy(self.fields[idx], tmp) | |
10725 * | |
10726 * def __setitem__(self, index, value): # <<<<<<<<<<<<<< | |
10727 * '''set item at *index* to *value*''' | |
10728 * cdef int i = index | |
10729 */ | |
10730 | |
10731 /* Python wrapper */ | |
10732 static int __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_21__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/ | |
10733 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_10TupleProxy_20__setitem__, "set item at *index* to *value*"); | |
10734 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
10735 struct wrapperbase __pyx_wrapperbase_5pysam_16libctabixproxies_10TupleProxy_20__setitem__; | |
10736 #endif | |
10737 static int __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_21__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { | |
10738 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
10739 int __pyx_r; | |
10740 __Pyx_RefNannyDeclarations | |
10741 __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); | |
10742 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
10743 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_20__setitem__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value)); | |
10744 | |
10745 /* function exit code */ | |
10746 __Pyx_RefNannyFinishContext(); | |
10747 return __pyx_r; | |
10748 } | |
10749 | |
10750 static int __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_20__setitem__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { | |
10751 int __pyx_v_i; | |
10752 int __pyx_r; | |
10753 __Pyx_RefNannyDeclarations | |
10754 int __pyx_t_1; | |
10755 int __pyx_t_2; | |
10756 PyObject *__pyx_t_3 = NULL; | |
10757 PyObject *__pyx_t_4 = NULL; | |
10758 PyObject *__pyx_t_5 = NULL; | |
10759 PyObject *__pyx_t_6 = NULL; | |
10760 unsigned int __pyx_t_7; | |
10761 int __pyx_lineno = 0; | |
10762 const char *__pyx_filename = NULL; | |
10763 int __pyx_clineno = 0; | |
10764 __Pyx_RefNannySetupContext("__setitem__", 1); | |
10765 | |
10766 /* "pysam/libctabixproxies.pyx":292 | |
10767 * def __setitem__(self, index, value): | |
10768 * '''set item at *index* to *value*''' | |
10769 * cdef int i = index # <<<<<<<<<<<<<< | |
10770 * if i < 0: | |
10771 * i += self.nfields | |
10772 */ | |
10773 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error) | |
10774 __pyx_v_i = __pyx_t_1; | |
10775 | |
10776 /* "pysam/libctabixproxies.pyx":293 | |
10777 * '''set item at *index* to *value*''' | |
10778 * cdef int i = index | |
10779 * if i < 0: # <<<<<<<<<<<<<< | |
10780 * i += self.nfields | |
10781 * i += self.offset | |
10782 */ | |
10783 __pyx_t_2 = (__pyx_v_i < 0); | |
10784 if (__pyx_t_2) { | |
10785 | |
10786 /* "pysam/libctabixproxies.pyx":294 | |
10787 * cdef int i = index | |
10788 * if i < 0: | |
10789 * i += self.nfields # <<<<<<<<<<<<<< | |
10790 * i += self.offset | |
10791 * | |
10792 */ | |
10793 __pyx_v_i = (__pyx_v_i + __pyx_v_self->nfields); | |
10794 | |
10795 /* "pysam/libctabixproxies.pyx":293 | |
10796 * '''set item at *index* to *value*''' | |
10797 * cdef int i = index | |
10798 * if i < 0: # <<<<<<<<<<<<<< | |
10799 * i += self.nfields | |
10800 * i += self.offset | |
10801 */ | |
10802 } | |
10803 | |
10804 /* "pysam/libctabixproxies.pyx":295 | |
10805 * if i < 0: | |
10806 * i += self.nfields | |
10807 * i += self.offset # <<<<<<<<<<<<<< | |
10808 * | |
10809 * self._setindex(i, value) | |
10810 */ | |
10811 __pyx_v_i = (__pyx_v_i + __pyx_v_self->offset); | |
10812 | |
10813 /* "pysam/libctabixproxies.pyx":297 | |
10814 * i += self.offset | |
10815 * | |
10816 * self._setindex(i, value) # <<<<<<<<<<<<<< | |
10817 * | |
10818 * def __len__(self): | |
10819 */ | |
10820 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error) | |
10821 __Pyx_GOTREF(__pyx_t_4); | |
10822 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 297, __pyx_L1_error) | |
10823 __Pyx_GOTREF(__pyx_t_5); | |
10824 __pyx_t_6 = NULL; | |
10825 __pyx_t_7 = 0; | |
10826 #if CYTHON_UNPACK_METHODS | |
10827 if (likely(PyMethod_Check(__pyx_t_4))) { | |
10828 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); | |
10829 if (likely(__pyx_t_6)) { | |
10830 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); | |
10831 __Pyx_INCREF(__pyx_t_6); | |
10832 __Pyx_INCREF(function); | |
10833 __Pyx_DECREF_SET(__pyx_t_4, function); | |
10834 __pyx_t_7 = 1; | |
10835 } | |
10836 } | |
10837 #endif | |
10838 { | |
10839 PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_5, __pyx_v_value}; | |
10840 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); | |
10841 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
10842 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
10843 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error) | |
10844 __Pyx_GOTREF(__pyx_t_3); | |
10845 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
10846 } | |
10847 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
10848 | |
10849 /* "pysam/libctabixproxies.pyx":290 | |
10850 * strcpy(self.fields[idx], tmp) | |
10851 * | |
10852 * def __setitem__(self, index, value): # <<<<<<<<<<<<<< | |
10853 * '''set item at *index* to *value*''' | |
10854 * cdef int i = index | |
10855 */ | |
10856 | |
10857 /* function exit code */ | |
10858 __pyx_r = 0; | |
10859 goto __pyx_L0; | |
10860 __pyx_L1_error:; | |
10861 __Pyx_XDECREF(__pyx_t_3); | |
10862 __Pyx_XDECREF(__pyx_t_4); | |
10863 __Pyx_XDECREF(__pyx_t_5); | |
10864 __Pyx_XDECREF(__pyx_t_6); | |
10865 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
10866 __pyx_r = -1; | |
10867 __pyx_L0:; | |
10868 __Pyx_RefNannyFinishContext(); | |
10869 return __pyx_r; | |
10870 } | |
10871 | |
10872 /* "pysam/libctabixproxies.pyx":299 | |
10873 * self._setindex(i, value) | |
10874 * | |
10875 * def __len__(self): # <<<<<<<<<<<<<< | |
10876 * return self.nfields | |
10877 * | |
10878 */ | |
10879 | |
10880 /* Python wrapper */ | |
10881 static Py_ssize_t __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_23__len__(PyObject *__pyx_v_self); /*proto*/ | |
10882 static Py_ssize_t __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_23__len__(PyObject *__pyx_v_self) { | |
10883 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
10884 Py_ssize_t __pyx_r; | |
10885 __Pyx_RefNannyDeclarations | |
10886 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); | |
10887 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
10888 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_22__len__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self)); | |
10889 | |
10890 /* function exit code */ | |
10891 __Pyx_RefNannyFinishContext(); | |
10892 return __pyx_r; | |
10893 } | |
10894 | |
10895 static Py_ssize_t __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_22__len__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self) { | |
10896 Py_ssize_t __pyx_r; | |
10897 | |
10898 /* "pysam/libctabixproxies.pyx":300 | |
10899 * | |
10900 * def __len__(self): | |
10901 * return self.nfields # <<<<<<<<<<<<<< | |
10902 * | |
10903 * def __iter__(self): | |
10904 */ | |
10905 __pyx_r = __pyx_v_self->nfields; | |
10906 goto __pyx_L0; | |
10907 | |
10908 /* "pysam/libctabixproxies.pyx":299 | |
10909 * self._setindex(i, value) | |
10910 * | |
10911 * def __len__(self): # <<<<<<<<<<<<<< | |
10912 * return self.nfields | |
10913 * | |
10914 */ | |
10915 | |
10916 /* function exit code */ | |
10917 __pyx_L0:; | |
10918 return __pyx_r; | |
10919 } | |
10920 | |
10921 /* "pysam/libctabixproxies.pyx":302 | |
10922 * return self.nfields | |
10923 * | |
10924 * def __iter__(self): # <<<<<<<<<<<<<< | |
10925 * return TupleProxyIterator(self) | |
10926 * | |
10927 */ | |
10928 | |
10929 /* Python wrapper */ | |
10930 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_25__iter__(PyObject *__pyx_v_self); /*proto*/ | |
10931 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_25__iter__(PyObject *__pyx_v_self) { | |
10932 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
10933 PyObject *__pyx_r = 0; | |
10934 __Pyx_RefNannyDeclarations | |
10935 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); | |
10936 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
10937 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_24__iter__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self)); | |
10938 | |
10939 /* function exit code */ | |
10940 __Pyx_RefNannyFinishContext(); | |
10941 return __pyx_r; | |
10942 } | |
10943 | |
10944 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_24__iter__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self) { | |
10945 PyObject *__pyx_r = NULL; | |
10946 __Pyx_RefNannyDeclarations | |
10947 PyObject *__pyx_t_1 = NULL; | |
10948 int __pyx_lineno = 0; | |
10949 const char *__pyx_filename = NULL; | |
10950 int __pyx_clineno = 0; | |
10951 __Pyx_RefNannySetupContext("__iter__", 1); | |
10952 | |
10953 /* "pysam/libctabixproxies.pyx":303 | |
10954 * | |
10955 * def __iter__(self): | |
10956 * return TupleProxyIterator(self) # <<<<<<<<<<<<<< | |
10957 * | |
10958 * def __str__(self): | |
10959 */ | |
10960 __Pyx_XDECREF(__pyx_r); | |
10961 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) | |
10962 __Pyx_GOTREF(__pyx_t_1); | |
10963 __pyx_r = __pyx_t_1; | |
10964 __pyx_t_1 = 0; | |
10965 goto __pyx_L0; | |
10966 | |
10967 /* "pysam/libctabixproxies.pyx":302 | |
10968 * return self.nfields | |
10969 * | |
10970 * def __iter__(self): # <<<<<<<<<<<<<< | |
10971 * return TupleProxyIterator(self) | |
10972 * | |
10973 */ | |
10974 | |
10975 /* function exit code */ | |
10976 __pyx_L1_error:; | |
10977 __Pyx_XDECREF(__pyx_t_1); | |
10978 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
10979 __pyx_r = NULL; | |
10980 __pyx_L0:; | |
10981 __Pyx_XGIVEREF(__pyx_r); | |
10982 __Pyx_RefNannyFinishContext(); | |
10983 return __pyx_r; | |
10984 } | |
10985 | |
10986 /* "pysam/libctabixproxies.pyx":305 | |
10987 * return TupleProxyIterator(self) | |
10988 * | |
10989 * def __str__(self): # <<<<<<<<<<<<<< | |
10990 * '''return original data''' | |
10991 * # copy and replace \0 bytes with \t characters | |
10992 */ | |
10993 | |
10994 /* Python wrapper */ | |
10995 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_27__str__(PyObject *__pyx_v_self); /*proto*/ | |
10996 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_10TupleProxy_26__str__, "return original data"); | |
10997 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
10998 struct wrapperbase __pyx_wrapperbase_5pysam_16libctabixproxies_10TupleProxy_26__str__; | |
10999 #endif | |
11000 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_27__str__(PyObject *__pyx_v_self) { | |
11001 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
11002 PyObject *__pyx_r = 0; | |
11003 __Pyx_RefNannyDeclarations | |
11004 __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); | |
11005 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
11006 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_26__str__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self)); | |
11007 | |
11008 /* function exit code */ | |
11009 __Pyx_RefNannyFinishContext(); | |
11010 return __pyx_r; | |
11011 } | |
11012 | |
11013 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_26__str__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self) { | |
11014 char *__pyx_v_cpy; | |
11015 PyObject *__pyx_v_result = NULL; | |
11016 long __pyx_v_x; | |
11017 PyObject *__pyx_v_r = NULL; | |
11018 PyObject *__pyx_r = NULL; | |
11019 __Pyx_RefNannyDeclarations | |
11020 PyObject *__pyx_t_1 = NULL; | |
11021 int __pyx_t_2; | |
11022 int __pyx_t_3; | |
11023 long __pyx_t_4; | |
11024 char *__pyx_t_5; | |
11025 PyObject *__pyx_t_6 = NULL; | |
11026 PyObject *__pyx_t_7 = NULL; | |
11027 unsigned int __pyx_t_8; | |
11028 int __pyx_t_9; | |
11029 int __pyx_t_10; | |
11030 int __pyx_lineno = 0; | |
11031 const char *__pyx_filename = NULL; | |
11032 int __pyx_clineno = 0; | |
11033 __Pyx_RefNannySetupContext("__str__", 1); | |
11034 | |
11035 /* "pysam/libctabixproxies.pyx":309 | |
11036 * # copy and replace \0 bytes with \t characters | |
11037 * cdef char * cpy | |
11038 * if self.is_modified: # <<<<<<<<<<<<<< | |
11039 * # todo: treat NULL values | |
11040 * result = [] | |
11041 */ | |
11042 if (__pyx_v_self->is_modified) { | |
11043 | |
11044 /* "pysam/libctabixproxies.pyx":311 | |
11045 * if self.is_modified: | |
11046 * # todo: treat NULL values | |
11047 * result = [] # <<<<<<<<<<<<<< | |
11048 * for x in xrange(0, self.nfields): | |
11049 * result.append(StrOrEmpty(self.fields[x]).decode(self.encoding)) | |
11050 */ | |
11051 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) | |
11052 __Pyx_GOTREF(__pyx_t_1); | |
11053 __pyx_v_result = __pyx_t_1; | |
11054 __pyx_t_1 = 0; | |
11055 | |
11056 /* "pysam/libctabixproxies.pyx":312 | |
11057 * # todo: treat NULL values | |
11058 * result = [] | |
11059 * for x in xrange(0, self.nfields): # <<<<<<<<<<<<<< | |
11060 * result.append(StrOrEmpty(self.fields[x]).decode(self.encoding)) | |
11061 * return "\t".join(result) | |
11062 */ | |
11063 __pyx_t_2 = __pyx_v_self->nfields; | |
11064 __pyx_t_3 = __pyx_t_2; | |
11065 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { | |
11066 __pyx_v_x = __pyx_t_4; | |
11067 | |
11068 /* "pysam/libctabixproxies.pyx":313 | |
11069 * result = [] | |
11070 * for x in xrange(0, self.nfields): | |
11071 * result.append(StrOrEmpty(self.fields[x]).decode(self.encoding)) # <<<<<<<<<<<<<< | |
11072 * return "\t".join(result) | |
11073 * else: | |
11074 */ | |
11075 __pyx_t_5 = __pyx_f_5pysam_16libctabixproxies_StrOrEmpty((__pyx_v_self->fields[__pyx_v_x])); if (unlikely(__pyx_t_5 == ((char *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 313, __pyx_L1_error) | |
11076 __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 313, __pyx_L1_error) | |
11077 __Pyx_GOTREF(__pyx_t_6); | |
11078 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 313, __pyx_L1_error) | |
11079 __Pyx_GOTREF(__pyx_t_7); | |
11080 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
11081 __pyx_t_6 = NULL; | |
11082 __pyx_t_8 = 0; | |
11083 #if CYTHON_UNPACK_METHODS | |
11084 if (likely(PyMethod_Check(__pyx_t_7))) { | |
11085 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); | |
11086 if (likely(__pyx_t_6)) { | |
11087 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); | |
11088 __Pyx_INCREF(__pyx_t_6); | |
11089 __Pyx_INCREF(function); | |
11090 __Pyx_DECREF_SET(__pyx_t_7, function); | |
11091 __pyx_t_8 = 1; | |
11092 } | |
11093 } | |
11094 #endif | |
11095 { | |
11096 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_self->encoding}; | |
11097 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); | |
11098 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
11099 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) | |
11100 __Pyx_GOTREF(__pyx_t_1); | |
11101 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; | |
11102 } | |
11103 __pyx_t_9 = __Pyx_PyObject_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 313, __pyx_L1_error) | |
11104 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
11105 } | |
11106 | |
11107 /* "pysam/libctabixproxies.pyx":314 | |
11108 * for x in xrange(0, self.nfields): | |
11109 * result.append(StrOrEmpty(self.fields[x]).decode(self.encoding)) | |
11110 * return "\t".join(result) # <<<<<<<<<<<<<< | |
11111 * else: | |
11112 * cpy = <char*>calloc(sizeof(char), self.nbytes+1) | |
11113 */ | |
11114 __Pyx_XDECREF(__pyx_r); | |
11115 __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__11, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error) | |
11116 __Pyx_GOTREF(__pyx_t_1); | |
11117 __pyx_r = __pyx_t_1; | |
11118 __pyx_t_1 = 0; | |
11119 goto __pyx_L0; | |
11120 | |
11121 /* "pysam/libctabixproxies.pyx":309 | |
11122 * # copy and replace \0 bytes with \t characters | |
11123 * cdef char * cpy | |
11124 * if self.is_modified: # <<<<<<<<<<<<<< | |
11125 * # todo: treat NULL values | |
11126 * result = [] | |
11127 */ | |
11128 } | |
11129 | |
11130 /* "pysam/libctabixproxies.pyx":316 | |
11131 * return "\t".join(result) | |
11132 * else: | |
11133 * cpy = <char*>calloc(sizeof(char), self.nbytes+1) # <<<<<<<<<<<<<< | |
11134 * if cpy == NULL: | |
11135 * raise ValueError("out of memory") | |
11136 */ | |
11137 /*else*/ { | |
11138 __pyx_v_cpy = ((char *)calloc((sizeof(char)), (__pyx_v_self->nbytes + 1))); | |
11139 | |
11140 /* "pysam/libctabixproxies.pyx":317 | |
11141 * else: | |
11142 * cpy = <char*>calloc(sizeof(char), self.nbytes+1) | |
11143 * if cpy == NULL: # <<<<<<<<<<<<<< | |
11144 * raise ValueError("out of memory") | |
11145 * memcpy(cpy, self.data, self.nbytes+1) | |
11146 */ | |
11147 __pyx_t_10 = (__pyx_v_cpy == NULL); | |
11148 if (unlikely(__pyx_t_10)) { | |
11149 | |
11150 /* "pysam/libctabixproxies.pyx":318 | |
11151 * cpy = <char*>calloc(sizeof(char), self.nbytes+1) | |
11152 * if cpy == NULL: | |
11153 * raise ValueError("out of memory") # <<<<<<<<<<<<<< | |
11154 * memcpy(cpy, self.data, self.nbytes+1) | |
11155 * for x from 0 <= x < self.nbytes: | |
11156 */ | |
11157 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error) | |
11158 __Pyx_GOTREF(__pyx_t_1); | |
11159 __Pyx_Raise(__pyx_t_1, 0, 0, 0); | |
11160 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
11161 __PYX_ERR(0, 318, __pyx_L1_error) | |
11162 | |
11163 /* "pysam/libctabixproxies.pyx":317 | |
11164 * else: | |
11165 * cpy = <char*>calloc(sizeof(char), self.nbytes+1) | |
11166 * if cpy == NULL: # <<<<<<<<<<<<<< | |
11167 * raise ValueError("out of memory") | |
11168 * memcpy(cpy, self.data, self.nbytes+1) | |
11169 */ | |
11170 } | |
11171 | |
11172 /* "pysam/libctabixproxies.pyx":319 | |
11173 * if cpy == NULL: | |
11174 * raise ValueError("out of memory") | |
11175 * memcpy(cpy, self.data, self.nbytes+1) # <<<<<<<<<<<<<< | |
11176 * for x from 0 <= x < self.nbytes: | |
11177 * if cpy[x] == b'\0': | |
11178 */ | |
11179 (void)(memcpy(__pyx_v_cpy, __pyx_v_self->data, (__pyx_v_self->nbytes + 1))); | |
11180 | |
11181 /* "pysam/libctabixproxies.pyx":320 | |
11182 * raise ValueError("out of memory") | |
11183 * memcpy(cpy, self.data, self.nbytes+1) | |
11184 * for x from 0 <= x < self.nbytes: # <<<<<<<<<<<<<< | |
11185 * if cpy[x] == b'\0': | |
11186 * cpy[x] = b'\t' | |
11187 */ | |
11188 __pyx_t_2 = __pyx_v_self->nbytes; | |
11189 for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) { | |
11190 | |
11191 /* "pysam/libctabixproxies.pyx":321 | |
11192 * memcpy(cpy, self.data, self.nbytes+1) | |
11193 * for x from 0 <= x < self.nbytes: | |
11194 * if cpy[x] == b'\0': # <<<<<<<<<<<<<< | |
11195 * cpy[x] = b'\t' | |
11196 * result = cpy[:self.nbytes] | |
11197 */ | |
11198 __pyx_t_10 = ((__pyx_v_cpy[__pyx_v_x]) == '\x00'); | |
11199 if (__pyx_t_10) { | |
11200 | |
11201 /* "pysam/libctabixproxies.pyx":322 | |
11202 * for x from 0 <= x < self.nbytes: | |
11203 * if cpy[x] == b'\0': | |
11204 * cpy[x] = b'\t' # <<<<<<<<<<<<<< | |
11205 * result = cpy[:self.nbytes] | |
11206 * free(cpy) | |
11207 */ | |
11208 (__pyx_v_cpy[__pyx_v_x]) = '\t'; | |
11209 | |
11210 /* "pysam/libctabixproxies.pyx":321 | |
11211 * memcpy(cpy, self.data, self.nbytes+1) | |
11212 * for x from 0 <= x < self.nbytes: | |
11213 * if cpy[x] == b'\0': # <<<<<<<<<<<<<< | |
11214 * cpy[x] = b'\t' | |
11215 * result = cpy[:self.nbytes] | |
11216 */ | |
11217 } | |
11218 } | |
11219 | |
11220 /* "pysam/libctabixproxies.pyx":323 | |
11221 * if cpy[x] == b'\0': | |
11222 * cpy[x] = b'\t' | |
11223 * result = cpy[:self.nbytes] # <<<<<<<<<<<<<< | |
11224 * free(cpy) | |
11225 * r = result.decode(self.encoding) | |
11226 */ | |
11227 __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cpy + 0, __pyx_v_self->nbytes - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) | |
11228 __Pyx_GOTREF(__pyx_t_1); | |
11229 __pyx_v_result = __pyx_t_1; | |
11230 __pyx_t_1 = 0; | |
11231 | |
11232 /* "pysam/libctabixproxies.pyx":324 | |
11233 * cpy[x] = b'\t' | |
11234 * result = cpy[:self.nbytes] | |
11235 * free(cpy) # <<<<<<<<<<<<<< | |
11236 * r = result.decode(self.encoding) | |
11237 * return r | |
11238 */ | |
11239 free(__pyx_v_cpy); | |
11240 | |
11241 /* "pysam/libctabixproxies.pyx":325 | |
11242 * result = cpy[:self.nbytes] | |
11243 * free(cpy) | |
11244 * r = result.decode(self.encoding) # <<<<<<<<<<<<<< | |
11245 * return r | |
11246 * | |
11247 */ | |
11248 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_decode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 325, __pyx_L1_error) | |
11249 __Pyx_GOTREF(__pyx_t_7); | |
11250 __pyx_t_6 = NULL; | |
11251 __pyx_t_8 = 0; | |
11252 #if CYTHON_UNPACK_METHODS | |
11253 if (likely(PyMethod_Check(__pyx_t_7))) { | |
11254 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); | |
11255 if (likely(__pyx_t_6)) { | |
11256 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); | |
11257 __Pyx_INCREF(__pyx_t_6); | |
11258 __Pyx_INCREF(function); | |
11259 __Pyx_DECREF_SET(__pyx_t_7, function); | |
11260 __pyx_t_8 = 1; | |
11261 } | |
11262 } | |
11263 #endif | |
11264 { | |
11265 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_self->encoding}; | |
11266 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); | |
11267 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
11268 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error) | |
11269 __Pyx_GOTREF(__pyx_t_1); | |
11270 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; | |
11271 } | |
11272 __pyx_v_r = __pyx_t_1; | |
11273 __pyx_t_1 = 0; | |
11274 | |
11275 /* "pysam/libctabixproxies.pyx":326 | |
11276 * free(cpy) | |
11277 * r = result.decode(self.encoding) | |
11278 * return r # <<<<<<<<<<<<<< | |
11279 * | |
11280 * | |
11281 */ | |
11282 __Pyx_XDECREF(__pyx_r); | |
11283 __Pyx_INCREF(__pyx_v_r); | |
11284 __pyx_r = __pyx_v_r; | |
11285 goto __pyx_L0; | |
11286 } | |
11287 | |
11288 /* "pysam/libctabixproxies.pyx":305 | |
11289 * return TupleProxyIterator(self) | |
11290 * | |
11291 * def __str__(self): # <<<<<<<<<<<<<< | |
11292 * '''return original data''' | |
11293 * # copy and replace \0 bytes with \t characters | |
11294 */ | |
11295 | |
11296 /* function exit code */ | |
11297 __pyx_L1_error:; | |
11298 __Pyx_XDECREF(__pyx_t_1); | |
11299 __Pyx_XDECREF(__pyx_t_6); | |
11300 __Pyx_XDECREF(__pyx_t_7); | |
11301 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
11302 __pyx_r = NULL; | |
11303 __pyx_L0:; | |
11304 __Pyx_XDECREF(__pyx_v_result); | |
11305 __Pyx_XDECREF(__pyx_v_r); | |
11306 __Pyx_XGIVEREF(__pyx_r); | |
11307 __Pyx_RefNannyFinishContext(); | |
11308 return __pyx_r; | |
11309 } | |
11310 | |
11311 /* "(tree fragment)":1 | |
11312 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
11313 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
11314 * def __setstate_cython__(self, __pyx_state): | |
11315 */ | |
11316 | |
11317 /* Python wrapper */ | |
11318 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_29__reduce_cython__(PyObject *__pyx_v_self, | |
11319 #if CYTHON_METH_FASTCALL | |
11320 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
11321 #else | |
11322 PyObject *__pyx_args, PyObject *__pyx_kwds | |
11323 #endif | |
11324 ); /*proto*/ | |
11325 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_29__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_29__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
11326 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_29__reduce_cython__(PyObject *__pyx_v_self, | |
11327 #if CYTHON_METH_FASTCALL | |
11328 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
11329 #else | |
11330 PyObject *__pyx_args, PyObject *__pyx_kwds | |
11331 #endif | |
11332 ) { | |
11333 #if !CYTHON_METH_FASTCALL | |
11334 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
11335 #endif | |
11336 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
11337 PyObject *__pyx_r = 0; | |
11338 __Pyx_RefNannyDeclarations | |
11339 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); | |
11340 #if !CYTHON_METH_FASTCALL | |
11341 #if CYTHON_ASSUME_SAFE_MACROS | |
11342 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
11343 #else | |
11344 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
11345 #endif | |
11346 #endif | |
11347 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
11348 if (unlikely(__pyx_nargs > 0)) { | |
11349 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} | |
11350 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; | |
11351 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_28__reduce_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self)); | |
11352 | |
11353 /* function exit code */ | |
11354 __Pyx_RefNannyFinishContext(); | |
11355 return __pyx_r; | |
11356 } | |
11357 | |
11358 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self) { | |
11359 PyObject *__pyx_r = NULL; | |
11360 __Pyx_RefNannyDeclarations | |
11361 int __pyx_lineno = 0; | |
11362 const char *__pyx_filename = NULL; | |
11363 int __pyx_clineno = 0; | |
11364 __Pyx_RefNannySetupContext("__reduce_cython__", 1); | |
11365 | |
11366 /* "(tree fragment)":2 | |
11367 * def __reduce_cython__(self): | |
11368 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
11369 * def __setstate_cython__(self, __pyx_state): | |
11370 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
11371 */ | |
11372 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
11373 __PYX_ERR(1, 2, __pyx_L1_error) | |
11374 | |
11375 /* "(tree fragment)":1 | |
11376 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
11377 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
11378 * def __setstate_cython__(self, __pyx_state): | |
11379 */ | |
11380 | |
11381 /* function exit code */ | |
11382 __pyx_L1_error:; | |
11383 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
11384 __pyx_r = NULL; | |
11385 __Pyx_XGIVEREF(__pyx_r); | |
11386 __Pyx_RefNannyFinishContext(); | |
11387 return __pyx_r; | |
11388 } | |
11389 | |
11390 /* "(tree fragment)":3 | |
11391 * def __reduce_cython__(self): | |
11392 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
11393 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
11394 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
11395 */ | |
11396 | |
11397 /* Python wrapper */ | |
11398 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_31__setstate_cython__(PyObject *__pyx_v_self, | |
11399 #if CYTHON_METH_FASTCALL | |
11400 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
11401 #else | |
11402 PyObject *__pyx_args, PyObject *__pyx_kwds | |
11403 #endif | |
11404 ); /*proto*/ | |
11405 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_31__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_31__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
11406 static PyObject *__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_31__setstate_cython__(PyObject *__pyx_v_self, | |
11407 #if CYTHON_METH_FASTCALL | |
11408 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
11409 #else | |
11410 PyObject *__pyx_args, PyObject *__pyx_kwds | |
11411 #endif | |
11412 ) { | |
11413 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; | |
11414 #if !CYTHON_METH_FASTCALL | |
11415 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
11416 #endif | |
11417 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
11418 PyObject* values[1] = {0}; | |
11419 int __pyx_lineno = 0; | |
11420 const char *__pyx_filename = NULL; | |
11421 int __pyx_clineno = 0; | |
11422 PyObject *__pyx_r = 0; | |
11423 __Pyx_RefNannyDeclarations | |
11424 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); | |
11425 #if !CYTHON_METH_FASTCALL | |
11426 #if CYTHON_ASSUME_SAFE_MACROS | |
11427 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
11428 #else | |
11429 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
11430 #endif | |
11431 #endif | |
11432 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
11433 { | |
11434 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; | |
11435 if (__pyx_kwds) { | |
11436 Py_ssize_t kw_args; | |
11437 switch (__pyx_nargs) { | |
11438 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
11439 CYTHON_FALLTHROUGH; | |
11440 case 0: break; | |
11441 default: goto __pyx_L5_argtuple_error; | |
11442 } | |
11443 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
11444 switch (__pyx_nargs) { | |
11445 case 0: | |
11446 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { | |
11447 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
11448 kw_args--; | |
11449 } | |
11450 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) | |
11451 else goto __pyx_L5_argtuple_error; | |
11452 } | |
11453 if (unlikely(kw_args > 0)) { | |
11454 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
11455 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) | |
11456 } | |
11457 } else if (unlikely(__pyx_nargs != 1)) { | |
11458 goto __pyx_L5_argtuple_error; | |
11459 } else { | |
11460 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
11461 } | |
11462 __pyx_v___pyx_state = values[0]; | |
11463 } | |
11464 goto __pyx_L6_skip; | |
11465 __pyx_L5_argtuple_error:; | |
11466 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) | |
11467 __pyx_L6_skip:; | |
11468 goto __pyx_L4_argument_unpacking_done; | |
11469 __pyx_L3_error:; | |
11470 { | |
11471 Py_ssize_t __pyx_temp; | |
11472 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
11473 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
11474 } | |
11475 } | |
11476 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
11477 __Pyx_RefNannyFinishContext(); | |
11478 return NULL; | |
11479 __pyx_L4_argument_unpacking_done:; | |
11480 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_10TupleProxy_30__setstate_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self), __pyx_v___pyx_state); | |
11481 | |
11482 /* function exit code */ | |
11483 { | |
11484 Py_ssize_t __pyx_temp; | |
11485 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
11486 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
11487 } | |
11488 } | |
11489 __Pyx_RefNannyFinishContext(); | |
11490 return __pyx_r; | |
11491 } | |
11492 | |
11493 static PyObject *__pyx_pf_5pysam_16libctabixproxies_10TupleProxy_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { | |
11494 PyObject *__pyx_r = NULL; | |
11495 __Pyx_RefNannyDeclarations | |
11496 int __pyx_lineno = 0; | |
11497 const char *__pyx_filename = NULL; | |
11498 int __pyx_clineno = 0; | |
11499 __Pyx_RefNannySetupContext("__setstate_cython__", 1); | |
11500 | |
11501 /* "(tree fragment)":4 | |
11502 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
11503 * def __setstate_cython__(self, __pyx_state): | |
11504 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
11505 */ | |
11506 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
11507 __PYX_ERR(1, 4, __pyx_L1_error) | |
11508 | |
11509 /* "(tree fragment)":3 | |
11510 * def __reduce_cython__(self): | |
11511 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
11512 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
11513 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
11514 */ | |
11515 | |
11516 /* function exit code */ | |
11517 __pyx_L1_error:; | |
11518 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
11519 __pyx_r = NULL; | |
11520 __Pyx_XGIVEREF(__pyx_r); | |
11521 __Pyx_RefNannyFinishContext(); | |
11522 return __pyx_r; | |
11523 } | |
11524 | |
11525 /* "pysam/libctabixproxies.pyx":330 | |
11526 * | |
11527 * cdef class TupleProxyIterator: | |
11528 * def __init__(self, proxy): # <<<<<<<<<<<<<< | |
11529 * self.proxy = proxy | |
11530 * self.index = 0 | |
11531 */ | |
11532 | |
11533 /* Python wrapper */ | |
11534 static int __pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ | |
11535 static int __pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { | |
11536 PyObject *__pyx_v_proxy = 0; | |
11537 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
11538 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
11539 PyObject* values[1] = {0}; | |
11540 int __pyx_lineno = 0; | |
11541 const char *__pyx_filename = NULL; | |
11542 int __pyx_clineno = 0; | |
11543 int __pyx_r; | |
11544 __Pyx_RefNannyDeclarations | |
11545 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); | |
11546 #if CYTHON_ASSUME_SAFE_MACROS | |
11547 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
11548 #else | |
11549 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; | |
11550 #endif | |
11551 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
11552 { | |
11553 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_proxy,0}; | |
11554 if (__pyx_kwds) { | |
11555 Py_ssize_t kw_args; | |
11556 switch (__pyx_nargs) { | |
11557 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); | |
11558 CYTHON_FALLTHROUGH; | |
11559 case 0: break; | |
11560 default: goto __pyx_L5_argtuple_error; | |
11561 } | |
11562 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); | |
11563 switch (__pyx_nargs) { | |
11564 case 0: | |
11565 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_proxy)) != 0)) { | |
11566 (void)__Pyx_Arg_NewRef_VARARGS(values[0]); | |
11567 kw_args--; | |
11568 } | |
11569 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 330, __pyx_L3_error) | |
11570 else goto __pyx_L5_argtuple_error; | |
11571 } | |
11572 if (unlikely(kw_args > 0)) { | |
11573 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
11574 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 330, __pyx_L3_error) | |
11575 } | |
11576 } else if (unlikely(__pyx_nargs != 1)) { | |
11577 goto __pyx_L5_argtuple_error; | |
11578 } else { | |
11579 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); | |
11580 } | |
11581 __pyx_v_proxy = values[0]; | |
11582 } | |
11583 goto __pyx_L6_skip; | |
11584 __pyx_L5_argtuple_error:; | |
11585 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 330, __pyx_L3_error) | |
11586 __pyx_L6_skip:; | |
11587 goto __pyx_L4_argument_unpacking_done; | |
11588 __pyx_L3_error:; | |
11589 { | |
11590 Py_ssize_t __pyx_temp; | |
11591 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
11592 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); | |
11593 } | |
11594 } | |
11595 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxyIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
11596 __Pyx_RefNannyFinishContext(); | |
11597 return -1; | |
11598 __pyx_L4_argument_unpacking_done:; | |
11599 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator___init__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *)__pyx_v_self), __pyx_v_proxy); | |
11600 | |
11601 /* function exit code */ | |
11602 { | |
11603 Py_ssize_t __pyx_temp; | |
11604 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
11605 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); | |
11606 } | |
11607 } | |
11608 __Pyx_RefNannyFinishContext(); | |
11609 return __pyx_r; | |
11610 } | |
11611 | |
11612 static int __pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator___init__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *__pyx_v_self, PyObject *__pyx_v_proxy) { | |
11613 int __pyx_r; | |
11614 __Pyx_RefNannyDeclarations | |
11615 PyObject *__pyx_t_1 = NULL; | |
11616 int __pyx_lineno = 0; | |
11617 const char *__pyx_filename = NULL; | |
11618 int __pyx_clineno = 0; | |
11619 __Pyx_RefNannySetupContext("__init__", 1); | |
11620 | |
11621 /* "pysam/libctabixproxies.pyx":331 | |
11622 * cdef class TupleProxyIterator: | |
11623 * def __init__(self, proxy): | |
11624 * self.proxy = proxy # <<<<<<<<<<<<<< | |
11625 * self.index = 0 | |
11626 * | |
11627 */ | |
11628 if (!(likely(((__pyx_v_proxy) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_proxy, __pyx_ptype_5pysam_16libctabixproxies_TupleProxy))))) __PYX_ERR(0, 331, __pyx_L1_error) | |
11629 __pyx_t_1 = __pyx_v_proxy; | |
11630 __Pyx_INCREF(__pyx_t_1); | |
11631 __Pyx_GIVEREF(__pyx_t_1); | |
11632 __Pyx_GOTREF((PyObject *)__pyx_v_self->proxy); | |
11633 __Pyx_DECREF((PyObject *)__pyx_v_self->proxy); | |
11634 __pyx_v_self->proxy = ((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_t_1); | |
11635 __pyx_t_1 = 0; | |
11636 | |
11637 /* "pysam/libctabixproxies.pyx":332 | |
11638 * def __init__(self, proxy): | |
11639 * self.proxy = proxy | |
11640 * self.index = 0 # <<<<<<<<<<<<<< | |
11641 * | |
11642 * def __iter__(self): | |
11643 */ | |
11644 __pyx_v_self->index = 0; | |
11645 | |
11646 /* "pysam/libctabixproxies.pyx":330 | |
11647 * | |
11648 * cdef class TupleProxyIterator: | |
11649 * def __init__(self, proxy): # <<<<<<<<<<<<<< | |
11650 * self.proxy = proxy | |
11651 * self.index = 0 | |
11652 */ | |
11653 | |
11654 /* function exit code */ | |
11655 __pyx_r = 0; | |
11656 goto __pyx_L0; | |
11657 __pyx_L1_error:; | |
11658 __Pyx_XDECREF(__pyx_t_1); | |
11659 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxyIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
11660 __pyx_r = -1; | |
11661 __pyx_L0:; | |
11662 __Pyx_RefNannyFinishContext(); | |
11663 return __pyx_r; | |
11664 } | |
11665 | |
11666 /* "pysam/libctabixproxies.pyx":334 | |
11667 * self.index = 0 | |
11668 * | |
11669 * def __iter__(self): # <<<<<<<<<<<<<< | |
11670 * return self | |
11671 * | |
11672 */ | |
11673 | |
11674 /* Python wrapper */ | |
11675 static PyObject *__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/ | |
11676 static PyObject *__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_3__iter__(PyObject *__pyx_v_self) { | |
11677 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
11678 PyObject *__pyx_r = 0; | |
11679 __Pyx_RefNannyDeclarations | |
11680 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); | |
11681 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
11682 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_2__iter__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *)__pyx_v_self)); | |
11683 | |
11684 /* function exit code */ | |
11685 __Pyx_RefNannyFinishContext(); | |
11686 return __pyx_r; | |
11687 } | |
11688 | |
11689 static PyObject *__pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_2__iter__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *__pyx_v_self) { | |
11690 PyObject *__pyx_r = NULL; | |
11691 __Pyx_RefNannyDeclarations | |
11692 __Pyx_RefNannySetupContext("__iter__", 1); | |
11693 | |
11694 /* "pysam/libctabixproxies.pyx":335 | |
11695 * | |
11696 * def __iter__(self): | |
11697 * return self # <<<<<<<<<<<<<< | |
11698 * | |
11699 * def __next__(self): | |
11700 */ | |
11701 __Pyx_XDECREF(__pyx_r); | |
11702 __Pyx_INCREF((PyObject *)__pyx_v_self); | |
11703 __pyx_r = ((PyObject *)__pyx_v_self); | |
11704 goto __pyx_L0; | |
11705 | |
11706 /* "pysam/libctabixproxies.pyx":334 | |
11707 * self.index = 0 | |
11708 * | |
11709 * def __iter__(self): # <<<<<<<<<<<<<< | |
11710 * return self | |
11711 * | |
11712 */ | |
11713 | |
11714 /* function exit code */ | |
11715 __pyx_L0:; | |
11716 __Pyx_XGIVEREF(__pyx_r); | |
11717 __Pyx_RefNannyFinishContext(); | |
11718 return __pyx_r; | |
11719 } | |
11720 | |
11721 /* "pysam/libctabixproxies.pyx":337 | |
11722 * return self | |
11723 * | |
11724 * def __next__(self): # <<<<<<<<<<<<<< | |
11725 * if self.index >= self.proxy.nfields: | |
11726 * raise StopIteration | |
11727 */ | |
11728 | |
11729 /* Python wrapper */ | |
11730 static PyObject *__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_5__next__(PyObject *__pyx_v_self); /*proto*/ | |
11731 static PyObject *__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_5__next__(PyObject *__pyx_v_self) { | |
11732 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
11733 PyObject *__pyx_r = 0; | |
11734 __Pyx_RefNannyDeclarations | |
11735 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0); | |
11736 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
11737 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_4__next__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *)__pyx_v_self)); | |
11738 | |
11739 /* function exit code */ | |
11740 __Pyx_RefNannyFinishContext(); | |
11741 return __pyx_r; | |
11742 } | |
11743 | |
11744 static PyObject *__pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_4__next__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *__pyx_v_self) { | |
11745 char *__pyx_v_retval; | |
11746 PyObject *__pyx_r = NULL; | |
11747 __Pyx_RefNannyDeclarations | |
11748 int __pyx_error_without_exception = 0; /* StopIteration */ | |
11749 int __pyx_t_1; | |
11750 PyObject *__pyx_t_2 = NULL; | |
11751 PyObject *__pyx_t_3 = NULL; | |
11752 PyObject *__pyx_t_4 = NULL; | |
11753 PyObject *__pyx_t_5 = NULL; | |
11754 struct __pyx_opt_args_5pysam_9libcutils_force_str __pyx_t_6; | |
11755 int __pyx_lineno = 0; | |
11756 const char *__pyx_filename = NULL; | |
11757 int __pyx_clineno = 0; | |
11758 __Pyx_RefNannySetupContext("__next__", 1); | |
11759 | |
11760 /* "pysam/libctabixproxies.pyx":338 | |
11761 * | |
11762 * def __next__(self): | |
11763 * if self.index >= self.proxy.nfields: # <<<<<<<<<<<<<< | |
11764 * raise StopIteration | |
11765 * cdef char *retval = self.proxy.fields[self.index] | |
11766 */ | |
11767 __pyx_t_1 = (__pyx_v_self->index >= __pyx_v_self->proxy->nfields); | |
11768 if (unlikely(__pyx_t_1)) { | |
11769 | |
11770 /* "pysam/libctabixproxies.pyx":339 | |
11771 * def __next__(self): | |
11772 * if self.index >= self.proxy.nfields: | |
11773 * raise StopIteration # <<<<<<<<<<<<<< | |
11774 * cdef char *retval = self.proxy.fields[self.index] | |
11775 * self.index += 1 | |
11776 */ | |
11777 __pyx_error_without_exception = 1; | |
11778 goto __pyx_L1_error;; | |
11779 | |
11780 /* "pysam/libctabixproxies.pyx":338 | |
11781 * | |
11782 * def __next__(self): | |
11783 * if self.index >= self.proxy.nfields: # <<<<<<<<<<<<<< | |
11784 * raise StopIteration | |
11785 * cdef char *retval = self.proxy.fields[self.index] | |
11786 */ | |
11787 } | |
11788 | |
11789 /* "pysam/libctabixproxies.pyx":340 | |
11790 * if self.index >= self.proxy.nfields: | |
11791 * raise StopIteration | |
11792 * cdef char *retval = self.proxy.fields[self.index] # <<<<<<<<<<<<<< | |
11793 * self.index += 1 | |
11794 * return force_str(retval, self.proxy.encoding) if retval != NULL else None | |
11795 */ | |
11796 __pyx_v_retval = (__pyx_v_self->proxy->fields[__pyx_v_self->index]); | |
11797 | |
11798 /* "pysam/libctabixproxies.pyx":341 | |
11799 * raise StopIteration | |
11800 * cdef char *retval = self.proxy.fields[self.index] | |
11801 * self.index += 1 # <<<<<<<<<<<<<< | |
11802 * return force_str(retval, self.proxy.encoding) if retval != NULL else None | |
11803 * | |
11804 */ | |
11805 __pyx_v_self->index = (__pyx_v_self->index + 1); | |
11806 | |
11807 /* "pysam/libctabixproxies.pyx":342 | |
11808 * cdef char *retval = self.proxy.fields[self.index] | |
11809 * self.index += 1 | |
11810 * return force_str(retval, self.proxy.encoding) if retval != NULL else None # <<<<<<<<<<<<<< | |
11811 * | |
11812 * | |
11813 */ | |
11814 __Pyx_XDECREF(__pyx_r); | |
11815 __pyx_t_1 = (__pyx_v_retval != NULL); | |
11816 if (__pyx_t_1) { | |
11817 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_retval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) | |
11818 __Pyx_GOTREF(__pyx_t_3); | |
11819 __pyx_t_4 = __pyx_v_self->proxy->encoding; | |
11820 __Pyx_INCREF(__pyx_t_4); | |
11821 __pyx_t_6.__pyx_n = 1; | |
11822 __pyx_t_6.encoding = __pyx_t_4; | |
11823 __pyx_t_5 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_3, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L1_error) | |
11824 __Pyx_GOTREF(__pyx_t_5); | |
11825 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
11826 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
11827 __pyx_t_2 = __pyx_t_5; | |
11828 __pyx_t_5 = 0; | |
11829 } else { | |
11830 __Pyx_INCREF(Py_None); | |
11831 __pyx_t_2 = Py_None; | |
11832 } | |
11833 __pyx_r = __pyx_t_2; | |
11834 __pyx_t_2 = 0; | |
11835 goto __pyx_L0; | |
11836 | |
11837 /* "pysam/libctabixproxies.pyx":337 | |
11838 * return self | |
11839 * | |
11840 * def __next__(self): # <<<<<<<<<<<<<< | |
11841 * if self.index >= self.proxy.nfields: | |
11842 * raise StopIteration | |
11843 */ | |
11844 | |
11845 /* function exit code */ | |
11846 __pyx_L1_error:; | |
11847 __Pyx_XDECREF(__pyx_t_2); | |
11848 __Pyx_XDECREF(__pyx_t_3); | |
11849 __Pyx_XDECREF(__pyx_t_4); | |
11850 __Pyx_XDECREF(__pyx_t_5); | |
11851 if (!__pyx_error_without_exception) { | |
11852 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxyIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
11853 } | |
11854 __pyx_r = NULL; | |
11855 __pyx_L0:; | |
11856 __Pyx_XGIVEREF(__pyx_r); | |
11857 __Pyx_RefNannyFinishContext(); | |
11858 return __pyx_r; | |
11859 } | |
11860 | |
11861 /* "(tree fragment)":1 | |
11862 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
11863 * cdef tuple state | |
11864 * cdef object _dict | |
11865 */ | |
11866 | |
11867 /* Python wrapper */ | |
11868 static PyObject *__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_7__reduce_cython__(PyObject *__pyx_v_self, | |
11869 #if CYTHON_METH_FASTCALL | |
11870 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
11871 #else | |
11872 PyObject *__pyx_args, PyObject *__pyx_kwds | |
11873 #endif | |
11874 ); /*proto*/ | |
11875 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_18TupleProxyIterator_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
11876 static PyObject *__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_7__reduce_cython__(PyObject *__pyx_v_self, | |
11877 #if CYTHON_METH_FASTCALL | |
11878 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
11879 #else | |
11880 PyObject *__pyx_args, PyObject *__pyx_kwds | |
11881 #endif | |
11882 ) { | |
11883 #if !CYTHON_METH_FASTCALL | |
11884 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
11885 #endif | |
11886 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
11887 PyObject *__pyx_r = 0; | |
11888 __Pyx_RefNannyDeclarations | |
11889 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); | |
11890 #if !CYTHON_METH_FASTCALL | |
11891 #if CYTHON_ASSUME_SAFE_MACROS | |
11892 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
11893 #else | |
11894 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
11895 #endif | |
11896 #endif | |
11897 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
11898 if (unlikely(__pyx_nargs > 0)) { | |
11899 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} | |
11900 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; | |
11901 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_6__reduce_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *)__pyx_v_self)); | |
11902 | |
11903 /* function exit code */ | |
11904 __Pyx_RefNannyFinishContext(); | |
11905 return __pyx_r; | |
11906 } | |
11907 | |
11908 static PyObject *__pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_6__reduce_cython__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *__pyx_v_self) { | |
11909 PyObject *__pyx_v_state = 0; | |
11910 PyObject *__pyx_v__dict = 0; | |
11911 int __pyx_v_use_setstate; | |
11912 PyObject *__pyx_r = NULL; | |
11913 __Pyx_RefNannyDeclarations | |
11914 PyObject *__pyx_t_1 = NULL; | |
11915 PyObject *__pyx_t_2 = NULL; | |
11916 int __pyx_t_3; | |
11917 PyObject *__pyx_t_4 = NULL; | |
11918 int __pyx_lineno = 0; | |
11919 const char *__pyx_filename = NULL; | |
11920 int __pyx_clineno = 0; | |
11921 __Pyx_RefNannySetupContext("__reduce_cython__", 1); | |
11922 | |
11923 /* "(tree fragment)":5 | |
11924 * cdef object _dict | |
11925 * cdef bint use_setstate | |
11926 * state = (self.index, self.proxy) # <<<<<<<<<<<<<< | |
11927 * _dict = getattr(self, '__dict__', None) | |
11928 * if _dict is not None: | |
11929 */ | |
11930 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) | |
11931 __Pyx_GOTREF(__pyx_t_1); | |
11932 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) | |
11933 __Pyx_GOTREF(__pyx_t_2); | |
11934 __Pyx_GIVEREF(__pyx_t_1); | |
11935 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error); | |
11936 __Pyx_INCREF((PyObject *)__pyx_v_self->proxy); | |
11937 __Pyx_GIVEREF((PyObject *)__pyx_v_self->proxy); | |
11938 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->proxy))) __PYX_ERR(1, 5, __pyx_L1_error); | |
11939 __pyx_t_1 = 0; | |
11940 __pyx_v_state = ((PyObject*)__pyx_t_2); | |
11941 __pyx_t_2 = 0; | |
11942 | |
11943 /* "(tree fragment)":6 | |
11944 * cdef bint use_setstate | |
11945 * state = (self.index, self.proxy) | |
11946 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< | |
11947 * if _dict is not None: | |
11948 * state += (_dict,) | |
11949 */ | |
11950 __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) | |
11951 __Pyx_GOTREF(__pyx_t_2); | |
11952 __pyx_v__dict = __pyx_t_2; | |
11953 __pyx_t_2 = 0; | |
11954 | |
11955 /* "(tree fragment)":7 | |
11956 * state = (self.index, self.proxy) | |
11957 * _dict = getattr(self, '__dict__', None) | |
11958 * if _dict is not None: # <<<<<<<<<<<<<< | |
11959 * state += (_dict,) | |
11960 * use_setstate = True | |
11961 */ | |
11962 __pyx_t_3 = (__pyx_v__dict != Py_None); | |
11963 if (__pyx_t_3) { | |
11964 | |
11965 /* "(tree fragment)":8 | |
11966 * _dict = getattr(self, '__dict__', None) | |
11967 * if _dict is not None: | |
11968 * state += (_dict,) # <<<<<<<<<<<<<< | |
11969 * use_setstate = True | |
11970 * else: | |
11971 */ | |
11972 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) | |
11973 __Pyx_GOTREF(__pyx_t_2); | |
11974 __Pyx_INCREF(__pyx_v__dict); | |
11975 __Pyx_GIVEREF(__pyx_v__dict); | |
11976 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error); | |
11977 __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) | |
11978 __Pyx_GOTREF(__pyx_t_1); | |
11979 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
11980 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); | |
11981 __pyx_t_1 = 0; | |
11982 | |
11983 /* "(tree fragment)":9 | |
11984 * if _dict is not None: | |
11985 * state += (_dict,) | |
11986 * use_setstate = True # <<<<<<<<<<<<<< | |
11987 * else: | |
11988 * use_setstate = self.proxy is not None | |
11989 */ | |
11990 __pyx_v_use_setstate = 1; | |
11991 | |
11992 /* "(tree fragment)":7 | |
11993 * state = (self.index, self.proxy) | |
11994 * _dict = getattr(self, '__dict__', None) | |
11995 * if _dict is not None: # <<<<<<<<<<<<<< | |
11996 * state += (_dict,) | |
11997 * use_setstate = True | |
11998 */ | |
11999 goto __pyx_L3; | |
12000 } | |
12001 | |
12002 /* "(tree fragment)":11 | |
12003 * use_setstate = True | |
12004 * else: | |
12005 * use_setstate = self.proxy is not None # <<<<<<<<<<<<<< | |
12006 * if use_setstate: | |
12007 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, None), state | |
12008 */ | |
12009 /*else*/ { | |
12010 __pyx_t_3 = (((PyObject *)__pyx_v_self->proxy) != Py_None); | |
12011 __pyx_v_use_setstate = __pyx_t_3; | |
12012 } | |
12013 __pyx_L3:; | |
12014 | |
12015 /* "(tree fragment)":12 | |
12016 * else: | |
12017 * use_setstate = self.proxy is not None | |
12018 * if use_setstate: # <<<<<<<<<<<<<< | |
12019 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, None), state | |
12020 * else: | |
12021 */ | |
12022 if (__pyx_v_use_setstate) { | |
12023 | |
12024 /* "(tree fragment)":13 | |
12025 * use_setstate = self.proxy is not None | |
12026 * if use_setstate: | |
12027 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, None), state # <<<<<<<<<<<<<< | |
12028 * else: | |
12029 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, state) | |
12030 */ | |
12031 __Pyx_XDECREF(__pyx_r); | |
12032 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TupleProxyIterato); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) | |
12033 __Pyx_GOTREF(__pyx_t_1); | |
12034 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) | |
12035 __Pyx_GOTREF(__pyx_t_2); | |
12036 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); | |
12037 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); | |
12038 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error); | |
12039 __Pyx_INCREF(__pyx_int_15441160); | |
12040 __Pyx_GIVEREF(__pyx_int_15441160); | |
12041 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_15441160)) __PYX_ERR(1, 13, __pyx_L1_error); | |
12042 __Pyx_INCREF(Py_None); | |
12043 __Pyx_GIVEREF(Py_None); | |
12044 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error); | |
12045 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) | |
12046 __Pyx_GOTREF(__pyx_t_4); | |
12047 __Pyx_GIVEREF(__pyx_t_1); | |
12048 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error); | |
12049 __Pyx_GIVEREF(__pyx_t_2); | |
12050 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error); | |
12051 __Pyx_INCREF(__pyx_v_state); | |
12052 __Pyx_GIVEREF(__pyx_v_state); | |
12053 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error); | |
12054 __pyx_t_1 = 0; | |
12055 __pyx_t_2 = 0; | |
12056 __pyx_r = __pyx_t_4; | |
12057 __pyx_t_4 = 0; | |
12058 goto __pyx_L0; | |
12059 | |
12060 /* "(tree fragment)":12 | |
12061 * else: | |
12062 * use_setstate = self.proxy is not None | |
12063 * if use_setstate: # <<<<<<<<<<<<<< | |
12064 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, None), state | |
12065 * else: | |
12066 */ | |
12067 } | |
12068 | |
12069 /* "(tree fragment)":15 | |
12070 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, None), state | |
12071 * else: | |
12072 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, state) # <<<<<<<<<<<<<< | |
12073 * def __setstate_cython__(self, __pyx_state): | |
12074 * __pyx_unpickle_TupleProxyIterator__set_state(self, __pyx_state) | |
12075 */ | |
12076 /*else*/ { | |
12077 __Pyx_XDECREF(__pyx_r); | |
12078 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_TupleProxyIterato); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) | |
12079 __Pyx_GOTREF(__pyx_t_4); | |
12080 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) | |
12081 __Pyx_GOTREF(__pyx_t_2); | |
12082 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); | |
12083 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); | |
12084 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error); | |
12085 __Pyx_INCREF(__pyx_int_15441160); | |
12086 __Pyx_GIVEREF(__pyx_int_15441160); | |
12087 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_15441160)) __PYX_ERR(1, 15, __pyx_L1_error); | |
12088 __Pyx_INCREF(__pyx_v_state); | |
12089 __Pyx_GIVEREF(__pyx_v_state); | |
12090 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error); | |
12091 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) | |
12092 __Pyx_GOTREF(__pyx_t_1); | |
12093 __Pyx_GIVEREF(__pyx_t_4); | |
12094 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error); | |
12095 __Pyx_GIVEREF(__pyx_t_2); | |
12096 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error); | |
12097 __pyx_t_4 = 0; | |
12098 __pyx_t_2 = 0; | |
12099 __pyx_r = __pyx_t_1; | |
12100 __pyx_t_1 = 0; | |
12101 goto __pyx_L0; | |
12102 } | |
12103 | |
12104 /* "(tree fragment)":1 | |
12105 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
12106 * cdef tuple state | |
12107 * cdef object _dict | |
12108 */ | |
12109 | |
12110 /* function exit code */ | |
12111 __pyx_L1_error:; | |
12112 __Pyx_XDECREF(__pyx_t_1); | |
12113 __Pyx_XDECREF(__pyx_t_2); | |
12114 __Pyx_XDECREF(__pyx_t_4); | |
12115 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxyIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
12116 __pyx_r = NULL; | |
12117 __pyx_L0:; | |
12118 __Pyx_XDECREF(__pyx_v_state); | |
12119 __Pyx_XDECREF(__pyx_v__dict); | |
12120 __Pyx_XGIVEREF(__pyx_r); | |
12121 __Pyx_RefNannyFinishContext(); | |
12122 return __pyx_r; | |
12123 } | |
12124 | |
12125 /* "(tree fragment)":16 | |
12126 * else: | |
12127 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, state) | |
12128 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
12129 * __pyx_unpickle_TupleProxyIterator__set_state(self, __pyx_state) | |
12130 */ | |
12131 | |
12132 /* Python wrapper */ | |
12133 static PyObject *__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_9__setstate_cython__(PyObject *__pyx_v_self, | |
12134 #if CYTHON_METH_FASTCALL | |
12135 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
12136 #else | |
12137 PyObject *__pyx_args, PyObject *__pyx_kwds | |
12138 #endif | |
12139 ); /*proto*/ | |
12140 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_18TupleProxyIterator_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
12141 static PyObject *__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_9__setstate_cython__(PyObject *__pyx_v_self, | |
12142 #if CYTHON_METH_FASTCALL | |
12143 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
12144 #else | |
12145 PyObject *__pyx_args, PyObject *__pyx_kwds | |
12146 #endif | |
12147 ) { | |
12148 PyObject *__pyx_v___pyx_state = 0; | |
12149 #if !CYTHON_METH_FASTCALL | |
12150 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
12151 #endif | |
12152 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
12153 PyObject* values[1] = {0}; | |
12154 int __pyx_lineno = 0; | |
12155 const char *__pyx_filename = NULL; | |
12156 int __pyx_clineno = 0; | |
12157 PyObject *__pyx_r = 0; | |
12158 __Pyx_RefNannyDeclarations | |
12159 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); | |
12160 #if !CYTHON_METH_FASTCALL | |
12161 #if CYTHON_ASSUME_SAFE_MACROS | |
12162 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
12163 #else | |
12164 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
12165 #endif | |
12166 #endif | |
12167 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
12168 { | |
12169 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; | |
12170 if (__pyx_kwds) { | |
12171 Py_ssize_t kw_args; | |
12172 switch (__pyx_nargs) { | |
12173 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
12174 CYTHON_FALLTHROUGH; | |
12175 case 0: break; | |
12176 default: goto __pyx_L5_argtuple_error; | |
12177 } | |
12178 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
12179 switch (__pyx_nargs) { | |
12180 case 0: | |
12181 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { | |
12182 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
12183 kw_args--; | |
12184 } | |
12185 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error) | |
12186 else goto __pyx_L5_argtuple_error; | |
12187 } | |
12188 if (unlikely(kw_args > 0)) { | |
12189 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
12190 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error) | |
12191 } | |
12192 } else if (unlikely(__pyx_nargs != 1)) { | |
12193 goto __pyx_L5_argtuple_error; | |
12194 } else { | |
12195 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
12196 } | |
12197 __pyx_v___pyx_state = values[0]; | |
12198 } | |
12199 goto __pyx_L6_skip; | |
12200 __pyx_L5_argtuple_error:; | |
12201 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) | |
12202 __pyx_L6_skip:; | |
12203 goto __pyx_L4_argument_unpacking_done; | |
12204 __pyx_L3_error:; | |
12205 { | |
12206 Py_ssize_t __pyx_temp; | |
12207 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
12208 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
12209 } | |
12210 } | |
12211 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxyIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
12212 __Pyx_RefNannyFinishContext(); | |
12213 return NULL; | |
12214 __pyx_L4_argument_unpacking_done:; | |
12215 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_8__setstate_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *)__pyx_v_self), __pyx_v___pyx_state); | |
12216 | |
12217 /* function exit code */ | |
12218 { | |
12219 Py_ssize_t __pyx_temp; | |
12220 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
12221 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
12222 } | |
12223 } | |
12224 __Pyx_RefNannyFinishContext(); | |
12225 return __pyx_r; | |
12226 } | |
12227 | |
12228 static PyObject *__pyx_pf_5pysam_16libctabixproxies_18TupleProxyIterator_8__setstate_cython__(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { | |
12229 PyObject *__pyx_r = NULL; | |
12230 __Pyx_RefNannyDeclarations | |
12231 PyObject *__pyx_t_1 = NULL; | |
12232 int __pyx_lineno = 0; | |
12233 const char *__pyx_filename = NULL; | |
12234 int __pyx_clineno = 0; | |
12235 __Pyx_RefNannySetupContext("__setstate_cython__", 1); | |
12236 | |
12237 /* "(tree fragment)":17 | |
12238 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, state) | |
12239 * def __setstate_cython__(self, __pyx_state): | |
12240 * __pyx_unpickle_TupleProxyIterator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< | |
12241 */ | |
12242 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error) | |
12243 __pyx_t_1 = __pyx_f_5pysam_16libctabixproxies___pyx_unpickle_TupleProxyIterator__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) | |
12244 __Pyx_GOTREF(__pyx_t_1); | |
12245 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
12246 | |
12247 /* "(tree fragment)":16 | |
12248 * else: | |
12249 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, state) | |
12250 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
12251 * __pyx_unpickle_TupleProxyIterator__set_state(self, __pyx_state) | |
12252 */ | |
12253 | |
12254 /* function exit code */ | |
12255 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
12256 goto __pyx_L0; | |
12257 __pyx_L1_error:; | |
12258 __Pyx_XDECREF(__pyx_t_1); | |
12259 __Pyx_AddTraceback("pysam.libctabixproxies.TupleProxyIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
12260 __pyx_r = NULL; | |
12261 __pyx_L0:; | |
12262 __Pyx_XGIVEREF(__pyx_r); | |
12263 __Pyx_RefNannyFinishContext(); | |
12264 return __pyx_r; | |
12265 } | |
12266 | |
12267 /* "pysam/libctabixproxies.pyx":345 | |
12268 * | |
12269 * | |
12270 * def toDot(v): # <<<<<<<<<<<<<< | |
12271 * '''convert value to '.' if None''' | |
12272 * if v is None: | |
12273 */ | |
12274 | |
12275 /* Python wrapper */ | |
12276 static PyObject *__pyx_pw_5pysam_16libctabixproxies_1toDot(PyObject *__pyx_self, | |
12277 #if CYTHON_METH_FASTCALL | |
12278 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
12279 #else | |
12280 PyObject *__pyx_args, PyObject *__pyx_kwds | |
12281 #endif | |
12282 ); /*proto*/ | |
12283 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_toDot, "convert value to '.' if None"); | |
12284 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_1toDot = {"toDot", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_1toDot, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_toDot}; | |
12285 static PyObject *__pyx_pw_5pysam_16libctabixproxies_1toDot(PyObject *__pyx_self, | |
12286 #if CYTHON_METH_FASTCALL | |
12287 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
12288 #else | |
12289 PyObject *__pyx_args, PyObject *__pyx_kwds | |
12290 #endif | |
12291 ) { | |
12292 PyObject *__pyx_v_v = 0; | |
12293 #if !CYTHON_METH_FASTCALL | |
12294 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
12295 #endif | |
12296 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
12297 PyObject* values[1] = {0}; | |
12298 int __pyx_lineno = 0; | |
12299 const char *__pyx_filename = NULL; | |
12300 int __pyx_clineno = 0; | |
12301 PyObject *__pyx_r = 0; | |
12302 __Pyx_RefNannyDeclarations | |
12303 __Pyx_RefNannySetupContext("toDot (wrapper)", 0); | |
12304 #if !CYTHON_METH_FASTCALL | |
12305 #if CYTHON_ASSUME_SAFE_MACROS | |
12306 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
12307 #else | |
12308 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
12309 #endif | |
12310 #endif | |
12311 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
12312 { | |
12313 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,0}; | |
12314 if (__pyx_kwds) { | |
12315 Py_ssize_t kw_args; | |
12316 switch (__pyx_nargs) { | |
12317 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
12318 CYTHON_FALLTHROUGH; | |
12319 case 0: break; | |
12320 default: goto __pyx_L5_argtuple_error; | |
12321 } | |
12322 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
12323 switch (__pyx_nargs) { | |
12324 case 0: | |
12325 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_v)) != 0)) { | |
12326 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
12327 kw_args--; | |
12328 } | |
12329 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error) | |
12330 else goto __pyx_L5_argtuple_error; | |
12331 } | |
12332 if (unlikely(kw_args > 0)) { | |
12333 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
12334 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "toDot") < 0)) __PYX_ERR(0, 345, __pyx_L3_error) | |
12335 } | |
12336 } else if (unlikely(__pyx_nargs != 1)) { | |
12337 goto __pyx_L5_argtuple_error; | |
12338 } else { | |
12339 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
12340 } | |
12341 __pyx_v_v = values[0]; | |
12342 } | |
12343 goto __pyx_L6_skip; | |
12344 __pyx_L5_argtuple_error:; | |
12345 __Pyx_RaiseArgtupleInvalid("toDot", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 345, __pyx_L3_error) | |
12346 __pyx_L6_skip:; | |
12347 goto __pyx_L4_argument_unpacking_done; | |
12348 __pyx_L3_error:; | |
12349 { | |
12350 Py_ssize_t __pyx_temp; | |
12351 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
12352 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
12353 } | |
12354 } | |
12355 __Pyx_AddTraceback("pysam.libctabixproxies.toDot", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
12356 __Pyx_RefNannyFinishContext(); | |
12357 return NULL; | |
12358 __pyx_L4_argument_unpacking_done:; | |
12359 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_toDot(__pyx_self, __pyx_v_v); | |
12360 | |
12361 /* function exit code */ | |
12362 { | |
12363 Py_ssize_t __pyx_temp; | |
12364 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
12365 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
12366 } | |
12367 } | |
12368 __Pyx_RefNannyFinishContext(); | |
12369 return __pyx_r; | |
12370 } | |
12371 | |
12372 static PyObject *__pyx_pf_5pysam_16libctabixproxies_toDot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v) { | |
12373 PyObject *__pyx_r = NULL; | |
12374 __Pyx_RefNannyDeclarations | |
12375 int __pyx_t_1; | |
12376 PyObject *__pyx_t_2 = NULL; | |
12377 int __pyx_lineno = 0; | |
12378 const char *__pyx_filename = NULL; | |
12379 int __pyx_clineno = 0; | |
12380 __Pyx_RefNannySetupContext("toDot", 1); | |
12381 | |
12382 /* "pysam/libctabixproxies.pyx":347 | |
12383 * def toDot(v): | |
12384 * '''convert value to '.' if None''' | |
12385 * if v is None: # <<<<<<<<<<<<<< | |
12386 * return "." | |
12387 * else: | |
12388 */ | |
12389 __pyx_t_1 = (__pyx_v_v == Py_None); | |
12390 if (__pyx_t_1) { | |
12391 | |
12392 /* "pysam/libctabixproxies.pyx":348 | |
12393 * '''convert value to '.' if None''' | |
12394 * if v is None: | |
12395 * return "." # <<<<<<<<<<<<<< | |
12396 * else: | |
12397 * return str(v) | |
12398 */ | |
12399 __Pyx_XDECREF(__pyx_r); | |
12400 __Pyx_INCREF(__pyx_kp_u__12); | |
12401 __pyx_r = __pyx_kp_u__12; | |
12402 goto __pyx_L0; | |
12403 | |
12404 /* "pysam/libctabixproxies.pyx":347 | |
12405 * def toDot(v): | |
12406 * '''convert value to '.' if None''' | |
12407 * if v is None: # <<<<<<<<<<<<<< | |
12408 * return "." | |
12409 * else: | |
12410 */ | |
12411 } | |
12412 | |
12413 /* "pysam/libctabixproxies.pyx":350 | |
12414 * return "." | |
12415 * else: | |
12416 * return str(v) # <<<<<<<<<<<<<< | |
12417 * | |
12418 * def quote(v): | |
12419 */ | |
12420 /*else*/ { | |
12421 __Pyx_XDECREF(__pyx_r); | |
12422 __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_v); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) | |
12423 __Pyx_GOTREF(__pyx_t_2); | |
12424 __pyx_r = __pyx_t_2; | |
12425 __pyx_t_2 = 0; | |
12426 goto __pyx_L0; | |
12427 } | |
12428 | |
12429 /* "pysam/libctabixproxies.pyx":345 | |
12430 * | |
12431 * | |
12432 * def toDot(v): # <<<<<<<<<<<<<< | |
12433 * '''convert value to '.' if None''' | |
12434 * if v is None: | |
12435 */ | |
12436 | |
12437 /* function exit code */ | |
12438 __pyx_L1_error:; | |
12439 __Pyx_XDECREF(__pyx_t_2); | |
12440 __Pyx_AddTraceback("pysam.libctabixproxies.toDot", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
12441 __pyx_r = NULL; | |
12442 __pyx_L0:; | |
12443 __Pyx_XGIVEREF(__pyx_r); | |
12444 __Pyx_RefNannyFinishContext(); | |
12445 return __pyx_r; | |
12446 } | |
12447 | |
12448 /* "pysam/libctabixproxies.pyx":352 | |
12449 * return str(v) | |
12450 * | |
12451 * def quote(v): # <<<<<<<<<<<<<< | |
12452 * '''return a quoted attribute.''' | |
12453 * if isinstance(v, str): | |
12454 */ | |
12455 | |
12456 /* Python wrapper */ | |
12457 static PyObject *__pyx_pw_5pysam_16libctabixproxies_3quote(PyObject *__pyx_self, | |
12458 #if CYTHON_METH_FASTCALL | |
12459 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
12460 #else | |
12461 PyObject *__pyx_args, PyObject *__pyx_kwds | |
12462 #endif | |
12463 ); /*proto*/ | |
12464 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_2quote, "return a quoted attribute."); | |
12465 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_3quote = {"quote", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_3quote, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_2quote}; | |
12466 static PyObject *__pyx_pw_5pysam_16libctabixproxies_3quote(PyObject *__pyx_self, | |
12467 #if CYTHON_METH_FASTCALL | |
12468 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
12469 #else | |
12470 PyObject *__pyx_args, PyObject *__pyx_kwds | |
12471 #endif | |
12472 ) { | |
12473 PyObject *__pyx_v_v = 0; | |
12474 #if !CYTHON_METH_FASTCALL | |
12475 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
12476 #endif | |
12477 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
12478 PyObject* values[1] = {0}; | |
12479 int __pyx_lineno = 0; | |
12480 const char *__pyx_filename = NULL; | |
12481 int __pyx_clineno = 0; | |
12482 PyObject *__pyx_r = 0; | |
12483 __Pyx_RefNannyDeclarations | |
12484 __Pyx_RefNannySetupContext("quote (wrapper)", 0); | |
12485 #if !CYTHON_METH_FASTCALL | |
12486 #if CYTHON_ASSUME_SAFE_MACROS | |
12487 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
12488 #else | |
12489 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
12490 #endif | |
12491 #endif | |
12492 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
12493 { | |
12494 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,0}; | |
12495 if (__pyx_kwds) { | |
12496 Py_ssize_t kw_args; | |
12497 switch (__pyx_nargs) { | |
12498 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
12499 CYTHON_FALLTHROUGH; | |
12500 case 0: break; | |
12501 default: goto __pyx_L5_argtuple_error; | |
12502 } | |
12503 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
12504 switch (__pyx_nargs) { | |
12505 case 0: | |
12506 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_v)) != 0)) { | |
12507 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
12508 kw_args--; | |
12509 } | |
12510 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error) | |
12511 else goto __pyx_L5_argtuple_error; | |
12512 } | |
12513 if (unlikely(kw_args > 0)) { | |
12514 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
12515 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "quote") < 0)) __PYX_ERR(0, 352, __pyx_L3_error) | |
12516 } | |
12517 } else if (unlikely(__pyx_nargs != 1)) { | |
12518 goto __pyx_L5_argtuple_error; | |
12519 } else { | |
12520 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
12521 } | |
12522 __pyx_v_v = values[0]; | |
12523 } | |
12524 goto __pyx_L6_skip; | |
12525 __pyx_L5_argtuple_error:; | |
12526 __Pyx_RaiseArgtupleInvalid("quote", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 352, __pyx_L3_error) | |
12527 __pyx_L6_skip:; | |
12528 goto __pyx_L4_argument_unpacking_done; | |
12529 __pyx_L3_error:; | |
12530 { | |
12531 Py_ssize_t __pyx_temp; | |
12532 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
12533 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
12534 } | |
12535 } | |
12536 __Pyx_AddTraceback("pysam.libctabixproxies.quote", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
12537 __Pyx_RefNannyFinishContext(); | |
12538 return NULL; | |
12539 __pyx_L4_argument_unpacking_done:; | |
12540 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_2quote(__pyx_self, __pyx_v_v); | |
12541 | |
12542 /* function exit code */ | |
12543 { | |
12544 Py_ssize_t __pyx_temp; | |
12545 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
12546 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
12547 } | |
12548 } | |
12549 __Pyx_RefNannyFinishContext(); | |
12550 return __pyx_r; | |
12551 } | |
12552 | |
12553 static PyObject *__pyx_pf_5pysam_16libctabixproxies_2quote(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v) { | |
12554 PyObject *__pyx_r = NULL; | |
12555 __Pyx_RefNannyDeclarations | |
12556 int __pyx_t_1; | |
12557 PyObject *__pyx_t_2 = NULL; | |
12558 int __pyx_lineno = 0; | |
12559 const char *__pyx_filename = NULL; | |
12560 int __pyx_clineno = 0; | |
12561 __Pyx_RefNannySetupContext("quote", 1); | |
12562 | |
12563 /* "pysam/libctabixproxies.pyx":354 | |
12564 * def quote(v): | |
12565 * '''return a quoted attribute.''' | |
12566 * if isinstance(v, str): # <<<<<<<<<<<<<< | |
12567 * return '"%s"' % v | |
12568 * else: | |
12569 */ | |
12570 __pyx_t_1 = PyUnicode_Check(__pyx_v_v); | |
12571 if (__pyx_t_1) { | |
12572 | |
12573 /* "pysam/libctabixproxies.pyx":355 | |
12574 * '''return a quoted attribute.''' | |
12575 * if isinstance(v, str): | |
12576 * return '"%s"' % v # <<<<<<<<<<<<<< | |
12577 * else: | |
12578 * return str(v) | |
12579 */ | |
12580 __Pyx_XDECREF(__pyx_r); | |
12581 __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s, __pyx_v_v); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error) | |
12582 __Pyx_GOTREF(__pyx_t_2); | |
12583 __pyx_r = __pyx_t_2; | |
12584 __pyx_t_2 = 0; | |
12585 goto __pyx_L0; | |
12586 | |
12587 /* "pysam/libctabixproxies.pyx":354 | |
12588 * def quote(v): | |
12589 * '''return a quoted attribute.''' | |
12590 * if isinstance(v, str): # <<<<<<<<<<<<<< | |
12591 * return '"%s"' % v | |
12592 * else: | |
12593 */ | |
12594 } | |
12595 | |
12596 /* "pysam/libctabixproxies.pyx":357 | |
12597 * return '"%s"' % v | |
12598 * else: | |
12599 * return str(v) # <<<<<<<<<<<<<< | |
12600 * | |
12601 * | |
12602 */ | |
12603 /*else*/ { | |
12604 __Pyx_XDECREF(__pyx_r); | |
12605 __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_v); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error) | |
12606 __Pyx_GOTREF(__pyx_t_2); | |
12607 __pyx_r = __pyx_t_2; | |
12608 __pyx_t_2 = 0; | |
12609 goto __pyx_L0; | |
12610 } | |
12611 | |
12612 /* "pysam/libctabixproxies.pyx":352 | |
12613 * return str(v) | |
12614 * | |
12615 * def quote(v): # <<<<<<<<<<<<<< | |
12616 * '''return a quoted attribute.''' | |
12617 * if isinstance(v, str): | |
12618 */ | |
12619 | |
12620 /* function exit code */ | |
12621 __pyx_L1_error:; | |
12622 __Pyx_XDECREF(__pyx_t_2); | |
12623 __Pyx_AddTraceback("pysam.libctabixproxies.quote", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
12624 __pyx_r = NULL; | |
12625 __pyx_L0:; | |
12626 __Pyx_XGIVEREF(__pyx_r); | |
12627 __Pyx_RefNannyFinishContext(); | |
12628 return __pyx_r; | |
12629 } | |
12630 | |
12631 /* "pysam/libctabixproxies.pyx":364 | |
12632 * map_key2field = {} | |
12633 * | |
12634 * def __setattr__(self, key, value): # <<<<<<<<<<<<<< | |
12635 * '''set attribute.''' | |
12636 * cdef int idx | |
12637 */ | |
12638 | |
12639 /* Python wrapper */ | |
12640 static int __pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_1__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/ | |
12641 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_15NamedTupleProxy___setattr__, "set attribute."); | |
12642 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
12643 struct wrapperbase __pyx_wrapperbase_5pysam_16libctabixproxies_15NamedTupleProxy___setattr__; | |
12644 #endif | |
12645 static int __pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_1__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { | |
12646 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
12647 int __pyx_r; | |
12648 __Pyx_RefNannyDeclarations | |
12649 __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0); | |
12650 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
12651 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy___setattr__(((struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value)); | |
12652 | |
12653 /* function exit code */ | |
12654 __Pyx_RefNannyFinishContext(); | |
12655 return __pyx_r; | |
12656 } | |
12657 | |
12658 static int __pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy___setattr__(struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { | |
12659 int __pyx_v_idx; | |
12660 CYTHON_UNUSED PyObject *__pyx_v_f = NULL; | |
12661 int __pyx_r; | |
12662 __Pyx_RefNannyDeclarations | |
12663 PyObject *__pyx_t_1 = NULL; | |
12664 PyObject *__pyx_t_2 = NULL; | |
12665 PyObject *__pyx_t_3 = NULL; | |
12666 PyObject *__pyx_t_4 = NULL; | |
12667 PyObject *(*__pyx_t_5)(PyObject *); | |
12668 int __pyx_t_6; | |
12669 int __pyx_t_7; | |
12670 PyObject *__pyx_t_8 = NULL; | |
12671 unsigned int __pyx_t_9; | |
12672 int __pyx_lineno = 0; | |
12673 const char *__pyx_filename = NULL; | |
12674 int __pyx_clineno = 0; | |
12675 __Pyx_RefNannySetupContext("__setattr__", 1); | |
12676 | |
12677 /* "pysam/libctabixproxies.pyx":367 | |
12678 * '''set attribute.''' | |
12679 * cdef int idx | |
12680 * idx, f = self.map_key2field[key] # <<<<<<<<<<<<<< | |
12681 * if idx >= self.nfields: | |
12682 * raise KeyError("field %s not set" % key) | |
12683 */ | |
12684 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map_key2field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error) | |
12685 __Pyx_GOTREF(__pyx_t_1); | |
12686 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error) | |
12687 __Pyx_GOTREF(__pyx_t_2); | |
12688 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
12689 if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { | |
12690 PyObject* sequence = __pyx_t_2; | |
12691 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); | |
12692 if (unlikely(size != 2)) { | |
12693 if (size > 2) __Pyx_RaiseTooManyValuesError(2); | |
12694 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); | |
12695 __PYX_ERR(0, 367, __pyx_L1_error) | |
12696 } | |
12697 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
12698 if (likely(PyTuple_CheckExact(sequence))) { | |
12699 __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); | |
12700 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); | |
12701 } else { | |
12702 __pyx_t_1 = PyList_GET_ITEM(sequence, 0); | |
12703 __pyx_t_3 = PyList_GET_ITEM(sequence, 1); | |
12704 } | |
12705 __Pyx_INCREF(__pyx_t_1); | |
12706 __Pyx_INCREF(__pyx_t_3); | |
12707 #else | |
12708 __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error) | |
12709 __Pyx_GOTREF(__pyx_t_1); | |
12710 __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error) | |
12711 __Pyx_GOTREF(__pyx_t_3); | |
12712 #endif | |
12713 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
12714 } else { | |
12715 Py_ssize_t index = -1; | |
12716 __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 367, __pyx_L1_error) | |
12717 __Pyx_GOTREF(__pyx_t_4); | |
12718 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
12719 __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); | |
12720 index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; | |
12721 __Pyx_GOTREF(__pyx_t_1); | |
12722 index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; | |
12723 __Pyx_GOTREF(__pyx_t_3); | |
12724 if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 367, __pyx_L1_error) | |
12725 __pyx_t_5 = NULL; | |
12726 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
12727 goto __pyx_L4_unpacking_done; | |
12728 __pyx_L3_unpacking_failed:; | |
12729 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
12730 __pyx_t_5 = NULL; | |
12731 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); | |
12732 __PYX_ERR(0, 367, __pyx_L1_error) | |
12733 __pyx_L4_unpacking_done:; | |
12734 } | |
12735 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 367, __pyx_L1_error) | |
12736 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
12737 __pyx_v_idx = __pyx_t_6; | |
12738 __pyx_v_f = __pyx_t_3; | |
12739 __pyx_t_3 = 0; | |
12740 | |
12741 /* "pysam/libctabixproxies.pyx":368 | |
12742 * cdef int idx | |
12743 * idx, f = self.map_key2field[key] | |
12744 * if idx >= self.nfields: # <<<<<<<<<<<<<< | |
12745 * raise KeyError("field %s not set" % key) | |
12746 * TupleProxy.__setitem__(self, idx, str(value)) | |
12747 */ | |
12748 __pyx_t_7 = (__pyx_v_idx >= __pyx_v_self->__pyx_base.nfields); | |
12749 if (unlikely(__pyx_t_7)) { | |
12750 | |
12751 /* "pysam/libctabixproxies.pyx":369 | |
12752 * idx, f = self.map_key2field[key] | |
12753 * if idx >= self.nfields: | |
12754 * raise KeyError("field %s not set" % key) # <<<<<<<<<<<<<< | |
12755 * TupleProxy.__setitem__(self, idx, str(value)) | |
12756 * | |
12757 */ | |
12758 __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_field_s_not_set, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error) | |
12759 __Pyx_GOTREF(__pyx_t_2); | |
12760 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error) | |
12761 __Pyx_GOTREF(__pyx_t_3); | |
12762 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
12763 __Pyx_Raise(__pyx_t_3, 0, 0, 0); | |
12764 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
12765 __PYX_ERR(0, 369, __pyx_L1_error) | |
12766 | |
12767 /* "pysam/libctabixproxies.pyx":368 | |
12768 * cdef int idx | |
12769 * idx, f = self.map_key2field[key] | |
12770 * if idx >= self.nfields: # <<<<<<<<<<<<<< | |
12771 * raise KeyError("field %s not set" % key) | |
12772 * TupleProxy.__setitem__(self, idx, str(value)) | |
12773 */ | |
12774 } | |
12775 | |
12776 /* "pysam/libctabixproxies.pyx":370 | |
12777 * if idx >= self.nfields: | |
12778 * raise KeyError("field %s not set" % key) | |
12779 * TupleProxy.__setitem__(self, idx, str(value)) # <<<<<<<<<<<<<< | |
12780 * | |
12781 * def __getattr__(self, key): | |
12782 */ | |
12783 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy), __pyx_n_s_setitem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error) | |
12784 __Pyx_GOTREF(__pyx_t_2); | |
12785 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) | |
12786 __Pyx_GOTREF(__pyx_t_1); | |
12787 __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error) | |
12788 __Pyx_GOTREF(__pyx_t_4); | |
12789 __pyx_t_8 = NULL; | |
12790 __pyx_t_9 = 0; | |
12791 #if CYTHON_UNPACK_METHODS | |
12792 if (likely(PyMethod_Check(__pyx_t_2))) { | |
12793 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); | |
12794 if (likely(__pyx_t_8)) { | |
12795 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
12796 __Pyx_INCREF(__pyx_t_8); | |
12797 __Pyx_INCREF(function); | |
12798 __Pyx_DECREF_SET(__pyx_t_2, function); | |
12799 __pyx_t_9 = 1; | |
12800 } | |
12801 } | |
12802 #endif | |
12803 { | |
12804 PyObject *__pyx_callargs[4] = {__pyx_t_8, ((PyObject *)__pyx_v_self), __pyx_t_1, __pyx_t_4}; | |
12805 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); | |
12806 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; | |
12807 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
12808 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
12809 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) | |
12810 __Pyx_GOTREF(__pyx_t_3); | |
12811 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
12812 } | |
12813 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
12814 | |
12815 /* "pysam/libctabixproxies.pyx":364 | |
12816 * map_key2field = {} | |
12817 * | |
12818 * def __setattr__(self, key, value): # <<<<<<<<<<<<<< | |
12819 * '''set attribute.''' | |
12820 * cdef int idx | |
12821 */ | |
12822 | |
12823 /* function exit code */ | |
12824 __pyx_r = 0; | |
12825 goto __pyx_L0; | |
12826 __pyx_L1_error:; | |
12827 __Pyx_XDECREF(__pyx_t_1); | |
12828 __Pyx_XDECREF(__pyx_t_2); | |
12829 __Pyx_XDECREF(__pyx_t_3); | |
12830 __Pyx_XDECREF(__pyx_t_4); | |
12831 __Pyx_XDECREF(__pyx_t_8); | |
12832 __Pyx_AddTraceback("pysam.libctabixproxies.NamedTupleProxy.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
12833 __pyx_r = -1; | |
12834 __pyx_L0:; | |
12835 __Pyx_XDECREF(__pyx_v_f); | |
12836 __Pyx_RefNannyFinishContext(); | |
12837 return __pyx_r; | |
12838 } | |
12839 | |
12840 /* "pysam/libctabixproxies.pyx":372 | |
12841 * TupleProxy.__setitem__(self, idx, str(value)) | |
12842 * | |
12843 * def __getattr__(self, key): # <<<<<<<<<<<<<< | |
12844 * cdef int idx | |
12845 * idx, f = self.map_key2field[key] | |
12846 */ | |
12847 | |
12848 /* Python wrapper */ | |
12849 static PyObject *__pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ | |
12850 static PyObject *__pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { | |
12851 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
12852 PyObject *__pyx_r = 0; | |
12853 __Pyx_RefNannyDeclarations | |
12854 __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); | |
12855 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
12856 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy_2__getattr__(((struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key)); | |
12857 | |
12858 /* function exit code */ | |
12859 __Pyx_RefNannyFinishContext(); | |
12860 return __pyx_r; | |
12861 } | |
12862 | |
12863 static PyObject *__pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy_2__getattr__(struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_v_self, PyObject *__pyx_v_key) { | |
12864 int __pyx_v_idx; | |
12865 PyObject *__pyx_v_f = NULL; | |
12866 PyObject *__pyx_r = NULL; | |
12867 __Pyx_RefNannyDeclarations | |
12868 PyObject *__pyx_t_1 = NULL; | |
12869 PyObject *__pyx_t_2 = NULL; | |
12870 PyObject *__pyx_t_3 = NULL; | |
12871 PyObject *__pyx_t_4 = NULL; | |
12872 PyObject *(*__pyx_t_5)(PyObject *); | |
12873 int __pyx_t_6; | |
12874 int __pyx_t_7; | |
12875 struct __pyx_opt_args_5pysam_9libcutils_force_str __pyx_t_8; | |
12876 unsigned int __pyx_t_9; | |
12877 int __pyx_lineno = 0; | |
12878 const char *__pyx_filename = NULL; | |
12879 int __pyx_clineno = 0; | |
12880 __Pyx_RefNannySetupContext("__getattr__", 1); | |
12881 | |
12882 /* "pysam/libctabixproxies.pyx":374 | |
12883 * def __getattr__(self, key): | |
12884 * cdef int idx | |
12885 * idx, f = self.map_key2field[key] # <<<<<<<<<<<<<< | |
12886 * if idx >= self.nfields: | |
12887 * raise KeyError("field %s not set" % key) | |
12888 */ | |
12889 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map_key2field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) | |
12890 __Pyx_GOTREF(__pyx_t_1); | |
12891 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error) | |
12892 __Pyx_GOTREF(__pyx_t_2); | |
12893 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
12894 if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { | |
12895 PyObject* sequence = __pyx_t_2; | |
12896 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); | |
12897 if (unlikely(size != 2)) { | |
12898 if (size > 2) __Pyx_RaiseTooManyValuesError(2); | |
12899 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); | |
12900 __PYX_ERR(0, 374, __pyx_L1_error) | |
12901 } | |
12902 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
12903 if (likely(PyTuple_CheckExact(sequence))) { | |
12904 __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); | |
12905 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); | |
12906 } else { | |
12907 __pyx_t_1 = PyList_GET_ITEM(sequence, 0); | |
12908 __pyx_t_3 = PyList_GET_ITEM(sequence, 1); | |
12909 } | |
12910 __Pyx_INCREF(__pyx_t_1); | |
12911 __Pyx_INCREF(__pyx_t_3); | |
12912 #else | |
12913 __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) | |
12914 __Pyx_GOTREF(__pyx_t_1); | |
12915 __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) | |
12916 __Pyx_GOTREF(__pyx_t_3); | |
12917 #endif | |
12918 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
12919 } else { | |
12920 Py_ssize_t index = -1; | |
12921 __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L1_error) | |
12922 __Pyx_GOTREF(__pyx_t_4); | |
12923 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
12924 __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); | |
12925 index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; | |
12926 __Pyx_GOTREF(__pyx_t_1); | |
12927 index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; | |
12928 __Pyx_GOTREF(__pyx_t_3); | |
12929 if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 374, __pyx_L1_error) | |
12930 __pyx_t_5 = NULL; | |
12931 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
12932 goto __pyx_L4_unpacking_done; | |
12933 __pyx_L3_unpacking_failed:; | |
12934 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
12935 __pyx_t_5 = NULL; | |
12936 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); | |
12937 __PYX_ERR(0, 374, __pyx_L1_error) | |
12938 __pyx_L4_unpacking_done:; | |
12939 } | |
12940 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 374, __pyx_L1_error) | |
12941 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
12942 __pyx_v_idx = __pyx_t_6; | |
12943 __pyx_v_f = __pyx_t_3; | |
12944 __pyx_t_3 = 0; | |
12945 | |
12946 /* "pysam/libctabixproxies.pyx":375 | |
12947 * cdef int idx | |
12948 * idx, f = self.map_key2field[key] | |
12949 * if idx >= self.nfields: # <<<<<<<<<<<<<< | |
12950 * raise KeyError("field %s not set" % key) | |
12951 * if f == str: | |
12952 */ | |
12953 __pyx_t_7 = (__pyx_v_idx >= __pyx_v_self->__pyx_base.nfields); | |
12954 if (unlikely(__pyx_t_7)) { | |
12955 | |
12956 /* "pysam/libctabixproxies.pyx":376 | |
12957 * idx, f = self.map_key2field[key] | |
12958 * if idx >= self.nfields: | |
12959 * raise KeyError("field %s not set" % key) # <<<<<<<<<<<<<< | |
12960 * if f == str: | |
12961 * return force_str(self.fields[idx], | |
12962 */ | |
12963 __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_field_s_not_set, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error) | |
12964 __Pyx_GOTREF(__pyx_t_2); | |
12965 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) | |
12966 __Pyx_GOTREF(__pyx_t_3); | |
12967 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
12968 __Pyx_Raise(__pyx_t_3, 0, 0, 0); | |
12969 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
12970 __PYX_ERR(0, 376, __pyx_L1_error) | |
12971 | |
12972 /* "pysam/libctabixproxies.pyx":375 | |
12973 * cdef int idx | |
12974 * idx, f = self.map_key2field[key] | |
12975 * if idx >= self.nfields: # <<<<<<<<<<<<<< | |
12976 * raise KeyError("field %s not set" % key) | |
12977 * if f == str: | |
12978 */ | |
12979 } | |
12980 | |
12981 /* "pysam/libctabixproxies.pyx":377 | |
12982 * if idx >= self.nfields: | |
12983 * raise KeyError("field %s not set" % key) | |
12984 * if f == str: # <<<<<<<<<<<<<< | |
12985 * return force_str(self.fields[idx], | |
12986 * self.encoding) | |
12987 */ | |
12988 __pyx_t_3 = PyObject_RichCompare(__pyx_v_f, ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) | |
12989 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 377, __pyx_L1_error) | |
12990 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
12991 if (__pyx_t_7) { | |
12992 | |
12993 /* "pysam/libctabixproxies.pyx":378 | |
12994 * raise KeyError("field %s not set" % key) | |
12995 * if f == str: | |
12996 * return force_str(self.fields[idx], # <<<<<<<<<<<<<< | |
12997 * self.encoding) | |
12998 * return f(self.fields[idx]) | |
12999 */ | |
13000 __Pyx_XDECREF(__pyx_r); | |
13001 __pyx_t_3 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[__pyx_v_idx])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) | |
13002 __Pyx_GOTREF(__pyx_t_3); | |
13003 | |
13004 /* "pysam/libctabixproxies.pyx":379 | |
13005 * if f == str: | |
13006 * return force_str(self.fields[idx], | |
13007 * self.encoding) # <<<<<<<<<<<<<< | |
13008 * return f(self.fields[idx]) | |
13009 * | |
13010 */ | |
13011 __pyx_t_2 = __pyx_v_self->__pyx_base.encoding; | |
13012 __Pyx_INCREF(__pyx_t_2); | |
13013 | |
13014 /* "pysam/libctabixproxies.pyx":378 | |
13015 * raise KeyError("field %s not set" % key) | |
13016 * if f == str: | |
13017 * return force_str(self.fields[idx], # <<<<<<<<<<<<<< | |
13018 * self.encoding) | |
13019 * return f(self.fields[idx]) | |
13020 */ | |
13021 __pyx_t_8.__pyx_n = 1; | |
13022 __pyx_t_8.encoding = __pyx_t_2; | |
13023 __pyx_t_1 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_3, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) | |
13024 __Pyx_GOTREF(__pyx_t_1); | |
13025 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
13026 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
13027 __pyx_r = __pyx_t_1; | |
13028 __pyx_t_1 = 0; | |
13029 goto __pyx_L0; | |
13030 | |
13031 /* "pysam/libctabixproxies.pyx":377 | |
13032 * if idx >= self.nfields: | |
13033 * raise KeyError("field %s not set" % key) | |
13034 * if f == str: # <<<<<<<<<<<<<< | |
13035 * return force_str(self.fields[idx], | |
13036 * self.encoding) | |
13037 */ | |
13038 } | |
13039 | |
13040 /* "pysam/libctabixproxies.pyx":380 | |
13041 * return force_str(self.fields[idx], | |
13042 * self.encoding) | |
13043 * return f(self.fields[idx]) # <<<<<<<<<<<<<< | |
13044 * | |
13045 * | |
13046 */ | |
13047 __Pyx_XDECREF(__pyx_r); | |
13048 __pyx_t_2 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[__pyx_v_idx])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error) | |
13049 __Pyx_GOTREF(__pyx_t_2); | |
13050 __Pyx_INCREF(__pyx_v_f); | |
13051 __pyx_t_3 = __pyx_v_f; __pyx_t_4 = NULL; | |
13052 __pyx_t_9 = 0; | |
13053 #if CYTHON_UNPACK_METHODS | |
13054 if (unlikely(PyMethod_Check(__pyx_t_3))) { | |
13055 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); | |
13056 if (likely(__pyx_t_4)) { | |
13057 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
13058 __Pyx_INCREF(__pyx_t_4); | |
13059 __Pyx_INCREF(function); | |
13060 __Pyx_DECREF_SET(__pyx_t_3, function); | |
13061 __pyx_t_9 = 1; | |
13062 } | |
13063 } | |
13064 #endif | |
13065 { | |
13066 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; | |
13067 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); | |
13068 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
13069 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
13070 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error) | |
13071 __Pyx_GOTREF(__pyx_t_1); | |
13072 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
13073 } | |
13074 __pyx_r = __pyx_t_1; | |
13075 __pyx_t_1 = 0; | |
13076 goto __pyx_L0; | |
13077 | |
13078 /* "pysam/libctabixproxies.pyx":372 | |
13079 * TupleProxy.__setitem__(self, idx, str(value)) | |
13080 * | |
13081 * def __getattr__(self, key): # <<<<<<<<<<<<<< | |
13082 * cdef int idx | |
13083 * idx, f = self.map_key2field[key] | |
13084 */ | |
13085 | |
13086 /* function exit code */ | |
13087 __pyx_L1_error:; | |
13088 __Pyx_XDECREF(__pyx_t_1); | |
13089 __Pyx_XDECREF(__pyx_t_2); | |
13090 __Pyx_XDECREF(__pyx_t_3); | |
13091 __Pyx_XDECREF(__pyx_t_4); | |
13092 __Pyx_AddTraceback("pysam.libctabixproxies.NamedTupleProxy.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
13093 __pyx_r = NULL; | |
13094 __pyx_L0:; | |
13095 __Pyx_XDECREF(__pyx_v_f); | |
13096 __Pyx_XGIVEREF(__pyx_r); | |
13097 __Pyx_RefNannyFinishContext(); | |
13098 return __pyx_r; | |
13099 } | |
13100 | |
13101 /* "(tree fragment)":1 | |
13102 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
13103 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
13104 * def __setstate_cython__(self, __pyx_state): | |
13105 */ | |
13106 | |
13107 /* Python wrapper */ | |
13108 static PyObject *__pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_5__reduce_cython__(PyObject *__pyx_v_self, | |
13109 #if CYTHON_METH_FASTCALL | |
13110 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
13111 #else | |
13112 PyObject *__pyx_args, PyObject *__pyx_kwds | |
13113 #endif | |
13114 ); /*proto*/ | |
13115 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_15NamedTupleProxy_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
13116 static PyObject *__pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_5__reduce_cython__(PyObject *__pyx_v_self, | |
13117 #if CYTHON_METH_FASTCALL | |
13118 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
13119 #else | |
13120 PyObject *__pyx_args, PyObject *__pyx_kwds | |
13121 #endif | |
13122 ) { | |
13123 #if !CYTHON_METH_FASTCALL | |
13124 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
13125 #endif | |
13126 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
13127 PyObject *__pyx_r = 0; | |
13128 __Pyx_RefNannyDeclarations | |
13129 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); | |
13130 #if !CYTHON_METH_FASTCALL | |
13131 #if CYTHON_ASSUME_SAFE_MACROS | |
13132 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
13133 #else | |
13134 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
13135 #endif | |
13136 #endif | |
13137 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
13138 if (unlikely(__pyx_nargs > 0)) { | |
13139 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} | |
13140 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; | |
13141 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy_4__reduce_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *)__pyx_v_self)); | |
13142 | |
13143 /* function exit code */ | |
13144 __Pyx_RefNannyFinishContext(); | |
13145 return __pyx_r; | |
13146 } | |
13147 | |
13148 static PyObject *__pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_v_self) { | |
13149 PyObject *__pyx_r = NULL; | |
13150 __Pyx_RefNannyDeclarations | |
13151 int __pyx_lineno = 0; | |
13152 const char *__pyx_filename = NULL; | |
13153 int __pyx_clineno = 0; | |
13154 __Pyx_RefNannySetupContext("__reduce_cython__", 1); | |
13155 | |
13156 /* "(tree fragment)":2 | |
13157 * def __reduce_cython__(self): | |
13158 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
13159 * def __setstate_cython__(self, __pyx_state): | |
13160 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
13161 */ | |
13162 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
13163 __PYX_ERR(1, 2, __pyx_L1_error) | |
13164 | |
13165 /* "(tree fragment)":1 | |
13166 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
13167 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
13168 * def __setstate_cython__(self, __pyx_state): | |
13169 */ | |
13170 | |
13171 /* function exit code */ | |
13172 __pyx_L1_error:; | |
13173 __Pyx_AddTraceback("pysam.libctabixproxies.NamedTupleProxy.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
13174 __pyx_r = NULL; | |
13175 __Pyx_XGIVEREF(__pyx_r); | |
13176 __Pyx_RefNannyFinishContext(); | |
13177 return __pyx_r; | |
13178 } | |
13179 | |
13180 /* "(tree fragment)":3 | |
13181 * def __reduce_cython__(self): | |
13182 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
13183 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
13184 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
13185 */ | |
13186 | |
13187 /* Python wrapper */ | |
13188 static PyObject *__pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_7__setstate_cython__(PyObject *__pyx_v_self, | |
13189 #if CYTHON_METH_FASTCALL | |
13190 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
13191 #else | |
13192 PyObject *__pyx_args, PyObject *__pyx_kwds | |
13193 #endif | |
13194 ); /*proto*/ | |
13195 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_15NamedTupleProxy_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
13196 static PyObject *__pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_7__setstate_cython__(PyObject *__pyx_v_self, | |
13197 #if CYTHON_METH_FASTCALL | |
13198 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
13199 #else | |
13200 PyObject *__pyx_args, PyObject *__pyx_kwds | |
13201 #endif | |
13202 ) { | |
13203 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; | |
13204 #if !CYTHON_METH_FASTCALL | |
13205 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
13206 #endif | |
13207 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
13208 PyObject* values[1] = {0}; | |
13209 int __pyx_lineno = 0; | |
13210 const char *__pyx_filename = NULL; | |
13211 int __pyx_clineno = 0; | |
13212 PyObject *__pyx_r = 0; | |
13213 __Pyx_RefNannyDeclarations | |
13214 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); | |
13215 #if !CYTHON_METH_FASTCALL | |
13216 #if CYTHON_ASSUME_SAFE_MACROS | |
13217 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
13218 #else | |
13219 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
13220 #endif | |
13221 #endif | |
13222 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
13223 { | |
13224 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; | |
13225 if (__pyx_kwds) { | |
13226 Py_ssize_t kw_args; | |
13227 switch (__pyx_nargs) { | |
13228 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
13229 CYTHON_FALLTHROUGH; | |
13230 case 0: break; | |
13231 default: goto __pyx_L5_argtuple_error; | |
13232 } | |
13233 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
13234 switch (__pyx_nargs) { | |
13235 case 0: | |
13236 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { | |
13237 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
13238 kw_args--; | |
13239 } | |
13240 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) | |
13241 else goto __pyx_L5_argtuple_error; | |
13242 } | |
13243 if (unlikely(kw_args > 0)) { | |
13244 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
13245 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) | |
13246 } | |
13247 } else if (unlikely(__pyx_nargs != 1)) { | |
13248 goto __pyx_L5_argtuple_error; | |
13249 } else { | |
13250 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
13251 } | |
13252 __pyx_v___pyx_state = values[0]; | |
13253 } | |
13254 goto __pyx_L6_skip; | |
13255 __pyx_L5_argtuple_error:; | |
13256 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) | |
13257 __pyx_L6_skip:; | |
13258 goto __pyx_L4_argument_unpacking_done; | |
13259 __pyx_L3_error:; | |
13260 { | |
13261 Py_ssize_t __pyx_temp; | |
13262 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
13263 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
13264 } | |
13265 } | |
13266 __Pyx_AddTraceback("pysam.libctabixproxies.NamedTupleProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
13267 __Pyx_RefNannyFinishContext(); | |
13268 return NULL; | |
13269 __pyx_L4_argument_unpacking_done:; | |
13270 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy_6__setstate_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *)__pyx_v_self), __pyx_v___pyx_state); | |
13271 | |
13272 /* function exit code */ | |
13273 { | |
13274 Py_ssize_t __pyx_temp; | |
13275 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
13276 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
13277 } | |
13278 } | |
13279 __Pyx_RefNannyFinishContext(); | |
13280 return __pyx_r; | |
13281 } | |
13282 | |
13283 static PyObject *__pyx_pf_5pysam_16libctabixproxies_15NamedTupleProxy_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { | |
13284 PyObject *__pyx_r = NULL; | |
13285 __Pyx_RefNannyDeclarations | |
13286 int __pyx_lineno = 0; | |
13287 const char *__pyx_filename = NULL; | |
13288 int __pyx_clineno = 0; | |
13289 __Pyx_RefNannySetupContext("__setstate_cython__", 1); | |
13290 | |
13291 /* "(tree fragment)":4 | |
13292 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
13293 * def __setstate_cython__(self, __pyx_state): | |
13294 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
13295 */ | |
13296 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
13297 __PYX_ERR(1, 4, __pyx_L1_error) | |
13298 | |
13299 /* "(tree fragment)":3 | |
13300 * def __reduce_cython__(self): | |
13301 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
13302 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
13303 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
13304 */ | |
13305 | |
13306 /* function exit code */ | |
13307 __pyx_L1_error:; | |
13308 __Pyx_AddTraceback("pysam.libctabixproxies.NamedTupleProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
13309 __pyx_r = NULL; | |
13310 __Pyx_XGIVEREF(__pyx_r); | |
13311 __Pyx_RefNannyFinishContext(); | |
13312 return __pyx_r; | |
13313 } | |
13314 | |
13315 /* "pysam/libctabixproxies.pyx":383 | |
13316 * | |
13317 * | |
13318 * cdef dot_or_float(v): # <<<<<<<<<<<<<< | |
13319 * if v == "" or v == b".": | |
13320 * return None | |
13321 */ | |
13322 | |
13323 static PyObject *__pyx_f_5pysam_16libctabixproxies_dot_or_float(PyObject *__pyx_v_v) { | |
13324 PyObject *__pyx_r = NULL; | |
13325 __Pyx_RefNannyDeclarations | |
13326 int __pyx_t_1; | |
13327 int __pyx_t_2; | |
13328 PyObject *__pyx_t_3 = NULL; | |
13329 PyObject *__pyx_t_4 = NULL; | |
13330 PyObject *__pyx_t_5 = NULL; | |
13331 PyObject *__pyx_t_6 = NULL; | |
13332 int __pyx_t_7; | |
13333 PyObject *__pyx_t_8 = NULL; | |
13334 PyObject *__pyx_t_9 = NULL; | |
13335 PyObject *__pyx_t_10 = NULL; | |
13336 int __pyx_lineno = 0; | |
13337 const char *__pyx_filename = NULL; | |
13338 int __pyx_clineno = 0; | |
13339 __Pyx_RefNannySetupContext("dot_or_float", 1); | |
13340 | |
13341 /* "pysam/libctabixproxies.pyx":384 | |
13342 * | |
13343 * cdef dot_or_float(v): | |
13344 * if v == "" or v == b".": # <<<<<<<<<<<<<< | |
13345 * return None | |
13346 * else: | |
13347 */ | |
13348 __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_v, __pyx_kp_u__13, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 384, __pyx_L1_error) | |
13349 if (!__pyx_t_2) { | |
13350 } else { | |
13351 __pyx_t_1 = __pyx_t_2; | |
13352 goto __pyx_L4_bool_binop_done; | |
13353 } | |
13354 __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_v_v, __pyx_kp_b__12, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 384, __pyx_L1_error) | |
13355 __pyx_t_1 = __pyx_t_2; | |
13356 __pyx_L4_bool_binop_done:; | |
13357 if (__pyx_t_1) { | |
13358 | |
13359 /* "pysam/libctabixproxies.pyx":385 | |
13360 * cdef dot_or_float(v): | |
13361 * if v == "" or v == b".": | |
13362 * return None # <<<<<<<<<<<<<< | |
13363 * else: | |
13364 * try: | |
13365 */ | |
13366 __Pyx_XDECREF(__pyx_r); | |
13367 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
13368 goto __pyx_L0; | |
13369 | |
13370 /* "pysam/libctabixproxies.pyx":384 | |
13371 * | |
13372 * cdef dot_or_float(v): | |
13373 * if v == "" or v == b".": # <<<<<<<<<<<<<< | |
13374 * return None | |
13375 * else: | |
13376 */ | |
13377 } | |
13378 | |
13379 /* "pysam/libctabixproxies.pyx":387 | |
13380 * return None | |
13381 * else: | |
13382 * try: # <<<<<<<<<<<<<< | |
13383 * return int(v) | |
13384 * except ValueError: | |
13385 */ | |
13386 /*else*/ { | |
13387 { | |
13388 __Pyx_PyThreadState_declare | |
13389 __Pyx_PyThreadState_assign | |
13390 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); | |
13391 __Pyx_XGOTREF(__pyx_t_3); | |
13392 __Pyx_XGOTREF(__pyx_t_4); | |
13393 __Pyx_XGOTREF(__pyx_t_5); | |
13394 /*try:*/ { | |
13395 | |
13396 /* "pysam/libctabixproxies.pyx":388 | |
13397 * else: | |
13398 * try: | |
13399 * return int(v) # <<<<<<<<<<<<<< | |
13400 * except ValueError: | |
13401 * return float(v) | |
13402 */ | |
13403 __Pyx_XDECREF(__pyx_r); | |
13404 __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_v_v); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 388, __pyx_L6_error) | |
13405 __Pyx_GOTREF(__pyx_t_6); | |
13406 __pyx_r = __pyx_t_6; | |
13407 __pyx_t_6 = 0; | |
13408 goto __pyx_L10_try_return; | |
13409 | |
13410 /* "pysam/libctabixproxies.pyx":387 | |
13411 * return None | |
13412 * else: | |
13413 * try: # <<<<<<<<<<<<<< | |
13414 * return int(v) | |
13415 * except ValueError: | |
13416 */ | |
13417 } | |
13418 __pyx_L6_error:; | |
13419 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
13420 | |
13421 /* "pysam/libctabixproxies.pyx":389 | |
13422 * try: | |
13423 * return int(v) | |
13424 * except ValueError: # <<<<<<<<<<<<<< | |
13425 * return float(v) | |
13426 * | |
13427 */ | |
13428 __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); | |
13429 if (__pyx_t_7) { | |
13430 __Pyx_AddTraceback("pysam.libctabixproxies.dot_or_float", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
13431 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 389, __pyx_L8_except_error) | |
13432 __Pyx_XGOTREF(__pyx_t_6); | |
13433 __Pyx_XGOTREF(__pyx_t_8); | |
13434 __Pyx_XGOTREF(__pyx_t_9); | |
13435 | |
13436 /* "pysam/libctabixproxies.pyx":390 | |
13437 * return int(v) | |
13438 * except ValueError: | |
13439 * return float(v) # <<<<<<<<<<<<<< | |
13440 * | |
13441 * | |
13442 */ | |
13443 __Pyx_XDECREF(__pyx_r); | |
13444 __pyx_t_10 = __Pyx_PyNumber_Float(__pyx_v_v); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 390, __pyx_L8_except_error) | |
13445 __Pyx_GOTREF(__pyx_t_10); | |
13446 __pyx_r = __pyx_t_10; | |
13447 __pyx_t_10 = 0; | |
13448 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
13449 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; | |
13450 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; | |
13451 goto __pyx_L9_except_return; | |
13452 } | |
13453 goto __pyx_L8_except_error; | |
13454 | |
13455 /* "pysam/libctabixproxies.pyx":387 | |
13456 * return None | |
13457 * else: | |
13458 * try: # <<<<<<<<<<<<<< | |
13459 * return int(v) | |
13460 * except ValueError: | |
13461 */ | |
13462 __pyx_L8_except_error:; | |
13463 __Pyx_XGIVEREF(__pyx_t_3); | |
13464 __Pyx_XGIVEREF(__pyx_t_4); | |
13465 __Pyx_XGIVEREF(__pyx_t_5); | |
13466 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); | |
13467 goto __pyx_L1_error; | |
13468 __pyx_L10_try_return:; | |
13469 __Pyx_XGIVEREF(__pyx_t_3); | |
13470 __Pyx_XGIVEREF(__pyx_t_4); | |
13471 __Pyx_XGIVEREF(__pyx_t_5); | |
13472 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); | |
13473 goto __pyx_L0; | |
13474 __pyx_L9_except_return:; | |
13475 __Pyx_XGIVEREF(__pyx_t_3); | |
13476 __Pyx_XGIVEREF(__pyx_t_4); | |
13477 __Pyx_XGIVEREF(__pyx_t_5); | |
13478 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); | |
13479 goto __pyx_L0; | |
13480 } | |
13481 } | |
13482 | |
13483 /* "pysam/libctabixproxies.pyx":383 | |
13484 * | |
13485 * | |
13486 * cdef dot_or_float(v): # <<<<<<<<<<<<<< | |
13487 * if v == "" or v == b".": | |
13488 * return None | |
13489 */ | |
13490 | |
13491 /* function exit code */ | |
13492 __pyx_L1_error:; | |
13493 __Pyx_XDECREF(__pyx_t_6); | |
13494 __Pyx_XDECREF(__pyx_t_8); | |
13495 __Pyx_XDECREF(__pyx_t_9); | |
13496 __Pyx_XDECREF(__pyx_t_10); | |
13497 __Pyx_AddTraceback("pysam.libctabixproxies.dot_or_float", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
13498 __pyx_r = 0; | |
13499 __pyx_L0:; | |
13500 __Pyx_XGIVEREF(__pyx_r); | |
13501 __Pyx_RefNannyFinishContext(); | |
13502 return __pyx_r; | |
13503 } | |
13504 | |
13505 /* "pysam/libctabixproxies.pyx":393 | |
13506 * | |
13507 * | |
13508 * cdef dot_or_int(v): # <<<<<<<<<<<<<< | |
13509 * if v == "" or v == b".": | |
13510 * return None | |
13511 */ | |
13512 | |
13513 static PyObject *__pyx_f_5pysam_16libctabixproxies_dot_or_int(PyObject *__pyx_v_v) { | |
13514 PyObject *__pyx_r = NULL; | |
13515 __Pyx_RefNannyDeclarations | |
13516 int __pyx_t_1; | |
13517 int __pyx_t_2; | |
13518 PyObject *__pyx_t_3 = NULL; | |
13519 int __pyx_lineno = 0; | |
13520 const char *__pyx_filename = NULL; | |
13521 int __pyx_clineno = 0; | |
13522 __Pyx_RefNannySetupContext("dot_or_int", 1); | |
13523 | |
13524 /* "pysam/libctabixproxies.pyx":394 | |
13525 * | |
13526 * cdef dot_or_int(v): | |
13527 * if v == "" or v == b".": # <<<<<<<<<<<<<< | |
13528 * return None | |
13529 * else: | |
13530 */ | |
13531 __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_v, __pyx_kp_u__13, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 394, __pyx_L1_error) | |
13532 if (!__pyx_t_2) { | |
13533 } else { | |
13534 __pyx_t_1 = __pyx_t_2; | |
13535 goto __pyx_L4_bool_binop_done; | |
13536 } | |
13537 __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_v_v, __pyx_kp_b__12, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 394, __pyx_L1_error) | |
13538 __pyx_t_1 = __pyx_t_2; | |
13539 __pyx_L4_bool_binop_done:; | |
13540 if (__pyx_t_1) { | |
13541 | |
13542 /* "pysam/libctabixproxies.pyx":395 | |
13543 * cdef dot_or_int(v): | |
13544 * if v == "" or v == b".": | |
13545 * return None # <<<<<<<<<<<<<< | |
13546 * else: | |
13547 * return int(v) | |
13548 */ | |
13549 __Pyx_XDECREF(__pyx_r); | |
13550 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
13551 goto __pyx_L0; | |
13552 | |
13553 /* "pysam/libctabixproxies.pyx":394 | |
13554 * | |
13555 * cdef dot_or_int(v): | |
13556 * if v == "" or v == b".": # <<<<<<<<<<<<<< | |
13557 * return None | |
13558 * else: | |
13559 */ | |
13560 } | |
13561 | |
13562 /* "pysam/libctabixproxies.pyx":397 | |
13563 * return None | |
13564 * else: | |
13565 * return int(v) # <<<<<<<<<<<<<< | |
13566 * | |
13567 * | |
13568 */ | |
13569 /*else*/ { | |
13570 __Pyx_XDECREF(__pyx_r); | |
13571 __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_v); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error) | |
13572 __Pyx_GOTREF(__pyx_t_3); | |
13573 __pyx_r = __pyx_t_3; | |
13574 __pyx_t_3 = 0; | |
13575 goto __pyx_L0; | |
13576 } | |
13577 | |
13578 /* "pysam/libctabixproxies.pyx":393 | |
13579 * | |
13580 * | |
13581 * cdef dot_or_int(v): # <<<<<<<<<<<<<< | |
13582 * if v == "" or v == b".": | |
13583 * return None | |
13584 */ | |
13585 | |
13586 /* function exit code */ | |
13587 __pyx_L1_error:; | |
13588 __Pyx_XDECREF(__pyx_t_3); | |
13589 __Pyx_AddTraceback("pysam.libctabixproxies.dot_or_int", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
13590 __pyx_r = 0; | |
13591 __pyx_L0:; | |
13592 __Pyx_XGIVEREF(__pyx_r); | |
13593 __Pyx_RefNannyFinishContext(); | |
13594 return __pyx_r; | |
13595 } | |
13596 | |
13597 /* "pysam/libctabixproxies.pyx":400 | |
13598 * | |
13599 * | |
13600 * cdef dot_or_str(v): # <<<<<<<<<<<<<< | |
13601 * if v == "" or v == b".": | |
13602 * return None | |
13603 */ | |
13604 | |
13605 static PyObject *__pyx_f_5pysam_16libctabixproxies_dot_or_str(PyObject *__pyx_v_v) { | |
13606 PyObject *__pyx_r = NULL; | |
13607 __Pyx_RefNannyDeclarations | |
13608 int __pyx_t_1; | |
13609 int __pyx_t_2; | |
13610 PyObject *__pyx_t_3 = NULL; | |
13611 int __pyx_lineno = 0; | |
13612 const char *__pyx_filename = NULL; | |
13613 int __pyx_clineno = 0; | |
13614 __Pyx_RefNannySetupContext("dot_or_str", 1); | |
13615 | |
13616 /* "pysam/libctabixproxies.pyx":401 | |
13617 * | |
13618 * cdef dot_or_str(v): | |
13619 * if v == "" or v == b".": # <<<<<<<<<<<<<< | |
13620 * return None | |
13621 * else: | |
13622 */ | |
13623 __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_v, __pyx_kp_u__13, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 401, __pyx_L1_error) | |
13624 if (!__pyx_t_2) { | |
13625 } else { | |
13626 __pyx_t_1 = __pyx_t_2; | |
13627 goto __pyx_L4_bool_binop_done; | |
13628 } | |
13629 __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_v_v, __pyx_kp_b__12, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 401, __pyx_L1_error) | |
13630 __pyx_t_1 = __pyx_t_2; | |
13631 __pyx_L4_bool_binop_done:; | |
13632 if (__pyx_t_1) { | |
13633 | |
13634 /* "pysam/libctabixproxies.pyx":402 | |
13635 * cdef dot_or_str(v): | |
13636 * if v == "" or v == b".": | |
13637 * return None # <<<<<<<<<<<<<< | |
13638 * else: | |
13639 * return force_str(v) | |
13640 */ | |
13641 __Pyx_XDECREF(__pyx_r); | |
13642 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
13643 goto __pyx_L0; | |
13644 | |
13645 /* "pysam/libctabixproxies.pyx":401 | |
13646 * | |
13647 * cdef dot_or_str(v): | |
13648 * if v == "" or v == b".": # <<<<<<<<<<<<<< | |
13649 * return None | |
13650 * else: | |
13651 */ | |
13652 } | |
13653 | |
13654 /* "pysam/libctabixproxies.pyx":404 | |
13655 * return None | |
13656 * else: | |
13657 * return force_str(v) # <<<<<<<<<<<<<< | |
13658 * | |
13659 * | |
13660 */ | |
13661 /*else*/ { | |
13662 __Pyx_XDECREF(__pyx_r); | |
13663 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_str(__pyx_v_v, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error) | |
13664 __Pyx_GOTREF(__pyx_t_3); | |
13665 __pyx_r = __pyx_t_3; | |
13666 __pyx_t_3 = 0; | |
13667 goto __pyx_L0; | |
13668 } | |
13669 | |
13670 /* "pysam/libctabixproxies.pyx":400 | |
13671 * | |
13672 * | |
13673 * cdef dot_or_str(v): # <<<<<<<<<<<<<< | |
13674 * if v == "" or v == b".": | |
13675 * return None | |
13676 */ | |
13677 | |
13678 /* function exit code */ | |
13679 __pyx_L1_error:; | |
13680 __Pyx_XDECREF(__pyx_t_3); | |
13681 __Pyx_AddTraceback("pysam.libctabixproxies.dot_or_str", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
13682 __pyx_r = 0; | |
13683 __pyx_L0:; | |
13684 __Pyx_XGIVEREF(__pyx_r); | |
13685 __Pyx_RefNannyFinishContext(); | |
13686 return __pyx_r; | |
13687 } | |
13688 | |
13689 /* "pysam/libctabixproxies.pyx":407 | |
13690 * | |
13691 * | |
13692 * cdef int from1based(v): # <<<<<<<<<<<<<< | |
13693 * return atoi(v) - 1 | |
13694 * | |
13695 */ | |
13696 | |
13697 static int __pyx_f_5pysam_16libctabixproxies_from1based(PyObject *__pyx_v_v) { | |
13698 int __pyx_r; | |
13699 char const *__pyx_t_1; | |
13700 int __pyx_lineno = 0; | |
13701 const char *__pyx_filename = NULL; | |
13702 int __pyx_clineno = 0; | |
13703 | |
13704 /* "pysam/libctabixproxies.pyx":408 | |
13705 * | |
13706 * cdef int from1based(v): | |
13707 * return atoi(v) - 1 # <<<<<<<<<<<<<< | |
13708 * | |
13709 * | |
13710 */ | |
13711 __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_v); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 408, __pyx_L1_error) | |
13712 __pyx_r = (atoi(__pyx_t_1) - 1); | |
13713 goto __pyx_L0; | |
13714 | |
13715 /* "pysam/libctabixproxies.pyx":407 | |
13716 * | |
13717 * | |
13718 * cdef int from1based(v): # <<<<<<<<<<<<<< | |
13719 * return atoi(v) - 1 | |
13720 * | |
13721 */ | |
13722 | |
13723 /* function exit code */ | |
13724 __pyx_L1_error:; | |
13725 __Pyx_AddTraceback("pysam.libctabixproxies.from1based", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
13726 __pyx_r = -1; | |
13727 __pyx_L0:; | |
13728 return __pyx_r; | |
13729 } | |
13730 | |
13731 /* "pysam/libctabixproxies.pyx":411 | |
13732 * | |
13733 * | |
13734 * cdef str to1based(int v): # <<<<<<<<<<<<<< | |
13735 * return str(v + 1) | |
13736 * | |
13737 */ | |
13738 | |
13739 static PyObject *__pyx_f_5pysam_16libctabixproxies_to1based(int __pyx_v_v) { | |
13740 PyObject *__pyx_r = NULL; | |
13741 __Pyx_RefNannyDeclarations | |
13742 PyObject *__pyx_t_1 = NULL; | |
13743 PyObject *__pyx_t_2 = NULL; | |
13744 int __pyx_lineno = 0; | |
13745 const char *__pyx_filename = NULL; | |
13746 int __pyx_clineno = 0; | |
13747 __Pyx_RefNannySetupContext("to1based", 1); | |
13748 | |
13749 /* "pysam/libctabixproxies.pyx":412 | |
13750 * | |
13751 * cdef str to1based(int v): | |
13752 * return str(v + 1) # <<<<<<<<<<<<<< | |
13753 * | |
13754 * | |
13755 */ | |
13756 __Pyx_XDECREF(__pyx_r); | |
13757 __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_v + 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error) | |
13758 __Pyx_GOTREF(__pyx_t_1); | |
13759 __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error) | |
13760 __Pyx_GOTREF(__pyx_t_2); | |
13761 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
13762 __pyx_r = ((PyObject*)__pyx_t_2); | |
13763 __pyx_t_2 = 0; | |
13764 goto __pyx_L0; | |
13765 | |
13766 /* "pysam/libctabixproxies.pyx":411 | |
13767 * | |
13768 * | |
13769 * cdef str to1based(int v): # <<<<<<<<<<<<<< | |
13770 * return str(v + 1) | |
13771 * | |
13772 */ | |
13773 | |
13774 /* function exit code */ | |
13775 __pyx_L1_error:; | |
13776 __Pyx_XDECREF(__pyx_t_1); | |
13777 __Pyx_XDECREF(__pyx_t_2); | |
13778 __Pyx_AddTraceback("pysam.libctabixproxies.to1based", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
13779 __pyx_r = 0; | |
13780 __pyx_L0:; | |
13781 __Pyx_XGIVEREF(__pyx_r); | |
13782 __Pyx_RefNannyFinishContext(); | |
13783 return __pyx_r; | |
13784 } | |
13785 | |
13786 /* "pysam/libctabixproxies.pyx":445 | |
13787 * 'attributes': (8, (str, str))} | |
13788 * | |
13789 * def __cinit__(self): # <<<<<<<<<<<<<< | |
13790 * # automatically calls TupleProxy.__cinit__ | |
13791 * self.attribute_dict = None | |
13792 */ | |
13793 | |
13794 /* Python wrapper */ | |
13795 static int __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ | |
13796 static int __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { | |
13797 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
13798 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
13799 int __pyx_r; | |
13800 __Pyx_RefNannyDeclarations | |
13801 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); | |
13802 #if CYTHON_ASSUME_SAFE_MACROS | |
13803 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
13804 #else | |
13805 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; | |
13806 #endif | |
13807 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
13808 if (unlikely(__pyx_nargs > 0)) { | |
13809 __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;} | |
13810 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; | |
13811 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy___cinit__(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self)); | |
13812 | |
13813 /* function exit code */ | |
13814 __Pyx_RefNannyFinishContext(); | |
13815 return __pyx_r; | |
13816 } | |
13817 | |
13818 static int __pyx_pf_5pysam_16libctabixproxies_8GTFProxy___cinit__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self) { | |
13819 int __pyx_r; | |
13820 __Pyx_RefNannyDeclarations | |
13821 __Pyx_RefNannySetupContext("__cinit__", 1); | |
13822 | |
13823 /* "pysam/libctabixproxies.pyx":447 | |
13824 * def __cinit__(self): | |
13825 * # automatically calls TupleProxy.__cinit__ | |
13826 * self.attribute_dict = None # <<<<<<<<<<<<<< | |
13827 * | |
13828 * cpdef int getMinFields(self): | |
13829 */ | |
13830 __Pyx_INCREF(Py_None); | |
13831 __Pyx_GIVEREF(Py_None); | |
13832 __Pyx_GOTREF(__pyx_v_self->attribute_dict); | |
13833 __Pyx_DECREF(__pyx_v_self->attribute_dict); | |
13834 __pyx_v_self->attribute_dict = Py_None; | |
13835 | |
13836 /* "pysam/libctabixproxies.pyx":445 | |
13837 * 'attributes': (8, (str, str))} | |
13838 * | |
13839 * def __cinit__(self): # <<<<<<<<<<<<<< | |
13840 * # automatically calls TupleProxy.__cinit__ | |
13841 * self.attribute_dict = None | |
13842 */ | |
13843 | |
13844 /* function exit code */ | |
13845 __pyx_r = 0; | |
13846 __Pyx_RefNannyFinishContext(); | |
13847 return __pyx_r; | |
13848 } | |
13849 | |
13850 /* "pysam/libctabixproxies.pyx":449 | |
13851 * self.attribute_dict = None | |
13852 * | |
13853 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
13854 * '''return minimum number of fields.''' | |
13855 * return 9 | |
13856 */ | |
13857 | |
13858 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_3getMinFields(PyObject *__pyx_v_self, | |
13859 #if CYTHON_METH_FASTCALL | |
13860 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
13861 #else | |
13862 PyObject *__pyx_args, PyObject *__pyx_kwds | |
13863 #endif | |
13864 ); /*proto*/ | |
13865 static int __pyx_f_5pysam_16libctabixproxies_8GTFProxy_getMinFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, int __pyx_skip_dispatch) { | |
13866 int __pyx_r; | |
13867 __Pyx_RefNannyDeclarations | |
13868 PyObject *__pyx_t_1 = NULL; | |
13869 PyObject *__pyx_t_2 = NULL; | |
13870 PyObject *__pyx_t_3 = NULL; | |
13871 PyObject *__pyx_t_4 = NULL; | |
13872 unsigned int __pyx_t_5; | |
13873 int __pyx_t_6; | |
13874 int __pyx_lineno = 0; | |
13875 const char *__pyx_filename = NULL; | |
13876 int __pyx_clineno = 0; | |
13877 __Pyx_RefNannySetupContext("getMinFields", 1); | |
13878 /* Check if called by wrapper */ | |
13879 if (unlikely(__pyx_skip_dispatch)) ; | |
13880 /* Check if overridden in Python */ | |
13881 else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { | |
13882 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
13883 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
13884 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { | |
13885 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
13886 #endif | |
13887 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMinFields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) | |
13888 __Pyx_GOTREF(__pyx_t_1); | |
13889 if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_3getMinFields)) { | |
13890 __Pyx_INCREF(__pyx_t_1); | |
13891 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; | |
13892 __pyx_t_5 = 0; | |
13893 #if CYTHON_UNPACK_METHODS | |
13894 if (unlikely(PyMethod_Check(__pyx_t_3))) { | |
13895 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); | |
13896 if (likely(__pyx_t_4)) { | |
13897 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
13898 __Pyx_INCREF(__pyx_t_4); | |
13899 __Pyx_INCREF(function); | |
13900 __Pyx_DECREF_SET(__pyx_t_3, function); | |
13901 __pyx_t_5 = 1; | |
13902 } | |
13903 } | |
13904 #endif | |
13905 { | |
13906 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; | |
13907 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); | |
13908 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
13909 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) | |
13910 __Pyx_GOTREF(__pyx_t_2); | |
13911 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
13912 } | |
13913 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 449, __pyx_L1_error) | |
13914 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
13915 __pyx_r = __pyx_t_6; | |
13916 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
13917 goto __pyx_L0; | |
13918 } | |
13919 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
13920 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
13921 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); | |
13922 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { | |
13923 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
13924 } | |
13925 #endif | |
13926 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
13927 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
13928 } | |
13929 #endif | |
13930 } | |
13931 | |
13932 /* "pysam/libctabixproxies.pyx":451 | |
13933 * cpdef int getMinFields(self): | |
13934 * '''return minimum number of fields.''' | |
13935 * return 9 # <<<<<<<<<<<<<< | |
13936 * | |
13937 * cpdef int getMaxFields(self): | |
13938 */ | |
13939 __pyx_r = 9; | |
13940 goto __pyx_L0; | |
13941 | |
13942 /* "pysam/libctabixproxies.pyx":449 | |
13943 * self.attribute_dict = None | |
13944 * | |
13945 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
13946 * '''return minimum number of fields.''' | |
13947 * return 9 | |
13948 */ | |
13949 | |
13950 /* function exit code */ | |
13951 __pyx_L1_error:; | |
13952 __Pyx_XDECREF(__pyx_t_1); | |
13953 __Pyx_XDECREF(__pyx_t_2); | |
13954 __Pyx_XDECREF(__pyx_t_3); | |
13955 __Pyx_XDECREF(__pyx_t_4); | |
13956 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.getMinFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
13957 __pyx_r = 0; | |
13958 __pyx_L0:; | |
13959 __Pyx_RefNannyFinishContext(); | |
13960 return __pyx_r; | |
13961 } | |
13962 | |
13963 /* Python wrapper */ | |
13964 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_3getMinFields(PyObject *__pyx_v_self, | |
13965 #if CYTHON_METH_FASTCALL | |
13966 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
13967 #else | |
13968 PyObject *__pyx_args, PyObject *__pyx_kwds | |
13969 #endif | |
13970 ); /*proto*/ | |
13971 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_2getMinFields, "return minimum number of fields."); | |
13972 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_3getMinFields = {"getMinFields", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_3getMinFields, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_2getMinFields}; | |
13973 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_3getMinFields(PyObject *__pyx_v_self, | |
13974 #if CYTHON_METH_FASTCALL | |
13975 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
13976 #else | |
13977 PyObject *__pyx_args, PyObject *__pyx_kwds | |
13978 #endif | |
13979 ) { | |
13980 #if !CYTHON_METH_FASTCALL | |
13981 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
13982 #endif | |
13983 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
13984 PyObject *__pyx_r = 0; | |
13985 __Pyx_RefNannyDeclarations | |
13986 __Pyx_RefNannySetupContext("getMinFields (wrapper)", 0); | |
13987 #if !CYTHON_METH_FASTCALL | |
13988 #if CYTHON_ASSUME_SAFE_MACROS | |
13989 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
13990 #else | |
13991 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
13992 #endif | |
13993 #endif | |
13994 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
13995 if (unlikely(__pyx_nargs > 0)) { | |
13996 __Pyx_RaiseArgtupleInvalid("getMinFields", 1, 0, 0, __pyx_nargs); return NULL;} | |
13997 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMinFields", 0))) return NULL; | |
13998 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_2getMinFields(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self)); | |
13999 | |
14000 /* function exit code */ | |
14001 __Pyx_RefNannyFinishContext(); | |
14002 return __pyx_r; | |
14003 } | |
14004 | |
14005 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_2getMinFields(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self) { | |
14006 PyObject *__pyx_r = NULL; | |
14007 __Pyx_RefNannyDeclarations | |
14008 int __pyx_t_1; | |
14009 PyObject *__pyx_t_2 = NULL; | |
14010 int __pyx_lineno = 0; | |
14011 const char *__pyx_filename = NULL; | |
14012 int __pyx_clineno = 0; | |
14013 __Pyx_RefNannySetupContext("getMinFields", 1); | |
14014 __Pyx_XDECREF(__pyx_r); | |
14015 __pyx_t_1 = __pyx_f_5pysam_16libctabixproxies_8GTFProxy_getMinFields(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 449, __pyx_L1_error) | |
14016 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) | |
14017 __Pyx_GOTREF(__pyx_t_2); | |
14018 __pyx_r = __pyx_t_2; | |
14019 __pyx_t_2 = 0; | |
14020 goto __pyx_L0; | |
14021 | |
14022 /* function exit code */ | |
14023 __pyx_L1_error:; | |
14024 __Pyx_XDECREF(__pyx_t_2); | |
14025 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.getMinFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
14026 __pyx_r = NULL; | |
14027 __pyx_L0:; | |
14028 __Pyx_XGIVEREF(__pyx_r); | |
14029 __Pyx_RefNannyFinishContext(); | |
14030 return __pyx_r; | |
14031 } | |
14032 | |
14033 /* "pysam/libctabixproxies.pyx":453 | |
14034 * return 9 | |
14035 * | |
14036 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
14037 * '''return max number of fields.''' | |
14038 * return 9 | |
14039 */ | |
14040 | |
14041 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_5getMaxFields(PyObject *__pyx_v_self, | |
14042 #if CYTHON_METH_FASTCALL | |
14043 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
14044 #else | |
14045 PyObject *__pyx_args, PyObject *__pyx_kwds | |
14046 #endif | |
14047 ); /*proto*/ | |
14048 static int __pyx_f_5pysam_16libctabixproxies_8GTFProxy_getMaxFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, int __pyx_skip_dispatch) { | |
14049 int __pyx_r; | |
14050 __Pyx_RefNannyDeclarations | |
14051 PyObject *__pyx_t_1 = NULL; | |
14052 PyObject *__pyx_t_2 = NULL; | |
14053 PyObject *__pyx_t_3 = NULL; | |
14054 PyObject *__pyx_t_4 = NULL; | |
14055 unsigned int __pyx_t_5; | |
14056 int __pyx_t_6; | |
14057 int __pyx_lineno = 0; | |
14058 const char *__pyx_filename = NULL; | |
14059 int __pyx_clineno = 0; | |
14060 __Pyx_RefNannySetupContext("getMaxFields", 1); | |
14061 /* Check if called by wrapper */ | |
14062 if (unlikely(__pyx_skip_dispatch)) ; | |
14063 /* Check if overridden in Python */ | |
14064 else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { | |
14065 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
14066 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
14067 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { | |
14068 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
14069 #endif | |
14070 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMaxFields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) | |
14071 __Pyx_GOTREF(__pyx_t_1); | |
14072 if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_5getMaxFields)) { | |
14073 __Pyx_INCREF(__pyx_t_1); | |
14074 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; | |
14075 __pyx_t_5 = 0; | |
14076 #if CYTHON_UNPACK_METHODS | |
14077 if (unlikely(PyMethod_Check(__pyx_t_3))) { | |
14078 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); | |
14079 if (likely(__pyx_t_4)) { | |
14080 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
14081 __Pyx_INCREF(__pyx_t_4); | |
14082 __Pyx_INCREF(function); | |
14083 __Pyx_DECREF_SET(__pyx_t_3, function); | |
14084 __pyx_t_5 = 1; | |
14085 } | |
14086 } | |
14087 #endif | |
14088 { | |
14089 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; | |
14090 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); | |
14091 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
14092 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) | |
14093 __Pyx_GOTREF(__pyx_t_2); | |
14094 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
14095 } | |
14096 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 453, __pyx_L1_error) | |
14097 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
14098 __pyx_r = __pyx_t_6; | |
14099 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
14100 goto __pyx_L0; | |
14101 } | |
14102 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
14103 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
14104 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); | |
14105 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { | |
14106 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
14107 } | |
14108 #endif | |
14109 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
14110 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
14111 } | |
14112 #endif | |
14113 } | |
14114 | |
14115 /* "pysam/libctabixproxies.pyx":455 | |
14116 * cpdef int getMaxFields(self): | |
14117 * '''return max number of fields.''' | |
14118 * return 9 # <<<<<<<<<<<<<< | |
14119 * | |
14120 * def to_dict(self): | |
14121 */ | |
14122 __pyx_r = 9; | |
14123 goto __pyx_L0; | |
14124 | |
14125 /* "pysam/libctabixproxies.pyx":453 | |
14126 * return 9 | |
14127 * | |
14128 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
14129 * '''return max number of fields.''' | |
14130 * return 9 | |
14131 */ | |
14132 | |
14133 /* function exit code */ | |
14134 __pyx_L1_error:; | |
14135 __Pyx_XDECREF(__pyx_t_1); | |
14136 __Pyx_XDECREF(__pyx_t_2); | |
14137 __Pyx_XDECREF(__pyx_t_3); | |
14138 __Pyx_XDECREF(__pyx_t_4); | |
14139 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.getMaxFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
14140 __pyx_r = 0; | |
14141 __pyx_L0:; | |
14142 __Pyx_RefNannyFinishContext(); | |
14143 return __pyx_r; | |
14144 } | |
14145 | |
14146 /* Python wrapper */ | |
14147 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_5getMaxFields(PyObject *__pyx_v_self, | |
14148 #if CYTHON_METH_FASTCALL | |
14149 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
14150 #else | |
14151 PyObject *__pyx_args, PyObject *__pyx_kwds | |
14152 #endif | |
14153 ); /*proto*/ | |
14154 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_4getMaxFields, "return max number of fields."); | |
14155 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_5getMaxFields = {"getMaxFields", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_5getMaxFields, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_4getMaxFields}; | |
14156 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_5getMaxFields(PyObject *__pyx_v_self, | |
14157 #if CYTHON_METH_FASTCALL | |
14158 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
14159 #else | |
14160 PyObject *__pyx_args, PyObject *__pyx_kwds | |
14161 #endif | |
14162 ) { | |
14163 #if !CYTHON_METH_FASTCALL | |
14164 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
14165 #endif | |
14166 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
14167 PyObject *__pyx_r = 0; | |
14168 __Pyx_RefNannyDeclarations | |
14169 __Pyx_RefNannySetupContext("getMaxFields (wrapper)", 0); | |
14170 #if !CYTHON_METH_FASTCALL | |
14171 #if CYTHON_ASSUME_SAFE_MACROS | |
14172 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
14173 #else | |
14174 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
14175 #endif | |
14176 #endif | |
14177 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
14178 if (unlikely(__pyx_nargs > 0)) { | |
14179 __Pyx_RaiseArgtupleInvalid("getMaxFields", 1, 0, 0, __pyx_nargs); return NULL;} | |
14180 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMaxFields", 0))) return NULL; | |
14181 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_4getMaxFields(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self)); | |
14182 | |
14183 /* function exit code */ | |
14184 __Pyx_RefNannyFinishContext(); | |
14185 return __pyx_r; | |
14186 } | |
14187 | |
14188 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_4getMaxFields(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self) { | |
14189 PyObject *__pyx_r = NULL; | |
14190 __Pyx_RefNannyDeclarations | |
14191 int __pyx_t_1; | |
14192 PyObject *__pyx_t_2 = NULL; | |
14193 int __pyx_lineno = 0; | |
14194 const char *__pyx_filename = NULL; | |
14195 int __pyx_clineno = 0; | |
14196 __Pyx_RefNannySetupContext("getMaxFields", 1); | |
14197 __Pyx_XDECREF(__pyx_r); | |
14198 __pyx_t_1 = __pyx_f_5pysam_16libctabixproxies_8GTFProxy_getMaxFields(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 453, __pyx_L1_error) | |
14199 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) | |
14200 __Pyx_GOTREF(__pyx_t_2); | |
14201 __pyx_r = __pyx_t_2; | |
14202 __pyx_t_2 = 0; | |
14203 goto __pyx_L0; | |
14204 | |
14205 /* function exit code */ | |
14206 __pyx_L1_error:; | |
14207 __Pyx_XDECREF(__pyx_t_2); | |
14208 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.getMaxFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
14209 __pyx_r = NULL; | |
14210 __pyx_L0:; | |
14211 __Pyx_XGIVEREF(__pyx_r); | |
14212 __Pyx_RefNannyFinishContext(); | |
14213 return __pyx_r; | |
14214 } | |
14215 | |
14216 /* "pysam/libctabixproxies.pyx":457 | |
14217 * return 9 | |
14218 * | |
14219 * def to_dict(self): # <<<<<<<<<<<<<< | |
14220 * """parse attributes - return as dict | |
14221 * | |
14222 */ | |
14223 | |
14224 /* Python wrapper */ | |
14225 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_7to_dict(PyObject *__pyx_v_self, | |
14226 #if CYTHON_METH_FASTCALL | |
14227 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
14228 #else | |
14229 PyObject *__pyx_args, PyObject *__pyx_kwds | |
14230 #endif | |
14231 ); /*proto*/ | |
14232 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_6to_dict, "parse attributes - return as dict\n\n The dictionary can be modified to update attributes.\n "); | |
14233 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_7to_dict = {"to_dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_7to_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_6to_dict}; | |
14234 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_7to_dict(PyObject *__pyx_v_self, | |
14235 #if CYTHON_METH_FASTCALL | |
14236 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
14237 #else | |
14238 PyObject *__pyx_args, PyObject *__pyx_kwds | |
14239 #endif | |
14240 ) { | |
14241 #if !CYTHON_METH_FASTCALL | |
14242 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
14243 #endif | |
14244 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
14245 PyObject *__pyx_r = 0; | |
14246 __Pyx_RefNannyDeclarations | |
14247 __Pyx_RefNannySetupContext("to_dict (wrapper)", 0); | |
14248 #if !CYTHON_METH_FASTCALL | |
14249 #if CYTHON_ASSUME_SAFE_MACROS | |
14250 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
14251 #else | |
14252 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
14253 #endif | |
14254 #endif | |
14255 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
14256 if (unlikely(__pyx_nargs > 0)) { | |
14257 __Pyx_RaiseArgtupleInvalid("to_dict", 1, 0, 0, __pyx_nargs); return NULL;} | |
14258 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "to_dict", 0))) return NULL; | |
14259 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_6to_dict(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self)); | |
14260 | |
14261 /* function exit code */ | |
14262 __Pyx_RefNannyFinishContext(); | |
14263 return __pyx_r; | |
14264 } | |
14265 | |
14266 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_6to_dict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self) { | |
14267 PyObject *__pyx_r = NULL; | |
14268 __Pyx_RefNannyDeclarations | |
14269 int __pyx_t_1; | |
14270 int __pyx_t_2; | |
14271 PyObject *__pyx_t_3 = NULL; | |
14272 PyObject *__pyx_t_4 = NULL; | |
14273 PyObject *__pyx_t_5 = NULL; | |
14274 PyObject *__pyx_t_6 = NULL; | |
14275 unsigned int __pyx_t_7; | |
14276 int __pyx_lineno = 0; | |
14277 const char *__pyx_filename = NULL; | |
14278 int __pyx_clineno = 0; | |
14279 __Pyx_RefNannySetupContext("to_dict", 1); | |
14280 | |
14281 /* "pysam/libctabixproxies.pyx":462 | |
14282 * The dictionary can be modified to update attributes. | |
14283 * """ | |
14284 * if not self.attribute_dict: # <<<<<<<<<<<<<< | |
14285 * self.attribute_dict = self.attribute_string2dict( | |
14286 * self.attributes) | |
14287 */ | |
14288 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->attribute_dict); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 462, __pyx_L1_error) | |
14289 __pyx_t_2 = (!__pyx_t_1); | |
14290 if (__pyx_t_2) { | |
14291 | |
14292 /* "pysam/libctabixproxies.pyx":463 | |
14293 * """ | |
14294 * if not self.attribute_dict: | |
14295 * self.attribute_dict = self.attribute_string2dict( # <<<<<<<<<<<<<< | |
14296 * self.attributes) | |
14297 * self.is_modified = True | |
14298 */ | |
14299 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attribute_string2dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L1_error) | |
14300 __Pyx_GOTREF(__pyx_t_4); | |
14301 | |
14302 /* "pysam/libctabixproxies.pyx":464 | |
14303 * if not self.attribute_dict: | |
14304 * self.attribute_dict = self.attribute_string2dict( | |
14305 * self.attributes) # <<<<<<<<<<<<<< | |
14306 * self.is_modified = True | |
14307 * return self.attribute_dict | |
14308 */ | |
14309 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error) | |
14310 __Pyx_GOTREF(__pyx_t_5); | |
14311 __pyx_t_6 = NULL; | |
14312 __pyx_t_7 = 0; | |
14313 #if CYTHON_UNPACK_METHODS | |
14314 if (likely(PyMethod_Check(__pyx_t_4))) { | |
14315 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); | |
14316 if (likely(__pyx_t_6)) { | |
14317 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); | |
14318 __Pyx_INCREF(__pyx_t_6); | |
14319 __Pyx_INCREF(function); | |
14320 __Pyx_DECREF_SET(__pyx_t_4, function); | |
14321 __pyx_t_7 = 1; | |
14322 } | |
14323 } | |
14324 #endif | |
14325 { | |
14326 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5}; | |
14327 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); | |
14328 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
14329 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
14330 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error) | |
14331 __Pyx_GOTREF(__pyx_t_3); | |
14332 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
14333 } | |
14334 | |
14335 /* "pysam/libctabixproxies.pyx":463 | |
14336 * """ | |
14337 * if not self.attribute_dict: | |
14338 * self.attribute_dict = self.attribute_string2dict( # <<<<<<<<<<<<<< | |
14339 * self.attributes) | |
14340 * self.is_modified = True | |
14341 */ | |
14342 __Pyx_GIVEREF(__pyx_t_3); | |
14343 __Pyx_GOTREF(__pyx_v_self->attribute_dict); | |
14344 __Pyx_DECREF(__pyx_v_self->attribute_dict); | |
14345 __pyx_v_self->attribute_dict = __pyx_t_3; | |
14346 __pyx_t_3 = 0; | |
14347 | |
14348 /* "pysam/libctabixproxies.pyx":465 | |
14349 * self.attribute_dict = self.attribute_string2dict( | |
14350 * self.attributes) | |
14351 * self.is_modified = True # <<<<<<<<<<<<<< | |
14352 * return self.attribute_dict | |
14353 * | |
14354 */ | |
14355 __pyx_v_self->__pyx_base.__pyx_base.is_modified = 1; | |
14356 | |
14357 /* "pysam/libctabixproxies.pyx":462 | |
14358 * The dictionary can be modified to update attributes. | |
14359 * """ | |
14360 * if not self.attribute_dict: # <<<<<<<<<<<<<< | |
14361 * self.attribute_dict = self.attribute_string2dict( | |
14362 * self.attributes) | |
14363 */ | |
14364 } | |
14365 | |
14366 /* "pysam/libctabixproxies.pyx":466 | |
14367 * self.attributes) | |
14368 * self.is_modified = True | |
14369 * return self.attribute_dict # <<<<<<<<<<<<<< | |
14370 * | |
14371 * def as_dict(self): | |
14372 */ | |
14373 __Pyx_XDECREF(__pyx_r); | |
14374 __Pyx_INCREF(__pyx_v_self->attribute_dict); | |
14375 __pyx_r = __pyx_v_self->attribute_dict; | |
14376 goto __pyx_L0; | |
14377 | |
14378 /* "pysam/libctabixproxies.pyx":457 | |
14379 * return 9 | |
14380 * | |
14381 * def to_dict(self): # <<<<<<<<<<<<<< | |
14382 * """parse attributes - return as dict | |
14383 * | |
14384 */ | |
14385 | |
14386 /* function exit code */ | |
14387 __pyx_L1_error:; | |
14388 __Pyx_XDECREF(__pyx_t_3); | |
14389 __Pyx_XDECREF(__pyx_t_4); | |
14390 __Pyx_XDECREF(__pyx_t_5); | |
14391 __Pyx_XDECREF(__pyx_t_6); | |
14392 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
14393 __pyx_r = NULL; | |
14394 __pyx_L0:; | |
14395 __Pyx_XGIVEREF(__pyx_r); | |
14396 __Pyx_RefNannyFinishContext(); | |
14397 return __pyx_r; | |
14398 } | |
14399 | |
14400 /* "pysam/libctabixproxies.pyx":468 | |
14401 * return self.attribute_dict | |
14402 * | |
14403 * def as_dict(self): # <<<<<<<<<<<<<< | |
14404 * """deprecated: use :meth:`to_dict` | |
14405 * """ | |
14406 */ | |
14407 | |
14408 /* Python wrapper */ | |
14409 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_9as_dict(PyObject *__pyx_v_self, | |
14410 #if CYTHON_METH_FASTCALL | |
14411 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
14412 #else | |
14413 PyObject *__pyx_args, PyObject *__pyx_kwds | |
14414 #endif | |
14415 ); /*proto*/ | |
14416 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_8as_dict, "deprecated: use :meth:`to_dict`\n "); | |
14417 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_9as_dict = {"as_dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_9as_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_8as_dict}; | |
14418 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_9as_dict(PyObject *__pyx_v_self, | |
14419 #if CYTHON_METH_FASTCALL | |
14420 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
14421 #else | |
14422 PyObject *__pyx_args, PyObject *__pyx_kwds | |
14423 #endif | |
14424 ) { | |
14425 #if !CYTHON_METH_FASTCALL | |
14426 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
14427 #endif | |
14428 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
14429 PyObject *__pyx_r = 0; | |
14430 __Pyx_RefNannyDeclarations | |
14431 __Pyx_RefNannySetupContext("as_dict (wrapper)", 0); | |
14432 #if !CYTHON_METH_FASTCALL | |
14433 #if CYTHON_ASSUME_SAFE_MACROS | |
14434 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
14435 #else | |
14436 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
14437 #endif | |
14438 #endif | |
14439 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
14440 if (unlikely(__pyx_nargs > 0)) { | |
14441 __Pyx_RaiseArgtupleInvalid("as_dict", 1, 0, 0, __pyx_nargs); return NULL;} | |
14442 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "as_dict", 0))) return NULL; | |
14443 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_8as_dict(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self)); | |
14444 | |
14445 /* function exit code */ | |
14446 __Pyx_RefNannyFinishContext(); | |
14447 return __pyx_r; | |
14448 } | |
14449 | |
14450 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_8as_dict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self) { | |
14451 PyObject *__pyx_r = NULL; | |
14452 __Pyx_RefNannyDeclarations | |
14453 PyObject *__pyx_t_1 = NULL; | |
14454 PyObject *__pyx_t_2 = NULL; | |
14455 PyObject *__pyx_t_3 = NULL; | |
14456 unsigned int __pyx_t_4; | |
14457 int __pyx_lineno = 0; | |
14458 const char *__pyx_filename = NULL; | |
14459 int __pyx_clineno = 0; | |
14460 __Pyx_RefNannySetupContext("as_dict", 1); | |
14461 | |
14462 /* "pysam/libctabixproxies.pyx":471 | |
14463 * """deprecated: use :meth:`to_dict` | |
14464 * """ | |
14465 * return self.to_dict() # <<<<<<<<<<<<<< | |
14466 * | |
14467 * def from_dict(self, d): | |
14468 */ | |
14469 __Pyx_XDECREF(__pyx_r); | |
14470 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error) | |
14471 __Pyx_GOTREF(__pyx_t_2); | |
14472 __pyx_t_3 = NULL; | |
14473 __pyx_t_4 = 0; | |
14474 #if CYTHON_UNPACK_METHODS | |
14475 if (likely(PyMethod_Check(__pyx_t_2))) { | |
14476 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); | |
14477 if (likely(__pyx_t_3)) { | |
14478 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
14479 __Pyx_INCREF(__pyx_t_3); | |
14480 __Pyx_INCREF(function); | |
14481 __Pyx_DECREF_SET(__pyx_t_2, function); | |
14482 __pyx_t_4 = 1; | |
14483 } | |
14484 } | |
14485 #endif | |
14486 { | |
14487 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; | |
14488 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); | |
14489 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; | |
14490 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) | |
14491 __Pyx_GOTREF(__pyx_t_1); | |
14492 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
14493 } | |
14494 __pyx_r = __pyx_t_1; | |
14495 __pyx_t_1 = 0; | |
14496 goto __pyx_L0; | |
14497 | |
14498 /* "pysam/libctabixproxies.pyx":468 | |
14499 * return self.attribute_dict | |
14500 * | |
14501 * def as_dict(self): # <<<<<<<<<<<<<< | |
14502 * """deprecated: use :meth:`to_dict` | |
14503 * """ | |
14504 */ | |
14505 | |
14506 /* function exit code */ | |
14507 __pyx_L1_error:; | |
14508 __Pyx_XDECREF(__pyx_t_1); | |
14509 __Pyx_XDECREF(__pyx_t_2); | |
14510 __Pyx_XDECREF(__pyx_t_3); | |
14511 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.as_dict", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
14512 __pyx_r = NULL; | |
14513 __pyx_L0:; | |
14514 __Pyx_XGIVEREF(__pyx_r); | |
14515 __Pyx_RefNannyFinishContext(); | |
14516 return __pyx_r; | |
14517 } | |
14518 | |
14519 /* "pysam/libctabixproxies.pyx":473 | |
14520 * return self.to_dict() | |
14521 * | |
14522 * def from_dict(self, d): # <<<<<<<<<<<<<< | |
14523 * '''set attributes from a dictionary.''' | |
14524 * self.attribute_dict = None | |
14525 */ | |
14526 | |
14527 /* Python wrapper */ | |
14528 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_11from_dict(PyObject *__pyx_v_self, | |
14529 #if CYTHON_METH_FASTCALL | |
14530 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
14531 #else | |
14532 PyObject *__pyx_args, PyObject *__pyx_kwds | |
14533 #endif | |
14534 ); /*proto*/ | |
14535 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_10from_dict, "set attributes from a dictionary."); | |
14536 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_11from_dict = {"from_dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_11from_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_10from_dict}; | |
14537 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_11from_dict(PyObject *__pyx_v_self, | |
14538 #if CYTHON_METH_FASTCALL | |
14539 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
14540 #else | |
14541 PyObject *__pyx_args, PyObject *__pyx_kwds | |
14542 #endif | |
14543 ) { | |
14544 PyObject *__pyx_v_d = 0; | |
14545 #if !CYTHON_METH_FASTCALL | |
14546 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
14547 #endif | |
14548 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
14549 PyObject* values[1] = {0}; | |
14550 int __pyx_lineno = 0; | |
14551 const char *__pyx_filename = NULL; | |
14552 int __pyx_clineno = 0; | |
14553 PyObject *__pyx_r = 0; | |
14554 __Pyx_RefNannyDeclarations | |
14555 __Pyx_RefNannySetupContext("from_dict (wrapper)", 0); | |
14556 #if !CYTHON_METH_FASTCALL | |
14557 #if CYTHON_ASSUME_SAFE_MACROS | |
14558 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
14559 #else | |
14560 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
14561 #endif | |
14562 #endif | |
14563 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
14564 { | |
14565 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,0}; | |
14566 if (__pyx_kwds) { | |
14567 Py_ssize_t kw_args; | |
14568 switch (__pyx_nargs) { | |
14569 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
14570 CYTHON_FALLTHROUGH; | |
14571 case 0: break; | |
14572 default: goto __pyx_L5_argtuple_error; | |
14573 } | |
14574 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
14575 switch (__pyx_nargs) { | |
14576 case 0: | |
14577 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_d)) != 0)) { | |
14578 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
14579 kw_args--; | |
14580 } | |
14581 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L3_error) | |
14582 else goto __pyx_L5_argtuple_error; | |
14583 } | |
14584 if (unlikely(kw_args > 0)) { | |
14585 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
14586 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "from_dict") < 0)) __PYX_ERR(0, 473, __pyx_L3_error) | |
14587 } | |
14588 } else if (unlikely(__pyx_nargs != 1)) { | |
14589 goto __pyx_L5_argtuple_error; | |
14590 } else { | |
14591 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
14592 } | |
14593 __pyx_v_d = values[0]; | |
14594 } | |
14595 goto __pyx_L6_skip; | |
14596 __pyx_L5_argtuple_error:; | |
14597 __Pyx_RaiseArgtupleInvalid("from_dict", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 473, __pyx_L3_error) | |
14598 __pyx_L6_skip:; | |
14599 goto __pyx_L4_argument_unpacking_done; | |
14600 __pyx_L3_error:; | |
14601 { | |
14602 Py_ssize_t __pyx_temp; | |
14603 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
14604 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
14605 } | |
14606 } | |
14607 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
14608 __Pyx_RefNannyFinishContext(); | |
14609 return NULL; | |
14610 __pyx_L4_argument_unpacking_done:; | |
14611 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_10from_dict(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), __pyx_v_d); | |
14612 | |
14613 /* function exit code */ | |
14614 { | |
14615 Py_ssize_t __pyx_temp; | |
14616 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
14617 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
14618 } | |
14619 } | |
14620 __Pyx_RefNannyFinishContext(); | |
14621 return __pyx_r; | |
14622 } | |
14623 | |
14624 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_10from_dict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_d) { | |
14625 PyObject *__pyx_v_attribute_string = NULL; | |
14626 PyObject *__pyx_r = NULL; | |
14627 __Pyx_RefNannyDeclarations | |
14628 PyObject *__pyx_t_1 = NULL; | |
14629 PyObject *__pyx_t_2 = NULL; | |
14630 PyObject *__pyx_t_3 = NULL; | |
14631 unsigned int __pyx_t_4; | |
14632 struct __pyx_opt_args_5pysam_9libcutils_force_bytes __pyx_t_5; | |
14633 int __pyx_lineno = 0; | |
14634 const char *__pyx_filename = NULL; | |
14635 int __pyx_clineno = 0; | |
14636 __Pyx_RefNannySetupContext("from_dict", 1); | |
14637 | |
14638 /* "pysam/libctabixproxies.pyx":475 | |
14639 * def from_dict(self, d): | |
14640 * '''set attributes from a dictionary.''' | |
14641 * self.attribute_dict = None # <<<<<<<<<<<<<< | |
14642 * attribute_string = force_bytes( | |
14643 * self.attribute_dict2string(d), | |
14644 */ | |
14645 __Pyx_INCREF(Py_None); | |
14646 __Pyx_GIVEREF(Py_None); | |
14647 __Pyx_GOTREF(__pyx_v_self->attribute_dict); | |
14648 __Pyx_DECREF(__pyx_v_self->attribute_dict); | |
14649 __pyx_v_self->attribute_dict = Py_None; | |
14650 | |
14651 /* "pysam/libctabixproxies.pyx":477 | |
14652 * self.attribute_dict = None | |
14653 * attribute_string = force_bytes( | |
14654 * self.attribute_dict2string(d), # <<<<<<<<<<<<<< | |
14655 * self.encoding) | |
14656 * self._setindex(8, attribute_string) | |
14657 */ | |
14658 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attribute_dict2string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error) | |
14659 __Pyx_GOTREF(__pyx_t_2); | |
14660 __pyx_t_3 = NULL; | |
14661 __pyx_t_4 = 0; | |
14662 #if CYTHON_UNPACK_METHODS | |
14663 if (likely(PyMethod_Check(__pyx_t_2))) { | |
14664 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); | |
14665 if (likely(__pyx_t_3)) { | |
14666 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
14667 __Pyx_INCREF(__pyx_t_3); | |
14668 __Pyx_INCREF(function); | |
14669 __Pyx_DECREF_SET(__pyx_t_2, function); | |
14670 __pyx_t_4 = 1; | |
14671 } | |
14672 } | |
14673 #endif | |
14674 { | |
14675 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_d}; | |
14676 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); | |
14677 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; | |
14678 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error) | |
14679 __Pyx_GOTREF(__pyx_t_1); | |
14680 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
14681 } | |
14682 | |
14683 /* "pysam/libctabixproxies.pyx":478 | |
14684 * attribute_string = force_bytes( | |
14685 * self.attribute_dict2string(d), | |
14686 * self.encoding) # <<<<<<<<<<<<<< | |
14687 * self._setindex(8, attribute_string) | |
14688 * | |
14689 */ | |
14690 __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base.encoding; | |
14691 __Pyx_INCREF(__pyx_t_2); | |
14692 | |
14693 /* "pysam/libctabixproxies.pyx":476 | |
14694 * '''set attributes from a dictionary.''' | |
14695 * self.attribute_dict = None | |
14696 * attribute_string = force_bytes( # <<<<<<<<<<<<<< | |
14697 * self.attribute_dict2string(d), | |
14698 * self.encoding) | |
14699 */ | |
14700 __pyx_t_5.__pyx_n = 1; | |
14701 __pyx_t_5.encoding = __pyx_t_2; | |
14702 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_t_1, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 476, __pyx_L1_error) | |
14703 __Pyx_GOTREF(__pyx_t_3); | |
14704 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
14705 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
14706 __pyx_v_attribute_string = ((PyObject*)__pyx_t_3); | |
14707 __pyx_t_3 = 0; | |
14708 | |
14709 /* "pysam/libctabixproxies.pyx":479 | |
14710 * self.attribute_dict2string(d), | |
14711 * self.encoding) | |
14712 * self._setindex(8, attribute_string) # <<<<<<<<<<<<<< | |
14713 * | |
14714 * def __str__(self): | |
14715 */ | |
14716 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setindex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error) | |
14717 __Pyx_GOTREF(__pyx_t_2); | |
14718 __pyx_t_1 = NULL; | |
14719 __pyx_t_4 = 0; | |
14720 #if CYTHON_UNPACK_METHODS | |
14721 if (likely(PyMethod_Check(__pyx_t_2))) { | |
14722 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); | |
14723 if (likely(__pyx_t_1)) { | |
14724 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
14725 __Pyx_INCREF(__pyx_t_1); | |
14726 __Pyx_INCREF(function); | |
14727 __Pyx_DECREF_SET(__pyx_t_2, function); | |
14728 __pyx_t_4 = 1; | |
14729 } | |
14730 } | |
14731 #endif | |
14732 { | |
14733 PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_int_8, __pyx_v_attribute_string}; | |
14734 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); | |
14735 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; | |
14736 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 479, __pyx_L1_error) | |
14737 __Pyx_GOTREF(__pyx_t_3); | |
14738 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
14739 } | |
14740 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
14741 | |
14742 /* "pysam/libctabixproxies.pyx":473 | |
14743 * return self.to_dict() | |
14744 * | |
14745 * def from_dict(self, d): # <<<<<<<<<<<<<< | |
14746 * '''set attributes from a dictionary.''' | |
14747 * self.attribute_dict = None | |
14748 */ | |
14749 | |
14750 /* function exit code */ | |
14751 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
14752 goto __pyx_L0; | |
14753 __pyx_L1_error:; | |
14754 __Pyx_XDECREF(__pyx_t_1); | |
14755 __Pyx_XDECREF(__pyx_t_2); | |
14756 __Pyx_XDECREF(__pyx_t_3); | |
14757 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
14758 __pyx_r = NULL; | |
14759 __pyx_L0:; | |
14760 __Pyx_XDECREF(__pyx_v_attribute_string); | |
14761 __Pyx_XGIVEREF(__pyx_r); | |
14762 __Pyx_RefNannyFinishContext(); | |
14763 return __pyx_r; | |
14764 } | |
14765 | |
14766 /* "pysam/libctabixproxies.pyx":481 | |
14767 * self._setindex(8, attribute_string) | |
14768 * | |
14769 * def __str__(self): # <<<<<<<<<<<<<< | |
14770 * cdef char * cpy | |
14771 * cdef int x | |
14772 */ | |
14773 | |
14774 /* Python wrapper */ | |
14775 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_13__str__(PyObject *__pyx_v_self); /*proto*/ | |
14776 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_13__str__(PyObject *__pyx_v_self) { | |
14777 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
14778 PyObject *__pyx_r = 0; | |
14779 __Pyx_RefNannyDeclarations | |
14780 __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); | |
14781 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
14782 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_12__str__(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self)); | |
14783 | |
14784 /* function exit code */ | |
14785 __Pyx_RefNannyFinishContext(); | |
14786 return __pyx_r; | |
14787 } | |
14788 | |
14789 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_12__str__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self) { | |
14790 PyObject *__pyx_r = NULL; | |
14791 __Pyx_RefNannyDeclarations | |
14792 PyObject *__pyx_t_1 = NULL; | |
14793 PyObject *__pyx_t_2 = NULL; | |
14794 PyObject *__pyx_t_3 = NULL; | |
14795 PyObject *__pyx_t_4 = NULL; | |
14796 PyObject *__pyx_t_5 = NULL; | |
14797 unsigned int __pyx_t_6; | |
14798 PyObject *__pyx_t_7 = NULL; | |
14799 PyObject *__pyx_t_8 = NULL; | |
14800 PyObject *__pyx_t_9 = NULL; | |
14801 PyObject *__pyx_t_10 = NULL; | |
14802 PyObject *__pyx_t_11 = NULL; | |
14803 PyObject *__pyx_t_12 = NULL; | |
14804 int __pyx_lineno = 0; | |
14805 const char *__pyx_filename = NULL; | |
14806 int __pyx_clineno = 0; | |
14807 __Pyx_RefNannySetupContext("__str__", 1); | |
14808 | |
14809 /* "pysam/libctabixproxies.pyx":485 | |
14810 * cdef int x | |
14811 * | |
14812 * if self.is_modified: # <<<<<<<<<<<<<< | |
14813 * return "\t".join( | |
14814 * (self.contig, | |
14815 */ | |
14816 if (__pyx_v_self->__pyx_base.__pyx_base.is_modified) { | |
14817 | |
14818 /* "pysam/libctabixproxies.pyx":486 | |
14819 * | |
14820 * if self.is_modified: | |
14821 * return "\t".join( # <<<<<<<<<<<<<< | |
14822 * (self.contig, | |
14823 * toDot(self.source), | |
14824 */ | |
14825 __Pyx_XDECREF(__pyx_r); | |
14826 | |
14827 /* "pysam/libctabixproxies.pyx":487 | |
14828 * if self.is_modified: | |
14829 * return "\t".join( | |
14830 * (self.contig, # <<<<<<<<<<<<<< | |
14831 * toDot(self.source), | |
14832 * toDot(self.feature), | |
14833 */ | |
14834 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_contig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) | |
14835 __Pyx_GOTREF(__pyx_t_1); | |
14836 | |
14837 /* "pysam/libctabixproxies.pyx":488 | |
14838 * return "\t".join( | |
14839 * (self.contig, | |
14840 * toDot(self.source), # <<<<<<<<<<<<<< | |
14841 * toDot(self.feature), | |
14842 * str(self.start + 1), | |
14843 */ | |
14844 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_toDot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error) | |
14845 __Pyx_GOTREF(__pyx_t_3); | |
14846 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L1_error) | |
14847 __Pyx_GOTREF(__pyx_t_4); | |
14848 __pyx_t_5 = NULL; | |
14849 __pyx_t_6 = 0; | |
14850 #if CYTHON_UNPACK_METHODS | |
14851 if (unlikely(PyMethod_Check(__pyx_t_3))) { | |
14852 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); | |
14853 if (likely(__pyx_t_5)) { | |
14854 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
14855 __Pyx_INCREF(__pyx_t_5); | |
14856 __Pyx_INCREF(function); | |
14857 __Pyx_DECREF_SET(__pyx_t_3, function); | |
14858 __pyx_t_6 = 1; | |
14859 } | |
14860 } | |
14861 #endif | |
14862 { | |
14863 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; | |
14864 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); | |
14865 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; | |
14866 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
14867 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error) | |
14868 __Pyx_GOTREF(__pyx_t_2); | |
14869 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
14870 } | |
14871 | |
14872 /* "pysam/libctabixproxies.pyx":489 | |
14873 * (self.contig, | |
14874 * toDot(self.source), | |
14875 * toDot(self.feature), # <<<<<<<<<<<<<< | |
14876 * str(self.start + 1), | |
14877 * str(self.end), | |
14878 */ | |
14879 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toDot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 489, __pyx_L1_error) | |
14880 __Pyx_GOTREF(__pyx_t_4); | |
14881 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_feature); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L1_error) | |
14882 __Pyx_GOTREF(__pyx_t_5); | |
14883 __pyx_t_7 = NULL; | |
14884 __pyx_t_6 = 0; | |
14885 #if CYTHON_UNPACK_METHODS | |
14886 if (unlikely(PyMethod_Check(__pyx_t_4))) { | |
14887 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); | |
14888 if (likely(__pyx_t_7)) { | |
14889 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); | |
14890 __Pyx_INCREF(__pyx_t_7); | |
14891 __Pyx_INCREF(function); | |
14892 __Pyx_DECREF_SET(__pyx_t_4, function); | |
14893 __pyx_t_6 = 1; | |
14894 } | |
14895 } | |
14896 #endif | |
14897 { | |
14898 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; | |
14899 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); | |
14900 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; | |
14901 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
14902 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error) | |
14903 __Pyx_GOTREF(__pyx_t_3); | |
14904 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
14905 } | |
14906 | |
14907 /* "pysam/libctabixproxies.pyx":490 | |
14908 * toDot(self.source), | |
14909 * toDot(self.feature), | |
14910 * str(self.start + 1), # <<<<<<<<<<<<<< | |
14911 * str(self.end), | |
14912 * toDot(self.score), | |
14913 */ | |
14914 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 490, __pyx_L1_error) | |
14915 __Pyx_GOTREF(__pyx_t_4); | |
14916 __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 490, __pyx_L1_error) | |
14917 __Pyx_GOTREF(__pyx_t_5); | |
14918 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
14919 __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 490, __pyx_L1_error) | |
14920 __Pyx_GOTREF(__pyx_t_4); | |
14921 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
14922 | |
14923 /* "pysam/libctabixproxies.pyx":491 | |
14924 * toDot(self.feature), | |
14925 * str(self.start + 1), | |
14926 * str(self.end), # <<<<<<<<<<<<<< | |
14927 * toDot(self.score), | |
14928 * toDot(self.strand), | |
14929 */ | |
14930 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 491, __pyx_L1_error) | |
14931 __Pyx_GOTREF(__pyx_t_5); | |
14932 __pyx_t_7 = __Pyx_PyObject_Unicode(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 491, __pyx_L1_error) | |
14933 __Pyx_GOTREF(__pyx_t_7); | |
14934 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
14935 | |
14936 /* "pysam/libctabixproxies.pyx":492 | |
14937 * str(self.start + 1), | |
14938 * str(self.end), | |
14939 * toDot(self.score), # <<<<<<<<<<<<<< | |
14940 * toDot(self.strand), | |
14941 * toDot(self.frame), | |
14942 */ | |
14943 __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_toDot); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 492, __pyx_L1_error) | |
14944 __Pyx_GOTREF(__pyx_t_8); | |
14945 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_score); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 492, __pyx_L1_error) | |
14946 __Pyx_GOTREF(__pyx_t_9); | |
14947 __pyx_t_10 = NULL; | |
14948 __pyx_t_6 = 0; | |
14949 #if CYTHON_UNPACK_METHODS | |
14950 if (unlikely(PyMethod_Check(__pyx_t_8))) { | |
14951 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); | |
14952 if (likely(__pyx_t_10)) { | |
14953 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); | |
14954 __Pyx_INCREF(__pyx_t_10); | |
14955 __Pyx_INCREF(function); | |
14956 __Pyx_DECREF_SET(__pyx_t_8, function); | |
14957 __pyx_t_6 = 1; | |
14958 } | |
14959 } | |
14960 #endif | |
14961 { | |
14962 PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9}; | |
14963 __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); | |
14964 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; | |
14965 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; | |
14966 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 492, __pyx_L1_error) | |
14967 __Pyx_GOTREF(__pyx_t_5); | |
14968 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; | |
14969 } | |
14970 | |
14971 /* "pysam/libctabixproxies.pyx":493 | |
14972 * str(self.end), | |
14973 * toDot(self.score), | |
14974 * toDot(self.strand), # <<<<<<<<<<<<<< | |
14975 * toDot(self.frame), | |
14976 * self.attributes)) | |
14977 */ | |
14978 __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_toDot); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 493, __pyx_L1_error) | |
14979 __Pyx_GOTREF(__pyx_t_9); | |
14980 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 493, __pyx_L1_error) | |
14981 __Pyx_GOTREF(__pyx_t_10); | |
14982 __pyx_t_11 = NULL; | |
14983 __pyx_t_6 = 0; | |
14984 #if CYTHON_UNPACK_METHODS | |
14985 if (unlikely(PyMethod_Check(__pyx_t_9))) { | |
14986 __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); | |
14987 if (likely(__pyx_t_11)) { | |
14988 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); | |
14989 __Pyx_INCREF(__pyx_t_11); | |
14990 __Pyx_INCREF(function); | |
14991 __Pyx_DECREF_SET(__pyx_t_9, function); | |
14992 __pyx_t_6 = 1; | |
14993 } | |
14994 } | |
14995 #endif | |
14996 { | |
14997 PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10}; | |
14998 __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); | |
14999 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; | |
15000 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; | |
15001 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 493, __pyx_L1_error) | |
15002 __Pyx_GOTREF(__pyx_t_8); | |
15003 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; | |
15004 } | |
15005 | |
15006 /* "pysam/libctabixproxies.pyx":494 | |
15007 * toDot(self.score), | |
15008 * toDot(self.strand), | |
15009 * toDot(self.frame), # <<<<<<<<<<<<<< | |
15010 * self.attributes)) | |
15011 * else: | |
15012 */ | |
15013 __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_toDot); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 494, __pyx_L1_error) | |
15014 __Pyx_GOTREF(__pyx_t_10); | |
15015 __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_frame); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 494, __pyx_L1_error) | |
15016 __Pyx_GOTREF(__pyx_t_11); | |
15017 __pyx_t_12 = NULL; | |
15018 __pyx_t_6 = 0; | |
15019 #if CYTHON_UNPACK_METHODS | |
15020 if (unlikely(PyMethod_Check(__pyx_t_10))) { | |
15021 __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10); | |
15022 if (likely(__pyx_t_12)) { | |
15023 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); | |
15024 __Pyx_INCREF(__pyx_t_12); | |
15025 __Pyx_INCREF(function); | |
15026 __Pyx_DECREF_SET(__pyx_t_10, function); | |
15027 __pyx_t_6 = 1; | |
15028 } | |
15029 } | |
15030 #endif | |
15031 { | |
15032 PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_11}; | |
15033 __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); | |
15034 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; | |
15035 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; | |
15036 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 494, __pyx_L1_error) | |
15037 __Pyx_GOTREF(__pyx_t_9); | |
15038 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; | |
15039 } | |
15040 | |
15041 /* "pysam/libctabixproxies.pyx":495 | |
15042 * toDot(self.strand), | |
15043 * toDot(self.frame), | |
15044 * self.attributes)) # <<<<<<<<<<<<<< | |
15045 * else: | |
15046 * return super().__str__() | |
15047 */ | |
15048 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 495, __pyx_L1_error) | |
15049 __Pyx_GOTREF(__pyx_t_10); | |
15050 | |
15051 /* "pysam/libctabixproxies.pyx":487 | |
15052 * if self.is_modified: | |
15053 * return "\t".join( | |
15054 * (self.contig, # <<<<<<<<<<<<<< | |
15055 * toDot(self.source), | |
15056 * toDot(self.feature), | |
15057 */ | |
15058 __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 487, __pyx_L1_error) | |
15059 __Pyx_GOTREF(__pyx_t_11); | |
15060 __Pyx_GIVEREF(__pyx_t_1); | |
15061 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error); | |
15062 __Pyx_GIVEREF(__pyx_t_2); | |
15063 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error); | |
15064 __Pyx_GIVEREF(__pyx_t_3); | |
15065 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error); | |
15066 __Pyx_GIVEREF(__pyx_t_4); | |
15067 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error); | |
15068 __Pyx_GIVEREF(__pyx_t_7); | |
15069 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_7)) __PYX_ERR(0, 487, __pyx_L1_error); | |
15070 __Pyx_GIVEREF(__pyx_t_5); | |
15071 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_5)) __PYX_ERR(0, 487, __pyx_L1_error); | |
15072 __Pyx_GIVEREF(__pyx_t_8); | |
15073 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_t_8)) __PYX_ERR(0, 487, __pyx_L1_error); | |
15074 __Pyx_GIVEREF(__pyx_t_9); | |
15075 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 7, __pyx_t_9)) __PYX_ERR(0, 487, __pyx_L1_error); | |
15076 __Pyx_GIVEREF(__pyx_t_10); | |
15077 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 8, __pyx_t_10)) __PYX_ERR(0, 487, __pyx_L1_error); | |
15078 __pyx_t_1 = 0; | |
15079 __pyx_t_2 = 0; | |
15080 __pyx_t_3 = 0; | |
15081 __pyx_t_4 = 0; | |
15082 __pyx_t_7 = 0; | |
15083 __pyx_t_5 = 0; | |
15084 __pyx_t_8 = 0; | |
15085 __pyx_t_9 = 0; | |
15086 __pyx_t_10 = 0; | |
15087 | |
15088 /* "pysam/libctabixproxies.pyx":486 | |
15089 * | |
15090 * if self.is_modified: | |
15091 * return "\t".join( # <<<<<<<<<<<<<< | |
15092 * (self.contig, | |
15093 * toDot(self.source), | |
15094 */ | |
15095 __pyx_t_10 = PyUnicode_Join(__pyx_kp_u__11, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 486, __pyx_L1_error) | |
15096 __Pyx_GOTREF(__pyx_t_10); | |
15097 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; | |
15098 __pyx_r = __pyx_t_10; | |
15099 __pyx_t_10 = 0; | |
15100 goto __pyx_L0; | |
15101 | |
15102 /* "pysam/libctabixproxies.pyx":485 | |
15103 * cdef int x | |
15104 * | |
15105 * if self.is_modified: # <<<<<<<<<<<<<< | |
15106 * return "\t".join( | |
15107 * (self.contig, | |
15108 */ | |
15109 } | |
15110 | |
15111 /* "pysam/libctabixproxies.pyx":497 | |
15112 * self.attributes)) | |
15113 * else: | |
15114 * return super().__str__() # <<<<<<<<<<<<<< | |
15115 * | |
15116 * def invert(self, int lcontig): | |
15117 */ | |
15118 /*else*/ { | |
15119 __Pyx_XDECREF(__pyx_r); | |
15120 __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 497, __pyx_L1_error) | |
15121 __Pyx_GOTREF(__pyx_t_11); | |
15122 __Pyx_INCREF((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
15123 __Pyx_GIVEREF((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
15124 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy))) __PYX_ERR(0, 497, __pyx_L1_error); | |
15125 __Pyx_INCREF((PyObject *)__pyx_v_self); | |
15126 __Pyx_GIVEREF((PyObject *)__pyx_v_self); | |
15127 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 497, __pyx_L1_error); | |
15128 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 497, __pyx_L1_error) | |
15129 __Pyx_GOTREF(__pyx_t_9); | |
15130 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; | |
15131 __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_str); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 497, __pyx_L1_error) | |
15132 __Pyx_GOTREF(__pyx_t_11); | |
15133 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; | |
15134 __pyx_t_9 = NULL; | |
15135 __pyx_t_6 = 0; | |
15136 #if CYTHON_UNPACK_METHODS | |
15137 if (likely(PyMethod_Check(__pyx_t_11))) { | |
15138 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11); | |
15139 if (likely(__pyx_t_9)) { | |
15140 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); | |
15141 __Pyx_INCREF(__pyx_t_9); | |
15142 __Pyx_INCREF(function); | |
15143 __Pyx_DECREF_SET(__pyx_t_11, function); | |
15144 __pyx_t_6 = 1; | |
15145 } | |
15146 } | |
15147 #endif | |
15148 { | |
15149 PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; | |
15150 __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); | |
15151 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; | |
15152 if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 497, __pyx_L1_error) | |
15153 __Pyx_GOTREF(__pyx_t_10); | |
15154 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; | |
15155 } | |
15156 __pyx_r = __pyx_t_10; | |
15157 __pyx_t_10 = 0; | |
15158 goto __pyx_L0; | |
15159 } | |
15160 | |
15161 /* "pysam/libctabixproxies.pyx":481 | |
15162 * self._setindex(8, attribute_string) | |
15163 * | |
15164 * def __str__(self): # <<<<<<<<<<<<<< | |
15165 * cdef char * cpy | |
15166 * cdef int x | |
15167 */ | |
15168 | |
15169 /* function exit code */ | |
15170 __pyx_L1_error:; | |
15171 __Pyx_XDECREF(__pyx_t_1); | |
15172 __Pyx_XDECREF(__pyx_t_2); | |
15173 __Pyx_XDECREF(__pyx_t_3); | |
15174 __Pyx_XDECREF(__pyx_t_4); | |
15175 __Pyx_XDECREF(__pyx_t_5); | |
15176 __Pyx_XDECREF(__pyx_t_7); | |
15177 __Pyx_XDECREF(__pyx_t_8); | |
15178 __Pyx_XDECREF(__pyx_t_9); | |
15179 __Pyx_XDECREF(__pyx_t_10); | |
15180 __Pyx_XDECREF(__pyx_t_11); | |
15181 __Pyx_XDECREF(__pyx_t_12); | |
15182 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
15183 __pyx_r = NULL; | |
15184 __pyx_L0:; | |
15185 __Pyx_XGIVEREF(__pyx_r); | |
15186 __Pyx_RefNannyFinishContext(); | |
15187 return __pyx_r; | |
15188 } | |
15189 | |
15190 /* "pysam/libctabixproxies.pyx":499 | |
15191 * return super().__str__() | |
15192 * | |
15193 * def invert(self, int lcontig): # <<<<<<<<<<<<<< | |
15194 * '''invert coordinates to negative strand coordinates | |
15195 * | |
15196 */ | |
15197 | |
15198 /* Python wrapper */ | |
15199 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_15invert(PyObject *__pyx_v_self, | |
15200 #if CYTHON_METH_FASTCALL | |
15201 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
15202 #else | |
15203 PyObject *__pyx_args, PyObject *__pyx_kwds | |
15204 #endif | |
15205 ); /*proto*/ | |
15206 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_14invert, "invert coordinates to negative strand coordinates\n \n This method will only act if the feature is on the\n negative strand."); | |
15207 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_15invert = {"invert", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_15invert, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_14invert}; | |
15208 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_15invert(PyObject *__pyx_v_self, | |
15209 #if CYTHON_METH_FASTCALL | |
15210 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
15211 #else | |
15212 PyObject *__pyx_args, PyObject *__pyx_kwds | |
15213 #endif | |
15214 ) { | |
15215 int __pyx_v_lcontig; | |
15216 #if !CYTHON_METH_FASTCALL | |
15217 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
15218 #endif | |
15219 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
15220 PyObject* values[1] = {0}; | |
15221 int __pyx_lineno = 0; | |
15222 const char *__pyx_filename = NULL; | |
15223 int __pyx_clineno = 0; | |
15224 PyObject *__pyx_r = 0; | |
15225 __Pyx_RefNannyDeclarations | |
15226 __Pyx_RefNannySetupContext("invert (wrapper)", 0); | |
15227 #if !CYTHON_METH_FASTCALL | |
15228 #if CYTHON_ASSUME_SAFE_MACROS | |
15229 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
15230 #else | |
15231 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
15232 #endif | |
15233 #endif | |
15234 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
15235 { | |
15236 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lcontig,0}; | |
15237 if (__pyx_kwds) { | |
15238 Py_ssize_t kw_args; | |
15239 switch (__pyx_nargs) { | |
15240 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
15241 CYTHON_FALLTHROUGH; | |
15242 case 0: break; | |
15243 default: goto __pyx_L5_argtuple_error; | |
15244 } | |
15245 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
15246 switch (__pyx_nargs) { | |
15247 case 0: | |
15248 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lcontig)) != 0)) { | |
15249 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
15250 kw_args--; | |
15251 } | |
15252 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L3_error) | |
15253 else goto __pyx_L5_argtuple_error; | |
15254 } | |
15255 if (unlikely(kw_args > 0)) { | |
15256 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
15257 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "invert") < 0)) __PYX_ERR(0, 499, __pyx_L3_error) | |
15258 } | |
15259 } else if (unlikely(__pyx_nargs != 1)) { | |
15260 goto __pyx_L5_argtuple_error; | |
15261 } else { | |
15262 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
15263 } | |
15264 __pyx_v_lcontig = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_lcontig == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L3_error) | |
15265 } | |
15266 goto __pyx_L6_skip; | |
15267 __pyx_L5_argtuple_error:; | |
15268 __Pyx_RaiseArgtupleInvalid("invert", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 499, __pyx_L3_error) | |
15269 __pyx_L6_skip:; | |
15270 goto __pyx_L4_argument_unpacking_done; | |
15271 __pyx_L3_error:; | |
15272 { | |
15273 Py_ssize_t __pyx_temp; | |
15274 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
15275 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
15276 } | |
15277 } | |
15278 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.invert", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
15279 __Pyx_RefNannyFinishContext(); | |
15280 return NULL; | |
15281 __pyx_L4_argument_unpacking_done:; | |
15282 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_14invert(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), __pyx_v_lcontig); | |
15283 | |
15284 /* function exit code */ | |
15285 { | |
15286 Py_ssize_t __pyx_temp; | |
15287 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
15288 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
15289 } | |
15290 } | |
15291 __Pyx_RefNannyFinishContext(); | |
15292 return __pyx_r; | |
15293 } | |
15294 | |
15295 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_14invert(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, int __pyx_v_lcontig) { | |
15296 PyObject *__pyx_v_start = NULL; | |
15297 PyObject *__pyx_v_end = NULL; | |
15298 PyObject *__pyx_r = NULL; | |
15299 __Pyx_RefNannyDeclarations | |
15300 PyObject *__pyx_t_1 = NULL; | |
15301 PyObject *__pyx_t_2 = NULL; | |
15302 int __pyx_t_3; | |
15303 PyObject *__pyx_t_4 = NULL; | |
15304 PyObject *__pyx_t_5 = NULL; | |
15305 int __pyx_lineno = 0; | |
15306 const char *__pyx_filename = NULL; | |
15307 int __pyx_clineno = 0; | |
15308 __Pyx_RefNannySetupContext("invert", 1); | |
15309 | |
15310 /* "pysam/libctabixproxies.pyx":505 | |
15311 * negative strand.''' | |
15312 * | |
15313 * if self.strand[0] == '-': # <<<<<<<<<<<<<< | |
15314 * start = min(self.start, self.end) | |
15315 * end = max(self.start, self.end) | |
15316 */ | |
15317 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) | |
15318 __Pyx_GOTREF(__pyx_t_1); | |
15319 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error) | |
15320 __Pyx_GOTREF(__pyx_t_2); | |
15321 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
15322 __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__14, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 505, __pyx_L1_error) | |
15323 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
15324 if (__pyx_t_3) { | |
15325 | |
15326 /* "pysam/libctabixproxies.pyx":506 | |
15327 * | |
15328 * if self.strand[0] == '-': | |
15329 * start = min(self.start, self.end) # <<<<<<<<<<<<<< | |
15330 * end = max(self.start, self.end) | |
15331 * self.start, self.end = lcontig - end, lcontig - start | |
15332 */ | |
15333 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error) | |
15334 __Pyx_GOTREF(__pyx_t_2); | |
15335 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) | |
15336 __Pyx_GOTREF(__pyx_t_1); | |
15337 __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 506, __pyx_L1_error) | |
15338 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 506, __pyx_L1_error) | |
15339 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
15340 if (__pyx_t_3) { | |
15341 __Pyx_INCREF(__pyx_t_2); | |
15342 __pyx_t_4 = __pyx_t_2; | |
15343 } else { | |
15344 __Pyx_INCREF(__pyx_t_1); | |
15345 __pyx_t_4 = __pyx_t_1; | |
15346 } | |
15347 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
15348 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
15349 __pyx_t_2 = __pyx_t_4; | |
15350 __Pyx_INCREF(__pyx_t_2); | |
15351 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
15352 __pyx_v_start = __pyx_t_2; | |
15353 __pyx_t_2 = 0; | |
15354 | |
15355 /* "pysam/libctabixproxies.pyx":507 | |
15356 * if self.strand[0] == '-': | |
15357 * start = min(self.start, self.end) | |
15358 * end = max(self.start, self.end) # <<<<<<<<<<<<<< | |
15359 * self.start, self.end = lcontig - end, lcontig - start | |
15360 * | |
15361 */ | |
15362 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) | |
15363 __Pyx_GOTREF(__pyx_t_2); | |
15364 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L1_error) | |
15365 __Pyx_GOTREF(__pyx_t_4); | |
15366 __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 507, __pyx_L1_error) | |
15367 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 507, __pyx_L1_error) | |
15368 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
15369 if (__pyx_t_3) { | |
15370 __Pyx_INCREF(__pyx_t_2); | |
15371 __pyx_t_1 = __pyx_t_2; | |
15372 } else { | |
15373 __Pyx_INCREF(__pyx_t_4); | |
15374 __pyx_t_1 = __pyx_t_4; | |
15375 } | |
15376 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
15377 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
15378 __pyx_t_2 = __pyx_t_1; | |
15379 __Pyx_INCREF(__pyx_t_2); | |
15380 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
15381 __pyx_v_end = __pyx_t_2; | |
15382 __pyx_t_2 = 0; | |
15383 | |
15384 /* "pysam/libctabixproxies.pyx":508 | |
15385 * start = min(self.start, self.end) | |
15386 * end = max(self.start, self.end) | |
15387 * self.start, self.end = lcontig - end, lcontig - start # <<<<<<<<<<<<<< | |
15388 * | |
15389 * def keys(self): | |
15390 */ | |
15391 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_lcontig); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error) | |
15392 __Pyx_GOTREF(__pyx_t_2); | |
15393 __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_v_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) | |
15394 __Pyx_GOTREF(__pyx_t_1); | |
15395 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
15396 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_lcontig); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error) | |
15397 __Pyx_GOTREF(__pyx_t_2); | |
15398 __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_v_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error) | |
15399 __Pyx_GOTREF(__pyx_t_4); | |
15400 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
15401 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start, __pyx_t_1) < 0) __PYX_ERR(0, 508, __pyx_L1_error) | |
15402 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
15403 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_end, __pyx_t_4) < 0) __PYX_ERR(0, 508, __pyx_L1_error) | |
15404 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
15405 | |
15406 /* "pysam/libctabixproxies.pyx":505 | |
15407 * negative strand.''' | |
15408 * | |
15409 * if self.strand[0] == '-': # <<<<<<<<<<<<<< | |
15410 * start = min(self.start, self.end) | |
15411 * end = max(self.start, self.end) | |
15412 */ | |
15413 } | |
15414 | |
15415 /* "pysam/libctabixproxies.pyx":499 | |
15416 * return super().__str__() | |
15417 * | |
15418 * def invert(self, int lcontig): # <<<<<<<<<<<<<< | |
15419 * '''invert coordinates to negative strand coordinates | |
15420 * | |
15421 */ | |
15422 | |
15423 /* function exit code */ | |
15424 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
15425 goto __pyx_L0; | |
15426 __pyx_L1_error:; | |
15427 __Pyx_XDECREF(__pyx_t_1); | |
15428 __Pyx_XDECREF(__pyx_t_2); | |
15429 __Pyx_XDECREF(__pyx_t_4); | |
15430 __Pyx_XDECREF(__pyx_t_5); | |
15431 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.invert", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
15432 __pyx_r = NULL; | |
15433 __pyx_L0:; | |
15434 __Pyx_XDECREF(__pyx_v_start); | |
15435 __Pyx_XDECREF(__pyx_v_end); | |
15436 __Pyx_XGIVEREF(__pyx_r); | |
15437 __Pyx_RefNannyFinishContext(); | |
15438 return __pyx_r; | |
15439 } | |
15440 | |
15441 /* "pysam/libctabixproxies.pyx":510 | |
15442 * self.start, self.end = lcontig - end, lcontig - start | |
15443 * | |
15444 * def keys(self): # <<<<<<<<<<<<<< | |
15445 * '''return a list of attributes defined in this entry.''' | |
15446 * if not self.attribute_dict: | |
15447 */ | |
15448 | |
15449 /* Python wrapper */ | |
15450 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_17keys(PyObject *__pyx_v_self, | |
15451 #if CYTHON_METH_FASTCALL | |
15452 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
15453 #else | |
15454 PyObject *__pyx_args, PyObject *__pyx_kwds | |
15455 #endif | |
15456 ); /*proto*/ | |
15457 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_16keys, "return a list of attributes defined in this entry."); | |
15458 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_17keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_17keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_16keys}; | |
15459 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_17keys(PyObject *__pyx_v_self, | |
15460 #if CYTHON_METH_FASTCALL | |
15461 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
15462 #else | |
15463 PyObject *__pyx_args, PyObject *__pyx_kwds | |
15464 #endif | |
15465 ) { | |
15466 #if !CYTHON_METH_FASTCALL | |
15467 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
15468 #endif | |
15469 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
15470 PyObject *__pyx_r = 0; | |
15471 __Pyx_RefNannyDeclarations | |
15472 __Pyx_RefNannySetupContext("keys (wrapper)", 0); | |
15473 #if !CYTHON_METH_FASTCALL | |
15474 #if CYTHON_ASSUME_SAFE_MACROS | |
15475 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
15476 #else | |
15477 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
15478 #endif | |
15479 #endif | |
15480 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
15481 if (unlikely(__pyx_nargs > 0)) { | |
15482 __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL;} | |
15483 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "keys", 0))) return NULL; | |
15484 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_16keys(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self)); | |
15485 | |
15486 /* function exit code */ | |
15487 __Pyx_RefNannyFinishContext(); | |
15488 return __pyx_r; | |
15489 } | |
15490 | |
15491 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_16keys(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self) { | |
15492 PyObject *__pyx_r = NULL; | |
15493 __Pyx_RefNannyDeclarations | |
15494 int __pyx_t_1; | |
15495 int __pyx_t_2; | |
15496 PyObject *__pyx_t_3 = NULL; | |
15497 PyObject *__pyx_t_4 = NULL; | |
15498 PyObject *__pyx_t_5 = NULL; | |
15499 PyObject *__pyx_t_6 = NULL; | |
15500 unsigned int __pyx_t_7; | |
15501 int __pyx_lineno = 0; | |
15502 const char *__pyx_filename = NULL; | |
15503 int __pyx_clineno = 0; | |
15504 __Pyx_RefNannySetupContext("keys", 1); | |
15505 | |
15506 /* "pysam/libctabixproxies.pyx":512 | |
15507 * def keys(self): | |
15508 * '''return a list of attributes defined in this entry.''' | |
15509 * if not self.attribute_dict: # <<<<<<<<<<<<<< | |
15510 * self.attribute_dict = self.attribute_string2dict( | |
15511 * self.attributes) | |
15512 */ | |
15513 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->attribute_dict); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 512, __pyx_L1_error) | |
15514 __pyx_t_2 = (!__pyx_t_1); | |
15515 if (__pyx_t_2) { | |
15516 | |
15517 /* "pysam/libctabixproxies.pyx":513 | |
15518 * '''return a list of attributes defined in this entry.''' | |
15519 * if not self.attribute_dict: | |
15520 * self.attribute_dict = self.attribute_string2dict( # <<<<<<<<<<<<<< | |
15521 * self.attributes) | |
15522 * return self.attribute_dict.keys() | |
15523 */ | |
15524 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attribute_string2dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error) | |
15525 __Pyx_GOTREF(__pyx_t_4); | |
15526 | |
15527 /* "pysam/libctabixproxies.pyx":514 | |
15528 * if not self.attribute_dict: | |
15529 * self.attribute_dict = self.attribute_string2dict( | |
15530 * self.attributes) # <<<<<<<<<<<<<< | |
15531 * return self.attribute_dict.keys() | |
15532 * | |
15533 */ | |
15534 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error) | |
15535 __Pyx_GOTREF(__pyx_t_5); | |
15536 __pyx_t_6 = NULL; | |
15537 __pyx_t_7 = 0; | |
15538 #if CYTHON_UNPACK_METHODS | |
15539 if (likely(PyMethod_Check(__pyx_t_4))) { | |
15540 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); | |
15541 if (likely(__pyx_t_6)) { | |
15542 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); | |
15543 __Pyx_INCREF(__pyx_t_6); | |
15544 __Pyx_INCREF(function); | |
15545 __Pyx_DECREF_SET(__pyx_t_4, function); | |
15546 __pyx_t_7 = 1; | |
15547 } | |
15548 } | |
15549 #endif | |
15550 { | |
15551 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5}; | |
15552 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); | |
15553 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
15554 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
15555 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error) | |
15556 __Pyx_GOTREF(__pyx_t_3); | |
15557 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
15558 } | |
15559 | |
15560 /* "pysam/libctabixproxies.pyx":513 | |
15561 * '''return a list of attributes defined in this entry.''' | |
15562 * if not self.attribute_dict: | |
15563 * self.attribute_dict = self.attribute_string2dict( # <<<<<<<<<<<<<< | |
15564 * self.attributes) | |
15565 * return self.attribute_dict.keys() | |
15566 */ | |
15567 __Pyx_GIVEREF(__pyx_t_3); | |
15568 __Pyx_GOTREF(__pyx_v_self->attribute_dict); | |
15569 __Pyx_DECREF(__pyx_v_self->attribute_dict); | |
15570 __pyx_v_self->attribute_dict = __pyx_t_3; | |
15571 __pyx_t_3 = 0; | |
15572 | |
15573 /* "pysam/libctabixproxies.pyx":512 | |
15574 * def keys(self): | |
15575 * '''return a list of attributes defined in this entry.''' | |
15576 * if not self.attribute_dict: # <<<<<<<<<<<<<< | |
15577 * self.attribute_dict = self.attribute_string2dict( | |
15578 * self.attributes) | |
15579 */ | |
15580 } | |
15581 | |
15582 /* "pysam/libctabixproxies.pyx":515 | |
15583 * self.attribute_dict = self.attribute_string2dict( | |
15584 * self.attributes) | |
15585 * return self.attribute_dict.keys() # <<<<<<<<<<<<<< | |
15586 * | |
15587 * def __getitem__(self, key): | |
15588 */ | |
15589 __Pyx_XDECREF(__pyx_r); | |
15590 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->attribute_dict, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L1_error) | |
15591 __Pyx_GOTREF(__pyx_t_4); | |
15592 __pyx_t_5 = NULL; | |
15593 __pyx_t_7 = 0; | |
15594 #if CYTHON_UNPACK_METHODS | |
15595 if (likely(PyMethod_Check(__pyx_t_4))) { | |
15596 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); | |
15597 if (likely(__pyx_t_5)) { | |
15598 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); | |
15599 __Pyx_INCREF(__pyx_t_5); | |
15600 __Pyx_INCREF(function); | |
15601 __Pyx_DECREF_SET(__pyx_t_4, function); | |
15602 __pyx_t_7 = 1; | |
15603 } | |
15604 } | |
15605 #endif | |
15606 { | |
15607 PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; | |
15608 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); | |
15609 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; | |
15610 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 515, __pyx_L1_error) | |
15611 __Pyx_GOTREF(__pyx_t_3); | |
15612 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
15613 } | |
15614 __pyx_r = __pyx_t_3; | |
15615 __pyx_t_3 = 0; | |
15616 goto __pyx_L0; | |
15617 | |
15618 /* "pysam/libctabixproxies.pyx":510 | |
15619 * self.start, self.end = lcontig - end, lcontig - start | |
15620 * | |
15621 * def keys(self): # <<<<<<<<<<<<<< | |
15622 * '''return a list of attributes defined in this entry.''' | |
15623 * if not self.attribute_dict: | |
15624 */ | |
15625 | |
15626 /* function exit code */ | |
15627 __pyx_L1_error:; | |
15628 __Pyx_XDECREF(__pyx_t_3); | |
15629 __Pyx_XDECREF(__pyx_t_4); | |
15630 __Pyx_XDECREF(__pyx_t_5); | |
15631 __Pyx_XDECREF(__pyx_t_6); | |
15632 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.keys", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
15633 __pyx_r = NULL; | |
15634 __pyx_L0:; | |
15635 __Pyx_XGIVEREF(__pyx_r); | |
15636 __Pyx_RefNannyFinishContext(); | |
15637 return __pyx_r; | |
15638 } | |
15639 | |
15640 /* "pysam/libctabixproxies.pyx":517 | |
15641 * return self.attribute_dict.keys() | |
15642 * | |
15643 * def __getitem__(self, key): # <<<<<<<<<<<<<< | |
15644 * return self.__getattr__(key) | |
15645 * | |
15646 */ | |
15647 | |
15648 /* Python wrapper */ | |
15649 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_19__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ | |
15650 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_19__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { | |
15651 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
15652 PyObject *__pyx_r = 0; | |
15653 __Pyx_RefNannyDeclarations | |
15654 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); | |
15655 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
15656 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_18__getitem__(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key)); | |
15657 | |
15658 /* function exit code */ | |
15659 __Pyx_RefNannyFinishContext(); | |
15660 return __pyx_r; | |
15661 } | |
15662 | |
15663 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_18__getitem__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_key) { | |
15664 PyObject *__pyx_r = NULL; | |
15665 __Pyx_RefNannyDeclarations | |
15666 PyObject *__pyx_t_1 = NULL; | |
15667 PyObject *__pyx_t_2 = NULL; | |
15668 PyObject *__pyx_t_3 = NULL; | |
15669 unsigned int __pyx_t_4; | |
15670 int __pyx_lineno = 0; | |
15671 const char *__pyx_filename = NULL; | |
15672 int __pyx_clineno = 0; | |
15673 __Pyx_RefNannySetupContext("__getitem__", 1); | |
15674 | |
15675 /* "pysam/libctabixproxies.pyx":518 | |
15676 * | |
15677 * def __getitem__(self, key): | |
15678 * return self.__getattr__(key) # <<<<<<<<<<<<<< | |
15679 * | |
15680 * def setAttribute(self, name, value): | |
15681 */ | |
15682 __Pyx_XDECREF(__pyx_r); | |
15683 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getattr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error) | |
15684 __Pyx_GOTREF(__pyx_t_2); | |
15685 __pyx_t_3 = NULL; | |
15686 __pyx_t_4 = 0; | |
15687 #if CYTHON_UNPACK_METHODS | |
15688 if (likely(PyMethod_Check(__pyx_t_2))) { | |
15689 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); | |
15690 if (likely(__pyx_t_3)) { | |
15691 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
15692 __Pyx_INCREF(__pyx_t_3); | |
15693 __Pyx_INCREF(function); | |
15694 __Pyx_DECREF_SET(__pyx_t_2, function); | |
15695 __pyx_t_4 = 1; | |
15696 } | |
15697 } | |
15698 #endif | |
15699 { | |
15700 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_key}; | |
15701 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); | |
15702 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; | |
15703 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) | |
15704 __Pyx_GOTREF(__pyx_t_1); | |
15705 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
15706 } | |
15707 __pyx_r = __pyx_t_1; | |
15708 __pyx_t_1 = 0; | |
15709 goto __pyx_L0; | |
15710 | |
15711 /* "pysam/libctabixproxies.pyx":517 | |
15712 * return self.attribute_dict.keys() | |
15713 * | |
15714 * def __getitem__(self, key): # <<<<<<<<<<<<<< | |
15715 * return self.__getattr__(key) | |
15716 * | |
15717 */ | |
15718 | |
15719 /* function exit code */ | |
15720 __pyx_L1_error:; | |
15721 __Pyx_XDECREF(__pyx_t_1); | |
15722 __Pyx_XDECREF(__pyx_t_2); | |
15723 __Pyx_XDECREF(__pyx_t_3); | |
15724 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
15725 __pyx_r = NULL; | |
15726 __pyx_L0:; | |
15727 __Pyx_XGIVEREF(__pyx_r); | |
15728 __Pyx_RefNannyFinishContext(); | |
15729 return __pyx_r; | |
15730 } | |
15731 | |
15732 /* "pysam/libctabixproxies.pyx":520 | |
15733 * return self.__getattr__(key) | |
15734 * | |
15735 * def setAttribute(self, name, value): # <<<<<<<<<<<<<< | |
15736 * '''convenience method to set an attribute. | |
15737 * ''' | |
15738 */ | |
15739 | |
15740 /* Python wrapper */ | |
15741 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_21setAttribute(PyObject *__pyx_v_self, | |
15742 #if CYTHON_METH_FASTCALL | |
15743 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
15744 #else | |
15745 PyObject *__pyx_args, PyObject *__pyx_kwds | |
15746 #endif | |
15747 ); /*proto*/ | |
15748 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_20setAttribute, "convenience method to set an attribute.\n "); | |
15749 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_21setAttribute = {"setAttribute", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_21setAttribute, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_20setAttribute}; | |
15750 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_21setAttribute(PyObject *__pyx_v_self, | |
15751 #if CYTHON_METH_FASTCALL | |
15752 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
15753 #else | |
15754 PyObject *__pyx_args, PyObject *__pyx_kwds | |
15755 #endif | |
15756 ) { | |
15757 PyObject *__pyx_v_name = 0; | |
15758 PyObject *__pyx_v_value = 0; | |
15759 #if !CYTHON_METH_FASTCALL | |
15760 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
15761 #endif | |
15762 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
15763 PyObject* values[2] = {0,0}; | |
15764 int __pyx_lineno = 0; | |
15765 const char *__pyx_filename = NULL; | |
15766 int __pyx_clineno = 0; | |
15767 PyObject *__pyx_r = 0; | |
15768 __Pyx_RefNannyDeclarations | |
15769 __Pyx_RefNannySetupContext("setAttribute (wrapper)", 0); | |
15770 #if !CYTHON_METH_FASTCALL | |
15771 #if CYTHON_ASSUME_SAFE_MACROS | |
15772 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
15773 #else | |
15774 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
15775 #endif | |
15776 #endif | |
15777 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
15778 { | |
15779 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0}; | |
15780 if (__pyx_kwds) { | |
15781 Py_ssize_t kw_args; | |
15782 switch (__pyx_nargs) { | |
15783 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); | |
15784 CYTHON_FALLTHROUGH; | |
15785 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
15786 CYTHON_FALLTHROUGH; | |
15787 case 0: break; | |
15788 default: goto __pyx_L5_argtuple_error; | |
15789 } | |
15790 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
15791 switch (__pyx_nargs) { | |
15792 case 0: | |
15793 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) { | |
15794 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
15795 kw_args--; | |
15796 } | |
15797 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 520, __pyx_L3_error) | |
15798 else goto __pyx_L5_argtuple_error; | |
15799 CYTHON_FALLTHROUGH; | |
15800 case 1: | |
15801 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) { | |
15802 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); | |
15803 kw_args--; | |
15804 } | |
15805 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 520, __pyx_L3_error) | |
15806 else { | |
15807 __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, 1); __PYX_ERR(0, 520, __pyx_L3_error) | |
15808 } | |
15809 } | |
15810 if (unlikely(kw_args > 0)) { | |
15811 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
15812 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setAttribute") < 0)) __PYX_ERR(0, 520, __pyx_L3_error) | |
15813 } | |
15814 } else if (unlikely(__pyx_nargs != 2)) { | |
15815 goto __pyx_L5_argtuple_error; | |
15816 } else { | |
15817 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
15818 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); | |
15819 } | |
15820 __pyx_v_name = values[0]; | |
15821 __pyx_v_value = values[1]; | |
15822 } | |
15823 goto __pyx_L6_skip; | |
15824 __pyx_L5_argtuple_error:; | |
15825 __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 520, __pyx_L3_error) | |
15826 __pyx_L6_skip:; | |
15827 goto __pyx_L4_argument_unpacking_done; | |
15828 __pyx_L3_error:; | |
15829 { | |
15830 Py_ssize_t __pyx_temp; | |
15831 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
15832 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
15833 } | |
15834 } | |
15835 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.setAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
15836 __Pyx_RefNannyFinishContext(); | |
15837 return NULL; | |
15838 __pyx_L4_argument_unpacking_done:; | |
15839 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_20setAttribute(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), __pyx_v_name, __pyx_v_value); | |
15840 | |
15841 /* function exit code */ | |
15842 { | |
15843 Py_ssize_t __pyx_temp; | |
15844 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
15845 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
15846 } | |
15847 } | |
15848 __Pyx_RefNannyFinishContext(); | |
15849 return __pyx_r; | |
15850 } | |
15851 | |
15852 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_20setAttribute(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { | |
15853 PyObject *__pyx_r = NULL; | |
15854 __Pyx_RefNannyDeclarations | |
15855 int __pyx_t_1; | |
15856 int __pyx_t_2; | |
15857 PyObject *__pyx_t_3 = NULL; | |
15858 PyObject *__pyx_t_4 = NULL; | |
15859 PyObject *__pyx_t_5 = NULL; | |
15860 PyObject *__pyx_t_6 = NULL; | |
15861 unsigned int __pyx_t_7; | |
15862 int __pyx_lineno = 0; | |
15863 const char *__pyx_filename = NULL; | |
15864 int __pyx_clineno = 0; | |
15865 __Pyx_RefNannySetupContext("setAttribute", 1); | |
15866 | |
15867 /* "pysam/libctabixproxies.pyx":523 | |
15868 * '''convenience method to set an attribute. | |
15869 * ''' | |
15870 * if not self.attribute_dict: # <<<<<<<<<<<<<< | |
15871 * self.attribute_dict = self.attribute_string2dict( | |
15872 * self.attributes) | |
15873 */ | |
15874 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->attribute_dict); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 523, __pyx_L1_error) | |
15875 __pyx_t_2 = (!__pyx_t_1); | |
15876 if (__pyx_t_2) { | |
15877 | |
15878 /* "pysam/libctabixproxies.pyx":524 | |
15879 * ''' | |
15880 * if not self.attribute_dict: | |
15881 * self.attribute_dict = self.attribute_string2dict( # <<<<<<<<<<<<<< | |
15882 * self.attributes) | |
15883 * self.attribute_dict[name] = value | |
15884 */ | |
15885 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attribute_string2dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error) | |
15886 __Pyx_GOTREF(__pyx_t_4); | |
15887 | |
15888 /* "pysam/libctabixproxies.pyx":525 | |
15889 * if not self.attribute_dict: | |
15890 * self.attribute_dict = self.attribute_string2dict( | |
15891 * self.attributes) # <<<<<<<<<<<<<< | |
15892 * self.attribute_dict[name] = value | |
15893 * self.is_modified = True | |
15894 */ | |
15895 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L1_error) | |
15896 __Pyx_GOTREF(__pyx_t_5); | |
15897 __pyx_t_6 = NULL; | |
15898 __pyx_t_7 = 0; | |
15899 #if CYTHON_UNPACK_METHODS | |
15900 if (likely(PyMethod_Check(__pyx_t_4))) { | |
15901 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); | |
15902 if (likely(__pyx_t_6)) { | |
15903 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); | |
15904 __Pyx_INCREF(__pyx_t_6); | |
15905 __Pyx_INCREF(function); | |
15906 __Pyx_DECREF_SET(__pyx_t_4, function); | |
15907 __pyx_t_7 = 1; | |
15908 } | |
15909 } | |
15910 #endif | |
15911 { | |
15912 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5}; | |
15913 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); | |
15914 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
15915 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
15916 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) | |
15917 __Pyx_GOTREF(__pyx_t_3); | |
15918 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
15919 } | |
15920 | |
15921 /* "pysam/libctabixproxies.pyx":524 | |
15922 * ''' | |
15923 * if not self.attribute_dict: | |
15924 * self.attribute_dict = self.attribute_string2dict( # <<<<<<<<<<<<<< | |
15925 * self.attributes) | |
15926 * self.attribute_dict[name] = value | |
15927 */ | |
15928 __Pyx_GIVEREF(__pyx_t_3); | |
15929 __Pyx_GOTREF(__pyx_v_self->attribute_dict); | |
15930 __Pyx_DECREF(__pyx_v_self->attribute_dict); | |
15931 __pyx_v_self->attribute_dict = __pyx_t_3; | |
15932 __pyx_t_3 = 0; | |
15933 | |
15934 /* "pysam/libctabixproxies.pyx":523 | |
15935 * '''convenience method to set an attribute. | |
15936 * ''' | |
15937 * if not self.attribute_dict: # <<<<<<<<<<<<<< | |
15938 * self.attribute_dict = self.attribute_string2dict( | |
15939 * self.attributes) | |
15940 */ | |
15941 } | |
15942 | |
15943 /* "pysam/libctabixproxies.pyx":526 | |
15944 * self.attribute_dict = self.attribute_string2dict( | |
15945 * self.attributes) | |
15946 * self.attribute_dict[name] = value # <<<<<<<<<<<<<< | |
15947 * self.is_modified = True | |
15948 * | |
15949 */ | |
15950 if (unlikely((PyObject_SetItem(__pyx_v_self->attribute_dict, __pyx_v_name, __pyx_v_value) < 0))) __PYX_ERR(0, 526, __pyx_L1_error) | |
15951 | |
15952 /* "pysam/libctabixproxies.pyx":527 | |
15953 * self.attributes) | |
15954 * self.attribute_dict[name] = value | |
15955 * self.is_modified = True # <<<<<<<<<<<<<< | |
15956 * | |
15957 * def attribute_string2dict(self, s): | |
15958 */ | |
15959 __pyx_v_self->__pyx_base.__pyx_base.is_modified = 1; | |
15960 | |
15961 /* "pysam/libctabixproxies.pyx":520 | |
15962 * return self.__getattr__(key) | |
15963 * | |
15964 * def setAttribute(self, name, value): # <<<<<<<<<<<<<< | |
15965 * '''convenience method to set an attribute. | |
15966 * ''' | |
15967 */ | |
15968 | |
15969 /* function exit code */ | |
15970 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
15971 goto __pyx_L0; | |
15972 __pyx_L1_error:; | |
15973 __Pyx_XDECREF(__pyx_t_3); | |
15974 __Pyx_XDECREF(__pyx_t_4); | |
15975 __Pyx_XDECREF(__pyx_t_5); | |
15976 __Pyx_XDECREF(__pyx_t_6); | |
15977 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.setAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
15978 __pyx_r = NULL; | |
15979 __pyx_L0:; | |
15980 __Pyx_XGIVEREF(__pyx_r); | |
15981 __Pyx_RefNannyFinishContext(); | |
15982 return __pyx_r; | |
15983 } | |
15984 | |
15985 /* "pysam/libctabixproxies.pyx":529 | |
15986 * self.is_modified = True | |
15987 * | |
15988 * def attribute_string2dict(self, s): # <<<<<<<<<<<<<< | |
15989 * return collections.OrderedDict( | |
15990 * self.attribute_string2iterator(s)) | |
15991 */ | |
15992 | |
15993 /* Python wrapper */ | |
15994 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_23attribute_string2dict(PyObject *__pyx_v_self, | |
15995 #if CYTHON_METH_FASTCALL | |
15996 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
15997 #else | |
15998 PyObject *__pyx_args, PyObject *__pyx_kwds | |
15999 #endif | |
16000 ); /*proto*/ | |
16001 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_23attribute_string2dict = {"attribute_string2dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_23attribute_string2dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
16002 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_23attribute_string2dict(PyObject *__pyx_v_self, | |
16003 #if CYTHON_METH_FASTCALL | |
16004 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
16005 #else | |
16006 PyObject *__pyx_args, PyObject *__pyx_kwds | |
16007 #endif | |
16008 ) { | |
16009 PyObject *__pyx_v_s = 0; | |
16010 #if !CYTHON_METH_FASTCALL | |
16011 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
16012 #endif | |
16013 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
16014 PyObject* values[1] = {0}; | |
16015 int __pyx_lineno = 0; | |
16016 const char *__pyx_filename = NULL; | |
16017 int __pyx_clineno = 0; | |
16018 PyObject *__pyx_r = 0; | |
16019 __Pyx_RefNannyDeclarations | |
16020 __Pyx_RefNannySetupContext("attribute_string2dict (wrapper)", 0); | |
16021 #if !CYTHON_METH_FASTCALL | |
16022 #if CYTHON_ASSUME_SAFE_MACROS | |
16023 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
16024 #else | |
16025 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
16026 #endif | |
16027 #endif | |
16028 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
16029 { | |
16030 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s_2,0}; | |
16031 if (__pyx_kwds) { | |
16032 Py_ssize_t kw_args; | |
16033 switch (__pyx_nargs) { | |
16034 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
16035 CYTHON_FALLTHROUGH; | |
16036 case 0: break; | |
16037 default: goto __pyx_L5_argtuple_error; | |
16038 } | |
16039 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
16040 switch (__pyx_nargs) { | |
16041 case 0: | |
16042 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s_2)) != 0)) { | |
16043 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
16044 kw_args--; | |
16045 } | |
16046 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 529, __pyx_L3_error) | |
16047 else goto __pyx_L5_argtuple_error; | |
16048 } | |
16049 if (unlikely(kw_args > 0)) { | |
16050 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
16051 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "attribute_string2dict") < 0)) __PYX_ERR(0, 529, __pyx_L3_error) | |
16052 } | |
16053 } else if (unlikely(__pyx_nargs != 1)) { | |
16054 goto __pyx_L5_argtuple_error; | |
16055 } else { | |
16056 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
16057 } | |
16058 __pyx_v_s = values[0]; | |
16059 } | |
16060 goto __pyx_L6_skip; | |
16061 __pyx_L5_argtuple_error:; | |
16062 __Pyx_RaiseArgtupleInvalid("attribute_string2dict", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 529, __pyx_L3_error) | |
16063 __pyx_L6_skip:; | |
16064 goto __pyx_L4_argument_unpacking_done; | |
16065 __pyx_L3_error:; | |
16066 { | |
16067 Py_ssize_t __pyx_temp; | |
16068 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
16069 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
16070 } | |
16071 } | |
16072 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.attribute_string2dict", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
16073 __Pyx_RefNannyFinishContext(); | |
16074 return NULL; | |
16075 __pyx_L4_argument_unpacking_done:; | |
16076 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_22attribute_string2dict(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), __pyx_v_s); | |
16077 | |
16078 /* function exit code */ | |
16079 { | |
16080 Py_ssize_t __pyx_temp; | |
16081 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
16082 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
16083 } | |
16084 } | |
16085 __Pyx_RefNannyFinishContext(); | |
16086 return __pyx_r; | |
16087 } | |
16088 | |
16089 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_22attribute_string2dict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_s) { | |
16090 PyObject *__pyx_r = NULL; | |
16091 __Pyx_RefNannyDeclarations | |
16092 PyObject *__pyx_t_1 = NULL; | |
16093 PyObject *__pyx_t_2 = NULL; | |
16094 PyObject *__pyx_t_3 = NULL; | |
16095 PyObject *__pyx_t_4 = NULL; | |
16096 PyObject *__pyx_t_5 = NULL; | |
16097 unsigned int __pyx_t_6; | |
16098 int __pyx_lineno = 0; | |
16099 const char *__pyx_filename = NULL; | |
16100 int __pyx_clineno = 0; | |
16101 __Pyx_RefNannySetupContext("attribute_string2dict", 1); | |
16102 | |
16103 /* "pysam/libctabixproxies.pyx":530 | |
16104 * | |
16105 * def attribute_string2dict(self, s): | |
16106 * return collections.OrderedDict( # <<<<<<<<<<<<<< | |
16107 * self.attribute_string2iterator(s)) | |
16108 * | |
16109 */ | |
16110 __Pyx_XDECREF(__pyx_r); | |
16111 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_collections); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error) | |
16112 __Pyx_GOTREF(__pyx_t_2); | |
16113 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error) | |
16114 __Pyx_GOTREF(__pyx_t_3); | |
16115 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
16116 | |
16117 /* "pysam/libctabixproxies.pyx":531 | |
16118 * def attribute_string2dict(self, s): | |
16119 * return collections.OrderedDict( | |
16120 * self.attribute_string2iterator(s)) # <<<<<<<<<<<<<< | |
16121 * | |
16122 * def __cmp__(self, other): | |
16123 */ | |
16124 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attribute_string2iterator); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error) | |
16125 __Pyx_GOTREF(__pyx_t_4); | |
16126 __pyx_t_5 = NULL; | |
16127 __pyx_t_6 = 0; | |
16128 #if CYTHON_UNPACK_METHODS | |
16129 if (likely(PyMethod_Check(__pyx_t_4))) { | |
16130 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); | |
16131 if (likely(__pyx_t_5)) { | |
16132 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); | |
16133 __Pyx_INCREF(__pyx_t_5); | |
16134 __Pyx_INCREF(function); | |
16135 __Pyx_DECREF_SET(__pyx_t_4, function); | |
16136 __pyx_t_6 = 1; | |
16137 } | |
16138 } | |
16139 #endif | |
16140 { | |
16141 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_s}; | |
16142 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); | |
16143 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; | |
16144 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error) | |
16145 __Pyx_GOTREF(__pyx_t_2); | |
16146 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
16147 } | |
16148 __pyx_t_4 = NULL; | |
16149 __pyx_t_6 = 0; | |
16150 #if CYTHON_UNPACK_METHODS | |
16151 if (unlikely(PyMethod_Check(__pyx_t_3))) { | |
16152 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); | |
16153 if (likely(__pyx_t_4)) { | |
16154 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
16155 __Pyx_INCREF(__pyx_t_4); | |
16156 __Pyx_INCREF(function); | |
16157 __Pyx_DECREF_SET(__pyx_t_3, function); | |
16158 __pyx_t_6 = 1; | |
16159 } | |
16160 } | |
16161 #endif | |
16162 { | |
16163 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; | |
16164 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); | |
16165 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
16166 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
16167 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error) | |
16168 __Pyx_GOTREF(__pyx_t_1); | |
16169 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
16170 } | |
16171 __pyx_r = __pyx_t_1; | |
16172 __pyx_t_1 = 0; | |
16173 goto __pyx_L0; | |
16174 | |
16175 /* "pysam/libctabixproxies.pyx":529 | |
16176 * self.is_modified = True | |
16177 * | |
16178 * def attribute_string2dict(self, s): # <<<<<<<<<<<<<< | |
16179 * return collections.OrderedDict( | |
16180 * self.attribute_string2iterator(s)) | |
16181 */ | |
16182 | |
16183 /* function exit code */ | |
16184 __pyx_L1_error:; | |
16185 __Pyx_XDECREF(__pyx_t_1); | |
16186 __Pyx_XDECREF(__pyx_t_2); | |
16187 __Pyx_XDECREF(__pyx_t_3); | |
16188 __Pyx_XDECREF(__pyx_t_4); | |
16189 __Pyx_XDECREF(__pyx_t_5); | |
16190 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.attribute_string2dict", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
16191 __pyx_r = NULL; | |
16192 __pyx_L0:; | |
16193 __Pyx_XGIVEREF(__pyx_r); | |
16194 __Pyx_RefNannyFinishContext(); | |
16195 return __pyx_r; | |
16196 } | |
16197 | |
16198 /* "pysam/libctabixproxies.pyx":533 | |
16199 * self.attribute_string2iterator(s)) | |
16200 * | |
16201 * def __cmp__(self, other): # <<<<<<<<<<<<<< | |
16202 * return (self.contig, self.strand, self.start) < \ | |
16203 * (other.contig, other.strand, other.start) | |
16204 */ | |
16205 | |
16206 /* Python wrapper */ | |
16207 #if PY_MAJOR_VERSION < 3 | |
16208 static int __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_25__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ | |
16209 static int __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_25__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { | |
16210 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
16211 int __pyx_r; | |
16212 __Pyx_RefNannyDeclarations | |
16213 __Pyx_RefNannySetupContext("__cmp__ (wrapper)", 0); | |
16214 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
16215 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_24__cmp__(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_other)); | |
16216 | |
16217 /* function exit code */ | |
16218 __Pyx_RefNannyFinishContext(); | |
16219 return __pyx_r; | |
16220 } | |
16221 #endif /*!(#if PY_MAJOR_VERSION < 3)*/ | |
16222 | |
16223 #if PY_MAJOR_VERSION < 3 | |
16224 static int __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_24__cmp__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_other) { | |
16225 int __pyx_r; | |
16226 __Pyx_RefNannyDeclarations | |
16227 PyObject *__pyx_t_1 = NULL; | |
16228 PyObject *__pyx_t_2 = NULL; | |
16229 PyObject *__pyx_t_3 = NULL; | |
16230 PyObject *__pyx_t_4 = NULL; | |
16231 PyObject *__pyx_t_5 = NULL; | |
16232 int __pyx_t_6; | |
16233 int __pyx_lineno = 0; | |
16234 const char *__pyx_filename = NULL; | |
16235 int __pyx_clineno = 0; | |
16236 __Pyx_RefNannySetupContext("__cmp__", 1); | |
16237 | |
16238 /* "pysam/libctabixproxies.pyx":534 | |
16239 * | |
16240 * def __cmp__(self, other): | |
16241 * return (self.contig, self.strand, self.start) < \ # <<<<<<<<<<<<<< | |
16242 * (other.contig, other.strand, other.start) | |
16243 * | |
16244 */ | |
16245 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_contig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) | |
16246 __Pyx_GOTREF(__pyx_t_1); | |
16247 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error) | |
16248 __Pyx_GOTREF(__pyx_t_2); | |
16249 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error) | |
16250 __Pyx_GOTREF(__pyx_t_3); | |
16251 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 534, __pyx_L1_error) | |
16252 __Pyx_GOTREF(__pyx_t_4); | |
16253 __Pyx_GIVEREF(__pyx_t_1); | |
16254 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error); | |
16255 __Pyx_GIVEREF(__pyx_t_2); | |
16256 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error); | |
16257 __Pyx_GIVEREF(__pyx_t_3); | |
16258 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error); | |
16259 __pyx_t_1 = 0; | |
16260 __pyx_t_2 = 0; | |
16261 __pyx_t_3 = 0; | |
16262 | |
16263 /* "pysam/libctabixproxies.pyx":535 | |
16264 * def __cmp__(self, other): | |
16265 * return (self.contig, self.strand, self.start) < \ | |
16266 * (other.contig, other.strand, other.start) # <<<<<<<<<<<<<< | |
16267 * | |
16268 * # python 3 compatibility | |
16269 */ | |
16270 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_contig); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error) | |
16271 __Pyx_GOTREF(__pyx_t_3); | |
16272 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error) | |
16273 __Pyx_GOTREF(__pyx_t_2); | |
16274 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) | |
16275 __Pyx_GOTREF(__pyx_t_1); | |
16276 __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error) | |
16277 __Pyx_GOTREF(__pyx_t_5); | |
16278 __Pyx_GIVEREF(__pyx_t_3); | |
16279 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error); | |
16280 __Pyx_GIVEREF(__pyx_t_2); | |
16281 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error); | |
16282 __Pyx_GIVEREF(__pyx_t_1); | |
16283 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error); | |
16284 __pyx_t_3 = 0; | |
16285 __pyx_t_2 = 0; | |
16286 __pyx_t_1 = 0; | |
16287 __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) | |
16288 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
16289 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
16290 | |
16291 /* "pysam/libctabixproxies.pyx":534 | |
16292 * | |
16293 * def __cmp__(self, other): | |
16294 * return (self.contig, self.strand, self.start) < \ # <<<<<<<<<<<<<< | |
16295 * (other.contig, other.strand, other.start) | |
16296 * | |
16297 */ | |
16298 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L1_error) | |
16299 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
16300 __pyx_r = __pyx_t_6; | |
16301 goto __pyx_L0; | |
16302 | |
16303 /* "pysam/libctabixproxies.pyx":533 | |
16304 * self.attribute_string2iterator(s)) | |
16305 * | |
16306 * def __cmp__(self, other): # <<<<<<<<<<<<<< | |
16307 * return (self.contig, self.strand, self.start) < \ | |
16308 * (other.contig, other.strand, other.start) | |
16309 */ | |
16310 | |
16311 /* function exit code */ | |
16312 __pyx_L1_error:; | |
16313 __Pyx_XDECREF(__pyx_t_1); | |
16314 __Pyx_XDECREF(__pyx_t_2); | |
16315 __Pyx_XDECREF(__pyx_t_3); | |
16316 __Pyx_XDECREF(__pyx_t_4); | |
16317 __Pyx_XDECREF(__pyx_t_5); | |
16318 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.__cmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
16319 __pyx_r = -1; | |
16320 __pyx_L0:; | |
16321 __Pyx_RefNannyFinishContext(); | |
16322 return __pyx_r; | |
16323 } | |
16324 #endif /*!(#if PY_MAJOR_VERSION < 3)*/ | |
16325 | |
16326 /* "pysam/libctabixproxies.pyx":538 | |
16327 * | |
16328 * # python 3 compatibility | |
16329 * def __richcmp__(GTFProxy self, GTFProxy other, int op): # <<<<<<<<<<<<<< | |
16330 * if op == 0: | |
16331 * return (self.contig, self.strand, self.start) < \ | |
16332 */ | |
16333 | |
16334 /* Python wrapper */ | |
16335 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_27__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ | |
16336 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_27__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { | |
16337 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
16338 int __pyx_lineno = 0; | |
16339 const char *__pyx_filename = NULL; | |
16340 int __pyx_clineno = 0; | |
16341 PyObject *__pyx_r = 0; | |
16342 __Pyx_RefNannyDeclarations | |
16343 __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); | |
16344 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
16345 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_16libctabixproxies_GTFProxy, 1, "other", 0))) __PYX_ERR(0, 538, __pyx_L1_error) | |
16346 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_26__richcmp__(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), ((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_other), ((int)__pyx_v_op)); | |
16347 | |
16348 /* function exit code */ | |
16349 goto __pyx_L0; | |
16350 __pyx_L1_error:; | |
16351 __pyx_r = NULL; | |
16352 __pyx_L0:; | |
16353 __Pyx_RefNannyFinishContext(); | |
16354 return __pyx_r; | |
16355 } | |
16356 | |
16357 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_26__richcmp__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_other, int __pyx_v_op) { | |
16358 PyObject *__pyx_v_err_msg = NULL; | |
16359 PyObject *__pyx_r = NULL; | |
16360 __Pyx_RefNannyDeclarations | |
16361 PyObject *__pyx_t_1 = NULL; | |
16362 PyObject *__pyx_t_2 = NULL; | |
16363 PyObject *__pyx_t_3 = NULL; | |
16364 PyObject *__pyx_t_4 = NULL; | |
16365 PyObject *__pyx_t_5 = NULL; | |
16366 unsigned int __pyx_t_6; | |
16367 int __pyx_lineno = 0; | |
16368 const char *__pyx_filename = NULL; | |
16369 int __pyx_clineno = 0; | |
16370 __Pyx_RefNannySetupContext("__richcmp__", 1); | |
16371 | |
16372 /* "pysam/libctabixproxies.pyx":539 | |
16373 * # python 3 compatibility | |
16374 * def __richcmp__(GTFProxy self, GTFProxy other, int op): | |
16375 * if op == 0: # <<<<<<<<<<<<<< | |
16376 * return (self.contig, self.strand, self.start) < \ | |
16377 * (other.contig, other.strand, other.start) | |
16378 */ | |
16379 switch (__pyx_v_op) { | |
16380 case 0: | |
16381 | |
16382 /* "pysam/libctabixproxies.pyx":540 | |
16383 * def __richcmp__(GTFProxy self, GTFProxy other, int op): | |
16384 * if op == 0: | |
16385 * return (self.contig, self.strand, self.start) < \ # <<<<<<<<<<<<<< | |
16386 * (other.contig, other.strand, other.start) | |
16387 * elif op == 1: | |
16388 */ | |
16389 __Pyx_XDECREF(__pyx_r); | |
16390 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_contig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error) | |
16391 __Pyx_GOTREF(__pyx_t_1); | |
16392 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error) | |
16393 __Pyx_GOTREF(__pyx_t_2); | |
16394 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error) | |
16395 __Pyx_GOTREF(__pyx_t_3); | |
16396 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error) | |
16397 __Pyx_GOTREF(__pyx_t_4); | |
16398 __Pyx_GIVEREF(__pyx_t_1); | |
16399 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error); | |
16400 __Pyx_GIVEREF(__pyx_t_2); | |
16401 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error); | |
16402 __Pyx_GIVEREF(__pyx_t_3); | |
16403 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error); | |
16404 __pyx_t_1 = 0; | |
16405 __pyx_t_2 = 0; | |
16406 __pyx_t_3 = 0; | |
16407 | |
16408 /* "pysam/libctabixproxies.pyx":541 | |
16409 * if op == 0: | |
16410 * return (self.contig, self.strand, self.start) < \ | |
16411 * (other.contig, other.strand, other.start) # <<<<<<<<<<<<<< | |
16412 * elif op == 1: | |
16413 * return (self.contig, self.strand, self.start) <= \ | |
16414 */ | |
16415 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_contig); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error) | |
16416 __Pyx_GOTREF(__pyx_t_3); | |
16417 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error) | |
16418 __Pyx_GOTREF(__pyx_t_2); | |
16419 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error) | |
16420 __Pyx_GOTREF(__pyx_t_1); | |
16421 __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error) | |
16422 __Pyx_GOTREF(__pyx_t_5); | |
16423 __Pyx_GIVEREF(__pyx_t_3); | |
16424 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error); | |
16425 __Pyx_GIVEREF(__pyx_t_2); | |
16426 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error); | |
16427 __Pyx_GIVEREF(__pyx_t_1); | |
16428 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error); | |
16429 __pyx_t_3 = 0; | |
16430 __pyx_t_2 = 0; | |
16431 __pyx_t_1 = 0; | |
16432 __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error) | |
16433 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
16434 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
16435 __pyx_r = __pyx_t_1; | |
16436 __pyx_t_1 = 0; | |
16437 goto __pyx_L0; | |
16438 | |
16439 /* "pysam/libctabixproxies.pyx":539 | |
16440 * # python 3 compatibility | |
16441 * def __richcmp__(GTFProxy self, GTFProxy other, int op): | |
16442 * if op == 0: # <<<<<<<<<<<<<< | |
16443 * return (self.contig, self.strand, self.start) < \ | |
16444 * (other.contig, other.strand, other.start) | |
16445 */ | |
16446 break; | |
16447 case 1: | |
16448 | |
16449 /* "pysam/libctabixproxies.pyx":543 | |
16450 * (other.contig, other.strand, other.start) | |
16451 * elif op == 1: | |
16452 * return (self.contig, self.strand, self.start) <= \ # <<<<<<<<<<<<<< | |
16453 * (other.contig, other.strand, other.start) | |
16454 * elif op == 2: | |
16455 */ | |
16456 __Pyx_XDECREF(__pyx_r); | |
16457 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_contig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) | |
16458 __Pyx_GOTREF(__pyx_t_1); | |
16459 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 543, __pyx_L1_error) | |
16460 __Pyx_GOTREF(__pyx_t_5); | |
16461 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error) | |
16462 __Pyx_GOTREF(__pyx_t_4); | |
16463 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error) | |
16464 __Pyx_GOTREF(__pyx_t_2); | |
16465 __Pyx_GIVEREF(__pyx_t_1); | |
16466 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error); | |
16467 __Pyx_GIVEREF(__pyx_t_5); | |
16468 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5)) __PYX_ERR(0, 543, __pyx_L1_error); | |
16469 __Pyx_GIVEREF(__pyx_t_4); | |
16470 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error); | |
16471 __pyx_t_1 = 0; | |
16472 __pyx_t_5 = 0; | |
16473 __pyx_t_4 = 0; | |
16474 | |
16475 /* "pysam/libctabixproxies.pyx":544 | |
16476 * elif op == 1: | |
16477 * return (self.contig, self.strand, self.start) <= \ | |
16478 * (other.contig, other.strand, other.start) # <<<<<<<<<<<<<< | |
16479 * elif op == 2: | |
16480 * return self.compare(other) == 0 | |
16481 */ | |
16482 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_contig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error) | |
16483 __Pyx_GOTREF(__pyx_t_4); | |
16484 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_strand); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 544, __pyx_L1_error) | |
16485 __Pyx_GOTREF(__pyx_t_5); | |
16486 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) | |
16487 __Pyx_GOTREF(__pyx_t_1); | |
16488 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error) | |
16489 __Pyx_GOTREF(__pyx_t_3); | |
16490 __Pyx_GIVEREF(__pyx_t_4); | |
16491 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error); | |
16492 __Pyx_GIVEREF(__pyx_t_5); | |
16493 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(0, 544, __pyx_L1_error); | |
16494 __Pyx_GIVEREF(__pyx_t_1); | |
16495 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error); | |
16496 __pyx_t_4 = 0; | |
16497 __pyx_t_5 = 0; | |
16498 __pyx_t_1 = 0; | |
16499 __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) | |
16500 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
16501 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
16502 __pyx_r = __pyx_t_1; | |
16503 __pyx_t_1 = 0; | |
16504 goto __pyx_L0; | |
16505 | |
16506 /* "pysam/libctabixproxies.pyx":542 | |
16507 * return (self.contig, self.strand, self.start) < \ | |
16508 * (other.contig, other.strand, other.start) | |
16509 * elif op == 1: # <<<<<<<<<<<<<< | |
16510 * return (self.contig, self.strand, self.start) <= \ | |
16511 * (other.contig, other.strand, other.start) | |
16512 */ | |
16513 break; | |
16514 case 2: | |
16515 | |
16516 /* "pysam/libctabixproxies.pyx":546 | |
16517 * (other.contig, other.strand, other.start) | |
16518 * elif op == 2: | |
16519 * return self.compare(other) == 0 # <<<<<<<<<<<<<< | |
16520 * elif op == 3: | |
16521 * return self.compare(other) != 0 | |
16522 */ | |
16523 __Pyx_XDECREF(__pyx_r); | |
16524 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compare); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error) | |
16525 __Pyx_GOTREF(__pyx_t_3); | |
16526 __pyx_t_2 = NULL; | |
16527 __pyx_t_6 = 0; | |
16528 #if CYTHON_UNPACK_METHODS | |
16529 if (likely(PyMethod_Check(__pyx_t_3))) { | |
16530 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); | |
16531 if (likely(__pyx_t_2)) { | |
16532 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
16533 __Pyx_INCREF(__pyx_t_2); | |
16534 __Pyx_INCREF(function); | |
16535 __Pyx_DECREF_SET(__pyx_t_3, function); | |
16536 __pyx_t_6 = 1; | |
16537 } | |
16538 } | |
16539 #endif | |
16540 { | |
16541 PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_other)}; | |
16542 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); | |
16543 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; | |
16544 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error) | |
16545 __Pyx_GOTREF(__pyx_t_1); | |
16546 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
16547 } | |
16548 __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error) | |
16549 __Pyx_GOTREF(__pyx_t_3); | |
16550 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
16551 __pyx_r = __pyx_t_3; | |
16552 __pyx_t_3 = 0; | |
16553 goto __pyx_L0; | |
16554 | |
16555 /* "pysam/libctabixproxies.pyx":545 | |
16556 * return (self.contig, self.strand, self.start) <= \ | |
16557 * (other.contig, other.strand, other.start) | |
16558 * elif op == 2: # <<<<<<<<<<<<<< | |
16559 * return self.compare(other) == 0 | |
16560 * elif op == 3: | |
16561 */ | |
16562 break; | |
16563 case 3: | |
16564 | |
16565 /* "pysam/libctabixproxies.pyx":548 | |
16566 * return self.compare(other) == 0 | |
16567 * elif op == 3: | |
16568 * return self.compare(other) != 0 # <<<<<<<<<<<<<< | |
16569 * else: | |
16570 * err_msg = "op {0} isn't implemented yet".format(op) | |
16571 */ | |
16572 __Pyx_XDECREF(__pyx_r); | |
16573 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compare); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) | |
16574 __Pyx_GOTREF(__pyx_t_1); | |
16575 __pyx_t_2 = NULL; | |
16576 __pyx_t_6 = 0; | |
16577 #if CYTHON_UNPACK_METHODS | |
16578 if (likely(PyMethod_Check(__pyx_t_1))) { | |
16579 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); | |
16580 if (likely(__pyx_t_2)) { | |
16581 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); | |
16582 __Pyx_INCREF(__pyx_t_2); | |
16583 __Pyx_INCREF(function); | |
16584 __Pyx_DECREF_SET(__pyx_t_1, function); | |
16585 __pyx_t_6 = 1; | |
16586 } | |
16587 } | |
16588 #endif | |
16589 { | |
16590 PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_other)}; | |
16591 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); | |
16592 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; | |
16593 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L1_error) | |
16594 __Pyx_GOTREF(__pyx_t_3); | |
16595 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
16596 } | |
16597 __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) | |
16598 __Pyx_GOTREF(__pyx_t_1); | |
16599 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
16600 __pyx_r = __pyx_t_1; | |
16601 __pyx_t_1 = 0; | |
16602 goto __pyx_L0; | |
16603 | |
16604 /* "pysam/libctabixproxies.pyx":547 | |
16605 * elif op == 2: | |
16606 * return self.compare(other) == 0 | |
16607 * elif op == 3: # <<<<<<<<<<<<<< | |
16608 * return self.compare(other) != 0 | |
16609 * else: | |
16610 */ | |
16611 break; | |
16612 default: | |
16613 | |
16614 /* "pysam/libctabixproxies.pyx":550 | |
16615 * return self.compare(other) != 0 | |
16616 * else: | |
16617 * err_msg = "op {0} isn't implemented yet".format(op) # <<<<<<<<<<<<<< | |
16618 * raise NotImplementedError(err_msg) | |
16619 * | |
16620 */ | |
16621 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_op_0_isn_t_implemented_yet, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 550, __pyx_L1_error) | |
16622 __Pyx_GOTREF(__pyx_t_3); | |
16623 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_op); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error) | |
16624 __Pyx_GOTREF(__pyx_t_2); | |
16625 __pyx_t_5 = NULL; | |
16626 __pyx_t_6 = 0; | |
16627 #if CYTHON_UNPACK_METHODS | |
16628 if (likely(PyMethod_Check(__pyx_t_3))) { | |
16629 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); | |
16630 if (likely(__pyx_t_5)) { | |
16631 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
16632 __Pyx_INCREF(__pyx_t_5); | |
16633 __Pyx_INCREF(function); | |
16634 __Pyx_DECREF_SET(__pyx_t_3, function); | |
16635 __pyx_t_6 = 1; | |
16636 } | |
16637 } | |
16638 #endif | |
16639 { | |
16640 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2}; | |
16641 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); | |
16642 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; | |
16643 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
16644 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error) | |
16645 __Pyx_GOTREF(__pyx_t_1); | |
16646 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
16647 } | |
16648 __pyx_v_err_msg = __pyx_t_1; | |
16649 __pyx_t_1 = 0; | |
16650 | |
16651 /* "pysam/libctabixproxies.pyx":551 | |
16652 * else: | |
16653 * err_msg = "op {0} isn't implemented yet".format(op) | |
16654 * raise NotImplementedError(err_msg) # <<<<<<<<<<<<<< | |
16655 * | |
16656 * def dict2attribute_string(self, d): | |
16657 */ | |
16658 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_v_err_msg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error) | |
16659 __Pyx_GOTREF(__pyx_t_1); | |
16660 __Pyx_Raise(__pyx_t_1, 0, 0, 0); | |
16661 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
16662 __PYX_ERR(0, 551, __pyx_L1_error) | |
16663 break; | |
16664 } | |
16665 | |
16666 /* "pysam/libctabixproxies.pyx":538 | |
16667 * | |
16668 * # python 3 compatibility | |
16669 * def __richcmp__(GTFProxy self, GTFProxy other, int op): # <<<<<<<<<<<<<< | |
16670 * if op == 0: | |
16671 * return (self.contig, self.strand, self.start) < \ | |
16672 */ | |
16673 | |
16674 /* function exit code */ | |
16675 __pyx_L1_error:; | |
16676 __Pyx_XDECREF(__pyx_t_1); | |
16677 __Pyx_XDECREF(__pyx_t_2); | |
16678 __Pyx_XDECREF(__pyx_t_3); | |
16679 __Pyx_XDECREF(__pyx_t_4); | |
16680 __Pyx_XDECREF(__pyx_t_5); | |
16681 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
16682 __pyx_r = NULL; | |
16683 __pyx_L0:; | |
16684 __Pyx_XDECREF(__pyx_v_err_msg); | |
16685 __Pyx_XGIVEREF(__pyx_r); | |
16686 __Pyx_RefNannyFinishContext(); | |
16687 return __pyx_r; | |
16688 } | |
16689 | |
16690 /* "pysam/libctabixproxies.pyx":553 | |
16691 * raise NotImplementedError(err_msg) | |
16692 * | |
16693 * def dict2attribute_string(self, d): # <<<<<<<<<<<<<< | |
16694 * """convert dictionary to attribute string in GTF format. | |
16695 * | |
16696 */ | |
16697 | |
16698 /* Python wrapper */ | |
16699 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_29dict2attribute_string(PyObject *__pyx_v_self, | |
16700 #if CYTHON_METH_FASTCALL | |
16701 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
16702 #else | |
16703 PyObject *__pyx_args, PyObject *__pyx_kwds | |
16704 #endif | |
16705 ); /*proto*/ | |
16706 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_28dict2attribute_string, "convert dictionary to attribute string in GTF format.\n\n "); | |
16707 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_29dict2attribute_string = {"dict2attribute_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_29dict2attribute_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_28dict2attribute_string}; | |
16708 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_29dict2attribute_string(PyObject *__pyx_v_self, | |
16709 #if CYTHON_METH_FASTCALL | |
16710 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
16711 #else | |
16712 PyObject *__pyx_args, PyObject *__pyx_kwds | |
16713 #endif | |
16714 ) { | |
16715 PyObject *__pyx_v_d = 0; | |
16716 #if !CYTHON_METH_FASTCALL | |
16717 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
16718 #endif | |
16719 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
16720 PyObject* values[1] = {0}; | |
16721 int __pyx_lineno = 0; | |
16722 const char *__pyx_filename = NULL; | |
16723 int __pyx_clineno = 0; | |
16724 PyObject *__pyx_r = 0; | |
16725 __Pyx_RefNannyDeclarations | |
16726 __Pyx_RefNannySetupContext("dict2attribute_string (wrapper)", 0); | |
16727 #if !CYTHON_METH_FASTCALL | |
16728 #if CYTHON_ASSUME_SAFE_MACROS | |
16729 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
16730 #else | |
16731 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
16732 #endif | |
16733 #endif | |
16734 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
16735 { | |
16736 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,0}; | |
16737 if (__pyx_kwds) { | |
16738 Py_ssize_t kw_args; | |
16739 switch (__pyx_nargs) { | |
16740 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
16741 CYTHON_FALLTHROUGH; | |
16742 case 0: break; | |
16743 default: goto __pyx_L5_argtuple_error; | |
16744 } | |
16745 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
16746 switch (__pyx_nargs) { | |
16747 case 0: | |
16748 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_d)) != 0)) { | |
16749 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
16750 kw_args--; | |
16751 } | |
16752 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error) | |
16753 else goto __pyx_L5_argtuple_error; | |
16754 } | |
16755 if (unlikely(kw_args > 0)) { | |
16756 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
16757 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dict2attribute_string") < 0)) __PYX_ERR(0, 553, __pyx_L3_error) | |
16758 } | |
16759 } else if (unlikely(__pyx_nargs != 1)) { | |
16760 goto __pyx_L5_argtuple_error; | |
16761 } else { | |
16762 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
16763 } | |
16764 __pyx_v_d = values[0]; | |
16765 } | |
16766 goto __pyx_L6_skip; | |
16767 __pyx_L5_argtuple_error:; | |
16768 __Pyx_RaiseArgtupleInvalid("dict2attribute_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 553, __pyx_L3_error) | |
16769 __pyx_L6_skip:; | |
16770 goto __pyx_L4_argument_unpacking_done; | |
16771 __pyx_L3_error:; | |
16772 { | |
16773 Py_ssize_t __pyx_temp; | |
16774 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
16775 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
16776 } | |
16777 } | |
16778 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.dict2attribute_string", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
16779 __Pyx_RefNannyFinishContext(); | |
16780 return NULL; | |
16781 __pyx_L4_argument_unpacking_done:; | |
16782 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_28dict2attribute_string(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), __pyx_v_d); | |
16783 | |
16784 /* function exit code */ | |
16785 { | |
16786 Py_ssize_t __pyx_temp; | |
16787 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
16788 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
16789 } | |
16790 } | |
16791 __Pyx_RefNannyFinishContext(); | |
16792 return __pyx_r; | |
16793 } | |
16794 | |
16795 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_28dict2attribute_string(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_d) { | |
16796 PyObject *__pyx_v_aa = NULL; | |
16797 PyObject *__pyx_v_k = NULL; | |
16798 PyObject *__pyx_v_v = NULL; | |
16799 PyObject *__pyx_r = NULL; | |
16800 __Pyx_RefNannyDeclarations | |
16801 PyObject *__pyx_t_1 = NULL; | |
16802 Py_ssize_t __pyx_t_2; | |
16803 Py_ssize_t __pyx_t_3; | |
16804 int __pyx_t_4; | |
16805 PyObject *__pyx_t_5 = NULL; | |
16806 PyObject *__pyx_t_6 = NULL; | |
16807 int __pyx_t_7; | |
16808 int __pyx_t_8; | |
16809 PyObject *__pyx_t_9 = NULL; | |
16810 unsigned int __pyx_t_10; | |
16811 int __pyx_t_11; | |
16812 PyObject *__pyx_t_12 = NULL; | |
16813 int __pyx_lineno = 0; | |
16814 const char *__pyx_filename = NULL; | |
16815 int __pyx_clineno = 0; | |
16816 __Pyx_RefNannySetupContext("dict2attribute_string", 1); | |
16817 | |
16818 /* "pysam/libctabixproxies.pyx":557 | |
16819 * | |
16820 * """ | |
16821 * aa = [] # <<<<<<<<<<<<<< | |
16822 * for k, v in d.items(): | |
16823 * if isinstance(v, str): | |
16824 */ | |
16825 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error) | |
16826 __Pyx_GOTREF(__pyx_t_1); | |
16827 __pyx_v_aa = ((PyObject*)__pyx_t_1); | |
16828 __pyx_t_1 = 0; | |
16829 | |
16830 /* "pysam/libctabixproxies.pyx":558 | |
16831 * """ | |
16832 * aa = [] | |
16833 * for k, v in d.items(): # <<<<<<<<<<<<<< | |
16834 * if isinstance(v, str): | |
16835 * aa.append('{} "{}"'.format(k, v)) | |
16836 */ | |
16837 __pyx_t_2 = 0; | |
16838 if (unlikely(__pyx_v_d == Py_None)) { | |
16839 PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); | |
16840 __PYX_ERR(0, 558, __pyx_L1_error) | |
16841 } | |
16842 __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_d, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 558, __pyx_L1_error) | |
16843 __Pyx_GOTREF(__pyx_t_5); | |
16844 __Pyx_XDECREF(__pyx_t_1); | |
16845 __pyx_t_1 = __pyx_t_5; | |
16846 __pyx_t_5 = 0; | |
16847 while (1) { | |
16848 __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); | |
16849 if (unlikely(__pyx_t_7 == 0)) break; | |
16850 if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 558, __pyx_L1_error) | |
16851 __Pyx_GOTREF(__pyx_t_5); | |
16852 __Pyx_GOTREF(__pyx_t_6); | |
16853 __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5); | |
16854 __pyx_t_5 = 0; | |
16855 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6); | |
16856 __pyx_t_6 = 0; | |
16857 | |
16858 /* "pysam/libctabixproxies.pyx":559 | |
16859 * aa = [] | |
16860 * for k, v in d.items(): | |
16861 * if isinstance(v, str): # <<<<<<<<<<<<<< | |
16862 * aa.append('{} "{}"'.format(k, v)) | |
16863 * else: | |
16864 */ | |
16865 __pyx_t_8 = PyUnicode_Check(__pyx_v_v); | |
16866 if (__pyx_t_8) { | |
16867 | |
16868 /* "pysam/libctabixproxies.pyx":560 | |
16869 * for k, v in d.items(): | |
16870 * if isinstance(v, str): | |
16871 * aa.append('{} "{}"'.format(k, v)) # <<<<<<<<<<<<<< | |
16872 * else: | |
16873 * aa.append("{} {}".format(k, str(v))) | |
16874 */ | |
16875 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__15, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error) | |
16876 __Pyx_GOTREF(__pyx_t_5); | |
16877 __pyx_t_9 = NULL; | |
16878 __pyx_t_10 = 0; | |
16879 #if CYTHON_UNPACK_METHODS | |
16880 if (likely(PyMethod_Check(__pyx_t_5))) { | |
16881 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); | |
16882 if (likely(__pyx_t_9)) { | |
16883 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); | |
16884 __Pyx_INCREF(__pyx_t_9); | |
16885 __Pyx_INCREF(function); | |
16886 __Pyx_DECREF_SET(__pyx_t_5, function); | |
16887 __pyx_t_10 = 1; | |
16888 } | |
16889 } | |
16890 #endif | |
16891 { | |
16892 PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_k, __pyx_v_v}; | |
16893 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); | |
16894 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; | |
16895 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error) | |
16896 __Pyx_GOTREF(__pyx_t_6); | |
16897 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
16898 } | |
16899 __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_aa, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 560, __pyx_L1_error) | |
16900 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
16901 | |
16902 /* "pysam/libctabixproxies.pyx":559 | |
16903 * aa = [] | |
16904 * for k, v in d.items(): | |
16905 * if isinstance(v, str): # <<<<<<<<<<<<<< | |
16906 * aa.append('{} "{}"'.format(k, v)) | |
16907 * else: | |
16908 */ | |
16909 goto __pyx_L5; | |
16910 } | |
16911 | |
16912 /* "pysam/libctabixproxies.pyx":562 | |
16913 * aa.append('{} "{}"'.format(k, v)) | |
16914 * else: | |
16915 * aa.append("{} {}".format(k, str(v))) # <<<<<<<<<<<<<< | |
16916 * | |
16917 * return self.separator.join(aa) + ";" | |
16918 */ | |
16919 /*else*/ { | |
16920 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__16, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error) | |
16921 __Pyx_GOTREF(__pyx_t_5); | |
16922 __pyx_t_9 = __Pyx_PyObject_Unicode(__pyx_v_v); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 562, __pyx_L1_error) | |
16923 __Pyx_GOTREF(__pyx_t_9); | |
16924 __pyx_t_12 = NULL; | |
16925 __pyx_t_10 = 0; | |
16926 #if CYTHON_UNPACK_METHODS | |
16927 if (likely(PyMethod_Check(__pyx_t_5))) { | |
16928 __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5); | |
16929 if (likely(__pyx_t_12)) { | |
16930 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); | |
16931 __Pyx_INCREF(__pyx_t_12); | |
16932 __Pyx_INCREF(function); | |
16933 __Pyx_DECREF_SET(__pyx_t_5, function); | |
16934 __pyx_t_10 = 1; | |
16935 } | |
16936 } | |
16937 #endif | |
16938 { | |
16939 PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_v_k, __pyx_t_9}; | |
16940 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); | |
16941 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; | |
16942 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; | |
16943 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __pyx_L1_error) | |
16944 __Pyx_GOTREF(__pyx_t_6); | |
16945 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
16946 } | |
16947 __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_aa, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 562, __pyx_L1_error) | |
16948 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
16949 } | |
16950 __pyx_L5:; | |
16951 } | |
16952 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
16953 | |
16954 /* "pysam/libctabixproxies.pyx":564 | |
16955 * aa.append("{} {}".format(k, str(v))) | |
16956 * | |
16957 * return self.separator.join(aa) + ";" # <<<<<<<<<<<<<< | |
16958 * | |
16959 * def attribute_string2iterator(self, s): | |
16960 */ | |
16961 __Pyx_XDECREF(__pyx_r); | |
16962 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_separator); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error) | |
16963 __Pyx_GOTREF(__pyx_t_6); | |
16964 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_join); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error) | |
16965 __Pyx_GOTREF(__pyx_t_5); | |
16966 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
16967 __pyx_t_6 = NULL; | |
16968 __pyx_t_10 = 0; | |
16969 #if CYTHON_UNPACK_METHODS | |
16970 if (likely(PyMethod_Check(__pyx_t_5))) { | |
16971 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); | |
16972 if (likely(__pyx_t_6)) { | |
16973 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); | |
16974 __Pyx_INCREF(__pyx_t_6); | |
16975 __Pyx_INCREF(function); | |
16976 __Pyx_DECREF_SET(__pyx_t_5, function); | |
16977 __pyx_t_10 = 1; | |
16978 } | |
16979 } | |
16980 #endif | |
16981 { | |
16982 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_aa}; | |
16983 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); | |
16984 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
16985 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error) | |
16986 __Pyx_GOTREF(__pyx_t_1); | |
16987 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
16988 } | |
16989 __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_kp_u__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error) | |
16990 __Pyx_GOTREF(__pyx_t_5); | |
16991 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
16992 __pyx_r = __pyx_t_5; | |
16993 __pyx_t_5 = 0; | |
16994 goto __pyx_L0; | |
16995 | |
16996 /* "pysam/libctabixproxies.pyx":553 | |
16997 * raise NotImplementedError(err_msg) | |
16998 * | |
16999 * def dict2attribute_string(self, d): # <<<<<<<<<<<<<< | |
17000 * """convert dictionary to attribute string in GTF format. | |
17001 * | |
17002 */ | |
17003 | |
17004 /* function exit code */ | |
17005 __pyx_L1_error:; | |
17006 __Pyx_XDECREF(__pyx_t_1); | |
17007 __Pyx_XDECREF(__pyx_t_5); | |
17008 __Pyx_XDECREF(__pyx_t_6); | |
17009 __Pyx_XDECREF(__pyx_t_9); | |
17010 __Pyx_XDECREF(__pyx_t_12); | |
17011 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.dict2attribute_string", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
17012 __pyx_r = NULL; | |
17013 __pyx_L0:; | |
17014 __Pyx_XDECREF(__pyx_v_aa); | |
17015 __Pyx_XDECREF(__pyx_v_k); | |
17016 __Pyx_XDECREF(__pyx_v_v); | |
17017 __Pyx_XGIVEREF(__pyx_r); | |
17018 __Pyx_RefNannyFinishContext(); | |
17019 return __pyx_r; | |
17020 } | |
17021 static PyObject *__pyx_gb_5pysam_16libctabixproxies_8GTFProxy_32generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ | |
17022 | |
17023 /* "pysam/libctabixproxies.pyx":566 | |
17024 * return self.separator.join(aa) + ";" | |
17025 * | |
17026 * def attribute_string2iterator(self, s): # <<<<<<<<<<<<<< | |
17027 * """convert attribute string in GTF format to records | |
17028 * and iterate over key, value pairs. | |
17029 */ | |
17030 | |
17031 /* Python wrapper */ | |
17032 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_31attribute_string2iterator(PyObject *__pyx_v_self, | |
17033 #if CYTHON_METH_FASTCALL | |
17034 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
17035 #else | |
17036 PyObject *__pyx_args, PyObject *__pyx_kwds | |
17037 #endif | |
17038 ); /*proto*/ | |
17039 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_30attribute_string2iterator, "convert attribute string in GTF format to records\n and iterate over key, value pairs.\n "); | |
17040 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_31attribute_string2iterator = {"attribute_string2iterator", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_31attribute_string2iterator, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_30attribute_string2iterator}; | |
17041 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_31attribute_string2iterator(PyObject *__pyx_v_self, | |
17042 #if CYTHON_METH_FASTCALL | |
17043 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
17044 #else | |
17045 PyObject *__pyx_args, PyObject *__pyx_kwds | |
17046 #endif | |
17047 ) { | |
17048 PyObject *__pyx_v_s = 0; | |
17049 #if !CYTHON_METH_FASTCALL | |
17050 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
17051 #endif | |
17052 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
17053 PyObject* values[1] = {0}; | |
17054 int __pyx_lineno = 0; | |
17055 const char *__pyx_filename = NULL; | |
17056 int __pyx_clineno = 0; | |
17057 PyObject *__pyx_r = 0; | |
17058 __Pyx_RefNannyDeclarations | |
17059 __Pyx_RefNannySetupContext("attribute_string2iterator (wrapper)", 0); | |
17060 #if !CYTHON_METH_FASTCALL | |
17061 #if CYTHON_ASSUME_SAFE_MACROS | |
17062 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
17063 #else | |
17064 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
17065 #endif | |
17066 #endif | |
17067 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
17068 { | |
17069 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s_2,0}; | |
17070 if (__pyx_kwds) { | |
17071 Py_ssize_t kw_args; | |
17072 switch (__pyx_nargs) { | |
17073 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
17074 CYTHON_FALLTHROUGH; | |
17075 case 0: break; | |
17076 default: goto __pyx_L5_argtuple_error; | |
17077 } | |
17078 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
17079 switch (__pyx_nargs) { | |
17080 case 0: | |
17081 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s_2)) != 0)) { | |
17082 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
17083 kw_args--; | |
17084 } | |
17085 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 566, __pyx_L3_error) | |
17086 else goto __pyx_L5_argtuple_error; | |
17087 } | |
17088 if (unlikely(kw_args > 0)) { | |
17089 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
17090 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "attribute_string2iterator") < 0)) __PYX_ERR(0, 566, __pyx_L3_error) | |
17091 } | |
17092 } else if (unlikely(__pyx_nargs != 1)) { | |
17093 goto __pyx_L5_argtuple_error; | |
17094 } else { | |
17095 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
17096 } | |
17097 __pyx_v_s = values[0]; | |
17098 } | |
17099 goto __pyx_L6_skip; | |
17100 __pyx_L5_argtuple_error:; | |
17101 __Pyx_RaiseArgtupleInvalid("attribute_string2iterator", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 566, __pyx_L3_error) | |
17102 __pyx_L6_skip:; | |
17103 goto __pyx_L4_argument_unpacking_done; | |
17104 __pyx_L3_error:; | |
17105 { | |
17106 Py_ssize_t __pyx_temp; | |
17107 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
17108 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
17109 } | |
17110 } | |
17111 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.attribute_string2iterator", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
17112 __Pyx_RefNannyFinishContext(); | |
17113 return NULL; | |
17114 __pyx_L4_argument_unpacking_done:; | |
17115 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_30attribute_string2iterator(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), __pyx_v_s); | |
17116 | |
17117 /* function exit code */ | |
17118 { | |
17119 Py_ssize_t __pyx_temp; | |
17120 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
17121 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
17122 } | |
17123 } | |
17124 __Pyx_RefNannyFinishContext(); | |
17125 return __pyx_r; | |
17126 } | |
17127 | |
17128 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_30attribute_string2iterator(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_s) { | |
17129 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator *__pyx_cur_scope; | |
17130 PyObject *__pyx_r = NULL; | |
17131 __Pyx_RefNannyDeclarations | |
17132 int __pyx_lineno = 0; | |
17133 const char *__pyx_filename = NULL; | |
17134 int __pyx_clineno = 0; | |
17135 __Pyx_RefNannySetupContext("attribute_string2iterator", 0); | |
17136 __pyx_cur_scope = (struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator *)__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator(__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator, __pyx_empty_tuple, NULL); | |
17137 if (unlikely(!__pyx_cur_scope)) { | |
17138 __pyx_cur_scope = ((struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator *)Py_None); | |
17139 __Pyx_INCREF(Py_None); | |
17140 __PYX_ERR(0, 566, __pyx_L1_error) | |
17141 } else { | |
17142 __Pyx_GOTREF((PyObject *)__pyx_cur_scope); | |
17143 } | |
17144 __pyx_cur_scope->__pyx_v_self = __pyx_v_self; | |
17145 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); | |
17146 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); | |
17147 __pyx_cur_scope->__pyx_v_s = __pyx_v_s; | |
17148 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_s); | |
17149 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_s); | |
17150 { | |
17151 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_16libctabixproxies_8GTFProxy_32generator, __pyx_codeobj__18, (PyObject *) __pyx_cur_scope, __pyx_n_s_attribute_string2iterator, __pyx_n_s_GTFProxy_attribute_string2iterat, __pyx_n_s_pysam_libctabixproxies); if (unlikely(!gen)) __PYX_ERR(0, 566, __pyx_L1_error) | |
17152 __Pyx_DECREF(__pyx_cur_scope); | |
17153 __Pyx_RefNannyFinishContext(); | |
17154 return (PyObject *) gen; | |
17155 } | |
17156 | |
17157 /* function exit code */ | |
17158 __pyx_L1_error:; | |
17159 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.attribute_string2iterator", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
17160 __pyx_r = NULL; | |
17161 __Pyx_DECREF((PyObject *)__pyx_cur_scope); | |
17162 __Pyx_XGIVEREF(__pyx_r); | |
17163 __Pyx_RefNannyFinishContext(); | |
17164 return __pyx_r; | |
17165 } | |
17166 | |
17167 static PyObject *__pyx_gb_5pysam_16libctabixproxies_8GTFProxy_32generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ | |
17168 { | |
17169 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator *__pyx_cur_scope = ((struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator *)__pyx_generator->closure); | |
17170 PyObject *__pyx_r = NULL; | |
17171 PyObject *__pyx_t_1 = NULL; | |
17172 PyObject *__pyx_t_2 = NULL; | |
17173 struct __pyx_opt_args_5pysam_9libcutils_force_str __pyx_t_3; | |
17174 PyObject *__pyx_t_4 = NULL; | |
17175 PyObject *__pyx_t_5 = NULL; | |
17176 PyObject *__pyx_t_6 = NULL; | |
17177 unsigned int __pyx_t_7; | |
17178 Py_ssize_t __pyx_t_8; | |
17179 PyObject *(*__pyx_t_9)(PyObject *); | |
17180 int __pyx_t_10; | |
17181 Py_ssize_t __pyx_t_11; | |
17182 PyObject *__pyx_t_12 = NULL; | |
17183 int __pyx_t_13; | |
17184 PyObject *__pyx_t_14 = NULL; | |
17185 PyObject *__pyx_t_15 = NULL; | |
17186 PyObject *__pyx_t_16 = NULL; | |
17187 int __pyx_t_17; | |
17188 int __pyx_lineno = 0; | |
17189 const char *__pyx_filename = NULL; | |
17190 int __pyx_clineno = 0; | |
17191 __Pyx_RefNannyDeclarations | |
17192 __Pyx_RefNannySetupContext("attribute_string2iterator", 0); | |
17193 switch (__pyx_generator->resume_label) { | |
17194 case 0: goto __pyx_L3_first_run; | |
17195 case 1: goto __pyx_L25_resume_from_yield; | |
17196 default: /* CPython raises the right error here */ | |
17197 __Pyx_RefNannyFinishContext(); | |
17198 return NULL; | |
17199 } | |
17200 __pyx_L3_first_run:; | |
17201 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 566, __pyx_L1_error) | |
17202 | |
17203 /* "pysam/libctabixproxies.pyx":572 | |
17204 * | |
17205 * # remove comments | |
17206 * attributes = force_str(s, encoding=self.encoding) # <<<<<<<<<<<<<< | |
17207 * | |
17208 * # separate into fields | |
17209 */ | |
17210 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->__pyx_base.__pyx_base.encoding; | |
17211 __Pyx_INCREF(__pyx_t_1); | |
17212 __pyx_t_3.__pyx_n = 1; | |
17213 __pyx_t_3.encoding = __pyx_t_1; | |
17214 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_str(__pyx_cur_scope->__pyx_v_s, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error) | |
17215 __Pyx_GOTREF(__pyx_t_2); | |
17216 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
17217 __Pyx_GIVEREF(__pyx_t_2); | |
17218 __pyx_cur_scope->__pyx_v_attributes = __pyx_t_2; | |
17219 __pyx_t_2 = 0; | |
17220 | |
17221 /* "pysam/libctabixproxies.pyx":582 | |
17222 * | |
17223 * # Remove white space to prevent a last empty field. | |
17224 * fields = [x.strip() for x in attributes.strip().split("; ")] # <<<<<<<<<<<<<< | |
17225 * for f in fields: | |
17226 * | |
17227 */ | |
17228 { /* enter inner scope */ | |
17229 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error) | |
17230 __Pyx_GOTREF(__pyx_t_2); | |
17231 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_attributes, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error) | |
17232 __Pyx_GOTREF(__pyx_t_5); | |
17233 __pyx_t_6 = NULL; | |
17234 __pyx_t_7 = 0; | |
17235 #if CYTHON_UNPACK_METHODS | |
17236 if (likely(PyMethod_Check(__pyx_t_5))) { | |
17237 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); | |
17238 if (likely(__pyx_t_6)) { | |
17239 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); | |
17240 __Pyx_INCREF(__pyx_t_6); | |
17241 __Pyx_INCREF(function); | |
17242 __Pyx_DECREF_SET(__pyx_t_5, function); | |
17243 __pyx_t_7 = 1; | |
17244 } | |
17245 } | |
17246 #endif | |
17247 { | |
17248 PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; | |
17249 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); | |
17250 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
17251 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error) | |
17252 __Pyx_GOTREF(__pyx_t_4); | |
17253 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
17254 } | |
17255 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error) | |
17256 __Pyx_GOTREF(__pyx_t_5); | |
17257 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
17258 __pyx_t_4 = NULL; | |
17259 __pyx_t_7 = 0; | |
17260 #if CYTHON_UNPACK_METHODS | |
17261 if (likely(PyMethod_Check(__pyx_t_5))) { | |
17262 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); | |
17263 if (likely(__pyx_t_4)) { | |
17264 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); | |
17265 __Pyx_INCREF(__pyx_t_4); | |
17266 __Pyx_INCREF(function); | |
17267 __Pyx_DECREF_SET(__pyx_t_5, function); | |
17268 __pyx_t_7 = 1; | |
17269 } | |
17270 } | |
17271 #endif | |
17272 { | |
17273 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u__19}; | |
17274 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); | |
17275 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
17276 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) | |
17277 __Pyx_GOTREF(__pyx_t_1); | |
17278 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
17279 } | |
17280 if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { | |
17281 __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); | |
17282 __pyx_t_8 = 0; | |
17283 __pyx_t_9 = NULL; | |
17284 } else { | |
17285 __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error) | |
17286 __Pyx_GOTREF(__pyx_t_5); | |
17287 __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error) | |
17288 } | |
17289 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
17290 for (;;) { | |
17291 if (likely(!__pyx_t_9)) { | |
17292 if (likely(PyList_CheckExact(__pyx_t_5))) { | |
17293 { | |
17294 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); | |
17295 #if !CYTHON_ASSUME_SAFE_MACROS | |
17296 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 582, __pyx_L1_error) | |
17297 #endif | |
17298 if (__pyx_t_8 >= __pyx_temp) break; | |
17299 } | |
17300 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
17301 __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 582, __pyx_L1_error) | |
17302 #else | |
17303 __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) | |
17304 __Pyx_GOTREF(__pyx_t_1); | |
17305 #endif | |
17306 } else { | |
17307 { | |
17308 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); | |
17309 #if !CYTHON_ASSUME_SAFE_MACROS | |
17310 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 582, __pyx_L1_error) | |
17311 #endif | |
17312 if (__pyx_t_8 >= __pyx_temp) break; | |
17313 } | |
17314 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
17315 __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 582, __pyx_L1_error) | |
17316 #else | |
17317 __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) | |
17318 __Pyx_GOTREF(__pyx_t_1); | |
17319 #endif | |
17320 } | |
17321 } else { | |
17322 __pyx_t_1 = __pyx_t_9(__pyx_t_5); | |
17323 if (unlikely(!__pyx_t_1)) { | |
17324 PyObject* exc_type = PyErr_Occurred(); | |
17325 if (exc_type) { | |
17326 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); | |
17327 else __PYX_ERR(0, 582, __pyx_L1_error) | |
17328 } | |
17329 break; | |
17330 } | |
17331 __Pyx_GOTREF(__pyx_t_1); | |
17332 } | |
17333 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_7genexpr__pyx_v_x); | |
17334 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_7genexpr__pyx_v_x, __pyx_t_1); | |
17335 __Pyx_GIVEREF(__pyx_t_1); | |
17336 __pyx_t_1 = 0; | |
17337 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_7genexpr__pyx_v_x, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error) | |
17338 __Pyx_GOTREF(__pyx_t_4); | |
17339 __pyx_t_6 = NULL; | |
17340 __pyx_t_7 = 0; | |
17341 #if CYTHON_UNPACK_METHODS | |
17342 if (likely(PyMethod_Check(__pyx_t_4))) { | |
17343 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); | |
17344 if (likely(__pyx_t_6)) { | |
17345 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); | |
17346 __Pyx_INCREF(__pyx_t_6); | |
17347 __Pyx_INCREF(function); | |
17348 __Pyx_DECREF_SET(__pyx_t_4, function); | |
17349 __pyx_t_7 = 1; | |
17350 } | |
17351 } | |
17352 #endif | |
17353 { | |
17354 PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; | |
17355 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); | |
17356 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
17357 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) | |
17358 __Pyx_GOTREF(__pyx_t_1); | |
17359 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
17360 } | |
17361 if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 582, __pyx_L1_error) | |
17362 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
17363 } | |
17364 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
17365 } /* exit inner scope */ | |
17366 __Pyx_GIVEREF(__pyx_t_2); | |
17367 __pyx_cur_scope->__pyx_v_fields = ((PyObject*)__pyx_t_2); | |
17368 __pyx_t_2 = 0; | |
17369 | |
17370 /* "pysam/libctabixproxies.pyx":583 | |
17371 * # Remove white space to prevent a last empty field. | |
17372 * fields = [x.strip() for x in attributes.strip().split("; ")] | |
17373 * for f in fields: # <<<<<<<<<<<<<< | |
17374 * | |
17375 * # strip semicolon (GTF files without a space after the last semicolon) | |
17376 */ | |
17377 __pyx_t_2 = __pyx_cur_scope->__pyx_v_fields; __Pyx_INCREF(__pyx_t_2); | |
17378 __pyx_t_8 = 0; | |
17379 for (;;) { | |
17380 { | |
17381 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); | |
17382 #if !CYTHON_ASSUME_SAFE_MACROS | |
17383 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 583, __pyx_L1_error) | |
17384 #endif | |
17385 if (__pyx_t_8 >= __pyx_temp) break; | |
17386 } | |
17387 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
17388 __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 583, __pyx_L1_error) | |
17389 #else | |
17390 __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 583, __pyx_L1_error) | |
17391 __Pyx_GOTREF(__pyx_t_5); | |
17392 #endif | |
17393 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f); | |
17394 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_5); | |
17395 __Pyx_GIVEREF(__pyx_t_5); | |
17396 __pyx_t_5 = 0; | |
17397 | |
17398 /* "pysam/libctabixproxies.pyx":586 | |
17399 * | |
17400 * # strip semicolon (GTF files without a space after the last semicolon) | |
17401 * if f.endswith(";"): # <<<<<<<<<<<<<< | |
17402 * f = f[:-1] | |
17403 * | |
17404 */ | |
17405 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_f, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) | |
17406 __Pyx_GOTREF(__pyx_t_1); | |
17407 __pyx_t_4 = NULL; | |
17408 __pyx_t_7 = 0; | |
17409 #if CYTHON_UNPACK_METHODS | |
17410 if (likely(PyMethod_Check(__pyx_t_1))) { | |
17411 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); | |
17412 if (likely(__pyx_t_4)) { | |
17413 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); | |
17414 __Pyx_INCREF(__pyx_t_4); | |
17415 __Pyx_INCREF(function); | |
17416 __Pyx_DECREF_SET(__pyx_t_1, function); | |
17417 __pyx_t_7 = 1; | |
17418 } | |
17419 } | |
17420 #endif | |
17421 { | |
17422 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u__17}; | |
17423 __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); | |
17424 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
17425 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error) | |
17426 __Pyx_GOTREF(__pyx_t_5); | |
17427 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
17428 } | |
17429 __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 586, __pyx_L1_error) | |
17430 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
17431 if (__pyx_t_10) { | |
17432 | |
17433 /* "pysam/libctabixproxies.pyx":587 | |
17434 * # strip semicolon (GTF files without a space after the last semicolon) | |
17435 * if f.endswith(";"): | |
17436 * f = f[:-1] # <<<<<<<<<<<<<< | |
17437 * | |
17438 * # split at most once in order to avoid separating | |
17439 */ | |
17440 __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f, 0, -1L, NULL, NULL, &__pyx_slice__20, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 587, __pyx_L1_error) | |
17441 __Pyx_GOTREF(__pyx_t_5); | |
17442 __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_f); | |
17443 __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_5); | |
17444 __Pyx_GIVEREF(__pyx_t_5); | |
17445 __pyx_t_5 = 0; | |
17446 | |
17447 /* "pysam/libctabixproxies.pyx":586 | |
17448 * | |
17449 * # strip semicolon (GTF files without a space after the last semicolon) | |
17450 * if f.endswith(";"): # <<<<<<<<<<<<<< | |
17451 * f = f[:-1] | |
17452 * | |
17453 */ | |
17454 } | |
17455 | |
17456 /* "pysam/libctabixproxies.pyx":591 | |
17457 * # split at most once in order to avoid separating | |
17458 * # multi-word values | |
17459 * d = [x.strip() for x in f.split(" ", 1)] # <<<<<<<<<<<<<< | |
17460 * | |
17461 * n, v = d[0], d[1] | |
17462 */ | |
17463 { /* enter inner scope */ | |
17464 __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 591, __pyx_L1_error) | |
17465 __Pyx_GOTREF(__pyx_t_5); | |
17466 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_f, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) | |
17467 __Pyx_GOTREF(__pyx_t_1); | |
17468 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error) | |
17469 __Pyx_GOTREF(__pyx_t_4); | |
17470 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
17471 if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { | |
17472 __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); | |
17473 __pyx_t_11 = 0; | |
17474 __pyx_t_9 = NULL; | |
17475 } else { | |
17476 __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) | |
17477 __Pyx_GOTREF(__pyx_t_1); | |
17478 __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 591, __pyx_L1_error) | |
17479 } | |
17480 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
17481 for (;;) { | |
17482 if (likely(!__pyx_t_9)) { | |
17483 if (likely(PyList_CheckExact(__pyx_t_1))) { | |
17484 { | |
17485 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); | |
17486 #if !CYTHON_ASSUME_SAFE_MACROS | |
17487 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 591, __pyx_L1_error) | |
17488 #endif | |
17489 if (__pyx_t_11 >= __pyx_temp) break; | |
17490 } | |
17491 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
17492 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 591, __pyx_L1_error) | |
17493 #else | |
17494 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error) | |
17495 __Pyx_GOTREF(__pyx_t_4); | |
17496 #endif | |
17497 } else { | |
17498 { | |
17499 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); | |
17500 #if !CYTHON_ASSUME_SAFE_MACROS | |
17501 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 591, __pyx_L1_error) | |
17502 #endif | |
17503 if (__pyx_t_11 >= __pyx_temp) break; | |
17504 } | |
17505 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
17506 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 591, __pyx_L1_error) | |
17507 #else | |
17508 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error) | |
17509 __Pyx_GOTREF(__pyx_t_4); | |
17510 #endif | |
17511 } | |
17512 } else { | |
17513 __pyx_t_4 = __pyx_t_9(__pyx_t_1); | |
17514 if (unlikely(!__pyx_t_4)) { | |
17515 PyObject* exc_type = PyErr_Occurred(); | |
17516 if (exc_type) { | |
17517 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); | |
17518 else __PYX_ERR(0, 591, __pyx_L1_error) | |
17519 } | |
17520 break; | |
17521 } | |
17522 __Pyx_GOTREF(__pyx_t_4); | |
17523 } | |
17524 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_8genexpr1__pyx_v_x); | |
17525 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_8genexpr1__pyx_v_x, __pyx_t_4); | |
17526 __Pyx_GIVEREF(__pyx_t_4); | |
17527 __pyx_t_4 = 0; | |
17528 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_8genexpr1__pyx_v_x, __pyx_n_s_strip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 591, __pyx_L1_error) | |
17529 __Pyx_GOTREF(__pyx_t_6); | |
17530 __pyx_t_12 = NULL; | |
17531 __pyx_t_7 = 0; | |
17532 #if CYTHON_UNPACK_METHODS | |
17533 if (likely(PyMethod_Check(__pyx_t_6))) { | |
17534 __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6); | |
17535 if (likely(__pyx_t_12)) { | |
17536 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); | |
17537 __Pyx_INCREF(__pyx_t_12); | |
17538 __Pyx_INCREF(function); | |
17539 __Pyx_DECREF_SET(__pyx_t_6, function); | |
17540 __pyx_t_7 = 1; | |
17541 } | |
17542 } | |
17543 #endif | |
17544 { | |
17545 PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; | |
17546 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); | |
17547 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; | |
17548 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error) | |
17549 __Pyx_GOTREF(__pyx_t_4); | |
17550 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
17551 } | |
17552 if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 591, __pyx_L1_error) | |
17553 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
17554 } | |
17555 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
17556 } /* exit inner scope */ | |
17557 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_d); | |
17558 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_d, ((PyObject*)__pyx_t_5)); | |
17559 __Pyx_GIVEREF(__pyx_t_5); | |
17560 __pyx_t_5 = 0; | |
17561 | |
17562 /* "pysam/libctabixproxies.pyx":593 | |
17563 * d = [x.strip() for x in f.split(" ", 1)] | |
17564 * | |
17565 * n, v = d[0], d[1] # <<<<<<<<<<<<<< | |
17566 * if len(d) > 2: | |
17567 * v = d[1:] | |
17568 */ | |
17569 __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_d, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 593, __pyx_L1_error) | |
17570 __Pyx_GOTREF(__pyx_t_5); | |
17571 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_d, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) | |
17572 __Pyx_GOTREF(__pyx_t_1); | |
17573 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_n); | |
17574 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_n, __pyx_t_5); | |
17575 __Pyx_GIVEREF(__pyx_t_5); | |
17576 __pyx_t_5 = 0; | |
17577 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v); | |
17578 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_1); | |
17579 __Pyx_GIVEREF(__pyx_t_1); | |
17580 __pyx_t_1 = 0; | |
17581 | |
17582 /* "pysam/libctabixproxies.pyx":594 | |
17583 * | |
17584 * n, v = d[0], d[1] | |
17585 * if len(d) > 2: # <<<<<<<<<<<<<< | |
17586 * v = d[1:] | |
17587 * | |
17588 */ | |
17589 __pyx_t_11 = __Pyx_PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_d); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 594, __pyx_L1_error) | |
17590 __pyx_t_10 = (__pyx_t_11 > 2); | |
17591 if (__pyx_t_10) { | |
17592 | |
17593 /* "pysam/libctabixproxies.pyx":595 | |
17594 * n, v = d[0], d[1] | |
17595 * if len(d) > 2: | |
17596 * v = d[1:] # <<<<<<<<<<<<<< | |
17597 * | |
17598 * if v[0] == '"' and v[-1] == '"': | |
17599 */ | |
17600 __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_cur_scope->__pyx_v_d, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error) | |
17601 __Pyx_GOTREF(__pyx_t_1); | |
17602 __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_v); | |
17603 __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_1); | |
17604 __Pyx_GIVEREF(__pyx_t_1); | |
17605 __pyx_t_1 = 0; | |
17606 | |
17607 /* "pysam/libctabixproxies.pyx":594 | |
17608 * | |
17609 * n, v = d[0], d[1] | |
17610 * if len(d) > 2: # <<<<<<<<<<<<<< | |
17611 * v = d[1:] | |
17612 * | |
17613 */ | |
17614 } | |
17615 | |
17616 /* "pysam/libctabixproxies.pyx":597 | |
17617 * v = d[1:] | |
17618 * | |
17619 * if v[0] == '"' and v[-1] == '"': # <<<<<<<<<<<<<< | |
17620 * v = v[1:-1] | |
17621 * else: | |
17622 */ | |
17623 __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) | |
17624 __Pyx_GOTREF(__pyx_t_1); | |
17625 __pyx_t_13 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__23, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 597, __pyx_L1_error) | |
17626 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
17627 if (__pyx_t_13) { | |
17628 } else { | |
17629 __pyx_t_10 = __pyx_t_13; | |
17630 goto __pyx_L15_bool_binop_done; | |
17631 } | |
17632 __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_v, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) | |
17633 __Pyx_GOTREF(__pyx_t_1); | |
17634 __pyx_t_13 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__23, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 597, __pyx_L1_error) | |
17635 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
17636 __pyx_t_10 = __pyx_t_13; | |
17637 __pyx_L15_bool_binop_done:; | |
17638 if (__pyx_t_10) { | |
17639 | |
17640 /* "pysam/libctabixproxies.pyx":598 | |
17641 * | |
17642 * if v[0] == '"' and v[-1] == '"': | |
17643 * v = v[1:-1] # <<<<<<<<<<<<<< | |
17644 * else: | |
17645 * ## try to convert to a value | |
17646 */ | |
17647 __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_v, 1, -1L, NULL, NULL, &__pyx_slice__24, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) | |
17648 __Pyx_GOTREF(__pyx_t_1); | |
17649 __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_v); | |
17650 __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_1); | |
17651 __Pyx_GIVEREF(__pyx_t_1); | |
17652 __pyx_t_1 = 0; | |
17653 | |
17654 /* "pysam/libctabixproxies.pyx":597 | |
17655 * v = d[1:] | |
17656 * | |
17657 * if v[0] == '"' and v[-1] == '"': # <<<<<<<<<<<<<< | |
17658 * v = v[1:-1] | |
17659 * else: | |
17660 */ | |
17661 goto __pyx_L14; | |
17662 } | |
17663 | |
17664 /* "pysam/libctabixproxies.pyx":601 | |
17665 * else: | |
17666 * ## try to convert to a value | |
17667 * try: # <<<<<<<<<<<<<< | |
17668 * v = float(v) | |
17669 * v = int(v) | |
17670 */ | |
17671 /*else*/ { | |
17672 { | |
17673 __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); | |
17674 __Pyx_XGOTREF(__pyx_t_14); | |
17675 __Pyx_XGOTREF(__pyx_t_15); | |
17676 __Pyx_XGOTREF(__pyx_t_16); | |
17677 /*try:*/ { | |
17678 | |
17679 /* "pysam/libctabixproxies.pyx":602 | |
17680 * ## try to convert to a value | |
17681 * try: | |
17682 * v = float(v) # <<<<<<<<<<<<<< | |
17683 * v = int(v) | |
17684 * except ValueError: | |
17685 */ | |
17686 __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L17_error) | |
17687 __Pyx_GOTREF(__pyx_t_1); | |
17688 __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_v); | |
17689 __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_1); | |
17690 __Pyx_GIVEREF(__pyx_t_1); | |
17691 __pyx_t_1 = 0; | |
17692 | |
17693 /* "pysam/libctabixproxies.pyx":603 | |
17694 * try: | |
17695 * v = float(v) | |
17696 * v = int(v) # <<<<<<<<<<<<<< | |
17697 * except ValueError: | |
17698 * pass | |
17699 */ | |
17700 __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L17_error) | |
17701 __Pyx_GOTREF(__pyx_t_1); | |
17702 __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_v); | |
17703 __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_1); | |
17704 __Pyx_GIVEREF(__pyx_t_1); | |
17705 __pyx_t_1 = 0; | |
17706 | |
17707 /* "pysam/libctabixproxies.pyx":601 | |
17708 * else: | |
17709 * ## try to convert to a value | |
17710 * try: # <<<<<<<<<<<<<< | |
17711 * v = float(v) | |
17712 * v = int(v) | |
17713 */ | |
17714 } | |
17715 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; | |
17716 __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; | |
17717 __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; | |
17718 goto __pyx_L24_try_end; | |
17719 __pyx_L17_error:; | |
17720 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; | |
17721 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; | |
17722 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
17723 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; | |
17724 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
17725 | |
17726 /* "pysam/libctabixproxies.pyx":604 | |
17727 * v = float(v) | |
17728 * v = int(v) | |
17729 * except ValueError: # <<<<<<<<<<<<<< | |
17730 * pass | |
17731 * except TypeError: | |
17732 */ | |
17733 __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); | |
17734 if (__pyx_t_17) { | |
17735 __Pyx_ErrRestore(0,0,0); | |
17736 goto __pyx_L18_exception_handled; | |
17737 } | |
17738 | |
17739 /* "pysam/libctabixproxies.pyx":606 | |
17740 * except ValueError: | |
17741 * pass | |
17742 * except TypeError: # <<<<<<<<<<<<<< | |
17743 * pass | |
17744 * | |
17745 */ | |
17746 __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); | |
17747 if (__pyx_t_17) { | |
17748 __Pyx_ErrRestore(0,0,0); | |
17749 goto __pyx_L18_exception_handled; | |
17750 } | |
17751 goto __pyx_L19_except_error; | |
17752 | |
17753 /* "pysam/libctabixproxies.pyx":601 | |
17754 * else: | |
17755 * ## try to convert to a value | |
17756 * try: # <<<<<<<<<<<<<< | |
17757 * v = float(v) | |
17758 * v = int(v) | |
17759 */ | |
17760 __pyx_L19_except_error:; | |
17761 __Pyx_XGIVEREF(__pyx_t_14); | |
17762 __Pyx_XGIVEREF(__pyx_t_15); | |
17763 __Pyx_XGIVEREF(__pyx_t_16); | |
17764 __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); | |
17765 goto __pyx_L1_error; | |
17766 __pyx_L18_exception_handled:; | |
17767 __Pyx_XGIVEREF(__pyx_t_14); | |
17768 __Pyx_XGIVEREF(__pyx_t_15); | |
17769 __Pyx_XGIVEREF(__pyx_t_16); | |
17770 __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); | |
17771 __pyx_L24_try_end:; | |
17772 } | |
17773 } | |
17774 __pyx_L14:; | |
17775 | |
17776 /* "pysam/libctabixproxies.pyx":609 | |
17777 * pass | |
17778 * | |
17779 * yield n, v # <<<<<<<<<<<<<< | |
17780 * | |
17781 * def __getattr__(self, key): | |
17782 */ | |
17783 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) | |
17784 __Pyx_GOTREF(__pyx_t_1); | |
17785 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_n); | |
17786 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_n); | |
17787 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_n)) __PYX_ERR(0, 609, __pyx_L1_error); | |
17788 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v); | |
17789 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_v); | |
17790 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_v)) __PYX_ERR(0, 609, __pyx_L1_error); | |
17791 __pyx_r = __pyx_t_1; | |
17792 __pyx_t_1 = 0; | |
17793 __Pyx_XGIVEREF(__pyx_t_2); | |
17794 __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; | |
17795 __pyx_cur_scope->__pyx_t_1 = __pyx_t_8; | |
17796 __Pyx_XGIVEREF(__pyx_r); | |
17797 __Pyx_RefNannyFinishContext(); | |
17798 __Pyx_Coroutine_ResetAndClearException(__pyx_generator); | |
17799 /* return from generator, yielding value */ | |
17800 __pyx_generator->resume_label = 1; | |
17801 return __pyx_r; | |
17802 __pyx_L25_resume_from_yield:; | |
17803 __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; | |
17804 __pyx_cur_scope->__pyx_t_0 = 0; | |
17805 __Pyx_XGOTREF(__pyx_t_2); | |
17806 __pyx_t_8 = __pyx_cur_scope->__pyx_t_1; | |
17807 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 609, __pyx_L1_error) | |
17808 | |
17809 /* "pysam/libctabixproxies.pyx":583 | |
17810 * # Remove white space to prevent a last empty field. | |
17811 * fields = [x.strip() for x in attributes.strip().split("; ")] | |
17812 * for f in fields: # <<<<<<<<<<<<<< | |
17813 * | |
17814 * # strip semicolon (GTF files without a space after the last semicolon) | |
17815 */ | |
17816 } | |
17817 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
17818 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); | |
17819 | |
17820 /* "pysam/libctabixproxies.pyx":566 | |
17821 * return self.separator.join(aa) + ";" | |
17822 * | |
17823 * def attribute_string2iterator(self, s): # <<<<<<<<<<<<<< | |
17824 * """convert attribute string in GTF format to records | |
17825 * and iterate over key, value pairs. | |
17826 */ | |
17827 | |
17828 /* function exit code */ | |
17829 PyErr_SetNone(PyExc_StopIteration); | |
17830 goto __pyx_L0; | |
17831 __pyx_L1_error:; | |
17832 __Pyx_Generator_Replace_StopIteration(0); | |
17833 __Pyx_XDECREF(__pyx_t_1); | |
17834 __Pyx_XDECREF(__pyx_t_2); | |
17835 __Pyx_XDECREF(__pyx_t_4); | |
17836 __Pyx_XDECREF(__pyx_t_5); | |
17837 __Pyx_XDECREF(__pyx_t_6); | |
17838 __Pyx_XDECREF(__pyx_t_12); | |
17839 __Pyx_AddTraceback("attribute_string2iterator", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
17840 __pyx_L0:; | |
17841 __Pyx_XDECREF(__pyx_r); __pyx_r = 0; | |
17842 #if !CYTHON_USE_EXC_INFO_STACK | |
17843 __Pyx_Coroutine_ResetAndClearException(__pyx_generator); | |
17844 #endif | |
17845 __pyx_generator->resume_label = -1; | |
17846 __Pyx_Coroutine_clear((PyObject*)__pyx_generator); | |
17847 __Pyx_RefNannyFinishContext(); | |
17848 return __pyx_r; | |
17849 } | |
17850 | |
17851 /* "pysam/libctabixproxies.pyx":611 | |
17852 * yield n, v | |
17853 * | |
17854 * def __getattr__(self, key): # <<<<<<<<<<<<<< | |
17855 * """Generic lookup of attribute from GFF/GTF attributes | |
17856 * """ | |
17857 */ | |
17858 | |
17859 /* Python wrapper */ | |
17860 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_34__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ | |
17861 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_33__getattr__, "Generic lookup of attribute from GFF/GTF attributes \n "); | |
17862 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
17863 struct wrapperbase __pyx_wrapperbase_5pysam_16libctabixproxies_8GTFProxy_33__getattr__; | |
17864 #endif | |
17865 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_34__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { | |
17866 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
17867 PyObject *__pyx_r = 0; | |
17868 __Pyx_RefNannyDeclarations | |
17869 __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); | |
17870 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
17871 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_33__getattr__(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key)); | |
17872 | |
17873 /* function exit code */ | |
17874 __Pyx_RefNannyFinishContext(); | |
17875 return __pyx_r; | |
17876 } | |
17877 | |
17878 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_33__getattr__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_key) { | |
17879 int __pyx_v_idx; | |
17880 PyObject *__pyx_v_f = NULL; | |
17881 PyObject *__pyx_v_s = NULL; | |
17882 PyObject *__pyx_r = NULL; | |
17883 __Pyx_RefNannyDeclarations | |
17884 PyObject *__pyx_t_1 = NULL; | |
17885 PyObject *__pyx_t_2 = NULL; | |
17886 PyObject *__pyx_t_3 = NULL; | |
17887 unsigned int __pyx_t_4; | |
17888 PyObject *__pyx_t_5 = NULL; | |
17889 PyObject *(*__pyx_t_6)(PyObject *); | |
17890 int __pyx_t_7; | |
17891 int __pyx_t_8; | |
17892 int __pyx_t_9; | |
17893 struct __pyx_opt_args_5pysam_9libcutils_force_str __pyx_t_10; | |
17894 int __pyx_lineno = 0; | |
17895 const char *__pyx_filename = NULL; | |
17896 int __pyx_clineno = 0; | |
17897 __Pyx_RefNannySetupContext("__getattr__", 1); | |
17898 | |
17899 /* "pysam/libctabixproxies.pyx":617 | |
17900 * # Only called if there *isn't* an attribute with this name | |
17901 * cdef int idx | |
17902 * idx, f = self.map_key2field.get(key, (-1, None)) # <<<<<<<<<<<<<< | |
17903 * if idx >= 0: | |
17904 * # deal with known attributes (fields 0-8) | |
17905 */ | |
17906 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map_key2field); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error) | |
17907 __Pyx_GOTREF(__pyx_t_2); | |
17908 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error) | |
17909 __Pyx_GOTREF(__pyx_t_3); | |
17910 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
17911 __pyx_t_2 = NULL; | |
17912 __pyx_t_4 = 0; | |
17913 #if CYTHON_UNPACK_METHODS | |
17914 if (likely(PyMethod_Check(__pyx_t_3))) { | |
17915 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); | |
17916 if (likely(__pyx_t_2)) { | |
17917 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
17918 __Pyx_INCREF(__pyx_t_2); | |
17919 __Pyx_INCREF(function); | |
17920 __Pyx_DECREF_SET(__pyx_t_3, function); | |
17921 __pyx_t_4 = 1; | |
17922 } | |
17923 } | |
17924 #endif | |
17925 { | |
17926 PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_key, __pyx_tuple__25}; | |
17927 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); | |
17928 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; | |
17929 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) | |
17930 __Pyx_GOTREF(__pyx_t_1); | |
17931 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
17932 } | |
17933 if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { | |
17934 PyObject* sequence = __pyx_t_1; | |
17935 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); | |
17936 if (unlikely(size != 2)) { | |
17937 if (size > 2) __Pyx_RaiseTooManyValuesError(2); | |
17938 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); | |
17939 __PYX_ERR(0, 617, __pyx_L1_error) | |
17940 } | |
17941 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
17942 if (likely(PyTuple_CheckExact(sequence))) { | |
17943 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); | |
17944 __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); | |
17945 } else { | |
17946 __pyx_t_3 = PyList_GET_ITEM(sequence, 0); | |
17947 __pyx_t_2 = PyList_GET_ITEM(sequence, 1); | |
17948 } | |
17949 __Pyx_INCREF(__pyx_t_3); | |
17950 __Pyx_INCREF(__pyx_t_2); | |
17951 #else | |
17952 __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error) | |
17953 __Pyx_GOTREF(__pyx_t_3); | |
17954 __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error) | |
17955 __Pyx_GOTREF(__pyx_t_2); | |
17956 #endif | |
17957 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
17958 } else { | |
17959 Py_ssize_t index = -1; | |
17960 __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 617, __pyx_L1_error) | |
17961 __Pyx_GOTREF(__pyx_t_5); | |
17962 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
17963 __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); | |
17964 index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; | |
17965 __Pyx_GOTREF(__pyx_t_3); | |
17966 index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; | |
17967 __Pyx_GOTREF(__pyx_t_2); | |
17968 if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 617, __pyx_L1_error) | |
17969 __pyx_t_6 = NULL; | |
17970 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
17971 goto __pyx_L4_unpacking_done; | |
17972 __pyx_L3_unpacking_failed:; | |
17973 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
17974 __pyx_t_6 = NULL; | |
17975 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); | |
17976 __PYX_ERR(0, 617, __pyx_L1_error) | |
17977 __pyx_L4_unpacking_done:; | |
17978 } | |
17979 __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error) | |
17980 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
17981 __pyx_v_idx = __pyx_t_7; | |
17982 __pyx_v_f = __pyx_t_2; | |
17983 __pyx_t_2 = 0; | |
17984 | |
17985 /* "pysam/libctabixproxies.pyx":618 | |
17986 * cdef int idx | |
17987 * idx, f = self.map_key2field.get(key, (-1, None)) | |
17988 * if idx >= 0: # <<<<<<<<<<<<<< | |
17989 * # deal with known attributes (fields 0-8) | |
17990 * if idx == 8: | |
17991 */ | |
17992 __pyx_t_8 = (__pyx_v_idx >= 0); | |
17993 if (__pyx_t_8) { | |
17994 | |
17995 /* "pysam/libctabixproxies.pyx":620 | |
17996 * if idx >= 0: | |
17997 * # deal with known attributes (fields 0-8) | |
17998 * if idx == 8: # <<<<<<<<<<<<<< | |
17999 * # flush attributes if requested | |
18000 * if self.is_modified and self.attribute_dict is not None: | |
18001 */ | |
18002 __pyx_t_8 = (__pyx_v_idx == 8); | |
18003 if (__pyx_t_8) { | |
18004 | |
18005 /* "pysam/libctabixproxies.pyx":622 | |
18006 * if idx == 8: | |
18007 * # flush attributes if requested | |
18008 * if self.is_modified and self.attribute_dict is not None: # <<<<<<<<<<<<<< | |
18009 * s = self.dict2attribute_string(self.attribute_dict) | |
18010 * TupleProxy._setindex(self, idx, s) | |
18011 */ | |
18012 if (__pyx_v_self->__pyx_base.__pyx_base.is_modified) { | |
18013 } else { | |
18014 __pyx_t_8 = __pyx_v_self->__pyx_base.__pyx_base.is_modified; | |
18015 goto __pyx_L8_bool_binop_done; | |
18016 } | |
18017 __pyx_t_9 = (__pyx_v_self->attribute_dict != Py_None); | |
18018 __pyx_t_8 = __pyx_t_9; | |
18019 __pyx_L8_bool_binop_done:; | |
18020 if (__pyx_t_8) { | |
18021 | |
18022 /* "pysam/libctabixproxies.pyx":623 | |
18023 * # flush attributes if requested | |
18024 * if self.is_modified and self.attribute_dict is not None: | |
18025 * s = self.dict2attribute_string(self.attribute_dict) # <<<<<<<<<<<<<< | |
18026 * TupleProxy._setindex(self, idx, s) | |
18027 * self.attribute_dict = None | |
18028 */ | |
18029 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict2attribute_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error) | |
18030 __Pyx_GOTREF(__pyx_t_2); | |
18031 __pyx_t_3 = NULL; | |
18032 __pyx_t_4 = 0; | |
18033 #if CYTHON_UNPACK_METHODS | |
18034 if (likely(PyMethod_Check(__pyx_t_2))) { | |
18035 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); | |
18036 if (likely(__pyx_t_3)) { | |
18037 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
18038 __Pyx_INCREF(__pyx_t_3); | |
18039 __Pyx_INCREF(function); | |
18040 __Pyx_DECREF_SET(__pyx_t_2, function); | |
18041 __pyx_t_4 = 1; | |
18042 } | |
18043 } | |
18044 #endif | |
18045 { | |
18046 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_self->attribute_dict}; | |
18047 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); | |
18048 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; | |
18049 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) | |
18050 __Pyx_GOTREF(__pyx_t_1); | |
18051 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18052 } | |
18053 __pyx_v_s = __pyx_t_1; | |
18054 __pyx_t_1 = 0; | |
18055 | |
18056 /* "pysam/libctabixproxies.pyx":624 | |
18057 * if self.is_modified and self.attribute_dict is not None: | |
18058 * s = self.dict2attribute_string(self.attribute_dict) | |
18059 * TupleProxy._setindex(self, idx, s) # <<<<<<<<<<<<<< | |
18060 * self.attribute_dict = None | |
18061 * return s | |
18062 */ | |
18063 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy), __pyx_n_s_setindex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error) | |
18064 __Pyx_GOTREF(__pyx_t_2); | |
18065 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error) | |
18066 __Pyx_GOTREF(__pyx_t_3); | |
18067 __pyx_t_5 = NULL; | |
18068 __pyx_t_4 = 0; | |
18069 #if CYTHON_UNPACK_METHODS | |
18070 if (likely(PyMethod_Check(__pyx_t_2))) { | |
18071 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); | |
18072 if (likely(__pyx_t_5)) { | |
18073 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
18074 __Pyx_INCREF(__pyx_t_5); | |
18075 __Pyx_INCREF(function); | |
18076 __Pyx_DECREF_SET(__pyx_t_2, function); | |
18077 __pyx_t_4 = 1; | |
18078 } | |
18079 } | |
18080 #endif | |
18081 { | |
18082 PyObject *__pyx_callargs[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_v_s}; | |
18083 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); | |
18084 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; | |
18085 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
18086 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) | |
18087 __Pyx_GOTREF(__pyx_t_1); | |
18088 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18089 } | |
18090 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18091 | |
18092 /* "pysam/libctabixproxies.pyx":625 | |
18093 * s = self.dict2attribute_string(self.attribute_dict) | |
18094 * TupleProxy._setindex(self, idx, s) | |
18095 * self.attribute_dict = None # <<<<<<<<<<<<<< | |
18096 * return s | |
18097 * | |
18098 */ | |
18099 __Pyx_INCREF(Py_None); | |
18100 __Pyx_GIVEREF(Py_None); | |
18101 __Pyx_GOTREF(__pyx_v_self->attribute_dict); | |
18102 __Pyx_DECREF(__pyx_v_self->attribute_dict); | |
18103 __pyx_v_self->attribute_dict = Py_None; | |
18104 | |
18105 /* "pysam/libctabixproxies.pyx":626 | |
18106 * TupleProxy._setindex(self, idx, s) | |
18107 * self.attribute_dict = None | |
18108 * return s # <<<<<<<<<<<<<< | |
18109 * | |
18110 * if f[0] == str: | |
18111 */ | |
18112 __Pyx_XDECREF(__pyx_r); | |
18113 __Pyx_INCREF(__pyx_v_s); | |
18114 __pyx_r = __pyx_v_s; | |
18115 goto __pyx_L0; | |
18116 | |
18117 /* "pysam/libctabixproxies.pyx":622 | |
18118 * if idx == 8: | |
18119 * # flush attributes if requested | |
18120 * if self.is_modified and self.attribute_dict is not None: # <<<<<<<<<<<<<< | |
18121 * s = self.dict2attribute_string(self.attribute_dict) | |
18122 * TupleProxy._setindex(self, idx, s) | |
18123 */ | |
18124 } | |
18125 | |
18126 /* "pysam/libctabixproxies.pyx":620 | |
18127 * if idx >= 0: | |
18128 * # deal with known attributes (fields 0-8) | |
18129 * if idx == 8: # <<<<<<<<<<<<<< | |
18130 * # flush attributes if requested | |
18131 * if self.is_modified and self.attribute_dict is not None: | |
18132 */ | |
18133 } | |
18134 | |
18135 /* "pysam/libctabixproxies.pyx":628 | |
18136 * return s | |
18137 * | |
18138 * if f[0] == str: # <<<<<<<<<<<<<< | |
18139 * return force_str(self.fields[idx], | |
18140 * self.encoding) | |
18141 */ | |
18142 __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_f, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) | |
18143 __Pyx_GOTREF(__pyx_t_1); | |
18144 __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) | |
18145 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18146 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 628, __pyx_L1_error) | |
18147 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18148 if (__pyx_t_8) { | |
18149 | |
18150 /* "pysam/libctabixproxies.pyx":629 | |
18151 * | |
18152 * if f[0] == str: | |
18153 * return force_str(self.fields[idx], # <<<<<<<<<<<<<< | |
18154 * self.encoding) | |
18155 * else: | |
18156 */ | |
18157 __Pyx_XDECREF(__pyx_r); | |
18158 __pyx_t_2 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.__pyx_base.fields[__pyx_v_idx])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) | |
18159 __Pyx_GOTREF(__pyx_t_2); | |
18160 | |
18161 /* "pysam/libctabixproxies.pyx":630 | |
18162 * if f[0] == str: | |
18163 * return force_str(self.fields[idx], | |
18164 * self.encoding) # <<<<<<<<<<<<<< | |
18165 * else: | |
18166 * return f[0](self.fields[idx]) | |
18167 */ | |
18168 __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.encoding; | |
18169 __Pyx_INCREF(__pyx_t_1); | |
18170 | |
18171 /* "pysam/libctabixproxies.pyx":629 | |
18172 * | |
18173 * if f[0] == str: | |
18174 * return force_str(self.fields[idx], # <<<<<<<<<<<<<< | |
18175 * self.encoding) | |
18176 * else: | |
18177 */ | |
18178 __pyx_t_10.__pyx_n = 1; | |
18179 __pyx_t_10.encoding = __pyx_t_1; | |
18180 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_2, &__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error) | |
18181 __Pyx_GOTREF(__pyx_t_3); | |
18182 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18183 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18184 __pyx_r = __pyx_t_3; | |
18185 __pyx_t_3 = 0; | |
18186 goto __pyx_L0; | |
18187 | |
18188 /* "pysam/libctabixproxies.pyx":628 | |
18189 * return s | |
18190 * | |
18191 * if f[0] == str: # <<<<<<<<<<<<<< | |
18192 * return force_str(self.fields[idx], | |
18193 * self.encoding) | |
18194 */ | |
18195 } | |
18196 | |
18197 /* "pysam/libctabixproxies.pyx":632 | |
18198 * self.encoding) | |
18199 * else: | |
18200 * return f[0](self.fields[idx]) # <<<<<<<<<<<<<< | |
18201 * else: | |
18202 * # deal with generic attributes (gene_id, ...) | |
18203 */ | |
18204 /*else*/ { | |
18205 __Pyx_XDECREF(__pyx_r); | |
18206 __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_f, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) | |
18207 __Pyx_GOTREF(__pyx_t_1); | |
18208 __pyx_t_2 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.__pyx_base.fields[__pyx_v_idx])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) | |
18209 __Pyx_GOTREF(__pyx_t_2); | |
18210 __pyx_t_5 = NULL; | |
18211 __pyx_t_4 = 0; | |
18212 #if CYTHON_UNPACK_METHODS | |
18213 if (unlikely(PyMethod_Check(__pyx_t_1))) { | |
18214 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); | |
18215 if (likely(__pyx_t_5)) { | |
18216 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); | |
18217 __Pyx_INCREF(__pyx_t_5); | |
18218 __Pyx_INCREF(function); | |
18219 __Pyx_DECREF_SET(__pyx_t_1, function); | |
18220 __pyx_t_4 = 1; | |
18221 } | |
18222 } | |
18223 #endif | |
18224 { | |
18225 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2}; | |
18226 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); | |
18227 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; | |
18228 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18229 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error) | |
18230 __Pyx_GOTREF(__pyx_t_3); | |
18231 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18232 } | |
18233 __pyx_r = __pyx_t_3; | |
18234 __pyx_t_3 = 0; | |
18235 goto __pyx_L0; | |
18236 } | |
18237 | |
18238 /* "pysam/libctabixproxies.pyx":618 | |
18239 * cdef int idx | |
18240 * idx, f = self.map_key2field.get(key, (-1, None)) | |
18241 * if idx >= 0: # <<<<<<<<<<<<<< | |
18242 * # deal with known attributes (fields 0-8) | |
18243 * if idx == 8: | |
18244 */ | |
18245 } | |
18246 | |
18247 /* "pysam/libctabixproxies.pyx":635 | |
18248 * else: | |
18249 * # deal with generic attributes (gene_id, ...) | |
18250 * if self.attribute_dict is None: # <<<<<<<<<<<<<< | |
18251 * self.attribute_dict = self.attribute_string2dict( | |
18252 * self.attributes) | |
18253 */ | |
18254 /*else*/ { | |
18255 __pyx_t_8 = (__pyx_v_self->attribute_dict == Py_None); | |
18256 if (__pyx_t_8) { | |
18257 | |
18258 /* "pysam/libctabixproxies.pyx":636 | |
18259 * # deal with generic attributes (gene_id, ...) | |
18260 * if self.attribute_dict is None: | |
18261 * self.attribute_dict = self.attribute_string2dict( # <<<<<<<<<<<<<< | |
18262 * self.attributes) | |
18263 * return self.attribute_dict[key] | |
18264 */ | |
18265 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attribute_string2dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error) | |
18266 __Pyx_GOTREF(__pyx_t_1); | |
18267 | |
18268 /* "pysam/libctabixproxies.pyx":637 | |
18269 * if self.attribute_dict is None: | |
18270 * self.attribute_dict = self.attribute_string2dict( | |
18271 * self.attributes) # <<<<<<<<<<<<<< | |
18272 * return self.attribute_dict[key] | |
18273 * | |
18274 */ | |
18275 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) | |
18276 __Pyx_GOTREF(__pyx_t_2); | |
18277 __pyx_t_5 = NULL; | |
18278 __pyx_t_4 = 0; | |
18279 #if CYTHON_UNPACK_METHODS | |
18280 if (likely(PyMethod_Check(__pyx_t_1))) { | |
18281 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); | |
18282 if (likely(__pyx_t_5)) { | |
18283 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); | |
18284 __Pyx_INCREF(__pyx_t_5); | |
18285 __Pyx_INCREF(function); | |
18286 __Pyx_DECREF_SET(__pyx_t_1, function); | |
18287 __pyx_t_4 = 1; | |
18288 } | |
18289 } | |
18290 #endif | |
18291 { | |
18292 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2}; | |
18293 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); | |
18294 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; | |
18295 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18296 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 636, __pyx_L1_error) | |
18297 __Pyx_GOTREF(__pyx_t_3); | |
18298 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18299 } | |
18300 | |
18301 /* "pysam/libctabixproxies.pyx":636 | |
18302 * # deal with generic attributes (gene_id, ...) | |
18303 * if self.attribute_dict is None: | |
18304 * self.attribute_dict = self.attribute_string2dict( # <<<<<<<<<<<<<< | |
18305 * self.attributes) | |
18306 * return self.attribute_dict[key] | |
18307 */ | |
18308 __Pyx_GIVEREF(__pyx_t_3); | |
18309 __Pyx_GOTREF(__pyx_v_self->attribute_dict); | |
18310 __Pyx_DECREF(__pyx_v_self->attribute_dict); | |
18311 __pyx_v_self->attribute_dict = __pyx_t_3; | |
18312 __pyx_t_3 = 0; | |
18313 | |
18314 /* "pysam/libctabixproxies.pyx":635 | |
18315 * else: | |
18316 * # deal with generic attributes (gene_id, ...) | |
18317 * if self.attribute_dict is None: # <<<<<<<<<<<<<< | |
18318 * self.attribute_dict = self.attribute_string2dict( | |
18319 * self.attributes) | |
18320 */ | |
18321 } | |
18322 | |
18323 /* "pysam/libctabixproxies.pyx":638 | |
18324 * self.attribute_dict = self.attribute_string2dict( | |
18325 * self.attributes) | |
18326 * return self.attribute_dict[key] # <<<<<<<<<<<<<< | |
18327 * | |
18328 * def __setattr__(self, key, value): | |
18329 */ | |
18330 __Pyx_XDECREF(__pyx_r); | |
18331 __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->attribute_dict, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 638, __pyx_L1_error) | |
18332 __Pyx_GOTREF(__pyx_t_3); | |
18333 __pyx_r = __pyx_t_3; | |
18334 __pyx_t_3 = 0; | |
18335 goto __pyx_L0; | |
18336 } | |
18337 | |
18338 /* "pysam/libctabixproxies.pyx":611 | |
18339 * yield n, v | |
18340 * | |
18341 * def __getattr__(self, key): # <<<<<<<<<<<<<< | |
18342 * """Generic lookup of attribute from GFF/GTF attributes | |
18343 * """ | |
18344 */ | |
18345 | |
18346 /* function exit code */ | |
18347 __pyx_L1_error:; | |
18348 __Pyx_XDECREF(__pyx_t_1); | |
18349 __Pyx_XDECREF(__pyx_t_2); | |
18350 __Pyx_XDECREF(__pyx_t_3); | |
18351 __Pyx_XDECREF(__pyx_t_5); | |
18352 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
18353 __pyx_r = NULL; | |
18354 __pyx_L0:; | |
18355 __Pyx_XDECREF(__pyx_v_f); | |
18356 __Pyx_XDECREF(__pyx_v_s); | |
18357 __Pyx_XGIVEREF(__pyx_r); | |
18358 __Pyx_RefNannyFinishContext(); | |
18359 return __pyx_r; | |
18360 } | |
18361 | |
18362 /* "pysam/libctabixproxies.pyx":640 | |
18363 * return self.attribute_dict[key] | |
18364 * | |
18365 * def __setattr__(self, key, value): # <<<<<<<<<<<<<< | |
18366 * '''set attribute.''' | |
18367 * | |
18368 */ | |
18369 | |
18370 /* Python wrapper */ | |
18371 static int __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_36__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/ | |
18372 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8GTFProxy_35__setattr__, "set attribute."); | |
18373 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
18374 struct wrapperbase __pyx_wrapperbase_5pysam_16libctabixproxies_8GTFProxy_35__setattr__; | |
18375 #endif | |
18376 static int __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_36__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { | |
18377 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
18378 int __pyx_r; | |
18379 __Pyx_RefNannyDeclarations | |
18380 __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0); | |
18381 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
18382 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_35__setattr__(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value)); | |
18383 | |
18384 /* function exit code */ | |
18385 __Pyx_RefNannyFinishContext(); | |
18386 return __pyx_r; | |
18387 } | |
18388 | |
18389 static int __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_35__setattr__(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { | |
18390 int __pyx_v_idx; | |
18391 PyObject *__pyx_v_f = NULL; | |
18392 PyObject *__pyx_v_s = NULL; | |
18393 int __pyx_r; | |
18394 __Pyx_RefNannyDeclarations | |
18395 PyObject *__pyx_t_1 = NULL; | |
18396 PyObject *__pyx_t_2 = NULL; | |
18397 PyObject *__pyx_t_3 = NULL; | |
18398 unsigned int __pyx_t_4; | |
18399 PyObject *__pyx_t_5 = NULL; | |
18400 PyObject *(*__pyx_t_6)(PyObject *); | |
18401 int __pyx_t_7; | |
18402 int __pyx_t_8; | |
18403 struct __pyx_opt_args_5pysam_9libcutils_force_bytes __pyx_t_9; | |
18404 int __pyx_lineno = 0; | |
18405 const char *__pyx_filename = NULL; | |
18406 int __pyx_clineno = 0; | |
18407 __Pyx_RefNannySetupContext("__setattr__", 1); | |
18408 | |
18409 /* "pysam/libctabixproxies.pyx":647 | |
18410 * # called after any properties have been resolved. | |
18411 * cdef int idx | |
18412 * idx, f = self.map_key2field.get(key, (-1, None)) # <<<<<<<<<<<<<< | |
18413 * | |
18414 * if idx >= 0: | |
18415 */ | |
18416 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map_key2field); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error) | |
18417 __Pyx_GOTREF(__pyx_t_2); | |
18418 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 647, __pyx_L1_error) | |
18419 __Pyx_GOTREF(__pyx_t_3); | |
18420 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18421 __pyx_t_2 = NULL; | |
18422 __pyx_t_4 = 0; | |
18423 #if CYTHON_UNPACK_METHODS | |
18424 if (likely(PyMethod_Check(__pyx_t_3))) { | |
18425 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); | |
18426 if (likely(__pyx_t_2)) { | |
18427 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
18428 __Pyx_INCREF(__pyx_t_2); | |
18429 __Pyx_INCREF(function); | |
18430 __Pyx_DECREF_SET(__pyx_t_3, function); | |
18431 __pyx_t_4 = 1; | |
18432 } | |
18433 } | |
18434 #endif | |
18435 { | |
18436 PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_key, __pyx_tuple__25}; | |
18437 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); | |
18438 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18439 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error) | |
18440 __Pyx_GOTREF(__pyx_t_1); | |
18441 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
18442 } | |
18443 if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { | |
18444 PyObject* sequence = __pyx_t_1; | |
18445 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); | |
18446 if (unlikely(size != 2)) { | |
18447 if (size > 2) __Pyx_RaiseTooManyValuesError(2); | |
18448 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); | |
18449 __PYX_ERR(0, 647, __pyx_L1_error) | |
18450 } | |
18451 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
18452 if (likely(PyTuple_CheckExact(sequence))) { | |
18453 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); | |
18454 __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); | |
18455 } else { | |
18456 __pyx_t_3 = PyList_GET_ITEM(sequence, 0); | |
18457 __pyx_t_2 = PyList_GET_ITEM(sequence, 1); | |
18458 } | |
18459 __Pyx_INCREF(__pyx_t_3); | |
18460 __Pyx_INCREF(__pyx_t_2); | |
18461 #else | |
18462 __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 647, __pyx_L1_error) | |
18463 __Pyx_GOTREF(__pyx_t_3); | |
18464 __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error) | |
18465 __Pyx_GOTREF(__pyx_t_2); | |
18466 #endif | |
18467 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18468 } else { | |
18469 Py_ssize_t index = -1; | |
18470 __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 647, __pyx_L1_error) | |
18471 __Pyx_GOTREF(__pyx_t_5); | |
18472 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18473 __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); | |
18474 index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; | |
18475 __Pyx_GOTREF(__pyx_t_3); | |
18476 index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; | |
18477 __Pyx_GOTREF(__pyx_t_2); | |
18478 if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 647, __pyx_L1_error) | |
18479 __pyx_t_6 = NULL; | |
18480 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
18481 goto __pyx_L4_unpacking_done; | |
18482 __pyx_L3_unpacking_failed:; | |
18483 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
18484 __pyx_t_6 = NULL; | |
18485 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); | |
18486 __PYX_ERR(0, 647, __pyx_L1_error) | |
18487 __pyx_L4_unpacking_done:; | |
18488 } | |
18489 __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 647, __pyx_L1_error) | |
18490 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
18491 __pyx_v_idx = __pyx_t_7; | |
18492 __pyx_v_f = __pyx_t_2; | |
18493 __pyx_t_2 = 0; | |
18494 | |
18495 /* "pysam/libctabixproxies.pyx":649 | |
18496 * idx, f = self.map_key2field.get(key, (-1, None)) | |
18497 * | |
18498 * if idx >= 0: # <<<<<<<<<<<<<< | |
18499 * if value is None: | |
18500 * s = "." | |
18501 */ | |
18502 __pyx_t_8 = (__pyx_v_idx >= 0); | |
18503 if (__pyx_t_8) { | |
18504 | |
18505 /* "pysam/libctabixproxies.pyx":650 | |
18506 * | |
18507 * if idx >= 0: | |
18508 * if value is None: # <<<<<<<<<<<<<< | |
18509 * s = "." | |
18510 * elif f[1] == str: | |
18511 */ | |
18512 __pyx_t_8 = (__pyx_v_value == Py_None); | |
18513 if (__pyx_t_8) { | |
18514 | |
18515 /* "pysam/libctabixproxies.pyx":651 | |
18516 * if idx >= 0: | |
18517 * if value is None: | |
18518 * s = "." # <<<<<<<<<<<<<< | |
18519 * elif f[1] == str: | |
18520 * s = force_bytes(value, | |
18521 */ | |
18522 __Pyx_INCREF(__pyx_kp_u__12); | |
18523 __pyx_v_s = __pyx_kp_u__12; | |
18524 | |
18525 /* "pysam/libctabixproxies.pyx":650 | |
18526 * | |
18527 * if idx >= 0: | |
18528 * if value is None: # <<<<<<<<<<<<<< | |
18529 * s = "." | |
18530 * elif f[1] == str: | |
18531 */ | |
18532 goto __pyx_L6; | |
18533 } | |
18534 | |
18535 /* "pysam/libctabixproxies.pyx":652 | |
18536 * if value is None: | |
18537 * s = "." | |
18538 * elif f[1] == str: # <<<<<<<<<<<<<< | |
18539 * s = force_bytes(value, | |
18540 * self.encoding) | |
18541 */ | |
18542 __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_f, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) | |
18543 __Pyx_GOTREF(__pyx_t_1); | |
18544 __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error) | |
18545 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18546 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 652, __pyx_L1_error) | |
18547 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18548 if (__pyx_t_8) { | |
18549 | |
18550 /* "pysam/libctabixproxies.pyx":654 | |
18551 * elif f[1] == str: | |
18552 * s = force_bytes(value, | |
18553 * self.encoding) # <<<<<<<<<<<<<< | |
18554 * else: | |
18555 * s = str(f[1](value)) | |
18556 */ | |
18557 __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base.encoding; | |
18558 __Pyx_INCREF(__pyx_t_2); | |
18559 | |
18560 /* "pysam/libctabixproxies.pyx":653 | |
18561 * s = "." | |
18562 * elif f[1] == str: | |
18563 * s = force_bytes(value, # <<<<<<<<<<<<<< | |
18564 * self.encoding) | |
18565 * else: | |
18566 */ | |
18567 __pyx_t_9.__pyx_n = 1; | |
18568 __pyx_t_9.encoding = __pyx_t_2; | |
18569 __pyx_t_1 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_value, &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) | |
18570 __Pyx_GOTREF(__pyx_t_1); | |
18571 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18572 __pyx_v_s = __pyx_t_1; | |
18573 __pyx_t_1 = 0; | |
18574 | |
18575 /* "pysam/libctabixproxies.pyx":652 | |
18576 * if value is None: | |
18577 * s = "." | |
18578 * elif f[1] == str: # <<<<<<<<<<<<<< | |
18579 * s = force_bytes(value, | |
18580 * self.encoding) | |
18581 */ | |
18582 goto __pyx_L6; | |
18583 } | |
18584 | |
18585 /* "pysam/libctabixproxies.pyx":656 | |
18586 * self.encoding) | |
18587 * else: | |
18588 * s = str(f[1](value)) # <<<<<<<<<<<<<< | |
18589 * TupleProxy._setindex(self, idx, s) | |
18590 * else: | |
18591 */ | |
18592 /*else*/ { | |
18593 __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_f, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error) | |
18594 __Pyx_GOTREF(__pyx_t_2); | |
18595 __pyx_t_3 = NULL; | |
18596 __pyx_t_4 = 0; | |
18597 #if CYTHON_UNPACK_METHODS | |
18598 if (unlikely(PyMethod_Check(__pyx_t_2))) { | |
18599 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); | |
18600 if (likely(__pyx_t_3)) { | |
18601 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
18602 __Pyx_INCREF(__pyx_t_3); | |
18603 __Pyx_INCREF(function); | |
18604 __Pyx_DECREF_SET(__pyx_t_2, function); | |
18605 __pyx_t_4 = 1; | |
18606 } | |
18607 } | |
18608 #endif | |
18609 { | |
18610 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; | |
18611 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); | |
18612 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; | |
18613 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error) | |
18614 __Pyx_GOTREF(__pyx_t_1); | |
18615 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18616 } | |
18617 __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error) | |
18618 __Pyx_GOTREF(__pyx_t_2); | |
18619 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18620 __pyx_v_s = __pyx_t_2; | |
18621 __pyx_t_2 = 0; | |
18622 } | |
18623 __pyx_L6:; | |
18624 | |
18625 /* "pysam/libctabixproxies.pyx":657 | |
18626 * else: | |
18627 * s = str(f[1](value)) | |
18628 * TupleProxy._setindex(self, idx, s) # <<<<<<<<<<<<<< | |
18629 * else: | |
18630 * if self.attribute_dict is None: | |
18631 */ | |
18632 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy), __pyx_n_s_setindex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) | |
18633 __Pyx_GOTREF(__pyx_t_1); | |
18634 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error) | |
18635 __Pyx_GOTREF(__pyx_t_3); | |
18636 __pyx_t_5 = NULL; | |
18637 __pyx_t_4 = 0; | |
18638 #if CYTHON_UNPACK_METHODS | |
18639 if (likely(PyMethod_Check(__pyx_t_1))) { | |
18640 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); | |
18641 if (likely(__pyx_t_5)) { | |
18642 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); | |
18643 __Pyx_INCREF(__pyx_t_5); | |
18644 __Pyx_INCREF(function); | |
18645 __Pyx_DECREF_SET(__pyx_t_1, function); | |
18646 __pyx_t_4 = 1; | |
18647 } | |
18648 } | |
18649 #endif | |
18650 { | |
18651 PyObject *__pyx_callargs[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_v_s}; | |
18652 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); | |
18653 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; | |
18654 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
18655 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error) | |
18656 __Pyx_GOTREF(__pyx_t_2); | |
18657 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18658 } | |
18659 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18660 | |
18661 /* "pysam/libctabixproxies.pyx":649 | |
18662 * idx, f = self.map_key2field.get(key, (-1, None)) | |
18663 * | |
18664 * if idx >= 0: # <<<<<<<<<<<<<< | |
18665 * if value is None: | |
18666 * s = "." | |
18667 */ | |
18668 goto __pyx_L5; | |
18669 } | |
18670 | |
18671 /* "pysam/libctabixproxies.pyx":659 | |
18672 * TupleProxy._setindex(self, idx, s) | |
18673 * else: | |
18674 * if self.attribute_dict is None: # <<<<<<<<<<<<<< | |
18675 * self.attribute_dict = self.attribute_string2dict( | |
18676 * self.attributes) | |
18677 */ | |
18678 /*else*/ { | |
18679 __pyx_t_8 = (__pyx_v_self->attribute_dict == Py_None); | |
18680 if (__pyx_t_8) { | |
18681 | |
18682 /* "pysam/libctabixproxies.pyx":660 | |
18683 * else: | |
18684 * if self.attribute_dict is None: | |
18685 * self.attribute_dict = self.attribute_string2dict( # <<<<<<<<<<<<<< | |
18686 * self.attributes) | |
18687 * self.attribute_dict[key] = value | |
18688 */ | |
18689 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attribute_string2dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error) | |
18690 __Pyx_GOTREF(__pyx_t_1); | |
18691 | |
18692 /* "pysam/libctabixproxies.pyx":661 | |
18693 * if self.attribute_dict is None: | |
18694 * self.attribute_dict = self.attribute_string2dict( | |
18695 * self.attributes) # <<<<<<<<<<<<<< | |
18696 * self.attribute_dict[key] = value | |
18697 * self.is_modified = True | |
18698 */ | |
18699 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error) | |
18700 __Pyx_GOTREF(__pyx_t_3); | |
18701 __pyx_t_5 = NULL; | |
18702 __pyx_t_4 = 0; | |
18703 #if CYTHON_UNPACK_METHODS | |
18704 if (likely(PyMethod_Check(__pyx_t_1))) { | |
18705 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); | |
18706 if (likely(__pyx_t_5)) { | |
18707 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); | |
18708 __Pyx_INCREF(__pyx_t_5); | |
18709 __Pyx_INCREF(function); | |
18710 __Pyx_DECREF_SET(__pyx_t_1, function); | |
18711 __pyx_t_4 = 1; | |
18712 } | |
18713 } | |
18714 #endif | |
18715 { | |
18716 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3}; | |
18717 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); | |
18718 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; | |
18719 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
18720 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error) | |
18721 __Pyx_GOTREF(__pyx_t_2); | |
18722 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18723 } | |
18724 | |
18725 /* "pysam/libctabixproxies.pyx":660 | |
18726 * else: | |
18727 * if self.attribute_dict is None: | |
18728 * self.attribute_dict = self.attribute_string2dict( # <<<<<<<<<<<<<< | |
18729 * self.attributes) | |
18730 * self.attribute_dict[key] = value | |
18731 */ | |
18732 __Pyx_GIVEREF(__pyx_t_2); | |
18733 __Pyx_GOTREF(__pyx_v_self->attribute_dict); | |
18734 __Pyx_DECREF(__pyx_v_self->attribute_dict); | |
18735 __pyx_v_self->attribute_dict = __pyx_t_2; | |
18736 __pyx_t_2 = 0; | |
18737 | |
18738 /* "pysam/libctabixproxies.pyx":659 | |
18739 * TupleProxy._setindex(self, idx, s) | |
18740 * else: | |
18741 * if self.attribute_dict is None: # <<<<<<<<<<<<<< | |
18742 * self.attribute_dict = self.attribute_string2dict( | |
18743 * self.attributes) | |
18744 */ | |
18745 } | |
18746 | |
18747 /* "pysam/libctabixproxies.pyx":662 | |
18748 * self.attribute_dict = self.attribute_string2dict( | |
18749 * self.attributes) | |
18750 * self.attribute_dict[key] = value # <<<<<<<<<<<<<< | |
18751 * self.is_modified = True | |
18752 * | |
18753 */ | |
18754 if (unlikely((PyObject_SetItem(__pyx_v_self->attribute_dict, __pyx_v_key, __pyx_v_value) < 0))) __PYX_ERR(0, 662, __pyx_L1_error) | |
18755 | |
18756 /* "pysam/libctabixproxies.pyx":663 | |
18757 * self.attributes) | |
18758 * self.attribute_dict[key] = value | |
18759 * self.is_modified = True # <<<<<<<<<<<<<< | |
18760 * | |
18761 * # for backwards compatibility | |
18762 */ | |
18763 __pyx_v_self->__pyx_base.__pyx_base.is_modified = 1; | |
18764 } | |
18765 __pyx_L5:; | |
18766 | |
18767 /* "pysam/libctabixproxies.pyx":640 | |
18768 * return self.attribute_dict[key] | |
18769 * | |
18770 * def __setattr__(self, key, value): # <<<<<<<<<<<<<< | |
18771 * '''set attribute.''' | |
18772 * | |
18773 */ | |
18774 | |
18775 /* function exit code */ | |
18776 __pyx_r = 0; | |
18777 goto __pyx_L0; | |
18778 __pyx_L1_error:; | |
18779 __Pyx_XDECREF(__pyx_t_1); | |
18780 __Pyx_XDECREF(__pyx_t_2); | |
18781 __Pyx_XDECREF(__pyx_t_3); | |
18782 __Pyx_XDECREF(__pyx_t_5); | |
18783 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
18784 __pyx_r = -1; | |
18785 __pyx_L0:; | |
18786 __Pyx_XDECREF(__pyx_v_f); | |
18787 __Pyx_XDECREF(__pyx_v_s); | |
18788 __Pyx_RefNannyFinishContext(); | |
18789 return __pyx_r; | |
18790 } | |
18791 | |
18792 /* "pysam/libctabixproxies.pyx":666 | |
18793 * | |
18794 * # for backwards compatibility | |
18795 * def asDict(self, *args, **kwargs): # <<<<<<<<<<<<<< | |
18796 * return self.to_dict(*args, **kwargs) | |
18797 * | |
18798 */ | |
18799 | |
18800 /* Python wrapper */ | |
18801 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_38asDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ | |
18802 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_38asDict = {"asDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_38asDict, METH_VARARGS|METH_KEYWORDS, 0}; | |
18803 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_38asDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { | |
18804 PyObject *__pyx_v_args = 0; | |
18805 PyObject *__pyx_v_kwargs = 0; | |
18806 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
18807 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
18808 PyObject *__pyx_r = 0; | |
18809 __Pyx_RefNannyDeclarations | |
18810 __Pyx_RefNannySetupContext("asDict (wrapper)", 0); | |
18811 #if CYTHON_ASSUME_SAFE_MACROS | |
18812 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
18813 #else | |
18814 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
18815 #endif | |
18816 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
18817 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "asDict", 1))) return NULL; | |
18818 if (unlikely(__pyx_kwds)) { | |
18819 __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues); | |
18820 if (unlikely(!__pyx_v_kwargs)) return NULL; | |
18821 __Pyx_GOTREF(__pyx_v_kwargs); | |
18822 } else { | |
18823 __pyx_v_kwargs = PyDict_New(); | |
18824 if (unlikely(!__pyx_v_kwargs)) return NULL; | |
18825 __Pyx_GOTREF(__pyx_v_kwargs); | |
18826 } | |
18827 __Pyx_INCREF(__pyx_args); | |
18828 __pyx_v_args = __pyx_args; | |
18829 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_37asDict(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); | |
18830 | |
18831 /* function exit code */ | |
18832 __Pyx_DECREF(__pyx_v_args); | |
18833 __Pyx_DECREF(__pyx_v_kwargs); | |
18834 __Pyx_RefNannyFinishContext(); | |
18835 return __pyx_r; | |
18836 } | |
18837 | |
18838 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_37asDict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { | |
18839 PyObject *__pyx_r = NULL; | |
18840 __Pyx_RefNannyDeclarations | |
18841 PyObject *__pyx_t_1 = NULL; | |
18842 PyObject *__pyx_t_2 = NULL; | |
18843 PyObject *__pyx_t_3 = NULL; | |
18844 int __pyx_lineno = 0; | |
18845 const char *__pyx_filename = NULL; | |
18846 int __pyx_clineno = 0; | |
18847 __Pyx_RefNannySetupContext("asDict", 1); | |
18848 | |
18849 /* "pysam/libctabixproxies.pyx":667 | |
18850 * # for backwards compatibility | |
18851 * def asDict(self, *args, **kwargs): | |
18852 * return self.to_dict(*args, **kwargs) # <<<<<<<<<<<<<< | |
18853 * | |
18854 * def fromDict(self, *args, **kwargs): | |
18855 */ | |
18856 __Pyx_XDECREF(__pyx_r); | |
18857 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) | |
18858 __Pyx_GOTREF(__pyx_t_1); | |
18859 __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error) | |
18860 __Pyx_GOTREF(__pyx_t_2); | |
18861 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error) | |
18862 __Pyx_GOTREF(__pyx_t_3); | |
18863 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18864 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18865 __pyx_r = __pyx_t_3; | |
18866 __pyx_t_3 = 0; | |
18867 goto __pyx_L0; | |
18868 | |
18869 /* "pysam/libctabixproxies.pyx":666 | |
18870 * | |
18871 * # for backwards compatibility | |
18872 * def asDict(self, *args, **kwargs): # <<<<<<<<<<<<<< | |
18873 * return self.to_dict(*args, **kwargs) | |
18874 * | |
18875 */ | |
18876 | |
18877 /* function exit code */ | |
18878 __pyx_L1_error:; | |
18879 __Pyx_XDECREF(__pyx_t_1); | |
18880 __Pyx_XDECREF(__pyx_t_2); | |
18881 __Pyx_XDECREF(__pyx_t_3); | |
18882 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.asDict", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
18883 __pyx_r = NULL; | |
18884 __pyx_L0:; | |
18885 __Pyx_XGIVEREF(__pyx_r); | |
18886 __Pyx_RefNannyFinishContext(); | |
18887 return __pyx_r; | |
18888 } | |
18889 | |
18890 /* "pysam/libctabixproxies.pyx":669 | |
18891 * return self.to_dict(*args, **kwargs) | |
18892 * | |
18893 * def fromDict(self, *args, **kwargs): # <<<<<<<<<<<<<< | |
18894 * return self.from_dict(*args, **kwargs) | |
18895 * | |
18896 */ | |
18897 | |
18898 /* Python wrapper */ | |
18899 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_40fromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ | |
18900 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_40fromDict = {"fromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_40fromDict, METH_VARARGS|METH_KEYWORDS, 0}; | |
18901 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_40fromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { | |
18902 PyObject *__pyx_v_args = 0; | |
18903 PyObject *__pyx_v_kwargs = 0; | |
18904 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
18905 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
18906 PyObject *__pyx_r = 0; | |
18907 __Pyx_RefNannyDeclarations | |
18908 __Pyx_RefNannySetupContext("fromDict (wrapper)", 0); | |
18909 #if CYTHON_ASSUME_SAFE_MACROS | |
18910 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
18911 #else | |
18912 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
18913 #endif | |
18914 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
18915 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "fromDict", 1))) return NULL; | |
18916 if (unlikely(__pyx_kwds)) { | |
18917 __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues); | |
18918 if (unlikely(!__pyx_v_kwargs)) return NULL; | |
18919 __Pyx_GOTREF(__pyx_v_kwargs); | |
18920 } else { | |
18921 __pyx_v_kwargs = PyDict_New(); | |
18922 if (unlikely(!__pyx_v_kwargs)) return NULL; | |
18923 __Pyx_GOTREF(__pyx_v_kwargs); | |
18924 } | |
18925 __Pyx_INCREF(__pyx_args); | |
18926 __pyx_v_args = __pyx_args; | |
18927 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_39fromDict(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); | |
18928 | |
18929 /* function exit code */ | |
18930 __Pyx_DECREF(__pyx_v_args); | |
18931 __Pyx_DECREF(__pyx_v_kwargs); | |
18932 __Pyx_RefNannyFinishContext(); | |
18933 return __pyx_r; | |
18934 } | |
18935 | |
18936 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_39fromDict(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { | |
18937 PyObject *__pyx_r = NULL; | |
18938 __Pyx_RefNannyDeclarations | |
18939 PyObject *__pyx_t_1 = NULL; | |
18940 PyObject *__pyx_t_2 = NULL; | |
18941 PyObject *__pyx_t_3 = NULL; | |
18942 int __pyx_lineno = 0; | |
18943 const char *__pyx_filename = NULL; | |
18944 int __pyx_clineno = 0; | |
18945 __Pyx_RefNannySetupContext("fromDict", 1); | |
18946 | |
18947 /* "pysam/libctabixproxies.pyx":670 | |
18948 * | |
18949 * def fromDict(self, *args, **kwargs): | |
18950 * return self.from_dict(*args, **kwargs) # <<<<<<<<<<<<<< | |
18951 * | |
18952 * | |
18953 */ | |
18954 __Pyx_XDECREF(__pyx_r); | |
18955 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_from_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error) | |
18956 __Pyx_GOTREF(__pyx_t_1); | |
18957 __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error) | |
18958 __Pyx_GOTREF(__pyx_t_2); | |
18959 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 670, __pyx_L1_error) | |
18960 __Pyx_GOTREF(__pyx_t_3); | |
18961 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
18962 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
18963 __pyx_r = __pyx_t_3; | |
18964 __pyx_t_3 = 0; | |
18965 goto __pyx_L0; | |
18966 | |
18967 /* "pysam/libctabixproxies.pyx":669 | |
18968 * return self.to_dict(*args, **kwargs) | |
18969 * | |
18970 * def fromDict(self, *args, **kwargs): # <<<<<<<<<<<<<< | |
18971 * return self.from_dict(*args, **kwargs) | |
18972 * | |
18973 */ | |
18974 | |
18975 /* function exit code */ | |
18976 __pyx_L1_error:; | |
18977 __Pyx_XDECREF(__pyx_t_1); | |
18978 __Pyx_XDECREF(__pyx_t_2); | |
18979 __Pyx_XDECREF(__pyx_t_3); | |
18980 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.fromDict", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
18981 __pyx_r = NULL; | |
18982 __pyx_L0:; | |
18983 __Pyx_XGIVEREF(__pyx_r); | |
18984 __Pyx_RefNannyFinishContext(); | |
18985 return __pyx_r; | |
18986 } | |
18987 | |
18988 /* "(tree fragment)":1 | |
18989 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
18990 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
18991 * def __setstate_cython__(self, __pyx_state): | |
18992 */ | |
18993 | |
18994 /* Python wrapper */ | |
18995 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_42__reduce_cython__(PyObject *__pyx_v_self, | |
18996 #if CYTHON_METH_FASTCALL | |
18997 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
18998 #else | |
18999 PyObject *__pyx_args, PyObject *__pyx_kwds | |
19000 #endif | |
19001 ); /*proto*/ | |
19002 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_42__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_42__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
19003 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_42__reduce_cython__(PyObject *__pyx_v_self, | |
19004 #if CYTHON_METH_FASTCALL | |
19005 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
19006 #else | |
19007 PyObject *__pyx_args, PyObject *__pyx_kwds | |
19008 #endif | |
19009 ) { | |
19010 #if !CYTHON_METH_FASTCALL | |
19011 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
19012 #endif | |
19013 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
19014 PyObject *__pyx_r = 0; | |
19015 __Pyx_RefNannyDeclarations | |
19016 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); | |
19017 #if !CYTHON_METH_FASTCALL | |
19018 #if CYTHON_ASSUME_SAFE_MACROS | |
19019 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
19020 #else | |
19021 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
19022 #endif | |
19023 #endif | |
19024 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
19025 if (unlikely(__pyx_nargs > 0)) { | |
19026 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} | |
19027 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; | |
19028 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_41__reduce_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self)); | |
19029 | |
19030 /* function exit code */ | |
19031 __Pyx_RefNannyFinishContext(); | |
19032 return __pyx_r; | |
19033 } | |
19034 | |
19035 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_41__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self) { | |
19036 PyObject *__pyx_r = NULL; | |
19037 __Pyx_RefNannyDeclarations | |
19038 int __pyx_lineno = 0; | |
19039 const char *__pyx_filename = NULL; | |
19040 int __pyx_clineno = 0; | |
19041 __Pyx_RefNannySetupContext("__reduce_cython__", 1); | |
19042 | |
19043 /* "(tree fragment)":2 | |
19044 * def __reduce_cython__(self): | |
19045 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
19046 * def __setstate_cython__(self, __pyx_state): | |
19047 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
19048 */ | |
19049 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
19050 __PYX_ERR(1, 2, __pyx_L1_error) | |
19051 | |
19052 /* "(tree fragment)":1 | |
19053 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
19054 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
19055 * def __setstate_cython__(self, __pyx_state): | |
19056 */ | |
19057 | |
19058 /* function exit code */ | |
19059 __pyx_L1_error:; | |
19060 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
19061 __pyx_r = NULL; | |
19062 __Pyx_XGIVEREF(__pyx_r); | |
19063 __Pyx_RefNannyFinishContext(); | |
19064 return __pyx_r; | |
19065 } | |
19066 | |
19067 /* "(tree fragment)":3 | |
19068 * def __reduce_cython__(self): | |
19069 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
19070 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
19071 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
19072 */ | |
19073 | |
19074 /* Python wrapper */ | |
19075 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_44__setstate_cython__(PyObject *__pyx_v_self, | |
19076 #if CYTHON_METH_FASTCALL | |
19077 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
19078 #else | |
19079 PyObject *__pyx_args, PyObject *__pyx_kwds | |
19080 #endif | |
19081 ); /*proto*/ | |
19082 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_44__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_44__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
19083 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_44__setstate_cython__(PyObject *__pyx_v_self, | |
19084 #if CYTHON_METH_FASTCALL | |
19085 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
19086 #else | |
19087 PyObject *__pyx_args, PyObject *__pyx_kwds | |
19088 #endif | |
19089 ) { | |
19090 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; | |
19091 #if !CYTHON_METH_FASTCALL | |
19092 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
19093 #endif | |
19094 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
19095 PyObject* values[1] = {0}; | |
19096 int __pyx_lineno = 0; | |
19097 const char *__pyx_filename = NULL; | |
19098 int __pyx_clineno = 0; | |
19099 PyObject *__pyx_r = 0; | |
19100 __Pyx_RefNannyDeclarations | |
19101 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); | |
19102 #if !CYTHON_METH_FASTCALL | |
19103 #if CYTHON_ASSUME_SAFE_MACROS | |
19104 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
19105 #else | |
19106 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
19107 #endif | |
19108 #endif | |
19109 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
19110 { | |
19111 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; | |
19112 if (__pyx_kwds) { | |
19113 Py_ssize_t kw_args; | |
19114 switch (__pyx_nargs) { | |
19115 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
19116 CYTHON_FALLTHROUGH; | |
19117 case 0: break; | |
19118 default: goto __pyx_L5_argtuple_error; | |
19119 } | |
19120 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
19121 switch (__pyx_nargs) { | |
19122 case 0: | |
19123 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { | |
19124 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
19125 kw_args--; | |
19126 } | |
19127 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) | |
19128 else goto __pyx_L5_argtuple_error; | |
19129 } | |
19130 if (unlikely(kw_args > 0)) { | |
19131 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
19132 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) | |
19133 } | |
19134 } else if (unlikely(__pyx_nargs != 1)) { | |
19135 goto __pyx_L5_argtuple_error; | |
19136 } else { | |
19137 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
19138 } | |
19139 __pyx_v___pyx_state = values[0]; | |
19140 } | |
19141 goto __pyx_L6_skip; | |
19142 __pyx_L5_argtuple_error:; | |
19143 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) | |
19144 __pyx_L6_skip:; | |
19145 goto __pyx_L4_argument_unpacking_done; | |
19146 __pyx_L3_error:; | |
19147 { | |
19148 Py_ssize_t __pyx_temp; | |
19149 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
19150 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
19151 } | |
19152 } | |
19153 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
19154 __Pyx_RefNannyFinishContext(); | |
19155 return NULL; | |
19156 __pyx_L4_argument_unpacking_done:; | |
19157 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8GTFProxy_43__setstate_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_self), __pyx_v___pyx_state); | |
19158 | |
19159 /* function exit code */ | |
19160 { | |
19161 Py_ssize_t __pyx_temp; | |
19162 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
19163 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
19164 } | |
19165 } | |
19166 __Pyx_RefNannyFinishContext(); | |
19167 return __pyx_r; | |
19168 } | |
19169 | |
19170 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8GTFProxy_43__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { | |
19171 PyObject *__pyx_r = NULL; | |
19172 __Pyx_RefNannyDeclarations | |
19173 int __pyx_lineno = 0; | |
19174 const char *__pyx_filename = NULL; | |
19175 int __pyx_clineno = 0; | |
19176 __Pyx_RefNannySetupContext("__setstate_cython__", 1); | |
19177 | |
19178 /* "(tree fragment)":4 | |
19179 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
19180 * def __setstate_cython__(self, __pyx_state): | |
19181 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
19182 */ | |
19183 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
19184 __PYX_ERR(1, 4, __pyx_L1_error) | |
19185 | |
19186 /* "(tree fragment)":3 | |
19187 * def __reduce_cython__(self): | |
19188 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
19189 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
19190 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
19191 */ | |
19192 | |
19193 /* function exit code */ | |
19194 __pyx_L1_error:; | |
19195 __Pyx_AddTraceback("pysam.libctabixproxies.GTFProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
19196 __pyx_r = NULL; | |
19197 __Pyx_XGIVEREF(__pyx_r); | |
19198 __Pyx_RefNannyFinishContext(); | |
19199 return __pyx_r; | |
19200 } | |
19201 | |
19202 /* "pysam/libctabixproxies.pyx":675 | |
19203 * cdef class GFF3Proxy(GTFProxy): | |
19204 * | |
19205 * def dict2attribute_string(self, d): # <<<<<<<<<<<<<< | |
19206 * """convert dictionary to attribute string.""" | |
19207 * return ";".join(["{}={}".format(k, v) for k, v in d.items()]) | |
19208 */ | |
19209 | |
19210 /* Python wrapper */ | |
19211 static PyObject *__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_1dict2attribute_string(PyObject *__pyx_v_self, | |
19212 #if CYTHON_METH_FASTCALL | |
19213 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
19214 #else | |
19215 PyObject *__pyx_args, PyObject *__pyx_kwds | |
19216 #endif | |
19217 ); /*proto*/ | |
19218 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_9GFF3Proxy_dict2attribute_string, "convert dictionary to attribute string."); | |
19219 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_9GFF3Proxy_1dict2attribute_string = {"dict2attribute_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_1dict2attribute_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_9GFF3Proxy_dict2attribute_string}; | |
19220 static PyObject *__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_1dict2attribute_string(PyObject *__pyx_v_self, | |
19221 #if CYTHON_METH_FASTCALL | |
19222 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
19223 #else | |
19224 PyObject *__pyx_args, PyObject *__pyx_kwds | |
19225 #endif | |
19226 ) { | |
19227 PyObject *__pyx_v_d = 0; | |
19228 #if !CYTHON_METH_FASTCALL | |
19229 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
19230 #endif | |
19231 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
19232 PyObject* values[1] = {0}; | |
19233 int __pyx_lineno = 0; | |
19234 const char *__pyx_filename = NULL; | |
19235 int __pyx_clineno = 0; | |
19236 PyObject *__pyx_r = 0; | |
19237 __Pyx_RefNannyDeclarations | |
19238 __Pyx_RefNannySetupContext("dict2attribute_string (wrapper)", 0); | |
19239 #if !CYTHON_METH_FASTCALL | |
19240 #if CYTHON_ASSUME_SAFE_MACROS | |
19241 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
19242 #else | |
19243 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
19244 #endif | |
19245 #endif | |
19246 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
19247 { | |
19248 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,0}; | |
19249 if (__pyx_kwds) { | |
19250 Py_ssize_t kw_args; | |
19251 switch (__pyx_nargs) { | |
19252 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
19253 CYTHON_FALLTHROUGH; | |
19254 case 0: break; | |
19255 default: goto __pyx_L5_argtuple_error; | |
19256 } | |
19257 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
19258 switch (__pyx_nargs) { | |
19259 case 0: | |
19260 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_d)) != 0)) { | |
19261 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
19262 kw_args--; | |
19263 } | |
19264 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 675, __pyx_L3_error) | |
19265 else goto __pyx_L5_argtuple_error; | |
19266 } | |
19267 if (unlikely(kw_args > 0)) { | |
19268 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
19269 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dict2attribute_string") < 0)) __PYX_ERR(0, 675, __pyx_L3_error) | |
19270 } | |
19271 } else if (unlikely(__pyx_nargs != 1)) { | |
19272 goto __pyx_L5_argtuple_error; | |
19273 } else { | |
19274 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
19275 } | |
19276 __pyx_v_d = values[0]; | |
19277 } | |
19278 goto __pyx_L6_skip; | |
19279 __pyx_L5_argtuple_error:; | |
19280 __Pyx_RaiseArgtupleInvalid("dict2attribute_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 675, __pyx_L3_error) | |
19281 __pyx_L6_skip:; | |
19282 goto __pyx_L4_argument_unpacking_done; | |
19283 __pyx_L3_error:; | |
19284 { | |
19285 Py_ssize_t __pyx_temp; | |
19286 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
19287 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
19288 } | |
19289 } | |
19290 __Pyx_AddTraceback("pysam.libctabixproxies.GFF3Proxy.dict2attribute_string", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
19291 __Pyx_RefNannyFinishContext(); | |
19292 return NULL; | |
19293 __pyx_L4_argument_unpacking_done:; | |
19294 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_dict2attribute_string(((struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *)__pyx_v_self), __pyx_v_d); | |
19295 | |
19296 /* function exit code */ | |
19297 { | |
19298 Py_ssize_t __pyx_temp; | |
19299 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
19300 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
19301 } | |
19302 } | |
19303 __Pyx_RefNannyFinishContext(); | |
19304 return __pyx_r; | |
19305 } | |
19306 | |
19307 static PyObject *__pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_dict2attribute_string(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *__pyx_v_self, PyObject *__pyx_v_d) { | |
19308 PyObject *__pyx_8genexpr2__pyx_v_k = NULL; | |
19309 PyObject *__pyx_8genexpr2__pyx_v_v = NULL; | |
19310 PyObject *__pyx_r = NULL; | |
19311 __Pyx_RefNannyDeclarations | |
19312 PyObject *__pyx_t_1 = NULL; | |
19313 PyObject *__pyx_t_2 = NULL; | |
19314 Py_ssize_t __pyx_t_3; | |
19315 Py_ssize_t __pyx_t_4; | |
19316 int __pyx_t_5; | |
19317 PyObject *__pyx_t_6 = NULL; | |
19318 PyObject *__pyx_t_7 = NULL; | |
19319 int __pyx_t_8; | |
19320 PyObject *__pyx_t_9 = NULL; | |
19321 unsigned int __pyx_t_10; | |
19322 int __pyx_lineno = 0; | |
19323 const char *__pyx_filename = NULL; | |
19324 int __pyx_clineno = 0; | |
19325 __Pyx_RefNannySetupContext("dict2attribute_string", 1); | |
19326 | |
19327 /* "pysam/libctabixproxies.pyx":677 | |
19328 * def dict2attribute_string(self, d): | |
19329 * """convert dictionary to attribute string.""" | |
19330 * return ";".join(["{}={}".format(k, v) for k, v in d.items()]) # <<<<<<<<<<<<<< | |
19331 * | |
19332 * def attribute_string2iterator(self, s): | |
19333 */ | |
19334 __Pyx_XDECREF(__pyx_r); | |
19335 { /* enter inner scope */ | |
19336 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L5_error) | |
19337 __Pyx_GOTREF(__pyx_t_1); | |
19338 __pyx_t_3 = 0; | |
19339 if (unlikely(__pyx_v_d == Py_None)) { | |
19340 PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); | |
19341 __PYX_ERR(0, 677, __pyx_L5_error) | |
19342 } | |
19343 __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_d, 0, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L5_error) | |
19344 __Pyx_GOTREF(__pyx_t_6); | |
19345 __Pyx_XDECREF(__pyx_t_2); | |
19346 __pyx_t_2 = __pyx_t_6; | |
19347 __pyx_t_6 = 0; | |
19348 while (1) { | |
19349 __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5); | |
19350 if (unlikely(__pyx_t_8 == 0)) break; | |
19351 if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 677, __pyx_L5_error) | |
19352 __Pyx_GOTREF(__pyx_t_6); | |
19353 __Pyx_GOTREF(__pyx_t_7); | |
19354 __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_k, __pyx_t_6); | |
19355 __pyx_t_6 = 0; | |
19356 __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_v, __pyx_t_7); | |
19357 __pyx_t_7 = 0; | |
19358 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__26, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L5_error) | |
19359 __Pyx_GOTREF(__pyx_t_6); | |
19360 __pyx_t_9 = NULL; | |
19361 __pyx_t_10 = 0; | |
19362 #if CYTHON_UNPACK_METHODS | |
19363 if (likely(PyMethod_Check(__pyx_t_6))) { | |
19364 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); | |
19365 if (likely(__pyx_t_9)) { | |
19366 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); | |
19367 __Pyx_INCREF(__pyx_t_9); | |
19368 __Pyx_INCREF(function); | |
19369 __Pyx_DECREF_SET(__pyx_t_6, function); | |
19370 __pyx_t_10 = 1; | |
19371 } | |
19372 } | |
19373 #endif | |
19374 { | |
19375 PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_8genexpr2__pyx_v_k, __pyx_8genexpr2__pyx_v_v}; | |
19376 __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); | |
19377 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; | |
19378 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 677, __pyx_L5_error) | |
19379 __Pyx_GOTREF(__pyx_t_7); | |
19380 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
19381 } | |
19382 if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 677, __pyx_L5_error) | |
19383 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; | |
19384 } | |
19385 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
19386 __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_k); __pyx_8genexpr2__pyx_v_k = 0; | |
19387 __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_v); __pyx_8genexpr2__pyx_v_v = 0; | |
19388 goto __pyx_L8_exit_scope; | |
19389 __pyx_L5_error:; | |
19390 __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_k); __pyx_8genexpr2__pyx_v_k = 0; | |
19391 __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_v); __pyx_8genexpr2__pyx_v_v = 0; | |
19392 goto __pyx_L1_error; | |
19393 __pyx_L8_exit_scope:; | |
19394 } /* exit inner scope */ | |
19395 __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__17, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error) | |
19396 __Pyx_GOTREF(__pyx_t_2); | |
19397 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
19398 __pyx_r = __pyx_t_2; | |
19399 __pyx_t_2 = 0; | |
19400 goto __pyx_L0; | |
19401 | |
19402 /* "pysam/libctabixproxies.pyx":675 | |
19403 * cdef class GFF3Proxy(GTFProxy): | |
19404 * | |
19405 * def dict2attribute_string(self, d): # <<<<<<<<<<<<<< | |
19406 * """convert dictionary to attribute string.""" | |
19407 * return ";".join(["{}={}".format(k, v) for k, v in d.items()]) | |
19408 */ | |
19409 | |
19410 /* function exit code */ | |
19411 __pyx_L1_error:; | |
19412 __Pyx_XDECREF(__pyx_t_1); | |
19413 __Pyx_XDECREF(__pyx_t_2); | |
19414 __Pyx_XDECREF(__pyx_t_6); | |
19415 __Pyx_XDECREF(__pyx_t_7); | |
19416 __Pyx_XDECREF(__pyx_t_9); | |
19417 __Pyx_AddTraceback("pysam.libctabixproxies.GFF3Proxy.dict2attribute_string", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
19418 __pyx_r = NULL; | |
19419 __pyx_L0:; | |
19420 __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_k); | |
19421 __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_v); | |
19422 __Pyx_XGIVEREF(__pyx_r); | |
19423 __Pyx_RefNannyFinishContext(); | |
19424 return __pyx_r; | |
19425 } | |
19426 static PyObject *__pyx_gb_5pysam_16libctabixproxies_9GFF3Proxy_4generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ | |
19427 | |
19428 /* "pysam/libctabixproxies.pyx":679 | |
19429 * return ";".join(["{}={}".format(k, v) for k, v in d.items()]) | |
19430 * | |
19431 * def attribute_string2iterator(self, s): # <<<<<<<<<<<<<< | |
19432 * """convert attribute string in GFF3 format to records | |
19433 * and iterate over key, value pairs. | |
19434 */ | |
19435 | |
19436 /* Python wrapper */ | |
19437 static PyObject *__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_3attribute_string2iterator(PyObject *__pyx_v_self, | |
19438 #if CYTHON_METH_FASTCALL | |
19439 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
19440 #else | |
19441 PyObject *__pyx_args, PyObject *__pyx_kwds | |
19442 #endif | |
19443 ); /*proto*/ | |
19444 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_9GFF3Proxy_2attribute_string2iterator, "convert attribute string in GFF3 format to records\n and iterate over key, value pairs.\n "); | |
19445 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_9GFF3Proxy_3attribute_string2iterator = {"attribute_string2iterator", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_3attribute_string2iterator, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_9GFF3Proxy_2attribute_string2iterator}; | |
19446 static PyObject *__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_3attribute_string2iterator(PyObject *__pyx_v_self, | |
19447 #if CYTHON_METH_FASTCALL | |
19448 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
19449 #else | |
19450 PyObject *__pyx_args, PyObject *__pyx_kwds | |
19451 #endif | |
19452 ) { | |
19453 PyObject *__pyx_v_s = 0; | |
19454 #if !CYTHON_METH_FASTCALL | |
19455 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
19456 #endif | |
19457 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
19458 PyObject* values[1] = {0}; | |
19459 int __pyx_lineno = 0; | |
19460 const char *__pyx_filename = NULL; | |
19461 int __pyx_clineno = 0; | |
19462 PyObject *__pyx_r = 0; | |
19463 __Pyx_RefNannyDeclarations | |
19464 __Pyx_RefNannySetupContext("attribute_string2iterator (wrapper)", 0); | |
19465 #if !CYTHON_METH_FASTCALL | |
19466 #if CYTHON_ASSUME_SAFE_MACROS | |
19467 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
19468 #else | |
19469 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
19470 #endif | |
19471 #endif | |
19472 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
19473 { | |
19474 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s_2,0}; | |
19475 if (__pyx_kwds) { | |
19476 Py_ssize_t kw_args; | |
19477 switch (__pyx_nargs) { | |
19478 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
19479 CYTHON_FALLTHROUGH; | |
19480 case 0: break; | |
19481 default: goto __pyx_L5_argtuple_error; | |
19482 } | |
19483 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
19484 switch (__pyx_nargs) { | |
19485 case 0: | |
19486 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s_2)) != 0)) { | |
19487 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
19488 kw_args--; | |
19489 } | |
19490 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 679, __pyx_L3_error) | |
19491 else goto __pyx_L5_argtuple_error; | |
19492 } | |
19493 if (unlikely(kw_args > 0)) { | |
19494 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
19495 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "attribute_string2iterator") < 0)) __PYX_ERR(0, 679, __pyx_L3_error) | |
19496 } | |
19497 } else if (unlikely(__pyx_nargs != 1)) { | |
19498 goto __pyx_L5_argtuple_error; | |
19499 } else { | |
19500 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
19501 } | |
19502 __pyx_v_s = values[0]; | |
19503 } | |
19504 goto __pyx_L6_skip; | |
19505 __pyx_L5_argtuple_error:; | |
19506 __Pyx_RaiseArgtupleInvalid("attribute_string2iterator", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 679, __pyx_L3_error) | |
19507 __pyx_L6_skip:; | |
19508 goto __pyx_L4_argument_unpacking_done; | |
19509 __pyx_L3_error:; | |
19510 { | |
19511 Py_ssize_t __pyx_temp; | |
19512 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
19513 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
19514 } | |
19515 } | |
19516 __Pyx_AddTraceback("pysam.libctabixproxies.GFF3Proxy.attribute_string2iterator", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
19517 __Pyx_RefNannyFinishContext(); | |
19518 return NULL; | |
19519 __pyx_L4_argument_unpacking_done:; | |
19520 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_2attribute_string2iterator(((struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *)__pyx_v_self), __pyx_v_s); | |
19521 | |
19522 /* function exit code */ | |
19523 { | |
19524 Py_ssize_t __pyx_temp; | |
19525 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
19526 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
19527 } | |
19528 } | |
19529 __Pyx_RefNannyFinishContext(); | |
19530 return __pyx_r; | |
19531 } | |
19532 static PyObject *__pyx_gb_5pysam_16libctabixproxies_9GFF3Proxy_25attribute_string2iterator_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ | |
19533 | |
19534 /* "pysam/libctabixproxies.pyx":684 | |
19535 * """ | |
19536 * | |
19537 * for f in (x.strip() for x in s.split(";")): # <<<<<<<<<<<<<< | |
19538 * if not f: | |
19539 * continue | |
19540 */ | |
19541 | |
19542 static PyObject *__pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_25attribute_string2iterator_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { | |
19543 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr *__pyx_cur_scope; | |
19544 PyObject *__pyx_r = NULL; | |
19545 __Pyx_RefNannyDeclarations | |
19546 int __pyx_lineno = 0; | |
19547 const char *__pyx_filename = NULL; | |
19548 int __pyx_clineno = 0; | |
19549 __Pyx_RefNannySetupContext("genexpr", 0); | |
19550 __pyx_cur_scope = (struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr *)__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr(__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL); | |
19551 if (unlikely(!__pyx_cur_scope)) { | |
19552 __pyx_cur_scope = ((struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr *)Py_None); | |
19553 __Pyx_INCREF(Py_None); | |
19554 __PYX_ERR(0, 684, __pyx_L1_error) | |
19555 } else { | |
19556 __Pyx_GOTREF((PyObject *)__pyx_cur_scope); | |
19557 } | |
19558 __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; | |
19559 __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); | |
19560 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); | |
19561 { | |
19562 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_16libctabixproxies_9GFF3Proxy_25attribute_string2iterator_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_attribute_string2iterator_locals, __pyx_n_s_pysam_libctabixproxies); if (unlikely(!gen)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19563 __Pyx_DECREF(__pyx_cur_scope); | |
19564 __Pyx_RefNannyFinishContext(); | |
19565 return (PyObject *) gen; | |
19566 } | |
19567 | |
19568 /* function exit code */ | |
19569 __pyx_L1_error:; | |
19570 __Pyx_AddTraceback("pysam.libctabixproxies.GFF3Proxy.attribute_string2iterator.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
19571 __pyx_r = NULL; | |
19572 __Pyx_DECREF((PyObject *)__pyx_cur_scope); | |
19573 __Pyx_XGIVEREF(__pyx_r); | |
19574 __Pyx_RefNannyFinishContext(); | |
19575 return __pyx_r; | |
19576 } | |
19577 | |
19578 static PyObject *__pyx_gb_5pysam_16libctabixproxies_9GFF3Proxy_25attribute_string2iterator_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ | |
19579 { | |
19580 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr *)__pyx_generator->closure); | |
19581 PyObject *__pyx_r = NULL; | |
19582 PyObject *__pyx_t_1 = NULL; | |
19583 Py_ssize_t __pyx_t_2; | |
19584 PyObject *(*__pyx_t_3)(PyObject *); | |
19585 PyObject *__pyx_t_4 = NULL; | |
19586 PyObject *__pyx_t_5 = NULL; | |
19587 PyObject *__pyx_t_6 = NULL; | |
19588 unsigned int __pyx_t_7; | |
19589 int __pyx_lineno = 0; | |
19590 const char *__pyx_filename = NULL; | |
19591 int __pyx_clineno = 0; | |
19592 __Pyx_RefNannyDeclarations | |
19593 __Pyx_RefNannySetupContext("genexpr", 0); | |
19594 switch (__pyx_generator->resume_label) { | |
19595 case 0: goto __pyx_L3_first_run; | |
19596 case 1: goto __pyx_L6_resume_from_yield; | |
19597 default: /* CPython raises the right error here */ | |
19598 __Pyx_RefNannyFinishContext(); | |
19599 return NULL; | |
19600 } | |
19601 __pyx_L3_first_run:; | |
19602 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19603 if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 684, __pyx_L1_error) } | |
19604 if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { | |
19605 __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); | |
19606 __pyx_t_2 = 0; | |
19607 __pyx_t_3 = NULL; | |
19608 } else { | |
19609 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19610 __Pyx_GOTREF(__pyx_t_1); | |
19611 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19612 } | |
19613 for (;;) { | |
19614 if (likely(!__pyx_t_3)) { | |
19615 if (likely(PyList_CheckExact(__pyx_t_1))) { | |
19616 { | |
19617 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); | |
19618 #if !CYTHON_ASSUME_SAFE_MACROS | |
19619 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 684, __pyx_L1_error) | |
19620 #endif | |
19621 if (__pyx_t_2 >= __pyx_temp) break; | |
19622 } | |
19623 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
19624 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 684, __pyx_L1_error) | |
19625 #else | |
19626 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19627 __Pyx_GOTREF(__pyx_t_4); | |
19628 #endif | |
19629 } else { | |
19630 { | |
19631 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); | |
19632 #if !CYTHON_ASSUME_SAFE_MACROS | |
19633 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 684, __pyx_L1_error) | |
19634 #endif | |
19635 if (__pyx_t_2 >= __pyx_temp) break; | |
19636 } | |
19637 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
19638 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 684, __pyx_L1_error) | |
19639 #else | |
19640 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19641 __Pyx_GOTREF(__pyx_t_4); | |
19642 #endif | |
19643 } | |
19644 } else { | |
19645 __pyx_t_4 = __pyx_t_3(__pyx_t_1); | |
19646 if (unlikely(!__pyx_t_4)) { | |
19647 PyObject* exc_type = PyErr_Occurred(); | |
19648 if (exc_type) { | |
19649 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); | |
19650 else __PYX_ERR(0, 684, __pyx_L1_error) | |
19651 } | |
19652 break; | |
19653 } | |
19654 __Pyx_GOTREF(__pyx_t_4); | |
19655 } | |
19656 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x); | |
19657 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_4); | |
19658 __Pyx_GIVEREF(__pyx_t_4); | |
19659 __pyx_t_4 = 0; | |
19660 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_x, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19661 __Pyx_GOTREF(__pyx_t_5); | |
19662 __pyx_t_6 = NULL; | |
19663 __pyx_t_7 = 0; | |
19664 #if CYTHON_UNPACK_METHODS | |
19665 if (likely(PyMethod_Check(__pyx_t_5))) { | |
19666 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); | |
19667 if (likely(__pyx_t_6)) { | |
19668 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); | |
19669 __Pyx_INCREF(__pyx_t_6); | |
19670 __Pyx_INCREF(function); | |
19671 __Pyx_DECREF_SET(__pyx_t_5, function); | |
19672 __pyx_t_7 = 1; | |
19673 } | |
19674 } | |
19675 #endif | |
19676 { | |
19677 PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; | |
19678 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); | |
19679 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; | |
19680 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19681 __Pyx_GOTREF(__pyx_t_4); | |
19682 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
19683 } | |
19684 __pyx_r = __pyx_t_4; | |
19685 __pyx_t_4 = 0; | |
19686 __Pyx_XGIVEREF(__pyx_t_1); | |
19687 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; | |
19688 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; | |
19689 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; | |
19690 __Pyx_XGIVEREF(__pyx_r); | |
19691 __Pyx_RefNannyFinishContext(); | |
19692 __Pyx_Coroutine_ResetAndClearException(__pyx_generator); | |
19693 /* return from generator, yielding value */ | |
19694 __pyx_generator->resume_label = 1; | |
19695 return __pyx_r; | |
19696 __pyx_L6_resume_from_yield:; | |
19697 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; | |
19698 __pyx_cur_scope->__pyx_t_0 = 0; | |
19699 __Pyx_XGOTREF(__pyx_t_1); | |
19700 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; | |
19701 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; | |
19702 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19703 } | |
19704 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
19705 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); | |
19706 | |
19707 /* function exit code */ | |
19708 PyErr_SetNone(PyExc_StopIteration); | |
19709 goto __pyx_L0; | |
19710 __pyx_L1_error:; | |
19711 __Pyx_Generator_Replace_StopIteration(0); | |
19712 __Pyx_XDECREF(__pyx_t_1); | |
19713 __Pyx_XDECREF(__pyx_t_4); | |
19714 __Pyx_XDECREF(__pyx_t_5); | |
19715 __Pyx_XDECREF(__pyx_t_6); | |
19716 __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
19717 __pyx_L0:; | |
19718 __Pyx_XDECREF(__pyx_r); __pyx_r = 0; | |
19719 #if !CYTHON_USE_EXC_INFO_STACK | |
19720 __Pyx_Coroutine_ResetAndClearException(__pyx_generator); | |
19721 #endif | |
19722 __pyx_generator->resume_label = -1; | |
19723 __Pyx_Coroutine_clear((PyObject*)__pyx_generator); | |
19724 __Pyx_RefNannyFinishContext(); | |
19725 return __pyx_r; | |
19726 } | |
19727 | |
19728 /* "pysam/libctabixproxies.pyx":679 | |
19729 * return ";".join(["{}={}".format(k, v) for k, v in d.items()]) | |
19730 * | |
19731 * def attribute_string2iterator(self, s): # <<<<<<<<<<<<<< | |
19732 * """convert attribute string in GFF3 format to records | |
19733 * and iterate over key, value pairs. | |
19734 */ | |
19735 | |
19736 static PyObject *__pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_2attribute_string2iterator(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *__pyx_v_self, PyObject *__pyx_v_s) { | |
19737 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator *__pyx_cur_scope; | |
19738 PyObject *__pyx_gb_5pysam_16libctabixproxies_9GFF3Proxy_25attribute_string2iterator_2generator2 = 0; | |
19739 PyObject *__pyx_r = NULL; | |
19740 __Pyx_RefNannyDeclarations | |
19741 int __pyx_lineno = 0; | |
19742 const char *__pyx_filename = NULL; | |
19743 int __pyx_clineno = 0; | |
19744 __Pyx_RefNannySetupContext("attribute_string2iterator", 0); | |
19745 __pyx_cur_scope = (struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator *)__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator(__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator, __pyx_empty_tuple, NULL); | |
19746 if (unlikely(!__pyx_cur_scope)) { | |
19747 __pyx_cur_scope = ((struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator *)Py_None); | |
19748 __Pyx_INCREF(Py_None); | |
19749 __PYX_ERR(0, 679, __pyx_L1_error) | |
19750 } else { | |
19751 __Pyx_GOTREF((PyObject *)__pyx_cur_scope); | |
19752 } | |
19753 __pyx_cur_scope->__pyx_v_self = __pyx_v_self; | |
19754 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); | |
19755 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); | |
19756 __pyx_cur_scope->__pyx_v_s = __pyx_v_s; | |
19757 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_s); | |
19758 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_s); | |
19759 { | |
19760 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_16libctabixproxies_9GFF3Proxy_4generator1, __pyx_codeobj__27, (PyObject *) __pyx_cur_scope, __pyx_n_s_attribute_string2iterator, __pyx_n_s_GFF3Proxy_attribute_string2itera, __pyx_n_s_pysam_libctabixproxies); if (unlikely(!gen)) __PYX_ERR(0, 679, __pyx_L1_error) | |
19761 __Pyx_DECREF(__pyx_cur_scope); | |
19762 __Pyx_RefNannyFinishContext(); | |
19763 return (PyObject *) gen; | |
19764 } | |
19765 | |
19766 /* function exit code */ | |
19767 __pyx_L1_error:; | |
19768 __Pyx_AddTraceback("pysam.libctabixproxies.GFF3Proxy.attribute_string2iterator", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
19769 __pyx_r = NULL; | |
19770 __Pyx_XDECREF(__pyx_gb_5pysam_16libctabixproxies_9GFF3Proxy_25attribute_string2iterator_2generator2); | |
19771 __Pyx_DECREF((PyObject *)__pyx_cur_scope); | |
19772 __Pyx_XGIVEREF(__pyx_r); | |
19773 __Pyx_RefNannyFinishContext(); | |
19774 return __pyx_r; | |
19775 } | |
19776 | |
19777 static PyObject *__pyx_gb_5pysam_16libctabixproxies_9GFF3Proxy_4generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ | |
19778 { | |
19779 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator *__pyx_cur_scope = ((struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator *)__pyx_generator->closure); | |
19780 PyObject *__pyx_r = NULL; | |
19781 PyObject *__pyx_t_1 = NULL; | |
19782 PyObject *__pyx_t_2 = NULL; | |
19783 PyObject *__pyx_t_3 = NULL; | |
19784 unsigned int __pyx_t_4; | |
19785 Py_ssize_t __pyx_t_5; | |
19786 PyObject *(*__pyx_t_6)(PyObject *); | |
19787 int __pyx_t_7; | |
19788 int __pyx_t_8; | |
19789 PyObject *__pyx_t_9 = NULL; | |
19790 PyObject *__pyx_t_10 = NULL; | |
19791 PyObject *(*__pyx_t_11)(PyObject *); | |
19792 PyObject *__pyx_t_12 = NULL; | |
19793 PyObject *__pyx_t_13 = NULL; | |
19794 PyObject *__pyx_t_14 = NULL; | |
19795 int __pyx_t_15; | |
19796 int __pyx_lineno = 0; | |
19797 const char *__pyx_filename = NULL; | |
19798 int __pyx_clineno = 0; | |
19799 __Pyx_RefNannyDeclarations | |
19800 __Pyx_RefNannySetupContext("attribute_string2iterator", 0); | |
19801 switch (__pyx_generator->resume_label) { | |
19802 case 0: goto __pyx_L3_first_run; | |
19803 case 1: goto __pyx_L17_resume_from_yield; | |
19804 default: /* CPython raises the right error here */ | |
19805 __Pyx_RefNannyFinishContext(); | |
19806 return NULL; | |
19807 } | |
19808 __pyx_L3_first_run:; | |
19809 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 679, __pyx_L1_error) | |
19810 | |
19811 /* "pysam/libctabixproxies.pyx":684 | |
19812 * """ | |
19813 * | |
19814 * for f in (x.strip() for x in s.split(";")): # <<<<<<<<<<<<<< | |
19815 * if not f: | |
19816 * continue | |
19817 */ | |
19818 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_s, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19819 __Pyx_GOTREF(__pyx_t_2); | |
19820 __pyx_t_3 = NULL; | |
19821 __pyx_t_4 = 0; | |
19822 #if CYTHON_UNPACK_METHODS | |
19823 if (likely(PyMethod_Check(__pyx_t_2))) { | |
19824 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); | |
19825 if (likely(__pyx_t_3)) { | |
19826 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); | |
19827 __Pyx_INCREF(__pyx_t_3); | |
19828 __Pyx_INCREF(function); | |
19829 __Pyx_DECREF_SET(__pyx_t_2, function); | |
19830 __pyx_t_4 = 1; | |
19831 } | |
19832 } | |
19833 #endif | |
19834 { | |
19835 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__17}; | |
19836 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); | |
19837 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; | |
19838 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19839 __Pyx_GOTREF(__pyx_t_1); | |
19840 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
19841 } | |
19842 __pyx_t_2 = __pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_25attribute_string2iterator_genexpr(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19843 __Pyx_GOTREF(__pyx_t_2); | |
19844 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
19845 if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { | |
19846 __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); | |
19847 __pyx_t_5 = 0; | |
19848 __pyx_t_6 = NULL; | |
19849 } else { | |
19850 __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19851 __Pyx_GOTREF(__pyx_t_1); | |
19852 __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19853 } | |
19854 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
19855 for (;;) { | |
19856 if (likely(!__pyx_t_6)) { | |
19857 if (likely(PyList_CheckExact(__pyx_t_1))) { | |
19858 { | |
19859 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); | |
19860 #if !CYTHON_ASSUME_SAFE_MACROS | |
19861 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 684, __pyx_L1_error) | |
19862 #endif | |
19863 if (__pyx_t_5 >= __pyx_temp) break; | |
19864 } | |
19865 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
19866 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 684, __pyx_L1_error) | |
19867 #else | |
19868 __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19869 __Pyx_GOTREF(__pyx_t_2); | |
19870 #endif | |
19871 } else { | |
19872 { | |
19873 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); | |
19874 #if !CYTHON_ASSUME_SAFE_MACROS | |
19875 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 684, __pyx_L1_error) | |
19876 #endif | |
19877 if (__pyx_t_5 >= __pyx_temp) break; | |
19878 } | |
19879 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
19880 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 684, __pyx_L1_error) | |
19881 #else | |
19882 __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) | |
19883 __Pyx_GOTREF(__pyx_t_2); | |
19884 #endif | |
19885 } | |
19886 } else { | |
19887 __pyx_t_2 = __pyx_t_6(__pyx_t_1); | |
19888 if (unlikely(!__pyx_t_2)) { | |
19889 PyObject* exc_type = PyErr_Occurred(); | |
19890 if (exc_type) { | |
19891 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); | |
19892 else __PYX_ERR(0, 684, __pyx_L1_error) | |
19893 } | |
19894 break; | |
19895 } | |
19896 __Pyx_GOTREF(__pyx_t_2); | |
19897 } | |
19898 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f); | |
19899 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_2); | |
19900 __Pyx_GIVEREF(__pyx_t_2); | |
19901 __pyx_t_2 = 0; | |
19902 | |
19903 /* "pysam/libctabixproxies.pyx":685 | |
19904 * | |
19905 * for f in (x.strip() for x in s.split(";")): | |
19906 * if not f: # <<<<<<<<<<<<<< | |
19907 * continue | |
19908 * | |
19909 */ | |
19910 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_f); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 685, __pyx_L1_error) | |
19911 __pyx_t_8 = (!__pyx_t_7); | |
19912 if (__pyx_t_8) { | |
19913 | |
19914 /* "pysam/libctabixproxies.pyx":686 | |
19915 * for f in (x.strip() for x in s.split(";")): | |
19916 * if not f: | |
19917 * continue # <<<<<<<<<<<<<< | |
19918 * | |
19919 * key, value = f.split("=", 1) | |
19920 */ | |
19921 goto __pyx_L4_continue; | |
19922 | |
19923 /* "pysam/libctabixproxies.pyx":685 | |
19924 * | |
19925 * for f in (x.strip() for x in s.split(";")): | |
19926 * if not f: # <<<<<<<<<<<<<< | |
19927 * continue | |
19928 * | |
19929 */ | |
19930 } | |
19931 | |
19932 /* "pysam/libctabixproxies.pyx":688 | |
19933 * continue | |
19934 * | |
19935 * key, value = f.split("=", 1) # <<<<<<<<<<<<<< | |
19936 * value = value.strip() | |
19937 * | |
19938 */ | |
19939 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_f, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) | |
19940 __Pyx_GOTREF(__pyx_t_2); | |
19941 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 688, __pyx_L1_error) | |
19942 __Pyx_GOTREF(__pyx_t_3); | |
19943 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
19944 if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { | |
19945 PyObject* sequence = __pyx_t_3; | |
19946 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); | |
19947 if (unlikely(size != 2)) { | |
19948 if (size > 2) __Pyx_RaiseTooManyValuesError(2); | |
19949 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); | |
19950 __PYX_ERR(0, 688, __pyx_L1_error) | |
19951 } | |
19952 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
19953 if (likely(PyTuple_CheckExact(sequence))) { | |
19954 __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); | |
19955 __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); | |
19956 } else { | |
19957 __pyx_t_2 = PyList_GET_ITEM(sequence, 0); | |
19958 __pyx_t_9 = PyList_GET_ITEM(sequence, 1); | |
19959 } | |
19960 __Pyx_INCREF(__pyx_t_2); | |
19961 __Pyx_INCREF(__pyx_t_9); | |
19962 #else | |
19963 __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) | |
19964 __Pyx_GOTREF(__pyx_t_2); | |
19965 __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 688, __pyx_L1_error) | |
19966 __Pyx_GOTREF(__pyx_t_9); | |
19967 #endif | |
19968 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
19969 } else { | |
19970 Py_ssize_t index = -1; | |
19971 __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 688, __pyx_L1_error) | |
19972 __Pyx_GOTREF(__pyx_t_10); | |
19973 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
19974 __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); | |
19975 index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed; | |
19976 __Pyx_GOTREF(__pyx_t_2); | |
19977 index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L7_unpacking_failed; | |
19978 __Pyx_GOTREF(__pyx_t_9); | |
19979 if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 688, __pyx_L1_error) | |
19980 __pyx_t_11 = NULL; | |
19981 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; | |
19982 goto __pyx_L8_unpacking_done; | |
19983 __pyx_L7_unpacking_failed:; | |
19984 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; | |
19985 __pyx_t_11 = NULL; | |
19986 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); | |
19987 __PYX_ERR(0, 688, __pyx_L1_error) | |
19988 __pyx_L8_unpacking_done:; | |
19989 } | |
19990 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key); | |
19991 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_2); | |
19992 __Pyx_GIVEREF(__pyx_t_2); | |
19993 __pyx_t_2 = 0; | |
19994 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_value); | |
19995 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_9); | |
19996 __Pyx_GIVEREF(__pyx_t_9); | |
19997 __pyx_t_9 = 0; | |
19998 | |
19999 /* "pysam/libctabixproxies.pyx":689 | |
20000 * | |
20001 * key, value = f.split("=", 1) | |
20002 * value = value.strip() # <<<<<<<<<<<<<< | |
20003 * | |
20004 * ## try to convert to a value | |
20005 */ | |
20006 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_value, __pyx_n_s_strip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 689, __pyx_L1_error) | |
20007 __Pyx_GOTREF(__pyx_t_9); | |
20008 __pyx_t_2 = NULL; | |
20009 __pyx_t_4 = 0; | |
20010 #if CYTHON_UNPACK_METHODS | |
20011 if (likely(PyMethod_Check(__pyx_t_9))) { | |
20012 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); | |
20013 if (likely(__pyx_t_2)) { | |
20014 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); | |
20015 __Pyx_INCREF(__pyx_t_2); | |
20016 __Pyx_INCREF(function); | |
20017 __Pyx_DECREF_SET(__pyx_t_9, function); | |
20018 __pyx_t_4 = 1; | |
20019 } | |
20020 } | |
20021 #endif | |
20022 { | |
20023 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; | |
20024 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); | |
20025 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; | |
20026 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error) | |
20027 __Pyx_GOTREF(__pyx_t_3); | |
20028 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; | |
20029 } | |
20030 __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_value); | |
20031 __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_3); | |
20032 __Pyx_GIVEREF(__pyx_t_3); | |
20033 __pyx_t_3 = 0; | |
20034 | |
20035 /* "pysam/libctabixproxies.pyx":692 | |
20036 * | |
20037 * ## try to convert to a value | |
20038 * try: # <<<<<<<<<<<<<< | |
20039 * value = float(value) | |
20040 * value = int(value) | |
20041 */ | |
20042 { | |
20043 __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); | |
20044 __Pyx_XGOTREF(__pyx_t_12); | |
20045 __Pyx_XGOTREF(__pyx_t_13); | |
20046 __Pyx_XGOTREF(__pyx_t_14); | |
20047 /*try:*/ { | |
20048 | |
20049 /* "pysam/libctabixproxies.pyx":693 | |
20050 * ## try to convert to a value | |
20051 * try: | |
20052 * value = float(value) # <<<<<<<<<<<<<< | |
20053 * value = int(value) | |
20054 * except ValueError: | |
20055 */ | |
20056 __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_cur_scope->__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L9_error) | |
20057 __Pyx_GOTREF(__pyx_t_3); | |
20058 __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_value); | |
20059 __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_3); | |
20060 __Pyx_GIVEREF(__pyx_t_3); | |
20061 __pyx_t_3 = 0; | |
20062 | |
20063 /* "pysam/libctabixproxies.pyx":694 | |
20064 * try: | |
20065 * value = float(value) | |
20066 * value = int(value) # <<<<<<<<<<<<<< | |
20067 * except ValueError: | |
20068 * pass | |
20069 */ | |
20070 __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_cur_scope->__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L9_error) | |
20071 __Pyx_GOTREF(__pyx_t_3); | |
20072 __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_value); | |
20073 __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_3); | |
20074 __Pyx_GIVEREF(__pyx_t_3); | |
20075 __pyx_t_3 = 0; | |
20076 | |
20077 /* "pysam/libctabixproxies.pyx":692 | |
20078 * | |
20079 * ## try to convert to a value | |
20080 * try: # <<<<<<<<<<<<<< | |
20081 * value = float(value) | |
20082 * value = int(value) | |
20083 */ | |
20084 } | |
20085 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; | |
20086 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; | |
20087 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; | |
20088 goto __pyx_L16_try_end; | |
20089 __pyx_L9_error:; | |
20090 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; | |
20091 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; | |
20092 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; | |
20093 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; | |
20094 | |
20095 /* "pysam/libctabixproxies.pyx":695 | |
20096 * value = float(value) | |
20097 * value = int(value) | |
20098 * except ValueError: # <<<<<<<<<<<<<< | |
20099 * pass | |
20100 * except TypeError: | |
20101 */ | |
20102 __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); | |
20103 if (__pyx_t_15) { | |
20104 __Pyx_ErrRestore(0,0,0); | |
20105 goto __pyx_L10_exception_handled; | |
20106 } | |
20107 | |
20108 /* "pysam/libctabixproxies.pyx":697 | |
20109 * except ValueError: | |
20110 * pass | |
20111 * except TypeError: # <<<<<<<<<<<<<< | |
20112 * pass | |
20113 * | |
20114 */ | |
20115 __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); | |
20116 if (__pyx_t_15) { | |
20117 __Pyx_ErrRestore(0,0,0); | |
20118 goto __pyx_L10_exception_handled; | |
20119 } | |
20120 goto __pyx_L11_except_error; | |
20121 | |
20122 /* "pysam/libctabixproxies.pyx":692 | |
20123 * | |
20124 * ## try to convert to a value | |
20125 * try: # <<<<<<<<<<<<<< | |
20126 * value = float(value) | |
20127 * value = int(value) | |
20128 */ | |
20129 __pyx_L11_except_error:; | |
20130 __Pyx_XGIVEREF(__pyx_t_12); | |
20131 __Pyx_XGIVEREF(__pyx_t_13); | |
20132 __Pyx_XGIVEREF(__pyx_t_14); | |
20133 __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); | |
20134 goto __pyx_L1_error; | |
20135 __pyx_L10_exception_handled:; | |
20136 __Pyx_XGIVEREF(__pyx_t_12); | |
20137 __Pyx_XGIVEREF(__pyx_t_13); | |
20138 __Pyx_XGIVEREF(__pyx_t_14); | |
20139 __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); | |
20140 __pyx_L16_try_end:; | |
20141 } | |
20142 | |
20143 /* "pysam/libctabixproxies.pyx":700 | |
20144 * pass | |
20145 * | |
20146 * yield key.strip(), value # <<<<<<<<<<<<<< | |
20147 * | |
20148 * | |
20149 */ | |
20150 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_key, __pyx_n_s_strip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 700, __pyx_L1_error) | |
20151 __Pyx_GOTREF(__pyx_t_9); | |
20152 __pyx_t_2 = NULL; | |
20153 __pyx_t_4 = 0; | |
20154 #if CYTHON_UNPACK_METHODS | |
20155 if (likely(PyMethod_Check(__pyx_t_9))) { | |
20156 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); | |
20157 if (likely(__pyx_t_2)) { | |
20158 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); | |
20159 __Pyx_INCREF(__pyx_t_2); | |
20160 __Pyx_INCREF(function); | |
20161 __Pyx_DECREF_SET(__pyx_t_9, function); | |
20162 __pyx_t_4 = 1; | |
20163 } | |
20164 } | |
20165 #endif | |
20166 { | |
20167 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; | |
20168 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); | |
20169 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; | |
20170 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error) | |
20171 __Pyx_GOTREF(__pyx_t_3); | |
20172 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; | |
20173 } | |
20174 __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 700, __pyx_L1_error) | |
20175 __Pyx_GOTREF(__pyx_t_9); | |
20176 __Pyx_GIVEREF(__pyx_t_3); | |
20177 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error); | |
20178 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value); | |
20179 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value); | |
20180 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_cur_scope->__pyx_v_value)) __PYX_ERR(0, 700, __pyx_L1_error); | |
20181 __pyx_t_3 = 0; | |
20182 __pyx_r = __pyx_t_9; | |
20183 __pyx_t_9 = 0; | |
20184 __Pyx_XGIVEREF(__pyx_t_1); | |
20185 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; | |
20186 __pyx_cur_scope->__pyx_t_1 = __pyx_t_5; | |
20187 __pyx_cur_scope->__pyx_t_2 = __pyx_t_6; | |
20188 __Pyx_XGIVEREF(__pyx_r); | |
20189 __Pyx_RefNannyFinishContext(); | |
20190 __Pyx_Coroutine_ResetAndClearException(__pyx_generator); | |
20191 /* return from generator, yielding value */ | |
20192 __pyx_generator->resume_label = 1; | |
20193 return __pyx_r; | |
20194 __pyx_L17_resume_from_yield:; | |
20195 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; | |
20196 __pyx_cur_scope->__pyx_t_0 = 0; | |
20197 __Pyx_XGOTREF(__pyx_t_1); | |
20198 __pyx_t_5 = __pyx_cur_scope->__pyx_t_1; | |
20199 __pyx_t_6 = __pyx_cur_scope->__pyx_t_2; | |
20200 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 700, __pyx_L1_error) | |
20201 | |
20202 /* "pysam/libctabixproxies.pyx":684 | |
20203 * """ | |
20204 * | |
20205 * for f in (x.strip() for x in s.split(";")): # <<<<<<<<<<<<<< | |
20206 * if not f: | |
20207 * continue | |
20208 */ | |
20209 __pyx_L4_continue:; | |
20210 } | |
20211 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
20212 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); | |
20213 | |
20214 /* "pysam/libctabixproxies.pyx":679 | |
20215 * return ";".join(["{}={}".format(k, v) for k, v in d.items()]) | |
20216 * | |
20217 * def attribute_string2iterator(self, s): # <<<<<<<<<<<<<< | |
20218 * """convert attribute string in GFF3 format to records | |
20219 * and iterate over key, value pairs. | |
20220 */ | |
20221 | |
20222 /* function exit code */ | |
20223 PyErr_SetNone(PyExc_StopIteration); | |
20224 goto __pyx_L0; | |
20225 __pyx_L1_error:; | |
20226 __Pyx_Generator_Replace_StopIteration(0); | |
20227 __Pyx_XDECREF(__pyx_t_1); | |
20228 __Pyx_XDECREF(__pyx_t_2); | |
20229 __Pyx_XDECREF(__pyx_t_3); | |
20230 __Pyx_XDECREF(__pyx_t_9); | |
20231 __Pyx_XDECREF(__pyx_t_10); | |
20232 __Pyx_AddTraceback("attribute_string2iterator", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
20233 __pyx_L0:; | |
20234 __Pyx_XDECREF(__pyx_r); __pyx_r = 0; | |
20235 #if !CYTHON_USE_EXC_INFO_STACK | |
20236 __Pyx_Coroutine_ResetAndClearException(__pyx_generator); | |
20237 #endif | |
20238 __pyx_generator->resume_label = -1; | |
20239 __Pyx_Coroutine_clear((PyObject*)__pyx_generator); | |
20240 __Pyx_RefNannyFinishContext(); | |
20241 return __pyx_r; | |
20242 } | |
20243 | |
20244 /* "(tree fragment)":1 | |
20245 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
20246 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
20247 * def __setstate_cython__(self, __pyx_state): | |
20248 */ | |
20249 | |
20250 /* Python wrapper */ | |
20251 static PyObject *__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_6__reduce_cython__(PyObject *__pyx_v_self, | |
20252 #if CYTHON_METH_FASTCALL | |
20253 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
20254 #else | |
20255 PyObject *__pyx_args, PyObject *__pyx_kwds | |
20256 #endif | |
20257 ); /*proto*/ | |
20258 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_9GFF3Proxy_6__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_6__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
20259 static PyObject *__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_6__reduce_cython__(PyObject *__pyx_v_self, | |
20260 #if CYTHON_METH_FASTCALL | |
20261 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
20262 #else | |
20263 PyObject *__pyx_args, PyObject *__pyx_kwds | |
20264 #endif | |
20265 ) { | |
20266 #if !CYTHON_METH_FASTCALL | |
20267 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
20268 #endif | |
20269 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
20270 PyObject *__pyx_r = 0; | |
20271 __Pyx_RefNannyDeclarations | |
20272 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); | |
20273 #if !CYTHON_METH_FASTCALL | |
20274 #if CYTHON_ASSUME_SAFE_MACROS | |
20275 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
20276 #else | |
20277 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
20278 #endif | |
20279 #endif | |
20280 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
20281 if (unlikely(__pyx_nargs > 0)) { | |
20282 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} | |
20283 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; | |
20284 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_5__reduce_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *)__pyx_v_self)); | |
20285 | |
20286 /* function exit code */ | |
20287 __Pyx_RefNannyFinishContext(); | |
20288 return __pyx_r; | |
20289 } | |
20290 | |
20291 static PyObject *__pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_5__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *__pyx_v_self) { | |
20292 PyObject *__pyx_r = NULL; | |
20293 __Pyx_RefNannyDeclarations | |
20294 int __pyx_lineno = 0; | |
20295 const char *__pyx_filename = NULL; | |
20296 int __pyx_clineno = 0; | |
20297 __Pyx_RefNannySetupContext("__reduce_cython__", 1); | |
20298 | |
20299 /* "(tree fragment)":2 | |
20300 * def __reduce_cython__(self): | |
20301 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
20302 * def __setstate_cython__(self, __pyx_state): | |
20303 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
20304 */ | |
20305 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
20306 __PYX_ERR(1, 2, __pyx_L1_error) | |
20307 | |
20308 /* "(tree fragment)":1 | |
20309 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
20310 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
20311 * def __setstate_cython__(self, __pyx_state): | |
20312 */ | |
20313 | |
20314 /* function exit code */ | |
20315 __pyx_L1_error:; | |
20316 __Pyx_AddTraceback("pysam.libctabixproxies.GFF3Proxy.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
20317 __pyx_r = NULL; | |
20318 __Pyx_XGIVEREF(__pyx_r); | |
20319 __Pyx_RefNannyFinishContext(); | |
20320 return __pyx_r; | |
20321 } | |
20322 | |
20323 /* "(tree fragment)":3 | |
20324 * def __reduce_cython__(self): | |
20325 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
20326 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
20327 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
20328 */ | |
20329 | |
20330 /* Python wrapper */ | |
20331 static PyObject *__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_8__setstate_cython__(PyObject *__pyx_v_self, | |
20332 #if CYTHON_METH_FASTCALL | |
20333 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
20334 #else | |
20335 PyObject *__pyx_args, PyObject *__pyx_kwds | |
20336 #endif | |
20337 ); /*proto*/ | |
20338 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_9GFF3Proxy_8__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_8__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
20339 static PyObject *__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_8__setstate_cython__(PyObject *__pyx_v_self, | |
20340 #if CYTHON_METH_FASTCALL | |
20341 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
20342 #else | |
20343 PyObject *__pyx_args, PyObject *__pyx_kwds | |
20344 #endif | |
20345 ) { | |
20346 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; | |
20347 #if !CYTHON_METH_FASTCALL | |
20348 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
20349 #endif | |
20350 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
20351 PyObject* values[1] = {0}; | |
20352 int __pyx_lineno = 0; | |
20353 const char *__pyx_filename = NULL; | |
20354 int __pyx_clineno = 0; | |
20355 PyObject *__pyx_r = 0; | |
20356 __Pyx_RefNannyDeclarations | |
20357 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); | |
20358 #if !CYTHON_METH_FASTCALL | |
20359 #if CYTHON_ASSUME_SAFE_MACROS | |
20360 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
20361 #else | |
20362 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
20363 #endif | |
20364 #endif | |
20365 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
20366 { | |
20367 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; | |
20368 if (__pyx_kwds) { | |
20369 Py_ssize_t kw_args; | |
20370 switch (__pyx_nargs) { | |
20371 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
20372 CYTHON_FALLTHROUGH; | |
20373 case 0: break; | |
20374 default: goto __pyx_L5_argtuple_error; | |
20375 } | |
20376 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
20377 switch (__pyx_nargs) { | |
20378 case 0: | |
20379 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { | |
20380 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
20381 kw_args--; | |
20382 } | |
20383 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) | |
20384 else goto __pyx_L5_argtuple_error; | |
20385 } | |
20386 if (unlikely(kw_args > 0)) { | |
20387 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
20388 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) | |
20389 } | |
20390 } else if (unlikely(__pyx_nargs != 1)) { | |
20391 goto __pyx_L5_argtuple_error; | |
20392 } else { | |
20393 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
20394 } | |
20395 __pyx_v___pyx_state = values[0]; | |
20396 } | |
20397 goto __pyx_L6_skip; | |
20398 __pyx_L5_argtuple_error:; | |
20399 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) | |
20400 __pyx_L6_skip:; | |
20401 goto __pyx_L4_argument_unpacking_done; | |
20402 __pyx_L3_error:; | |
20403 { | |
20404 Py_ssize_t __pyx_temp; | |
20405 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
20406 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
20407 } | |
20408 } | |
20409 __Pyx_AddTraceback("pysam.libctabixproxies.GFF3Proxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
20410 __Pyx_RefNannyFinishContext(); | |
20411 return NULL; | |
20412 __pyx_L4_argument_unpacking_done:; | |
20413 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_7__setstate_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *)__pyx_v_self), __pyx_v___pyx_state); | |
20414 | |
20415 /* function exit code */ | |
20416 { | |
20417 Py_ssize_t __pyx_temp; | |
20418 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
20419 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
20420 } | |
20421 } | |
20422 __Pyx_RefNannyFinishContext(); | |
20423 return __pyx_r; | |
20424 } | |
20425 | |
20426 static PyObject *__pyx_pf_5pysam_16libctabixproxies_9GFF3Proxy_7__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { | |
20427 PyObject *__pyx_r = NULL; | |
20428 __Pyx_RefNannyDeclarations | |
20429 int __pyx_lineno = 0; | |
20430 const char *__pyx_filename = NULL; | |
20431 int __pyx_clineno = 0; | |
20432 __Pyx_RefNannySetupContext("__setstate_cython__", 1); | |
20433 | |
20434 /* "(tree fragment)":4 | |
20435 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
20436 * def __setstate_cython__(self, __pyx_state): | |
20437 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
20438 */ | |
20439 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
20440 __PYX_ERR(1, 4, __pyx_L1_error) | |
20441 | |
20442 /* "(tree fragment)":3 | |
20443 * def __reduce_cython__(self): | |
20444 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
20445 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
20446 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
20447 */ | |
20448 | |
20449 /* function exit code */ | |
20450 __pyx_L1_error:; | |
20451 __Pyx_AddTraceback("pysam.libctabixproxies.GFF3Proxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
20452 __pyx_r = NULL; | |
20453 __Pyx_XGIVEREF(__pyx_r); | |
20454 __Pyx_RefNannyFinishContext(); | |
20455 return __pyx_r; | |
20456 } | |
20457 | |
20458 /* "pysam/libctabixproxies.pyx":722 | |
20459 * 'blockStarts': (11, str), } | |
20460 * | |
20461 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
20462 * '''return minimum number of fields.''' | |
20463 * return 3 | |
20464 */ | |
20465 | |
20466 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_1getMinFields(PyObject *__pyx_v_self, | |
20467 #if CYTHON_METH_FASTCALL | |
20468 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
20469 #else | |
20470 PyObject *__pyx_args, PyObject *__pyx_kwds | |
20471 #endif | |
20472 ); /*proto*/ | |
20473 static int __pyx_f_5pysam_16libctabixproxies_8BedProxy_getMinFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self, int __pyx_skip_dispatch) { | |
20474 int __pyx_r; | |
20475 __Pyx_RefNannyDeclarations | |
20476 PyObject *__pyx_t_1 = NULL; | |
20477 PyObject *__pyx_t_2 = NULL; | |
20478 PyObject *__pyx_t_3 = NULL; | |
20479 PyObject *__pyx_t_4 = NULL; | |
20480 unsigned int __pyx_t_5; | |
20481 int __pyx_t_6; | |
20482 int __pyx_lineno = 0; | |
20483 const char *__pyx_filename = NULL; | |
20484 int __pyx_clineno = 0; | |
20485 __Pyx_RefNannySetupContext("getMinFields", 1); | |
20486 /* Check if called by wrapper */ | |
20487 if (unlikely(__pyx_skip_dispatch)) ; | |
20488 /* Check if overridden in Python */ | |
20489 else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { | |
20490 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
20491 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
20492 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { | |
20493 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
20494 #endif | |
20495 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMinFields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error) | |
20496 __Pyx_GOTREF(__pyx_t_1); | |
20497 if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_5pysam_16libctabixproxies_8BedProxy_1getMinFields)) { | |
20498 __Pyx_INCREF(__pyx_t_1); | |
20499 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; | |
20500 __pyx_t_5 = 0; | |
20501 #if CYTHON_UNPACK_METHODS | |
20502 if (unlikely(PyMethod_Check(__pyx_t_3))) { | |
20503 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); | |
20504 if (likely(__pyx_t_4)) { | |
20505 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
20506 __Pyx_INCREF(__pyx_t_4); | |
20507 __Pyx_INCREF(function); | |
20508 __Pyx_DECREF_SET(__pyx_t_3, function); | |
20509 __pyx_t_5 = 1; | |
20510 } | |
20511 } | |
20512 #endif | |
20513 { | |
20514 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; | |
20515 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); | |
20516 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
20517 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error) | |
20518 __Pyx_GOTREF(__pyx_t_2); | |
20519 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
20520 } | |
20521 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error) | |
20522 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
20523 __pyx_r = __pyx_t_6; | |
20524 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
20525 goto __pyx_L0; | |
20526 } | |
20527 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
20528 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
20529 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); | |
20530 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { | |
20531 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
20532 } | |
20533 #endif | |
20534 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
20535 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
20536 } | |
20537 #endif | |
20538 } | |
20539 | |
20540 /* "pysam/libctabixproxies.pyx":724 | |
20541 * cpdef int getMinFields(self): | |
20542 * '''return minimum number of fields.''' | |
20543 * return 3 # <<<<<<<<<<<<<< | |
20544 * | |
20545 * cpdef int getMaxFields(self): | |
20546 */ | |
20547 __pyx_r = 3; | |
20548 goto __pyx_L0; | |
20549 | |
20550 /* "pysam/libctabixproxies.pyx":722 | |
20551 * 'blockStarts': (11, str), } | |
20552 * | |
20553 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
20554 * '''return minimum number of fields.''' | |
20555 * return 3 | |
20556 */ | |
20557 | |
20558 /* function exit code */ | |
20559 __pyx_L1_error:; | |
20560 __Pyx_XDECREF(__pyx_t_1); | |
20561 __Pyx_XDECREF(__pyx_t_2); | |
20562 __Pyx_XDECREF(__pyx_t_3); | |
20563 __Pyx_XDECREF(__pyx_t_4); | |
20564 __Pyx_AddTraceback("pysam.libctabixproxies.BedProxy.getMinFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
20565 __pyx_r = 0; | |
20566 __pyx_L0:; | |
20567 __Pyx_RefNannyFinishContext(); | |
20568 return __pyx_r; | |
20569 } | |
20570 | |
20571 /* Python wrapper */ | |
20572 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_1getMinFields(PyObject *__pyx_v_self, | |
20573 #if CYTHON_METH_FASTCALL | |
20574 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
20575 #else | |
20576 PyObject *__pyx_args, PyObject *__pyx_kwds | |
20577 #endif | |
20578 ); /*proto*/ | |
20579 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8BedProxy_getMinFields, "return minimum number of fields."); | |
20580 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8BedProxy_1getMinFields = {"getMinFields", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8BedProxy_1getMinFields, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8BedProxy_getMinFields}; | |
20581 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_1getMinFields(PyObject *__pyx_v_self, | |
20582 #if CYTHON_METH_FASTCALL | |
20583 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
20584 #else | |
20585 PyObject *__pyx_args, PyObject *__pyx_kwds | |
20586 #endif | |
20587 ) { | |
20588 #if !CYTHON_METH_FASTCALL | |
20589 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
20590 #endif | |
20591 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
20592 PyObject *__pyx_r = 0; | |
20593 __Pyx_RefNannyDeclarations | |
20594 __Pyx_RefNannySetupContext("getMinFields (wrapper)", 0); | |
20595 #if !CYTHON_METH_FASTCALL | |
20596 #if CYTHON_ASSUME_SAFE_MACROS | |
20597 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
20598 #else | |
20599 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
20600 #endif | |
20601 #endif | |
20602 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
20603 if (unlikely(__pyx_nargs > 0)) { | |
20604 __Pyx_RaiseArgtupleInvalid("getMinFields", 1, 0, 0, __pyx_nargs); return NULL;} | |
20605 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMinFields", 0))) return NULL; | |
20606 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8BedProxy_getMinFields(((struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *)__pyx_v_self)); | |
20607 | |
20608 /* function exit code */ | |
20609 __Pyx_RefNannyFinishContext(); | |
20610 return __pyx_r; | |
20611 } | |
20612 | |
20613 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8BedProxy_getMinFields(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self) { | |
20614 PyObject *__pyx_r = NULL; | |
20615 __Pyx_RefNannyDeclarations | |
20616 int __pyx_t_1; | |
20617 PyObject *__pyx_t_2 = NULL; | |
20618 int __pyx_lineno = 0; | |
20619 const char *__pyx_filename = NULL; | |
20620 int __pyx_clineno = 0; | |
20621 __Pyx_RefNannySetupContext("getMinFields", 1); | |
20622 __Pyx_XDECREF(__pyx_r); | |
20623 __pyx_t_1 = __pyx_f_5pysam_16libctabixproxies_8BedProxy_getMinFields(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error) | |
20624 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error) | |
20625 __Pyx_GOTREF(__pyx_t_2); | |
20626 __pyx_r = __pyx_t_2; | |
20627 __pyx_t_2 = 0; | |
20628 goto __pyx_L0; | |
20629 | |
20630 /* function exit code */ | |
20631 __pyx_L1_error:; | |
20632 __Pyx_XDECREF(__pyx_t_2); | |
20633 __Pyx_AddTraceback("pysam.libctabixproxies.BedProxy.getMinFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
20634 __pyx_r = NULL; | |
20635 __pyx_L0:; | |
20636 __Pyx_XGIVEREF(__pyx_r); | |
20637 __Pyx_RefNannyFinishContext(); | |
20638 return __pyx_r; | |
20639 } | |
20640 | |
20641 /* "pysam/libctabixproxies.pyx":726 | |
20642 * return 3 | |
20643 * | |
20644 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
20645 * '''return max number of fields.''' | |
20646 * return 12 | |
20647 */ | |
20648 | |
20649 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_3getMaxFields(PyObject *__pyx_v_self, | |
20650 #if CYTHON_METH_FASTCALL | |
20651 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
20652 #else | |
20653 PyObject *__pyx_args, PyObject *__pyx_kwds | |
20654 #endif | |
20655 ); /*proto*/ | |
20656 static int __pyx_f_5pysam_16libctabixproxies_8BedProxy_getMaxFields(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self, int __pyx_skip_dispatch) { | |
20657 int __pyx_r; | |
20658 __Pyx_RefNannyDeclarations | |
20659 PyObject *__pyx_t_1 = NULL; | |
20660 PyObject *__pyx_t_2 = NULL; | |
20661 PyObject *__pyx_t_3 = NULL; | |
20662 PyObject *__pyx_t_4 = NULL; | |
20663 unsigned int __pyx_t_5; | |
20664 int __pyx_t_6; | |
20665 int __pyx_lineno = 0; | |
20666 const char *__pyx_filename = NULL; | |
20667 int __pyx_clineno = 0; | |
20668 __Pyx_RefNannySetupContext("getMaxFields", 1); | |
20669 /* Check if called by wrapper */ | |
20670 if (unlikely(__pyx_skip_dispatch)) ; | |
20671 /* Check if overridden in Python */ | |
20672 else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { | |
20673 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
20674 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
20675 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { | |
20676 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
20677 #endif | |
20678 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMaxFields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error) | |
20679 __Pyx_GOTREF(__pyx_t_1); | |
20680 if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_5pysam_16libctabixproxies_8BedProxy_3getMaxFields)) { | |
20681 __Pyx_INCREF(__pyx_t_1); | |
20682 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; | |
20683 __pyx_t_5 = 0; | |
20684 #if CYTHON_UNPACK_METHODS | |
20685 if (unlikely(PyMethod_Check(__pyx_t_3))) { | |
20686 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); | |
20687 if (likely(__pyx_t_4)) { | |
20688 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
20689 __Pyx_INCREF(__pyx_t_4); | |
20690 __Pyx_INCREF(function); | |
20691 __Pyx_DECREF_SET(__pyx_t_3, function); | |
20692 __pyx_t_5 = 1; | |
20693 } | |
20694 } | |
20695 #endif | |
20696 { | |
20697 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; | |
20698 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); | |
20699 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
20700 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error) | |
20701 __Pyx_GOTREF(__pyx_t_2); | |
20702 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
20703 } | |
20704 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 726, __pyx_L1_error) | |
20705 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
20706 __pyx_r = __pyx_t_6; | |
20707 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
20708 goto __pyx_L0; | |
20709 } | |
20710 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
20711 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); | |
20712 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); | |
20713 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { | |
20714 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; | |
20715 } | |
20716 #endif | |
20717 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
20718 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS | |
20719 } | |
20720 #endif | |
20721 } | |
20722 | |
20723 /* "pysam/libctabixproxies.pyx":728 | |
20724 * cpdef int getMaxFields(self): | |
20725 * '''return max number of fields.''' | |
20726 * return 12 # <<<<<<<<<<<<<< | |
20727 * | |
20728 * cdef update(self, char * buffer, size_t nbytes): | |
20729 */ | |
20730 __pyx_r = 12; | |
20731 goto __pyx_L0; | |
20732 | |
20733 /* "pysam/libctabixproxies.pyx":726 | |
20734 * return 3 | |
20735 * | |
20736 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
20737 * '''return max number of fields.''' | |
20738 * return 12 | |
20739 */ | |
20740 | |
20741 /* function exit code */ | |
20742 __pyx_L1_error:; | |
20743 __Pyx_XDECREF(__pyx_t_1); | |
20744 __Pyx_XDECREF(__pyx_t_2); | |
20745 __Pyx_XDECREF(__pyx_t_3); | |
20746 __Pyx_XDECREF(__pyx_t_4); | |
20747 __Pyx_AddTraceback("pysam.libctabixproxies.BedProxy.getMaxFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
20748 __pyx_r = 0; | |
20749 __pyx_L0:; | |
20750 __Pyx_RefNannyFinishContext(); | |
20751 return __pyx_r; | |
20752 } | |
20753 | |
20754 /* Python wrapper */ | |
20755 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_3getMaxFields(PyObject *__pyx_v_self, | |
20756 #if CYTHON_METH_FASTCALL | |
20757 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
20758 #else | |
20759 PyObject *__pyx_args, PyObject *__pyx_kwds | |
20760 #endif | |
20761 ); /*proto*/ | |
20762 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8BedProxy_2getMaxFields, "return max number of fields."); | |
20763 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8BedProxy_3getMaxFields = {"getMaxFields", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8BedProxy_3getMaxFields, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8BedProxy_2getMaxFields}; | |
20764 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_3getMaxFields(PyObject *__pyx_v_self, | |
20765 #if CYTHON_METH_FASTCALL | |
20766 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
20767 #else | |
20768 PyObject *__pyx_args, PyObject *__pyx_kwds | |
20769 #endif | |
20770 ) { | |
20771 #if !CYTHON_METH_FASTCALL | |
20772 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
20773 #endif | |
20774 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
20775 PyObject *__pyx_r = 0; | |
20776 __Pyx_RefNannyDeclarations | |
20777 __Pyx_RefNannySetupContext("getMaxFields (wrapper)", 0); | |
20778 #if !CYTHON_METH_FASTCALL | |
20779 #if CYTHON_ASSUME_SAFE_MACROS | |
20780 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
20781 #else | |
20782 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
20783 #endif | |
20784 #endif | |
20785 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
20786 if (unlikely(__pyx_nargs > 0)) { | |
20787 __Pyx_RaiseArgtupleInvalid("getMaxFields", 1, 0, 0, __pyx_nargs); return NULL;} | |
20788 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMaxFields", 0))) return NULL; | |
20789 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8BedProxy_2getMaxFields(((struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *)__pyx_v_self)); | |
20790 | |
20791 /* function exit code */ | |
20792 __Pyx_RefNannyFinishContext(); | |
20793 return __pyx_r; | |
20794 } | |
20795 | |
20796 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8BedProxy_2getMaxFields(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self) { | |
20797 PyObject *__pyx_r = NULL; | |
20798 __Pyx_RefNannyDeclarations | |
20799 int __pyx_t_1; | |
20800 PyObject *__pyx_t_2 = NULL; | |
20801 int __pyx_lineno = 0; | |
20802 const char *__pyx_filename = NULL; | |
20803 int __pyx_clineno = 0; | |
20804 __Pyx_RefNannySetupContext("getMaxFields", 1); | |
20805 __Pyx_XDECREF(__pyx_r); | |
20806 __pyx_t_1 = __pyx_f_5pysam_16libctabixproxies_8BedProxy_getMaxFields(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 726, __pyx_L1_error) | |
20807 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error) | |
20808 __Pyx_GOTREF(__pyx_t_2); | |
20809 __pyx_r = __pyx_t_2; | |
20810 __pyx_t_2 = 0; | |
20811 goto __pyx_L0; | |
20812 | |
20813 /* function exit code */ | |
20814 __pyx_L1_error:; | |
20815 __Pyx_XDECREF(__pyx_t_2); | |
20816 __Pyx_AddTraceback("pysam.libctabixproxies.BedProxy.getMaxFields", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
20817 __pyx_r = NULL; | |
20818 __pyx_L0:; | |
20819 __Pyx_XGIVEREF(__pyx_r); | |
20820 __Pyx_RefNannyFinishContext(); | |
20821 return __pyx_r; | |
20822 } | |
20823 | |
20824 /* "pysam/libctabixproxies.pyx":730 | |
20825 * return 12 | |
20826 * | |
20827 * cdef update(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
20828 * '''update internal data. | |
20829 * | |
20830 */ | |
20831 | |
20832 static PyObject *__pyx_f_5pysam_16libctabixproxies_8BedProxy_update(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { | |
20833 PyObject *__pyx_r = NULL; | |
20834 __Pyx_RefNannyDeclarations | |
20835 PyObject *__pyx_t_1 = NULL; | |
20836 int __pyx_t_2; | |
20837 int __pyx_t_3; | |
20838 int __pyx_lineno = 0; | |
20839 const char *__pyx_filename = NULL; | |
20840 int __pyx_clineno = 0; | |
20841 __Pyx_RefNannySetupContext("update", 1); | |
20842 | |
20843 /* "pysam/libctabixproxies.pyx":735 | |
20844 * nbytes does not include the terminal '\0'. | |
20845 * ''' | |
20846 * NamedTupleProxy.update(self, buffer, nbytes) # <<<<<<<<<<<<<< | |
20847 * | |
20848 * if self.nfields < 3: | |
20849 */ | |
20850 __pyx_t_1 = __pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy->__pyx_base.update(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error) | |
20851 __Pyx_GOTREF(__pyx_t_1); | |
20852 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
20853 | |
20854 /* "pysam/libctabixproxies.pyx":737 | |
20855 * NamedTupleProxy.update(self, buffer, nbytes) | |
20856 * | |
20857 * if self.nfields < 3: # <<<<<<<<<<<<<< | |
20858 * raise ValueError( | |
20859 * "bed format requires at least three columns") | |
20860 */ | |
20861 __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.nfields < 3); | |
20862 if (unlikely(__pyx_t_2)) { | |
20863 | |
20864 /* "pysam/libctabixproxies.pyx":738 | |
20865 * | |
20866 * if self.nfields < 3: | |
20867 * raise ValueError( # <<<<<<<<<<<<<< | |
20868 * "bed format requires at least three columns") | |
20869 * | |
20870 */ | |
20871 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error) | |
20872 __Pyx_GOTREF(__pyx_t_1); | |
20873 __Pyx_Raise(__pyx_t_1, 0, 0, 0); | |
20874 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
20875 __PYX_ERR(0, 738, __pyx_L1_error) | |
20876 | |
20877 /* "pysam/libctabixproxies.pyx":737 | |
20878 * NamedTupleProxy.update(self, buffer, nbytes) | |
20879 * | |
20880 * if self.nfields < 3: # <<<<<<<<<<<<<< | |
20881 * raise ValueError( | |
20882 * "bed format requires at least three columns") | |
20883 */ | |
20884 } | |
20885 | |
20886 /* "pysam/libctabixproxies.pyx":742 | |
20887 * | |
20888 * # determines bed format | |
20889 * self.bedfields = self.nfields # <<<<<<<<<<<<<< | |
20890 * | |
20891 * # do automatic conversion | |
20892 */ | |
20893 __pyx_t_3 = __pyx_v_self->__pyx_base.__pyx_base.nfields; | |
20894 __pyx_v_self->bedfields = __pyx_t_3; | |
20895 | |
20896 /* "pysam/libctabixproxies.pyx":745 | |
20897 * | |
20898 * # do automatic conversion | |
20899 * self.contig = self.fields[0] # <<<<<<<<<<<<<< | |
20900 * self.start = atoi(self.fields[1]) | |
20901 * self.end = atoi(self.fields[2]) | |
20902 */ | |
20903 __pyx_v_self->contig = (__pyx_v_self->__pyx_base.__pyx_base.fields[0]); | |
20904 | |
20905 /* "pysam/libctabixproxies.pyx":746 | |
20906 * # do automatic conversion | |
20907 * self.contig = self.fields[0] | |
20908 * self.start = atoi(self.fields[1]) # <<<<<<<<<<<<<< | |
20909 * self.end = atoi(self.fields[2]) | |
20910 * | |
20911 */ | |
20912 __pyx_v_self->start = atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[1])); | |
20913 | |
20914 /* "pysam/libctabixproxies.pyx":747 | |
20915 * self.contig = self.fields[0] | |
20916 * self.start = atoi(self.fields[1]) | |
20917 * self.end = atoi(self.fields[2]) # <<<<<<<<<<<<<< | |
20918 * | |
20919 * # __setattr__ in base class seems to take precedence | |
20920 */ | |
20921 __pyx_v_self->end = atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[2])); | |
20922 | |
20923 /* "pysam/libctabixproxies.pyx":730 | |
20924 * return 12 | |
20925 * | |
20926 * cdef update(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
20927 * '''update internal data. | |
20928 * | |
20929 */ | |
20930 | |
20931 /* function exit code */ | |
20932 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
20933 goto __pyx_L0; | |
20934 __pyx_L1_error:; | |
20935 __Pyx_XDECREF(__pyx_t_1); | |
20936 __Pyx_AddTraceback("pysam.libctabixproxies.BedProxy.update", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
20937 __pyx_r = 0; | |
20938 __pyx_L0:; | |
20939 __Pyx_XGIVEREF(__pyx_r); | |
20940 __Pyx_RefNannyFinishContext(); | |
20941 return __pyx_r; | |
20942 } | |
20943 | |
20944 /* "pysam/libctabixproxies.pyx":756 | |
20945 * # def __get__( self ): return self.end | |
20946 * | |
20947 * def __str__(self): # <<<<<<<<<<<<<< | |
20948 * cdef int save_fields = self.nfields | |
20949 * # ensure fields to use correct format | |
20950 */ | |
20951 | |
20952 /* Python wrapper */ | |
20953 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_5__str__(PyObject *__pyx_v_self); /*proto*/ | |
20954 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_5__str__(PyObject *__pyx_v_self) { | |
20955 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
20956 PyObject *__pyx_r = 0; | |
20957 __Pyx_RefNannyDeclarations | |
20958 __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); | |
20959 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
20960 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8BedProxy_4__str__(((struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *)__pyx_v_self)); | |
20961 | |
20962 /* function exit code */ | |
20963 __Pyx_RefNannyFinishContext(); | |
20964 return __pyx_r; | |
20965 } | |
20966 | |
20967 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8BedProxy_4__str__(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self) { | |
20968 int __pyx_v_save_fields; | |
20969 PyObject *__pyx_v_retval = NULL; | |
20970 PyObject *__pyx_r = NULL; | |
20971 __Pyx_RefNannyDeclarations | |
20972 int __pyx_t_1; | |
20973 PyObject *__pyx_t_2 = NULL; | |
20974 PyObject *__pyx_t_3 = NULL; | |
20975 PyObject *__pyx_t_4 = NULL; | |
20976 unsigned int __pyx_t_5; | |
20977 int __pyx_lineno = 0; | |
20978 const char *__pyx_filename = NULL; | |
20979 int __pyx_clineno = 0; | |
20980 __Pyx_RefNannySetupContext("__str__", 1); | |
20981 | |
20982 /* "pysam/libctabixproxies.pyx":757 | |
20983 * | |
20984 * def __str__(self): | |
20985 * cdef int save_fields = self.nfields # <<<<<<<<<<<<<< | |
20986 * # ensure fields to use correct format | |
20987 * self.nfields = self.bedfields | |
20988 */ | |
20989 __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.nfields; | |
20990 __pyx_v_save_fields = __pyx_t_1; | |
20991 | |
20992 /* "pysam/libctabixproxies.pyx":759 | |
20993 * cdef int save_fields = self.nfields | |
20994 * # ensure fields to use correct format | |
20995 * self.nfields = self.bedfields # <<<<<<<<<<<<<< | |
20996 * retval = super().__str__() | |
20997 * self.nfields = save_fields | |
20998 */ | |
20999 __pyx_t_1 = __pyx_v_self->bedfields; | |
21000 __pyx_v_self->__pyx_base.__pyx_base.nfields = __pyx_t_1; | |
21001 | |
21002 /* "pysam/libctabixproxies.pyx":760 | |
21003 * # ensure fields to use correct format | |
21004 * self.nfields = self.bedfields | |
21005 * retval = super().__str__() # <<<<<<<<<<<<<< | |
21006 * self.nfields = save_fields | |
21007 * return retval | |
21008 */ | |
21009 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error) | |
21010 __Pyx_GOTREF(__pyx_t_3); | |
21011 __Pyx_INCREF((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_BedProxy); | |
21012 __Pyx_GIVEREF((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_BedProxy); | |
21013 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_BedProxy))) __PYX_ERR(0, 760, __pyx_L1_error); | |
21014 __Pyx_INCREF((PyObject *)__pyx_v_self); | |
21015 __Pyx_GIVEREF((PyObject *)__pyx_v_self); | |
21016 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 760, __pyx_L1_error); | |
21017 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 760, __pyx_L1_error) | |
21018 __Pyx_GOTREF(__pyx_t_4); | |
21019 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
21020 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error) | |
21021 __Pyx_GOTREF(__pyx_t_3); | |
21022 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
21023 __pyx_t_4 = NULL; | |
21024 __pyx_t_5 = 0; | |
21025 #if CYTHON_UNPACK_METHODS | |
21026 if (likely(PyMethod_Check(__pyx_t_3))) { | |
21027 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); | |
21028 if (likely(__pyx_t_4)) { | |
21029 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
21030 __Pyx_INCREF(__pyx_t_4); | |
21031 __Pyx_INCREF(function); | |
21032 __Pyx_DECREF_SET(__pyx_t_3, function); | |
21033 __pyx_t_5 = 1; | |
21034 } | |
21035 } | |
21036 #endif | |
21037 { | |
21038 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; | |
21039 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); | |
21040 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
21041 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error) | |
21042 __Pyx_GOTREF(__pyx_t_2); | |
21043 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
21044 } | |
21045 __pyx_v_retval = __pyx_t_2; | |
21046 __pyx_t_2 = 0; | |
21047 | |
21048 /* "pysam/libctabixproxies.pyx":761 | |
21049 * self.nfields = self.bedfields | |
21050 * retval = super().__str__() | |
21051 * self.nfields = save_fields # <<<<<<<<<<<<<< | |
21052 * return retval | |
21053 * | |
21054 */ | |
21055 __pyx_v_self->__pyx_base.__pyx_base.nfields = __pyx_v_save_fields; | |
21056 | |
21057 /* "pysam/libctabixproxies.pyx":762 | |
21058 * retval = super().__str__() | |
21059 * self.nfields = save_fields | |
21060 * return retval # <<<<<<<<<<<<<< | |
21061 * | |
21062 * def __setattr__(self, key, value): | |
21063 */ | |
21064 __Pyx_XDECREF(__pyx_r); | |
21065 __Pyx_INCREF(__pyx_v_retval); | |
21066 __pyx_r = __pyx_v_retval; | |
21067 goto __pyx_L0; | |
21068 | |
21069 /* "pysam/libctabixproxies.pyx":756 | |
21070 * # def __get__( self ): return self.end | |
21071 * | |
21072 * def __str__(self): # <<<<<<<<<<<<<< | |
21073 * cdef int save_fields = self.nfields | |
21074 * # ensure fields to use correct format | |
21075 */ | |
21076 | |
21077 /* function exit code */ | |
21078 __pyx_L1_error:; | |
21079 __Pyx_XDECREF(__pyx_t_2); | |
21080 __Pyx_XDECREF(__pyx_t_3); | |
21081 __Pyx_XDECREF(__pyx_t_4); | |
21082 __Pyx_AddTraceback("pysam.libctabixproxies.BedProxy.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
21083 __pyx_r = NULL; | |
21084 __pyx_L0:; | |
21085 __Pyx_XDECREF(__pyx_v_retval); | |
21086 __Pyx_XGIVEREF(__pyx_r); | |
21087 __Pyx_RefNannyFinishContext(); | |
21088 return __pyx_r; | |
21089 } | |
21090 | |
21091 /* "pysam/libctabixproxies.pyx":764 | |
21092 * return retval | |
21093 * | |
21094 * def __setattr__(self, key, value): # <<<<<<<<<<<<<< | |
21095 * '''set attribute.''' | |
21096 * if key == "start": | |
21097 */ | |
21098 | |
21099 /* Python wrapper */ | |
21100 static int __pyx_pw_5pysam_16libctabixproxies_8BedProxy_7__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/ | |
21101 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8BedProxy_6__setattr__, "set attribute."); | |
21102 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
21103 struct wrapperbase __pyx_wrapperbase_5pysam_16libctabixproxies_8BedProxy_6__setattr__; | |
21104 #endif | |
21105 static int __pyx_pw_5pysam_16libctabixproxies_8BedProxy_7__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { | |
21106 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
21107 int __pyx_r; | |
21108 __Pyx_RefNannyDeclarations | |
21109 __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0); | |
21110 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
21111 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8BedProxy_6__setattr__(((struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value)); | |
21112 | |
21113 /* function exit code */ | |
21114 __Pyx_RefNannyFinishContext(); | |
21115 return __pyx_r; | |
21116 } | |
21117 | |
21118 static int __pyx_pf_5pysam_16libctabixproxies_8BedProxy_6__setattr__(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { | |
21119 int __pyx_v_idx; | |
21120 CYTHON_UNUSED PyObject *__pyx_v_f = NULL; | |
21121 int __pyx_r; | |
21122 __Pyx_RefNannyDeclarations | |
21123 int __pyx_t_1; | |
21124 uint32_t __pyx_t_2; | |
21125 PyObject *__pyx_t_3 = NULL; | |
21126 PyObject *__pyx_t_4 = NULL; | |
21127 PyObject *__pyx_t_5 = NULL; | |
21128 PyObject *__pyx_t_6 = NULL; | |
21129 PyObject *(*__pyx_t_7)(PyObject *); | |
21130 int __pyx_t_8; | |
21131 PyObject *__pyx_t_9 = NULL; | |
21132 unsigned int __pyx_t_10; | |
21133 int __pyx_lineno = 0; | |
21134 const char *__pyx_filename = NULL; | |
21135 int __pyx_clineno = 0; | |
21136 __Pyx_RefNannySetupContext("__setattr__", 1); | |
21137 | |
21138 /* "pysam/libctabixproxies.pyx":766 | |
21139 * def __setattr__(self, key, value): | |
21140 * '''set attribute.''' | |
21141 * if key == "start": # <<<<<<<<<<<<<< | |
21142 * self.start = value | |
21143 * elif key == "end": | |
21144 */ | |
21145 __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_start, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 766, __pyx_L1_error) | |
21146 if (__pyx_t_1) { | |
21147 | |
21148 /* "pysam/libctabixproxies.pyx":767 | |
21149 * '''set attribute.''' | |
21150 * if key == "start": | |
21151 * self.start = value # <<<<<<<<<<<<<< | |
21152 * elif key == "end": | |
21153 * self.end = value | |
21154 */ | |
21155 __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_2 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 767, __pyx_L1_error) | |
21156 __pyx_v_self->start = __pyx_t_2; | |
21157 | |
21158 /* "pysam/libctabixproxies.pyx":766 | |
21159 * def __setattr__(self, key, value): | |
21160 * '''set attribute.''' | |
21161 * if key == "start": # <<<<<<<<<<<<<< | |
21162 * self.start = value | |
21163 * elif key == "end": | |
21164 */ | |
21165 goto __pyx_L3; | |
21166 } | |
21167 | |
21168 /* "pysam/libctabixproxies.pyx":768 | |
21169 * if key == "start": | |
21170 * self.start = value | |
21171 * elif key == "end": # <<<<<<<<<<<<<< | |
21172 * self.end = value | |
21173 * | |
21174 */ | |
21175 __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_end, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 768, __pyx_L1_error) | |
21176 if (__pyx_t_1) { | |
21177 | |
21178 /* "pysam/libctabixproxies.pyx":769 | |
21179 * self.start = value | |
21180 * elif key == "end": | |
21181 * self.end = value # <<<<<<<<<<<<<< | |
21182 * | |
21183 * cdef int idx | |
21184 */ | |
21185 __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_2 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 769, __pyx_L1_error) | |
21186 __pyx_v_self->end = __pyx_t_2; | |
21187 | |
21188 /* "pysam/libctabixproxies.pyx":768 | |
21189 * if key == "start": | |
21190 * self.start = value | |
21191 * elif key == "end": # <<<<<<<<<<<<<< | |
21192 * self.end = value | |
21193 * | |
21194 */ | |
21195 } | |
21196 __pyx_L3:; | |
21197 | |
21198 /* "pysam/libctabixproxies.pyx":772 | |
21199 * | |
21200 * cdef int idx | |
21201 * idx, f = self.map_key2field[key] # <<<<<<<<<<<<<< | |
21202 * TupleProxy._setindex(self, idx, str(value)) | |
21203 * | |
21204 */ | |
21205 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map_key2field); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error) | |
21206 __Pyx_GOTREF(__pyx_t_3); | |
21207 __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error) | |
21208 __Pyx_GOTREF(__pyx_t_4); | |
21209 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
21210 if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { | |
21211 PyObject* sequence = __pyx_t_4; | |
21212 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); | |
21213 if (unlikely(size != 2)) { | |
21214 if (size > 2) __Pyx_RaiseTooManyValuesError(2); | |
21215 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); | |
21216 __PYX_ERR(0, 772, __pyx_L1_error) | |
21217 } | |
21218 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
21219 if (likely(PyTuple_CheckExact(sequence))) { | |
21220 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); | |
21221 __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); | |
21222 } else { | |
21223 __pyx_t_3 = PyList_GET_ITEM(sequence, 0); | |
21224 __pyx_t_5 = PyList_GET_ITEM(sequence, 1); | |
21225 } | |
21226 __Pyx_INCREF(__pyx_t_3); | |
21227 __Pyx_INCREF(__pyx_t_5); | |
21228 #else | |
21229 __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error) | |
21230 __Pyx_GOTREF(__pyx_t_3); | |
21231 __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 772, __pyx_L1_error) | |
21232 __Pyx_GOTREF(__pyx_t_5); | |
21233 #endif | |
21234 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
21235 } else { | |
21236 Py_ssize_t index = -1; | |
21237 __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error) | |
21238 __Pyx_GOTREF(__pyx_t_6); | |
21239 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
21240 __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); | |
21241 index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; | |
21242 __Pyx_GOTREF(__pyx_t_3); | |
21243 index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; | |
21244 __Pyx_GOTREF(__pyx_t_5); | |
21245 if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 772, __pyx_L1_error) | |
21246 __pyx_t_7 = NULL; | |
21247 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
21248 goto __pyx_L5_unpacking_done; | |
21249 __pyx_L4_unpacking_failed:; | |
21250 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
21251 __pyx_t_7 = NULL; | |
21252 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); | |
21253 __PYX_ERR(0, 772, __pyx_L1_error) | |
21254 __pyx_L5_unpacking_done:; | |
21255 } | |
21256 __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L1_error) | |
21257 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
21258 __pyx_v_idx = __pyx_t_8; | |
21259 __pyx_v_f = __pyx_t_5; | |
21260 __pyx_t_5 = 0; | |
21261 | |
21262 /* "pysam/libctabixproxies.pyx":773 | |
21263 * cdef int idx | |
21264 * idx, f = self.map_key2field[key] | |
21265 * TupleProxy._setindex(self, idx, str(value)) # <<<<<<<<<<<<<< | |
21266 * | |
21267 * | |
21268 */ | |
21269 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy), __pyx_n_s_setindex); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 773, __pyx_L1_error) | |
21270 __Pyx_GOTREF(__pyx_t_5); | |
21271 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 773, __pyx_L1_error) | |
21272 __Pyx_GOTREF(__pyx_t_3); | |
21273 __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error) | |
21274 __Pyx_GOTREF(__pyx_t_6); | |
21275 __pyx_t_9 = NULL; | |
21276 __pyx_t_10 = 0; | |
21277 #if CYTHON_UNPACK_METHODS | |
21278 if (likely(PyMethod_Check(__pyx_t_5))) { | |
21279 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); | |
21280 if (likely(__pyx_t_9)) { | |
21281 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); | |
21282 __Pyx_INCREF(__pyx_t_9); | |
21283 __Pyx_INCREF(function); | |
21284 __Pyx_DECREF_SET(__pyx_t_5, function); | |
21285 __pyx_t_10 = 1; | |
21286 } | |
21287 } | |
21288 #endif | |
21289 { | |
21290 PyObject *__pyx_callargs[4] = {__pyx_t_9, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_t_6}; | |
21291 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10); | |
21292 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; | |
21293 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
21294 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
21295 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 773, __pyx_L1_error) | |
21296 __Pyx_GOTREF(__pyx_t_4); | |
21297 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
21298 } | |
21299 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
21300 | |
21301 /* "pysam/libctabixproxies.pyx":764 | |
21302 * return retval | |
21303 * | |
21304 * def __setattr__(self, key, value): # <<<<<<<<<<<<<< | |
21305 * '''set attribute.''' | |
21306 * if key == "start": | |
21307 */ | |
21308 | |
21309 /* function exit code */ | |
21310 __pyx_r = 0; | |
21311 goto __pyx_L0; | |
21312 __pyx_L1_error:; | |
21313 __Pyx_XDECREF(__pyx_t_3); | |
21314 __Pyx_XDECREF(__pyx_t_4); | |
21315 __Pyx_XDECREF(__pyx_t_5); | |
21316 __Pyx_XDECREF(__pyx_t_6); | |
21317 __Pyx_XDECREF(__pyx_t_9); | |
21318 __Pyx_AddTraceback("pysam.libctabixproxies.BedProxy.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
21319 __pyx_r = -1; | |
21320 __pyx_L0:; | |
21321 __Pyx_XDECREF(__pyx_v_f); | |
21322 __Pyx_RefNannyFinishContext(); | |
21323 return __pyx_r; | |
21324 } | |
21325 | |
21326 /* "(tree fragment)":1 | |
21327 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
21328 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
21329 * def __setstate_cython__(self, __pyx_state): | |
21330 */ | |
21331 | |
21332 /* Python wrapper */ | |
21333 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_9__reduce_cython__(PyObject *__pyx_v_self, | |
21334 #if CYTHON_METH_FASTCALL | |
21335 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
21336 #else | |
21337 PyObject *__pyx_args, PyObject *__pyx_kwds | |
21338 #endif | |
21339 ); /*proto*/ | |
21340 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8BedProxy_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8BedProxy_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
21341 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_9__reduce_cython__(PyObject *__pyx_v_self, | |
21342 #if CYTHON_METH_FASTCALL | |
21343 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
21344 #else | |
21345 PyObject *__pyx_args, PyObject *__pyx_kwds | |
21346 #endif | |
21347 ) { | |
21348 #if !CYTHON_METH_FASTCALL | |
21349 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
21350 #endif | |
21351 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
21352 PyObject *__pyx_r = 0; | |
21353 __Pyx_RefNannyDeclarations | |
21354 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); | |
21355 #if !CYTHON_METH_FASTCALL | |
21356 #if CYTHON_ASSUME_SAFE_MACROS | |
21357 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
21358 #else | |
21359 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
21360 #endif | |
21361 #endif | |
21362 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
21363 if (unlikely(__pyx_nargs > 0)) { | |
21364 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} | |
21365 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; | |
21366 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8BedProxy_8__reduce_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *)__pyx_v_self)); | |
21367 | |
21368 /* function exit code */ | |
21369 __Pyx_RefNannyFinishContext(); | |
21370 return __pyx_r; | |
21371 } | |
21372 | |
21373 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8BedProxy_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self) { | |
21374 PyObject *__pyx_r = NULL; | |
21375 __Pyx_RefNannyDeclarations | |
21376 int __pyx_lineno = 0; | |
21377 const char *__pyx_filename = NULL; | |
21378 int __pyx_clineno = 0; | |
21379 __Pyx_RefNannySetupContext("__reduce_cython__", 1); | |
21380 | |
21381 /* "(tree fragment)":2 | |
21382 * def __reduce_cython__(self): | |
21383 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
21384 * def __setstate_cython__(self, __pyx_state): | |
21385 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
21386 */ | |
21387 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
21388 __PYX_ERR(1, 2, __pyx_L1_error) | |
21389 | |
21390 /* "(tree fragment)":1 | |
21391 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
21392 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
21393 * def __setstate_cython__(self, __pyx_state): | |
21394 */ | |
21395 | |
21396 /* function exit code */ | |
21397 __pyx_L1_error:; | |
21398 __Pyx_AddTraceback("pysam.libctabixproxies.BedProxy.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
21399 __pyx_r = NULL; | |
21400 __Pyx_XGIVEREF(__pyx_r); | |
21401 __Pyx_RefNannyFinishContext(); | |
21402 return __pyx_r; | |
21403 } | |
21404 | |
21405 /* "(tree fragment)":3 | |
21406 * def __reduce_cython__(self): | |
21407 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
21408 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
21409 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
21410 */ | |
21411 | |
21412 /* Python wrapper */ | |
21413 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_11__setstate_cython__(PyObject *__pyx_v_self, | |
21414 #if CYTHON_METH_FASTCALL | |
21415 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
21416 #else | |
21417 PyObject *__pyx_args, PyObject *__pyx_kwds | |
21418 #endif | |
21419 ); /*proto*/ | |
21420 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8BedProxy_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8BedProxy_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
21421 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8BedProxy_11__setstate_cython__(PyObject *__pyx_v_self, | |
21422 #if CYTHON_METH_FASTCALL | |
21423 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
21424 #else | |
21425 PyObject *__pyx_args, PyObject *__pyx_kwds | |
21426 #endif | |
21427 ) { | |
21428 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; | |
21429 #if !CYTHON_METH_FASTCALL | |
21430 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
21431 #endif | |
21432 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
21433 PyObject* values[1] = {0}; | |
21434 int __pyx_lineno = 0; | |
21435 const char *__pyx_filename = NULL; | |
21436 int __pyx_clineno = 0; | |
21437 PyObject *__pyx_r = 0; | |
21438 __Pyx_RefNannyDeclarations | |
21439 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); | |
21440 #if !CYTHON_METH_FASTCALL | |
21441 #if CYTHON_ASSUME_SAFE_MACROS | |
21442 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
21443 #else | |
21444 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
21445 #endif | |
21446 #endif | |
21447 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
21448 { | |
21449 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; | |
21450 if (__pyx_kwds) { | |
21451 Py_ssize_t kw_args; | |
21452 switch (__pyx_nargs) { | |
21453 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
21454 CYTHON_FALLTHROUGH; | |
21455 case 0: break; | |
21456 default: goto __pyx_L5_argtuple_error; | |
21457 } | |
21458 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
21459 switch (__pyx_nargs) { | |
21460 case 0: | |
21461 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { | |
21462 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
21463 kw_args--; | |
21464 } | |
21465 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) | |
21466 else goto __pyx_L5_argtuple_error; | |
21467 } | |
21468 if (unlikely(kw_args > 0)) { | |
21469 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
21470 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) | |
21471 } | |
21472 } else if (unlikely(__pyx_nargs != 1)) { | |
21473 goto __pyx_L5_argtuple_error; | |
21474 } else { | |
21475 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
21476 } | |
21477 __pyx_v___pyx_state = values[0]; | |
21478 } | |
21479 goto __pyx_L6_skip; | |
21480 __pyx_L5_argtuple_error:; | |
21481 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) | |
21482 __pyx_L6_skip:; | |
21483 goto __pyx_L4_argument_unpacking_done; | |
21484 __pyx_L3_error:; | |
21485 { | |
21486 Py_ssize_t __pyx_temp; | |
21487 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
21488 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
21489 } | |
21490 } | |
21491 __Pyx_AddTraceback("pysam.libctabixproxies.BedProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
21492 __Pyx_RefNannyFinishContext(); | |
21493 return NULL; | |
21494 __pyx_L4_argument_unpacking_done:; | |
21495 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8BedProxy_10__setstate_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *)__pyx_v_self), __pyx_v___pyx_state); | |
21496 | |
21497 /* function exit code */ | |
21498 { | |
21499 Py_ssize_t __pyx_temp; | |
21500 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
21501 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
21502 } | |
21503 } | |
21504 __Pyx_RefNannyFinishContext(); | |
21505 return __pyx_r; | |
21506 } | |
21507 | |
21508 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8BedProxy_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { | |
21509 PyObject *__pyx_r = NULL; | |
21510 __Pyx_RefNannyDeclarations | |
21511 int __pyx_lineno = 0; | |
21512 const char *__pyx_filename = NULL; | |
21513 int __pyx_clineno = 0; | |
21514 __Pyx_RefNannySetupContext("__setstate_cython__", 1); | |
21515 | |
21516 /* "(tree fragment)":4 | |
21517 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
21518 * def __setstate_cython__(self, __pyx_state): | |
21519 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
21520 */ | |
21521 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
21522 __PYX_ERR(1, 4, __pyx_L1_error) | |
21523 | |
21524 /* "(tree fragment)":3 | |
21525 * def __reduce_cython__(self): | |
21526 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
21527 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
21528 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
21529 */ | |
21530 | |
21531 /* function exit code */ | |
21532 __pyx_L1_error:; | |
21533 __Pyx_AddTraceback("pysam.libctabixproxies.BedProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
21534 __pyx_r = NULL; | |
21535 __Pyx_XGIVEREF(__pyx_r); | |
21536 __Pyx_RefNannyFinishContext(); | |
21537 return __pyx_r; | |
21538 } | |
21539 | |
21540 /* "pysam/libctabixproxies.pyx":793 | |
21541 * 'format' : (8, str) } | |
21542 * | |
21543 * def __cinit__(self): # <<<<<<<<<<<<<< | |
21544 * # automatically calls TupleProxy.__cinit__ | |
21545 * # start indexed access at genotypes | |
21546 */ | |
21547 | |
21548 /* Python wrapper */ | |
21549 static int __pyx_pw_5pysam_16libctabixproxies_8VCFProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ | |
21550 static int __pyx_pw_5pysam_16libctabixproxies_8VCFProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { | |
21551 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
21552 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
21553 int __pyx_r; | |
21554 __Pyx_RefNannyDeclarations | |
21555 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); | |
21556 #if CYTHON_ASSUME_SAFE_MACROS | |
21557 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
21558 #else | |
21559 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; | |
21560 #endif | |
21561 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
21562 if (unlikely(__pyx_nargs > 0)) { | |
21563 __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;} | |
21564 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; | |
21565 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8VCFProxy___cinit__(((struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *)__pyx_v_self)); | |
21566 | |
21567 /* function exit code */ | |
21568 __Pyx_RefNannyFinishContext(); | |
21569 return __pyx_r; | |
21570 } | |
21571 | |
21572 static int __pyx_pf_5pysam_16libctabixproxies_8VCFProxy___cinit__(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self) { | |
21573 int __pyx_r; | |
21574 | |
21575 /* "pysam/libctabixproxies.pyx":796 | |
21576 * # automatically calls TupleProxy.__cinit__ | |
21577 * # start indexed access at genotypes | |
21578 * self.offset = 9 # <<<<<<<<<<<<<< | |
21579 * | |
21580 * cdef update(self, char * buffer, size_t nbytes): | |
21581 */ | |
21582 __pyx_v_self->__pyx_base.__pyx_base.offset = 9; | |
21583 | |
21584 /* "pysam/libctabixproxies.pyx":793 | |
21585 * 'format' : (8, str) } | |
21586 * | |
21587 * def __cinit__(self): # <<<<<<<<<<<<<< | |
21588 * # automatically calls TupleProxy.__cinit__ | |
21589 * # start indexed access at genotypes | |
21590 */ | |
21591 | |
21592 /* function exit code */ | |
21593 __pyx_r = 0; | |
21594 return __pyx_r; | |
21595 } | |
21596 | |
21597 /* "pysam/libctabixproxies.pyx":798 | |
21598 * self.offset = 9 | |
21599 * | |
21600 * cdef update(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
21601 * '''update internal data. | |
21602 * | |
21603 */ | |
21604 | |
21605 static PyObject *__pyx_f_5pysam_16libctabixproxies_8VCFProxy_update(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { | |
21606 PyObject *__pyx_r = NULL; | |
21607 __Pyx_RefNannyDeclarations | |
21608 PyObject *__pyx_t_1 = NULL; | |
21609 int __pyx_lineno = 0; | |
21610 const char *__pyx_filename = NULL; | |
21611 int __pyx_clineno = 0; | |
21612 __Pyx_RefNannySetupContext("update", 1); | |
21613 | |
21614 /* "pysam/libctabixproxies.pyx":803 | |
21615 * nbytes does not include the terminal '\0'. | |
21616 * ''' | |
21617 * NamedTupleProxy.update(self, buffer, nbytes) # <<<<<<<<<<<<<< | |
21618 * | |
21619 * self.contig = self.fields[0] | |
21620 */ | |
21621 __pyx_t_1 = __pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy->__pyx_base.update(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error) | |
21622 __Pyx_GOTREF(__pyx_t_1); | |
21623 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
21624 | |
21625 /* "pysam/libctabixproxies.pyx":805 | |
21626 * NamedTupleProxy.update(self, buffer, nbytes) | |
21627 * | |
21628 * self.contig = self.fields[0] # <<<<<<<<<<<<<< | |
21629 * # vcf counts from 1 - correct here | |
21630 * self.pos = atoi(self.fields[1]) - 1 | |
21631 */ | |
21632 __pyx_v_self->contig = (__pyx_v_self->__pyx_base.__pyx_base.fields[0]); | |
21633 | |
21634 /* "pysam/libctabixproxies.pyx":807 | |
21635 * self.contig = self.fields[0] | |
21636 * # vcf counts from 1 - correct here | |
21637 * self.pos = atoi(self.fields[1]) - 1 # <<<<<<<<<<<<<< | |
21638 * | |
21639 * def __len__(self): | |
21640 */ | |
21641 __pyx_v_self->pos = (atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[1])) - 1); | |
21642 | |
21643 /* "pysam/libctabixproxies.pyx":798 | |
21644 * self.offset = 9 | |
21645 * | |
21646 * cdef update(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< | |
21647 * '''update internal data. | |
21648 * | |
21649 */ | |
21650 | |
21651 /* function exit code */ | |
21652 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
21653 goto __pyx_L0; | |
21654 __pyx_L1_error:; | |
21655 __Pyx_XDECREF(__pyx_t_1); | |
21656 __Pyx_AddTraceback("pysam.libctabixproxies.VCFProxy.update", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
21657 __pyx_r = 0; | |
21658 __pyx_L0:; | |
21659 __Pyx_XGIVEREF(__pyx_r); | |
21660 __Pyx_RefNannyFinishContext(); | |
21661 return __pyx_r; | |
21662 } | |
21663 | |
21664 /* "pysam/libctabixproxies.pyx":809 | |
21665 * self.pos = atoi(self.fields[1]) - 1 | |
21666 * | |
21667 * def __len__(self): # <<<<<<<<<<<<<< | |
21668 * '''return number of genotype fields.''' | |
21669 * return max(0, self.nfields - 9) | |
21670 */ | |
21671 | |
21672 /* Python wrapper */ | |
21673 static Py_ssize_t __pyx_pw_5pysam_16libctabixproxies_8VCFProxy_3__len__(PyObject *__pyx_v_self); /*proto*/ | |
21674 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8VCFProxy_2__len__, "return number of genotype fields."); | |
21675 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
21676 struct wrapperbase __pyx_wrapperbase_5pysam_16libctabixproxies_8VCFProxy_2__len__; | |
21677 #endif | |
21678 static Py_ssize_t __pyx_pw_5pysam_16libctabixproxies_8VCFProxy_3__len__(PyObject *__pyx_v_self) { | |
21679 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
21680 Py_ssize_t __pyx_r; | |
21681 __Pyx_RefNannyDeclarations | |
21682 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); | |
21683 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
21684 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8VCFProxy_2__len__(((struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *)__pyx_v_self)); | |
21685 | |
21686 /* function exit code */ | |
21687 __Pyx_RefNannyFinishContext(); | |
21688 return __pyx_r; | |
21689 } | |
21690 | |
21691 static Py_ssize_t __pyx_pf_5pysam_16libctabixproxies_8VCFProxy_2__len__(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self) { | |
21692 Py_ssize_t __pyx_r; | |
21693 long __pyx_t_1; | |
21694 long __pyx_t_2; | |
21695 long __pyx_t_3; | |
21696 int __pyx_t_4; | |
21697 | |
21698 /* "pysam/libctabixproxies.pyx":811 | |
21699 * def __len__(self): | |
21700 * '''return number of genotype fields.''' | |
21701 * return max(0, self.nfields - 9) # <<<<<<<<<<<<<< | |
21702 * | |
21703 * property pos: | |
21704 */ | |
21705 __pyx_t_1 = (__pyx_v_self->__pyx_base.__pyx_base.nfields - 9); | |
21706 __pyx_t_2 = 0; | |
21707 __pyx_t_4 = (__pyx_t_1 > __pyx_t_2); | |
21708 if (__pyx_t_4) { | |
21709 __pyx_t_3 = __pyx_t_1; | |
21710 } else { | |
21711 __pyx_t_3 = __pyx_t_2; | |
21712 } | |
21713 __pyx_r = __pyx_t_3; | |
21714 goto __pyx_L0; | |
21715 | |
21716 /* "pysam/libctabixproxies.pyx":809 | |
21717 * self.pos = atoi(self.fields[1]) - 1 | |
21718 * | |
21719 * def __len__(self): # <<<<<<<<<<<<<< | |
21720 * '''return number of genotype fields.''' | |
21721 * return max(0, self.nfields - 9) | |
21722 */ | |
21723 | |
21724 /* function exit code */ | |
21725 __pyx_L0:; | |
21726 return __pyx_r; | |
21727 } | |
21728 | |
21729 /* "pysam/libctabixproxies.pyx":815 | |
21730 * property pos: | |
21731 * '''feature end (in 0-based open/closed coordinates).''' | |
21732 * def __get__(self): # <<<<<<<<<<<<<< | |
21733 * return self.pos | |
21734 * | |
21735 */ | |
21736 | |
21737 /* Python wrapper */ | |
21738 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/ | |
21739 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_3pos_1__get__(PyObject *__pyx_v_self) { | |
21740 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
21741 PyObject *__pyx_r = 0; | |
21742 __Pyx_RefNannyDeclarations | |
21743 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); | |
21744 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
21745 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8VCFProxy_3pos___get__(((struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *)__pyx_v_self)); | |
21746 | |
21747 /* function exit code */ | |
21748 __Pyx_RefNannyFinishContext(); | |
21749 return __pyx_r; | |
21750 } | |
21751 | |
21752 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8VCFProxy_3pos___get__(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self) { | |
21753 PyObject *__pyx_r = NULL; | |
21754 __Pyx_RefNannyDeclarations | |
21755 PyObject *__pyx_t_1 = NULL; | |
21756 int __pyx_lineno = 0; | |
21757 const char *__pyx_filename = NULL; | |
21758 int __pyx_clineno = 0; | |
21759 __Pyx_RefNannySetupContext("__get__", 1); | |
21760 | |
21761 /* "pysam/libctabixproxies.pyx":816 | |
21762 * '''feature end (in 0-based open/closed coordinates).''' | |
21763 * def __get__(self): | |
21764 * return self.pos # <<<<<<<<<<<<<< | |
21765 * | |
21766 * def __setattr__(self, key, value): | |
21767 */ | |
21768 __Pyx_XDECREF(__pyx_r); | |
21769 __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error) | |
21770 __Pyx_GOTREF(__pyx_t_1); | |
21771 __pyx_r = __pyx_t_1; | |
21772 __pyx_t_1 = 0; | |
21773 goto __pyx_L0; | |
21774 | |
21775 /* "pysam/libctabixproxies.pyx":815 | |
21776 * property pos: | |
21777 * '''feature end (in 0-based open/closed coordinates).''' | |
21778 * def __get__(self): # <<<<<<<<<<<<<< | |
21779 * return self.pos | |
21780 * | |
21781 */ | |
21782 | |
21783 /* function exit code */ | |
21784 __pyx_L1_error:; | |
21785 __Pyx_XDECREF(__pyx_t_1); | |
21786 __Pyx_AddTraceback("pysam.libctabixproxies.VCFProxy.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
21787 __pyx_r = NULL; | |
21788 __pyx_L0:; | |
21789 __Pyx_XGIVEREF(__pyx_r); | |
21790 __Pyx_RefNannyFinishContext(); | |
21791 return __pyx_r; | |
21792 } | |
21793 | |
21794 /* "pysam/libctabixproxies.pyx":818 | |
21795 * return self.pos | |
21796 * | |
21797 * def __setattr__(self, key, value): # <<<<<<<<<<<<<< | |
21798 * '''set attribute.''' | |
21799 * if key == "pos": | |
21800 */ | |
21801 | |
21802 /* Python wrapper */ | |
21803 static int __pyx_pw_5pysam_16libctabixproxies_8VCFProxy_5__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/ | |
21804 PyDoc_STRVAR(__pyx_doc_5pysam_16libctabixproxies_8VCFProxy_4__setattr__, "set attribute."); | |
21805 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
21806 struct wrapperbase __pyx_wrapperbase_5pysam_16libctabixproxies_8VCFProxy_4__setattr__; | |
21807 #endif | |
21808 static int __pyx_pw_5pysam_16libctabixproxies_8VCFProxy_5__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { | |
21809 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
21810 int __pyx_r; | |
21811 __Pyx_RefNannyDeclarations | |
21812 __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0); | |
21813 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); | |
21814 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8VCFProxy_4__setattr__(((struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value)); | |
21815 | |
21816 /* function exit code */ | |
21817 __Pyx_RefNannyFinishContext(); | |
21818 return __pyx_r; | |
21819 } | |
21820 | |
21821 static int __pyx_pf_5pysam_16libctabixproxies_8VCFProxy_4__setattr__(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { | |
21822 int __pyx_v_idx; | |
21823 CYTHON_UNUSED PyObject *__pyx_v_f = NULL; | |
21824 int __pyx_r; | |
21825 __Pyx_RefNannyDeclarations | |
21826 int __pyx_t_1; | |
21827 uint32_t __pyx_t_2; | |
21828 PyObject *__pyx_t_3 = NULL; | |
21829 PyObject *__pyx_t_4 = NULL; | |
21830 PyObject *__pyx_t_5 = NULL; | |
21831 PyObject *__pyx_t_6 = NULL; | |
21832 PyObject *(*__pyx_t_7)(PyObject *); | |
21833 int __pyx_t_8; | |
21834 PyObject *__pyx_t_9 = NULL; | |
21835 unsigned int __pyx_t_10; | |
21836 int __pyx_lineno = 0; | |
21837 const char *__pyx_filename = NULL; | |
21838 int __pyx_clineno = 0; | |
21839 __Pyx_RefNannySetupContext("__setattr__", 0); | |
21840 __Pyx_INCREF(__pyx_v_value); | |
21841 | |
21842 /* "pysam/libctabixproxies.pyx":820 | |
21843 * def __setattr__(self, key, value): | |
21844 * '''set attribute.''' | |
21845 * if key == "pos": # <<<<<<<<<<<<<< | |
21846 * self.pos = value | |
21847 * value += 1 | |
21848 */ | |
21849 __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_pos, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 820, __pyx_L1_error) | |
21850 if (__pyx_t_1) { | |
21851 | |
21852 /* "pysam/libctabixproxies.pyx":821 | |
21853 * '''set attribute.''' | |
21854 * if key == "pos": | |
21855 * self.pos = value # <<<<<<<<<<<<<< | |
21856 * value += 1 | |
21857 * | |
21858 */ | |
21859 __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_2 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 821, __pyx_L1_error) | |
21860 __pyx_v_self->pos = __pyx_t_2; | |
21861 | |
21862 /* "pysam/libctabixproxies.pyx":822 | |
21863 * if key == "pos": | |
21864 * self.pos = value | |
21865 * value += 1 # <<<<<<<<<<<<<< | |
21866 * | |
21867 * cdef int idx | |
21868 */ | |
21869 __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_value, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error) | |
21870 __Pyx_GOTREF(__pyx_t_3); | |
21871 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3); | |
21872 __pyx_t_3 = 0; | |
21873 | |
21874 /* "pysam/libctabixproxies.pyx":820 | |
21875 * def __setattr__(self, key, value): | |
21876 * '''set attribute.''' | |
21877 * if key == "pos": # <<<<<<<<<<<<<< | |
21878 * self.pos = value | |
21879 * value += 1 | |
21880 */ | |
21881 } | |
21882 | |
21883 /* "pysam/libctabixproxies.pyx":825 | |
21884 * | |
21885 * cdef int idx | |
21886 * idx, f = self.map_key2field[key] # <<<<<<<<<<<<<< | |
21887 * TupleProxy._setindex(self, idx, str(value)) | |
21888 * | |
21889 */ | |
21890 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_map_key2field); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 825, __pyx_L1_error) | |
21891 __Pyx_GOTREF(__pyx_t_3); | |
21892 __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 825, __pyx_L1_error) | |
21893 __Pyx_GOTREF(__pyx_t_4); | |
21894 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
21895 if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { | |
21896 PyObject* sequence = __pyx_t_4; | |
21897 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); | |
21898 if (unlikely(size != 2)) { | |
21899 if (size > 2) __Pyx_RaiseTooManyValuesError(2); | |
21900 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); | |
21901 __PYX_ERR(0, 825, __pyx_L1_error) | |
21902 } | |
21903 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
21904 if (likely(PyTuple_CheckExact(sequence))) { | |
21905 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); | |
21906 __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); | |
21907 } else { | |
21908 __pyx_t_3 = PyList_GET_ITEM(sequence, 0); | |
21909 __pyx_t_5 = PyList_GET_ITEM(sequence, 1); | |
21910 } | |
21911 __Pyx_INCREF(__pyx_t_3); | |
21912 __Pyx_INCREF(__pyx_t_5); | |
21913 #else | |
21914 __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 825, __pyx_L1_error) | |
21915 __Pyx_GOTREF(__pyx_t_3); | |
21916 __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 825, __pyx_L1_error) | |
21917 __Pyx_GOTREF(__pyx_t_5); | |
21918 #endif | |
21919 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
21920 } else { | |
21921 Py_ssize_t index = -1; | |
21922 __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error) | |
21923 __Pyx_GOTREF(__pyx_t_6); | |
21924 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
21925 __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); | |
21926 index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; | |
21927 __Pyx_GOTREF(__pyx_t_3); | |
21928 index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; | |
21929 __Pyx_GOTREF(__pyx_t_5); | |
21930 if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 825, __pyx_L1_error) | |
21931 __pyx_t_7 = NULL; | |
21932 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
21933 goto __pyx_L5_unpacking_done; | |
21934 __pyx_L4_unpacking_failed:; | |
21935 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
21936 __pyx_t_7 = NULL; | |
21937 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); | |
21938 __PYX_ERR(0, 825, __pyx_L1_error) | |
21939 __pyx_L5_unpacking_done:; | |
21940 } | |
21941 __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 825, __pyx_L1_error) | |
21942 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
21943 __pyx_v_idx = __pyx_t_8; | |
21944 __pyx_v_f = __pyx_t_5; | |
21945 __pyx_t_5 = 0; | |
21946 | |
21947 /* "pysam/libctabixproxies.pyx":826 | |
21948 * cdef int idx | |
21949 * idx, f = self.map_key2field[key] | |
21950 * TupleProxy._setindex(self, idx, str(value)) # <<<<<<<<<<<<<< | |
21951 * | |
21952 * | |
21953 */ | |
21954 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy), __pyx_n_s_setindex); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 826, __pyx_L1_error) | |
21955 __Pyx_GOTREF(__pyx_t_5); | |
21956 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 826, __pyx_L1_error) | |
21957 __Pyx_GOTREF(__pyx_t_3); | |
21958 __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 826, __pyx_L1_error) | |
21959 __Pyx_GOTREF(__pyx_t_6); | |
21960 __pyx_t_9 = NULL; | |
21961 __pyx_t_10 = 0; | |
21962 #if CYTHON_UNPACK_METHODS | |
21963 if (likely(PyMethod_Check(__pyx_t_5))) { | |
21964 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); | |
21965 if (likely(__pyx_t_9)) { | |
21966 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); | |
21967 __Pyx_INCREF(__pyx_t_9); | |
21968 __Pyx_INCREF(function); | |
21969 __Pyx_DECREF_SET(__pyx_t_5, function); | |
21970 __pyx_t_10 = 1; | |
21971 } | |
21972 } | |
21973 #endif | |
21974 { | |
21975 PyObject *__pyx_callargs[4] = {__pyx_t_9, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_t_6}; | |
21976 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10); | |
21977 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; | |
21978 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
21979 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
21980 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error) | |
21981 __Pyx_GOTREF(__pyx_t_4); | |
21982 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
21983 } | |
21984 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
21985 | |
21986 /* "pysam/libctabixproxies.pyx":818 | |
21987 * return self.pos | |
21988 * | |
21989 * def __setattr__(self, key, value): # <<<<<<<<<<<<<< | |
21990 * '''set attribute.''' | |
21991 * if key == "pos": | |
21992 */ | |
21993 | |
21994 /* function exit code */ | |
21995 __pyx_r = 0; | |
21996 goto __pyx_L0; | |
21997 __pyx_L1_error:; | |
21998 __Pyx_XDECREF(__pyx_t_3); | |
21999 __Pyx_XDECREF(__pyx_t_4); | |
22000 __Pyx_XDECREF(__pyx_t_5); | |
22001 __Pyx_XDECREF(__pyx_t_6); | |
22002 __Pyx_XDECREF(__pyx_t_9); | |
22003 __Pyx_AddTraceback("pysam.libctabixproxies.VCFProxy.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
22004 __pyx_r = -1; | |
22005 __pyx_L0:; | |
22006 __Pyx_XDECREF(__pyx_v_f); | |
22007 __Pyx_XDECREF(__pyx_v_value); | |
22008 __Pyx_RefNannyFinishContext(); | |
22009 return __pyx_r; | |
22010 } | |
22011 | |
22012 /* "(tree fragment)":1 | |
22013 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
22014 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
22015 * def __setstate_cython__(self, __pyx_state): | |
22016 */ | |
22017 | |
22018 /* Python wrapper */ | |
22019 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_7__reduce_cython__(PyObject *__pyx_v_self, | |
22020 #if CYTHON_METH_FASTCALL | |
22021 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
22022 #else | |
22023 PyObject *__pyx_args, PyObject *__pyx_kwds | |
22024 #endif | |
22025 ); /*proto*/ | |
22026 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8VCFProxy_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
22027 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_7__reduce_cython__(PyObject *__pyx_v_self, | |
22028 #if CYTHON_METH_FASTCALL | |
22029 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
22030 #else | |
22031 PyObject *__pyx_args, PyObject *__pyx_kwds | |
22032 #endif | |
22033 ) { | |
22034 #if !CYTHON_METH_FASTCALL | |
22035 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
22036 #endif | |
22037 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
22038 PyObject *__pyx_r = 0; | |
22039 __Pyx_RefNannyDeclarations | |
22040 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); | |
22041 #if !CYTHON_METH_FASTCALL | |
22042 #if CYTHON_ASSUME_SAFE_MACROS | |
22043 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
22044 #else | |
22045 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
22046 #endif | |
22047 #endif | |
22048 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
22049 if (unlikely(__pyx_nargs > 0)) { | |
22050 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} | |
22051 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; | |
22052 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8VCFProxy_6__reduce_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *)__pyx_v_self)); | |
22053 | |
22054 /* function exit code */ | |
22055 __Pyx_RefNannyFinishContext(); | |
22056 return __pyx_r; | |
22057 } | |
22058 | |
22059 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8VCFProxy_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self) { | |
22060 PyObject *__pyx_r = NULL; | |
22061 __Pyx_RefNannyDeclarations | |
22062 int __pyx_lineno = 0; | |
22063 const char *__pyx_filename = NULL; | |
22064 int __pyx_clineno = 0; | |
22065 __Pyx_RefNannySetupContext("__reduce_cython__", 1); | |
22066 | |
22067 /* "(tree fragment)":2 | |
22068 * def __reduce_cython__(self): | |
22069 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
22070 * def __setstate_cython__(self, __pyx_state): | |
22071 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
22072 */ | |
22073 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
22074 __PYX_ERR(1, 2, __pyx_L1_error) | |
22075 | |
22076 /* "(tree fragment)":1 | |
22077 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
22078 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
22079 * def __setstate_cython__(self, __pyx_state): | |
22080 */ | |
22081 | |
22082 /* function exit code */ | |
22083 __pyx_L1_error:; | |
22084 __Pyx_AddTraceback("pysam.libctabixproxies.VCFProxy.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
22085 __pyx_r = NULL; | |
22086 __Pyx_XGIVEREF(__pyx_r); | |
22087 __Pyx_RefNannyFinishContext(); | |
22088 return __pyx_r; | |
22089 } | |
22090 | |
22091 /* "(tree fragment)":3 | |
22092 * def __reduce_cython__(self): | |
22093 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
22094 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
22095 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
22096 */ | |
22097 | |
22098 /* Python wrapper */ | |
22099 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_9__setstate_cython__(PyObject *__pyx_v_self, | |
22100 #if CYTHON_METH_FASTCALL | |
22101 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
22102 #else | |
22103 PyObject *__pyx_args, PyObject *__pyx_kwds | |
22104 #endif | |
22105 ); /*proto*/ | |
22106 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_8VCFProxy_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
22107 static PyObject *__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_9__setstate_cython__(PyObject *__pyx_v_self, | |
22108 #if CYTHON_METH_FASTCALL | |
22109 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
22110 #else | |
22111 PyObject *__pyx_args, PyObject *__pyx_kwds | |
22112 #endif | |
22113 ) { | |
22114 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; | |
22115 #if !CYTHON_METH_FASTCALL | |
22116 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
22117 #endif | |
22118 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
22119 PyObject* values[1] = {0}; | |
22120 int __pyx_lineno = 0; | |
22121 const char *__pyx_filename = NULL; | |
22122 int __pyx_clineno = 0; | |
22123 PyObject *__pyx_r = 0; | |
22124 __Pyx_RefNannyDeclarations | |
22125 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); | |
22126 #if !CYTHON_METH_FASTCALL | |
22127 #if CYTHON_ASSUME_SAFE_MACROS | |
22128 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
22129 #else | |
22130 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
22131 #endif | |
22132 #endif | |
22133 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
22134 { | |
22135 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; | |
22136 if (__pyx_kwds) { | |
22137 Py_ssize_t kw_args; | |
22138 switch (__pyx_nargs) { | |
22139 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
22140 CYTHON_FALLTHROUGH; | |
22141 case 0: break; | |
22142 default: goto __pyx_L5_argtuple_error; | |
22143 } | |
22144 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
22145 switch (__pyx_nargs) { | |
22146 case 0: | |
22147 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { | |
22148 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
22149 kw_args--; | |
22150 } | |
22151 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) | |
22152 else goto __pyx_L5_argtuple_error; | |
22153 } | |
22154 if (unlikely(kw_args > 0)) { | |
22155 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
22156 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) | |
22157 } | |
22158 } else if (unlikely(__pyx_nargs != 1)) { | |
22159 goto __pyx_L5_argtuple_error; | |
22160 } else { | |
22161 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
22162 } | |
22163 __pyx_v___pyx_state = values[0]; | |
22164 } | |
22165 goto __pyx_L6_skip; | |
22166 __pyx_L5_argtuple_error:; | |
22167 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) | |
22168 __pyx_L6_skip:; | |
22169 goto __pyx_L4_argument_unpacking_done; | |
22170 __pyx_L3_error:; | |
22171 { | |
22172 Py_ssize_t __pyx_temp; | |
22173 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
22174 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
22175 } | |
22176 } | |
22177 __Pyx_AddTraceback("pysam.libctabixproxies.VCFProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
22178 __Pyx_RefNannyFinishContext(); | |
22179 return NULL; | |
22180 __pyx_L4_argument_unpacking_done:; | |
22181 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_8VCFProxy_8__setstate_cython__(((struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *)__pyx_v_self), __pyx_v___pyx_state); | |
22182 | |
22183 /* function exit code */ | |
22184 { | |
22185 Py_ssize_t __pyx_temp; | |
22186 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
22187 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
22188 } | |
22189 } | |
22190 __Pyx_RefNannyFinishContext(); | |
22191 return __pyx_r; | |
22192 } | |
22193 | |
22194 static PyObject *__pyx_pf_5pysam_16libctabixproxies_8VCFProxy_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { | |
22195 PyObject *__pyx_r = NULL; | |
22196 __Pyx_RefNannyDeclarations | |
22197 int __pyx_lineno = 0; | |
22198 const char *__pyx_filename = NULL; | |
22199 int __pyx_clineno = 0; | |
22200 __Pyx_RefNannySetupContext("__setstate_cython__", 1); | |
22201 | |
22202 /* "(tree fragment)":4 | |
22203 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
22204 * def __setstate_cython__(self, __pyx_state): | |
22205 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< | |
22206 */ | |
22207 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); | |
22208 __PYX_ERR(1, 4, __pyx_L1_error) | |
22209 | |
22210 /* "(tree fragment)":3 | |
22211 * def __reduce_cython__(self): | |
22212 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
22213 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
22214 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
22215 */ | |
22216 | |
22217 /* function exit code */ | |
22218 __pyx_L1_error:; | |
22219 __Pyx_AddTraceback("pysam.libctabixproxies.VCFProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
22220 __pyx_r = NULL; | |
22221 __Pyx_XGIVEREF(__pyx_r); | |
22222 __Pyx_RefNannyFinishContext(); | |
22223 return __pyx_r; | |
22224 } | |
22225 | |
22226 /* "(tree fragment)":1 | |
22227 * def __pyx_unpickle_TupleProxyIterator(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< | |
22228 * cdef object __pyx_PickleError | |
22229 * cdef object __pyx_result | |
22230 */ | |
22231 | |
22232 /* Python wrapper */ | |
22233 static PyObject *__pyx_pw_5pysam_16libctabixproxies_5__pyx_unpickle_TupleProxyIterator(PyObject *__pyx_self, | |
22234 #if CYTHON_METH_FASTCALL | |
22235 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
22236 #else | |
22237 PyObject *__pyx_args, PyObject *__pyx_kwds | |
22238 #endif | |
22239 ); /*proto*/ | |
22240 static PyMethodDef __pyx_mdef_5pysam_16libctabixproxies_5__pyx_unpickle_TupleProxyIterator = {"__pyx_unpickle_TupleProxyIterator", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_5__pyx_unpickle_TupleProxyIterator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; | |
22241 static PyObject *__pyx_pw_5pysam_16libctabixproxies_5__pyx_unpickle_TupleProxyIterator(PyObject *__pyx_self, | |
22242 #if CYTHON_METH_FASTCALL | |
22243 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds | |
22244 #else | |
22245 PyObject *__pyx_args, PyObject *__pyx_kwds | |
22246 #endif | |
22247 ) { | |
22248 PyObject *__pyx_v___pyx_type = 0; | |
22249 long __pyx_v___pyx_checksum; | |
22250 PyObject *__pyx_v___pyx_state = 0; | |
22251 #if !CYTHON_METH_FASTCALL | |
22252 CYTHON_UNUSED Py_ssize_t __pyx_nargs; | |
22253 #endif | |
22254 CYTHON_UNUSED PyObject *const *__pyx_kwvalues; | |
22255 PyObject* values[3] = {0,0,0}; | |
22256 int __pyx_lineno = 0; | |
22257 const char *__pyx_filename = NULL; | |
22258 int __pyx_clineno = 0; | |
22259 PyObject *__pyx_r = 0; | |
22260 __Pyx_RefNannyDeclarations | |
22261 __Pyx_RefNannySetupContext("__pyx_unpickle_TupleProxyIterator (wrapper)", 0); | |
22262 #if !CYTHON_METH_FASTCALL | |
22263 #if CYTHON_ASSUME_SAFE_MACROS | |
22264 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); | |
22265 #else | |
22266 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; | |
22267 #endif | |
22268 #endif | |
22269 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); | |
22270 { | |
22271 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; | |
22272 if (__pyx_kwds) { | |
22273 Py_ssize_t kw_args; | |
22274 switch (__pyx_nargs) { | |
22275 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); | |
22276 CYTHON_FALLTHROUGH; | |
22277 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); | |
22278 CYTHON_FALLTHROUGH; | |
22279 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
22280 CYTHON_FALLTHROUGH; | |
22281 case 0: break; | |
22282 default: goto __pyx_L5_argtuple_error; | |
22283 } | |
22284 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); | |
22285 switch (__pyx_nargs) { | |
22286 case 0: | |
22287 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { | |
22288 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); | |
22289 kw_args--; | |
22290 } | |
22291 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) | |
22292 else goto __pyx_L5_argtuple_error; | |
22293 CYTHON_FALLTHROUGH; | |
22294 case 1: | |
22295 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { | |
22296 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); | |
22297 kw_args--; | |
22298 } | |
22299 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) | |
22300 else { | |
22301 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleProxyIterator", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) | |
22302 } | |
22303 CYTHON_FALLTHROUGH; | |
22304 case 2: | |
22305 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { | |
22306 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); | |
22307 kw_args--; | |
22308 } | |
22309 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) | |
22310 else { | |
22311 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleProxyIterator", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) | |
22312 } | |
22313 } | |
22314 if (unlikely(kw_args > 0)) { | |
22315 const Py_ssize_t kwd_pos_args = __pyx_nargs; | |
22316 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TupleProxyIterator") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) | |
22317 } | |
22318 } else if (unlikely(__pyx_nargs != 3)) { | |
22319 goto __pyx_L5_argtuple_error; | |
22320 } else { | |
22321 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); | |
22322 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); | |
22323 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); | |
22324 } | |
22325 __pyx_v___pyx_type = values[0]; | |
22326 __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) | |
22327 __pyx_v___pyx_state = values[2]; | |
22328 } | |
22329 goto __pyx_L6_skip; | |
22330 __pyx_L5_argtuple_error:; | |
22331 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleProxyIterator", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error) | |
22332 __pyx_L6_skip:; | |
22333 goto __pyx_L4_argument_unpacking_done; | |
22334 __pyx_L3_error:; | |
22335 { | |
22336 Py_ssize_t __pyx_temp; | |
22337 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
22338 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
22339 } | |
22340 } | |
22341 __Pyx_AddTraceback("pysam.libctabixproxies.__pyx_unpickle_TupleProxyIterator", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
22342 __Pyx_RefNannyFinishContext(); | |
22343 return NULL; | |
22344 __pyx_L4_argument_unpacking_done:; | |
22345 __pyx_r = __pyx_pf_5pysam_16libctabixproxies_4__pyx_unpickle_TupleProxyIterator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); | |
22346 | |
22347 /* function exit code */ | |
22348 { | |
22349 Py_ssize_t __pyx_temp; | |
22350 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { | |
22351 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); | |
22352 } | |
22353 } | |
22354 __Pyx_RefNannyFinishContext(); | |
22355 return __pyx_r; | |
22356 } | |
22357 | |
22358 static PyObject *__pyx_pf_5pysam_16libctabixproxies_4__pyx_unpickle_TupleProxyIterator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { | |
22359 PyObject *__pyx_v___pyx_PickleError = 0; | |
22360 PyObject *__pyx_v___pyx_result = 0; | |
22361 PyObject *__pyx_r = NULL; | |
22362 __Pyx_RefNannyDeclarations | |
22363 PyObject *__pyx_t_1 = NULL; | |
22364 int __pyx_t_2; | |
22365 PyObject *__pyx_t_3 = NULL; | |
22366 PyObject *__pyx_t_4 = NULL; | |
22367 unsigned int __pyx_t_5; | |
22368 int __pyx_lineno = 0; | |
22369 const char *__pyx_filename = NULL; | |
22370 int __pyx_clineno = 0; | |
22371 __Pyx_RefNannySetupContext("__pyx_unpickle_TupleProxyIterator", 1); | |
22372 | |
22373 /* "(tree fragment)":4 | |
22374 * cdef object __pyx_PickleError | |
22375 * cdef object __pyx_result | |
22376 * if __pyx_checksum not in (0x0eb9d08, 0x60f8e6c, 0xd13f98c): # <<<<<<<<<<<<<< | |
22377 * from pickle import PickleError as __pyx_PickleError | |
22378 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x0eb9d08, 0x60f8e6c, 0xd13f98c) = (index, proxy))" % __pyx_checksum | |
22379 */ | |
22380 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) | |
22381 __Pyx_GOTREF(__pyx_t_1); | |
22382 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__31, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error) | |
22383 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
22384 if (__pyx_t_2) { | |
22385 | |
22386 /* "(tree fragment)":5 | |
22387 * cdef object __pyx_result | |
22388 * if __pyx_checksum not in (0x0eb9d08, 0x60f8e6c, 0xd13f98c): | |
22389 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< | |
22390 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x0eb9d08, 0x60f8e6c, 0xd13f98c) = (index, proxy))" % __pyx_checksum | |
22391 * __pyx_result = TupleProxyIterator.__new__(__pyx_type) | |
22392 */ | |
22393 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) | |
22394 __Pyx_GOTREF(__pyx_t_1); | |
22395 __Pyx_INCREF(__pyx_n_s_PickleError); | |
22396 __Pyx_GIVEREF(__pyx_n_s_PickleError); | |
22397 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error); | |
22398 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) | |
22399 __Pyx_GOTREF(__pyx_t_3); | |
22400 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
22401 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) | |
22402 __Pyx_GOTREF(__pyx_t_1); | |
22403 __Pyx_INCREF(__pyx_t_1); | |
22404 __pyx_v___pyx_PickleError = __pyx_t_1; | |
22405 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
22406 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
22407 | |
22408 /* "(tree fragment)":6 | |
22409 * if __pyx_checksum not in (0x0eb9d08, 0x60f8e6c, 0xd13f98c): | |
22410 * from pickle import PickleError as __pyx_PickleError | |
22411 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x0eb9d08, 0x60f8e6c, 0xd13f98c) = (index, proxy))" % __pyx_checksum # <<<<<<<<<<<<<< | |
22412 * __pyx_result = TupleProxyIterator.__new__(__pyx_type) | |
22413 * if __pyx_state is not None: | |
22414 */ | |
22415 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) | |
22416 __Pyx_GOTREF(__pyx_t_3); | |
22417 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) | |
22418 __Pyx_GOTREF(__pyx_t_1); | |
22419 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
22420 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); | |
22421 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
22422 __PYX_ERR(1, 6, __pyx_L1_error) | |
22423 | |
22424 /* "(tree fragment)":4 | |
22425 * cdef object __pyx_PickleError | |
22426 * cdef object __pyx_result | |
22427 * if __pyx_checksum not in (0x0eb9d08, 0x60f8e6c, 0xd13f98c): # <<<<<<<<<<<<<< | |
22428 * from pickle import PickleError as __pyx_PickleError | |
22429 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x0eb9d08, 0x60f8e6c, 0xd13f98c) = (index, proxy))" % __pyx_checksum | |
22430 */ | |
22431 } | |
22432 | |
22433 /* "(tree fragment)":7 | |
22434 * from pickle import PickleError as __pyx_PickleError | |
22435 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x0eb9d08, 0x60f8e6c, 0xd13f98c) = (index, proxy))" % __pyx_checksum | |
22436 * __pyx_result = TupleProxyIterator.__new__(__pyx_type) # <<<<<<<<<<<<<< | |
22437 * if __pyx_state is not None: | |
22438 * __pyx_unpickle_TupleProxyIterator__set_state(<TupleProxyIterator> __pyx_result, __pyx_state) | |
22439 */ | |
22440 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) | |
22441 __Pyx_GOTREF(__pyx_t_3); | |
22442 __pyx_t_4 = NULL; | |
22443 __pyx_t_5 = 0; | |
22444 #if CYTHON_UNPACK_METHODS | |
22445 if (likely(PyMethod_Check(__pyx_t_3))) { | |
22446 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); | |
22447 if (likely(__pyx_t_4)) { | |
22448 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); | |
22449 __Pyx_INCREF(__pyx_t_4); | |
22450 __Pyx_INCREF(function); | |
22451 __Pyx_DECREF_SET(__pyx_t_3, function); | |
22452 __pyx_t_5 = 1; | |
22453 } | |
22454 } | |
22455 #endif | |
22456 { | |
22457 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; | |
22458 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); | |
22459 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; | |
22460 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error) | |
22461 __Pyx_GOTREF(__pyx_t_1); | |
22462 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
22463 } | |
22464 __pyx_v___pyx_result = __pyx_t_1; | |
22465 __pyx_t_1 = 0; | |
22466 | |
22467 /* "(tree fragment)":8 | |
22468 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x0eb9d08, 0x60f8e6c, 0xd13f98c) = (index, proxy))" % __pyx_checksum | |
22469 * __pyx_result = TupleProxyIterator.__new__(__pyx_type) | |
22470 * if __pyx_state is not None: # <<<<<<<<<<<<<< | |
22471 * __pyx_unpickle_TupleProxyIterator__set_state(<TupleProxyIterator> __pyx_result, __pyx_state) | |
22472 * return __pyx_result | |
22473 */ | |
22474 __pyx_t_2 = (__pyx_v___pyx_state != Py_None); | |
22475 if (__pyx_t_2) { | |
22476 | |
22477 /* "(tree fragment)":9 | |
22478 * __pyx_result = TupleProxyIterator.__new__(__pyx_type) | |
22479 * if __pyx_state is not None: | |
22480 * __pyx_unpickle_TupleProxyIterator__set_state(<TupleProxyIterator> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< | |
22481 * return __pyx_result | |
22482 * cdef __pyx_unpickle_TupleProxyIterator__set_state(TupleProxyIterator __pyx_result, tuple __pyx_state): | |
22483 */ | |
22484 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error) | |
22485 __pyx_t_1 = __pyx_f_5pysam_16libctabixproxies___pyx_unpickle_TupleProxyIterator__set_state(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error) | |
22486 __Pyx_GOTREF(__pyx_t_1); | |
22487 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
22488 | |
22489 /* "(tree fragment)":8 | |
22490 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x0eb9d08, 0x60f8e6c, 0xd13f98c) = (index, proxy))" % __pyx_checksum | |
22491 * __pyx_result = TupleProxyIterator.__new__(__pyx_type) | |
22492 * if __pyx_state is not None: # <<<<<<<<<<<<<< | |
22493 * __pyx_unpickle_TupleProxyIterator__set_state(<TupleProxyIterator> __pyx_result, __pyx_state) | |
22494 * return __pyx_result | |
22495 */ | |
22496 } | |
22497 | |
22498 /* "(tree fragment)":10 | |
22499 * if __pyx_state is not None: | |
22500 * __pyx_unpickle_TupleProxyIterator__set_state(<TupleProxyIterator> __pyx_result, __pyx_state) | |
22501 * return __pyx_result # <<<<<<<<<<<<<< | |
22502 * cdef __pyx_unpickle_TupleProxyIterator__set_state(TupleProxyIterator __pyx_result, tuple __pyx_state): | |
22503 * __pyx_result.index = __pyx_state[0]; __pyx_result.proxy = __pyx_state[1] | |
22504 */ | |
22505 __Pyx_XDECREF(__pyx_r); | |
22506 __Pyx_INCREF(__pyx_v___pyx_result); | |
22507 __pyx_r = __pyx_v___pyx_result; | |
22508 goto __pyx_L0; | |
22509 | |
22510 /* "(tree fragment)":1 | |
22511 * def __pyx_unpickle_TupleProxyIterator(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< | |
22512 * cdef object __pyx_PickleError | |
22513 * cdef object __pyx_result | |
22514 */ | |
22515 | |
22516 /* function exit code */ | |
22517 __pyx_L1_error:; | |
22518 __Pyx_XDECREF(__pyx_t_1); | |
22519 __Pyx_XDECREF(__pyx_t_3); | |
22520 __Pyx_XDECREF(__pyx_t_4); | |
22521 __Pyx_AddTraceback("pysam.libctabixproxies.__pyx_unpickle_TupleProxyIterator", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
22522 __pyx_r = NULL; | |
22523 __pyx_L0:; | |
22524 __Pyx_XDECREF(__pyx_v___pyx_PickleError); | |
22525 __Pyx_XDECREF(__pyx_v___pyx_result); | |
22526 __Pyx_XGIVEREF(__pyx_r); | |
22527 __Pyx_RefNannyFinishContext(); | |
22528 return __pyx_r; | |
22529 } | |
22530 | |
22531 /* "(tree fragment)":11 | |
22532 * __pyx_unpickle_TupleProxyIterator__set_state(<TupleProxyIterator> __pyx_result, __pyx_state) | |
22533 * return __pyx_result | |
22534 * cdef __pyx_unpickle_TupleProxyIterator__set_state(TupleProxyIterator __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< | |
22535 * __pyx_result.index = __pyx_state[0]; __pyx_result.proxy = __pyx_state[1] | |
22536 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): | |
22537 */ | |
22538 | |
22539 static PyObject *__pyx_f_5pysam_16libctabixproxies___pyx_unpickle_TupleProxyIterator__set_state(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { | |
22540 PyObject *__pyx_r = NULL; | |
22541 __Pyx_RefNannyDeclarations | |
22542 PyObject *__pyx_t_1 = NULL; | |
22543 int __pyx_t_2; | |
22544 int __pyx_t_3; | |
22545 Py_ssize_t __pyx_t_4; | |
22546 int __pyx_t_5; | |
22547 PyObject *__pyx_t_6 = NULL; | |
22548 PyObject *__pyx_t_7 = NULL; | |
22549 PyObject *__pyx_t_8 = NULL; | |
22550 unsigned int __pyx_t_9; | |
22551 int __pyx_lineno = 0; | |
22552 const char *__pyx_filename = NULL; | |
22553 int __pyx_clineno = 0; | |
22554 __Pyx_RefNannySetupContext("__pyx_unpickle_TupleProxyIterator__set_state", 1); | |
22555 | |
22556 /* "(tree fragment)":12 | |
22557 * return __pyx_result | |
22558 * cdef __pyx_unpickle_TupleProxyIterator__set_state(TupleProxyIterator __pyx_result, tuple __pyx_state): | |
22559 * __pyx_result.index = __pyx_state[0]; __pyx_result.proxy = __pyx_state[1] # <<<<<<<<<<<<<< | |
22560 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): | |
22561 * __pyx_result.__dict__.update(__pyx_state[2]) | |
22562 */ | |
22563 if (unlikely(__pyx_v___pyx_state == Py_None)) { | |
22564 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); | |
22565 __PYX_ERR(1, 12, __pyx_L1_error) | |
22566 } | |
22567 __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) | |
22568 __Pyx_GOTREF(__pyx_t_1); | |
22569 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) | |
22570 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
22571 __pyx_v___pyx_result->index = __pyx_t_2; | |
22572 if (unlikely(__pyx_v___pyx_state == Py_None)) { | |
22573 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); | |
22574 __PYX_ERR(1, 12, __pyx_L1_error) | |
22575 } | |
22576 __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) | |
22577 __Pyx_GOTREF(__pyx_t_1); | |
22578 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_16libctabixproxies_TupleProxy))))) __PYX_ERR(1, 12, __pyx_L1_error) | |
22579 __Pyx_GIVEREF(__pyx_t_1); | |
22580 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->proxy); | |
22581 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->proxy); | |
22582 __pyx_v___pyx_result->proxy = ((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_t_1); | |
22583 __pyx_t_1 = 0; | |
22584 | |
22585 /* "(tree fragment)":13 | |
22586 * cdef __pyx_unpickle_TupleProxyIterator__set_state(TupleProxyIterator __pyx_result, tuple __pyx_state): | |
22587 * __pyx_result.index = __pyx_state[0]; __pyx_result.proxy = __pyx_state[1] | |
22588 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< | |
22589 * __pyx_result.__dict__.update(__pyx_state[2]) | |
22590 */ | |
22591 if (unlikely(__pyx_v___pyx_state == Py_None)) { | |
22592 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); | |
22593 __PYX_ERR(1, 13, __pyx_L1_error) | |
22594 } | |
22595 __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) | |
22596 __pyx_t_5 = (__pyx_t_4 > 2); | |
22597 if (__pyx_t_5) { | |
22598 } else { | |
22599 __pyx_t_3 = __pyx_t_5; | |
22600 goto __pyx_L4_bool_binop_done; | |
22601 } | |
22602 __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) | |
22603 __pyx_t_3 = __pyx_t_5; | |
22604 __pyx_L4_bool_binop_done:; | |
22605 if (__pyx_t_3) { | |
22606 | |
22607 /* "(tree fragment)":14 | |
22608 * __pyx_result.index = __pyx_state[0]; __pyx_result.proxy = __pyx_state[1] | |
22609 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): | |
22610 * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< | |
22611 */ | |
22612 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) | |
22613 __Pyx_GOTREF(__pyx_t_6); | |
22614 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error) | |
22615 __Pyx_GOTREF(__pyx_t_7); | |
22616 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
22617 if (unlikely(__pyx_v___pyx_state == Py_None)) { | |
22618 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); | |
22619 __PYX_ERR(1, 14, __pyx_L1_error) | |
22620 } | |
22621 __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) | |
22622 __Pyx_GOTREF(__pyx_t_6); | |
22623 __pyx_t_8 = NULL; | |
22624 __pyx_t_9 = 0; | |
22625 #if CYTHON_UNPACK_METHODS | |
22626 if (likely(PyMethod_Check(__pyx_t_7))) { | |
22627 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); | |
22628 if (likely(__pyx_t_8)) { | |
22629 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); | |
22630 __Pyx_INCREF(__pyx_t_8); | |
22631 __Pyx_INCREF(function); | |
22632 __Pyx_DECREF_SET(__pyx_t_7, function); | |
22633 __pyx_t_9 = 1; | |
22634 } | |
22635 } | |
22636 #endif | |
22637 { | |
22638 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6}; | |
22639 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); | |
22640 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; | |
22641 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; | |
22642 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) | |
22643 __Pyx_GOTREF(__pyx_t_1); | |
22644 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; | |
22645 } | |
22646 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
22647 | |
22648 /* "(tree fragment)":13 | |
22649 * cdef __pyx_unpickle_TupleProxyIterator__set_state(TupleProxyIterator __pyx_result, tuple __pyx_state): | |
22650 * __pyx_result.index = __pyx_state[0]; __pyx_result.proxy = __pyx_state[1] | |
22651 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< | |
22652 * __pyx_result.__dict__.update(__pyx_state[2]) | |
22653 */ | |
22654 } | |
22655 | |
22656 /* "(tree fragment)":11 | |
22657 * __pyx_unpickle_TupleProxyIterator__set_state(<TupleProxyIterator> __pyx_result, __pyx_state) | |
22658 * return __pyx_result | |
22659 * cdef __pyx_unpickle_TupleProxyIterator__set_state(TupleProxyIterator __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< | |
22660 * __pyx_result.index = __pyx_state[0]; __pyx_result.proxy = __pyx_state[1] | |
22661 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): | |
22662 */ | |
22663 | |
22664 /* function exit code */ | |
22665 __pyx_r = Py_None; __Pyx_INCREF(Py_None); | |
22666 goto __pyx_L0; | |
22667 __pyx_L1_error:; | |
22668 __Pyx_XDECREF(__pyx_t_1); | |
22669 __Pyx_XDECREF(__pyx_t_6); | |
22670 __Pyx_XDECREF(__pyx_t_7); | |
22671 __Pyx_XDECREF(__pyx_t_8); | |
22672 __Pyx_AddTraceback("pysam.libctabixproxies.__pyx_unpickle_TupleProxyIterator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
22673 __pyx_r = 0; | |
22674 __pyx_L0:; | |
22675 __Pyx_XGIVEREF(__pyx_r); | |
22676 __Pyx_RefNannyFinishContext(); | |
22677 return __pyx_r; | |
22678 } | |
22679 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy __pyx_vtable_5pysam_16libctabixproxies_TupleProxy; | |
22680 | |
22681 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_TupleProxy(PyTypeObject *t, PyObject *a, PyObject *k) { | |
22682 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *p; | |
22683 PyObject *o; | |
22684 #if CYTHON_COMPILING_IN_LIMITED_API | |
22685 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); | |
22686 o = alloc_func(t, 0); | |
22687 #else | |
22688 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { | |
22689 o = (*t->tp_alloc)(t, 0); | |
22690 } else { | |
22691 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); | |
22692 } | |
22693 if (unlikely(!o)) return 0; | |
22694 #endif | |
22695 p = ((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)o); | |
22696 p->__pyx_vtab = __pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy; | |
22697 p->encoding = Py_None; Py_INCREF(Py_None); | |
22698 if (unlikely(__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_1__cinit__(o, a, k) < 0)) goto bad; | |
22699 return o; | |
22700 bad: | |
22701 Py_DECREF(o); o = 0; | |
22702 return NULL; | |
22703 } | |
22704 | |
22705 static void __pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxy(PyObject *o) { | |
22706 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *p = (struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)o; | |
22707 #if CYTHON_USE_TP_FINALIZE | |
22708 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { | |
22709 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxy) { | |
22710 if (PyObject_CallFinalizerFromDealloc(o)) return; | |
22711 } | |
22712 } | |
22713 #endif | |
22714 PyObject_GC_UnTrack(o); | |
22715 { | |
22716 PyObject *etype, *eval, *etb; | |
22717 PyErr_Fetch(&etype, &eval, &etb); | |
22718 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); | |
22719 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_3__dealloc__(o); | |
22720 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); | |
22721 PyErr_Restore(etype, eval, etb); | |
22722 } | |
22723 Py_CLEAR(p->encoding); | |
22724 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY | |
22725 (*Py_TYPE(o)->tp_free)(o); | |
22726 #else | |
22727 { | |
22728 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); | |
22729 if (tp_free) tp_free(o); | |
22730 } | |
22731 #endif | |
22732 } | |
22733 | |
22734 static int __pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxy(PyObject *o, visitproc v, void *a) { | |
22735 int e; | |
22736 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *p = (struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)o; | |
22737 if (p->encoding) { | |
22738 e = (*v)(p->encoding, a); if (e) return e; | |
22739 } | |
22740 return 0; | |
22741 } | |
22742 | |
22743 static int __pyx_tp_clear_5pysam_16libctabixproxies_TupleProxy(PyObject *o) { | |
22744 PyObject* tmp; | |
22745 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *p = (struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)o; | |
22746 tmp = ((PyObject*)p->encoding); | |
22747 p->encoding = Py_None; Py_INCREF(Py_None); | |
22748 Py_XDECREF(tmp); | |
22749 return 0; | |
22750 } | |
22751 static PyObject *__pyx_sq_item_5pysam_16libctabixproxies_TupleProxy(PyObject *o, Py_ssize_t i) { | |
22752 PyObject *r; | |
22753 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; | |
22754 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); | |
22755 Py_DECREF(x); | |
22756 return r; | |
22757 } | |
22758 | |
22759 static int __pyx_mp_ass_subscript_5pysam_16libctabixproxies_TupleProxy(PyObject *o, PyObject *i, PyObject *v) { | |
22760 if (v) { | |
22761 return __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_21__setitem__(o, i, v); | |
22762 } | |
22763 else { | |
22764 __Pyx_TypeName o_type_name; | |
22765 o_type_name = __Pyx_PyType_GetName(Py_TYPE(o)); | |
22766 PyErr_Format(PyExc_NotImplementedError, | |
22767 "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); | |
22768 __Pyx_DECREF_TypeName(o_type_name); | |
22769 return -1; | |
22770 } | |
22771 } | |
22772 | |
22773 static PyMethodDef __pyx_methods_5pysam_16libctabixproxies_TupleProxy[] = { | |
22774 {"__copy__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_5__copy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
22775 {"compare", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_7compare, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_10TupleProxy_6compare}, | |
22776 {"_getindex", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_15_getindex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_10TupleProxy_14_getindex}, | |
22777 {"_setindex", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_19_setindex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_10TupleProxy_18_setindex}, | |
22778 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_29__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
22779 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_31__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
22780 {0, 0, 0, 0} | |
22781 }; | |
22782 #if CYTHON_USE_TYPE_SPECS | |
22783 static PyType_Slot __pyx_type_5pysam_16libctabixproxies_TupleProxy_slots[] = { | |
22784 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxy}, | |
22785 {Py_sq_length, (void *)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_23__len__}, | |
22786 {Py_sq_item, (void *)__pyx_sq_item_5pysam_16libctabixproxies_TupleProxy}, | |
22787 {Py_mp_length, (void *)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_23__len__}, | |
22788 {Py_mp_subscript, (void *)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_17__getitem__}, | |
22789 {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_5pysam_16libctabixproxies_TupleProxy}, | |
22790 {Py_tp_str, (void *)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_27__str__}, | |
22791 {Py_tp_doc, (void *)PyDoc_STR("Proxy class for access to parsed row as a tuple.\n\n This class represents a table row for fast read-access.\n\n Access to individual fields is via the [] operator.\n \n Only read-only access is implemented.\n\n ")}, | |
22792 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxy}, | |
22793 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_16libctabixproxies_TupleProxy}, | |
22794 {Py_tp_richcompare, (void *)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_9__richcmp__}, | |
22795 {Py_tp_iter, (void *)__pyx_pw_5pysam_16libctabixproxies_10TupleProxy_25__iter__}, | |
22796 {Py_tp_methods, (void *)__pyx_methods_5pysam_16libctabixproxies_TupleProxy}, | |
22797 {Py_tp_new, (void *)__pyx_tp_new_5pysam_16libctabixproxies_TupleProxy}, | |
22798 {0, 0}, | |
22799 }; | |
22800 static PyType_Spec __pyx_type_5pysam_16libctabixproxies_TupleProxy_spec = { | |
22801 "pysam.libctabixproxies.TupleProxy", | |
22802 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy), | |
22803 0, | |
22804 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, | |
22805 __pyx_type_5pysam_16libctabixproxies_TupleProxy_slots, | |
22806 }; | |
22807 #else | |
22808 | |
22809 static PySequenceMethods __pyx_tp_as_sequence_TupleProxy = { | |
22810 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_23__len__, /*sq_length*/ | |
22811 0, /*sq_concat*/ | |
22812 0, /*sq_repeat*/ | |
22813 __pyx_sq_item_5pysam_16libctabixproxies_TupleProxy, /*sq_item*/ | |
22814 0, /*sq_slice*/ | |
22815 0, /*sq_ass_item*/ | |
22816 0, /*sq_ass_slice*/ | |
22817 0, /*sq_contains*/ | |
22818 0, /*sq_inplace_concat*/ | |
22819 0, /*sq_inplace_repeat*/ | |
22820 }; | |
22821 | |
22822 static PyMappingMethods __pyx_tp_as_mapping_TupleProxy = { | |
22823 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_23__len__, /*mp_length*/ | |
22824 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_17__getitem__, /*mp_subscript*/ | |
22825 __pyx_mp_ass_subscript_5pysam_16libctabixproxies_TupleProxy, /*mp_ass_subscript*/ | |
22826 }; | |
22827 | |
22828 static PyTypeObject __pyx_type_5pysam_16libctabixproxies_TupleProxy = { | |
22829 PyVarObject_HEAD_INIT(0, 0) | |
22830 "pysam.libctabixproxies.""TupleProxy", /*tp_name*/ | |
22831 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy), /*tp_basicsize*/ | |
22832 0, /*tp_itemsize*/ | |
22833 __pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxy, /*tp_dealloc*/ | |
22834 #if PY_VERSION_HEX < 0x030800b4 | |
22835 0, /*tp_print*/ | |
22836 #endif | |
22837 #if PY_VERSION_HEX >= 0x030800b4 | |
22838 0, /*tp_vectorcall_offset*/ | |
22839 #endif | |
22840 0, /*tp_getattr*/ | |
22841 0, /*tp_setattr*/ | |
22842 #if PY_MAJOR_VERSION < 3 | |
22843 0, /*tp_compare*/ | |
22844 #endif | |
22845 #if PY_MAJOR_VERSION >= 3 | |
22846 0, /*tp_as_async*/ | |
22847 #endif | |
22848 0, /*tp_repr*/ | |
22849 0, /*tp_as_number*/ | |
22850 &__pyx_tp_as_sequence_TupleProxy, /*tp_as_sequence*/ | |
22851 &__pyx_tp_as_mapping_TupleProxy, /*tp_as_mapping*/ | |
22852 0, /*tp_hash*/ | |
22853 0, /*tp_call*/ | |
22854 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_27__str__, /*tp_str*/ | |
22855 0, /*tp_getattro*/ | |
22856 0, /*tp_setattro*/ | |
22857 0, /*tp_as_buffer*/ | |
22858 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ | |
22859 PyDoc_STR("Proxy class for access to parsed row as a tuple.\n\n This class represents a table row for fast read-access.\n\n Access to individual fields is via the [] operator.\n \n Only read-only access is implemented.\n\n "), /*tp_doc*/ | |
22860 __pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxy, /*tp_traverse*/ | |
22861 __pyx_tp_clear_5pysam_16libctabixproxies_TupleProxy, /*tp_clear*/ | |
22862 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_9__richcmp__, /*tp_richcompare*/ | |
22863 0, /*tp_weaklistoffset*/ | |
22864 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_25__iter__, /*tp_iter*/ | |
22865 0, /*tp_iternext*/ | |
22866 __pyx_methods_5pysam_16libctabixproxies_TupleProxy, /*tp_methods*/ | |
22867 0, /*tp_members*/ | |
22868 0, /*tp_getset*/ | |
22869 0, /*tp_base*/ | |
22870 0, /*tp_dict*/ | |
22871 0, /*tp_descr_get*/ | |
22872 0, /*tp_descr_set*/ | |
22873 #if !CYTHON_USE_TYPE_SPECS | |
22874 0, /*tp_dictoffset*/ | |
22875 #endif | |
22876 0, /*tp_init*/ | |
22877 0, /*tp_alloc*/ | |
22878 __pyx_tp_new_5pysam_16libctabixproxies_TupleProxy, /*tp_new*/ | |
22879 0, /*tp_free*/ | |
22880 0, /*tp_is_gc*/ | |
22881 0, /*tp_bases*/ | |
22882 0, /*tp_mro*/ | |
22883 0, /*tp_cache*/ | |
22884 0, /*tp_subclasses*/ | |
22885 0, /*tp_weaklist*/ | |
22886 0, /*tp_del*/ | |
22887 0, /*tp_version_tag*/ | |
22888 #if PY_VERSION_HEX >= 0x030400a1 | |
22889 #if CYTHON_USE_TP_FINALIZE | |
22890 0, /*tp_finalize*/ | |
22891 #else | |
22892 NULL, /*tp_finalize*/ | |
22893 #endif | |
22894 #endif | |
22895 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
22896 0, /*tp_vectorcall*/ | |
22897 #endif | |
22898 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
22899 0, /*tp_print*/ | |
22900 #endif | |
22901 #if PY_VERSION_HEX >= 0x030C0000 | |
22902 0, /*tp_watched*/ | |
22903 #endif | |
22904 #if PY_VERSION_HEX >= 0x030d00A4 | |
22905 0, /*tp_versions_used*/ | |
22906 #endif | |
22907 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
22908 0, /*tp_pypy_flags*/ | |
22909 #endif | |
22910 }; | |
22911 #endif | |
22912 | |
22913 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_TupleProxyIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { | |
22914 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *p; | |
22915 PyObject *o; | |
22916 #if CYTHON_COMPILING_IN_LIMITED_API | |
22917 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); | |
22918 o = alloc_func(t, 0); | |
22919 #else | |
22920 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { | |
22921 o = (*t->tp_alloc)(t, 0); | |
22922 } else { | |
22923 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); | |
22924 } | |
22925 if (unlikely(!o)) return 0; | |
22926 #endif | |
22927 p = ((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *)o); | |
22928 p->proxy = ((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)Py_None); Py_INCREF(Py_None); | |
22929 return o; | |
22930 } | |
22931 | |
22932 static void __pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxyIterator(PyObject *o) { | |
22933 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *p = (struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *)o; | |
22934 #if CYTHON_USE_TP_FINALIZE | |
22935 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { | |
22936 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxyIterator) { | |
22937 if (PyObject_CallFinalizerFromDealloc(o)) return; | |
22938 } | |
22939 } | |
22940 #endif | |
22941 PyObject_GC_UnTrack(o); | |
22942 Py_CLEAR(p->proxy); | |
22943 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY | |
22944 (*Py_TYPE(o)->tp_free)(o); | |
22945 #else | |
22946 { | |
22947 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); | |
22948 if (tp_free) tp_free(o); | |
22949 } | |
22950 #endif | |
22951 } | |
22952 | |
22953 static int __pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxyIterator(PyObject *o, visitproc v, void *a) { | |
22954 int e; | |
22955 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *p = (struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *)o; | |
22956 if (p->proxy) { | |
22957 e = (*v)(((PyObject *)p->proxy), a); if (e) return e; | |
22958 } | |
22959 return 0; | |
22960 } | |
22961 | |
22962 static int __pyx_tp_clear_5pysam_16libctabixproxies_TupleProxyIterator(PyObject *o) { | |
22963 PyObject* tmp; | |
22964 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *p = (struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator *)o; | |
22965 tmp = ((PyObject*)p->proxy); | |
22966 p->proxy = ((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)Py_None); Py_INCREF(Py_None); | |
22967 Py_XDECREF(tmp); | |
22968 return 0; | |
22969 } | |
22970 | |
22971 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) { | |
22972 PyObject *res = __pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_5__next__(self); | |
22973 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); } | |
22974 return res; | |
22975 } | |
22976 | |
22977 static PyMethodDef __pyx_methods_5pysam_16libctabixproxies_TupleProxyIterator[] = { | |
22978 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_5__next__, METH_NOARGS|METH_COEXIST, 0}, | |
22979 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
22980 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
22981 {0, 0, 0, 0} | |
22982 }; | |
22983 #if CYTHON_USE_TYPE_SPECS | |
22984 static PyType_Slot __pyx_type_5pysam_16libctabixproxies_TupleProxyIterator_slots[] = { | |
22985 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxyIterator}, | |
22986 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxyIterator}, | |
22987 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_16libctabixproxies_TupleProxyIterator}, | |
22988 {Py_tp_iter, (void *)__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_3__iter__}, | |
22989 {Py_tp_iternext, (void *)__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_5__next__}, | |
22990 {Py_tp_methods, (void *)__pyx_methods_5pysam_16libctabixproxies_TupleProxyIterator}, | |
22991 {Py_tp_init, (void *)__pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_1__init__}, | |
22992 {Py_tp_new, (void *)__pyx_tp_new_5pysam_16libctabixproxies_TupleProxyIterator}, | |
22993 {0, 0}, | |
22994 }; | |
22995 static PyType_Spec __pyx_type_5pysam_16libctabixproxies_TupleProxyIterator_spec = { | |
22996 "pysam.libctabixproxies.TupleProxyIterator", | |
22997 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator), | |
22998 0, | |
22999 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, | |
23000 __pyx_type_5pysam_16libctabixproxies_TupleProxyIterator_slots, | |
23001 }; | |
23002 #else | |
23003 | |
23004 static PyTypeObject __pyx_type_5pysam_16libctabixproxies_TupleProxyIterator = { | |
23005 PyVarObject_HEAD_INIT(0, 0) | |
23006 "pysam.libctabixproxies.""TupleProxyIterator", /*tp_name*/ | |
23007 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator), /*tp_basicsize*/ | |
23008 0, /*tp_itemsize*/ | |
23009 __pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxyIterator, /*tp_dealloc*/ | |
23010 #if PY_VERSION_HEX < 0x030800b4 | |
23011 0, /*tp_print*/ | |
23012 #endif | |
23013 #if PY_VERSION_HEX >= 0x030800b4 | |
23014 0, /*tp_vectorcall_offset*/ | |
23015 #endif | |
23016 0, /*tp_getattr*/ | |
23017 0, /*tp_setattr*/ | |
23018 #if PY_MAJOR_VERSION < 3 | |
23019 0, /*tp_compare*/ | |
23020 #endif | |
23021 #if PY_MAJOR_VERSION >= 3 | |
23022 0, /*tp_as_async*/ | |
23023 #endif | |
23024 0, /*tp_repr*/ | |
23025 0, /*tp_as_number*/ | |
23026 0, /*tp_as_sequence*/ | |
23027 0, /*tp_as_mapping*/ | |
23028 0, /*tp_hash*/ | |
23029 0, /*tp_call*/ | |
23030 0, /*tp_str*/ | |
23031 0, /*tp_getattro*/ | |
23032 0, /*tp_setattro*/ | |
23033 0, /*tp_as_buffer*/ | |
23034 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ | |
23035 0, /*tp_doc*/ | |
23036 __pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxyIterator, /*tp_traverse*/ | |
23037 __pyx_tp_clear_5pysam_16libctabixproxies_TupleProxyIterator, /*tp_clear*/ | |
23038 0, /*tp_richcompare*/ | |
23039 0, /*tp_weaklistoffset*/ | |
23040 __pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_3__iter__, /*tp_iter*/ | |
23041 __pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_5__next__, /*tp_iternext*/ | |
23042 __pyx_methods_5pysam_16libctabixproxies_TupleProxyIterator, /*tp_methods*/ | |
23043 0, /*tp_members*/ | |
23044 0, /*tp_getset*/ | |
23045 0, /*tp_base*/ | |
23046 0, /*tp_dict*/ | |
23047 0, /*tp_descr_get*/ | |
23048 0, /*tp_descr_set*/ | |
23049 #if !CYTHON_USE_TYPE_SPECS | |
23050 0, /*tp_dictoffset*/ | |
23051 #endif | |
23052 __pyx_pw_5pysam_16libctabixproxies_18TupleProxyIterator_1__init__, /*tp_init*/ | |
23053 0, /*tp_alloc*/ | |
23054 __pyx_tp_new_5pysam_16libctabixproxies_TupleProxyIterator, /*tp_new*/ | |
23055 0, /*tp_free*/ | |
23056 0, /*tp_is_gc*/ | |
23057 0, /*tp_bases*/ | |
23058 0, /*tp_mro*/ | |
23059 0, /*tp_cache*/ | |
23060 0, /*tp_subclasses*/ | |
23061 0, /*tp_weaklist*/ | |
23062 0, /*tp_del*/ | |
23063 0, /*tp_version_tag*/ | |
23064 #if PY_VERSION_HEX >= 0x030400a1 | |
23065 #if CYTHON_USE_TP_FINALIZE | |
23066 0, /*tp_finalize*/ | |
23067 #else | |
23068 NULL, /*tp_finalize*/ | |
23069 #endif | |
23070 #endif | |
23071 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
23072 0, /*tp_vectorcall*/ | |
23073 #endif | |
23074 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
23075 0, /*tp_print*/ | |
23076 #endif | |
23077 #if PY_VERSION_HEX >= 0x030C0000 | |
23078 0, /*tp_watched*/ | |
23079 #endif | |
23080 #if PY_VERSION_HEX >= 0x030d00A4 | |
23081 0, /*tp_versions_used*/ | |
23082 #endif | |
23083 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
23084 0, /*tp_pypy_flags*/ | |
23085 #endif | |
23086 }; | |
23087 #endif | |
23088 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_vtable_5pysam_16libctabixproxies_NamedTupleProxy; | |
23089 | |
23090 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_NamedTupleProxy(PyTypeObject *t, PyObject *a, PyObject *k) { | |
23091 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *p; | |
23092 PyObject *o = __pyx_tp_new_5pysam_16libctabixproxies_TupleProxy(t, a, k); | |
23093 if (unlikely(!o)) return 0; | |
23094 p = ((struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy *)o); | |
23095 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy*)__pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy; | |
23096 return o; | |
23097 } | |
23098 | |
23099 static PyObject *__pyx_tp_getattro_5pysam_16libctabixproxies_NamedTupleProxy(PyObject *o, PyObject *n) { | |
23100 PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n); | |
23101 if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { | |
23102 PyErr_Clear(); | |
23103 v = __pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_3__getattr__(o, n); | |
23104 } | |
23105 return v; | |
23106 } | |
23107 | |
23108 static int __pyx_tp_setattro_5pysam_16libctabixproxies_NamedTupleProxy(PyObject *o, PyObject *n, PyObject *v) { | |
23109 if (v) { | |
23110 return __pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_1__setattr__(o, n, v); | |
23111 } | |
23112 else { | |
23113 if (__pyx_ptype_5pysam_16libctabixproxies_TupleProxy->tp_setattro) | |
23114 return __pyx_ptype_5pysam_16libctabixproxies_TupleProxy->tp_setattro(o, n, v); | |
23115 return PyObject_GenericSetAttr(o, n, 0); | |
23116 } | |
23117 } | |
23118 | |
23119 static PyMethodDef __pyx_methods_5pysam_16libctabixproxies_NamedTupleProxy[] = { | |
23120 {"__getattr__", (PyCFunction)__pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_3__getattr__, METH_O|METH_COEXIST, 0}, | |
23121 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
23122 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_15NamedTupleProxy_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
23123 {0, 0, 0, 0} | |
23124 }; | |
23125 #if CYTHON_USE_TYPE_SPECS | |
23126 static PyType_Slot __pyx_type_5pysam_16libctabixproxies_NamedTupleProxy_slots[] = { | |
23127 {Py_tp_getattro, (void *)__pyx_tp_getattro_5pysam_16libctabixproxies_NamedTupleProxy}, | |
23128 {Py_tp_setattro, (void *)__pyx_tp_setattro_5pysam_16libctabixproxies_NamedTupleProxy}, | |
23129 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxy}, | |
23130 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_16libctabixproxies_TupleProxy}, | |
23131 {Py_tp_methods, (void *)__pyx_methods_5pysam_16libctabixproxies_NamedTupleProxy}, | |
23132 {Py_tp_new, (void *)__pyx_tp_new_5pysam_16libctabixproxies_NamedTupleProxy}, | |
23133 {0, 0}, | |
23134 }; | |
23135 static PyType_Spec __pyx_type_5pysam_16libctabixproxies_NamedTupleProxy_spec = { | |
23136 "pysam.libctabixproxies.NamedTupleProxy", | |
23137 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy), | |
23138 0, | |
23139 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, | |
23140 __pyx_type_5pysam_16libctabixproxies_NamedTupleProxy_slots, | |
23141 }; | |
23142 #else | |
23143 | |
23144 static PyTypeObject __pyx_type_5pysam_16libctabixproxies_NamedTupleProxy = { | |
23145 PyVarObject_HEAD_INIT(0, 0) | |
23146 "pysam.libctabixproxies.""NamedTupleProxy", /*tp_name*/ | |
23147 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy), /*tp_basicsize*/ | |
23148 0, /*tp_itemsize*/ | |
23149 __pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxy, /*tp_dealloc*/ | |
23150 #if PY_VERSION_HEX < 0x030800b4 | |
23151 0, /*tp_print*/ | |
23152 #endif | |
23153 #if PY_VERSION_HEX >= 0x030800b4 | |
23154 0, /*tp_vectorcall_offset*/ | |
23155 #endif | |
23156 0, /*tp_getattr*/ | |
23157 0, /*tp_setattr*/ | |
23158 #if PY_MAJOR_VERSION < 3 | |
23159 0, /*tp_compare*/ | |
23160 #endif | |
23161 #if PY_MAJOR_VERSION >= 3 | |
23162 0, /*tp_as_async*/ | |
23163 #endif | |
23164 0, /*tp_repr*/ | |
23165 0, /*tp_as_number*/ | |
23166 0, /*tp_as_sequence*/ | |
23167 0, /*tp_as_mapping*/ | |
23168 0, /*tp_hash*/ | |
23169 0, /*tp_call*/ | |
23170 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23171 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_27__str__, /*tp_str*/ | |
23172 #else | |
23173 0, /*tp_str*/ | |
23174 #endif | |
23175 __pyx_tp_getattro_5pysam_16libctabixproxies_NamedTupleProxy, /*tp_getattro*/ | |
23176 __pyx_tp_setattro_5pysam_16libctabixproxies_NamedTupleProxy, /*tp_setattro*/ | |
23177 0, /*tp_as_buffer*/ | |
23178 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ | |
23179 0, /*tp_doc*/ | |
23180 __pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxy, /*tp_traverse*/ | |
23181 __pyx_tp_clear_5pysam_16libctabixproxies_TupleProxy, /*tp_clear*/ | |
23182 0, /*tp_richcompare*/ | |
23183 0, /*tp_weaklistoffset*/ | |
23184 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23185 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_25__iter__, /*tp_iter*/ | |
23186 #else | |
23187 0, /*tp_iter*/ | |
23188 #endif | |
23189 0, /*tp_iternext*/ | |
23190 __pyx_methods_5pysam_16libctabixproxies_NamedTupleProxy, /*tp_methods*/ | |
23191 0, /*tp_members*/ | |
23192 0, /*tp_getset*/ | |
23193 0, /*tp_base*/ | |
23194 0, /*tp_dict*/ | |
23195 0, /*tp_descr_get*/ | |
23196 0, /*tp_descr_set*/ | |
23197 #if !CYTHON_USE_TYPE_SPECS | |
23198 0, /*tp_dictoffset*/ | |
23199 #endif | |
23200 0, /*tp_init*/ | |
23201 0, /*tp_alloc*/ | |
23202 __pyx_tp_new_5pysam_16libctabixproxies_NamedTupleProxy, /*tp_new*/ | |
23203 0, /*tp_free*/ | |
23204 0, /*tp_is_gc*/ | |
23205 0, /*tp_bases*/ | |
23206 0, /*tp_mro*/ | |
23207 0, /*tp_cache*/ | |
23208 0, /*tp_subclasses*/ | |
23209 0, /*tp_weaklist*/ | |
23210 0, /*tp_del*/ | |
23211 0, /*tp_version_tag*/ | |
23212 #if PY_VERSION_HEX >= 0x030400a1 | |
23213 #if CYTHON_USE_TP_FINALIZE | |
23214 0, /*tp_finalize*/ | |
23215 #else | |
23216 NULL, /*tp_finalize*/ | |
23217 #endif | |
23218 #endif | |
23219 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
23220 0, /*tp_vectorcall*/ | |
23221 #endif | |
23222 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
23223 0, /*tp_print*/ | |
23224 #endif | |
23225 #if PY_VERSION_HEX >= 0x030C0000 | |
23226 0, /*tp_watched*/ | |
23227 #endif | |
23228 #if PY_VERSION_HEX >= 0x030d00A4 | |
23229 0, /*tp_versions_used*/ | |
23230 #endif | |
23231 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
23232 0, /*tp_pypy_flags*/ | |
23233 #endif | |
23234 }; | |
23235 #endif | |
23236 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy __pyx_vtable_5pysam_16libctabixproxies_GTFProxy; | |
23237 | |
23238 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_GTFProxy(PyTypeObject *t, PyObject *a, PyObject *k) { | |
23239 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *p; | |
23240 PyObject *o = __pyx_tp_new_5pysam_16libctabixproxies_NamedTupleProxy(t, a, k); | |
23241 if (unlikely(!o)) return 0; | |
23242 p = ((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)o); | |
23243 p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy*)__pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy; | |
23244 p->attribute_dict = Py_None; Py_INCREF(Py_None); | |
23245 if (unlikely(__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; | |
23246 return o; | |
23247 bad: | |
23248 Py_DECREF(o); o = 0; | |
23249 return NULL; | |
23250 } | |
23251 | |
23252 static void __pyx_tp_dealloc_5pysam_16libctabixproxies_GTFProxy(PyObject *o) { | |
23253 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *p = (struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)o; | |
23254 #if CYTHON_USE_TP_FINALIZE | |
23255 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { | |
23256 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_16libctabixproxies_GTFProxy) { | |
23257 if (PyObject_CallFinalizerFromDealloc(o)) return; | |
23258 } | |
23259 } | |
23260 #endif | |
23261 PyObject_GC_UnTrack(o); | |
23262 Py_CLEAR(p->attribute_dict); | |
23263 PyObject_GC_Track(o); | |
23264 __pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxy(o); | |
23265 } | |
23266 | |
23267 static int __pyx_tp_traverse_5pysam_16libctabixproxies_GTFProxy(PyObject *o, visitproc v, void *a) { | |
23268 int e; | |
23269 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *p = (struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)o; | |
23270 e = __pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxy(o, v, a); if (e) return e; | |
23271 if (p->attribute_dict) { | |
23272 e = (*v)(p->attribute_dict, a); if (e) return e; | |
23273 } | |
23274 return 0; | |
23275 } | |
23276 | |
23277 static int __pyx_tp_clear_5pysam_16libctabixproxies_GTFProxy(PyObject *o) { | |
23278 PyObject* tmp; | |
23279 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *p = (struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)o; | |
23280 __pyx_tp_clear_5pysam_16libctabixproxies_TupleProxy(o); | |
23281 tmp = ((PyObject*)p->attribute_dict); | |
23282 p->attribute_dict = Py_None; Py_INCREF(Py_None); | |
23283 Py_XDECREF(tmp); | |
23284 return 0; | |
23285 } | |
23286 static PyObject *__pyx_sq_item_5pysam_16libctabixproxies_GTFProxy(PyObject *o, Py_ssize_t i) { | |
23287 PyObject *r; | |
23288 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; | |
23289 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); | |
23290 Py_DECREF(x); | |
23291 return r; | |
23292 } | |
23293 | |
23294 static PyObject *__pyx_tp_getattro_5pysam_16libctabixproxies_GTFProxy(PyObject *o, PyObject *n) { | |
23295 PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n); | |
23296 if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { | |
23297 PyErr_Clear(); | |
23298 v = __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_34__getattr__(o, n); | |
23299 } | |
23300 return v; | |
23301 } | |
23302 | |
23303 static int __pyx_tp_setattro_5pysam_16libctabixproxies_GTFProxy(PyObject *o, PyObject *n, PyObject *v) { | |
23304 if (v) { | |
23305 return __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_36__setattr__(o, n, v); | |
23306 } | |
23307 else { | |
23308 if (__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy->tp_setattro) | |
23309 return __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy->tp_setattro(o, n, v); | |
23310 return PyObject_GenericSetAttr(o, n, 0); | |
23311 } | |
23312 } | |
23313 | |
23314 static PyMethodDef __pyx_methods_5pysam_16libctabixproxies_GTFProxy[] = { | |
23315 {"to_dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_7to_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_6to_dict}, | |
23316 {"as_dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_9as_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_8as_dict}, | |
23317 {"from_dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_11from_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_10from_dict}, | |
23318 {"invert", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_15invert, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_14invert}, | |
23319 {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_17keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_16keys}, | |
23320 {"setAttribute", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_21setAttribute, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_20setAttribute}, | |
23321 {"attribute_string2dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_23attribute_string2dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
23322 {"dict2attribute_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_29dict2attribute_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_28dict2attribute_string}, | |
23323 {"attribute_string2iterator", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_31attribute_string2iterator, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_30attribute_string2iterator}, | |
23324 {"__getattr__", (PyCFunction)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_34__getattr__, METH_O|METH_COEXIST, __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_33__getattr__}, | |
23325 {"asDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_38asDict, METH_VARARGS|METH_KEYWORDS, 0}, | |
23326 {"fromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_40fromDict, METH_VARARGS|METH_KEYWORDS, 0}, | |
23327 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_42__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
23328 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_44__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
23329 {0, 0, 0, 0} | |
23330 }; | |
23331 #if CYTHON_USE_TYPE_SPECS | |
23332 static PyType_Slot __pyx_type_5pysam_16libctabixproxies_GTFProxy_slots[] = { | |
23333 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_16libctabixproxies_GTFProxy}, | |
23334 #if PY_MAJOR_VERSION < 3 | |
23335 {Py_tp_compare, (void *)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_25__cmp__}, | |
23336 #endif | |
23337 {Py_sq_item, (void *)__pyx_sq_item_5pysam_16libctabixproxies_GTFProxy}, | |
23338 {Py_mp_subscript, (void *)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_19__getitem__}, | |
23339 {Py_tp_str, (void *)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_13__str__}, | |
23340 {Py_tp_getattro, (void *)__pyx_tp_getattro_5pysam_16libctabixproxies_GTFProxy}, | |
23341 {Py_tp_setattro, (void *)__pyx_tp_setattro_5pysam_16libctabixproxies_GTFProxy}, | |
23342 {Py_tp_doc, (void *)PyDoc_STR("Proxy class for access to GTF fields.\n\n This class represents a GTF entry for fast read-access.\n Write-access has been added as well, though some care must\n be taken. If any of the string fields (contig, source, ...)\n are set, the new value is tied to the lifetime of the\n argument that was supplied.\n\n The only exception is the attributes field when set from\n a dictionary - this field will manage its own memory.\n\n ")}, | |
23343 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_16libctabixproxies_GTFProxy}, | |
23344 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_16libctabixproxies_GTFProxy}, | |
23345 {Py_tp_richcompare, (void *)__pyx_pw_5pysam_16libctabixproxies_8GTFProxy_27__richcmp__}, | |
23346 {Py_tp_methods, (void *)__pyx_methods_5pysam_16libctabixproxies_GTFProxy}, | |
23347 {Py_tp_new, (void *)__pyx_tp_new_5pysam_16libctabixproxies_GTFProxy}, | |
23348 {0, 0}, | |
23349 }; | |
23350 static PyType_Spec __pyx_type_5pysam_16libctabixproxies_GTFProxy_spec = { | |
23351 "pysam.libctabixproxies.GTFProxy", | |
23352 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy), | |
23353 0, | |
23354 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, | |
23355 __pyx_type_5pysam_16libctabixproxies_GTFProxy_slots, | |
23356 }; | |
23357 #else | |
23358 | |
23359 static PySequenceMethods __pyx_tp_as_sequence_GTFProxy = { | |
23360 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23361 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_23__len__, /*sq_length*/ | |
23362 #else | |
23363 0, /*sq_length*/ | |
23364 #endif | |
23365 0, /*sq_concat*/ | |
23366 0, /*sq_repeat*/ | |
23367 __pyx_sq_item_5pysam_16libctabixproxies_GTFProxy, /*sq_item*/ | |
23368 0, /*sq_slice*/ | |
23369 0, /*sq_ass_item*/ | |
23370 0, /*sq_ass_slice*/ | |
23371 0, /*sq_contains*/ | |
23372 0, /*sq_inplace_concat*/ | |
23373 0, /*sq_inplace_repeat*/ | |
23374 }; | |
23375 | |
23376 static PyMappingMethods __pyx_tp_as_mapping_GTFProxy = { | |
23377 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23378 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_23__len__, /*mp_length*/ | |
23379 #else | |
23380 0, /*mp_length*/ | |
23381 #endif | |
23382 __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_19__getitem__, /*mp_subscript*/ | |
23383 0, /*mp_ass_subscript*/ | |
23384 }; | |
23385 | |
23386 static PyTypeObject __pyx_type_5pysam_16libctabixproxies_GTFProxy = { | |
23387 PyVarObject_HEAD_INIT(0, 0) | |
23388 "pysam.libctabixproxies.""GTFProxy", /*tp_name*/ | |
23389 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy), /*tp_basicsize*/ | |
23390 0, /*tp_itemsize*/ | |
23391 __pyx_tp_dealloc_5pysam_16libctabixproxies_GTFProxy, /*tp_dealloc*/ | |
23392 #if PY_VERSION_HEX < 0x030800b4 | |
23393 0, /*tp_print*/ | |
23394 #endif | |
23395 #if PY_VERSION_HEX >= 0x030800b4 | |
23396 0, /*tp_vectorcall_offset*/ | |
23397 #endif | |
23398 0, /*tp_getattr*/ | |
23399 0, /*tp_setattr*/ | |
23400 #if PY_MAJOR_VERSION < 3 | |
23401 __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_25__cmp__, /*tp_compare*/ | |
23402 #endif | |
23403 #if PY_MAJOR_VERSION >= 3 | |
23404 0, /*tp_as_async*/ | |
23405 #endif | |
23406 0, /*tp_repr*/ | |
23407 0, /*tp_as_number*/ | |
23408 &__pyx_tp_as_sequence_GTFProxy, /*tp_as_sequence*/ | |
23409 &__pyx_tp_as_mapping_GTFProxy, /*tp_as_mapping*/ | |
23410 0, /*tp_hash*/ | |
23411 0, /*tp_call*/ | |
23412 __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_13__str__, /*tp_str*/ | |
23413 __pyx_tp_getattro_5pysam_16libctabixproxies_GTFProxy, /*tp_getattro*/ | |
23414 __pyx_tp_setattro_5pysam_16libctabixproxies_GTFProxy, /*tp_setattro*/ | |
23415 0, /*tp_as_buffer*/ | |
23416 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ | |
23417 PyDoc_STR("Proxy class for access to GTF fields.\n\n This class represents a GTF entry for fast read-access.\n Write-access has been added as well, though some care must\n be taken. If any of the string fields (contig, source, ...)\n are set, the new value is tied to the lifetime of the\n argument that was supplied.\n\n The only exception is the attributes field when set from\n a dictionary - this field will manage its own memory.\n\n "), /*tp_doc*/ | |
23418 __pyx_tp_traverse_5pysam_16libctabixproxies_GTFProxy, /*tp_traverse*/ | |
23419 __pyx_tp_clear_5pysam_16libctabixproxies_GTFProxy, /*tp_clear*/ | |
23420 __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_27__richcmp__, /*tp_richcompare*/ | |
23421 0, /*tp_weaklistoffset*/ | |
23422 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23423 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_25__iter__, /*tp_iter*/ | |
23424 #else | |
23425 0, /*tp_iter*/ | |
23426 #endif | |
23427 0, /*tp_iternext*/ | |
23428 __pyx_methods_5pysam_16libctabixproxies_GTFProxy, /*tp_methods*/ | |
23429 0, /*tp_members*/ | |
23430 0, /*tp_getset*/ | |
23431 0, /*tp_base*/ | |
23432 0, /*tp_dict*/ | |
23433 0, /*tp_descr_get*/ | |
23434 0, /*tp_descr_set*/ | |
23435 #if !CYTHON_USE_TYPE_SPECS | |
23436 0, /*tp_dictoffset*/ | |
23437 #endif | |
23438 0, /*tp_init*/ | |
23439 0, /*tp_alloc*/ | |
23440 __pyx_tp_new_5pysam_16libctabixproxies_GTFProxy, /*tp_new*/ | |
23441 0, /*tp_free*/ | |
23442 0, /*tp_is_gc*/ | |
23443 0, /*tp_bases*/ | |
23444 0, /*tp_mro*/ | |
23445 0, /*tp_cache*/ | |
23446 0, /*tp_subclasses*/ | |
23447 0, /*tp_weaklist*/ | |
23448 0, /*tp_del*/ | |
23449 0, /*tp_version_tag*/ | |
23450 #if PY_VERSION_HEX >= 0x030400a1 | |
23451 #if CYTHON_USE_TP_FINALIZE | |
23452 0, /*tp_finalize*/ | |
23453 #else | |
23454 NULL, /*tp_finalize*/ | |
23455 #endif | |
23456 #endif | |
23457 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
23458 0, /*tp_vectorcall*/ | |
23459 #endif | |
23460 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
23461 0, /*tp_print*/ | |
23462 #endif | |
23463 #if PY_VERSION_HEX >= 0x030C0000 | |
23464 0, /*tp_watched*/ | |
23465 #endif | |
23466 #if PY_VERSION_HEX >= 0x030d00A4 | |
23467 0, /*tp_versions_used*/ | |
23468 #endif | |
23469 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
23470 0, /*tp_pypy_flags*/ | |
23471 #endif | |
23472 }; | |
23473 #endif | |
23474 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy __pyx_vtable_5pysam_16libctabixproxies_GFF3Proxy; | |
23475 | |
23476 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_GFF3Proxy(PyTypeObject *t, PyObject *a, PyObject *k) { | |
23477 struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *p; | |
23478 PyObject *o = __pyx_tp_new_5pysam_16libctabixproxies_GTFProxy(t, a, k); | |
23479 if (unlikely(!o)) return 0; | |
23480 p = ((struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *)o); | |
23481 p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy*)__pyx_vtabptr_5pysam_16libctabixproxies_GFF3Proxy; | |
23482 return o; | |
23483 } | |
23484 | |
23485 static PyMethodDef __pyx_methods_5pysam_16libctabixproxies_GFF3Proxy[] = { | |
23486 {"dict2attribute_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_1dict2attribute_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_9GFF3Proxy_dict2attribute_string}, | |
23487 {"attribute_string2iterator", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_3attribute_string2iterator, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_16libctabixproxies_9GFF3Proxy_2attribute_string2iterator}, | |
23488 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_6__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
23489 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_9GFF3Proxy_8__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
23490 {0, 0, 0, 0} | |
23491 }; | |
23492 #if CYTHON_USE_TYPE_SPECS | |
23493 static PyType_Slot __pyx_type_5pysam_16libctabixproxies_GFF3Proxy_slots[] = { | |
23494 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_16libctabixproxies_GTFProxy}, | |
23495 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_16libctabixproxies_GTFProxy}, | |
23496 {Py_tp_methods, (void *)__pyx_methods_5pysam_16libctabixproxies_GFF3Proxy}, | |
23497 {Py_tp_new, (void *)__pyx_tp_new_5pysam_16libctabixproxies_GFF3Proxy}, | |
23498 {0, 0}, | |
23499 }; | |
23500 static PyType_Spec __pyx_type_5pysam_16libctabixproxies_GFF3Proxy_spec = { | |
23501 "pysam.libctabixproxies.GFF3Proxy", | |
23502 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy), | |
23503 0, | |
23504 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, | |
23505 __pyx_type_5pysam_16libctabixproxies_GFF3Proxy_slots, | |
23506 }; | |
23507 #else | |
23508 | |
23509 static PyTypeObject __pyx_type_5pysam_16libctabixproxies_GFF3Proxy = { | |
23510 PyVarObject_HEAD_INIT(0, 0) | |
23511 "pysam.libctabixproxies.""GFF3Proxy", /*tp_name*/ | |
23512 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy), /*tp_basicsize*/ | |
23513 0, /*tp_itemsize*/ | |
23514 __pyx_tp_dealloc_5pysam_16libctabixproxies_GTFProxy, /*tp_dealloc*/ | |
23515 #if PY_VERSION_HEX < 0x030800b4 | |
23516 0, /*tp_print*/ | |
23517 #endif | |
23518 #if PY_VERSION_HEX >= 0x030800b4 | |
23519 0, /*tp_vectorcall_offset*/ | |
23520 #endif | |
23521 0, /*tp_getattr*/ | |
23522 0, /*tp_setattr*/ | |
23523 #if PY_MAJOR_VERSION < 3 | |
23524 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23525 __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_25__cmp__, /*tp_compare*/ | |
23526 #else | |
23527 0, /*tp_compare*/ | |
23528 #endif | |
23529 #endif | |
23530 #if PY_MAJOR_VERSION >= 3 | |
23531 0, /*tp_as_async*/ | |
23532 #endif | |
23533 0, /*tp_repr*/ | |
23534 0, /*tp_as_number*/ | |
23535 0, /*tp_as_sequence*/ | |
23536 0, /*tp_as_mapping*/ | |
23537 0, /*tp_hash*/ | |
23538 0, /*tp_call*/ | |
23539 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23540 __pyx_pw_5pysam_16libctabixproxies_8GTFProxy_13__str__, /*tp_str*/ | |
23541 #else | |
23542 0, /*tp_str*/ | |
23543 #endif | |
23544 0, /*tp_getattro*/ | |
23545 0, /*tp_setattro*/ | |
23546 0, /*tp_as_buffer*/ | |
23547 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ | |
23548 0, /*tp_doc*/ | |
23549 __pyx_tp_traverse_5pysam_16libctabixproxies_GTFProxy, /*tp_traverse*/ | |
23550 __pyx_tp_clear_5pysam_16libctabixproxies_GTFProxy, /*tp_clear*/ | |
23551 0, /*tp_richcompare*/ | |
23552 0, /*tp_weaklistoffset*/ | |
23553 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23554 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_25__iter__, /*tp_iter*/ | |
23555 #else | |
23556 0, /*tp_iter*/ | |
23557 #endif | |
23558 0, /*tp_iternext*/ | |
23559 __pyx_methods_5pysam_16libctabixproxies_GFF3Proxy, /*tp_methods*/ | |
23560 0, /*tp_members*/ | |
23561 0, /*tp_getset*/ | |
23562 0, /*tp_base*/ | |
23563 0, /*tp_dict*/ | |
23564 0, /*tp_descr_get*/ | |
23565 0, /*tp_descr_set*/ | |
23566 #if !CYTHON_USE_TYPE_SPECS | |
23567 0, /*tp_dictoffset*/ | |
23568 #endif | |
23569 0, /*tp_init*/ | |
23570 0, /*tp_alloc*/ | |
23571 __pyx_tp_new_5pysam_16libctabixproxies_GFF3Proxy, /*tp_new*/ | |
23572 0, /*tp_free*/ | |
23573 0, /*tp_is_gc*/ | |
23574 0, /*tp_bases*/ | |
23575 0, /*tp_mro*/ | |
23576 0, /*tp_cache*/ | |
23577 0, /*tp_subclasses*/ | |
23578 0, /*tp_weaklist*/ | |
23579 0, /*tp_del*/ | |
23580 0, /*tp_version_tag*/ | |
23581 #if PY_VERSION_HEX >= 0x030400a1 | |
23582 #if CYTHON_USE_TP_FINALIZE | |
23583 0, /*tp_finalize*/ | |
23584 #else | |
23585 NULL, /*tp_finalize*/ | |
23586 #endif | |
23587 #endif | |
23588 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
23589 0, /*tp_vectorcall*/ | |
23590 #endif | |
23591 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
23592 0, /*tp_print*/ | |
23593 #endif | |
23594 #if PY_VERSION_HEX >= 0x030C0000 | |
23595 0, /*tp_watched*/ | |
23596 #endif | |
23597 #if PY_VERSION_HEX >= 0x030d00A4 | |
23598 0, /*tp_versions_used*/ | |
23599 #endif | |
23600 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
23601 0, /*tp_pypy_flags*/ | |
23602 #endif | |
23603 }; | |
23604 #endif | |
23605 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy __pyx_vtable_5pysam_16libctabixproxies_BedProxy; | |
23606 | |
23607 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_BedProxy(PyTypeObject *t, PyObject *a, PyObject *k) { | |
23608 struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *p; | |
23609 PyObject *o = __pyx_tp_new_5pysam_16libctabixproxies_NamedTupleProxy(t, a, k); | |
23610 if (unlikely(!o)) return 0; | |
23611 p = ((struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *)o); | |
23612 p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy*)__pyx_vtabptr_5pysam_16libctabixproxies_BedProxy; | |
23613 return o; | |
23614 } | |
23615 | |
23616 static int __pyx_tp_setattro_5pysam_16libctabixproxies_BedProxy(PyObject *o, PyObject *n, PyObject *v) { | |
23617 if (v) { | |
23618 return __pyx_pw_5pysam_16libctabixproxies_8BedProxy_7__setattr__(o, n, v); | |
23619 } | |
23620 else { | |
23621 if (__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy->tp_setattro) | |
23622 return __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy->tp_setattro(o, n, v); | |
23623 return PyObject_GenericSetAttr(o, n, 0); | |
23624 } | |
23625 } | |
23626 | |
23627 static PyMethodDef __pyx_methods_5pysam_16libctabixproxies_BedProxy[] = { | |
23628 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8BedProxy_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
23629 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8BedProxy_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
23630 {0, 0, 0, 0} | |
23631 }; | |
23632 #if CYTHON_USE_TYPE_SPECS | |
23633 static PyType_Slot __pyx_type_5pysam_16libctabixproxies_BedProxy_slots[] = { | |
23634 {Py_tp_str, (void *)__pyx_pw_5pysam_16libctabixproxies_8BedProxy_5__str__}, | |
23635 {Py_tp_setattro, (void *)__pyx_tp_setattro_5pysam_16libctabixproxies_BedProxy}, | |
23636 {Py_tp_doc, (void *)PyDoc_STR("Proxy class for access to Bed fields.\n\n This class represents a BED entry for fast read-access.\n ")}, | |
23637 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxy}, | |
23638 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_16libctabixproxies_TupleProxy}, | |
23639 {Py_tp_methods, (void *)__pyx_methods_5pysam_16libctabixproxies_BedProxy}, | |
23640 {Py_tp_new, (void *)__pyx_tp_new_5pysam_16libctabixproxies_BedProxy}, | |
23641 {0, 0}, | |
23642 }; | |
23643 static PyType_Spec __pyx_type_5pysam_16libctabixproxies_BedProxy_spec = { | |
23644 "pysam.libctabixproxies.BedProxy", | |
23645 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy), | |
23646 0, | |
23647 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, | |
23648 __pyx_type_5pysam_16libctabixproxies_BedProxy_slots, | |
23649 }; | |
23650 #else | |
23651 | |
23652 static PyTypeObject __pyx_type_5pysam_16libctabixproxies_BedProxy = { | |
23653 PyVarObject_HEAD_INIT(0, 0) | |
23654 "pysam.libctabixproxies.""BedProxy", /*tp_name*/ | |
23655 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy), /*tp_basicsize*/ | |
23656 0, /*tp_itemsize*/ | |
23657 __pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxy, /*tp_dealloc*/ | |
23658 #if PY_VERSION_HEX < 0x030800b4 | |
23659 0, /*tp_print*/ | |
23660 #endif | |
23661 #if PY_VERSION_HEX >= 0x030800b4 | |
23662 0, /*tp_vectorcall_offset*/ | |
23663 #endif | |
23664 0, /*tp_getattr*/ | |
23665 0, /*tp_setattr*/ | |
23666 #if PY_MAJOR_VERSION < 3 | |
23667 0, /*tp_compare*/ | |
23668 #endif | |
23669 #if PY_MAJOR_VERSION >= 3 | |
23670 0, /*tp_as_async*/ | |
23671 #endif | |
23672 0, /*tp_repr*/ | |
23673 0, /*tp_as_number*/ | |
23674 0, /*tp_as_sequence*/ | |
23675 0, /*tp_as_mapping*/ | |
23676 0, /*tp_hash*/ | |
23677 0, /*tp_call*/ | |
23678 __pyx_pw_5pysam_16libctabixproxies_8BedProxy_5__str__, /*tp_str*/ | |
23679 0, /*tp_getattro*/ | |
23680 __pyx_tp_setattro_5pysam_16libctabixproxies_BedProxy, /*tp_setattro*/ | |
23681 0, /*tp_as_buffer*/ | |
23682 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ | |
23683 PyDoc_STR("Proxy class for access to Bed fields.\n\n This class represents a BED entry for fast read-access.\n "), /*tp_doc*/ | |
23684 __pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxy, /*tp_traverse*/ | |
23685 __pyx_tp_clear_5pysam_16libctabixproxies_TupleProxy, /*tp_clear*/ | |
23686 0, /*tp_richcompare*/ | |
23687 0, /*tp_weaklistoffset*/ | |
23688 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23689 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_25__iter__, /*tp_iter*/ | |
23690 #else | |
23691 0, /*tp_iter*/ | |
23692 #endif | |
23693 0, /*tp_iternext*/ | |
23694 __pyx_methods_5pysam_16libctabixproxies_BedProxy, /*tp_methods*/ | |
23695 0, /*tp_members*/ | |
23696 0, /*tp_getset*/ | |
23697 0, /*tp_base*/ | |
23698 0, /*tp_dict*/ | |
23699 0, /*tp_descr_get*/ | |
23700 0, /*tp_descr_set*/ | |
23701 #if !CYTHON_USE_TYPE_SPECS | |
23702 0, /*tp_dictoffset*/ | |
23703 #endif | |
23704 0, /*tp_init*/ | |
23705 0, /*tp_alloc*/ | |
23706 __pyx_tp_new_5pysam_16libctabixproxies_BedProxy, /*tp_new*/ | |
23707 0, /*tp_free*/ | |
23708 0, /*tp_is_gc*/ | |
23709 0, /*tp_bases*/ | |
23710 0, /*tp_mro*/ | |
23711 0, /*tp_cache*/ | |
23712 0, /*tp_subclasses*/ | |
23713 0, /*tp_weaklist*/ | |
23714 0, /*tp_del*/ | |
23715 0, /*tp_version_tag*/ | |
23716 #if PY_VERSION_HEX >= 0x030400a1 | |
23717 #if CYTHON_USE_TP_FINALIZE | |
23718 0, /*tp_finalize*/ | |
23719 #else | |
23720 NULL, /*tp_finalize*/ | |
23721 #endif | |
23722 #endif | |
23723 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
23724 0, /*tp_vectorcall*/ | |
23725 #endif | |
23726 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
23727 0, /*tp_print*/ | |
23728 #endif | |
23729 #if PY_VERSION_HEX >= 0x030C0000 | |
23730 0, /*tp_watched*/ | |
23731 #endif | |
23732 #if PY_VERSION_HEX >= 0x030d00A4 | |
23733 0, /*tp_versions_used*/ | |
23734 #endif | |
23735 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
23736 0, /*tp_pypy_flags*/ | |
23737 #endif | |
23738 }; | |
23739 #endif | |
23740 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy __pyx_vtable_5pysam_16libctabixproxies_VCFProxy; | |
23741 | |
23742 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies_VCFProxy(PyTypeObject *t, PyObject *a, PyObject *k) { | |
23743 struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *p; | |
23744 PyObject *o = __pyx_tp_new_5pysam_16libctabixproxies_NamedTupleProxy(t, a, k); | |
23745 if (unlikely(!o)) return 0; | |
23746 p = ((struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *)o); | |
23747 p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy*)__pyx_vtabptr_5pysam_16libctabixproxies_VCFProxy; | |
23748 if (unlikely(__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; | |
23749 return o; | |
23750 bad: | |
23751 Py_DECREF(o); o = 0; | |
23752 return NULL; | |
23753 } | |
23754 | |
23755 static int __pyx_tp_setattro_5pysam_16libctabixproxies_VCFProxy(PyObject *o, PyObject *n, PyObject *v) { | |
23756 if (v) { | |
23757 return __pyx_pw_5pysam_16libctabixproxies_8VCFProxy_5__setattr__(o, n, v); | |
23758 } | |
23759 else { | |
23760 if (__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy->tp_setattro) | |
23761 return __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy->tp_setattro(o, n, v); | |
23762 return PyObject_GenericSetAttr(o, n, 0); | |
23763 } | |
23764 } | |
23765 | |
23766 static PyObject *__pyx_getprop_5pysam_16libctabixproxies_8VCFProxy_pos(PyObject *o, CYTHON_UNUSED void *x) { | |
23767 return __pyx_pw_5pysam_16libctabixproxies_8VCFProxy_3pos_1__get__(o); | |
23768 } | |
23769 | |
23770 static PyMethodDef __pyx_methods_5pysam_16libctabixproxies_VCFProxy[] = { | |
23771 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
23772 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, | |
23773 {0, 0, 0, 0} | |
23774 }; | |
23775 | |
23776 static struct PyGetSetDef __pyx_getsets_5pysam_16libctabixproxies_VCFProxy[] = { | |
23777 {(char *)"pos", __pyx_getprop_5pysam_16libctabixproxies_8VCFProxy_pos, 0, (char *)PyDoc_STR("feature end (in 0-based open/closed coordinates)."), 0}, | |
23778 {0, 0, 0, 0, 0} | |
23779 }; | |
23780 #if CYTHON_USE_TYPE_SPECS | |
23781 static PyType_Slot __pyx_type_5pysam_16libctabixproxies_VCFProxy_slots[] = { | |
23782 {Py_sq_length, (void *)__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_3__len__}, | |
23783 {Py_mp_length, (void *)__pyx_pw_5pysam_16libctabixproxies_8VCFProxy_3__len__}, | |
23784 {Py_tp_setattro, (void *)__pyx_tp_setattro_5pysam_16libctabixproxies_VCFProxy}, | |
23785 {Py_tp_doc, (void *)PyDoc_STR("Proxy class for access to VCF fields.\n\n The genotypes are accessed via a numeric index.\n Sample headers are not available.\n ")}, | |
23786 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxy}, | |
23787 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_16libctabixproxies_TupleProxy}, | |
23788 {Py_tp_methods, (void *)__pyx_methods_5pysam_16libctabixproxies_VCFProxy}, | |
23789 {Py_tp_getset, (void *)__pyx_getsets_5pysam_16libctabixproxies_VCFProxy}, | |
23790 {Py_tp_new, (void *)__pyx_tp_new_5pysam_16libctabixproxies_VCFProxy}, | |
23791 {0, 0}, | |
23792 }; | |
23793 static PyType_Spec __pyx_type_5pysam_16libctabixproxies_VCFProxy_spec = { | |
23794 "pysam.libctabixproxies.VCFProxy", | |
23795 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy), | |
23796 0, | |
23797 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, | |
23798 __pyx_type_5pysam_16libctabixproxies_VCFProxy_slots, | |
23799 }; | |
23800 #else | |
23801 | |
23802 static PySequenceMethods __pyx_tp_as_sequence_VCFProxy = { | |
23803 __pyx_pw_5pysam_16libctabixproxies_8VCFProxy_3__len__, /*sq_length*/ | |
23804 0, /*sq_concat*/ | |
23805 0, /*sq_repeat*/ | |
23806 0, /*sq_item*/ | |
23807 0, /*sq_slice*/ | |
23808 0, /*sq_ass_item*/ | |
23809 0, /*sq_ass_slice*/ | |
23810 0, /*sq_contains*/ | |
23811 0, /*sq_inplace_concat*/ | |
23812 0, /*sq_inplace_repeat*/ | |
23813 }; | |
23814 | |
23815 static PyMappingMethods __pyx_tp_as_mapping_VCFProxy = { | |
23816 __pyx_pw_5pysam_16libctabixproxies_8VCFProxy_3__len__, /*mp_length*/ | |
23817 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23818 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_17__getitem__, /*mp_subscript*/ | |
23819 #else | |
23820 0, /*mp_subscript*/ | |
23821 #endif | |
23822 0, /*mp_ass_subscript*/ | |
23823 }; | |
23824 | |
23825 static PyTypeObject __pyx_type_5pysam_16libctabixproxies_VCFProxy = { | |
23826 PyVarObject_HEAD_INIT(0, 0) | |
23827 "pysam.libctabixproxies.""VCFProxy", /*tp_name*/ | |
23828 sizeof(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy), /*tp_basicsize*/ | |
23829 0, /*tp_itemsize*/ | |
23830 __pyx_tp_dealloc_5pysam_16libctabixproxies_TupleProxy, /*tp_dealloc*/ | |
23831 #if PY_VERSION_HEX < 0x030800b4 | |
23832 0, /*tp_print*/ | |
23833 #endif | |
23834 #if PY_VERSION_HEX >= 0x030800b4 | |
23835 0, /*tp_vectorcall_offset*/ | |
23836 #endif | |
23837 0, /*tp_getattr*/ | |
23838 0, /*tp_setattr*/ | |
23839 #if PY_MAJOR_VERSION < 3 | |
23840 0, /*tp_compare*/ | |
23841 #endif | |
23842 #if PY_MAJOR_VERSION >= 3 | |
23843 0, /*tp_as_async*/ | |
23844 #endif | |
23845 0, /*tp_repr*/ | |
23846 0, /*tp_as_number*/ | |
23847 &__pyx_tp_as_sequence_VCFProxy, /*tp_as_sequence*/ | |
23848 &__pyx_tp_as_mapping_VCFProxy, /*tp_as_mapping*/ | |
23849 0, /*tp_hash*/ | |
23850 0, /*tp_call*/ | |
23851 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23852 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_27__str__, /*tp_str*/ | |
23853 #else | |
23854 0, /*tp_str*/ | |
23855 #endif | |
23856 0, /*tp_getattro*/ | |
23857 __pyx_tp_setattro_5pysam_16libctabixproxies_VCFProxy, /*tp_setattro*/ | |
23858 0, /*tp_as_buffer*/ | |
23859 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ | |
23860 PyDoc_STR("Proxy class for access to VCF fields.\n\n The genotypes are accessed via a numeric index.\n Sample headers are not available.\n "), /*tp_doc*/ | |
23861 __pyx_tp_traverse_5pysam_16libctabixproxies_TupleProxy, /*tp_traverse*/ | |
23862 __pyx_tp_clear_5pysam_16libctabixproxies_TupleProxy, /*tp_clear*/ | |
23863 0, /*tp_richcompare*/ | |
23864 0, /*tp_weaklistoffset*/ | |
23865 #if CYTHON_COMPILING_IN_PYPY || 0 | |
23866 __pyx_pw_5pysam_16libctabixproxies_10TupleProxy_25__iter__, /*tp_iter*/ | |
23867 #else | |
23868 0, /*tp_iter*/ | |
23869 #endif | |
23870 0, /*tp_iternext*/ | |
23871 __pyx_methods_5pysam_16libctabixproxies_VCFProxy, /*tp_methods*/ | |
23872 0, /*tp_members*/ | |
23873 __pyx_getsets_5pysam_16libctabixproxies_VCFProxy, /*tp_getset*/ | |
23874 0, /*tp_base*/ | |
23875 0, /*tp_dict*/ | |
23876 0, /*tp_descr_get*/ | |
23877 0, /*tp_descr_set*/ | |
23878 #if !CYTHON_USE_TYPE_SPECS | |
23879 0, /*tp_dictoffset*/ | |
23880 #endif | |
23881 0, /*tp_init*/ | |
23882 0, /*tp_alloc*/ | |
23883 __pyx_tp_new_5pysam_16libctabixproxies_VCFProxy, /*tp_new*/ | |
23884 0, /*tp_free*/ | |
23885 0, /*tp_is_gc*/ | |
23886 0, /*tp_bases*/ | |
23887 0, /*tp_mro*/ | |
23888 0, /*tp_cache*/ | |
23889 0, /*tp_subclasses*/ | |
23890 0, /*tp_weaklist*/ | |
23891 0, /*tp_del*/ | |
23892 0, /*tp_version_tag*/ | |
23893 #if PY_VERSION_HEX >= 0x030400a1 | |
23894 #if CYTHON_USE_TP_FINALIZE | |
23895 0, /*tp_finalize*/ | |
23896 #else | |
23897 NULL, /*tp_finalize*/ | |
23898 #endif | |
23899 #endif | |
23900 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
23901 0, /*tp_vectorcall*/ | |
23902 #endif | |
23903 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
23904 0, /*tp_print*/ | |
23905 #endif | |
23906 #if PY_VERSION_HEX >= 0x030C0000 | |
23907 0, /*tp_watched*/ | |
23908 #endif | |
23909 #if PY_VERSION_HEX >= 0x030d00A4 | |
23910 0, /*tp_versions_used*/ | |
23911 #endif | |
23912 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
23913 0, /*tp_pypy_flags*/ | |
23914 #endif | |
23915 }; | |
23916 #endif | |
23917 | |
23918 #if CYTHON_USE_FREELISTS | |
23919 static struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator *__pyx_freelist_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator[8]; | |
23920 static int __pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator = 0; | |
23921 #endif | |
23922 | |
23923 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { | |
23924 PyObject *o; | |
23925 #if CYTHON_COMPILING_IN_LIMITED_API | |
23926 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); | |
23927 o = alloc_func(t, 0); | |
23928 #else | |
23929 #if CYTHON_USE_FREELISTS | |
23930 if (likely((int)(__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator)))) { | |
23931 o = (PyObject*)__pyx_freelist_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator[--__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator]; | |
23932 memset(o, 0, sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator)); | |
23933 (void) PyObject_INIT(o, t); | |
23934 PyObject_GC_Track(o); | |
23935 } else | |
23936 #endif | |
23937 { | |
23938 o = (*t->tp_alloc)(t, 0); | |
23939 if (unlikely(!o)) return 0; | |
23940 } | |
23941 #endif | |
23942 return o; | |
23943 } | |
23944 | |
23945 static void __pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator(PyObject *o) { | |
23946 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator *p = (struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator *)o; | |
23947 #if CYTHON_USE_TP_FINALIZE | |
23948 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { | |
23949 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator) { | |
23950 if (PyObject_CallFinalizerFromDealloc(o)) return; | |
23951 } | |
23952 } | |
23953 #endif | |
23954 PyObject_GC_UnTrack(o); | |
23955 Py_CLEAR(p->__pyx_v_attributes); | |
23956 Py_CLEAR(p->__pyx_v_d); | |
23957 Py_CLEAR(p->__pyx_v_f); | |
23958 Py_CLEAR(p->__pyx_v_fields); | |
23959 Py_CLEAR(p->__pyx_v_n); | |
23960 Py_CLEAR(p->__pyx_v_s); | |
23961 Py_CLEAR(p->__pyx_v_self); | |
23962 Py_CLEAR(p->__pyx_v_v); | |
23963 Py_CLEAR(p->__pyx_7genexpr__pyx_v_x); | |
23964 Py_CLEAR(p->__pyx_8genexpr1__pyx_v_x); | |
23965 Py_CLEAR(p->__pyx_t_0); | |
23966 #if CYTHON_USE_FREELISTS | |
23967 if (((int)(__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator)))) { | |
23968 __pyx_freelist_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator[__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator++] = ((struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator *)o); | |
23969 } else | |
23970 #endif | |
23971 { | |
23972 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY | |
23973 (*Py_TYPE(o)->tp_free)(o); | |
23974 #else | |
23975 { | |
23976 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); | |
23977 if (tp_free) tp_free(o); | |
23978 } | |
23979 #endif | |
23980 } | |
23981 } | |
23982 | |
23983 static int __pyx_tp_traverse_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator(PyObject *o, visitproc v, void *a) { | |
23984 int e; | |
23985 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator *p = (struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator *)o; | |
23986 if (p->__pyx_v_attributes) { | |
23987 e = (*v)(p->__pyx_v_attributes, a); if (e) return e; | |
23988 } | |
23989 if (p->__pyx_v_d) { | |
23990 e = (*v)(p->__pyx_v_d, a); if (e) return e; | |
23991 } | |
23992 if (p->__pyx_v_f) { | |
23993 e = (*v)(p->__pyx_v_f, a); if (e) return e; | |
23994 } | |
23995 if (p->__pyx_v_fields) { | |
23996 e = (*v)(p->__pyx_v_fields, a); if (e) return e; | |
23997 } | |
23998 if (p->__pyx_v_n) { | |
23999 e = (*v)(p->__pyx_v_n, a); if (e) return e; | |
24000 } | |
24001 if (p->__pyx_v_s) { | |
24002 e = (*v)(p->__pyx_v_s, a); if (e) return e; | |
24003 } | |
24004 if (p->__pyx_v_self) { | |
24005 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; | |
24006 } | |
24007 if (p->__pyx_v_v) { | |
24008 e = (*v)(p->__pyx_v_v, a); if (e) return e; | |
24009 } | |
24010 if (p->__pyx_7genexpr__pyx_v_x) { | |
24011 e = (*v)(p->__pyx_7genexpr__pyx_v_x, a); if (e) return e; | |
24012 } | |
24013 if (p->__pyx_8genexpr1__pyx_v_x) { | |
24014 e = (*v)(p->__pyx_8genexpr1__pyx_v_x, a); if (e) return e; | |
24015 } | |
24016 if (p->__pyx_t_0) { | |
24017 e = (*v)(p->__pyx_t_0, a); if (e) return e; | |
24018 } | |
24019 return 0; | |
24020 } | |
24021 #if CYTHON_USE_TYPE_SPECS | |
24022 static PyType_Slot __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator_slots[] = { | |
24023 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator}, | |
24024 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator}, | |
24025 {Py_tp_new, (void *)__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator}, | |
24026 {0, 0}, | |
24027 }; | |
24028 static PyType_Spec __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator_spec = { | |
24029 "pysam.libctabixproxies.__pyx_scope_struct__attribute_string2iterator", | |
24030 sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator), | |
24031 0, | |
24032 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, | |
24033 __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator_slots, | |
24034 }; | |
24035 #else | |
24036 | |
24037 static PyTypeObject __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator = { | |
24038 PyVarObject_HEAD_INIT(0, 0) | |
24039 "pysam.libctabixproxies.""__pyx_scope_struct__attribute_string2iterator", /*tp_name*/ | |
24040 sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator), /*tp_basicsize*/ | |
24041 0, /*tp_itemsize*/ | |
24042 __pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator, /*tp_dealloc*/ | |
24043 #if PY_VERSION_HEX < 0x030800b4 | |
24044 0, /*tp_print*/ | |
24045 #endif | |
24046 #if PY_VERSION_HEX >= 0x030800b4 | |
24047 0, /*tp_vectorcall_offset*/ | |
24048 #endif | |
24049 0, /*tp_getattr*/ | |
24050 0, /*tp_setattr*/ | |
24051 #if PY_MAJOR_VERSION < 3 | |
24052 0, /*tp_compare*/ | |
24053 #endif | |
24054 #if PY_MAJOR_VERSION >= 3 | |
24055 0, /*tp_as_async*/ | |
24056 #endif | |
24057 0, /*tp_repr*/ | |
24058 0, /*tp_as_number*/ | |
24059 0, /*tp_as_sequence*/ | |
24060 0, /*tp_as_mapping*/ | |
24061 0, /*tp_hash*/ | |
24062 0, /*tp_call*/ | |
24063 0, /*tp_str*/ | |
24064 0, /*tp_getattro*/ | |
24065 0, /*tp_setattro*/ | |
24066 0, /*tp_as_buffer*/ | |
24067 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ | |
24068 0, /*tp_doc*/ | |
24069 __pyx_tp_traverse_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator, /*tp_traverse*/ | |
24070 0, /*tp_clear*/ | |
24071 0, /*tp_richcompare*/ | |
24072 0, /*tp_weaklistoffset*/ | |
24073 0, /*tp_iter*/ | |
24074 0, /*tp_iternext*/ | |
24075 0, /*tp_methods*/ | |
24076 0, /*tp_members*/ | |
24077 0, /*tp_getset*/ | |
24078 0, /*tp_base*/ | |
24079 0, /*tp_dict*/ | |
24080 0, /*tp_descr_get*/ | |
24081 0, /*tp_descr_set*/ | |
24082 #if !CYTHON_USE_TYPE_SPECS | |
24083 0, /*tp_dictoffset*/ | |
24084 #endif | |
24085 0, /*tp_init*/ | |
24086 0, /*tp_alloc*/ | |
24087 __pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator, /*tp_new*/ | |
24088 0, /*tp_free*/ | |
24089 0, /*tp_is_gc*/ | |
24090 0, /*tp_bases*/ | |
24091 0, /*tp_mro*/ | |
24092 0, /*tp_cache*/ | |
24093 0, /*tp_subclasses*/ | |
24094 0, /*tp_weaklist*/ | |
24095 0, /*tp_del*/ | |
24096 0, /*tp_version_tag*/ | |
24097 #if PY_VERSION_HEX >= 0x030400a1 | |
24098 #if CYTHON_USE_TP_FINALIZE | |
24099 0, /*tp_finalize*/ | |
24100 #else | |
24101 NULL, /*tp_finalize*/ | |
24102 #endif | |
24103 #endif | |
24104 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
24105 0, /*tp_vectorcall*/ | |
24106 #endif | |
24107 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
24108 0, /*tp_print*/ | |
24109 #endif | |
24110 #if PY_VERSION_HEX >= 0x030C0000 | |
24111 0, /*tp_watched*/ | |
24112 #endif | |
24113 #if PY_VERSION_HEX >= 0x030d00A4 | |
24114 0, /*tp_versions_used*/ | |
24115 #endif | |
24116 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
24117 0, /*tp_pypy_flags*/ | |
24118 #endif | |
24119 }; | |
24120 #endif | |
24121 | |
24122 #if CYTHON_USE_FREELISTS | |
24123 static struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator *__pyx_freelist_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator[8]; | |
24124 static int __pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator = 0; | |
24125 #endif | |
24126 | |
24127 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { | |
24128 PyObject *o; | |
24129 #if CYTHON_COMPILING_IN_LIMITED_API | |
24130 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); | |
24131 o = alloc_func(t, 0); | |
24132 #else | |
24133 #if CYTHON_USE_FREELISTS | |
24134 if (likely((int)(__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator)))) { | |
24135 o = (PyObject*)__pyx_freelist_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator[--__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator]; | |
24136 memset(o, 0, sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator)); | |
24137 (void) PyObject_INIT(o, t); | |
24138 PyObject_GC_Track(o); | |
24139 } else | |
24140 #endif | |
24141 { | |
24142 o = (*t->tp_alloc)(t, 0); | |
24143 if (unlikely(!o)) return 0; | |
24144 } | |
24145 #endif | |
24146 return o; | |
24147 } | |
24148 | |
24149 static void __pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator(PyObject *o) { | |
24150 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator *p = (struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator *)o; | |
24151 #if CYTHON_USE_TP_FINALIZE | |
24152 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { | |
24153 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator) { | |
24154 if (PyObject_CallFinalizerFromDealloc(o)) return; | |
24155 } | |
24156 } | |
24157 #endif | |
24158 PyObject_GC_UnTrack(o); | |
24159 Py_CLEAR(p->__pyx_v_f); | |
24160 Py_CLEAR(p->__pyx_v_genexpr); | |
24161 Py_CLEAR(p->__pyx_v_key); | |
24162 Py_CLEAR(p->__pyx_v_s); | |
24163 Py_CLEAR(p->__pyx_v_self); | |
24164 Py_CLEAR(p->__pyx_v_value); | |
24165 Py_CLEAR(p->__pyx_t_0); | |
24166 #if CYTHON_USE_FREELISTS | |
24167 if (((int)(__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator)))) { | |
24168 __pyx_freelist_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator[__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator++] = ((struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator *)o); | |
24169 } else | |
24170 #endif | |
24171 { | |
24172 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY | |
24173 (*Py_TYPE(o)->tp_free)(o); | |
24174 #else | |
24175 { | |
24176 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); | |
24177 if (tp_free) tp_free(o); | |
24178 } | |
24179 #endif | |
24180 } | |
24181 } | |
24182 | |
24183 static int __pyx_tp_traverse_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator(PyObject *o, visitproc v, void *a) { | |
24184 int e; | |
24185 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator *p = (struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator *)o; | |
24186 if (p->__pyx_v_f) { | |
24187 e = (*v)(p->__pyx_v_f, a); if (e) return e; | |
24188 } | |
24189 if (p->__pyx_v_genexpr) { | |
24190 e = (*v)(p->__pyx_v_genexpr, a); if (e) return e; | |
24191 } | |
24192 if (p->__pyx_v_key) { | |
24193 e = (*v)(p->__pyx_v_key, a); if (e) return e; | |
24194 } | |
24195 if (p->__pyx_v_s) { | |
24196 e = (*v)(p->__pyx_v_s, a); if (e) return e; | |
24197 } | |
24198 if (p->__pyx_v_self) { | |
24199 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; | |
24200 } | |
24201 if (p->__pyx_v_value) { | |
24202 e = (*v)(p->__pyx_v_value, a); if (e) return e; | |
24203 } | |
24204 if (p->__pyx_t_0) { | |
24205 e = (*v)(p->__pyx_t_0, a); if (e) return e; | |
24206 } | |
24207 return 0; | |
24208 } | |
24209 #if CYTHON_USE_TYPE_SPECS | |
24210 static PyType_Slot __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator_slots[] = { | |
24211 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator}, | |
24212 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator}, | |
24213 {Py_tp_new, (void *)__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator}, | |
24214 {0, 0}, | |
24215 }; | |
24216 static PyType_Spec __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator_spec = { | |
24217 "pysam.libctabixproxies.__pyx_scope_struct_1_attribute_string2iterator", | |
24218 sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator), | |
24219 0, | |
24220 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, | |
24221 __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator_slots, | |
24222 }; | |
24223 #else | |
24224 | |
24225 static PyTypeObject __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator = { | |
24226 PyVarObject_HEAD_INIT(0, 0) | |
24227 "pysam.libctabixproxies.""__pyx_scope_struct_1_attribute_string2iterator", /*tp_name*/ | |
24228 sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator), /*tp_basicsize*/ | |
24229 0, /*tp_itemsize*/ | |
24230 __pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator, /*tp_dealloc*/ | |
24231 #if PY_VERSION_HEX < 0x030800b4 | |
24232 0, /*tp_print*/ | |
24233 #endif | |
24234 #if PY_VERSION_HEX >= 0x030800b4 | |
24235 0, /*tp_vectorcall_offset*/ | |
24236 #endif | |
24237 0, /*tp_getattr*/ | |
24238 0, /*tp_setattr*/ | |
24239 #if PY_MAJOR_VERSION < 3 | |
24240 0, /*tp_compare*/ | |
24241 #endif | |
24242 #if PY_MAJOR_VERSION >= 3 | |
24243 0, /*tp_as_async*/ | |
24244 #endif | |
24245 0, /*tp_repr*/ | |
24246 0, /*tp_as_number*/ | |
24247 0, /*tp_as_sequence*/ | |
24248 0, /*tp_as_mapping*/ | |
24249 0, /*tp_hash*/ | |
24250 0, /*tp_call*/ | |
24251 0, /*tp_str*/ | |
24252 0, /*tp_getattro*/ | |
24253 0, /*tp_setattro*/ | |
24254 0, /*tp_as_buffer*/ | |
24255 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ | |
24256 0, /*tp_doc*/ | |
24257 __pyx_tp_traverse_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator, /*tp_traverse*/ | |
24258 0, /*tp_clear*/ | |
24259 0, /*tp_richcompare*/ | |
24260 0, /*tp_weaklistoffset*/ | |
24261 0, /*tp_iter*/ | |
24262 0, /*tp_iternext*/ | |
24263 0, /*tp_methods*/ | |
24264 0, /*tp_members*/ | |
24265 0, /*tp_getset*/ | |
24266 0, /*tp_base*/ | |
24267 0, /*tp_dict*/ | |
24268 0, /*tp_descr_get*/ | |
24269 0, /*tp_descr_set*/ | |
24270 #if !CYTHON_USE_TYPE_SPECS | |
24271 0, /*tp_dictoffset*/ | |
24272 #endif | |
24273 0, /*tp_init*/ | |
24274 0, /*tp_alloc*/ | |
24275 __pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator, /*tp_new*/ | |
24276 0, /*tp_free*/ | |
24277 0, /*tp_is_gc*/ | |
24278 0, /*tp_bases*/ | |
24279 0, /*tp_mro*/ | |
24280 0, /*tp_cache*/ | |
24281 0, /*tp_subclasses*/ | |
24282 0, /*tp_weaklist*/ | |
24283 0, /*tp_del*/ | |
24284 0, /*tp_version_tag*/ | |
24285 #if PY_VERSION_HEX >= 0x030400a1 | |
24286 #if CYTHON_USE_TP_FINALIZE | |
24287 0, /*tp_finalize*/ | |
24288 #else | |
24289 NULL, /*tp_finalize*/ | |
24290 #endif | |
24291 #endif | |
24292 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
24293 0, /*tp_vectorcall*/ | |
24294 #endif | |
24295 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
24296 0, /*tp_print*/ | |
24297 #endif | |
24298 #if PY_VERSION_HEX >= 0x030C0000 | |
24299 0, /*tp_watched*/ | |
24300 #endif | |
24301 #if PY_VERSION_HEX >= 0x030d00A4 | |
24302 0, /*tp_versions_used*/ | |
24303 #endif | |
24304 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
24305 0, /*tp_pypy_flags*/ | |
24306 #endif | |
24307 }; | |
24308 #endif | |
24309 | |
24310 #if CYTHON_USE_FREELISTS | |
24311 static struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr *__pyx_freelist_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr[8]; | |
24312 static int __pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr = 0; | |
24313 #endif | |
24314 | |
24315 static PyObject *__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { | |
24316 PyObject *o; | |
24317 #if CYTHON_COMPILING_IN_LIMITED_API | |
24318 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); | |
24319 o = alloc_func(t, 0); | |
24320 #else | |
24321 #if CYTHON_USE_FREELISTS | |
24322 if (likely((int)(__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr)))) { | |
24323 o = (PyObject*)__pyx_freelist_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr[--__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr]; | |
24324 memset(o, 0, sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr)); | |
24325 (void) PyObject_INIT(o, t); | |
24326 PyObject_GC_Track(o); | |
24327 } else | |
24328 #endif | |
24329 { | |
24330 o = (*t->tp_alloc)(t, 0); | |
24331 if (unlikely(!o)) return 0; | |
24332 } | |
24333 #endif | |
24334 return o; | |
24335 } | |
24336 | |
24337 static void __pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr(PyObject *o) { | |
24338 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr *)o; | |
24339 #if CYTHON_USE_TP_FINALIZE | |
24340 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { | |
24341 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr) { | |
24342 if (PyObject_CallFinalizerFromDealloc(o)) return; | |
24343 } | |
24344 } | |
24345 #endif | |
24346 PyObject_GC_UnTrack(o); | |
24347 Py_CLEAR(p->__pyx_genexpr_arg_0); | |
24348 Py_CLEAR(p->__pyx_v_x); | |
24349 Py_CLEAR(p->__pyx_t_0); | |
24350 #if CYTHON_USE_FREELISTS | |
24351 if (((int)(__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr)))) { | |
24352 __pyx_freelist_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr[__pyx_freecount_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr *)o); | |
24353 } else | |
24354 #endif | |
24355 { | |
24356 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY | |
24357 (*Py_TYPE(o)->tp_free)(o); | |
24358 #else | |
24359 { | |
24360 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); | |
24361 if (tp_free) tp_free(o); | |
24362 } | |
24363 #endif | |
24364 } | |
24365 } | |
24366 | |
24367 static int __pyx_tp_traverse_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) { | |
24368 int e; | |
24369 struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr *)o; | |
24370 if (p->__pyx_genexpr_arg_0) { | |
24371 e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; | |
24372 } | |
24373 if (p->__pyx_v_x) { | |
24374 e = (*v)(p->__pyx_v_x, a); if (e) return e; | |
24375 } | |
24376 if (p->__pyx_t_0) { | |
24377 e = (*v)(p->__pyx_t_0, a); if (e) return e; | |
24378 } | |
24379 return 0; | |
24380 } | |
24381 #if CYTHON_USE_TYPE_SPECS | |
24382 static PyType_Slot __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr_slots[] = { | |
24383 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr}, | |
24384 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr}, | |
24385 {Py_tp_new, (void *)__pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr}, | |
24386 {0, 0}, | |
24387 }; | |
24388 static PyType_Spec __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr_spec = { | |
24389 "pysam.libctabixproxies.__pyx_scope_struct_2_genexpr", | |
24390 sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr), | |
24391 0, | |
24392 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, | |
24393 __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr_slots, | |
24394 }; | |
24395 #else | |
24396 | |
24397 static PyTypeObject __pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr = { | |
24398 PyVarObject_HEAD_INIT(0, 0) | |
24399 "pysam.libctabixproxies.""__pyx_scope_struct_2_genexpr", /*tp_name*/ | |
24400 sizeof(struct __pyx_obj_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr), /*tp_basicsize*/ | |
24401 0, /*tp_itemsize*/ | |
24402 __pyx_tp_dealloc_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr, /*tp_dealloc*/ | |
24403 #if PY_VERSION_HEX < 0x030800b4 | |
24404 0, /*tp_print*/ | |
24405 #endif | |
24406 #if PY_VERSION_HEX >= 0x030800b4 | |
24407 0, /*tp_vectorcall_offset*/ | |
24408 #endif | |
24409 0, /*tp_getattr*/ | |
24410 0, /*tp_setattr*/ | |
24411 #if PY_MAJOR_VERSION < 3 | |
24412 0, /*tp_compare*/ | |
24413 #endif | |
24414 #if PY_MAJOR_VERSION >= 3 | |
24415 0, /*tp_as_async*/ | |
24416 #endif | |
24417 0, /*tp_repr*/ | |
24418 0, /*tp_as_number*/ | |
24419 0, /*tp_as_sequence*/ | |
24420 0, /*tp_as_mapping*/ | |
24421 0, /*tp_hash*/ | |
24422 0, /*tp_call*/ | |
24423 0, /*tp_str*/ | |
24424 0, /*tp_getattro*/ | |
24425 0, /*tp_setattro*/ | |
24426 0, /*tp_as_buffer*/ | |
24427 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ | |
24428 0, /*tp_doc*/ | |
24429 __pyx_tp_traverse_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr, /*tp_traverse*/ | |
24430 0, /*tp_clear*/ | |
24431 0, /*tp_richcompare*/ | |
24432 0, /*tp_weaklistoffset*/ | |
24433 0, /*tp_iter*/ | |
24434 0, /*tp_iternext*/ | |
24435 0, /*tp_methods*/ | |
24436 0, /*tp_members*/ | |
24437 0, /*tp_getset*/ | |
24438 0, /*tp_base*/ | |
24439 0, /*tp_dict*/ | |
24440 0, /*tp_descr_get*/ | |
24441 0, /*tp_descr_set*/ | |
24442 #if !CYTHON_USE_TYPE_SPECS | |
24443 0, /*tp_dictoffset*/ | |
24444 #endif | |
24445 0, /*tp_init*/ | |
24446 0, /*tp_alloc*/ | |
24447 __pyx_tp_new_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr, /*tp_new*/ | |
24448 0, /*tp_free*/ | |
24449 0, /*tp_is_gc*/ | |
24450 0, /*tp_bases*/ | |
24451 0, /*tp_mro*/ | |
24452 0, /*tp_cache*/ | |
24453 0, /*tp_subclasses*/ | |
24454 0, /*tp_weaklist*/ | |
24455 0, /*tp_del*/ | |
24456 0, /*tp_version_tag*/ | |
24457 #if PY_VERSION_HEX >= 0x030400a1 | |
24458 #if CYTHON_USE_TP_FINALIZE | |
24459 0, /*tp_finalize*/ | |
24460 #else | |
24461 NULL, /*tp_finalize*/ | |
24462 #endif | |
24463 #endif | |
24464 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
24465 0, /*tp_vectorcall*/ | |
24466 #endif | |
24467 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
24468 0, /*tp_print*/ | |
24469 #endif | |
24470 #if PY_VERSION_HEX >= 0x030C0000 | |
24471 0, /*tp_watched*/ | |
24472 #endif | |
24473 #if PY_VERSION_HEX >= 0x030d00A4 | |
24474 0, /*tp_versions_used*/ | |
24475 #endif | |
24476 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
24477 0, /*tp_pypy_flags*/ | |
24478 #endif | |
24479 }; | |
24480 #endif | |
24481 | |
24482 #if CYTHON_USE_FREELISTS | |
24483 static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v[8]; | |
24484 static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v = 0; | |
24485 #endif | |
24486 | |
24487 static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { | |
24488 PyObject *o; | |
24489 #if CYTHON_COMPILING_IN_LIMITED_API | |
24490 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); | |
24491 o = alloc_func(t, 0); | |
24492 #else | |
24493 #if CYTHON_USE_FREELISTS | |
24494 if (likely((int)(__pyx_freecount___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v)))) { | |
24495 o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v]; | |
24496 memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v)); | |
24497 (void) PyObject_INIT(o, t); | |
24498 } else | |
24499 #endif | |
24500 { | |
24501 o = (*t->tp_alloc)(t, 0); | |
24502 if (unlikely(!o)) return 0; | |
24503 } | |
24504 #endif | |
24505 return o; | |
24506 } | |
24507 | |
24508 static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(PyObject *o) { | |
24509 #if CYTHON_USE_TP_FINALIZE | |
24510 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { | |
24511 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v) { | |
24512 if (PyObject_CallFinalizerFromDealloc(o)) return; | |
24513 } | |
24514 } | |
24515 #endif | |
24516 #if CYTHON_USE_FREELISTS | |
24517 if (((int)(__pyx_freecount___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v)))) { | |
24518 __pyx_freelist___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v *)o); | |
24519 } else | |
24520 #endif | |
24521 { | |
24522 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY | |
24523 (*Py_TYPE(o)->tp_free)(o); | |
24524 #else | |
24525 { | |
24526 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); | |
24527 if (tp_free) tp_free(o); | |
24528 } | |
24529 #endif | |
24530 } | |
24531 } | |
24532 #if CYTHON_USE_TYPE_SPECS | |
24533 static PyType_Slot __pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_slots[] = { | |
24534 {Py_tp_dealloc, (void *)__pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v}, | |
24535 {Py_tp_new, (void *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v}, | |
24536 {0, 0}, | |
24537 }; | |
24538 static PyType_Spec __pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_spec = { | |
24539 "pysam.libctabixproxies.__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v", | |
24540 sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v), | |
24541 0, | |
24542 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE, | |
24543 __pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_slots, | |
24544 }; | |
24545 #else | |
24546 | |
24547 static PyTypeObject __pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v = { | |
24548 PyVarObject_HEAD_INIT(0, 0) | |
24549 "pysam.libctabixproxies.""__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v", /*tp_name*/ | |
24550 sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v), /*tp_basicsize*/ | |
24551 0, /*tp_itemsize*/ | |
24552 __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v, /*tp_dealloc*/ | |
24553 #if PY_VERSION_HEX < 0x030800b4 | |
24554 0, /*tp_print*/ | |
24555 #endif | |
24556 #if PY_VERSION_HEX >= 0x030800b4 | |
24557 0, /*tp_vectorcall_offset*/ | |
24558 #endif | |
24559 0, /*tp_getattr*/ | |
24560 0, /*tp_setattr*/ | |
24561 #if PY_MAJOR_VERSION < 3 | |
24562 0, /*tp_compare*/ | |
24563 #endif | |
24564 #if PY_MAJOR_VERSION >= 3 | |
24565 0, /*tp_as_async*/ | |
24566 #endif | |
24567 0, /*tp_repr*/ | |
24568 0, /*tp_as_number*/ | |
24569 0, /*tp_as_sequence*/ | |
24570 0, /*tp_as_mapping*/ | |
24571 0, /*tp_hash*/ | |
24572 0, /*tp_call*/ | |
24573 0, /*tp_str*/ | |
24574 0, /*tp_getattro*/ | |
24575 0, /*tp_setattro*/ | |
24576 0, /*tp_as_buffer*/ | |
24577 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ | |
24578 0, /*tp_doc*/ | |
24579 0, /*tp_traverse*/ | |
24580 0, /*tp_clear*/ | |
24581 0, /*tp_richcompare*/ | |
24582 0, /*tp_weaklistoffset*/ | |
24583 0, /*tp_iter*/ | |
24584 0, /*tp_iternext*/ | |
24585 0, /*tp_methods*/ | |
24586 0, /*tp_members*/ | |
24587 0, /*tp_getset*/ | |
24588 0, /*tp_base*/ | |
24589 0, /*tp_dict*/ | |
24590 0, /*tp_descr_get*/ | |
24591 0, /*tp_descr_set*/ | |
24592 #if !CYTHON_USE_TYPE_SPECS | |
24593 0, /*tp_dictoffset*/ | |
24594 #endif | |
24595 0, /*tp_init*/ | |
24596 0, /*tp_alloc*/ | |
24597 __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v, /*tp_new*/ | |
24598 0, /*tp_free*/ | |
24599 0, /*tp_is_gc*/ | |
24600 0, /*tp_bases*/ | |
24601 0, /*tp_mro*/ | |
24602 0, /*tp_cache*/ | |
24603 0, /*tp_subclasses*/ | |
24604 0, /*tp_weaklist*/ | |
24605 0, /*tp_del*/ | |
24606 0, /*tp_version_tag*/ | |
24607 #if PY_VERSION_HEX >= 0x030400a1 | |
24608 #if CYTHON_USE_TP_FINALIZE | |
24609 0, /*tp_finalize*/ | |
24610 #else | |
24611 NULL, /*tp_finalize*/ | |
24612 #endif | |
24613 #endif | |
24614 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
24615 0, /*tp_vectorcall*/ | |
24616 #endif | |
24617 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
24618 0, /*tp_print*/ | |
24619 #endif | |
24620 #if PY_VERSION_HEX >= 0x030C0000 | |
24621 0, /*tp_watched*/ | |
24622 #endif | |
24623 #if PY_VERSION_HEX >= 0x030d00A4 | |
24624 0, /*tp_versions_used*/ | |
24625 #endif | |
24626 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
24627 0, /*tp_pypy_flags*/ | |
24628 #endif | |
24629 }; | |
24630 #endif | |
24631 | |
24632 #if CYTHON_USE_FREELISTS | |
24633 static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v[8]; | |
24634 static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v = 0; | |
24635 #endif | |
24636 | |
24637 static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { | |
24638 PyObject *o; | |
24639 #if CYTHON_COMPILING_IN_LIMITED_API | |
24640 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); | |
24641 o = alloc_func(t, 0); | |
24642 #else | |
24643 #if CYTHON_USE_FREELISTS | |
24644 if (likely((int)(__pyx_freecount___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v)))) { | |
24645 o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v]; | |
24646 memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v)); | |
24647 (void) PyObject_INIT(o, t); | |
24648 } else | |
24649 #endif | |
24650 { | |
24651 o = (*t->tp_alloc)(t, 0); | |
24652 if (unlikely(!o)) return 0; | |
24653 } | |
24654 #endif | |
24655 return o; | |
24656 } | |
24657 | |
24658 static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(PyObject *o) { | |
24659 #if CYTHON_USE_TP_FINALIZE | |
24660 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { | |
24661 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v) { | |
24662 if (PyObject_CallFinalizerFromDealloc(o)) return; | |
24663 } | |
24664 } | |
24665 #endif | |
24666 #if CYTHON_USE_FREELISTS | |
24667 if (((int)(__pyx_freecount___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v)))) { | |
24668 __pyx_freelist___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v *)o); | |
24669 } else | |
24670 #endif | |
24671 { | |
24672 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY | |
24673 (*Py_TYPE(o)->tp_free)(o); | |
24674 #else | |
24675 { | |
24676 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); | |
24677 if (tp_free) tp_free(o); | |
24678 } | |
24679 #endif | |
24680 } | |
24681 } | |
24682 #if CYTHON_USE_TYPE_SPECS | |
24683 static PyType_Slot __pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_slots[] = { | |
24684 {Py_tp_dealloc, (void *)__pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v}, | |
24685 {Py_tp_new, (void *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v}, | |
24686 {0, 0}, | |
24687 }; | |
24688 static PyType_Spec __pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_spec = { | |
24689 "pysam.libctabixproxies.__pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v", | |
24690 sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v), | |
24691 0, | |
24692 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE, | |
24693 __pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_slots, | |
24694 }; | |
24695 #else | |
24696 | |
24697 static PyTypeObject __pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v = { | |
24698 PyVarObject_HEAD_INIT(0, 0) | |
24699 "pysam.libctabixproxies.""__pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v", /*tp_name*/ | |
24700 sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v), /*tp_basicsize*/ | |
24701 0, /*tp_itemsize*/ | |
24702 __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v, /*tp_dealloc*/ | |
24703 #if PY_VERSION_HEX < 0x030800b4 | |
24704 0, /*tp_print*/ | |
24705 #endif | |
24706 #if PY_VERSION_HEX >= 0x030800b4 | |
24707 0, /*tp_vectorcall_offset*/ | |
24708 #endif | |
24709 0, /*tp_getattr*/ | |
24710 0, /*tp_setattr*/ | |
24711 #if PY_MAJOR_VERSION < 3 | |
24712 0, /*tp_compare*/ | |
24713 #endif | |
24714 #if PY_MAJOR_VERSION >= 3 | |
24715 0, /*tp_as_async*/ | |
24716 #endif | |
24717 0, /*tp_repr*/ | |
24718 0, /*tp_as_number*/ | |
24719 0, /*tp_as_sequence*/ | |
24720 0, /*tp_as_mapping*/ | |
24721 0, /*tp_hash*/ | |
24722 0, /*tp_call*/ | |
24723 0, /*tp_str*/ | |
24724 0, /*tp_getattro*/ | |
24725 0, /*tp_setattro*/ | |
24726 0, /*tp_as_buffer*/ | |
24727 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ | |
24728 0, /*tp_doc*/ | |
24729 0, /*tp_traverse*/ | |
24730 0, /*tp_clear*/ | |
24731 0, /*tp_richcompare*/ | |
24732 0, /*tp_weaklistoffset*/ | |
24733 0, /*tp_iter*/ | |
24734 0, /*tp_iternext*/ | |
24735 0, /*tp_methods*/ | |
24736 0, /*tp_members*/ | |
24737 0, /*tp_getset*/ | |
24738 0, /*tp_base*/ | |
24739 0, /*tp_dict*/ | |
24740 0, /*tp_descr_get*/ | |
24741 0, /*tp_descr_set*/ | |
24742 #if !CYTHON_USE_TYPE_SPECS | |
24743 0, /*tp_dictoffset*/ | |
24744 #endif | |
24745 0, /*tp_init*/ | |
24746 0, /*tp_alloc*/ | |
24747 __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v, /*tp_new*/ | |
24748 0, /*tp_free*/ | |
24749 0, /*tp_is_gc*/ | |
24750 0, /*tp_bases*/ | |
24751 0, /*tp_mro*/ | |
24752 0, /*tp_cache*/ | |
24753 0, /*tp_subclasses*/ | |
24754 0, /*tp_weaklist*/ | |
24755 0, /*tp_del*/ | |
24756 0, /*tp_version_tag*/ | |
24757 #if PY_VERSION_HEX >= 0x030400a1 | |
24758 #if CYTHON_USE_TP_FINALIZE | |
24759 0, /*tp_finalize*/ | |
24760 #else | |
24761 NULL, /*tp_finalize*/ | |
24762 #endif | |
24763 #endif | |
24764 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
24765 0, /*tp_vectorcall*/ | |
24766 #endif | |
24767 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
24768 0, /*tp_print*/ | |
24769 #endif | |
24770 #if PY_VERSION_HEX >= 0x030C0000 | |
24771 0, /*tp_watched*/ | |
24772 #endif | |
24773 #if PY_VERSION_HEX >= 0x030d00A4 | |
24774 0, /*tp_versions_used*/ | |
24775 #endif | |
24776 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
24777 0, /*tp_pypy_flags*/ | |
24778 #endif | |
24779 }; | |
24780 #endif | |
24781 | |
24782 #if CYTHON_USE_FREELISTS | |
24783 static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v[8]; | |
24784 static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v = 0; | |
24785 #endif | |
24786 | |
24787 static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { | |
24788 PyObject *o; | |
24789 #if CYTHON_COMPILING_IN_LIMITED_API | |
24790 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); | |
24791 o = alloc_func(t, 0); | |
24792 #else | |
24793 #if CYTHON_USE_FREELISTS | |
24794 if (likely((int)(__pyx_freecount___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v)))) { | |
24795 o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v]; | |
24796 memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v)); | |
24797 (void) PyObject_INIT(o, t); | |
24798 } else | |
24799 #endif | |
24800 { | |
24801 o = (*t->tp_alloc)(t, 0); | |
24802 if (unlikely(!o)) return 0; | |
24803 } | |
24804 #endif | |
24805 return o; | |
24806 } | |
24807 | |
24808 static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(PyObject *o) { | |
24809 #if CYTHON_USE_TP_FINALIZE | |
24810 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { | |
24811 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v) { | |
24812 if (PyObject_CallFinalizerFromDealloc(o)) return; | |
24813 } | |
24814 } | |
24815 #endif | |
24816 #if CYTHON_USE_FREELISTS | |
24817 if (((int)(__pyx_freecount___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v)))) { | |
24818 __pyx_freelist___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v *)o); | |
24819 } else | |
24820 #endif | |
24821 { | |
24822 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY | |
24823 (*Py_TYPE(o)->tp_free)(o); | |
24824 #else | |
24825 { | |
24826 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); | |
24827 if (tp_free) tp_free(o); | |
24828 } | |
24829 #endif | |
24830 } | |
24831 } | |
24832 #if CYTHON_USE_TYPE_SPECS | |
24833 static PyType_Slot __pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_slots[] = { | |
24834 {Py_tp_dealloc, (void *)__pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v}, | |
24835 {Py_tp_new, (void *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v}, | |
24836 {0, 0}, | |
24837 }; | |
24838 static PyType_Spec __pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_spec = { | |
24839 "pysam.libctabixproxies.__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v", | |
24840 sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v), | |
24841 0, | |
24842 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE, | |
24843 __pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_slots, | |
24844 }; | |
24845 #else | |
24846 | |
24847 static PyTypeObject __pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v = { | |
24848 PyVarObject_HEAD_INIT(0, 0) | |
24849 "pysam.libctabixproxies.""__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v", /*tp_name*/ | |
24850 sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v), /*tp_basicsize*/ | |
24851 0, /*tp_itemsize*/ | |
24852 __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v, /*tp_dealloc*/ | |
24853 #if PY_VERSION_HEX < 0x030800b4 | |
24854 0, /*tp_print*/ | |
24855 #endif | |
24856 #if PY_VERSION_HEX >= 0x030800b4 | |
24857 0, /*tp_vectorcall_offset*/ | |
24858 #endif | |
24859 0, /*tp_getattr*/ | |
24860 0, /*tp_setattr*/ | |
24861 #if PY_MAJOR_VERSION < 3 | |
24862 0, /*tp_compare*/ | |
24863 #endif | |
24864 #if PY_MAJOR_VERSION >= 3 | |
24865 0, /*tp_as_async*/ | |
24866 #endif | |
24867 0, /*tp_repr*/ | |
24868 0, /*tp_as_number*/ | |
24869 0, /*tp_as_sequence*/ | |
24870 0, /*tp_as_mapping*/ | |
24871 0, /*tp_hash*/ | |
24872 0, /*tp_call*/ | |
24873 0, /*tp_str*/ | |
24874 0, /*tp_getattro*/ | |
24875 0, /*tp_setattro*/ | |
24876 0, /*tp_as_buffer*/ | |
24877 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ | |
24878 0, /*tp_doc*/ | |
24879 0, /*tp_traverse*/ | |
24880 0, /*tp_clear*/ | |
24881 0, /*tp_richcompare*/ | |
24882 0, /*tp_weaklistoffset*/ | |
24883 0, /*tp_iter*/ | |
24884 0, /*tp_iternext*/ | |
24885 0, /*tp_methods*/ | |
24886 0, /*tp_members*/ | |
24887 0, /*tp_getset*/ | |
24888 0, /*tp_base*/ | |
24889 0, /*tp_dict*/ | |
24890 0, /*tp_descr_get*/ | |
24891 0, /*tp_descr_set*/ | |
24892 #if !CYTHON_USE_TYPE_SPECS | |
24893 0, /*tp_dictoffset*/ | |
24894 #endif | |
24895 0, /*tp_init*/ | |
24896 0, /*tp_alloc*/ | |
24897 __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v, /*tp_new*/ | |
24898 0, /*tp_free*/ | |
24899 0, /*tp_is_gc*/ | |
24900 0, /*tp_bases*/ | |
24901 0, /*tp_mro*/ | |
24902 0, /*tp_cache*/ | |
24903 0, /*tp_subclasses*/ | |
24904 0, /*tp_weaklist*/ | |
24905 0, /*tp_del*/ | |
24906 0, /*tp_version_tag*/ | |
24907 #if PY_VERSION_HEX >= 0x030400a1 | |
24908 #if CYTHON_USE_TP_FINALIZE | |
24909 0, /*tp_finalize*/ | |
24910 #else | |
24911 NULL, /*tp_finalize*/ | |
24912 #endif | |
24913 #endif | |
24914 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
24915 0, /*tp_vectorcall*/ | |
24916 #endif | |
24917 #if __PYX_NEED_TP_PRINT_SLOT == 1 | |
24918 0, /*tp_print*/ | |
24919 #endif | |
24920 #if PY_VERSION_HEX >= 0x030C0000 | |
24921 0, /*tp_watched*/ | |
24922 #endif | |
24923 #if PY_VERSION_HEX >= 0x030d00A4 | |
24924 0, /*tp_versions_used*/ | |
24925 #endif | |
24926 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
24927 0, /*tp_pypy_flags*/ | |
24928 #endif | |
24929 }; | |
24930 #endif | |
24931 | |
24932 static PyMethodDef __pyx_methods[] = { | |
24933 {0, 0, 0, 0} | |
24934 }; | |
24935 #ifndef CYTHON_SMALL_CODE | |
24936 #if defined(__clang__) | |
24937 #define CYTHON_SMALL_CODE | |
24938 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) | |
24939 #define CYTHON_SMALL_CODE __attribute__((cold)) | |
24940 #else | |
24941 #define CYTHON_SMALL_CODE | |
24942 #endif | |
24943 #endif | |
24944 /* #### Code section: pystring_table ### */ | |
24945 | |
24946 static int __Pyx_CreateStringTabAndInitStrings(void) { | |
24947 __Pyx_StringTabEntry __pyx_string_tab[] = { | |
24948 {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1}, | |
24949 {&__pyx_n_s_BedProxy, __pyx_k_BedProxy, sizeof(__pyx_k_BedProxy), 0, 0, 1, 1}, | |
24950 {&__pyx_n_u_BedProxy, __pyx_k_BedProxy, sizeof(__pyx_k_BedProxy), 0, 1, 0, 1}, | |
24951 {&__pyx_n_s_BedProxy___reduce_cython, __pyx_k_BedProxy___reduce_cython, sizeof(__pyx_k_BedProxy___reduce_cython), 0, 0, 1, 1}, | |
24952 {&__pyx_n_s_BedProxy___setstate_cython, __pyx_k_BedProxy___setstate_cython, sizeof(__pyx_k_BedProxy___setstate_cython), 0, 0, 1, 1}, | |
24953 {&__pyx_n_s_BedProxy_getMaxFields, __pyx_k_BedProxy_getMaxFields, sizeof(__pyx_k_BedProxy_getMaxFields), 0, 0, 1, 1}, | |
24954 {&__pyx_n_s_BedProxy_getMinFields, __pyx_k_BedProxy_getMinFields, sizeof(__pyx_k_BedProxy_getMinFields), 0, 0, 1, 1}, | |
24955 {&__pyx_n_s_GFF3Proxy, __pyx_k_GFF3Proxy, sizeof(__pyx_k_GFF3Proxy), 0, 0, 1, 1}, | |
24956 {&__pyx_n_u_GFF3Proxy, __pyx_k_GFF3Proxy, sizeof(__pyx_k_GFF3Proxy), 0, 1, 0, 1}, | |
24957 {&__pyx_n_s_GFF3Proxy___reduce_cython, __pyx_k_GFF3Proxy___reduce_cython, sizeof(__pyx_k_GFF3Proxy___reduce_cython), 0, 0, 1, 1}, | |
24958 {&__pyx_n_s_GFF3Proxy___setstate_cython, __pyx_k_GFF3Proxy___setstate_cython, sizeof(__pyx_k_GFF3Proxy___setstate_cython), 0, 0, 1, 1}, | |
24959 {&__pyx_n_s_GFF3Proxy_attribute_string2itera, __pyx_k_GFF3Proxy_attribute_string2itera, sizeof(__pyx_k_GFF3Proxy_attribute_string2itera), 0, 0, 1, 1}, | |
24960 {&__pyx_n_s_GFF3Proxy_dict2attribute_string, __pyx_k_GFF3Proxy_dict2attribute_string, sizeof(__pyx_k_GFF3Proxy_dict2attribute_string), 0, 0, 1, 1}, | |
24961 {&__pyx_n_s_GTFProxy, __pyx_k_GTFProxy, sizeof(__pyx_k_GTFProxy), 0, 0, 1, 1}, | |
24962 {&__pyx_n_u_GTFProxy, __pyx_k_GTFProxy, sizeof(__pyx_k_GTFProxy), 0, 1, 0, 1}, | |
24963 {&__pyx_n_s_GTFProxy___reduce_cython, __pyx_k_GTFProxy___reduce_cython, sizeof(__pyx_k_GTFProxy___reduce_cython), 0, 0, 1, 1}, | |
24964 {&__pyx_n_s_GTFProxy___setstate_cython, __pyx_k_GTFProxy___setstate_cython, sizeof(__pyx_k_GTFProxy___setstate_cython), 0, 0, 1, 1}, | |
24965 {&__pyx_n_s_GTFProxy_asDict, __pyx_k_GTFProxy_asDict, sizeof(__pyx_k_GTFProxy_asDict), 0, 0, 1, 1}, | |
24966 {&__pyx_n_s_GTFProxy_as_dict, __pyx_k_GTFProxy_as_dict, sizeof(__pyx_k_GTFProxy_as_dict), 0, 0, 1, 1}, | |
24967 {&__pyx_n_s_GTFProxy_attribute_string2dict, __pyx_k_GTFProxy_attribute_string2dict, sizeof(__pyx_k_GTFProxy_attribute_string2dict), 0, 0, 1, 1}, | |
24968 {&__pyx_n_s_GTFProxy_attribute_string2iterat, __pyx_k_GTFProxy_attribute_string2iterat, sizeof(__pyx_k_GTFProxy_attribute_string2iterat), 0, 0, 1, 1}, | |
24969 {&__pyx_n_s_GTFProxy_dict2attribute_string, __pyx_k_GTFProxy_dict2attribute_string, sizeof(__pyx_k_GTFProxy_dict2attribute_string), 0, 0, 1, 1}, | |
24970 {&__pyx_n_s_GTFProxy_fromDict, __pyx_k_GTFProxy_fromDict, sizeof(__pyx_k_GTFProxy_fromDict), 0, 0, 1, 1}, | |
24971 {&__pyx_n_s_GTFProxy_from_dict, __pyx_k_GTFProxy_from_dict, sizeof(__pyx_k_GTFProxy_from_dict), 0, 0, 1, 1}, | |
24972 {&__pyx_n_s_GTFProxy_getMaxFields, __pyx_k_GTFProxy_getMaxFields, sizeof(__pyx_k_GTFProxy_getMaxFields), 0, 0, 1, 1}, | |
24973 {&__pyx_n_s_GTFProxy_getMinFields, __pyx_k_GTFProxy_getMinFields, sizeof(__pyx_k_GTFProxy_getMinFields), 0, 0, 1, 1}, | |
24974 {&__pyx_n_s_GTFProxy_invert, __pyx_k_GTFProxy_invert, sizeof(__pyx_k_GTFProxy_invert), 0, 0, 1, 1}, | |
24975 {&__pyx_n_s_GTFProxy_keys, __pyx_k_GTFProxy_keys, sizeof(__pyx_k_GTFProxy_keys), 0, 0, 1, 1}, | |
24976 {&__pyx_n_s_GTFProxy_setAttribute, __pyx_k_GTFProxy_setAttribute, sizeof(__pyx_k_GTFProxy_setAttribute), 0, 0, 1, 1}, | |
24977 {&__pyx_n_s_GTFProxy_to_dict, __pyx_k_GTFProxy_to_dict, sizeof(__pyx_k_GTFProxy_to_dict), 0, 0, 1, 1}, | |
24978 {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0}, | |
24979 {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, | |
24980 {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, | |
24981 {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, | |
24982 {&__pyx_n_s_NamedTupleProxy, __pyx_k_NamedTupleProxy, sizeof(__pyx_k_NamedTupleProxy), 0, 0, 1, 1}, | |
24983 {&__pyx_n_u_NamedTupleProxy, __pyx_k_NamedTupleProxy, sizeof(__pyx_k_NamedTupleProxy), 0, 1, 0, 1}, | |
24984 {&__pyx_n_s_NamedTupleProxy___reduce_cython, __pyx_k_NamedTupleProxy___reduce_cython, sizeof(__pyx_k_NamedTupleProxy___reduce_cython), 0, 0, 1, 1}, | |
24985 {&__pyx_n_s_NamedTupleProxy___setstate_cytho, __pyx_k_NamedTupleProxy___setstate_cytho, sizeof(__pyx_k_NamedTupleProxy___setstate_cytho), 0, 0, 1, 1}, | |
24986 {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, | |
24987 {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1}, | |
24988 {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, | |
24989 {&__pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr, __pyx_k_Pyx_CFunc_5pysam_16libctabixpr, sizeof(__pyx_k_Pyx_CFunc_5pysam_16libctabixpr), 0, 0, 1, 1}, | |
24990 {&__pyx_n_s_Pyx_CFunc_5pysam_16libctabixpr_2, __pyx_k_Pyx_CFunc_5pysam_16libctabixpr_2, sizeof(__pyx_k_Pyx_CFunc_5pysam_16libctabixpr_2), 0, 0, 1, 1}, | |
24991 {&__pyx_n_s_Pyx_CFunc_e2acea__5pysam_16lib, __pyx_k_Pyx_CFunc_e2acea__5pysam_16lib, sizeof(__pyx_k_Pyx_CFunc_e2acea__5pysam_16lib), 0, 0, 1, 1}, | |
24992 {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1}, | |
24993 {&__pyx_n_s_TupleProxy, __pyx_k_TupleProxy, sizeof(__pyx_k_TupleProxy), 0, 0, 1, 1}, | |
24994 {&__pyx_n_u_TupleProxy, __pyx_k_TupleProxy, sizeof(__pyx_k_TupleProxy), 0, 1, 0, 1}, | |
24995 {&__pyx_n_s_TupleProxyIterator, __pyx_k_TupleProxyIterator, sizeof(__pyx_k_TupleProxyIterator), 0, 0, 1, 1}, | |
24996 {&__pyx_n_s_TupleProxyIterator___reduce_cyth, __pyx_k_TupleProxyIterator___reduce_cyth, sizeof(__pyx_k_TupleProxyIterator___reduce_cyth), 0, 0, 1, 1}, | |
24997 {&__pyx_n_s_TupleProxyIterator___setstate_cy, __pyx_k_TupleProxyIterator___setstate_cy, sizeof(__pyx_k_TupleProxyIterator___setstate_cy), 0, 0, 1, 1}, | |
24998 {&__pyx_n_s_TupleProxy___copy, __pyx_k_TupleProxy___copy, sizeof(__pyx_k_TupleProxy___copy), 0, 0, 1, 1}, | |
24999 {&__pyx_n_s_TupleProxy___reduce_cython, __pyx_k_TupleProxy___reduce_cython, sizeof(__pyx_k_TupleProxy___reduce_cython), 0, 0, 1, 1}, | |
25000 {&__pyx_n_s_TupleProxy___setstate_cython, __pyx_k_TupleProxy___setstate_cython, sizeof(__pyx_k_TupleProxy___setstate_cython), 0, 0, 1, 1}, | |
25001 {&__pyx_n_s_TupleProxy__getindex, __pyx_k_TupleProxy__getindex, sizeof(__pyx_k_TupleProxy__getindex), 0, 0, 1, 1}, | |
25002 {&__pyx_n_s_TupleProxy__setindex, __pyx_k_TupleProxy__setindex, sizeof(__pyx_k_TupleProxy__setindex), 0, 0, 1, 1}, | |
25003 {&__pyx_n_s_TupleProxy_compare, __pyx_k_TupleProxy_compare, sizeof(__pyx_k_TupleProxy_compare), 0, 0, 1, 1}, | |
25004 {&__pyx_n_s_TupleProxy_getMaxFields, __pyx_k_TupleProxy_getMaxFields, sizeof(__pyx_k_TupleProxy_getMaxFields), 0, 0, 1, 1}, | |
25005 {&__pyx_n_s_TupleProxy_getMinFields, __pyx_k_TupleProxy_getMinFields, sizeof(__pyx_k_TupleProxy_getMinFields), 0, 0, 1, 1}, | |
25006 {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, | |
25007 {&__pyx_n_s_VCFProxy, __pyx_k_VCFProxy, sizeof(__pyx_k_VCFProxy), 0, 0, 1, 1}, | |
25008 {&__pyx_n_u_VCFProxy, __pyx_k_VCFProxy, sizeof(__pyx_k_VCFProxy), 0, 1, 0, 1}, | |
25009 {&__pyx_n_s_VCFProxy___reduce_cython, __pyx_k_VCFProxy___reduce_cython, sizeof(__pyx_k_VCFProxy___reduce_cython), 0, 0, 1, 1}, | |
25010 {&__pyx_n_s_VCFProxy___setstate_cython, __pyx_k_VCFProxy___setstate_cython, sizeof(__pyx_k_VCFProxy___setstate_cython), 0, 0, 1, 1}, | |
25011 {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, | |
25012 {&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0}, | |
25013 {&__pyx_kp_b__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 0, 0}, | |
25014 {&__pyx_kp_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 0}, | |
25015 {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0}, | |
25016 {&__pyx_kp_u__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 1, 0, 0}, | |
25017 {&__pyx_kp_u__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 1, 0, 0}, | |
25018 {&__pyx_kp_u__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 1, 0, 0}, | |
25019 {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0}, | |
25020 {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0}, | |
25021 {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0}, | |
25022 {&__pyx_kp_u__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0}, | |
25023 {&__pyx_kp_u__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 1, 0, 0}, | |
25024 {&__pyx_kp_u__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 1, 0, 0}, | |
25025 {&__pyx_n_s__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 1}, | |
25026 {&__pyx_n_s__88, __pyx_k__88, sizeof(__pyx_k__88), 0, 0, 1, 1}, | |
25027 {&__pyx_n_s_aa, __pyx_k_aa, sizeof(__pyx_k_aa), 0, 0, 1, 1}, | |
25028 {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1}, | |
25029 {&__pyx_n_u_alt, __pyx_k_alt, sizeof(__pyx_k_alt), 0, 1, 0, 1}, | |
25030 {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, | |
25031 {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, | |
25032 {&__pyx_n_s_asDict, __pyx_k_asDict, sizeof(__pyx_k_asDict), 0, 0, 1, 1}, | |
25033 {&__pyx_n_s_as_dict, __pyx_k_as_dict, sizeof(__pyx_k_as_dict), 0, 0, 1, 1}, | |
25034 {&__pyx_n_u_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 1, 0, 1}, | |
25035 {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, | |
25036 {&__pyx_n_s_attribute_dict2string, __pyx_k_attribute_dict2string, sizeof(__pyx_k_attribute_dict2string), 0, 0, 1, 1}, | |
25037 {&__pyx_n_s_attribute_string, __pyx_k_attribute_string, sizeof(__pyx_k_attribute_string), 0, 0, 1, 1}, | |
25038 {&__pyx_n_s_attribute_string2dict, __pyx_k_attribute_string2dict, sizeof(__pyx_k_attribute_string2dict), 0, 0, 1, 1}, | |
25039 {&__pyx_n_s_attribute_string2iterator, __pyx_k_attribute_string2iterator, sizeof(__pyx_k_attribute_string2iterator), 0, 0, 1, 1}, | |
25040 {&__pyx_n_s_attribute_string2iterator_locals, __pyx_k_attribute_string2iterator_locals, sizeof(__pyx_k_attribute_string2iterator_locals), 0, 0, 1, 1}, | |
25041 {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1}, | |
25042 {&__pyx_n_u_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 1, 0, 1}, | |
25043 {&__pyx_kp_u_bed_format_requires_at_least_thr, __pyx_k_bed_format_requires_at_least_thr, sizeof(__pyx_k_bed_format_requires_at_least_thr), 0, 1, 0, 0}, | |
25044 {&__pyx_n_u_blockCount, __pyx_k_blockCount, sizeof(__pyx_k_blockCount), 0, 1, 0, 1}, | |
25045 {&__pyx_n_u_blockSizes, __pyx_k_blockSizes, sizeof(__pyx_k_blockSizes), 0, 1, 0, 1}, | |
25046 {&__pyx_n_u_blockStarts, __pyx_k_blockStarts, sizeof(__pyx_k_blockStarts), 0, 1, 0, 1}, | |
25047 {&__pyx_n_s_cfunc_to_py, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1}, | |
25048 {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1}, | |
25049 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, | |
25050 {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, | |
25051 {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1}, | |
25052 {&__pyx_n_s_compare, __pyx_k_compare, sizeof(__pyx_k_compare), 0, 0, 1, 1}, | |
25053 {&__pyx_kp_u_comparison_of_modified_TupleProx, __pyx_k_comparison_of_modified_TupleProx, sizeof(__pyx_k_comparison_of_modified_TupleProx), 0, 1, 0, 0}, | |
25054 {&__pyx_n_s_contig, __pyx_k_contig, sizeof(__pyx_k_contig), 0, 0, 1, 1}, | |
25055 {&__pyx_n_u_contig, __pyx_k_contig, sizeof(__pyx_k_contig), 0, 1, 0, 1}, | |
25056 {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, | |
25057 {&__pyx_n_s_copy_2, __pyx_k_copy_2, sizeof(__pyx_k_copy_2), 0, 0, 1, 1}, | |
25058 {&__pyx_kp_u_copying_modified_tuples_is_not_i, __pyx_k_copying_modified_tuples_is_not_i, sizeof(__pyx_k_copying_modified_tuples_is_not_i), 0, 1, 0, 0}, | |
25059 {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, | |
25060 {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, | |
25061 {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, | |
25062 {&__pyx_n_s_dict2attribute_string, __pyx_k_dict2attribute_string, sizeof(__pyx_k_dict2attribute_string), 0, 0, 1, 1}, | |
25063 {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1}, | |
25064 {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, | |
25065 {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0}, | |
25066 {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1}, | |
25067 {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, | |
25068 {&__pyx_n_u_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 1, 0, 1}, | |
25069 {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1}, | |
25070 {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, | |
25071 {&__pyx_n_s_feature, __pyx_k_feature, sizeof(__pyx_k_feature), 0, 0, 1, 1}, | |
25072 {&__pyx_n_u_feature, __pyx_k_feature, sizeof(__pyx_k_feature), 0, 1, 0, 1}, | |
25073 {&__pyx_kp_u_field_s_not_set, __pyx_k_field_s_not_set, sizeof(__pyx_k_field_s_not_set), 0, 1, 0, 0}, | |
25074 {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1}, | |
25075 {&__pyx_n_u_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 1, 0, 1}, | |
25076 {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, | |
25077 {&__pyx_n_u_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 1, 0, 1}, | |
25078 {&__pyx_n_s_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 0, 1, 1}, | |
25079 {&__pyx_n_u_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 1, 0, 1}, | |
25080 {&__pyx_n_s_fromDict, __pyx_k_fromDict, sizeof(__pyx_k_fromDict), 0, 0, 1, 1}, | |
25081 {&__pyx_n_s_from_dict, __pyx_k_from_dict, sizeof(__pyx_k_from_dict), 0, 0, 1, 1}, | |
25082 {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, | |
25083 {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, | |
25084 {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, | |
25085 {&__pyx_n_s_getMaxFields, __pyx_k_getMaxFields, sizeof(__pyx_k_getMaxFields), 0, 0, 1, 1}, | |
25086 {&__pyx_n_s_getMinFields, __pyx_k_getMinFields, sizeof(__pyx_k_getMinFields), 0, 0, 1, 1}, | |
25087 {&__pyx_n_s_getattr, __pyx_k_getattr, sizeof(__pyx_k_getattr), 0, 0, 1, 1}, | |
25088 {&__pyx_n_s_getindex, __pyx_k_getindex, sizeof(__pyx_k_getindex), 0, 0, 1, 1}, | |
25089 {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, | |
25090 {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, | |
25091 {&__pyx_n_u_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 1, 0, 1}, | |
25092 {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1}, | |
25093 {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, | |
25094 {&__pyx_kp_u_incomplete_line_at_s, __pyx_k_incomplete_line_at_s, sizeof(__pyx_k_incomplete_line_at_s), 0, 1, 0, 0}, | |
25095 {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, | |
25096 {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1}, | |
25097 {&__pyx_n_u_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 1, 0, 1}, | |
25098 {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1}, | |
25099 {&__pyx_n_s_invert, __pyx_k_invert, sizeof(__pyx_k_invert), 0, 0, 1, 1}, | |
25100 {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, | |
25101 {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, | |
25102 {&__pyx_n_u_itemRGB, __pyx_k_itemRGB, sizeof(__pyx_k_itemRGB), 0, 1, 0, 1}, | |
25103 {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, | |
25104 {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, | |
25105 {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, | |
25106 {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, | |
25107 {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, | |
25108 {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, | |
25109 {&__pyx_n_s_lcontig, __pyx_k_lcontig, sizeof(__pyx_k_lcontig), 0, 0, 1, 1}, | |
25110 {&__pyx_kp_u_length_of_buffer_i_number_of_byt, __pyx_k_length_of_buffer_i_number_of_byt, sizeof(__pyx_k_length_of_buffer_i_number_of_byt), 0, 1, 0, 0}, | |
25111 {&__pyx_kp_u_list_index_out_of_range, __pyx_k_list_index_out_of_range, sizeof(__pyx_k_list_index_out_of_range), 0, 1, 0, 0}, | |
25112 {&__pyx_kp_u_list_index_out_of_range_i_i, __pyx_k_list_index_out_of_range_i_i, sizeof(__pyx_k_list_index_out_of_range_i_i), 0, 1, 0, 0}, | |
25113 {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, | |
25114 {&__pyx_n_s_map_key2field, __pyx_k_map_key2field, sizeof(__pyx_k_map_key2field), 0, 0, 1, 1}, | |
25115 {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, | |
25116 {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, | |
25117 {&__pyx_n_u_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 1, 0, 1}, | |
25118 {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, | |
25119 {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, | |
25120 {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, | |
25121 {&__pyx_kp_u_op_0_isn_t_implemented_yet, __pyx_k_op_0_isn_t_implemented_yet, sizeof(__pyx_k_op_0_isn_t_implemented_yet), 0, 1, 0, 0}, | |
25122 {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1}, | |
25123 {&__pyx_kp_u_out_of_memory, __pyx_k_out_of_memory, sizeof(__pyx_k_out_of_memory), 0, 1, 0, 0}, | |
25124 {&__pyx_kp_u_out_of_memory_in_TupleProxy_copy, __pyx_k_out_of_memory_in_TupleProxy_copy, sizeof(__pyx_k_out_of_memory_in_TupleProxy_copy), 0, 1, 0, 0}, | |
25125 {&__pyx_kp_u_out_of_memory_in_TupleProxy_upda, __pyx_k_out_of_memory_in_TupleProxy_upda, sizeof(__pyx_k_out_of_memory_in_TupleProxy_upda), 0, 1, 0, 0}, | |
25126 {&__pyx_kp_u_parsing_error_fewer_than_i_field, __pyx_k_parsing_error_fewer_than_i_field, sizeof(__pyx_k_parsing_error_fewer_than_i_field), 0, 1, 0, 0}, | |
25127 {&__pyx_kp_u_parsing_error_more_than_i_fields, __pyx_k_parsing_error_more_than_i_fields, sizeof(__pyx_k_parsing_error_more_than_i_fields), 0, 1, 0, 0}, | |
25128 {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, | |
25129 {&__pyx_n_u_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 1, 0, 1}, | |
25130 {&__pyx_n_s_proxy, __pyx_k_proxy, sizeof(__pyx_k_proxy), 0, 0, 1, 1}, | |
25131 {&__pyx_n_s_pysam_libctabixproxies, __pyx_k_pysam_libctabixproxies, sizeof(__pyx_k_pysam_libctabixproxies), 0, 0, 1, 1}, | |
25132 {&__pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_k_pysam_libctabixproxies_pyx, sizeof(__pyx_k_pysam_libctabixproxies_pyx), 0, 0, 1, 0}, | |
25133 {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1}, | |
25134 {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1}, | |
25135 {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1}, | |
25136 {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, | |
25137 {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1}, | |
25138 {&__pyx_n_s_pyx_unpickle_TupleProxyIterato, __pyx_k_pyx_unpickle_TupleProxyIterato, sizeof(__pyx_k_pyx_unpickle_TupleProxyIterato), 0, 0, 1, 1}, | |
25139 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, | |
25140 {&__pyx_n_u_qual, __pyx_k_qual, sizeof(__pyx_k_qual), 0, 1, 0, 1}, | |
25141 {&__pyx_n_s_quote, __pyx_k_quote, sizeof(__pyx_k_quote), 0, 0, 1, 1}, | |
25142 {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, | |
25143 {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, | |
25144 {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, | |
25145 {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, | |
25146 {&__pyx_n_u_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 1, 0, 1}, | |
25147 {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0}, | |
25148 {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1}, | |
25149 {&__pyx_n_s_score, __pyx_k_score, sizeof(__pyx_k_score), 0, 0, 1, 1}, | |
25150 {&__pyx_n_u_score, __pyx_k_score, sizeof(__pyx_k_score), 0, 1, 0, 1}, | |
25151 {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, | |
25152 {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, | |
25153 {&__pyx_n_s_separator, __pyx_k_separator, sizeof(__pyx_k_separator), 0, 0, 1, 1}, | |
25154 {&__pyx_n_s_setAttribute, __pyx_k_setAttribute, sizeof(__pyx_k_setAttribute), 0, 0, 1, 1}, | |
25155 {&__pyx_n_s_setindex, __pyx_k_setindex, sizeof(__pyx_k_setindex), 0, 0, 1, 1}, | |
25156 {&__pyx_n_s_setitem, __pyx_k_setitem, sizeof(__pyx_k_setitem), 0, 0, 1, 1}, | |
25157 {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, | |
25158 {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, | |
25159 {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1}, | |
25160 {&__pyx_n_u_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 1, 0, 1}, | |
25161 {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, | |
25162 {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, | |
25163 {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, | |
25164 {&__pyx_n_u_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 1, 0, 1}, | |
25165 {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, | |
25166 {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1}, | |
25167 {&__pyx_n_s_strand, __pyx_k_strand, sizeof(__pyx_k_strand), 0, 0, 1, 1}, | |
25168 {&__pyx_n_u_strand, __pyx_k_strand, sizeof(__pyx_k_strand), 0, 1, 0, 1}, | |
25169 {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, | |
25170 {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1}, | |
25171 {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, | |
25172 {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, | |
25173 {&__pyx_n_u_thickEnd, __pyx_k_thickEnd, sizeof(__pyx_k_thickEnd), 0, 1, 0, 1}, | |
25174 {&__pyx_n_u_thickStart, __pyx_k_thickStart, sizeof(__pyx_k_thickStart), 0, 1, 0, 1}, | |
25175 {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, | |
25176 {&__pyx_n_s_tmp, __pyx_k_tmp, sizeof(__pyx_k_tmp), 0, 0, 1, 1}, | |
25177 {&__pyx_n_s_toDot, __pyx_k_toDot, sizeof(__pyx_k_toDot), 0, 0, 1, 1}, | |
25178 {&__pyx_n_s_to_dict, __pyx_k_to_dict, sizeof(__pyx_k_to_dict), 0, 0, 1, 1}, | |
25179 {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, | |
25180 {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1}, | |
25181 {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, | |
25182 {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, | |
25183 {&__pyx_n_s_wrap, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1}, | |
25184 {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, | |
25185 {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1}, | |
25186 {0, 0, 0, 0, 0, 0, 0} | |
25187 }; | |
25188 return __Pyx_InitStrings(__pyx_string_tab); | |
25189 } | |
25190 /* #### Code section: cached_builtins ### */ | |
25191 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { | |
25192 __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 67, __pyx_L1_error) | |
25193 __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 126, __pyx_L1_error) | |
25194 __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 168, __pyx_L1_error) | |
25195 __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 245, __pyx_L1_error) | |
25196 __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 261, __pyx_L1_error) | |
25197 #if PY_MAJOR_VERSION >= 3 | |
25198 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 312, __pyx_L1_error) | |
25199 #else | |
25200 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 312, __pyx_L1_error) | |
25201 #endif | |
25202 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) | |
25203 __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 339, __pyx_L1_error) | |
25204 __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 369, __pyx_L1_error) | |
25205 __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 497, __pyx_L1_error) | |
25206 __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(3, 120, __pyx_L1_error) | |
25207 return 0; | |
25208 __pyx_L1_error:; | |
25209 return -1; | |
25210 } | |
25211 /* #### Code section: cached_constants ### */ | |
25212 | |
25213 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { | |
25214 __Pyx_RefNannyDeclarations | |
25215 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); | |
25216 | |
25217 /* "cfunc.to_py":67 | |
25218 * @cname("__Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v") | |
25219 * cdef object __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(object (*f)(object) ): | |
25220 * def wrap(object v): # <<<<<<<<<<<<<< | |
25221 * """wrap(v)""" | |
25222 * return f(v) | |
25223 */ | |
25224 __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 67, __pyx_L1_error) | |
25225 __Pyx_GOTREF(__pyx_tuple_); | |
25226 __Pyx_GIVEREF(__pyx_tuple_); | |
25227 __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(1, 67, __pyx_L1_error) | |
25228 __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(1, 67, __pyx_L1_error) | |
25229 __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(1, 67, __pyx_L1_error) | |
25230 | |
25231 /* "pysam/libctabixproxies.pyx":67 | |
25232 * def __copy__(self): | |
25233 * if self.is_modified: | |
25234 * raise NotImplementedError( # <<<<<<<<<<<<<< | |
25235 * "copying modified tuples is not implemented") | |
25236 * cdef TupleProxy n = type(self)() | |
25237 */ | |
25238 __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_copying_modified_tuples_is_not_i); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 67, __pyx_L1_error) | |
25239 __Pyx_GOTREF(__pyx_tuple__5); | |
25240 __Pyx_GIVEREF(__pyx_tuple__5); | |
25241 | |
25242 /* "pysam/libctabixproxies.pyx":79 | |
25243 * ''' | |
25244 * if self.is_modified or other.is_modified: | |
25245 * raise NotImplementedError( # <<<<<<<<<<<<<< | |
25246 * 'comparison of modified TupleProxies is not implemented') | |
25247 * if self.data == other.data: | |
25248 */ | |
25249 __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_comparison_of_modified_TupleProx); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 79, __pyx_L1_error) | |
25250 __Pyx_GOTREF(__pyx_tuple__6); | |
25251 __Pyx_GIVEREF(__pyx_tuple__6); | |
25252 | |
25253 /* "pysam/libctabixproxies.pyx":126 | |
25254 * self.data = <char*>malloc(s) | |
25255 * if self.data == NULL: | |
25256 * raise ValueError("out of memory in TupleProxy.copy()") # <<<<<<<<<<<<<< | |
25257 * memcpy(<char*>self.data, buffer, s) | |
25258 * | |
25259 */ | |
25260 __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_out_of_memory_in_TupleProxy_copy); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 126, __pyx_L1_error) | |
25261 __Pyx_GOTREF(__pyx_tuple__7); | |
25262 __Pyx_GIVEREF(__pyx_tuple__7); | |
25263 | |
25264 /* "pysam/libctabixproxies.pyx":207 | |
25265 * self.fields = <char **>calloc(max_fields, sizeof(char *)) | |
25266 * if self.fields == NULL: | |
25267 * raise ValueError("out of memory in TupleProxy.update()") # <<<<<<<<<<<<<< | |
25268 * | |
25269 * ################################# | |
25270 */ | |
25271 __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_out_of_memory_in_TupleProxy_upda); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 207, __pyx_L1_error) | |
25272 __Pyx_GOTREF(__pyx_tuple__8); | |
25273 __Pyx_GIVEREF(__pyx_tuple__8); | |
25274 | |
25275 /* "pysam/libctabixproxies.pyx":245 | |
25276 * i += self.nfields | |
25277 * if i < 0: | |
25278 * raise IndexError("list index out of range") # <<<<<<<<<<<<<< | |
25279 * # apply offset - separating a fixed number | |
25280 * # of fields from a variable number such as in VCF | |
25281 */ | |
25282 __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_list_index_out_of_range); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 245, __pyx_L1_error) | |
25283 __Pyx_GOTREF(__pyx_tuple__9); | |
25284 __Pyx_GIVEREF(__pyx_tuple__9); | |
25285 | |
25286 /* "pysam/libctabixproxies.pyx":287 | |
25287 * self.fields[idx] = <char*>malloc((strlen( tmp ) + 1) * sizeof(char)) | |
25288 * if self.fields[idx] == NULL: | |
25289 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<< | |
25290 * strcpy(self.fields[idx], tmp) | |
25291 * | |
25292 */ | |
25293 __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_out_of_memory); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 287, __pyx_L1_error) | |
25294 __Pyx_GOTREF(__pyx_tuple__10); | |
25295 __Pyx_GIVEREF(__pyx_tuple__10); | |
25296 | |
25297 /* "pysam/libctabixproxies.pyx":587 | |
25298 * # strip semicolon (GTF files without a space after the last semicolon) | |
25299 * if f.endswith(";"): | |
25300 * f = f[:-1] # <<<<<<<<<<<<<< | |
25301 * | |
25302 * # split at most once in order to avoid separating | |
25303 */ | |
25304 __pyx_slice__20 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__20)) __PYX_ERR(0, 587, __pyx_L1_error) | |
25305 __Pyx_GOTREF(__pyx_slice__20); | |
25306 __Pyx_GIVEREF(__pyx_slice__20); | |
25307 | |
25308 /* "pysam/libctabixproxies.pyx":591 | |
25309 * # split at most once in order to avoid separating | |
25310 * # multi-word values | |
25311 * d = [x.strip() for x in f.split(" ", 1)] # <<<<<<<<<<<<<< | |
25312 * | |
25313 * n, v = d[0], d[1] | |
25314 */ | |
25315 __pyx_tuple__22 = PyTuple_Pack(2, __pyx_kp_u__21, __pyx_int_1); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 591, __pyx_L1_error) | |
25316 __Pyx_GOTREF(__pyx_tuple__22); | |
25317 __Pyx_GIVEREF(__pyx_tuple__22); | |
25318 | |
25319 /* "pysam/libctabixproxies.pyx":598 | |
25320 * | |
25321 * if v[0] == '"' and v[-1] == '"': | |
25322 * v = v[1:-1] # <<<<<<<<<<<<<< | |
25323 * else: | |
25324 * ## try to convert to a value | |
25325 */ | |
25326 __pyx_slice__24 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 598, __pyx_L1_error) | |
25327 __Pyx_GOTREF(__pyx_slice__24); | |
25328 __Pyx_GIVEREF(__pyx_slice__24); | |
25329 | |
25330 /* "pysam/libctabixproxies.pyx":617 | |
25331 * # Only called if there *isn't* an attribute with this name | |
25332 * cdef int idx | |
25333 * idx, f = self.map_key2field.get(key, (-1, None)) # <<<<<<<<<<<<<< | |
25334 * if idx >= 0: | |
25335 * # deal with known attributes (fields 0-8) | |
25336 */ | |
25337 __pyx_tuple__25 = PyTuple_Pack(2, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 617, __pyx_L1_error) | |
25338 __Pyx_GOTREF(__pyx_tuple__25); | |
25339 __Pyx_GIVEREF(__pyx_tuple__25); | |
25340 | |
25341 /* "pysam/libctabixproxies.pyx":688 | |
25342 * continue | |
25343 * | |
25344 * key, value = f.split("=", 1) # <<<<<<<<<<<<<< | |
25345 * value = value.strip() | |
25346 * | |
25347 */ | |
25348 __pyx_tuple__29 = PyTuple_Pack(2, __pyx_kp_u__28, __pyx_int_1); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 688, __pyx_L1_error) | |
25349 __Pyx_GOTREF(__pyx_tuple__29); | |
25350 __Pyx_GIVEREF(__pyx_tuple__29); | |
25351 | |
25352 /* "pysam/libctabixproxies.pyx":738 | |
25353 * | |
25354 * if self.nfields < 3: | |
25355 * raise ValueError( # <<<<<<<<<<<<<< | |
25356 * "bed format requires at least three columns") | |
25357 * | |
25358 */ | |
25359 __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_bed_format_requires_at_least_thr); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 738, __pyx_L1_error) | |
25360 __Pyx_GOTREF(__pyx_tuple__30); | |
25361 __Pyx_GIVEREF(__pyx_tuple__30); | |
25362 | |
25363 /* "(tree fragment)":4 | |
25364 * cdef object __pyx_PickleError | |
25365 * cdef object __pyx_result | |
25366 * if __pyx_checksum not in (0x0eb9d08, 0x60f8e6c, 0xd13f98c): # <<<<<<<<<<<<<< | |
25367 * from pickle import PickleError as __pyx_PickleError | |
25368 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x0eb9d08, 0x60f8e6c, 0xd13f98c) = (index, proxy))" % __pyx_checksum | |
25369 */ | |
25370 __pyx_tuple__31 = PyTuple_Pack(3, __pyx_int_15441160, __pyx_int_101682796, __pyx_int_219412876); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 4, __pyx_L1_error) | |
25371 __Pyx_GOTREF(__pyx_tuple__31); | |
25372 __Pyx_GIVEREF(__pyx_tuple__31); | |
25373 | |
25374 /* "pysam/libctabixproxies.pyx":65 | |
25375 * free(self.fields) | |
25376 * | |
25377 * def __copy__(self): # <<<<<<<<<<<<<< | |
25378 * if self.is_modified: | |
25379 * raise NotImplementedError( | |
25380 */ | |
25381 __pyx_tuple__33 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_n); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 65, __pyx_L1_error) | |
25382 __Pyx_GOTREF(__pyx_tuple__33); | |
25383 __Pyx_GIVEREF(__pyx_tuple__33); | |
25384 __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_copy_2, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 65, __pyx_L1_error) | |
25385 | |
25386 /* "pysam/libctabixproxies.pyx":73 | |
25387 * return n | |
25388 * | |
25389 * def compare(self, TupleProxy other): # <<<<<<<<<<<<<< | |
25390 * '''return -1,0,1, if contents in this are binary | |
25391 * <,=,> to *other* | |
25392 */ | |
25393 __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 73, __pyx_L1_error) | |
25394 __Pyx_GOTREF(__pyx_tuple__35); | |
25395 __Pyx_GIVEREF(__pyx_tuple__35); | |
25396 __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_compare, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 73, __pyx_L1_error) | |
25397 | |
25398 /* "pysam/libctabixproxies.pyx":136 | |
25399 * self.update(self.data, nbytes) | |
25400 * | |
25401 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
25402 * '''return minimum number of fields.''' | |
25403 * # 1 is not a valid tabix entry, but TupleProxy | |
25404 */ | |
25405 __pyx_tuple__37 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 136, __pyx_L1_error) | |
25406 __Pyx_GOTREF(__pyx_tuple__37); | |
25407 __Pyx_GIVEREF(__pyx_tuple__37); | |
25408 __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_getMinFields, 136, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 136, __pyx_L1_error) | |
25409 | |
25410 /* "pysam/libctabixproxies.pyx":142 | |
25411 * return 1 | |
25412 * | |
25413 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
25414 * '''return maximum number of fields. Return | |
25415 * 0 for unknown length.''' | |
25416 */ | |
25417 __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_getMaxFields, 142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 142, __pyx_L1_error) | |
25418 | |
25419 /* "pysam/libctabixproxies.pyx":239 | |
25420 * (self.getMinFields(), buffer)) | |
25421 * | |
25422 * def _getindex(self, int index): # <<<<<<<<<<<<<< | |
25423 * '''return item at idx index''' | |
25424 * cdef int i = index | |
25425 */ | |
25426 __pyx_tuple__40 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_i); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 239, __pyx_L1_error) | |
25427 __Pyx_GOTREF(__pyx_tuple__40); | |
25428 __Pyx_GIVEREF(__pyx_tuple__40); | |
25429 __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_getindex, 239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 239, __pyx_L1_error) | |
25430 | |
25431 /* "pysam/libctabixproxies.pyx":265 | |
25432 * return result | |
25433 * | |
25434 * def _setindex(self, index, value): # <<<<<<<<<<<<<< | |
25435 * '''set item at idx index.''' | |
25436 * cdef int idx = index | |
25437 */ | |
25438 __pyx_tuple__42 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_value, __pyx_n_s_idx, __pyx_n_s_tmp); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 265, __pyx_L1_error) | |
25439 __Pyx_GOTREF(__pyx_tuple__42); | |
25440 __Pyx_GIVEREF(__pyx_tuple__42); | |
25441 __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_setindex, 265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 265, __pyx_L1_error) | |
25442 | |
25443 /* "(tree fragment)":1 | |
25444 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
25445 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25446 * def __setstate_cython__(self, __pyx_state): | |
25447 */ | |
25448 __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(1, 1, __pyx_L1_error) | |
25449 | |
25450 /* "(tree fragment)":3 | |
25451 * def __reduce_cython__(self): | |
25452 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25453 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
25454 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25455 */ | |
25456 __pyx_tuple__45 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 3, __pyx_L1_error) | |
25457 __Pyx_GOTREF(__pyx_tuple__45); | |
25458 __Pyx_GIVEREF(__pyx_tuple__45); | |
25459 __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(1, 3, __pyx_L1_error) | |
25460 | |
25461 /* "(tree fragment)":1 | |
25462 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
25463 * cdef tuple state | |
25464 * cdef object _dict | |
25465 */ | |
25466 __pyx_tuple__47 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 1, __pyx_L1_error) | |
25467 __Pyx_GOTREF(__pyx_tuple__47); | |
25468 __Pyx_GIVEREF(__pyx_tuple__47); | |
25469 __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(1, 1, __pyx_L1_error) | |
25470 | |
25471 /* "(tree fragment)":16 | |
25472 * else: | |
25473 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, state) | |
25474 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
25475 * __pyx_unpickle_TupleProxyIterator__set_state(self, __pyx_state) | |
25476 */ | |
25477 __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(1, 16, __pyx_L1_error) | |
25478 | |
25479 /* "pysam/libctabixproxies.pyx":345 | |
25480 * | |
25481 * | |
25482 * def toDot(v): # <<<<<<<<<<<<<< | |
25483 * '''convert value to '.' if None''' | |
25484 * if v is None: | |
25485 */ | |
25486 __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_toDot, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 345, __pyx_L1_error) | |
25487 | |
25488 /* "pysam/libctabixproxies.pyx":352 | |
25489 * return str(v) | |
25490 * | |
25491 * def quote(v): # <<<<<<<<<<<<<< | |
25492 * '''return a quoted attribute.''' | |
25493 * if isinstance(v, str): | |
25494 */ | |
25495 __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_quote, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 352, __pyx_L1_error) | |
25496 | |
25497 /* "(tree fragment)":1 | |
25498 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
25499 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25500 * def __setstate_cython__(self, __pyx_state): | |
25501 */ | |
25502 __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(1, 1, __pyx_L1_error) | |
25503 | |
25504 /* "(tree fragment)":3 | |
25505 * def __reduce_cython__(self): | |
25506 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25507 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
25508 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25509 */ | |
25510 __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(1, 3, __pyx_L1_error) | |
25511 | |
25512 /* "pysam/libctabixproxies.pyx":449 | |
25513 * self.attribute_dict = None | |
25514 * | |
25515 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
25516 * '''return minimum number of fields.''' | |
25517 * return 9 | |
25518 */ | |
25519 __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_getMinFields, 449, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 449, __pyx_L1_error) | |
25520 | |
25521 /* "pysam/libctabixproxies.pyx":453 | |
25522 * return 9 | |
25523 * | |
25524 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
25525 * '''return max number of fields.''' | |
25526 * return 9 | |
25527 */ | |
25528 __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_getMaxFields, 453, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 453, __pyx_L1_error) | |
25529 | |
25530 /* "pysam/libctabixproxies.pyx":457 | |
25531 * return 9 | |
25532 * | |
25533 * def to_dict(self): # <<<<<<<<<<<<<< | |
25534 * """parse attributes - return as dict | |
25535 * | |
25536 */ | |
25537 __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_to_dict, 457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 457, __pyx_L1_error) | |
25538 | |
25539 /* "pysam/libctabixproxies.pyx":468 | |
25540 * return self.attribute_dict | |
25541 * | |
25542 * def as_dict(self): # <<<<<<<<<<<<<< | |
25543 * """deprecated: use :meth:`to_dict` | |
25544 * """ | |
25545 */ | |
25546 __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_as_dict, 468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 468, __pyx_L1_error) | |
25547 | |
25548 /* "pysam/libctabixproxies.pyx":473 | |
25549 * return self.to_dict() | |
25550 * | |
25551 * def from_dict(self, d): # <<<<<<<<<<<<<< | |
25552 * '''set attributes from a dictionary.''' | |
25553 * self.attribute_dict = None | |
25554 */ | |
25555 __pyx_tuple__58 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_d, __pyx_n_s_attribute_string); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 473, __pyx_L1_error) | |
25556 __Pyx_GOTREF(__pyx_tuple__58); | |
25557 __Pyx_GIVEREF(__pyx_tuple__58); | |
25558 __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_from_dict, 473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 473, __pyx_L1_error) | |
25559 | |
25560 /* "pysam/libctabixproxies.pyx":499 | |
25561 * return super().__str__() | |
25562 * | |
25563 * def invert(self, int lcontig): # <<<<<<<<<<<<<< | |
25564 * '''invert coordinates to negative strand coordinates | |
25565 * | |
25566 */ | |
25567 __pyx_tuple__60 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_lcontig, __pyx_n_s_start, __pyx_n_s_end); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 499, __pyx_L1_error) | |
25568 __Pyx_GOTREF(__pyx_tuple__60); | |
25569 __Pyx_GIVEREF(__pyx_tuple__60); | |
25570 __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_invert, 499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 499, __pyx_L1_error) | |
25571 | |
25572 /* "pysam/libctabixproxies.pyx":510 | |
25573 * self.start, self.end = lcontig - end, lcontig - start | |
25574 * | |
25575 * def keys(self): # <<<<<<<<<<<<<< | |
25576 * '''return a list of attributes defined in this entry.''' | |
25577 * if not self.attribute_dict: | |
25578 */ | |
25579 __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_keys, 510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 510, __pyx_L1_error) | |
25580 | |
25581 /* "pysam/libctabixproxies.pyx":520 | |
25582 * return self.__getattr__(key) | |
25583 * | |
25584 * def setAttribute(self, name, value): # <<<<<<<<<<<<<< | |
25585 * '''convenience method to set an attribute. | |
25586 * ''' | |
25587 */ | |
25588 __pyx_tuple__63 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 520, __pyx_L1_error) | |
25589 __Pyx_GOTREF(__pyx_tuple__63); | |
25590 __Pyx_GIVEREF(__pyx_tuple__63); | |
25591 __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_setAttribute, 520, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 520, __pyx_L1_error) | |
25592 | |
25593 /* "pysam/libctabixproxies.pyx":529 | |
25594 * self.is_modified = True | |
25595 * | |
25596 * def attribute_string2dict(self, s): # <<<<<<<<<<<<<< | |
25597 * return collections.OrderedDict( | |
25598 * self.attribute_string2iterator(s)) | |
25599 */ | |
25600 __pyx_tuple__65 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_s_2); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 529, __pyx_L1_error) | |
25601 __Pyx_GOTREF(__pyx_tuple__65); | |
25602 __Pyx_GIVEREF(__pyx_tuple__65); | |
25603 __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_attribute_string2dict, 529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 529, __pyx_L1_error) | |
25604 | |
25605 /* "pysam/libctabixproxies.pyx":553 | |
25606 * raise NotImplementedError(err_msg) | |
25607 * | |
25608 * def dict2attribute_string(self, d): # <<<<<<<<<<<<<< | |
25609 * """convert dictionary to attribute string in GTF format. | |
25610 * | |
25611 */ | |
25612 __pyx_tuple__67 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_d, __pyx_n_s_aa, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 553, __pyx_L1_error) | |
25613 __Pyx_GOTREF(__pyx_tuple__67); | |
25614 __Pyx_GIVEREF(__pyx_tuple__67); | |
25615 __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_dict2attribute_string, 553, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 553, __pyx_L1_error) | |
25616 | |
25617 /* "pysam/libctabixproxies.pyx":566 | |
25618 * return self.separator.join(aa) + ";" | |
25619 * | |
25620 * def attribute_string2iterator(self, s): # <<<<<<<<<<<<<< | |
25621 * """convert attribute string in GTF format to records | |
25622 * and iterate over key, value pairs. | |
25623 */ | |
25624 __pyx_tuple__69 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_s_2, __pyx_n_s_attributes, __pyx_n_s_fields, __pyx_n_s_f, __pyx_n_s_d, __pyx_n_s_n, __pyx_n_s_v, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 566, __pyx_L1_error) | |
25625 __Pyx_GOTREF(__pyx_tuple__69); | |
25626 __Pyx_GIVEREF(__pyx_tuple__69); | |
25627 __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_attribute_string2iterator, 566, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 566, __pyx_L1_error) | |
25628 | |
25629 /* "pysam/libctabixproxies.pyx":666 | |
25630 * | |
25631 * # for backwards compatibility | |
25632 * def asDict(self, *args, **kwargs): # <<<<<<<<<<<<<< | |
25633 * return self.to_dict(*args, **kwargs) | |
25634 * | |
25635 */ | |
25636 __pyx_tuple__70 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 666, __pyx_L1_error) | |
25637 __Pyx_GOTREF(__pyx_tuple__70); | |
25638 __Pyx_GIVEREF(__pyx_tuple__70); | |
25639 __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_asDict, 666, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 666, __pyx_L1_error) | |
25640 | |
25641 /* "pysam/libctabixproxies.pyx":669 | |
25642 * return self.to_dict(*args, **kwargs) | |
25643 * | |
25644 * def fromDict(self, *args, **kwargs): # <<<<<<<<<<<<<< | |
25645 * return self.from_dict(*args, **kwargs) | |
25646 * | |
25647 */ | |
25648 __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_fromDict, 669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 669, __pyx_L1_error) | |
25649 | |
25650 /* "(tree fragment)":1 | |
25651 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
25652 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25653 * def __setstate_cython__(self, __pyx_state): | |
25654 */ | |
25655 __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(1, 1, __pyx_L1_error) | |
25656 | |
25657 /* "(tree fragment)":3 | |
25658 * def __reduce_cython__(self): | |
25659 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25660 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
25661 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25662 */ | |
25663 __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(1, 3, __pyx_L1_error) | |
25664 | |
25665 /* "pysam/libctabixproxies.pyx":675 | |
25666 * cdef class GFF3Proxy(GTFProxy): | |
25667 * | |
25668 * def dict2attribute_string(self, d): # <<<<<<<<<<<<<< | |
25669 * """convert dictionary to attribute string.""" | |
25670 * return ";".join(["{}={}".format(k, v) for k, v in d.items()]) | |
25671 */ | |
25672 __pyx_tuple__75 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_d, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 675, __pyx_L1_error) | |
25673 __Pyx_GOTREF(__pyx_tuple__75); | |
25674 __Pyx_GIVEREF(__pyx_tuple__75); | |
25675 __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_dict2attribute_string, 675, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 675, __pyx_L1_error) | |
25676 | |
25677 /* "pysam/libctabixproxies.pyx":679 | |
25678 * return ";".join(["{}={}".format(k, v) for k, v in d.items()]) | |
25679 * | |
25680 * def attribute_string2iterator(self, s): # <<<<<<<<<<<<<< | |
25681 * """convert attribute string in GFF3 format to records | |
25682 * and iterate over key, value pairs. | |
25683 */ | |
25684 __pyx_tuple__77 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_s_2, __pyx_n_s_f, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 679, __pyx_L1_error) | |
25685 __Pyx_GOTREF(__pyx_tuple__77); | |
25686 __Pyx_GIVEREF(__pyx_tuple__77); | |
25687 __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_attribute_string2iterator, 679, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 679, __pyx_L1_error) | |
25688 | |
25689 /* "(tree fragment)":1 | |
25690 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
25691 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25692 * def __setstate_cython__(self, __pyx_state): | |
25693 */ | |
25694 __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(1, 1, __pyx_L1_error) | |
25695 | |
25696 /* "(tree fragment)":3 | |
25697 * def __reduce_cython__(self): | |
25698 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25699 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
25700 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25701 */ | |
25702 __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(1, 3, __pyx_L1_error) | |
25703 | |
25704 /* "pysam/libctabixproxies.pyx":722 | |
25705 * 'blockStarts': (11, str), } | |
25706 * | |
25707 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
25708 * '''return minimum number of fields.''' | |
25709 * return 3 | |
25710 */ | |
25711 __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_getMinFields, 722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 722, __pyx_L1_error) | |
25712 | |
25713 /* "pysam/libctabixproxies.pyx":726 | |
25714 * return 3 | |
25715 * | |
25716 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
25717 * '''return max number of fields.''' | |
25718 * return 12 | |
25719 */ | |
25720 __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabixproxies_pyx, __pyx_n_s_getMaxFields, 726, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 726, __pyx_L1_error) | |
25721 | |
25722 /* "(tree fragment)":1 | |
25723 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
25724 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25725 * def __setstate_cython__(self, __pyx_state): | |
25726 */ | |
25727 __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(1, 1, __pyx_L1_error) | |
25728 | |
25729 /* "(tree fragment)":3 | |
25730 * def __reduce_cython__(self): | |
25731 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25732 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
25733 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25734 */ | |
25735 __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(1, 3, __pyx_L1_error) | |
25736 | |
25737 /* "(tree fragment)":1 | |
25738 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
25739 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25740 * def __setstate_cython__(self, __pyx_state): | |
25741 */ | |
25742 __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(1, 1, __pyx_L1_error) | |
25743 | |
25744 /* "(tree fragment)":3 | |
25745 * def __reduce_cython__(self): | |
25746 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25747 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
25748 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
25749 */ | |
25750 __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(1, 3, __pyx_L1_error) | |
25751 | |
25752 /* "(tree fragment)":1 | |
25753 * def __pyx_unpickle_TupleProxyIterator(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< | |
25754 * cdef object __pyx_PickleError | |
25755 * cdef object __pyx_result | |
25756 */ | |
25757 __pyx_tuple__86 = 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__86)) __PYX_ERR(1, 1, __pyx_L1_error) | |
25758 __Pyx_GOTREF(__pyx_tuple__86); | |
25759 __Pyx_GIVEREF(__pyx_tuple__86); | |
25760 __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TupleProxyIterato, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(1, 1, __pyx_L1_error) | |
25761 __Pyx_RefNannyFinishContext(); | |
25762 return 0; | |
25763 __pyx_L1_error:; | |
25764 __Pyx_RefNannyFinishContext(); | |
25765 return -1; | |
25766 } | |
25767 /* #### Code section: init_constants ### */ | |
25768 | |
25769 static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { | |
25770 if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error); | |
25771 __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25772 __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25773 __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25774 __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25775 __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25776 __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25777 __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25778 __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25779 __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25780 __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25781 __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25782 __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25783 __pyx_int_15441160 = PyInt_FromLong(15441160L); if (unlikely(!__pyx_int_15441160)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25784 __pyx_int_101682796 = PyInt_FromLong(101682796L); if (unlikely(!__pyx_int_101682796)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25785 __pyx_int_219412876 = PyInt_FromLong(219412876L); if (unlikely(!__pyx_int_219412876)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25786 __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error) | |
25787 return 0; | |
25788 __pyx_L1_error:; | |
25789 return -1; | |
25790 } | |
25791 /* #### Code section: init_globals ### */ | |
25792 | |
25793 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { | |
25794 /* AssertionsEnabled.init */ | |
25795 if (likely(__Pyx_init_assertions_enabled() == 0)); else | |
25796 | |
25797 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) | |
25798 | |
25799 return 0; | |
25800 __pyx_L1_error:; | |
25801 return -1; | |
25802 } | |
25803 /* #### Code section: init_module ### */ | |
25804 | |
25805 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ | |
25806 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ | |
25807 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ | |
25808 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ | |
25809 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ | |
25810 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ | |
25811 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ | |
25812 | |
25813 static int __Pyx_modinit_global_init_code(void) { | |
25814 __Pyx_RefNannyDeclarations | |
25815 __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); | |
25816 /*--- Global init code ---*/ | |
25817 __Pyx_RefNannyFinishContext(); | |
25818 return 0; | |
25819 } | |
25820 | |
25821 static int __Pyx_modinit_variable_export_code(void) { | |
25822 __Pyx_RefNannyDeclarations | |
25823 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); | |
25824 /*--- Variable export code ---*/ | |
25825 __Pyx_RefNannyFinishContext(); | |
25826 return 0; | |
25827 } | |
25828 | |
25829 static int __Pyx_modinit_function_export_code(void) { | |
25830 __Pyx_RefNannyDeclarations | |
25831 __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); | |
25832 /*--- Function export code ---*/ | |
25833 __Pyx_RefNannyFinishContext(); | |
25834 return 0; | |
25835 } | |
25836 | |
25837 static int __Pyx_modinit_type_init_code(void) { | |
25838 __Pyx_RefNannyDeclarations | |
25839 PyObject *__pyx_t_1 = NULL; | |
25840 int __pyx_lineno = 0; | |
25841 const char *__pyx_filename = NULL; | |
25842 int __pyx_clineno = 0; | |
25843 __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); | |
25844 /*--- Type init code ---*/ | |
25845 __pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy = &__pyx_vtable_5pysam_16libctabixproxies_TupleProxy; | |
25846 __pyx_vtable_5pysam_16libctabixproxies_TupleProxy.getMaxFields = (int (*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch))__pyx_f_5pysam_16libctabixproxies_10TupleProxy_getMaxFields; | |
25847 __pyx_vtable_5pysam_16libctabixproxies_TupleProxy.getMinFields = (int (*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch))__pyx_f_5pysam_16libctabixproxies_10TupleProxy_getMinFields; | |
25848 __pyx_vtable_5pysam_16libctabixproxies_TupleProxy.take = (PyObject *(*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_16libctabixproxies_10TupleProxy_take; | |
25849 __pyx_vtable_5pysam_16libctabixproxies_TupleProxy.present = (PyObject *(*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_16libctabixproxies_10TupleProxy_present; | |
25850 __pyx_vtable_5pysam_16libctabixproxies_TupleProxy.copy = (PyObject *(*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t, struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy *__pyx_optional_args))__pyx_f_5pysam_16libctabixproxies_10TupleProxy_copy; | |
25851 __pyx_vtable_5pysam_16libctabixproxies_TupleProxy.update = (PyObject *(*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_16libctabixproxies_10TupleProxy_update; | |
25852 #if CYTHON_USE_TYPE_SPECS | |
25853 __pyx_ptype_5pysam_16libctabixproxies_TupleProxy = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_16libctabixproxies_TupleProxy_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_16libctabixproxies_TupleProxy)) __PYX_ERR(0, 31, __pyx_L1_error) | |
25854 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_16libctabixproxies_TupleProxy_spec, __pyx_ptype_5pysam_16libctabixproxies_TupleProxy) < 0) __PYX_ERR(0, 31, __pyx_L1_error) | |
25855 #else | |
25856 __pyx_ptype_5pysam_16libctabixproxies_TupleProxy = &__pyx_type_5pysam_16libctabixproxies_TupleProxy; | |
25857 #endif | |
25858 #if !CYTHON_COMPILING_IN_LIMITED_API | |
25859 #endif | |
25860 #if !CYTHON_USE_TYPE_SPECS | |
25861 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy) < 0) __PYX_ERR(0, 31, __pyx_L1_error) | |
25862 #endif | |
25863 #if PY_MAJOR_VERSION < 3 | |
25864 __pyx_ptype_5pysam_16libctabixproxies_TupleProxy->tp_print = 0; | |
25865 #endif | |
25866 #if !CYTHON_COMPILING_IN_LIMITED_API | |
25867 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_16libctabixproxies_TupleProxy->tp_dictoffset && __pyx_ptype_5pysam_16libctabixproxies_TupleProxy->tp_getattro == PyObject_GenericGetAttr)) { | |
25868 __pyx_ptype_5pysam_16libctabixproxies_TupleProxy->tp_getattro = __Pyx_PyObject_GenericGetAttr; | |
25869 } | |
25870 #endif | |
25871 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
25872 { | |
25873 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 31, __pyx_L1_error) | |
25874 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { | |
25875 __pyx_wrapperbase_5pysam_16libctabixproxies_10TupleProxy_20__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base; | |
25876 __pyx_wrapperbase_5pysam_16libctabixproxies_10TupleProxy_20__setitem__.doc = __pyx_doc_5pysam_16libctabixproxies_10TupleProxy_20__setitem__; | |
25877 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_16libctabixproxies_10TupleProxy_20__setitem__; | |
25878 } | |
25879 } | |
25880 #endif | |
25881 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
25882 { | |
25883 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 31, __pyx_L1_error) | |
25884 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { | |
25885 __pyx_wrapperbase_5pysam_16libctabixproxies_10TupleProxy_26__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; | |
25886 __pyx_wrapperbase_5pysam_16libctabixproxies_10TupleProxy_26__str__.doc = __pyx_doc_5pysam_16libctabixproxies_10TupleProxy_26__str__; | |
25887 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_16libctabixproxies_10TupleProxy_26__str__; | |
25888 } | |
25889 } | |
25890 #endif | |
25891 if (__Pyx_SetVtable(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy, __pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy) < 0) __PYX_ERR(0, 31, __pyx_L1_error) | |
25892 #if !CYTHON_COMPILING_IN_LIMITED_API | |
25893 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy) < 0) __PYX_ERR(0, 31, __pyx_L1_error) | |
25894 #endif | |
25895 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TupleProxy, (PyObject *) __pyx_ptype_5pysam_16libctabixproxies_TupleProxy) < 0) __PYX_ERR(0, 31, __pyx_L1_error) | |
25896 #if !CYTHON_COMPILING_IN_LIMITED_API | |
25897 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_16libctabixproxies_TupleProxy) < 0) __PYX_ERR(0, 31, __pyx_L1_error) | |
25898 #endif | |
25899 #if CYTHON_USE_TYPE_SPECS | |
25900 __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_16libctabixproxies_TupleProxyIterator_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator)) __PYX_ERR(0, 329, __pyx_L1_error) | |
25901 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_16libctabixproxies_TupleProxyIterator_spec, __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator) < 0) __PYX_ERR(0, 329, __pyx_L1_error) | |
25902 #else | |
25903 __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator = &__pyx_type_5pysam_16libctabixproxies_TupleProxyIterator; | |
25904 #endif | |
25905 #if !CYTHON_COMPILING_IN_LIMITED_API | |
25906 #endif | |
25907 #if !CYTHON_USE_TYPE_SPECS | |
25908 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator) < 0) __PYX_ERR(0, 329, __pyx_L1_error) | |
25909 #endif | |
25910 #if PY_MAJOR_VERSION < 3 | |
25911 __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator->tp_print = 0; | |
25912 #endif | |
25913 #if !CYTHON_COMPILING_IN_LIMITED_API | |
25914 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator->tp_dictoffset && __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator->tp_getattro == PyObject_GenericGetAttr)) { | |
25915 __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr; | |
25916 } | |
25917 #endif | |
25918 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TupleProxyIterator, (PyObject *) __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator) < 0) __PYX_ERR(0, 329, __pyx_L1_error) | |
25919 #if !CYTHON_COMPILING_IN_LIMITED_API | |
25920 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator) < 0) __PYX_ERR(0, 329, __pyx_L1_error) | |
25921 #endif | |
25922 __pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy = &__pyx_vtable_5pysam_16libctabixproxies_NamedTupleProxy; | |
25923 __pyx_vtable_5pysam_16libctabixproxies_NamedTupleProxy.__pyx_base = *__pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy; | |
25924 #if CYTHON_USE_TYPE_SPECS | |
25925 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error) | |
25926 __Pyx_GOTREF(__pyx_t_1); | |
25927 __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_16libctabixproxies_NamedTupleProxy_spec, __pyx_t_1); | |
25928 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; | |
25929 if (unlikely(!__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy)) __PYX_ERR(0, 360, __pyx_L1_error) | |
25930 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_16libctabixproxies_NamedTupleProxy_spec, __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy) < 0) __PYX_ERR(0, 360, __pyx_L1_error) | |
25931 #else | |
25932 __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy = &__pyx_type_5pysam_16libctabixproxies_NamedTupleProxy; | |
25933 #endif | |
25934 #if !CYTHON_COMPILING_IN_LIMITED_API | |
25935 __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy->tp_base = __pyx_ptype_5pysam_16libctabixproxies_TupleProxy; | |
25936 #endif | |
25937 #if !CYTHON_USE_TYPE_SPECS | |
25938 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy) < 0) __PYX_ERR(0, 360, __pyx_L1_error) | |
25939 #endif | |
25940 #if PY_MAJOR_VERSION < 3 | |
25941 __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy->tp_print = 0; | |
25942 #endif | |
25943 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
25944 { | |
25945 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy, "__setattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 360, __pyx_L1_error) | |
25946 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { | |
25947 __pyx_wrapperbase_5pysam_16libctabixproxies_15NamedTupleProxy___setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base; | |
25948 __pyx_wrapperbase_5pysam_16libctabixproxies_15NamedTupleProxy___setattr__.doc = __pyx_doc_5pysam_16libctabixproxies_15NamedTupleProxy___setattr__; | |
25949 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_16libctabixproxies_15NamedTupleProxy___setattr__; | |
25950 } | |
25951 } | |
25952 #endif | |
25953 if (__Pyx_SetVtable(__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy, __pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy) < 0) __PYX_ERR(0, 360, __pyx_L1_error) | |
25954 #if !CYTHON_COMPILING_IN_LIMITED_API | |
25955 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy) < 0) __PYX_ERR(0, 360, __pyx_L1_error) | |
25956 #endif | |
25957 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NamedTupleProxy, (PyObject *) __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy) < 0) __PYX_ERR(0, 360, __pyx_L1_error) | |
25958 #if !CYTHON_COMPILING_IN_LIMITED_API | |
25959 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy) < 0) __PYX_ERR(0, 360, __pyx_L1_error) | |
25960 #endif | |
25961 __pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy = &__pyx_vtable_5pysam_16libctabixproxies_GTFProxy; | |
25962 __pyx_vtable_5pysam_16libctabixproxies_GTFProxy.__pyx_base = *__pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy; | |
25963 __pyx_vtable_5pysam_16libctabixproxies_GTFProxy.__pyx_base.__pyx_base.getMaxFields = (int (*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch))__pyx_f_5pysam_16libctabixproxies_8GTFProxy_getMaxFields; | |
25964 __pyx_vtable_5pysam_16libctabixproxies_GTFProxy.__pyx_base.__pyx_base.getMinFields = (int (*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch))__pyx_f_5pysam_16libctabixproxies_8GTFProxy_getMinFields; | |
25965 #if CYTHON_USE_TYPE_SPECS | |
25966 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error) | |
25967 __Pyx_GOTREF(__pyx_t_1); | |
25968 __pyx_ptype_5pysam_16libctabixproxies_GTFProxy = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_16libctabixproxies_GTFProxy_spec, __pyx_t_1); | |
25969 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; | |
25970 if (unlikely(!__pyx_ptype_5pysam_16libctabixproxies_GTFProxy)) __PYX_ERR(0, 415, __pyx_L1_error) | |
25971 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_16libctabixproxies_GTFProxy_spec, __pyx_ptype_5pysam_16libctabixproxies_GTFProxy) < 0) __PYX_ERR(0, 415, __pyx_L1_error) | |
25972 #else | |
25973 __pyx_ptype_5pysam_16libctabixproxies_GTFProxy = &__pyx_type_5pysam_16libctabixproxies_GTFProxy; | |
25974 #endif | |
25975 #if !CYTHON_COMPILING_IN_LIMITED_API | |
25976 __pyx_ptype_5pysam_16libctabixproxies_GTFProxy->tp_base = __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy; | |
25977 #endif | |
25978 #if !CYTHON_USE_TYPE_SPECS | |
25979 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy) < 0) __PYX_ERR(0, 415, __pyx_L1_error) | |
25980 #endif | |
25981 #if PY_MAJOR_VERSION < 3 | |
25982 __pyx_ptype_5pysam_16libctabixproxies_GTFProxy->tp_print = 0; | |
25983 #endif | |
25984 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
25985 { | |
25986 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 415, __pyx_L1_error) | |
25987 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { | |
25988 __pyx_wrapperbase_5pysam_16libctabixproxies_8GTFProxy_33__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base; | |
25989 __pyx_wrapperbase_5pysam_16libctabixproxies_8GTFProxy_33__getattr__.doc = __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_33__getattr__; | |
25990 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_16libctabixproxies_8GTFProxy_33__getattr__; | |
25991 } | |
25992 } | |
25993 #endif | |
25994 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
25995 { | |
25996 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, "__setattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 415, __pyx_L1_error) | |
25997 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { | |
25998 __pyx_wrapperbase_5pysam_16libctabixproxies_8GTFProxy_35__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base; | |
25999 __pyx_wrapperbase_5pysam_16libctabixproxies_8GTFProxy_35__setattr__.doc = __pyx_doc_5pysam_16libctabixproxies_8GTFProxy_35__setattr__; | |
26000 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_16libctabixproxies_8GTFProxy_35__setattr__; | |
26001 } | |
26002 } | |
26003 #endif | |
26004 if (__Pyx_SetVtable(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy) < 0) __PYX_ERR(0, 415, __pyx_L1_error) | |
26005 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26006 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy) < 0) __PYX_ERR(0, 415, __pyx_L1_error) | |
26007 #endif | |
26008 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GTFProxy, (PyObject *) __pyx_ptype_5pysam_16libctabixproxies_GTFProxy) < 0) __PYX_ERR(0, 415, __pyx_L1_error) | |
26009 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26010 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_16libctabixproxies_GTFProxy) < 0) __PYX_ERR(0, 415, __pyx_L1_error) | |
26011 #endif | |
26012 __pyx_vtabptr_5pysam_16libctabixproxies_GFF3Proxy = &__pyx_vtable_5pysam_16libctabixproxies_GFF3Proxy; | |
26013 __pyx_vtable_5pysam_16libctabixproxies_GFF3Proxy.__pyx_base = *__pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy; | |
26014 #if CYTHON_USE_TYPE_SPECS | |
26015 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error) | |
26016 __Pyx_GOTREF(__pyx_t_1); | |
26017 __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_16libctabixproxies_GFF3Proxy_spec, __pyx_t_1); | |
26018 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; | |
26019 if (unlikely(!__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy)) __PYX_ERR(0, 673, __pyx_L1_error) | |
26020 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_16libctabixproxies_GFF3Proxy_spec, __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy) < 0) __PYX_ERR(0, 673, __pyx_L1_error) | |
26021 #else | |
26022 __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy = &__pyx_type_5pysam_16libctabixproxies_GFF3Proxy; | |
26023 #endif | |
26024 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26025 __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy->tp_base = __pyx_ptype_5pysam_16libctabixproxies_GTFProxy; | |
26026 #endif | |
26027 #if !CYTHON_USE_TYPE_SPECS | |
26028 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy) < 0) __PYX_ERR(0, 673, __pyx_L1_error) | |
26029 #endif | |
26030 #if PY_MAJOR_VERSION < 3 | |
26031 __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy->tp_print = 0; | |
26032 #endif | |
26033 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26034 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy->tp_dictoffset && __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy->tp_getattro == PyObject_GenericGetAttr)) { | |
26035 __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy->tp_getattro = __Pyx_PyObject_GenericGetAttr; | |
26036 } | |
26037 #endif | |
26038 if (__Pyx_SetVtable(__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy, __pyx_vtabptr_5pysam_16libctabixproxies_GFF3Proxy) < 0) __PYX_ERR(0, 673, __pyx_L1_error) | |
26039 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26040 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy) < 0) __PYX_ERR(0, 673, __pyx_L1_error) | |
26041 #endif | |
26042 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GFF3Proxy, (PyObject *) __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy) < 0) __PYX_ERR(0, 673, __pyx_L1_error) | |
26043 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26044 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy) < 0) __PYX_ERR(0, 673, __pyx_L1_error) | |
26045 #endif | |
26046 __pyx_vtabptr_5pysam_16libctabixproxies_BedProxy = &__pyx_vtable_5pysam_16libctabixproxies_BedProxy; | |
26047 __pyx_vtable_5pysam_16libctabixproxies_BedProxy.__pyx_base = *__pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy; | |
26048 __pyx_vtable_5pysam_16libctabixproxies_BedProxy.__pyx_base.__pyx_base.getMaxFields = (int (*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch))__pyx_f_5pysam_16libctabixproxies_8BedProxy_getMaxFields; | |
26049 __pyx_vtable_5pysam_16libctabixproxies_BedProxy.__pyx_base.__pyx_base.getMinFields = (int (*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch))__pyx_f_5pysam_16libctabixproxies_8BedProxy_getMinFields; | |
26050 __pyx_vtable_5pysam_16libctabixproxies_BedProxy.__pyx_base.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_16libctabixproxies_8BedProxy_update; | |
26051 #if CYTHON_USE_TYPE_SPECS | |
26052 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error) | |
26053 __Pyx_GOTREF(__pyx_t_1); | |
26054 __pyx_ptype_5pysam_16libctabixproxies_BedProxy = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_16libctabixproxies_BedProxy_spec, __pyx_t_1); | |
26055 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; | |
26056 if (unlikely(!__pyx_ptype_5pysam_16libctabixproxies_BedProxy)) __PYX_ERR(0, 703, __pyx_L1_error) | |
26057 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_16libctabixproxies_BedProxy_spec, __pyx_ptype_5pysam_16libctabixproxies_BedProxy) < 0) __PYX_ERR(0, 703, __pyx_L1_error) | |
26058 #else | |
26059 __pyx_ptype_5pysam_16libctabixproxies_BedProxy = &__pyx_type_5pysam_16libctabixproxies_BedProxy; | |
26060 #endif | |
26061 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26062 __pyx_ptype_5pysam_16libctabixproxies_BedProxy->tp_base = __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy; | |
26063 #endif | |
26064 #if !CYTHON_USE_TYPE_SPECS | |
26065 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_16libctabixproxies_BedProxy) < 0) __PYX_ERR(0, 703, __pyx_L1_error) | |
26066 #endif | |
26067 #if PY_MAJOR_VERSION < 3 | |
26068 __pyx_ptype_5pysam_16libctabixproxies_BedProxy->tp_print = 0; | |
26069 #endif | |
26070 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26071 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_16libctabixproxies_BedProxy->tp_dictoffset && __pyx_ptype_5pysam_16libctabixproxies_BedProxy->tp_getattro == PyObject_GenericGetAttr)) { | |
26072 __pyx_ptype_5pysam_16libctabixproxies_BedProxy->tp_getattro = __Pyx_PyObject_GenericGetAttr; | |
26073 } | |
26074 #endif | |
26075 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
26076 { | |
26077 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_BedProxy, "__setattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 703, __pyx_L1_error) | |
26078 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { | |
26079 __pyx_wrapperbase_5pysam_16libctabixproxies_8BedProxy_6__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base; | |
26080 __pyx_wrapperbase_5pysam_16libctabixproxies_8BedProxy_6__setattr__.doc = __pyx_doc_5pysam_16libctabixproxies_8BedProxy_6__setattr__; | |
26081 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_16libctabixproxies_8BedProxy_6__setattr__; | |
26082 } | |
26083 } | |
26084 #endif | |
26085 if (__Pyx_SetVtable(__pyx_ptype_5pysam_16libctabixproxies_BedProxy, __pyx_vtabptr_5pysam_16libctabixproxies_BedProxy) < 0) __PYX_ERR(0, 703, __pyx_L1_error) | |
26086 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26087 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_16libctabixproxies_BedProxy) < 0) __PYX_ERR(0, 703, __pyx_L1_error) | |
26088 #endif | |
26089 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BedProxy, (PyObject *) __pyx_ptype_5pysam_16libctabixproxies_BedProxy) < 0) __PYX_ERR(0, 703, __pyx_L1_error) | |
26090 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26091 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_16libctabixproxies_BedProxy) < 0) __PYX_ERR(0, 703, __pyx_L1_error) | |
26092 #endif | |
26093 __pyx_vtabptr_5pysam_16libctabixproxies_VCFProxy = &__pyx_vtable_5pysam_16libctabixproxies_VCFProxy; | |
26094 __pyx_vtable_5pysam_16libctabixproxies_VCFProxy.__pyx_base = *__pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy; | |
26095 __pyx_vtable_5pysam_16libctabixproxies_VCFProxy.__pyx_base.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_16libctabixproxies_8VCFProxy_update; | |
26096 #if CYTHON_USE_TYPE_SPECS | |
26097 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error) | |
26098 __Pyx_GOTREF(__pyx_t_1); | |
26099 __pyx_ptype_5pysam_16libctabixproxies_VCFProxy = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_16libctabixproxies_VCFProxy_spec, __pyx_t_1); | |
26100 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; | |
26101 if (unlikely(!__pyx_ptype_5pysam_16libctabixproxies_VCFProxy)) __PYX_ERR(0, 776, __pyx_L1_error) | |
26102 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_16libctabixproxies_VCFProxy_spec, __pyx_ptype_5pysam_16libctabixproxies_VCFProxy) < 0) __PYX_ERR(0, 776, __pyx_L1_error) | |
26103 #else | |
26104 __pyx_ptype_5pysam_16libctabixproxies_VCFProxy = &__pyx_type_5pysam_16libctabixproxies_VCFProxy; | |
26105 #endif | |
26106 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26107 __pyx_ptype_5pysam_16libctabixproxies_VCFProxy->tp_base = __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy; | |
26108 #endif | |
26109 #if !CYTHON_USE_TYPE_SPECS | |
26110 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_16libctabixproxies_VCFProxy) < 0) __PYX_ERR(0, 776, __pyx_L1_error) | |
26111 #endif | |
26112 #if PY_MAJOR_VERSION < 3 | |
26113 __pyx_ptype_5pysam_16libctabixproxies_VCFProxy->tp_print = 0; | |
26114 #endif | |
26115 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26116 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_16libctabixproxies_VCFProxy->tp_dictoffset && __pyx_ptype_5pysam_16libctabixproxies_VCFProxy->tp_getattro == PyObject_GenericGetAttr)) { | |
26117 __pyx_ptype_5pysam_16libctabixproxies_VCFProxy->tp_getattro = __Pyx_PyObject_GenericGetAttr; | |
26118 } | |
26119 #endif | |
26120 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
26121 { | |
26122 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_VCFProxy, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 776, __pyx_L1_error) | |
26123 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { | |
26124 __pyx_wrapperbase_5pysam_16libctabixproxies_8VCFProxy_2__len__ = *((PyWrapperDescrObject *)wrapper)->d_base; | |
26125 __pyx_wrapperbase_5pysam_16libctabixproxies_8VCFProxy_2__len__.doc = __pyx_doc_5pysam_16libctabixproxies_8VCFProxy_2__len__; | |
26126 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_16libctabixproxies_8VCFProxy_2__len__; | |
26127 } | |
26128 } | |
26129 #endif | |
26130 #if CYTHON_UPDATE_DESCRIPTOR_DOC | |
26131 { | |
26132 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_VCFProxy, "__setattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 776, __pyx_L1_error) | |
26133 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { | |
26134 __pyx_wrapperbase_5pysam_16libctabixproxies_8VCFProxy_4__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base; | |
26135 __pyx_wrapperbase_5pysam_16libctabixproxies_8VCFProxy_4__setattr__.doc = __pyx_doc_5pysam_16libctabixproxies_8VCFProxy_4__setattr__; | |
26136 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_16libctabixproxies_8VCFProxy_4__setattr__; | |
26137 } | |
26138 } | |
26139 #endif | |
26140 if (__Pyx_SetVtable(__pyx_ptype_5pysam_16libctabixproxies_VCFProxy, __pyx_vtabptr_5pysam_16libctabixproxies_VCFProxy) < 0) __PYX_ERR(0, 776, __pyx_L1_error) | |
26141 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26142 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_16libctabixproxies_VCFProxy) < 0) __PYX_ERR(0, 776, __pyx_L1_error) | |
26143 #endif | |
26144 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VCFProxy, (PyObject *) __pyx_ptype_5pysam_16libctabixproxies_VCFProxy) < 0) __PYX_ERR(0, 776, __pyx_L1_error) | |
26145 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26146 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_16libctabixproxies_VCFProxy) < 0) __PYX_ERR(0, 776, __pyx_L1_error) | |
26147 #endif | |
26148 #if CYTHON_USE_TYPE_SPECS | |
26149 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator)) __PYX_ERR(0, 566, __pyx_L1_error) | |
26150 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator_spec, __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator) < 0) __PYX_ERR(0, 566, __pyx_L1_error) | |
26151 #else | |
26152 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator = &__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator; | |
26153 #endif | |
26154 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26155 #endif | |
26156 #if !CYTHON_USE_TYPE_SPECS | |
26157 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator) < 0) __PYX_ERR(0, 566, __pyx_L1_error) | |
26158 #endif | |
26159 #if PY_MAJOR_VERSION < 3 | |
26160 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator->tp_print = 0; | |
26161 #endif | |
26162 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26163 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator->tp_dictoffset && __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator->tp_getattro == PyObject_GenericGetAttr)) { | |
26164 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct__attribute_string2iterator->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; | |
26165 } | |
26166 #endif | |
26167 #if CYTHON_USE_TYPE_SPECS | |
26168 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator)) __PYX_ERR(0, 679, __pyx_L1_error) | |
26169 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator_spec, __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator) < 0) __PYX_ERR(0, 679, __pyx_L1_error) | |
26170 #else | |
26171 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator = &__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator; | |
26172 #endif | |
26173 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26174 #endif | |
26175 #if !CYTHON_USE_TYPE_SPECS | |
26176 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator) < 0) __PYX_ERR(0, 679, __pyx_L1_error) | |
26177 #endif | |
26178 #if PY_MAJOR_VERSION < 3 | |
26179 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator->tp_print = 0; | |
26180 #endif | |
26181 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26182 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator->tp_dictoffset && __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator->tp_getattro == PyObject_GenericGetAttr)) { | |
26183 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_1_attribute_string2iterator->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; | |
26184 } | |
26185 #endif | |
26186 #if CYTHON_USE_TYPE_SPECS | |
26187 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 684, __pyx_L1_error) | |
26188 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr_spec, __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 684, __pyx_L1_error) | |
26189 #else | |
26190 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr = &__pyx_type_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr; | |
26191 #endif | |
26192 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26193 #endif | |
26194 #if !CYTHON_USE_TYPE_SPECS | |
26195 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 684, __pyx_L1_error) | |
26196 #endif | |
26197 #if PY_MAJOR_VERSION < 3 | |
26198 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr->tp_print = 0; | |
26199 #endif | |
26200 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26201 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr->tp_dictoffset && __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr->tp_getattro == PyObject_GenericGetAttr)) { | |
26202 __pyx_ptype_5pysam_16libctabixproxies___pyx_scope_struct_2_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; | |
26203 } | |
26204 #endif | |
26205 #if CYTHON_USE_TYPE_SPECS | |
26206 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_spec, NULL); if (unlikely(!__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v)) __PYX_ERR(1, 66, __pyx_L1_error) | |
26207 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v_spec, __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v) < 0) __PYX_ERR(1, 66, __pyx_L1_error) | |
26208 #else | |
26209 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v = &__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v; | |
26210 #endif | |
26211 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26212 #endif | |
26213 #if !CYTHON_USE_TYPE_SPECS | |
26214 if (__Pyx_PyType_Ready(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v) < 0) __PYX_ERR(1, 66, __pyx_L1_error) | |
26215 #endif | |
26216 #if PY_MAJOR_VERSION < 3 | |
26217 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v->tp_print = 0; | |
26218 #endif | |
26219 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26220 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v->tp_dictoffset && __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v->tp_getattro == PyObject_GenericGetAttr)) { | |
26221 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; | |
26222 } | |
26223 #endif | |
26224 #if CYTHON_USE_TYPE_SPECS | |
26225 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_spec, NULL); if (unlikely(!__pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v)) __PYX_ERR(1, 66, __pyx_L1_error) | |
26226 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v_spec, __pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v) < 0) __PYX_ERR(1, 66, __pyx_L1_error) | |
26227 #else | |
26228 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v = &__pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v; | |
26229 #endif | |
26230 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26231 #endif | |
26232 #if !CYTHON_USE_TYPE_SPECS | |
26233 if (__Pyx_PyType_Ready(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v) < 0) __PYX_ERR(1, 66, __pyx_L1_error) | |
26234 #endif | |
26235 #if PY_MAJOR_VERSION < 3 | |
26236 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v->tp_print = 0; | |
26237 #endif | |
26238 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26239 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v->tp_dictoffset && __pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v->tp_getattro == PyObject_GenericGetAttr)) { | |
26240 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; | |
26241 } | |
26242 #endif | |
26243 #if CYTHON_USE_TYPE_SPECS | |
26244 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_spec, NULL); if (unlikely(!__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v)) __PYX_ERR(1, 66, __pyx_L1_error) | |
26245 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v_spec, __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v) < 0) __PYX_ERR(1, 66, __pyx_L1_error) | |
26246 #else | |
26247 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v = &__pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v; | |
26248 #endif | |
26249 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26250 #endif | |
26251 #if !CYTHON_USE_TYPE_SPECS | |
26252 if (__Pyx_PyType_Ready(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v) < 0) __PYX_ERR(1, 66, __pyx_L1_error) | |
26253 #endif | |
26254 #if PY_MAJOR_VERSION < 3 | |
26255 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v->tp_print = 0; | |
26256 #endif | |
26257 #if !CYTHON_COMPILING_IN_LIMITED_API | |
26258 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v->tp_dictoffset && __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v->tp_getattro == PyObject_GenericGetAttr)) { | |
26259 __pyx_ptype___pyx_scope_struct____Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; | |
26260 } | |
26261 #endif | |
26262 __Pyx_RefNannyFinishContext(); | |
26263 return 0; | |
26264 __pyx_L1_error:; | |
26265 __Pyx_XDECREF(__pyx_t_1); | |
26266 __Pyx_RefNannyFinishContext(); | |
26267 return -1; | |
26268 } | |
26269 | |
26270 static int __Pyx_modinit_type_import_code(void) { | |
26271 __Pyx_RefNannyDeclarations | |
26272 PyObject *__pyx_t_1 = NULL; | |
26273 int __pyx_lineno = 0; | |
26274 const char *__pyx_filename = NULL; | |
26275 int __pyx_clineno = 0; | |
26276 __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); | |
26277 /*--- Type import code ---*/ | |
26278 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error) | |
26279 __Pyx_GOTREF(__pyx_t_1); | |
26280 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", | |
26281 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 | |
26282 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), | |
26283 #elif CYTHON_COMPILING_IN_LIMITED_API | |
26284 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), | |
26285 #else | |
26286 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject), | |
26287 #endif | |
26288 __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error) | |
26289 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
26290 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8, __pyx_L1_error) | |
26291 __Pyx_GOTREF(__pyx_t_1); | |
26292 __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyBoolObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(5, 8, __pyx_L1_error) | |
26293 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
26294 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 15, __pyx_L1_error) | |
26295 __Pyx_GOTREF(__pyx_t_1); | |
26296 __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyComplexObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(6, 15, __pyx_L1_error) | |
26297 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
26298 __pyx_t_1 = PyImport_ImportModule("array"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 69, __pyx_L1_error) | |
26299 __Pyx_GOTREF(__pyx_t_1); | |
26300 __pyx_ptype_7cpython_5array_array = __Pyx_ImportType_3_0_11(__pyx_t_1, "array", "array", sizeof(arrayobject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(arrayobject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_5array_array) __PYX_ERR(3, 69, __pyx_L1_error) | |
26301 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
26302 __Pyx_RefNannyFinishContext(); | |
26303 return 0; | |
26304 __pyx_L1_error:; | |
26305 __Pyx_XDECREF(__pyx_t_1); | |
26306 __Pyx_RefNannyFinishContext(); | |
26307 return -1; | |
26308 } | |
26309 | |
26310 static int __Pyx_modinit_variable_import_code(void) { | |
26311 __Pyx_RefNannyDeclarations | |
26312 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); | |
26313 /*--- Variable import code ---*/ | |
26314 __Pyx_RefNannyFinishContext(); | |
26315 return 0; | |
26316 } | |
26317 | |
26318 static int __Pyx_modinit_function_import_code(void) { | |
26319 __Pyx_RefNannyDeclarations | |
26320 PyObject *__pyx_t_1 = NULL; | |
26321 int __pyx_lineno = 0; | |
26322 const char *__pyx_filename = NULL; | |
26323 int __pyx_clineno = 0; | |
26324 __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); | |
26325 /*--- Function import code ---*/ | |
26326 __pyx_t_1 = PyImport_ImportModule("pysam.libcutils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) | |
26327 __Pyx_GOTREF(__pyx_t_1); | |
26328 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "charptr_to_str", (void (**)(void))&__pyx_f_5pysam_9libcutils_charptr_to_str, "PyObject *(char const *, struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26329 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "force_str", (void (**)(void))&__pyx_f_5pysam_9libcutils_force_str, "PyObject *(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_str *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26330 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "force_bytes", (void (**)(void))&__pyx_f_5pysam_9libcutils_force_bytes, "PyObject *(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_bytes *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26331 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "encode_filename", (void (**)(void))&__pyx_f_5pysam_9libcutils_encode_filename, "PyObject *(PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26332 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "from_string_and_size", (void (**)(void))&__pyx_f_5pysam_9libcutils_from_string_and_size, "PyObject *(char const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26333 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; | |
26334 __Pyx_RefNannyFinishContext(); | |
26335 return 0; | |
26336 __pyx_L1_error:; | |
26337 __Pyx_XDECREF(__pyx_t_1); | |
26338 __Pyx_RefNannyFinishContext(); | |
26339 return -1; | |
26340 } | |
26341 | |
26342 | |
26343 #if PY_MAJOR_VERSION >= 3 | |
26344 #if CYTHON_PEP489_MULTI_PHASE_INIT | |
26345 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ | |
26346 static int __pyx_pymod_exec_libctabixproxies(PyObject* module); /*proto*/ | |
26347 static PyModuleDef_Slot __pyx_moduledef_slots[] = { | |
26348 {Py_mod_create, (void*)__pyx_pymod_create}, | |
26349 {Py_mod_exec, (void*)__pyx_pymod_exec_libctabixproxies}, | |
26350 {0, NULL} | |
26351 }; | |
26352 #endif | |
26353 | |
26354 #ifdef __cplusplus | |
26355 namespace { | |
26356 struct PyModuleDef __pyx_moduledef = | |
26357 #else | |
26358 static struct PyModuleDef __pyx_moduledef = | |
26359 #endif | |
26360 { | |
26361 PyModuleDef_HEAD_INIT, | |
26362 "libctabixproxies", | |
26363 0, /* m_doc */ | |
26364 #if CYTHON_PEP489_MULTI_PHASE_INIT | |
26365 0, /* m_size */ | |
26366 #elif CYTHON_USE_MODULE_STATE | |
26367 sizeof(__pyx_mstate), /* m_size */ | |
26368 #else | |
26369 -1, /* m_size */ | |
26370 #endif | |
26371 __pyx_methods /* m_methods */, | |
26372 #if CYTHON_PEP489_MULTI_PHASE_INIT | |
26373 __pyx_moduledef_slots, /* m_slots */ | |
26374 #else | |
26375 NULL, /* m_reload */ | |
26376 #endif | |
26377 #if CYTHON_USE_MODULE_STATE | |
26378 __pyx_m_traverse, /* m_traverse */ | |
26379 __pyx_m_clear, /* m_clear */ | |
26380 NULL /* m_free */ | |
26381 #else | |
26382 NULL, /* m_traverse */ | |
26383 NULL, /* m_clear */ | |
26384 NULL /* m_free */ | |
26385 #endif | |
26386 }; | |
26387 #ifdef __cplusplus | |
26388 } /* anonymous namespace */ | |
26389 #endif | |
26390 #endif | |
26391 | |
26392 #ifndef CYTHON_NO_PYINIT_EXPORT | |
26393 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC | |
26394 #elif PY_MAJOR_VERSION < 3 | |
26395 #ifdef __cplusplus | |
26396 #define __Pyx_PyMODINIT_FUNC extern "C" void | |
26397 #else | |
26398 #define __Pyx_PyMODINIT_FUNC void | |
26399 #endif | |
26400 #else | |
26401 #ifdef __cplusplus | |
26402 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * | |
26403 #else | |
26404 #define __Pyx_PyMODINIT_FUNC PyObject * | |
26405 #endif | |
26406 #endif | |
26407 | |
26408 | |
26409 #if PY_MAJOR_VERSION < 3 | |
26410 __Pyx_PyMODINIT_FUNC initlibctabixproxies(void) CYTHON_SMALL_CODE; /*proto*/ | |
26411 __Pyx_PyMODINIT_FUNC initlibctabixproxies(void) | |
26412 #else | |
26413 __Pyx_PyMODINIT_FUNC PyInit_libctabixproxies(void) CYTHON_SMALL_CODE; /*proto*/ | |
26414 __Pyx_PyMODINIT_FUNC PyInit_libctabixproxies(void) | |
26415 #if CYTHON_PEP489_MULTI_PHASE_INIT | |
26416 { | |
26417 return PyModuleDef_Init(&__pyx_moduledef); | |
26418 } | |
26419 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { | |
26420 #if PY_VERSION_HEX >= 0x030700A1 | |
26421 static PY_INT64_T main_interpreter_id = -1; | |
26422 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); | |
26423 if (main_interpreter_id == -1) { | |
26424 main_interpreter_id = current_id; | |
26425 return (unlikely(current_id == -1)) ? -1 : 0; | |
26426 } else if (unlikely(main_interpreter_id != current_id)) | |
26427 #else | |
26428 static PyInterpreterState *main_interpreter = NULL; | |
26429 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; | |
26430 if (!main_interpreter) { | |
26431 main_interpreter = current_interpreter; | |
26432 } else if (unlikely(main_interpreter != current_interpreter)) | |
26433 #endif | |
26434 { | |
26435 PyErr_SetString( | |
26436 PyExc_ImportError, | |
26437 "Interpreter change detected - this module can only be loaded into one interpreter per process."); | |
26438 return -1; | |
26439 } | |
26440 return 0; | |
26441 } | |
26442 #if CYTHON_COMPILING_IN_LIMITED_API | |
26443 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) | |
26444 #else | |
26445 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) | |
26446 #endif | |
26447 { | |
26448 PyObject *value = PyObject_GetAttrString(spec, from_name); | |
26449 int result = 0; | |
26450 if (likely(value)) { | |
26451 if (allow_none || value != Py_None) { | |
26452 #if CYTHON_COMPILING_IN_LIMITED_API | |
26453 result = PyModule_AddObject(module, to_name, value); | |
26454 #else | |
26455 result = PyDict_SetItemString(moddict, to_name, value); | |
26456 #endif | |
26457 } | |
26458 Py_DECREF(value); | |
26459 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { | |
26460 PyErr_Clear(); | |
26461 } else { | |
26462 result = -1; | |
26463 } | |
26464 return result; | |
26465 } | |
26466 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { | |
26467 PyObject *module = NULL, *moddict, *modname; | |
26468 CYTHON_UNUSED_VAR(def); | |
26469 if (__Pyx_check_single_interpreter()) | |
26470 return NULL; | |
26471 if (__pyx_m) | |
26472 return __Pyx_NewRef(__pyx_m); | |
26473 modname = PyObject_GetAttrString(spec, "name"); | |
26474 if (unlikely(!modname)) goto bad; | |
26475 module = PyModule_NewObject(modname); | |
26476 Py_DECREF(modname); | |
26477 if (unlikely(!module)) goto bad; | |
26478 #if CYTHON_COMPILING_IN_LIMITED_API | |
26479 moddict = module; | |
26480 #else | |
26481 moddict = PyModule_GetDict(module); | |
26482 if (unlikely(!moddict)) goto bad; | |
26483 #endif | |
26484 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; | |
26485 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; | |
26486 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; | |
26487 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; | |
26488 return module; | |
26489 bad: | |
26490 Py_XDECREF(module); | |
26491 return NULL; | |
26492 } | |
26493 | |
26494 | |
26495 static CYTHON_SMALL_CODE int __pyx_pymod_exec_libctabixproxies(PyObject *__pyx_pyinit_module) | |
26496 #endif | |
26497 #endif | |
26498 { | |
26499 int stringtab_initialized = 0; | |
26500 #if CYTHON_USE_MODULE_STATE | |
26501 int pystate_addmodule_run = 0; | |
26502 #endif | |
26503 PyObject *__pyx_t_1 = NULL; | |
26504 PyObject *__pyx_t_2 = NULL; | |
26505 PyObject *__pyx_t_3 = NULL; | |
26506 PyObject *__pyx_t_4 = NULL; | |
26507 PyObject *__pyx_t_5 = NULL; | |
26508 int __pyx_lineno = 0; | |
26509 const char *__pyx_filename = NULL; | |
26510 int __pyx_clineno = 0; | |
26511 __Pyx_RefNannyDeclarations | |
26512 #if CYTHON_PEP489_MULTI_PHASE_INIT | |
26513 if (__pyx_m) { | |
26514 if (__pyx_m == __pyx_pyinit_module) return 0; | |
26515 PyErr_SetString(PyExc_RuntimeError, "Module 'libctabixproxies' has already been imported. Re-initialisation is not supported."); | |
26516 return -1; | |
26517 } | |
26518 #elif PY_MAJOR_VERSION >= 3 | |
26519 if (__pyx_m) return __Pyx_NewRef(__pyx_m); | |
26520 #endif | |
26521 /*--- Module creation code ---*/ | |
26522 #if CYTHON_PEP489_MULTI_PHASE_INIT | |
26523 __pyx_m = __pyx_pyinit_module; | |
26524 Py_INCREF(__pyx_m); | |
26525 #else | |
26526 #if PY_MAJOR_VERSION < 3 | |
26527 __pyx_m = Py_InitModule4("libctabixproxies", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); | |
26528 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) | |
26529 #elif CYTHON_USE_MODULE_STATE | |
26530 __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) | |
26531 { | |
26532 int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); | |
26533 __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "libctabixproxies" pseudovariable */ | |
26534 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) | |
26535 pystate_addmodule_run = 1; | |
26536 } | |
26537 #else | |
26538 __pyx_m = PyModule_Create(&__pyx_moduledef); | |
26539 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) | |
26540 #endif | |
26541 #endif | |
26542 CYTHON_UNUSED_VAR(__pyx_t_1); | |
26543 __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) | |
26544 Py_INCREF(__pyx_d); | |
26545 __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) | |
26546 __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) | |
26547 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26548 #if CYTHON_REFNANNY | |
26549 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); | |
26550 if (!__Pyx_RefNanny) { | |
26551 PyErr_Clear(); | |
26552 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); | |
26553 if (!__Pyx_RefNanny) | |
26554 Py_FatalError("failed to import 'refnanny' module"); | |
26555 } | |
26556 #endif | |
26557 __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_libctabixproxies(void)", 0); | |
26558 if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26559 #ifdef __Pxy_PyFrame_Initialize_Offsets | |
26560 __Pxy_PyFrame_Initialize_Offsets(); | |
26561 #endif | |
26562 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) | |
26563 __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) | |
26564 __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) | |
26565 #ifdef __Pyx_CyFunction_USED | |
26566 if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26567 #endif | |
26568 #ifdef __Pyx_FusedFunction_USED | |
26569 if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26570 #endif | |
26571 #ifdef __Pyx_Coroutine_USED | |
26572 if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26573 #endif | |
26574 #ifdef __Pyx_Generator_USED | |
26575 if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26576 #endif | |
26577 #ifdef __Pyx_AsyncGen_USED | |
26578 if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26579 #endif | |
26580 #ifdef __Pyx_StopAsyncIteration_USED | |
26581 if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26582 #endif | |
26583 /*--- Library function declarations ---*/ | |
26584 /*--- Threads initialization code ---*/ | |
26585 #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS | |
26586 PyEval_InitThreads(); | |
26587 #endif | |
26588 /*--- Initialize various global constants etc. ---*/ | |
26589 if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26590 stringtab_initialized = 1; | |
26591 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26592 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) | |
26593 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26594 #endif | |
26595 if (__pyx_module_is_main_pysam__libctabixproxies) { | |
26596 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26597 } | |
26598 #if PY_MAJOR_VERSION >= 3 | |
26599 { | |
26600 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) | |
26601 if (!PyDict_GetItemString(modules, "pysam.libctabixproxies")) { | |
26602 if (unlikely((PyDict_SetItemString(modules, "pysam.libctabixproxies", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) | |
26603 } | |
26604 } | |
26605 #endif | |
26606 /*--- Builtin init code ---*/ | |
26607 if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26608 /*--- Constants init code ---*/ | |
26609 if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26610 /*--- Global type/function init code ---*/ | |
26611 (void)__Pyx_modinit_global_init_code(); | |
26612 (void)__Pyx_modinit_variable_export_code(); | |
26613 (void)__Pyx_modinit_function_export_code(); | |
26614 if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) | |
26615 if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) | |
26616 (void)__Pyx_modinit_variable_import_code(); | |
26617 if (unlikely((__Pyx_modinit_function_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) | |
26618 /*--- Execution code ---*/ | |
26619 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) | |
26620 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
26621 #endif | |
26622 | |
26623 /* "pysam/libctabixproxies.pyx":11 | |
26624 * from pysam.libcutils cimport encode_filename, from_string_and_size | |
26625 * | |
26626 * import collections # <<<<<<<<<<<<<< | |
26627 * import copy | |
26628 * | |
26629 */ | |
26630 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_collections, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) | |
26631 __Pyx_GOTREF(__pyx_t_2); | |
26632 if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error) | |
26633 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26634 | |
26635 /* "pysam/libctabixproxies.pyx":12 | |
26636 * | |
26637 * import collections | |
26638 * import copy # <<<<<<<<<<<<<< | |
26639 * | |
26640 * | |
26641 */ | |
26642 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_copy, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) | |
26643 __Pyx_GOTREF(__pyx_t_2); | |
26644 if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error) | |
26645 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26646 | |
26647 /* "pysam/libctabixproxies.pyx":65 | |
26648 * free(self.fields) | |
26649 * | |
26650 * def __copy__(self): # <<<<<<<<<<<<<< | |
26651 * if self.is_modified: | |
26652 * raise NotImplementedError( | |
26653 */ | |
26654 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_5__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleProxy___copy, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) | |
26655 __Pyx_GOTREF(__pyx_t_2); | |
26656 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy, __pyx_n_s_copy_2, __pyx_t_2) < 0) __PYX_ERR(0, 65, __pyx_L1_error) | |
26657 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26658 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); | |
26659 | |
26660 /* "pysam/libctabixproxies.pyx":73 | |
26661 * return n | |
26662 * | |
26663 * def compare(self, TupleProxy other): # <<<<<<<<<<<<<< | |
26664 * '''return -1,0,1, if contents in this are binary | |
26665 * <,=,> to *other* | |
26666 */ | |
26667 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_7compare, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleProxy_compare, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) | |
26668 __Pyx_GOTREF(__pyx_t_2); | |
26669 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy, __pyx_n_s_compare, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error) | |
26670 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26671 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); | |
26672 | |
26673 /* "pysam/libctabixproxies.pyx":136 | |
26674 * self.update(self.data, nbytes) | |
26675 * | |
26676 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
26677 * '''return minimum number of fields.''' | |
26678 * # 1 is not a valid tabix entry, but TupleProxy | |
26679 */ | |
26680 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_11getMinFields, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleProxy_getMinFields, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) | |
26681 __Pyx_GOTREF(__pyx_t_2); | |
26682 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy, __pyx_n_s_getMinFields, __pyx_t_2) < 0) __PYX_ERR(0, 136, __pyx_L1_error) | |
26683 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26684 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); | |
26685 | |
26686 /* "pysam/libctabixproxies.pyx":142 | |
26687 * return 1 | |
26688 * | |
26689 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
26690 * '''return maximum number of fields. Return | |
26691 * 0 for unknown length.''' | |
26692 */ | |
26693 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_13getMaxFields, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleProxy_getMaxFields, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) | |
26694 __Pyx_GOTREF(__pyx_t_2); | |
26695 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy, __pyx_n_s_getMaxFields, __pyx_t_2) < 0) __PYX_ERR(0, 142, __pyx_L1_error) | |
26696 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26697 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); | |
26698 | |
26699 /* "pysam/libctabixproxies.pyx":239 | |
26700 * (self.getMinFields(), buffer)) | |
26701 * | |
26702 * def _getindex(self, int index): # <<<<<<<<<<<<<< | |
26703 * '''return item at idx index''' | |
26704 * cdef int i = index | |
26705 */ | |
26706 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_15_getindex, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleProxy__getindex, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error) | |
26707 __Pyx_GOTREF(__pyx_t_2); | |
26708 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy, __pyx_n_s_getindex, __pyx_t_2) < 0) __PYX_ERR(0, 239, __pyx_L1_error) | |
26709 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26710 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); | |
26711 | |
26712 /* "pysam/libctabixproxies.pyx":265 | |
26713 * return result | |
26714 * | |
26715 * def _setindex(self, index, value): # <<<<<<<<<<<<<< | |
26716 * '''set item at idx index.''' | |
26717 * cdef int idx = index | |
26718 */ | |
26719 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_19_setindex, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleProxy__setindex, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error) | |
26720 __Pyx_GOTREF(__pyx_t_2); | |
26721 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy, __pyx_n_s_setindex, __pyx_t_2) < 0) __PYX_ERR(0, 265, __pyx_L1_error) | |
26722 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26723 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); | |
26724 | |
26725 /* "(tree fragment)":1 | |
26726 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
26727 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
26728 * def __setstate_cython__(self, __pyx_state): | |
26729 */ | |
26730 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_29__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleProxy___reduce_cython, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) | |
26731 __Pyx_GOTREF(__pyx_t_2); | |
26732 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) | |
26733 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26734 | |
26735 /* "(tree fragment)":3 | |
26736 * def __reduce_cython__(self): | |
26737 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
26738 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
26739 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
26740 */ | |
26741 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_10TupleProxy_31__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleProxy___setstate_cython, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) | |
26742 __Pyx_GOTREF(__pyx_t_2); | |
26743 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) | |
26744 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26745 | |
26746 /* "(tree fragment)":1 | |
26747 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
26748 * cdef tuple state | |
26749 * cdef object _dict | |
26750 */ | |
26751 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_18TupleProxyIterator_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleProxyIterator___reduce_cyth, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) | |
26752 __Pyx_GOTREF(__pyx_t_2); | |
26753 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) | |
26754 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26755 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator); | |
26756 | |
26757 /* "(tree fragment)":16 | |
26758 * else: | |
26759 * return __pyx_unpickle_TupleProxyIterator, (type(self), 0x0eb9d08, state) | |
26760 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
26761 * __pyx_unpickle_TupleProxyIterator__set_state(self, __pyx_state) | |
26762 */ | |
26763 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_18TupleProxyIterator_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleProxyIterator___setstate_cy, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error) | |
26764 __Pyx_GOTREF(__pyx_t_2); | |
26765 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error) | |
26766 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26767 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator); | |
26768 | |
26769 /* "pysam/libctabixproxies.pyx":345 | |
26770 * | |
26771 * | |
26772 * def toDot(v): # <<<<<<<<<<<<<< | |
26773 * '''convert value to '.' if None''' | |
26774 * if v is None: | |
26775 */ | |
26776 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_1toDot, 0, __pyx_n_s_toDot, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error) | |
26777 __Pyx_GOTREF(__pyx_t_2); | |
26778 if (PyDict_SetItem(__pyx_d, __pyx_n_s_toDot, __pyx_t_2) < 0) __PYX_ERR(0, 345, __pyx_L1_error) | |
26779 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26780 | |
26781 /* "pysam/libctabixproxies.pyx":352 | |
26782 * return str(v) | |
26783 * | |
26784 * def quote(v): # <<<<<<<<<<<<<< | |
26785 * '''return a quoted attribute.''' | |
26786 * if isinstance(v, str): | |
26787 */ | |
26788 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_3quote, 0, __pyx_n_s_quote, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error) | |
26789 __Pyx_GOTREF(__pyx_t_2); | |
26790 if (PyDict_SetItem(__pyx_d, __pyx_n_s_quote, __pyx_t_2) < 0) __PYX_ERR(0, 352, __pyx_L1_error) | |
26791 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26792 | |
26793 /* "pysam/libctabixproxies.pyx":362 | |
26794 * cdef class NamedTupleProxy(TupleProxy): | |
26795 * | |
26796 * map_key2field = {} # <<<<<<<<<<<<<< | |
26797 * | |
26798 * def __setattr__(self, key, value): | |
26799 */ | |
26800 __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error) | |
26801 __Pyx_GOTREF(__pyx_t_2); | |
26802 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy, __pyx_n_s_map_key2field, __pyx_t_2) < 0) __PYX_ERR(0, 362, __pyx_L1_error) | |
26803 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26804 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy); | |
26805 | |
26806 /* "(tree fragment)":1 | |
26807 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
26808 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
26809 * def __setstate_cython__(self, __pyx_state): | |
26810 */ | |
26811 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_15NamedTupleProxy_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamedTupleProxy___reduce_cython, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) | |
26812 __Pyx_GOTREF(__pyx_t_2); | |
26813 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) | |
26814 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26815 | |
26816 /* "(tree fragment)":3 | |
26817 * def __reduce_cython__(self): | |
26818 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
26819 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
26820 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
26821 */ | |
26822 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_15NamedTupleProxy_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamedTupleProxy___setstate_cytho, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) | |
26823 __Pyx_GOTREF(__pyx_t_2); | |
26824 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) | |
26825 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
26826 | |
26827 /* "pysam/libctabixproxies.pyx":428 | |
26828 * | |
26829 * ''' | |
26830 * separator = "; " # <<<<<<<<<<<<<< | |
26831 * | |
26832 * # first value is field index, the tuple contains conversion | |
26833 */ | |
26834 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_separator, __pyx_kp_u__19) < 0) __PYX_ERR(0, 428, __pyx_L1_error) | |
26835 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
26836 | |
26837 /* "pysam/libctabixproxies.pyx":435 | |
26838 * # interval string representation) | |
26839 * map_key2field = { | |
26840 * 'contig' : (0, (str, str)), # <<<<<<<<<<<<<< | |
26841 * 'source' : (1, (dot_or_str, str)), | |
26842 * 'feature': (2, (dot_or_str, str)), | |
26843 */ | |
26844 __pyx_t_2 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error) | |
26845 __Pyx_GOTREF(__pyx_t_2); | |
26846 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error) | |
26847 __Pyx_GOTREF(__pyx_t_3); | |
26848 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
26849 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
26850 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 435, __pyx_L1_error); | |
26851 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
26852 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
26853 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 435, __pyx_L1_error); | |
26854 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error) | |
26855 __Pyx_GOTREF(__pyx_t_4); | |
26856 __Pyx_INCREF(__pyx_int_0); | |
26857 __Pyx_GIVEREF(__pyx_int_0); | |
26858 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0)) __PYX_ERR(0, 435, __pyx_L1_error); | |
26859 __Pyx_GIVEREF(__pyx_t_3); | |
26860 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error); | |
26861 __pyx_t_3 = 0; | |
26862 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_contig, __pyx_t_4) < 0) __PYX_ERR(0, 435, __pyx_L1_error) | |
26863 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
26864 | |
26865 /* "pysam/libctabixproxies.pyx":436 | |
26866 * map_key2field = { | |
26867 * 'contig' : (0, (str, str)), | |
26868 * 'source' : (1, (dot_or_str, str)), # <<<<<<<<<<<<<< | |
26869 * 'feature': (2, (dot_or_str, str)), | |
26870 * 'start' : (3, (from1based, to1based)), | |
26871 */ | |
26872 __pyx_t_4 = __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(__pyx_f_5pysam_16libctabixproxies_dot_or_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 436, __pyx_L1_error) | |
26873 __Pyx_GOTREF(__pyx_t_4); | |
26874 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error) | |
26875 __Pyx_GOTREF(__pyx_t_3); | |
26876 __Pyx_GIVEREF(__pyx_t_4); | |
26877 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 436, __pyx_L1_error); | |
26878 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
26879 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
26880 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 436, __pyx_L1_error); | |
26881 __pyx_t_4 = 0; | |
26882 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 436, __pyx_L1_error) | |
26883 __Pyx_GOTREF(__pyx_t_4); | |
26884 __Pyx_INCREF(__pyx_int_1); | |
26885 __Pyx_GIVEREF(__pyx_int_1); | |
26886 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1)) __PYX_ERR(0, 436, __pyx_L1_error); | |
26887 __Pyx_GIVEREF(__pyx_t_3); | |
26888 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error); | |
26889 __pyx_t_3 = 0; | |
26890 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_source, __pyx_t_4) < 0) __PYX_ERR(0, 435, __pyx_L1_error) | |
26891 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
26892 | |
26893 /* "pysam/libctabixproxies.pyx":437 | |
26894 * 'contig' : (0, (str, str)), | |
26895 * 'source' : (1, (dot_or_str, str)), | |
26896 * 'feature': (2, (dot_or_str, str)), # <<<<<<<<<<<<<< | |
26897 * 'start' : (3, (from1based, to1based)), | |
26898 * 'end' : (4, (int, int)), | |
26899 */ | |
26900 __pyx_t_4 = __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(__pyx_f_5pysam_16libctabixproxies_dot_or_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 437, __pyx_L1_error) | |
26901 __Pyx_GOTREF(__pyx_t_4); | |
26902 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 437, __pyx_L1_error) | |
26903 __Pyx_GOTREF(__pyx_t_3); | |
26904 __Pyx_GIVEREF(__pyx_t_4); | |
26905 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 437, __pyx_L1_error); | |
26906 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
26907 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
26908 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 437, __pyx_L1_error); | |
26909 __pyx_t_4 = 0; | |
26910 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 437, __pyx_L1_error) | |
26911 __Pyx_GOTREF(__pyx_t_4); | |
26912 __Pyx_INCREF(__pyx_int_2); | |
26913 __Pyx_GIVEREF(__pyx_int_2); | |
26914 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_2)) __PYX_ERR(0, 437, __pyx_L1_error); | |
26915 __Pyx_GIVEREF(__pyx_t_3); | |
26916 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 437, __pyx_L1_error); | |
26917 __pyx_t_3 = 0; | |
26918 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_feature, __pyx_t_4) < 0) __PYX_ERR(0, 435, __pyx_L1_error) | |
26919 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
26920 | |
26921 /* "pysam/libctabixproxies.pyx":438 | |
26922 * 'source' : (1, (dot_or_str, str)), | |
26923 * 'feature': (2, (dot_or_str, str)), | |
26924 * 'start' : (3, (from1based, to1based)), # <<<<<<<<<<<<<< | |
26925 * 'end' : (4, (int, int)), | |
26926 * 'score' : (5, (dot_or_float, toDot)), | |
26927 */ | |
26928 __pyx_t_4 = __Pyx_CFunc_e2acea__5pysam_16libctabixproxies_int__lParenobject__r__etc_to_py_1v(__pyx_f_5pysam_16libctabixproxies_from1based); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 438, __pyx_L1_error) | |
26929 __Pyx_GOTREF(__pyx_t_4); | |
26930 __pyx_t_3 = __Pyx_CFunc_5pysam_16libctabixproxies_unicode__lParenint__rParen_to_py_1v(__pyx_f_5pysam_16libctabixproxies_to1based); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 438, __pyx_L1_error) | |
26931 __Pyx_GOTREF(__pyx_t_3); | |
26932 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 438, __pyx_L1_error) | |
26933 __Pyx_GOTREF(__pyx_t_5); | |
26934 __Pyx_GIVEREF(__pyx_t_4); | |
26935 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 438, __pyx_L1_error); | |
26936 __Pyx_GIVEREF(__pyx_t_3); | |
26937 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(0, 438, __pyx_L1_error); | |
26938 __pyx_t_4 = 0; | |
26939 __pyx_t_3 = 0; | |
26940 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 438, __pyx_L1_error) | |
26941 __Pyx_GOTREF(__pyx_t_3); | |
26942 __Pyx_INCREF(__pyx_int_3); | |
26943 __Pyx_GIVEREF(__pyx_int_3); | |
26944 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_3)) __PYX_ERR(0, 438, __pyx_L1_error); | |
26945 __Pyx_GIVEREF(__pyx_t_5); | |
26946 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(0, 438, __pyx_L1_error); | |
26947 __pyx_t_5 = 0; | |
26948 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_start, __pyx_t_3) < 0) __PYX_ERR(0, 435, __pyx_L1_error) | |
26949 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
26950 | |
26951 /* "pysam/libctabixproxies.pyx":439 | |
26952 * 'feature': (2, (dot_or_str, str)), | |
26953 * 'start' : (3, (from1based, to1based)), | |
26954 * 'end' : (4, (int, int)), # <<<<<<<<<<<<<< | |
26955 * 'score' : (5, (dot_or_float, toDot)), | |
26956 * 'strand' : (6, (dot_or_str, str)), | |
26957 */ | |
26958 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error) | |
26959 __Pyx_GOTREF(__pyx_t_3); | |
26960 __Pyx_INCREF((PyObject *)(&PyInt_Type)); | |
26961 __Pyx_GIVEREF((PyObject *)(&PyInt_Type)); | |
26962 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 439, __pyx_L1_error); | |
26963 __Pyx_INCREF((PyObject *)(&PyInt_Type)); | |
26964 __Pyx_GIVEREF((PyObject *)(&PyInt_Type)); | |
26965 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 439, __pyx_L1_error); | |
26966 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 439, __pyx_L1_error) | |
26967 __Pyx_GOTREF(__pyx_t_5); | |
26968 __Pyx_INCREF(__pyx_int_4); | |
26969 __Pyx_GIVEREF(__pyx_int_4); | |
26970 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_4)) __PYX_ERR(0, 439, __pyx_L1_error); | |
26971 __Pyx_GIVEREF(__pyx_t_3); | |
26972 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error); | |
26973 __pyx_t_3 = 0; | |
26974 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_end, __pyx_t_5) < 0) __PYX_ERR(0, 435, __pyx_L1_error) | |
26975 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
26976 | |
26977 /* "pysam/libctabixproxies.pyx":440 | |
26978 * 'start' : (3, (from1based, to1based)), | |
26979 * 'end' : (4, (int, int)), | |
26980 * 'score' : (5, (dot_or_float, toDot)), # <<<<<<<<<<<<<< | |
26981 * 'strand' : (6, (dot_or_str, str)), | |
26982 * 'frame' : (7, (dot_or_int, toDot)), | |
26983 */ | |
26984 __pyx_t_5 = __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(__pyx_f_5pysam_16libctabixproxies_dot_or_float); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error) | |
26985 __Pyx_GOTREF(__pyx_t_5); | |
26986 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_toDot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 440, __pyx_L1_error) | |
26987 __Pyx_GOTREF(__pyx_t_3); | |
26988 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L1_error) | |
26989 __Pyx_GOTREF(__pyx_t_4); | |
26990 __Pyx_GIVEREF(__pyx_t_5); | |
26991 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error); | |
26992 __Pyx_GIVEREF(__pyx_t_3); | |
26993 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 440, __pyx_L1_error); | |
26994 __pyx_t_5 = 0; | |
26995 __pyx_t_3 = 0; | |
26996 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 440, __pyx_L1_error) | |
26997 __Pyx_GOTREF(__pyx_t_3); | |
26998 __Pyx_INCREF(__pyx_int_5); | |
26999 __Pyx_GIVEREF(__pyx_int_5); | |
27000 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_5)) __PYX_ERR(0, 440, __pyx_L1_error); | |
27001 __Pyx_GIVEREF(__pyx_t_4); | |
27002 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(0, 440, __pyx_L1_error); | |
27003 __pyx_t_4 = 0; | |
27004 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_score, __pyx_t_3) < 0) __PYX_ERR(0, 435, __pyx_L1_error) | |
27005 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
27006 | |
27007 /* "pysam/libctabixproxies.pyx":441 | |
27008 * 'end' : (4, (int, int)), | |
27009 * 'score' : (5, (dot_or_float, toDot)), | |
27010 * 'strand' : (6, (dot_or_str, str)), # <<<<<<<<<<<<<< | |
27011 * 'frame' : (7, (dot_or_int, toDot)), | |
27012 * 'attributes': (8, (str, str))} | |
27013 */ | |
27014 __pyx_t_3 = __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(__pyx_f_5pysam_16libctabixproxies_dot_or_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error) | |
27015 __Pyx_GOTREF(__pyx_t_3); | |
27016 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error) | |
27017 __Pyx_GOTREF(__pyx_t_4); | |
27018 __Pyx_GIVEREF(__pyx_t_3); | |
27019 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error); | |
27020 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27021 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27022 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 441, __pyx_L1_error); | |
27023 __pyx_t_3 = 0; | |
27024 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error) | |
27025 __Pyx_GOTREF(__pyx_t_3); | |
27026 __Pyx_INCREF(__pyx_int_6); | |
27027 __Pyx_GIVEREF(__pyx_int_6); | |
27028 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_6)) __PYX_ERR(0, 441, __pyx_L1_error); | |
27029 __Pyx_GIVEREF(__pyx_t_4); | |
27030 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error); | |
27031 __pyx_t_4 = 0; | |
27032 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_strand, __pyx_t_3) < 0) __PYX_ERR(0, 435, __pyx_L1_error) | |
27033 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; | |
27034 | |
27035 /* "pysam/libctabixproxies.pyx":442 | |
27036 * 'score' : (5, (dot_or_float, toDot)), | |
27037 * 'strand' : (6, (dot_or_str, str)), | |
27038 * 'frame' : (7, (dot_or_int, toDot)), # <<<<<<<<<<<<<< | |
27039 * 'attributes': (8, (str, str))} | |
27040 * | |
27041 */ | |
27042 __pyx_t_3 = __Pyx_CFunc_5pysam_16libctabixproxies_object__lParenobject__rParen_to_py_1v(__pyx_f_5pysam_16libctabixproxies_dot_or_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error) | |
27043 __Pyx_GOTREF(__pyx_t_3); | |
27044 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toDot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error) | |
27045 __Pyx_GOTREF(__pyx_t_4); | |
27046 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error) | |
27047 __Pyx_GOTREF(__pyx_t_5); | |
27048 __Pyx_GIVEREF(__pyx_t_3); | |
27049 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error); | |
27050 __Pyx_GIVEREF(__pyx_t_4); | |
27051 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error); | |
27052 __pyx_t_3 = 0; | |
27053 __pyx_t_4 = 0; | |
27054 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error) | |
27055 __Pyx_GOTREF(__pyx_t_4); | |
27056 __Pyx_INCREF(__pyx_int_7); | |
27057 __Pyx_GIVEREF(__pyx_int_7); | |
27058 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_7)) __PYX_ERR(0, 442, __pyx_L1_error); | |
27059 __Pyx_GIVEREF(__pyx_t_5); | |
27060 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error); | |
27061 __pyx_t_5 = 0; | |
27062 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_frame, __pyx_t_4) < 0) __PYX_ERR(0, 435, __pyx_L1_error) | |
27063 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; | |
27064 | |
27065 /* "pysam/libctabixproxies.pyx":443 | |
27066 * 'strand' : (6, (dot_or_str, str)), | |
27067 * 'frame' : (7, (dot_or_int, toDot)), | |
27068 * 'attributes': (8, (str, str))} # <<<<<<<<<<<<<< | |
27069 * | |
27070 * def __cinit__(self): | |
27071 */ | |
27072 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error) | |
27073 __Pyx_GOTREF(__pyx_t_4); | |
27074 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27075 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27076 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 443, __pyx_L1_error); | |
27077 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27078 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27079 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 443, __pyx_L1_error); | |
27080 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 443, __pyx_L1_error) | |
27081 __Pyx_GOTREF(__pyx_t_5); | |
27082 __Pyx_INCREF(__pyx_int_8); | |
27083 __Pyx_GIVEREF(__pyx_int_8); | |
27084 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_8)) __PYX_ERR(0, 443, __pyx_L1_error); | |
27085 __Pyx_GIVEREF(__pyx_t_4); | |
27086 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error); | |
27087 __pyx_t_4 = 0; | |
27088 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_attributes, __pyx_t_5) < 0) __PYX_ERR(0, 435, __pyx_L1_error) | |
27089 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27090 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_map_key2field, __pyx_t_2) < 0) __PYX_ERR(0, 434, __pyx_L1_error) | |
27091 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27092 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27093 | |
27094 /* "pysam/libctabixproxies.pyx":449 | |
27095 * self.attribute_dict = None | |
27096 * | |
27097 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
27098 * '''return minimum number of fields.''' | |
27099 * return 9 | |
27100 */ | |
27101 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_3getMinFields, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_getMinFields, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) | |
27102 __Pyx_GOTREF(__pyx_t_2); | |
27103 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_getMinFields, __pyx_t_2) < 0) __PYX_ERR(0, 449, __pyx_L1_error) | |
27104 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27105 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27106 | |
27107 /* "pysam/libctabixproxies.pyx":453 | |
27108 * return 9 | |
27109 * | |
27110 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
27111 * '''return max number of fields.''' | |
27112 * return 9 | |
27113 */ | |
27114 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_5getMaxFields, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_getMaxFields, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) | |
27115 __Pyx_GOTREF(__pyx_t_2); | |
27116 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_getMaxFields, __pyx_t_2) < 0) __PYX_ERR(0, 453, __pyx_L1_error) | |
27117 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27118 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27119 | |
27120 /* "pysam/libctabixproxies.pyx":457 | |
27121 * return 9 | |
27122 * | |
27123 * def to_dict(self): # <<<<<<<<<<<<<< | |
27124 * """parse attributes - return as dict | |
27125 * | |
27126 */ | |
27127 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_7to_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_to_dict, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error) | |
27128 __Pyx_GOTREF(__pyx_t_2); | |
27129 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_to_dict, __pyx_t_2) < 0) __PYX_ERR(0, 457, __pyx_L1_error) | |
27130 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27131 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27132 | |
27133 /* "pysam/libctabixproxies.pyx":468 | |
27134 * return self.attribute_dict | |
27135 * | |
27136 * def as_dict(self): # <<<<<<<<<<<<<< | |
27137 * """deprecated: use :meth:`to_dict` | |
27138 * """ | |
27139 */ | |
27140 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_9as_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_as_dict, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L1_error) | |
27141 __Pyx_GOTREF(__pyx_t_2); | |
27142 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_as_dict, __pyx_t_2) < 0) __PYX_ERR(0, 468, __pyx_L1_error) | |
27143 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27144 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27145 | |
27146 /* "pysam/libctabixproxies.pyx":473 | |
27147 * return self.to_dict() | |
27148 * | |
27149 * def from_dict(self, d): # <<<<<<<<<<<<<< | |
27150 * '''set attributes from a dictionary.''' | |
27151 * self.attribute_dict = None | |
27152 */ | |
27153 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_11from_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_from_dict, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error) | |
27154 __Pyx_GOTREF(__pyx_t_2); | |
27155 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_from_dict, __pyx_t_2) < 0) __PYX_ERR(0, 473, __pyx_L1_error) | |
27156 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27157 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27158 | |
27159 /* "pysam/libctabixproxies.pyx":499 | |
27160 * return super().__str__() | |
27161 * | |
27162 * def invert(self, int lcontig): # <<<<<<<<<<<<<< | |
27163 * '''invert coordinates to negative strand coordinates | |
27164 * | |
27165 */ | |
27166 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_15invert, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_invert, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) | |
27167 __Pyx_GOTREF(__pyx_t_2); | |
27168 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_invert, __pyx_t_2) < 0) __PYX_ERR(0, 499, __pyx_L1_error) | |
27169 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27170 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27171 | |
27172 /* "pysam/libctabixproxies.pyx":510 | |
27173 * self.start, self.end = lcontig - end, lcontig - start | |
27174 * | |
27175 * def keys(self): # <<<<<<<<<<<<<< | |
27176 * '''return a list of attributes defined in this entry.''' | |
27177 * if not self.attribute_dict: | |
27178 */ | |
27179 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_17keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_keys, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error) | |
27180 __Pyx_GOTREF(__pyx_t_2); | |
27181 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_keys, __pyx_t_2) < 0) __PYX_ERR(0, 510, __pyx_L1_error) | |
27182 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27183 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27184 | |
27185 /* "pysam/libctabixproxies.pyx":520 | |
27186 * return self.__getattr__(key) | |
27187 * | |
27188 * def setAttribute(self, name, value): # <<<<<<<<<<<<<< | |
27189 * '''convenience method to set an attribute. | |
27190 * ''' | |
27191 */ | |
27192 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_21setAttribute, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_setAttribute, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error) | |
27193 __Pyx_GOTREF(__pyx_t_2); | |
27194 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_setAttribute, __pyx_t_2) < 0) __PYX_ERR(0, 520, __pyx_L1_error) | |
27195 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27196 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27197 | |
27198 /* "pysam/libctabixproxies.pyx":529 | |
27199 * self.is_modified = True | |
27200 * | |
27201 * def attribute_string2dict(self, s): # <<<<<<<<<<<<<< | |
27202 * return collections.OrderedDict( | |
27203 * self.attribute_string2iterator(s)) | |
27204 */ | |
27205 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_23attribute_string2dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_attribute_string2dict, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) | |
27206 __Pyx_GOTREF(__pyx_t_2); | |
27207 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_attribute_string2dict, __pyx_t_2) < 0) __PYX_ERR(0, 529, __pyx_L1_error) | |
27208 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27209 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27210 | |
27211 /* "pysam/libctabixproxies.pyx":553 | |
27212 * raise NotImplementedError(err_msg) | |
27213 * | |
27214 * def dict2attribute_string(self, d): # <<<<<<<<<<<<<< | |
27215 * """convert dictionary to attribute string in GTF format. | |
27216 * | |
27217 */ | |
27218 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_29dict2attribute_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_dict2attribute_string, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error) | |
27219 __Pyx_GOTREF(__pyx_t_2); | |
27220 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_dict2attribute_string, __pyx_t_2) < 0) __PYX_ERR(0, 553, __pyx_L1_error) | |
27221 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27222 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27223 | |
27224 /* "pysam/libctabixproxies.pyx":566 | |
27225 * return self.separator.join(aa) + ";" | |
27226 * | |
27227 * def attribute_string2iterator(self, s): # <<<<<<<<<<<<<< | |
27228 * """convert attribute string in GTF format to records | |
27229 * and iterate over key, value pairs. | |
27230 */ | |
27231 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_31attribute_string2iterator, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_attribute_string2iterat, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error) | |
27232 __Pyx_GOTREF(__pyx_t_2); | |
27233 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_attribute_string2iterator, __pyx_t_2) < 0) __PYX_ERR(0, 566, __pyx_L1_error) | |
27234 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27235 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27236 | |
27237 /* "pysam/libctabixproxies.pyx":666 | |
27238 * | |
27239 * # for backwards compatibility | |
27240 * def asDict(self, *args, **kwargs): # <<<<<<<<<<<<<< | |
27241 * return self.to_dict(*args, **kwargs) | |
27242 * | |
27243 */ | |
27244 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_38asDict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_asDict, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error) | |
27245 __Pyx_GOTREF(__pyx_t_2); | |
27246 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_asDict, __pyx_t_2) < 0) __PYX_ERR(0, 666, __pyx_L1_error) | |
27247 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27248 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27249 | |
27250 /* "pysam/libctabixproxies.pyx":669 | |
27251 * return self.to_dict(*args, **kwargs) | |
27252 * | |
27253 * def fromDict(self, *args, **kwargs): # <<<<<<<<<<<<<< | |
27254 * return self.from_dict(*args, **kwargs) | |
27255 * | |
27256 */ | |
27257 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_40fromDict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy_fromDict, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error) | |
27258 __Pyx_GOTREF(__pyx_t_2); | |
27259 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy, __pyx_n_s_fromDict, __pyx_t_2) < 0) __PYX_ERR(0, 669, __pyx_L1_error) | |
27260 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27261 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); | |
27262 | |
27263 /* "(tree fragment)":1 | |
27264 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
27265 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27266 * def __setstate_cython__(self, __pyx_state): | |
27267 */ | |
27268 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_42__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy___reduce_cython, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) | |
27269 __Pyx_GOTREF(__pyx_t_2); | |
27270 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) | |
27271 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27272 | |
27273 /* "(tree fragment)":3 | |
27274 * def __reduce_cython__(self): | |
27275 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27276 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
27277 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27278 */ | |
27279 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8GTFProxy_44__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GTFProxy___setstate_cython, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) | |
27280 __Pyx_GOTREF(__pyx_t_2); | |
27281 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) | |
27282 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27283 | |
27284 /* "pysam/libctabixproxies.pyx":675 | |
27285 * cdef class GFF3Proxy(GTFProxy): | |
27286 * | |
27287 * def dict2attribute_string(self, d): # <<<<<<<<<<<<<< | |
27288 * """convert dictionary to attribute string.""" | |
27289 * return ";".join(["{}={}".format(k, v) for k, v in d.items()]) | |
27290 */ | |
27291 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_9GFF3Proxy_1dict2attribute_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GFF3Proxy_dict2attribute_string, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error) | |
27292 __Pyx_GOTREF(__pyx_t_2); | |
27293 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy, __pyx_n_s_dict2attribute_string, __pyx_t_2) < 0) __PYX_ERR(0, 675, __pyx_L1_error) | |
27294 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27295 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy); | |
27296 | |
27297 /* "pysam/libctabixproxies.pyx":679 | |
27298 * return ";".join(["{}={}".format(k, v) for k, v in d.items()]) | |
27299 * | |
27300 * def attribute_string2iterator(self, s): # <<<<<<<<<<<<<< | |
27301 * """convert attribute string in GFF3 format to records | |
27302 * and iterate over key, value pairs. | |
27303 */ | |
27304 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_9GFF3Proxy_3attribute_string2iterator, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GFF3Proxy_attribute_string2itera, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error) | |
27305 __Pyx_GOTREF(__pyx_t_2); | |
27306 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy, __pyx_n_s_attribute_string2iterator, __pyx_t_2) < 0) __PYX_ERR(0, 679, __pyx_L1_error) | |
27307 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27308 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy); | |
27309 | |
27310 /* "(tree fragment)":1 | |
27311 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
27312 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27313 * def __setstate_cython__(self, __pyx_state): | |
27314 */ | |
27315 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_9GFF3Proxy_6__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GFF3Proxy___reduce_cython, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) | |
27316 __Pyx_GOTREF(__pyx_t_2); | |
27317 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) | |
27318 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27319 | |
27320 /* "(tree fragment)":3 | |
27321 * def __reduce_cython__(self): | |
27322 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27323 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
27324 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27325 */ | |
27326 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_9GFF3Proxy_8__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GFF3Proxy___setstate_cython, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) | |
27327 __Pyx_GOTREF(__pyx_t_2); | |
27328 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) | |
27329 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27330 | |
27331 /* "pysam/libctabixproxies.pyx":709 | |
27332 * ''' | |
27333 * map_key2field = { | |
27334 * 'contig' : (0, str), # <<<<<<<<<<<<<< | |
27335 * 'start' : (1, int), | |
27336 * 'end' : (2, int), | |
27337 */ | |
27338 __pyx_t_2 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error) | |
27339 __Pyx_GOTREF(__pyx_t_2); | |
27340 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 709, __pyx_L1_error) | |
27341 __Pyx_GOTREF(__pyx_t_5); | |
27342 __Pyx_INCREF(__pyx_int_0); | |
27343 __Pyx_GIVEREF(__pyx_int_0); | |
27344 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0)) __PYX_ERR(0, 709, __pyx_L1_error); | |
27345 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27346 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27347 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 709, __pyx_L1_error); | |
27348 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_contig, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27349 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27350 | |
27351 /* "pysam/libctabixproxies.pyx":710 | |
27352 * map_key2field = { | |
27353 * 'contig' : (0, str), | |
27354 * 'start' : (1, int), # <<<<<<<<<<<<<< | |
27355 * 'end' : (2, int), | |
27356 * 'name' : (3, str), | |
27357 */ | |
27358 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error) | |
27359 __Pyx_GOTREF(__pyx_t_5); | |
27360 __Pyx_INCREF(__pyx_int_1); | |
27361 __Pyx_GIVEREF(__pyx_int_1); | |
27362 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_1)) __PYX_ERR(0, 710, __pyx_L1_error); | |
27363 __Pyx_INCREF((PyObject *)(&PyInt_Type)); | |
27364 __Pyx_GIVEREF((PyObject *)(&PyInt_Type)); | |
27365 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 710, __pyx_L1_error); | |
27366 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_start, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27367 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27368 | |
27369 /* "pysam/libctabixproxies.pyx":711 | |
27370 * 'contig' : (0, str), | |
27371 * 'start' : (1, int), | |
27372 * 'end' : (2, int), # <<<<<<<<<<<<<< | |
27373 * 'name' : (3, str), | |
27374 * 'score' : (4, float), | |
27375 */ | |
27376 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error) | |
27377 __Pyx_GOTREF(__pyx_t_5); | |
27378 __Pyx_INCREF(__pyx_int_2); | |
27379 __Pyx_GIVEREF(__pyx_int_2); | |
27380 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_2)) __PYX_ERR(0, 711, __pyx_L1_error); | |
27381 __Pyx_INCREF((PyObject *)(&PyInt_Type)); | |
27382 __Pyx_GIVEREF((PyObject *)(&PyInt_Type)); | |
27383 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 711, __pyx_L1_error); | |
27384 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_end, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27385 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27386 | |
27387 /* "pysam/libctabixproxies.pyx":712 | |
27388 * 'start' : (1, int), | |
27389 * 'end' : (2, int), | |
27390 * 'name' : (3, str), # <<<<<<<<<<<<<< | |
27391 * 'score' : (4, float), | |
27392 * 'strand' : (5, str), | |
27393 */ | |
27394 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 712, __pyx_L1_error) | |
27395 __Pyx_GOTREF(__pyx_t_5); | |
27396 __Pyx_INCREF(__pyx_int_3); | |
27397 __Pyx_GIVEREF(__pyx_int_3); | |
27398 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_3)) __PYX_ERR(0, 712, __pyx_L1_error); | |
27399 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27400 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27401 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 712, __pyx_L1_error); | |
27402 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_name, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27403 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27404 | |
27405 /* "pysam/libctabixproxies.pyx":713 | |
27406 * 'end' : (2, int), | |
27407 * 'name' : (3, str), | |
27408 * 'score' : (4, float), # <<<<<<<<<<<<<< | |
27409 * 'strand' : (5, str), | |
27410 * 'thickStart' : (6, int), | |
27411 */ | |
27412 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error) | |
27413 __Pyx_GOTREF(__pyx_t_5); | |
27414 __Pyx_INCREF(__pyx_int_4); | |
27415 __Pyx_GIVEREF(__pyx_int_4); | |
27416 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_4)) __PYX_ERR(0, 713, __pyx_L1_error); | |
27417 __Pyx_INCREF((PyObject *)(&PyFloat_Type)); | |
27418 __Pyx_GIVEREF((PyObject *)(&PyFloat_Type)); | |
27419 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyFloat_Type)))) __PYX_ERR(0, 713, __pyx_L1_error); | |
27420 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_score, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27421 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27422 | |
27423 /* "pysam/libctabixproxies.pyx":714 | |
27424 * 'name' : (3, str), | |
27425 * 'score' : (4, float), | |
27426 * 'strand' : (5, str), # <<<<<<<<<<<<<< | |
27427 * 'thickStart' : (6, int), | |
27428 * 'thickEnd' : (7, int), | |
27429 */ | |
27430 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 714, __pyx_L1_error) | |
27431 __Pyx_GOTREF(__pyx_t_5); | |
27432 __Pyx_INCREF(__pyx_int_5); | |
27433 __Pyx_GIVEREF(__pyx_int_5); | |
27434 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_5)) __PYX_ERR(0, 714, __pyx_L1_error); | |
27435 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27436 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27437 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 714, __pyx_L1_error); | |
27438 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_strand, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27439 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27440 | |
27441 /* "pysam/libctabixproxies.pyx":715 | |
27442 * 'score' : (4, float), | |
27443 * 'strand' : (5, str), | |
27444 * 'thickStart' : (6, int), # <<<<<<<<<<<<<< | |
27445 * 'thickEnd' : (7, int), | |
27446 * 'itemRGB' : (8, str), | |
27447 */ | |
27448 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error) | |
27449 __Pyx_GOTREF(__pyx_t_5); | |
27450 __Pyx_INCREF(__pyx_int_6); | |
27451 __Pyx_GIVEREF(__pyx_int_6); | |
27452 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_6)) __PYX_ERR(0, 715, __pyx_L1_error); | |
27453 __Pyx_INCREF((PyObject *)(&PyInt_Type)); | |
27454 __Pyx_GIVEREF((PyObject *)(&PyInt_Type)); | |
27455 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 715, __pyx_L1_error); | |
27456 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_thickStart, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27457 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27458 | |
27459 /* "pysam/libctabixproxies.pyx":716 | |
27460 * 'strand' : (5, str), | |
27461 * 'thickStart' : (6, int), | |
27462 * 'thickEnd' : (7, int), # <<<<<<<<<<<<<< | |
27463 * 'itemRGB' : (8, str), | |
27464 * 'blockCount': (9, int), | |
27465 */ | |
27466 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 716, __pyx_L1_error) | |
27467 __Pyx_GOTREF(__pyx_t_5); | |
27468 __Pyx_INCREF(__pyx_int_7); | |
27469 __Pyx_GIVEREF(__pyx_int_7); | |
27470 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_7)) __PYX_ERR(0, 716, __pyx_L1_error); | |
27471 __Pyx_INCREF((PyObject *)(&PyInt_Type)); | |
27472 __Pyx_GIVEREF((PyObject *)(&PyInt_Type)); | |
27473 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 716, __pyx_L1_error); | |
27474 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_thickEnd, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27475 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27476 | |
27477 /* "pysam/libctabixproxies.pyx":717 | |
27478 * 'thickStart' : (6, int), | |
27479 * 'thickEnd' : (7, int), | |
27480 * 'itemRGB' : (8, str), # <<<<<<<<<<<<<< | |
27481 * 'blockCount': (9, int), | |
27482 * 'blockSizes': (10, str), | |
27483 */ | |
27484 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 717, __pyx_L1_error) | |
27485 __Pyx_GOTREF(__pyx_t_5); | |
27486 __Pyx_INCREF(__pyx_int_8); | |
27487 __Pyx_GIVEREF(__pyx_int_8); | |
27488 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_8)) __PYX_ERR(0, 717, __pyx_L1_error); | |
27489 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27490 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27491 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 717, __pyx_L1_error); | |
27492 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_itemRGB, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27493 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27494 | |
27495 /* "pysam/libctabixproxies.pyx":718 | |
27496 * 'thickEnd' : (7, int), | |
27497 * 'itemRGB' : (8, str), | |
27498 * 'blockCount': (9, int), # <<<<<<<<<<<<<< | |
27499 * 'blockSizes': (10, str), | |
27500 * 'blockStarts': (11, str), } | |
27501 */ | |
27502 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 718, __pyx_L1_error) | |
27503 __Pyx_GOTREF(__pyx_t_5); | |
27504 __Pyx_INCREF(__pyx_int_9); | |
27505 __Pyx_GIVEREF(__pyx_int_9); | |
27506 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_9)) __PYX_ERR(0, 718, __pyx_L1_error); | |
27507 __Pyx_INCREF((PyObject *)(&PyInt_Type)); | |
27508 __Pyx_GIVEREF((PyObject *)(&PyInt_Type)); | |
27509 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 718, __pyx_L1_error); | |
27510 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_blockCount, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27511 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27512 | |
27513 /* "pysam/libctabixproxies.pyx":719 | |
27514 * 'itemRGB' : (8, str), | |
27515 * 'blockCount': (9, int), | |
27516 * 'blockSizes': (10, str), # <<<<<<<<<<<<<< | |
27517 * 'blockStarts': (11, str), } | |
27518 * | |
27519 */ | |
27520 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 719, __pyx_L1_error) | |
27521 __Pyx_GOTREF(__pyx_t_5); | |
27522 __Pyx_INCREF(__pyx_int_10); | |
27523 __Pyx_GIVEREF(__pyx_int_10); | |
27524 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_10)) __PYX_ERR(0, 719, __pyx_L1_error); | |
27525 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27526 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27527 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 719, __pyx_L1_error); | |
27528 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_blockSizes, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27529 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27530 | |
27531 /* "pysam/libctabixproxies.pyx":720 | |
27532 * 'blockCount': (9, int), | |
27533 * 'blockSizes': (10, str), | |
27534 * 'blockStarts': (11, str), } # <<<<<<<<<<<<<< | |
27535 * | |
27536 * cpdef int getMinFields(self): | |
27537 */ | |
27538 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 720, __pyx_L1_error) | |
27539 __Pyx_GOTREF(__pyx_t_5); | |
27540 __Pyx_INCREF(__pyx_int_11); | |
27541 __Pyx_GIVEREF(__pyx_int_11); | |
27542 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_11)) __PYX_ERR(0, 720, __pyx_L1_error); | |
27543 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27544 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27545 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 720, __pyx_L1_error); | |
27546 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_blockStarts, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) | |
27547 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27548 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_BedProxy, __pyx_n_s_map_key2field, __pyx_t_2) < 0) __PYX_ERR(0, 708, __pyx_L1_error) | |
27549 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27550 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_BedProxy); | |
27551 | |
27552 /* "pysam/libctabixproxies.pyx":722 | |
27553 * 'blockStarts': (11, str), } | |
27554 * | |
27555 * cpdef int getMinFields(self): # <<<<<<<<<<<<<< | |
27556 * '''return minimum number of fields.''' | |
27557 * return 3 | |
27558 */ | |
27559 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8BedProxy_1getMinFields, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BedProxy_getMinFields, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error) | |
27560 __Pyx_GOTREF(__pyx_t_2); | |
27561 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_BedProxy, __pyx_n_s_getMinFields, __pyx_t_2) < 0) __PYX_ERR(0, 722, __pyx_L1_error) | |
27562 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27563 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_BedProxy); | |
27564 | |
27565 /* "pysam/libctabixproxies.pyx":726 | |
27566 * return 3 | |
27567 * | |
27568 * cpdef int getMaxFields(self): # <<<<<<<<<<<<<< | |
27569 * '''return max number of fields.''' | |
27570 * return 12 | |
27571 */ | |
27572 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8BedProxy_3getMaxFields, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BedProxy_getMaxFields, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error) | |
27573 __Pyx_GOTREF(__pyx_t_2); | |
27574 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_BedProxy, __pyx_n_s_getMaxFields, __pyx_t_2) < 0) __PYX_ERR(0, 726, __pyx_L1_error) | |
27575 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27576 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_BedProxy); | |
27577 | |
27578 /* "(tree fragment)":1 | |
27579 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
27580 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27581 * def __setstate_cython__(self, __pyx_state): | |
27582 */ | |
27583 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8BedProxy_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BedProxy___reduce_cython, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) | |
27584 __Pyx_GOTREF(__pyx_t_2); | |
27585 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) | |
27586 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27587 | |
27588 /* "(tree fragment)":3 | |
27589 * def __reduce_cython__(self): | |
27590 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27591 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
27592 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27593 */ | |
27594 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8BedProxy_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BedProxy___setstate_cython, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) | |
27595 __Pyx_GOTREF(__pyx_t_2); | |
27596 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) | |
27597 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27598 | |
27599 /* "pysam/libctabixproxies.pyx":783 | |
27600 * ''' | |
27601 * map_key2field = { | |
27602 * 'contig' : (0, str), # <<<<<<<<<<<<<< | |
27603 * 'pos' : (1, int), | |
27604 * 'id' : (2, str), | |
27605 */ | |
27606 __pyx_t_2 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error) | |
27607 __Pyx_GOTREF(__pyx_t_2); | |
27608 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 783, __pyx_L1_error) | |
27609 __Pyx_GOTREF(__pyx_t_5); | |
27610 __Pyx_INCREF(__pyx_int_0); | |
27611 __Pyx_GIVEREF(__pyx_int_0); | |
27612 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0)) __PYX_ERR(0, 783, __pyx_L1_error); | |
27613 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27614 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27615 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 783, __pyx_L1_error); | |
27616 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_contig, __pyx_t_5) < 0) __PYX_ERR(0, 783, __pyx_L1_error) | |
27617 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27618 | |
27619 /* "pysam/libctabixproxies.pyx":784 | |
27620 * map_key2field = { | |
27621 * 'contig' : (0, str), | |
27622 * 'pos' : (1, int), # <<<<<<<<<<<<<< | |
27623 * 'id' : (2, str), | |
27624 * 'ref' : (3, str), | |
27625 */ | |
27626 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 784, __pyx_L1_error) | |
27627 __Pyx_GOTREF(__pyx_t_5); | |
27628 __Pyx_INCREF(__pyx_int_1); | |
27629 __Pyx_GIVEREF(__pyx_int_1); | |
27630 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_1)) __PYX_ERR(0, 784, __pyx_L1_error); | |
27631 __Pyx_INCREF((PyObject *)(&PyInt_Type)); | |
27632 __Pyx_GIVEREF((PyObject *)(&PyInt_Type)); | |
27633 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 784, __pyx_L1_error); | |
27634 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_pos, __pyx_t_5) < 0) __PYX_ERR(0, 783, __pyx_L1_error) | |
27635 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27636 | |
27637 /* "pysam/libctabixproxies.pyx":785 | |
27638 * 'contig' : (0, str), | |
27639 * 'pos' : (1, int), | |
27640 * 'id' : (2, str), # <<<<<<<<<<<<<< | |
27641 * 'ref' : (3, str), | |
27642 * 'alt' : (4, str), | |
27643 */ | |
27644 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 785, __pyx_L1_error) | |
27645 __Pyx_GOTREF(__pyx_t_5); | |
27646 __Pyx_INCREF(__pyx_int_2); | |
27647 __Pyx_GIVEREF(__pyx_int_2); | |
27648 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_2)) __PYX_ERR(0, 785, __pyx_L1_error); | |
27649 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27650 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27651 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 785, __pyx_L1_error); | |
27652 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_id, __pyx_t_5) < 0) __PYX_ERR(0, 783, __pyx_L1_error) | |
27653 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27654 | |
27655 /* "pysam/libctabixproxies.pyx":786 | |
27656 * 'pos' : (1, int), | |
27657 * 'id' : (2, str), | |
27658 * 'ref' : (3, str), # <<<<<<<<<<<<<< | |
27659 * 'alt' : (4, str), | |
27660 * 'qual' : (5, str), | |
27661 */ | |
27662 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 786, __pyx_L1_error) | |
27663 __Pyx_GOTREF(__pyx_t_5); | |
27664 __Pyx_INCREF(__pyx_int_3); | |
27665 __Pyx_GIVEREF(__pyx_int_3); | |
27666 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_3)) __PYX_ERR(0, 786, __pyx_L1_error); | |
27667 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27668 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27669 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 786, __pyx_L1_error); | |
27670 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_ref, __pyx_t_5) < 0) __PYX_ERR(0, 783, __pyx_L1_error) | |
27671 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27672 | |
27673 /* "pysam/libctabixproxies.pyx":787 | |
27674 * 'id' : (2, str), | |
27675 * 'ref' : (3, str), | |
27676 * 'alt' : (4, str), # <<<<<<<<<<<<<< | |
27677 * 'qual' : (5, str), | |
27678 * 'filter' : (6, str), | |
27679 */ | |
27680 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 787, __pyx_L1_error) | |
27681 __Pyx_GOTREF(__pyx_t_5); | |
27682 __Pyx_INCREF(__pyx_int_4); | |
27683 __Pyx_GIVEREF(__pyx_int_4); | |
27684 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_4)) __PYX_ERR(0, 787, __pyx_L1_error); | |
27685 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27686 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27687 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 787, __pyx_L1_error); | |
27688 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_alt, __pyx_t_5) < 0) __PYX_ERR(0, 783, __pyx_L1_error) | |
27689 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27690 | |
27691 /* "pysam/libctabixproxies.pyx":788 | |
27692 * 'ref' : (3, str), | |
27693 * 'alt' : (4, str), | |
27694 * 'qual' : (5, str), # <<<<<<<<<<<<<< | |
27695 * 'filter' : (6, str), | |
27696 * 'info' : (7, str), | |
27697 */ | |
27698 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 788, __pyx_L1_error) | |
27699 __Pyx_GOTREF(__pyx_t_5); | |
27700 __Pyx_INCREF(__pyx_int_5); | |
27701 __Pyx_GIVEREF(__pyx_int_5); | |
27702 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_5)) __PYX_ERR(0, 788, __pyx_L1_error); | |
27703 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27704 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27705 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 788, __pyx_L1_error); | |
27706 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_qual, __pyx_t_5) < 0) __PYX_ERR(0, 783, __pyx_L1_error) | |
27707 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27708 | |
27709 /* "pysam/libctabixproxies.pyx":789 | |
27710 * 'alt' : (4, str), | |
27711 * 'qual' : (5, str), | |
27712 * 'filter' : (6, str), # <<<<<<<<<<<<<< | |
27713 * 'info' : (7, str), | |
27714 * 'format' : (8, str) } | |
27715 */ | |
27716 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 789, __pyx_L1_error) | |
27717 __Pyx_GOTREF(__pyx_t_5); | |
27718 __Pyx_INCREF(__pyx_int_6); | |
27719 __Pyx_GIVEREF(__pyx_int_6); | |
27720 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_6)) __PYX_ERR(0, 789, __pyx_L1_error); | |
27721 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27722 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27723 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 789, __pyx_L1_error); | |
27724 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_filter, __pyx_t_5) < 0) __PYX_ERR(0, 783, __pyx_L1_error) | |
27725 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27726 | |
27727 /* "pysam/libctabixproxies.pyx":790 | |
27728 * 'qual' : (5, str), | |
27729 * 'filter' : (6, str), | |
27730 * 'info' : (7, str), # <<<<<<<<<<<<<< | |
27731 * 'format' : (8, str) } | |
27732 * | |
27733 */ | |
27734 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 790, __pyx_L1_error) | |
27735 __Pyx_GOTREF(__pyx_t_5); | |
27736 __Pyx_INCREF(__pyx_int_7); | |
27737 __Pyx_GIVEREF(__pyx_int_7); | |
27738 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_7)) __PYX_ERR(0, 790, __pyx_L1_error); | |
27739 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27740 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27741 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 790, __pyx_L1_error); | |
27742 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_info, __pyx_t_5) < 0) __PYX_ERR(0, 783, __pyx_L1_error) | |
27743 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27744 | |
27745 /* "pysam/libctabixproxies.pyx":791 | |
27746 * 'filter' : (6, str), | |
27747 * 'info' : (7, str), | |
27748 * 'format' : (8, str) } # <<<<<<<<<<<<<< | |
27749 * | |
27750 * def __cinit__(self): | |
27751 */ | |
27752 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L1_error) | |
27753 __Pyx_GOTREF(__pyx_t_5); | |
27754 __Pyx_INCREF(__pyx_int_8); | |
27755 __Pyx_GIVEREF(__pyx_int_8); | |
27756 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_8)) __PYX_ERR(0, 791, __pyx_L1_error); | |
27757 __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); | |
27758 __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); | |
27759 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 791, __pyx_L1_error); | |
27760 if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_format, __pyx_t_5) < 0) __PYX_ERR(0, 783, __pyx_L1_error) | |
27761 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; | |
27762 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_VCFProxy, __pyx_n_s_map_key2field, __pyx_t_2) < 0) __PYX_ERR(0, 782, __pyx_L1_error) | |
27763 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27764 PyType_Modified(__pyx_ptype_5pysam_16libctabixproxies_VCFProxy); | |
27765 | |
27766 /* "(tree fragment)":1 | |
27767 * def __reduce_cython__(self): # <<<<<<<<<<<<<< | |
27768 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27769 * def __setstate_cython__(self, __pyx_state): | |
27770 */ | |
27771 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8VCFProxy_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VCFProxy___reduce_cython, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) | |
27772 __Pyx_GOTREF(__pyx_t_2); | |
27773 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) | |
27774 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27775 | |
27776 /* "(tree fragment)":3 | |
27777 * def __reduce_cython__(self): | |
27778 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27779 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< | |
27780 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" | |
27781 */ | |
27782 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_8VCFProxy_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VCFProxy___setstate_cython, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) | |
27783 __Pyx_GOTREF(__pyx_t_2); | |
27784 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) | |
27785 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27786 | |
27787 /* "pysam/libctabixproxies.pyx":829 | |
27788 * | |
27789 * | |
27790 * __all__ = [ # <<<<<<<<<<<<<< | |
27791 * "TupleProxy", | |
27792 * "NamedTupleProxy", | |
27793 */ | |
27794 __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error) | |
27795 __Pyx_GOTREF(__pyx_t_2); | |
27796 __Pyx_INCREF(__pyx_n_u_TupleProxy); | |
27797 __Pyx_GIVEREF(__pyx_n_u_TupleProxy); | |
27798 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_TupleProxy)) __PYX_ERR(0, 829, __pyx_L1_error); | |
27799 __Pyx_INCREF(__pyx_n_u_NamedTupleProxy); | |
27800 __Pyx_GIVEREF(__pyx_n_u_NamedTupleProxy); | |
27801 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_NamedTupleProxy)) __PYX_ERR(0, 829, __pyx_L1_error); | |
27802 __Pyx_INCREF(__pyx_n_u_GTFProxy); | |
27803 __Pyx_GIVEREF(__pyx_n_u_GTFProxy); | |
27804 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_GTFProxy)) __PYX_ERR(0, 829, __pyx_L1_error); | |
27805 __Pyx_INCREF(__pyx_n_u_GFF3Proxy); | |
27806 __Pyx_GIVEREF(__pyx_n_u_GFF3Proxy); | |
27807 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_u_GFF3Proxy)) __PYX_ERR(0, 829, __pyx_L1_error); | |
27808 __Pyx_INCREF(__pyx_n_u_BedProxy); | |
27809 __Pyx_GIVEREF(__pyx_n_u_BedProxy); | |
27810 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_u_BedProxy)) __PYX_ERR(0, 829, __pyx_L1_error); | |
27811 __Pyx_INCREF(__pyx_n_u_VCFProxy); | |
27812 __Pyx_GIVEREF(__pyx_n_u_VCFProxy); | |
27813 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_u_VCFProxy)) __PYX_ERR(0, 829, __pyx_L1_error); | |
27814 if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_2) < 0) __PYX_ERR(0, 829, __pyx_L1_error) | |
27815 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27816 | |
27817 /* "(tree fragment)":1 | |
27818 * def __pyx_unpickle_TupleProxyIterator(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< | |
27819 * cdef object __pyx_PickleError | |
27820 * cdef object __pyx_result | |
27821 */ | |
27822 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_16libctabixproxies_5__pyx_unpickle_TupleProxyIterator, 0, __pyx_n_s_pyx_unpickle_TupleProxyIterato, NULL, __pyx_n_s_pysam_libctabixproxies, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) | |
27823 __Pyx_GOTREF(__pyx_t_2); | |
27824 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TupleProxyIterato, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) | |
27825 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27826 | |
27827 /* "pysam/libctabixproxies.pyx":1 | |
27828 * from cpython cimport PyBytes_FromStringAndSize # <<<<<<<<<<<<<< | |
27829 * | |
27830 * from libc.stdio cimport printf, feof, fgets | |
27831 */ | |
27832 __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) | |
27833 __Pyx_GOTREF(__pyx_t_2); | |
27834 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) | |
27835 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; | |
27836 | |
27837 /*--- Wrapped vars code ---*/ | |
27838 | |
27839 goto __pyx_L0; | |
27840 __pyx_L1_error:; | |
27841 __Pyx_XDECREF(__pyx_t_2); | |
27842 __Pyx_XDECREF(__pyx_t_3); | |
27843 __Pyx_XDECREF(__pyx_t_4); | |
27844 __Pyx_XDECREF(__pyx_t_5); | |
27845 if (__pyx_m) { | |
27846 if (__pyx_d && stringtab_initialized) { | |
27847 __Pyx_AddTraceback("init pysam.libctabixproxies", __pyx_clineno, __pyx_lineno, __pyx_filename); | |
27848 } | |
27849 #if !CYTHON_USE_MODULE_STATE | |
27850 Py_CLEAR(__pyx_m); | |
27851 #else | |
27852 Py_DECREF(__pyx_m); | |
27853 if (pystate_addmodule_run) { | |
27854 PyObject *tp, *value, *tb; | |
27855 PyErr_Fetch(&tp, &value, &tb); | |
27856 PyState_RemoveModule(&__pyx_moduledef); | |
27857 PyErr_Restore(tp, value, tb); | |
27858 } | |
27859 #endif | |
27860 } else if (!PyErr_Occurred()) { | |
27861 PyErr_SetString(PyExc_ImportError, "init pysam.libctabixproxies"); | |
27862 } | |
27863 __pyx_L0:; | |
27864 __Pyx_RefNannyFinishContext(); | |
27865 #if CYTHON_PEP489_MULTI_PHASE_INIT | |
27866 return (__pyx_m != NULL) ? 0 : -1; | |
27867 #elif PY_MAJOR_VERSION >= 3 | |
27868 return __pyx_m; | |
27869 #else | |
27870 return; | |
27871 #endif | |
27872 } | |
27873 /* #### Code section: cleanup_globals ### */ | |
27874 /* #### Code section: cleanup_module ### */ | |
27875 /* #### Code section: main_method ### */ | |
27876 /* #### Code section: utility_code_pragmas ### */ | |
27877 #ifdef _MSC_VER | |
27878 #pragma warning( push ) | |
27879 /* Warning 4127: conditional expression is constant | |
27880 * Cython uses constant conditional expressions to allow in inline functions to be optimized at | |
27881 * compile-time, so this warning is not useful | |
27882 */ | |
27883 #pragma warning( disable : 4127 ) | |
27884 #endif | |
27885 | |
27886 | |
27887 | |
27888 /* #### Code section: utility_code_def ### */ | |
27889 | |
27890 /* --- Runtime support code --- */ | |
27891 /* Refnanny */ | |
27892 #if CYTHON_REFNANNY | |
27893 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { | |
27894 PyObject *m = NULL, *p = NULL; | |
27895 void *r = NULL; | |
27896 m = PyImport_ImportModule(modname); | |
27897 if (!m) goto end; | |
27898 p = PyObject_GetAttrString(m, "RefNannyAPI"); | |
27899 if (!p) goto end; | |
27900 r = PyLong_AsVoidPtr(p); | |
27901 end: | |
27902 Py_XDECREF(p); | |
27903 Py_XDECREF(m); | |
27904 return (__Pyx_RefNannyAPIStruct *)r; | |
27905 } | |
27906 #endif | |
27907 | |
27908 /* PyErrExceptionMatches */ | |
27909 #if CYTHON_FAST_THREAD_STATE | |
27910 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { | |
27911 Py_ssize_t i, n; | |
27912 n = PyTuple_GET_SIZE(tuple); | |
27913 #if PY_MAJOR_VERSION >= 3 | |
27914 for (i=0; i<n; i++) { | |
27915 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1; | |
27916 } | |
27917 #endif | |
27918 for (i=0; i<n; i++) { | |
27919 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1; | |
27920 } | |
27921 return 0; | |
27922 } | |
27923 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) { | |
27924 int result; | |
27925 PyObject *exc_type; | |
27926 #if PY_VERSION_HEX >= 0x030C00A6 | |
27927 PyObject *current_exception = tstate->current_exception; | |
27928 if (unlikely(!current_exception)) return 0; | |
27929 exc_type = (PyObject*) Py_TYPE(current_exception); | |
27930 if (exc_type == err) return 1; | |
27931 #else | |
27932 exc_type = tstate->curexc_type; | |
27933 if (exc_type == err) return 1; | |
27934 if (unlikely(!exc_type)) return 0; | |
27935 #endif | |
27936 #if CYTHON_AVOID_BORROWED_REFS | |
27937 Py_INCREF(exc_type); | |
27938 #endif | |
27939 if (unlikely(PyTuple_Check(err))) { | |
27940 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); | |
27941 } else { | |
27942 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); | |
27943 } | |
27944 #if CYTHON_AVOID_BORROWED_REFS | |
27945 Py_DECREF(exc_type); | |
27946 #endif | |
27947 return result; | |
27948 } | |
27949 #endif | |
27950 | |
27951 /* PyErrFetchRestore */ | |
27952 #if CYTHON_FAST_THREAD_STATE | |
27953 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { | |
27954 #if PY_VERSION_HEX >= 0x030C00A6 | |
27955 PyObject *tmp_value; | |
27956 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); | |
27957 if (value) { | |
27958 #if CYTHON_COMPILING_IN_CPYTHON | |
27959 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) | |
27960 #endif | |
27961 PyException_SetTraceback(value, tb); | |
27962 } | |
27963 tmp_value = tstate->current_exception; | |
27964 tstate->current_exception = value; | |
27965 Py_XDECREF(tmp_value); | |
27966 Py_XDECREF(type); | |
27967 Py_XDECREF(tb); | |
27968 #else | |
27969 PyObject *tmp_type, *tmp_value, *tmp_tb; | |
27970 tmp_type = tstate->curexc_type; | |
27971 tmp_value = tstate->curexc_value; | |
27972 tmp_tb = tstate->curexc_traceback; | |
27973 tstate->curexc_type = type; | |
27974 tstate->curexc_value = value; | |
27975 tstate->curexc_traceback = tb; | |
27976 Py_XDECREF(tmp_type); | |
27977 Py_XDECREF(tmp_value); | |
27978 Py_XDECREF(tmp_tb); | |
27979 #endif | |
27980 } | |
27981 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { | |
27982 #if PY_VERSION_HEX >= 0x030C00A6 | |
27983 PyObject* exc_value; | |
27984 exc_value = tstate->current_exception; | |
27985 tstate->current_exception = 0; | |
27986 *value = exc_value; | |
27987 *type = NULL; | |
27988 *tb = NULL; | |
27989 if (exc_value) { | |
27990 *type = (PyObject*) Py_TYPE(exc_value); | |
27991 Py_INCREF(*type); | |
27992 #if CYTHON_COMPILING_IN_CPYTHON | |
27993 *tb = ((PyBaseExceptionObject*) exc_value)->traceback; | |
27994 Py_XINCREF(*tb); | |
27995 #else | |
27996 *tb = PyException_GetTraceback(exc_value); | |
27997 #endif | |
27998 } | |
27999 #else | |
28000 *type = tstate->curexc_type; | |
28001 *value = tstate->curexc_value; | |
28002 *tb = tstate->curexc_traceback; | |
28003 tstate->curexc_type = 0; | |
28004 tstate->curexc_value = 0; | |
28005 tstate->curexc_traceback = 0; | |
28006 #endif | |
28007 } | |
28008 #endif | |
28009 | |
28010 /* PyObjectGetAttrStr */ | |
28011 #if CYTHON_USE_TYPE_SLOTS | |
28012 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { | |
28013 PyTypeObject* tp = Py_TYPE(obj); | |
28014 if (likely(tp->tp_getattro)) | |
28015 return tp->tp_getattro(obj, attr_name); | |
28016 #if PY_MAJOR_VERSION < 3 | |
28017 if (likely(tp->tp_getattr)) | |
28018 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); | |
28019 #endif | |
28020 return PyObject_GetAttr(obj, attr_name); | |
28021 } | |
28022 #endif | |
28023 | |
28024 /* PyObjectGetAttrStrNoError */ | |
28025 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 | |
28026 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { | |
28027 __Pyx_PyThreadState_declare | |
28028 __Pyx_PyThreadState_assign | |
28029 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) | |
28030 __Pyx_PyErr_Clear(); | |
28031 } | |
28032 #endif | |
28033 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { | |
28034 PyObject *result; | |
28035 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 | |
28036 (void) PyObject_GetOptionalAttr(obj, attr_name, &result); | |
28037 return result; | |
28038 #else | |
28039 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 | |
28040 PyTypeObject* tp = Py_TYPE(obj); | |
28041 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { | |
28042 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); | |
28043 } | |
28044 #endif | |
28045 result = __Pyx_PyObject_GetAttrStr(obj, attr_name); | |
28046 if (unlikely(!result)) { | |
28047 __Pyx_PyObject_GetAttrStr_ClearAttributeError(); | |
28048 } | |
28049 return result; | |
28050 #endif | |
28051 } | |
28052 | |
28053 /* GetBuiltinName */ | |
28054 static PyObject *__Pyx_GetBuiltinName(PyObject *name) { | |
28055 PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); | |
28056 if (unlikely(!result) && !PyErr_Occurred()) { | |
28057 PyErr_Format(PyExc_NameError, | |
28058 #if PY_MAJOR_VERSION >= 3 | |
28059 "name '%U' is not defined", name); | |
28060 #else | |
28061 "name '%.200s' is not defined", PyString_AS_STRING(name)); | |
28062 #endif | |
28063 } | |
28064 return result; | |
28065 } | |
28066 | |
28067 /* TupleAndListFromArray */ | |
28068 #if CYTHON_COMPILING_IN_CPYTHON | |
28069 static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { | |
28070 PyObject *v; | |
28071 Py_ssize_t i; | |
28072 for (i = 0; i < length; i++) { | |
28073 v = dest[i] = src[i]; | |
28074 Py_INCREF(v); | |
28075 } | |
28076 } | |
28077 static CYTHON_INLINE PyObject * | |
28078 __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) | |
28079 { | |
28080 PyObject *res; | |
28081 if (n <= 0) { | |
28082 Py_INCREF(__pyx_empty_tuple); | |
28083 return __pyx_empty_tuple; | |
28084 } | |
28085 res = PyTuple_New(n); | |
28086 if (unlikely(res == NULL)) return NULL; | |
28087 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); | |
28088 return res; | |
28089 } | |
28090 static CYTHON_INLINE PyObject * | |
28091 __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) | |
28092 { | |
28093 PyObject *res; | |
28094 if (n <= 0) { | |
28095 return PyList_New(0); | |
28096 } | |
28097 res = PyList_New(n); | |
28098 if (unlikely(res == NULL)) return NULL; | |
28099 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); | |
28100 return res; | |
28101 } | |
28102 #endif | |
28103 | |
28104 /* BytesEquals */ | |
28105 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { | |
28106 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API | |
28107 return PyObject_RichCompareBool(s1, s2, equals); | |
28108 #else | |
28109 if (s1 == s2) { | |
28110 return (equals == Py_EQ); | |
28111 } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { | |
28112 const char *ps1, *ps2; | |
28113 Py_ssize_t length = PyBytes_GET_SIZE(s1); | |
28114 if (length != PyBytes_GET_SIZE(s2)) | |
28115 return (equals == Py_NE); | |
28116 ps1 = PyBytes_AS_STRING(s1); | |
28117 ps2 = PyBytes_AS_STRING(s2); | |
28118 if (ps1[0] != ps2[0]) { | |
28119 return (equals == Py_NE); | |
28120 } else if (length == 1) { | |
28121 return (equals == Py_EQ); | |
28122 } else { | |
28123 int result; | |
28124 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) | |
28125 Py_hash_t hash1, hash2; | |
28126 hash1 = ((PyBytesObject*)s1)->ob_shash; | |
28127 hash2 = ((PyBytesObject*)s2)->ob_shash; | |
28128 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { | |
28129 return (equals == Py_NE); | |
28130 } | |
28131 #endif | |
28132 result = memcmp(ps1, ps2, (size_t)length); | |
28133 return (equals == Py_EQ) ? (result == 0) : (result != 0); | |
28134 } | |
28135 } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { | |
28136 return (equals == Py_NE); | |
28137 } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { | |
28138 return (equals == Py_NE); | |
28139 } else { | |
28140 int result; | |
28141 PyObject* py_result = PyObject_RichCompare(s1, s2, equals); | |
28142 if (!py_result) | |
28143 return -1; | |
28144 result = __Pyx_PyObject_IsTrue(py_result); | |
28145 Py_DECREF(py_result); | |
28146 return result; | |
28147 } | |
28148 #endif | |
28149 } | |
28150 | |
28151 /* UnicodeEquals */ | |
28152 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { | |
28153 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API | |
28154 return PyObject_RichCompareBool(s1, s2, equals); | |
28155 #else | |
28156 #if PY_MAJOR_VERSION < 3 | |
28157 PyObject* owned_ref = NULL; | |
28158 #endif | |
28159 int s1_is_unicode, s2_is_unicode; | |
28160 if (s1 == s2) { | |
28161 goto return_eq; | |
28162 } | |
28163 s1_is_unicode = PyUnicode_CheckExact(s1); | |
28164 s2_is_unicode = PyUnicode_CheckExact(s2); | |
28165 #if PY_MAJOR_VERSION < 3 | |
28166 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { | |
28167 owned_ref = PyUnicode_FromObject(s2); | |
28168 if (unlikely(!owned_ref)) | |
28169 return -1; | |
28170 s2 = owned_ref; | |
28171 s2_is_unicode = 1; | |
28172 } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { | |
28173 owned_ref = PyUnicode_FromObject(s1); | |
28174 if (unlikely(!owned_ref)) | |
28175 return -1; | |
28176 s1 = owned_ref; | |
28177 s1_is_unicode = 1; | |
28178 } else if (((!s2_is_unicode) & (!s1_is_unicode))) { | |
28179 return __Pyx_PyBytes_Equals(s1, s2, equals); | |
28180 } | |
28181 #endif | |
28182 if (s1_is_unicode & s2_is_unicode) { | |
28183 Py_ssize_t length; | |
28184 int kind; | |
28185 void *data1, *data2; | |
28186 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) | |
28187 return -1; | |
28188 length = __Pyx_PyUnicode_GET_LENGTH(s1); | |
28189 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { | |
28190 goto return_ne; | |
28191 } | |
28192 #if CYTHON_USE_UNICODE_INTERNALS | |
28193 { | |
28194 Py_hash_t hash1, hash2; | |
28195 #if CYTHON_PEP393_ENABLED | |
28196 hash1 = ((PyASCIIObject*)s1)->hash; | |
28197 hash2 = ((PyASCIIObject*)s2)->hash; | |
28198 #else | |
28199 hash1 = ((PyUnicodeObject*)s1)->hash; | |
28200 hash2 = ((PyUnicodeObject*)s2)->hash; | |
28201 #endif | |
28202 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { | |
28203 goto return_ne; | |
28204 } | |
28205 } | |
28206 #endif | |
28207 kind = __Pyx_PyUnicode_KIND(s1); | |
28208 if (kind != __Pyx_PyUnicode_KIND(s2)) { | |
28209 goto return_ne; | |
28210 } | |
28211 data1 = __Pyx_PyUnicode_DATA(s1); | |
28212 data2 = __Pyx_PyUnicode_DATA(s2); | |
28213 if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { | |
28214 goto return_ne; | |
28215 } else if (length == 1) { | |
28216 goto return_eq; | |
28217 } else { | |
28218 int result = memcmp(data1, data2, (size_t)(length * kind)); | |
28219 #if PY_MAJOR_VERSION < 3 | |
28220 Py_XDECREF(owned_ref); | |
28221 #endif | |
28222 return (equals == Py_EQ) ? (result == 0) : (result != 0); | |
28223 } | |
28224 } else if ((s1 == Py_None) & s2_is_unicode) { | |
28225 goto return_ne; | |
28226 } else if ((s2 == Py_None) & s1_is_unicode) { | |
28227 goto return_ne; | |
28228 } else { | |
28229 int result; | |
28230 PyObject* py_result = PyObject_RichCompare(s1, s2, equals); | |
28231 #if PY_MAJOR_VERSION < 3 | |
28232 Py_XDECREF(owned_ref); | |
28233 #endif | |
28234 if (!py_result) | |
28235 return -1; | |
28236 result = __Pyx_PyObject_IsTrue(py_result); | |
28237 Py_DECREF(py_result); | |
28238 return result; | |
28239 } | |
28240 return_eq: | |
28241 #if PY_MAJOR_VERSION < 3 | |
28242 Py_XDECREF(owned_ref); | |
28243 #endif | |
28244 return (equals == Py_EQ); | |
28245 return_ne: | |
28246 #if PY_MAJOR_VERSION < 3 | |
28247 Py_XDECREF(owned_ref); | |
28248 #endif | |
28249 return (equals == Py_NE); | |
28250 #endif | |
28251 } | |
28252 | |
28253 /* fastcall */ | |
28254 #if CYTHON_METH_FASTCALL | |
28255 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) | |
28256 { | |
28257 Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); | |
28258 for (i = 0; i < n; i++) | |
28259 { | |
28260 if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; | |
28261 } | |
28262 for (i = 0; i < n; i++) | |
28263 { | |
28264 int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); | |
28265 if (unlikely(eq != 0)) { | |
28266 if (unlikely(eq < 0)) return NULL; | |
28267 return kwvalues[i]; | |
28268 } | |
28269 } | |
28270 return NULL; | |
28271 } | |
28272 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 | |
28273 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { | |
28274 Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); | |
28275 PyObject *dict; | |
28276 dict = PyDict_New(); | |
28277 if (unlikely(!dict)) | |
28278 return NULL; | |
28279 for (i=0; i<nkwargs; i++) { | |
28280 PyObject *key = PyTuple_GET_ITEM(kwnames, i); | |
28281 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0)) | |
28282 goto bad; | |
28283 } | |
28284 return dict; | |
28285 bad: | |
28286 Py_DECREF(dict); | |
28287 return NULL; | |
28288 } | |
28289 #endif | |
28290 #endif | |
28291 | |
28292 /* RaiseDoubleKeywords */ | |
28293 static void __Pyx_RaiseDoubleKeywordsError( | |
28294 const char* func_name, | |
28295 PyObject* kw_name) | |
28296 { | |
28297 PyErr_Format(PyExc_TypeError, | |
28298 #if PY_MAJOR_VERSION >= 3 | |
28299 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); | |
28300 #else | |
28301 "%s() got multiple values for keyword argument '%s'", func_name, | |
28302 PyString_AsString(kw_name)); | |
28303 #endif | |
28304 } | |
28305 | |
28306 /* ParseKeywords */ | |
28307 static int __Pyx_ParseOptionalKeywords( | |
28308 PyObject *kwds, | |
28309 PyObject *const *kwvalues, | |
28310 PyObject **argnames[], | |
28311 PyObject *kwds2, | |
28312 PyObject *values[], | |
28313 Py_ssize_t num_pos_args, | |
28314 const char* function_name) | |
28315 { | |
28316 PyObject *key = 0, *value = 0; | |
28317 Py_ssize_t pos = 0; | |
28318 PyObject*** name; | |
28319 PyObject*** first_kw_arg = argnames + num_pos_args; | |
28320 int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); | |
28321 while (1) { | |
28322 Py_XDECREF(key); key = NULL; | |
28323 Py_XDECREF(value); value = NULL; | |
28324 if (kwds_is_tuple) { | |
28325 Py_ssize_t size; | |
28326 #if CYTHON_ASSUME_SAFE_MACROS | |
28327 size = PyTuple_GET_SIZE(kwds); | |
28328 #else | |
28329 size = PyTuple_Size(kwds); | |
28330 if (size < 0) goto bad; | |
28331 #endif | |
28332 if (pos >= size) break; | |
28333 #if CYTHON_AVOID_BORROWED_REFS | |
28334 key = __Pyx_PySequence_ITEM(kwds, pos); | |
28335 if (!key) goto bad; | |
28336 #elif CYTHON_ASSUME_SAFE_MACROS | |
28337 key = PyTuple_GET_ITEM(kwds, pos); | |
28338 #else | |
28339 key = PyTuple_GetItem(kwds, pos); | |
28340 if (!key) goto bad; | |
28341 #endif | |
28342 value = kwvalues[pos]; | |
28343 pos++; | |
28344 } | |
28345 else | |
28346 { | |
28347 if (!PyDict_Next(kwds, &pos, &key, &value)) break; | |
28348 #if CYTHON_AVOID_BORROWED_REFS | |
28349 Py_INCREF(key); | |
28350 #endif | |
28351 } | |
28352 name = first_kw_arg; | |
28353 while (*name && (**name != key)) name++; | |
28354 if (*name) { | |
28355 values[name-argnames] = value; | |
28356 #if CYTHON_AVOID_BORROWED_REFS | |
28357 Py_INCREF(value); | |
28358 Py_DECREF(key); | |
28359 #endif | |
28360 key = NULL; | |
28361 value = NULL; | |
28362 continue; | |
28363 } | |
28364 #if !CYTHON_AVOID_BORROWED_REFS | |
28365 Py_INCREF(key); | |
28366 #endif | |
28367 Py_INCREF(value); | |
28368 name = first_kw_arg; | |
28369 #if PY_MAJOR_VERSION < 3 | |
28370 if (likely(PyString_Check(key))) { | |
28371 while (*name) { | |
28372 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) | |
28373 && _PyString_Eq(**name, key)) { | |
28374 values[name-argnames] = value; | |
28375 #if CYTHON_AVOID_BORROWED_REFS | |
28376 value = NULL; | |
28377 #endif | |
28378 break; | |
28379 } | |
28380 name++; | |
28381 } | |
28382 if (*name) continue; | |
28383 else { | |
28384 PyObject*** argname = argnames; | |
28385 while (argname != first_kw_arg) { | |
28386 if ((**argname == key) || ( | |
28387 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) | |
28388 && _PyString_Eq(**argname, key))) { | |
28389 goto arg_passed_twice; | |
28390 } | |
28391 argname++; | |
28392 } | |
28393 } | |
28394 } else | |
28395 #endif | |
28396 if (likely(PyUnicode_Check(key))) { | |
28397 while (*name) { | |
28398 int cmp = ( | |
28399 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 | |
28400 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : | |
28401 #endif | |
28402 PyUnicode_Compare(**name, key) | |
28403 ); | |
28404 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; | |
28405 if (cmp == 0) { | |
28406 values[name-argnames] = value; | |
28407 #if CYTHON_AVOID_BORROWED_REFS | |
28408 value = NULL; | |
28409 #endif | |
28410 break; | |
28411 } | |
28412 name++; | |
28413 } | |
28414 if (*name) continue; | |
28415 else { | |
28416 PyObject*** argname = argnames; | |
28417 while (argname != first_kw_arg) { | |
28418 int cmp = (**argname == key) ? 0 : | |
28419 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 | |
28420 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : | |
28421 #endif | |
28422 PyUnicode_Compare(**argname, key); | |
28423 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; | |
28424 if (cmp == 0) goto arg_passed_twice; | |
28425 argname++; | |
28426 } | |
28427 } | |
28428 } else | |
28429 goto invalid_keyword_type; | |
28430 if (kwds2) { | |
28431 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; | |
28432 } else { | |
28433 goto invalid_keyword; | |
28434 } | |
28435 } | |
28436 Py_XDECREF(key); | |
28437 Py_XDECREF(value); | |
28438 return 0; | |
28439 arg_passed_twice: | |
28440 __Pyx_RaiseDoubleKeywordsError(function_name, key); | |
28441 goto bad; | |
28442 invalid_keyword_type: | |
28443 PyErr_Format(PyExc_TypeError, | |
28444 "%.200s() keywords must be strings", function_name); | |
28445 goto bad; | |
28446 invalid_keyword: | |
28447 #if PY_MAJOR_VERSION < 3 | |
28448 PyErr_Format(PyExc_TypeError, | |
28449 "%.200s() got an unexpected keyword argument '%.200s'", | |
28450 function_name, PyString_AsString(key)); | |
28451 #else | |
28452 PyErr_Format(PyExc_TypeError, | |
28453 "%s() got an unexpected keyword argument '%U'", | |
28454 function_name, key); | |
28455 #endif | |
28456 bad: | |
28457 Py_XDECREF(key); | |
28458 Py_XDECREF(value); | |
28459 return -1; | |
28460 } | |
28461 | |
28462 /* RaiseArgTupleInvalid */ | |
28463 static void __Pyx_RaiseArgtupleInvalid( | |
28464 const char* func_name, | |
28465 int exact, | |
28466 Py_ssize_t num_min, | |
28467 Py_ssize_t num_max, | |
28468 Py_ssize_t num_found) | |
28469 { | |
28470 Py_ssize_t num_expected; | |
28471 const char *more_or_less; | |
28472 if (num_found < num_min) { | |
28473 num_expected = num_min; | |
28474 more_or_less = "at least"; | |
28475 } else { | |
28476 num_expected = num_max; | |
28477 more_or_less = "at most"; | |
28478 } | |
28479 if (exact) { | |
28480 more_or_less = "exactly"; | |
28481 } | |
28482 PyErr_Format(PyExc_TypeError, | |
28483 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", | |
28484 func_name, more_or_less, num_expected, | |
28485 (num_expected == 1) ? "" : "s", num_found); | |
28486 } | |
28487 | |
28488 /* FixUpExtensionType */ | |
28489 #if CYTHON_USE_TYPE_SPECS | |
28490 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { | |
28491 #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API | |
28492 CYTHON_UNUSED_VAR(spec); | |
28493 CYTHON_UNUSED_VAR(type); | |
28494 #else | |
28495 const PyType_Slot *slot = spec->slots; | |
28496 while (slot && slot->slot && slot->slot != Py_tp_members) | |
28497 slot++; | |
28498 if (slot && slot->slot == Py_tp_members) { | |
28499 int changed = 0; | |
28500 #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) | |
28501 const | |
28502 #endif | |
28503 PyMemberDef *memb = (PyMemberDef*) slot->pfunc; | |
28504 while (memb && memb->name) { | |
28505 if (memb->name[0] == '_' && memb->name[1] == '_') { | |
28506 #if PY_VERSION_HEX < 0x030900b1 | |
28507 if (strcmp(memb->name, "__weaklistoffset__") == 0) { | |
28508 assert(memb->type == T_PYSSIZET); | |
28509 assert(memb->flags == READONLY); | |
28510 type->tp_weaklistoffset = memb->offset; | |
28511 changed = 1; | |
28512 } | |
28513 else if (strcmp(memb->name, "__dictoffset__") == 0) { | |
28514 assert(memb->type == T_PYSSIZET); | |
28515 assert(memb->flags == READONLY); | |
28516 type->tp_dictoffset = memb->offset; | |
28517 changed = 1; | |
28518 } | |
28519 #if CYTHON_METH_FASTCALL | |
28520 else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { | |
28521 assert(memb->type == T_PYSSIZET); | |
28522 assert(memb->flags == READONLY); | |
28523 #if PY_VERSION_HEX >= 0x030800b4 | |
28524 type->tp_vectorcall_offset = memb->offset; | |
28525 #else | |
28526 type->tp_print = (printfunc) memb->offset; | |
28527 #endif | |
28528 changed = 1; | |
28529 } | |
28530 #endif | |
28531 #else | |
28532 if ((0)); | |
28533 #endif | |
28534 #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON | |
28535 else if (strcmp(memb->name, "__module__") == 0) { | |
28536 PyObject *descr; | |
28537 assert(memb->type == T_OBJECT); | |
28538 assert(memb->flags == 0 || memb->flags == READONLY); | |
28539 descr = PyDescr_NewMember(type, memb); | |
28540 if (unlikely(!descr)) | |
28541 return -1; | |
28542 if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { | |
28543 Py_DECREF(descr); | |
28544 return -1; | |
28545 } | |
28546 Py_DECREF(descr); | |
28547 changed = 1; | |
28548 } | |
28549 #endif | |
28550 } | |
28551 memb++; | |
28552 } | |
28553 if (changed) | |
28554 PyType_Modified(type); | |
28555 } | |
28556 #endif | |
28557 return 0; | |
28558 } | |
28559 #endif | |
28560 | |
28561 /* FetchSharedCythonModule */ | |
28562 static PyObject *__Pyx_FetchSharedCythonABIModule(void) { | |
28563 return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); | |
28564 } | |
28565 | |
28566 /* FetchCommonType */ | |
28567 static int __Pyx_VerifyCachedType(PyObject *cached_type, | |
28568 const char *name, | |
28569 Py_ssize_t basicsize, | |
28570 Py_ssize_t expected_basicsize) { | |
28571 if (!PyType_Check(cached_type)) { | |
28572 PyErr_Format(PyExc_TypeError, | |
28573 "Shared Cython type %.200s is not a type object", name); | |
28574 return -1; | |
28575 } | |
28576 if (basicsize != expected_basicsize) { | |
28577 PyErr_Format(PyExc_TypeError, | |
28578 "Shared Cython type %.200s has the wrong size, try recompiling", | |
28579 name); | |
28580 return -1; | |
28581 } | |
28582 return 0; | |
28583 } | |
28584 #if !CYTHON_USE_TYPE_SPECS | |
28585 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { | |
28586 PyObject* abi_module; | |
28587 const char* object_name; | |
28588 PyTypeObject *cached_type = NULL; | |
28589 abi_module = __Pyx_FetchSharedCythonABIModule(); | |
28590 if (!abi_module) return NULL; | |
28591 object_name = strrchr(type->tp_name, '.'); | |
28592 object_name = object_name ? object_name+1 : type->tp_name; | |
28593 cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); | |
28594 if (cached_type) { | |
28595 if (__Pyx_VerifyCachedType( | |
28596 (PyObject *)cached_type, | |
28597 object_name, | |
28598 cached_type->tp_basicsize, | |
28599 type->tp_basicsize) < 0) { | |
28600 goto bad; | |
28601 } | |
28602 goto done; | |
28603 } | |
28604 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; | |
28605 PyErr_Clear(); | |
28606 if (PyType_Ready(type) < 0) goto bad; | |
28607 if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) | |
28608 goto bad; | |
28609 Py_INCREF(type); | |
28610 cached_type = type; | |
28611 done: | |
28612 Py_DECREF(abi_module); | |
28613 return cached_type; | |
28614 bad: | |
28615 Py_XDECREF(cached_type); | |
28616 cached_type = NULL; | |
28617 goto done; | |
28618 } | |
28619 #else | |
28620 static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { | |
28621 PyObject *abi_module, *cached_type = NULL; | |
28622 const char* object_name = strrchr(spec->name, '.'); | |
28623 object_name = object_name ? object_name+1 : spec->name; | |
28624 abi_module = __Pyx_FetchSharedCythonABIModule(); | |
28625 if (!abi_module) return NULL; | |
28626 cached_type = PyObject_GetAttrString(abi_module, object_name); | |
28627 if (cached_type) { | |
28628 Py_ssize_t basicsize; | |
28629 #if CYTHON_COMPILING_IN_LIMITED_API | |
28630 PyObject *py_basicsize; | |
28631 py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); | |
28632 if (unlikely(!py_basicsize)) goto bad; | |
28633 basicsize = PyLong_AsSsize_t(py_basicsize); | |
28634 Py_DECREF(py_basicsize); | |
28635 py_basicsize = 0; | |
28636 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; | |
28637 #else | |
28638 basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; | |
28639 #endif | |
28640 if (__Pyx_VerifyCachedType( | |
28641 cached_type, | |
28642 object_name, | |
28643 basicsize, | |
28644 spec->basicsize) < 0) { | |
28645 goto bad; | |
28646 } | |
28647 goto done; | |
28648 } | |
28649 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; | |
28650 PyErr_Clear(); | |
28651 CYTHON_UNUSED_VAR(module); | |
28652 cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); | |
28653 if (unlikely(!cached_type)) goto bad; | |
28654 if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; | |
28655 if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; | |
28656 done: | |
28657 Py_DECREF(abi_module); | |
28658 assert(cached_type == NULL || PyType_Check(cached_type)); | |
28659 return (PyTypeObject *) cached_type; | |
28660 bad: | |
28661 Py_XDECREF(cached_type); | |
28662 cached_type = NULL; | |
28663 goto done; | |
28664 } | |
28665 #endif | |
28666 | |
28667 /* PyVectorcallFastCallDict */ | |
28668 #if CYTHON_METH_FASTCALL | |
28669 static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) | |
28670 { | |
28671 PyObject *res = NULL; | |
28672 PyObject *kwnames; | |
28673 PyObject **newargs; | |
28674 PyObject **kwvalues; | |
28675 Py_ssize_t i, pos; | |
28676 size_t j; | |
28677 PyObject *key, *value; | |
28678 unsigned long keys_are_strings; | |
28679 Py_ssize_t nkw = PyDict_GET_SIZE(kw); | |
28680 newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); | |
28681 if (unlikely(newargs == NULL)) { | |
28682 PyErr_NoMemory(); | |
28683 return NULL; | |
28684 } | |
28685 for (j = 0; j < nargs; j++) newargs[j] = args[j]; | |
28686 kwnames = PyTuple_New(nkw); | |
28687 if (unlikely(kwnames == NULL)) { | |
28688 PyMem_Free(newargs); | |
28689 return NULL; | |
28690 } | |
28691 kwvalues = newargs + nargs; | |
28692 pos = i = 0; | |
28693 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; | |
28694 while (PyDict_Next(kw, &pos, &key, &value)) { | |
28695 keys_are_strings &= Py_TYPE(key)->tp_flags; | |
28696 Py_INCREF(key); | |
28697 Py_INCREF(value); | |
28698 PyTuple_SET_ITEM(kwnames, i, key); | |
28699 kwvalues[i] = value; | |
28700 i++; | |
28701 } | |
28702 if (unlikely(!keys_are_strings)) { | |
28703 PyErr_SetString(PyExc_TypeError, "keywords must be strings"); | |
28704 goto cleanup; | |
28705 } | |
28706 res = vc(func, newargs, nargs, kwnames); | |
28707 cleanup: | |
28708 Py_DECREF(kwnames); | |
28709 for (i = 0; i < nkw; i++) | |
28710 Py_DECREF(kwvalues[i]); | |
28711 PyMem_Free(newargs); | |
28712 return res; | |
28713 } | |
28714 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) | |
28715 { | |
28716 if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { | |
28717 return vc(func, args, nargs, NULL); | |
28718 } | |
28719 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); | |
28720 } | |
28721 #endif | |
28722 | |
28723 /* CythonFunctionShared */ | |
28724 #if CYTHON_COMPILING_IN_LIMITED_API | |
28725 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { | |
28726 if (__Pyx_CyFunction_Check(func)) { | |
28727 return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; | |
28728 } else if (PyCFunction_Check(func)) { | |
28729 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; | |
28730 } | |
28731 return 0; | |
28732 } | |
28733 #else | |
28734 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { | |
28735 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; | |
28736 } | |
28737 #endif | |
28738 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { | |
28739 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API | |
28740 __Pyx_Py_XDECREF_SET( | |
28741 __Pyx_CyFunction_GetClassObj(f), | |
28742 ((classobj) ? __Pyx_NewRef(classobj) : NULL)); | |
28743 #else | |
28744 __Pyx_Py_XDECREF_SET( | |
28745 ((PyCMethodObject *) (f))->mm_class, | |
28746 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); | |
28747 #endif | |
28748 } | |
28749 static PyObject * | |
28750 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) | |
28751 { | |
28752 CYTHON_UNUSED_VAR(closure); | |
28753 if (unlikely(op->func_doc == NULL)) { | |
28754 #if CYTHON_COMPILING_IN_LIMITED_API | |
28755 op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); | |
28756 if (unlikely(!op->func_doc)) return NULL; | |
28757 #else | |
28758 if (((PyCFunctionObject*)op)->m_ml->ml_doc) { | |
28759 #if PY_MAJOR_VERSION >= 3 | |
28760 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); | |
28761 #else | |
28762 op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); | |
28763 #endif | |
28764 if (unlikely(op->func_doc == NULL)) | |
28765 return NULL; | |
28766 } else { | |
28767 Py_INCREF(Py_None); | |
28768 return Py_None; | |
28769 } | |
28770 #endif | |
28771 } | |
28772 Py_INCREF(op->func_doc); | |
28773 return op->func_doc; | |
28774 } | |
28775 static int | |
28776 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) | |
28777 { | |
28778 CYTHON_UNUSED_VAR(context); | |
28779 if (value == NULL) { | |
28780 value = Py_None; | |
28781 } | |
28782 Py_INCREF(value); | |
28783 __Pyx_Py_XDECREF_SET(op->func_doc, value); | |
28784 return 0; | |
28785 } | |
28786 static PyObject * | |
28787 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) | |
28788 { | |
28789 CYTHON_UNUSED_VAR(context); | |
28790 if (unlikely(op->func_name == NULL)) { | |
28791 #if CYTHON_COMPILING_IN_LIMITED_API | |
28792 op->func_name = PyObject_GetAttrString(op->func, "__name__"); | |
28793 #elif PY_MAJOR_VERSION >= 3 | |
28794 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); | |
28795 #else | |
28796 op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); | |
28797 #endif | |
28798 if (unlikely(op->func_name == NULL)) | |
28799 return NULL; | |
28800 } | |
28801 Py_INCREF(op->func_name); | |
28802 return op->func_name; | |
28803 } | |
28804 static int | |
28805 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) | |
28806 { | |
28807 CYTHON_UNUSED_VAR(context); | |
28808 #if PY_MAJOR_VERSION >= 3 | |
28809 if (unlikely(value == NULL || !PyUnicode_Check(value))) | |
28810 #else | |
28811 if (unlikely(value == NULL || !PyString_Check(value))) | |
28812 #endif | |
28813 { | |
28814 PyErr_SetString(PyExc_TypeError, | |
28815 "__name__ must be set to a string object"); | |
28816 return -1; | |
28817 } | |
28818 Py_INCREF(value); | |
28819 __Pyx_Py_XDECREF_SET(op->func_name, value); | |
28820 return 0; | |
28821 } | |
28822 static PyObject * | |
28823 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) | |
28824 { | |
28825 CYTHON_UNUSED_VAR(context); | |
28826 Py_INCREF(op->func_qualname); | |
28827 return op->func_qualname; | |
28828 } | |
28829 static int | |
28830 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) | |
28831 { | |
28832 CYTHON_UNUSED_VAR(context); | |
28833 #if PY_MAJOR_VERSION >= 3 | |
28834 if (unlikely(value == NULL || !PyUnicode_Check(value))) | |
28835 #else | |
28836 if (unlikely(value == NULL || !PyString_Check(value))) | |
28837 #endif | |
28838 { | |
28839 PyErr_SetString(PyExc_TypeError, | |
28840 "__qualname__ must be set to a string object"); | |
28841 return -1; | |
28842 } | |
28843 Py_INCREF(value); | |
28844 __Pyx_Py_XDECREF_SET(op->func_qualname, value); | |
28845 return 0; | |
28846 } | |
28847 static PyObject * | |
28848 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) | |
28849 { | |
28850 CYTHON_UNUSED_VAR(context); | |
28851 if (unlikely(op->func_dict == NULL)) { | |
28852 op->func_dict = PyDict_New(); | |
28853 if (unlikely(op->func_dict == NULL)) | |
28854 return NULL; | |
28855 } | |
28856 Py_INCREF(op->func_dict); | |
28857 return op->func_dict; | |
28858 } | |
28859 static int | |
28860 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) | |
28861 { | |
28862 CYTHON_UNUSED_VAR(context); | |
28863 if (unlikely(value == NULL)) { | |
28864 PyErr_SetString(PyExc_TypeError, | |
28865 "function's dictionary may not be deleted"); | |
28866 return -1; | |
28867 } | |
28868 if (unlikely(!PyDict_Check(value))) { | |
28869 PyErr_SetString(PyExc_TypeError, | |
28870 "setting function's dictionary to a non-dict"); | |
28871 return -1; | |
28872 } | |
28873 Py_INCREF(value); | |
28874 __Pyx_Py_XDECREF_SET(op->func_dict, value); | |
28875 return 0; | |
28876 } | |
28877 static PyObject * | |
28878 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) | |
28879 { | |
28880 CYTHON_UNUSED_VAR(context); | |
28881 Py_INCREF(op->func_globals); | |
28882 return op->func_globals; | |
28883 } | |
28884 static PyObject * | |
28885 __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) | |
28886 { | |
28887 CYTHON_UNUSED_VAR(op); | |
28888 CYTHON_UNUSED_VAR(context); | |
28889 Py_INCREF(Py_None); | |
28890 return Py_None; | |
28891 } | |
28892 static PyObject * | |
28893 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) | |
28894 { | |
28895 PyObject* result = (op->func_code) ? op->func_code : Py_None; | |
28896 CYTHON_UNUSED_VAR(context); | |
28897 Py_INCREF(result); | |
28898 return result; | |
28899 } | |
28900 static int | |
28901 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { | |
28902 int result = 0; | |
28903 PyObject *res = op->defaults_getter((PyObject *) op); | |
28904 if (unlikely(!res)) | |
28905 return -1; | |
28906 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
28907 op->defaults_tuple = PyTuple_GET_ITEM(res, 0); | |
28908 Py_INCREF(op->defaults_tuple); | |
28909 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); | |
28910 Py_INCREF(op->defaults_kwdict); | |
28911 #else | |
28912 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); | |
28913 if (unlikely(!op->defaults_tuple)) result = -1; | |
28914 else { | |
28915 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); | |
28916 if (unlikely(!op->defaults_kwdict)) result = -1; | |
28917 } | |
28918 #endif | |
28919 Py_DECREF(res); | |
28920 return result; | |
28921 } | |
28922 static int | |
28923 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { | |
28924 CYTHON_UNUSED_VAR(context); | |
28925 if (!value) { | |
28926 value = Py_None; | |
28927 } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { | |
28928 PyErr_SetString(PyExc_TypeError, | |
28929 "__defaults__ must be set to a tuple object"); | |
28930 return -1; | |
28931 } | |
28932 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " | |
28933 "currently affect the values used in function calls", 1); | |
28934 Py_INCREF(value); | |
28935 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); | |
28936 return 0; | |
28937 } | |
28938 static PyObject * | |
28939 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { | |
28940 PyObject* result = op->defaults_tuple; | |
28941 CYTHON_UNUSED_VAR(context); | |
28942 if (unlikely(!result)) { | |
28943 if (op->defaults_getter) { | |
28944 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; | |
28945 result = op->defaults_tuple; | |
28946 } else { | |
28947 result = Py_None; | |
28948 } | |
28949 } | |
28950 Py_INCREF(result); | |
28951 return result; | |
28952 } | |
28953 static int | |
28954 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { | |
28955 CYTHON_UNUSED_VAR(context); | |
28956 if (!value) { | |
28957 value = Py_None; | |
28958 } else if (unlikely(value != Py_None && !PyDict_Check(value))) { | |
28959 PyErr_SetString(PyExc_TypeError, | |
28960 "__kwdefaults__ must be set to a dict object"); | |
28961 return -1; | |
28962 } | |
28963 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " | |
28964 "currently affect the values used in function calls", 1); | |
28965 Py_INCREF(value); | |
28966 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); | |
28967 return 0; | |
28968 } | |
28969 static PyObject * | |
28970 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { | |
28971 PyObject* result = op->defaults_kwdict; | |
28972 CYTHON_UNUSED_VAR(context); | |
28973 if (unlikely(!result)) { | |
28974 if (op->defaults_getter) { | |
28975 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; | |
28976 result = op->defaults_kwdict; | |
28977 } else { | |
28978 result = Py_None; | |
28979 } | |
28980 } | |
28981 Py_INCREF(result); | |
28982 return result; | |
28983 } | |
28984 static int | |
28985 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { | |
28986 CYTHON_UNUSED_VAR(context); | |
28987 if (!value || value == Py_None) { | |
28988 value = NULL; | |
28989 } else if (unlikely(!PyDict_Check(value))) { | |
28990 PyErr_SetString(PyExc_TypeError, | |
28991 "__annotations__ must be set to a dict object"); | |
28992 return -1; | |
28993 } | |
28994 Py_XINCREF(value); | |
28995 __Pyx_Py_XDECREF_SET(op->func_annotations, value); | |
28996 return 0; | |
28997 } | |
28998 static PyObject * | |
28999 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { | |
29000 PyObject* result = op->func_annotations; | |
29001 CYTHON_UNUSED_VAR(context); | |
29002 if (unlikely(!result)) { | |
29003 result = PyDict_New(); | |
29004 if (unlikely(!result)) return NULL; | |
29005 op->func_annotations = result; | |
29006 } | |
29007 Py_INCREF(result); | |
29008 return result; | |
29009 } | |
29010 static PyObject * | |
29011 __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { | |
29012 int is_coroutine; | |
29013 CYTHON_UNUSED_VAR(context); | |
29014 if (op->func_is_coroutine) { | |
29015 return __Pyx_NewRef(op->func_is_coroutine); | |
29016 } | |
29017 is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; | |
29018 #if PY_VERSION_HEX >= 0x03050000 | |
29019 if (is_coroutine) { | |
29020 PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; | |
29021 fromlist = PyList_New(1); | |
29022 if (unlikely(!fromlist)) return NULL; | |
29023 Py_INCREF(marker); | |
29024 #if CYTHON_ASSUME_SAFE_MACROS | |
29025 PyList_SET_ITEM(fromlist, 0, marker); | |
29026 #else | |
29027 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { | |
29028 Py_DECREF(marker); | |
29029 Py_DECREF(fromlist); | |
29030 return NULL; | |
29031 } | |
29032 #endif | |
29033 module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); | |
29034 Py_DECREF(fromlist); | |
29035 if (unlikely(!module)) goto ignore; | |
29036 op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); | |
29037 Py_DECREF(module); | |
29038 if (likely(op->func_is_coroutine)) { | |
29039 return __Pyx_NewRef(op->func_is_coroutine); | |
29040 } | |
29041 ignore: | |
29042 PyErr_Clear(); | |
29043 } | |
29044 #endif | |
29045 op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); | |
29046 return __Pyx_NewRef(op->func_is_coroutine); | |
29047 } | |
29048 #if CYTHON_COMPILING_IN_LIMITED_API | |
29049 static PyObject * | |
29050 __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { | |
29051 CYTHON_UNUSED_VAR(context); | |
29052 return PyObject_GetAttrString(op->func, "__module__"); | |
29053 } | |
29054 static int | |
29055 __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { | |
29056 CYTHON_UNUSED_VAR(context); | |
29057 return PyObject_SetAttrString(op->func, "__module__", value); | |
29058 } | |
29059 #endif | |
29060 static PyGetSetDef __pyx_CyFunction_getsets[] = { | |
29061 {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, | |
29062 {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, | |
29063 {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, | |
29064 {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, | |
29065 {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, | |
29066 {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, | |
29067 {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, | |
29068 {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, | |
29069 {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, | |
29070 {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, | |
29071 {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, | |
29072 {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, | |
29073 {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, | |
29074 {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, | |
29075 {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, | |
29076 {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, | |
29077 {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, | |
29078 {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, | |
29079 #if CYTHON_COMPILING_IN_LIMITED_API | |
29080 {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, | |
29081 #endif | |
29082 {0, 0, 0, 0, 0} | |
29083 }; | |
29084 static PyMemberDef __pyx_CyFunction_members[] = { | |
29085 #if !CYTHON_COMPILING_IN_LIMITED_API | |
29086 {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, | |
29087 #endif | |
29088 #if CYTHON_USE_TYPE_SPECS | |
29089 {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, | |
29090 #if CYTHON_METH_FASTCALL | |
29091 #if CYTHON_BACKPORT_VECTORCALL | |
29092 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, | |
29093 #else | |
29094 #if !CYTHON_COMPILING_IN_LIMITED_API | |
29095 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, | |
29096 #endif | |
29097 #endif | |
29098 #endif | |
29099 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API | |
29100 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, | |
29101 #else | |
29102 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, | |
29103 #endif | |
29104 #endif | |
29105 {0, 0, 0, 0, 0} | |
29106 }; | |
29107 static PyObject * | |
29108 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) | |
29109 { | |
29110 CYTHON_UNUSED_VAR(args); | |
29111 #if PY_MAJOR_VERSION >= 3 | |
29112 Py_INCREF(m->func_qualname); | |
29113 return m->func_qualname; | |
29114 #else | |
29115 return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name); | |
29116 #endif | |
29117 } | |
29118 static PyMethodDef __pyx_CyFunction_methods[] = { | |
29119 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, | |
29120 {0, 0, 0, 0} | |
29121 }; | |
29122 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API | |
29123 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) | |
29124 #else | |
29125 #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) | |
29126 #endif | |
29127 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, | |
29128 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { | |
29129 #if !CYTHON_COMPILING_IN_LIMITED_API | |
29130 PyCFunctionObject *cf = (PyCFunctionObject*) op; | |
29131 #endif | |
29132 if (unlikely(op == NULL)) | |
29133 return NULL; | |
29134 #if CYTHON_COMPILING_IN_LIMITED_API | |
29135 op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); | |
29136 if (unlikely(!op->func)) return NULL; | |
29137 #endif | |
29138 op->flags = flags; | |
29139 __Pyx_CyFunction_weakreflist(op) = NULL; | |
29140 #if !CYTHON_COMPILING_IN_LIMITED_API | |
29141 cf->m_ml = ml; | |
29142 cf->m_self = (PyObject *) op; | |
29143 #endif | |
29144 Py_XINCREF(closure); | |
29145 op->func_closure = closure; | |
29146 #if !CYTHON_COMPILING_IN_LIMITED_API | |
29147 Py_XINCREF(module); | |
29148 cf->m_module = module; | |
29149 #endif | |
29150 op->func_dict = NULL; | |
29151 op->func_name = NULL; | |
29152 Py_INCREF(qualname); | |
29153 op->func_qualname = qualname; | |
29154 op->func_doc = NULL; | |
29155 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API | |
29156 op->func_classobj = NULL; | |
29157 #else | |
29158 ((PyCMethodObject*)op)->mm_class = NULL; | |
29159 #endif | |
29160 op->func_globals = globals; | |
29161 Py_INCREF(op->func_globals); | |
29162 Py_XINCREF(code); | |
29163 op->func_code = code; | |
29164 op->defaults_pyobjects = 0; | |
29165 op->defaults_size = 0; | |
29166 op->defaults = NULL; | |
29167 op->defaults_tuple = NULL; | |
29168 op->defaults_kwdict = NULL; | |
29169 op->defaults_getter = NULL; | |
29170 op->func_annotations = NULL; | |
29171 op->func_is_coroutine = NULL; | |
29172 #if CYTHON_METH_FASTCALL | |
29173 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { | |
29174 case METH_NOARGS: | |
29175 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; | |
29176 break; | |
29177 case METH_O: | |
29178 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; | |
29179 break; | |
29180 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: | |
29181 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; | |
29182 break; | |
29183 case METH_FASTCALL | METH_KEYWORDS: | |
29184 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; | |
29185 break; | |
29186 case METH_VARARGS | METH_KEYWORDS: | |
29187 __Pyx_CyFunction_func_vectorcall(op) = NULL; | |
29188 break; | |
29189 default: | |
29190 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); | |
29191 Py_DECREF(op); | |
29192 return NULL; | |
29193 } | |
29194 #endif | |
29195 return (PyObject *) op; | |
29196 } | |
29197 static int | |
29198 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) | |
29199 { | |
29200 Py_CLEAR(m->func_closure); | |
29201 #if CYTHON_COMPILING_IN_LIMITED_API | |
29202 Py_CLEAR(m->func); | |
29203 #else | |
29204 Py_CLEAR(((PyCFunctionObject*)m)->m_module); | |
29205 #endif | |
29206 Py_CLEAR(m->func_dict); | |
29207 Py_CLEAR(m->func_name); | |
29208 Py_CLEAR(m->func_qualname); | |
29209 Py_CLEAR(m->func_doc); | |
29210 Py_CLEAR(m->func_globals); | |
29211 Py_CLEAR(m->func_code); | |
29212 #if !CYTHON_COMPILING_IN_LIMITED_API | |
29213 #if PY_VERSION_HEX < 0x030900B1 | |
29214 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); | |
29215 #else | |
29216 { | |
29217 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; | |
29218 ((PyCMethodObject *) (m))->mm_class = NULL; | |
29219 Py_XDECREF(cls); | |
29220 } | |
29221 #endif | |
29222 #endif | |
29223 Py_CLEAR(m->defaults_tuple); | |
29224 Py_CLEAR(m->defaults_kwdict); | |
29225 Py_CLEAR(m->func_annotations); | |
29226 Py_CLEAR(m->func_is_coroutine); | |
29227 if (m->defaults) { | |
29228 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); | |
29229 int i; | |
29230 for (i = 0; i < m->defaults_pyobjects; i++) | |
29231 Py_XDECREF(pydefaults[i]); | |
29232 PyObject_Free(m->defaults); | |
29233 m->defaults = NULL; | |
29234 } | |
29235 return 0; | |
29236 } | |
29237 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) | |
29238 { | |
29239 if (__Pyx_CyFunction_weakreflist(m) != NULL) | |
29240 PyObject_ClearWeakRefs((PyObject *) m); | |
29241 __Pyx_CyFunction_clear(m); | |
29242 __Pyx_PyHeapTypeObject_GC_Del(m); | |
29243 } | |
29244 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) | |
29245 { | |
29246 PyObject_GC_UnTrack(m); | |
29247 __Pyx__CyFunction_dealloc(m); | |
29248 } | |
29249 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) | |
29250 { | |
29251 Py_VISIT(m->func_closure); | |
29252 #if CYTHON_COMPILING_IN_LIMITED_API | |
29253 Py_VISIT(m->func); | |
29254 #else | |
29255 Py_VISIT(((PyCFunctionObject*)m)->m_module); | |
29256 #endif | |
29257 Py_VISIT(m->func_dict); | |
29258 Py_VISIT(m->func_name); | |
29259 Py_VISIT(m->func_qualname); | |
29260 Py_VISIT(m->func_doc); | |
29261 Py_VISIT(m->func_globals); | |
29262 Py_VISIT(m->func_code); | |
29263 #if !CYTHON_COMPILING_IN_LIMITED_API | |
29264 Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); | |
29265 #endif | |
29266 Py_VISIT(m->defaults_tuple); | |
29267 Py_VISIT(m->defaults_kwdict); | |
29268 Py_VISIT(m->func_is_coroutine); | |
29269 if (m->defaults) { | |
29270 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); | |
29271 int i; | |
29272 for (i = 0; i < m->defaults_pyobjects; i++) | |
29273 Py_VISIT(pydefaults[i]); | |
29274 } | |
29275 return 0; | |
29276 } | |
29277 static PyObject* | |
29278 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) | |
29279 { | |
29280 #if PY_MAJOR_VERSION >= 3 | |
29281 return PyUnicode_FromFormat("<cyfunction %U at %p>", | |
29282 op->func_qualname, (void *)op); | |
29283 #else | |
29284 return PyString_FromFormat("<cyfunction %s at %p>", | |
29285 PyString_AsString(op->func_qualname), (void *)op); | |
29286 #endif | |
29287 } | |
29288 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { | |
29289 #if CYTHON_COMPILING_IN_LIMITED_API | |
29290 PyObject *f = ((__pyx_CyFunctionObject*)func)->func; | |
29291 PyObject *py_name = NULL; | |
29292 PyCFunction meth; | |
29293 int flags; | |
29294 meth = PyCFunction_GetFunction(f); | |
29295 if (unlikely(!meth)) return NULL; | |
29296 flags = PyCFunction_GetFlags(f); | |
29297 if (unlikely(flags < 0)) return NULL; | |
29298 #else | |
29299 PyCFunctionObject* f = (PyCFunctionObject*)func; | |
29300 PyCFunction meth = f->m_ml->ml_meth; | |
29301 int flags = f->m_ml->ml_flags; | |
29302 #endif | |
29303 Py_ssize_t size; | |
29304 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { | |
29305 case METH_VARARGS: | |
29306 if (likely(kw == NULL || PyDict_Size(kw) == 0)) | |
29307 return (*meth)(self, arg); | |
29308 break; | |
29309 case METH_VARARGS | METH_KEYWORDS: | |
29310 return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); | |
29311 case METH_NOARGS: | |
29312 if (likely(kw == NULL || PyDict_Size(kw) == 0)) { | |
29313 #if CYTHON_ASSUME_SAFE_MACROS | |
29314 size = PyTuple_GET_SIZE(arg); | |
29315 #else | |
29316 size = PyTuple_Size(arg); | |
29317 if (unlikely(size < 0)) return NULL; | |
29318 #endif | |
29319 if (likely(size == 0)) | |
29320 return (*meth)(self, NULL); | |
29321 #if CYTHON_COMPILING_IN_LIMITED_API | |
29322 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); | |
29323 if (!py_name) return NULL; | |
29324 PyErr_Format(PyExc_TypeError, | |
29325 "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", | |
29326 py_name, size); | |
29327 Py_DECREF(py_name); | |
29328 #else | |
29329 PyErr_Format(PyExc_TypeError, | |
29330 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", | |
29331 f->m_ml->ml_name, size); | |
29332 #endif | |
29333 return NULL; | |
29334 } | |
29335 break; | |
29336 case METH_O: | |
29337 if (likely(kw == NULL || PyDict_Size(kw) == 0)) { | |
29338 #if CYTHON_ASSUME_SAFE_MACROS | |
29339 size = PyTuple_GET_SIZE(arg); | |
29340 #else | |
29341 size = PyTuple_Size(arg); | |
29342 if (unlikely(size < 0)) return NULL; | |
29343 #endif | |
29344 if (likely(size == 1)) { | |
29345 PyObject *result, *arg0; | |
29346 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
29347 arg0 = PyTuple_GET_ITEM(arg, 0); | |
29348 #else | |
29349 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; | |
29350 #endif | |
29351 result = (*meth)(self, arg0); | |
29352 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) | |
29353 Py_DECREF(arg0); | |
29354 #endif | |
29355 return result; | |
29356 } | |
29357 #if CYTHON_COMPILING_IN_LIMITED_API | |
29358 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); | |
29359 if (!py_name) return NULL; | |
29360 PyErr_Format(PyExc_TypeError, | |
29361 "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", | |
29362 py_name, size); | |
29363 Py_DECREF(py_name); | |
29364 #else | |
29365 PyErr_Format(PyExc_TypeError, | |
29366 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", | |
29367 f->m_ml->ml_name, size); | |
29368 #endif | |
29369 return NULL; | |
29370 } | |
29371 break; | |
29372 default: | |
29373 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); | |
29374 return NULL; | |
29375 } | |
29376 #if CYTHON_COMPILING_IN_LIMITED_API | |
29377 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); | |
29378 if (!py_name) return NULL; | |
29379 PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments", | |
29380 py_name); | |
29381 Py_DECREF(py_name); | |
29382 #else | |
29383 PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", | |
29384 f->m_ml->ml_name); | |
29385 #endif | |
29386 return NULL; | |
29387 } | |
29388 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { | |
29389 PyObject *self, *result; | |
29390 #if CYTHON_COMPILING_IN_LIMITED_API | |
29391 self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); | |
29392 if (unlikely(!self) && PyErr_Occurred()) return NULL; | |
29393 #else | |
29394 self = ((PyCFunctionObject*)func)->m_self; | |
29395 #endif | |
29396 result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); | |
29397 return result; | |
29398 } | |
29399 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { | |
29400 PyObject *result; | |
29401 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; | |
29402 #if CYTHON_METH_FASTCALL | |
29403 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); | |
29404 if (vc) { | |
29405 #if CYTHON_ASSUME_SAFE_MACROS | |
29406 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); | |
29407 #else | |
29408 (void) &__Pyx_PyVectorcall_FastCallDict; | |
29409 return PyVectorcall_Call(func, args, kw); | |
29410 #endif | |
29411 } | |
29412 #endif | |
29413 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { | |
29414 Py_ssize_t argc; | |
29415 PyObject *new_args; | |
29416 PyObject *self; | |
29417 #if CYTHON_ASSUME_SAFE_MACROS | |
29418 argc = PyTuple_GET_SIZE(args); | |
29419 #else | |
29420 argc = PyTuple_Size(args); | |
29421 if (unlikely(!argc) < 0) return NULL; | |
29422 #endif | |
29423 new_args = PyTuple_GetSlice(args, 1, argc); | |
29424 if (unlikely(!new_args)) | |
29425 return NULL; | |
29426 self = PyTuple_GetItem(args, 0); | |
29427 if (unlikely(!self)) { | |
29428 Py_DECREF(new_args); | |
29429 #if PY_MAJOR_VERSION > 2 | |
29430 PyErr_Format(PyExc_TypeError, | |
29431 "unbound method %.200S() needs an argument", | |
29432 cyfunc->func_qualname); | |
29433 #else | |
29434 PyErr_SetString(PyExc_TypeError, | |
29435 "unbound method needs an argument"); | |
29436 #endif | |
29437 return NULL; | |
29438 } | |
29439 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); | |
29440 Py_DECREF(new_args); | |
29441 } else { | |
29442 result = __Pyx_CyFunction_Call(func, args, kw); | |
29443 } | |
29444 return result; | |
29445 } | |
29446 #if CYTHON_METH_FASTCALL | |
29447 static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) | |
29448 { | |
29449 int ret = 0; | |
29450 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { | |
29451 if (unlikely(nargs < 1)) { | |
29452 PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", | |
29453 ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); | |
29454 return -1; | |
29455 } | |
29456 ret = 1; | |
29457 } | |
29458 if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { | |
29459 PyErr_Format(PyExc_TypeError, | |
29460 "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); | |
29461 return -1; | |
29462 } | |
29463 return ret; | |
29464 } | |
29465 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) | |
29466 { | |
29467 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; | |
29468 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; | |
29469 #if CYTHON_BACKPORT_VECTORCALL | |
29470 Py_ssize_t nargs = (Py_ssize_t)nargsf; | |
29471 #else | |
29472 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); | |
29473 #endif | |
29474 PyObject *self; | |
29475 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { | |
29476 case 1: | |
29477 self = args[0]; | |
29478 args += 1; | |
29479 nargs -= 1; | |
29480 break; | |
29481 case 0: | |
29482 self = ((PyCFunctionObject*)cyfunc)->m_self; | |
29483 break; | |
29484 default: | |
29485 return NULL; | |
29486 } | |
29487 if (unlikely(nargs != 0)) { | |
29488 PyErr_Format(PyExc_TypeError, | |
29489 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", | |
29490 def->ml_name, nargs); | |
29491 return NULL; | |
29492 } | |
29493 return def->ml_meth(self, NULL); | |
29494 } | |
29495 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) | |
29496 { | |
29497 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; | |
29498 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; | |
29499 #if CYTHON_BACKPORT_VECTORCALL | |
29500 Py_ssize_t nargs = (Py_ssize_t)nargsf; | |
29501 #else | |
29502 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); | |
29503 #endif | |
29504 PyObject *self; | |
29505 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { | |
29506 case 1: | |
29507 self = args[0]; | |
29508 args += 1; | |
29509 nargs -= 1; | |
29510 break; | |
29511 case 0: | |
29512 self = ((PyCFunctionObject*)cyfunc)->m_self; | |
29513 break; | |
29514 default: | |
29515 return NULL; | |
29516 } | |
29517 if (unlikely(nargs != 1)) { | |
29518 PyErr_Format(PyExc_TypeError, | |
29519 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", | |
29520 def->ml_name, nargs); | |
29521 return NULL; | |
29522 } | |
29523 return def->ml_meth(self, args[0]); | |
29524 } | |
29525 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) | |
29526 { | |
29527 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; | |
29528 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; | |
29529 #if CYTHON_BACKPORT_VECTORCALL | |
29530 Py_ssize_t nargs = (Py_ssize_t)nargsf; | |
29531 #else | |
29532 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); | |
29533 #endif | |
29534 PyObject *self; | |
29535 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { | |
29536 case 1: | |
29537 self = args[0]; | |
29538 args += 1; | |
29539 nargs -= 1; | |
29540 break; | |
29541 case 0: | |
29542 self = ((PyCFunctionObject*)cyfunc)->m_self; | |
29543 break; | |
29544 default: | |
29545 return NULL; | |
29546 } | |
29547 return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); | |
29548 } | |
29549 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) | |
29550 { | |
29551 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; | |
29552 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; | |
29553 PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); | |
29554 #if CYTHON_BACKPORT_VECTORCALL | |
29555 Py_ssize_t nargs = (Py_ssize_t)nargsf; | |
29556 #else | |
29557 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); | |
29558 #endif | |
29559 PyObject *self; | |
29560 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { | |
29561 case 1: | |
29562 self = args[0]; | |
29563 args += 1; | |
29564 nargs -= 1; | |
29565 break; | |
29566 case 0: | |
29567 self = ((PyCFunctionObject*)cyfunc)->m_self; | |
29568 break; | |
29569 default: | |
29570 return NULL; | |
29571 } | |
29572 return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); | |
29573 } | |
29574 #endif | |
29575 #if CYTHON_USE_TYPE_SPECS | |
29576 static PyType_Slot __pyx_CyFunctionType_slots[] = { | |
29577 {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, | |
29578 {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, | |
29579 {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, | |
29580 {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, | |
29581 {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, | |
29582 {Py_tp_methods, (void *)__pyx_CyFunction_methods}, | |
29583 {Py_tp_members, (void *)__pyx_CyFunction_members}, | |
29584 {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, | |
29585 {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, | |
29586 {0, 0}, | |
29587 }; | |
29588 static PyType_Spec __pyx_CyFunctionType_spec = { | |
29589 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", | |
29590 sizeof(__pyx_CyFunctionObject), | |
29591 0, | |
29592 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR | |
29593 Py_TPFLAGS_METHOD_DESCRIPTOR | | |
29594 #endif | |
29595 #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) | |
29596 _Py_TPFLAGS_HAVE_VECTORCALL | | |
29597 #endif | |
29598 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, | |
29599 __pyx_CyFunctionType_slots | |
29600 }; | |
29601 #else | |
29602 static PyTypeObject __pyx_CyFunctionType_type = { | |
29603 PyVarObject_HEAD_INIT(0, 0) | |
29604 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", | |
29605 sizeof(__pyx_CyFunctionObject), | |
29606 0, | |
29607 (destructor) __Pyx_CyFunction_dealloc, | |
29608 #if !CYTHON_METH_FASTCALL | |
29609 0, | |
29610 #elif CYTHON_BACKPORT_VECTORCALL | |
29611 (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), | |
29612 #else | |
29613 offsetof(PyCFunctionObject, vectorcall), | |
29614 #endif | |
29615 0, | |
29616 0, | |
29617 #if PY_MAJOR_VERSION < 3 | |
29618 0, | |
29619 #else | |
29620 0, | |
29621 #endif | |
29622 (reprfunc) __Pyx_CyFunction_repr, | |
29623 0, | |
29624 0, | |
29625 0, | |
29626 0, | |
29627 __Pyx_CyFunction_CallAsMethod, | |
29628 0, | |
29629 0, | |
29630 0, | |
29631 0, | |
29632 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR | |
29633 Py_TPFLAGS_METHOD_DESCRIPTOR | | |
29634 #endif | |
29635 #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL | |
29636 _Py_TPFLAGS_HAVE_VECTORCALL | | |
29637 #endif | |
29638 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, | |
29639 0, | |
29640 (traverseproc) __Pyx_CyFunction_traverse, | |
29641 (inquiry) __Pyx_CyFunction_clear, | |
29642 0, | |
29643 #if PY_VERSION_HEX < 0x030500A0 | |
29644 offsetof(__pyx_CyFunctionObject, func_weakreflist), | |
29645 #else | |
29646 offsetof(PyCFunctionObject, m_weakreflist), | |
29647 #endif | |
29648 0, | |
29649 0, | |
29650 __pyx_CyFunction_methods, | |
29651 __pyx_CyFunction_members, | |
29652 __pyx_CyFunction_getsets, | |
29653 0, | |
29654 0, | |
29655 __Pyx_PyMethod_New, | |
29656 0, | |
29657 offsetof(__pyx_CyFunctionObject, func_dict), | |
29658 0, | |
29659 0, | |
29660 0, | |
29661 0, | |
29662 0, | |
29663 0, | |
29664 0, | |
29665 0, | |
29666 0, | |
29667 0, | |
29668 0, | |
29669 0, | |
29670 #if PY_VERSION_HEX >= 0x030400a1 | |
29671 0, | |
29672 #endif | |
29673 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
29674 0, | |
29675 #endif | |
29676 #if __PYX_NEED_TP_PRINT_SLOT | |
29677 0, | |
29678 #endif | |
29679 #if PY_VERSION_HEX >= 0x030C0000 | |
29680 0, | |
29681 #endif | |
29682 #if PY_VERSION_HEX >= 0x030d00A4 | |
29683 0, | |
29684 #endif | |
29685 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
29686 0, | |
29687 #endif | |
29688 }; | |
29689 #endif | |
29690 static int __pyx_CyFunction_init(PyObject *module) { | |
29691 #if CYTHON_USE_TYPE_SPECS | |
29692 __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); | |
29693 #else | |
29694 CYTHON_UNUSED_VAR(module); | |
29695 __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); | |
29696 #endif | |
29697 if (unlikely(__pyx_CyFunctionType == NULL)) { | |
29698 return -1; | |
29699 } | |
29700 return 0; | |
29701 } | |
29702 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { | |
29703 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; | |
29704 m->defaults = PyObject_Malloc(size); | |
29705 if (unlikely(!m->defaults)) | |
29706 return PyErr_NoMemory(); | |
29707 memset(m->defaults, 0, size); | |
29708 m->defaults_pyobjects = pyobjects; | |
29709 m->defaults_size = size; | |
29710 return m->defaults; | |
29711 } | |
29712 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { | |
29713 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; | |
29714 m->defaults_tuple = tuple; | |
29715 Py_INCREF(tuple); | |
29716 } | |
29717 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { | |
29718 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; | |
29719 m->defaults_kwdict = dict; | |
29720 Py_INCREF(dict); | |
29721 } | |
29722 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { | |
29723 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; | |
29724 m->func_annotations = dict; | |
29725 Py_INCREF(dict); | |
29726 } | |
29727 | |
29728 /* CythonFunction */ | |
29729 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, | |
29730 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { | |
29731 PyObject *op = __Pyx_CyFunction_Init( | |
29732 PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), | |
29733 ml, flags, qualname, closure, module, globals, code | |
29734 ); | |
29735 if (likely(op)) { | |
29736 PyObject_GC_Track(op); | |
29737 } | |
29738 return op; | |
29739 } | |
29740 | |
29741 /* WriteUnraisableException */ | |
29742 static void __Pyx_WriteUnraisable(const char *name, int clineno, | |
29743 int lineno, const char *filename, | |
29744 int full_traceback, int nogil) { | |
29745 PyObject *old_exc, *old_val, *old_tb; | |
29746 PyObject *ctx; | |
29747 __Pyx_PyThreadState_declare | |
29748 #ifdef WITH_THREAD | |
29749 PyGILState_STATE state; | |
29750 if (nogil) | |
29751 state = PyGILState_Ensure(); | |
29752 else state = (PyGILState_STATE)0; | |
29753 #endif | |
29754 CYTHON_UNUSED_VAR(clineno); | |
29755 CYTHON_UNUSED_VAR(lineno); | |
29756 CYTHON_UNUSED_VAR(filename); | |
29757 CYTHON_MAYBE_UNUSED_VAR(nogil); | |
29758 __Pyx_PyThreadState_assign | |
29759 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); | |
29760 if (full_traceback) { | |
29761 Py_XINCREF(old_exc); | |
29762 Py_XINCREF(old_val); | |
29763 Py_XINCREF(old_tb); | |
29764 __Pyx_ErrRestore(old_exc, old_val, old_tb); | |
29765 PyErr_PrintEx(0); | |
29766 } | |
29767 #if PY_MAJOR_VERSION < 3 | |
29768 ctx = PyString_FromString(name); | |
29769 #else | |
29770 ctx = PyUnicode_FromString(name); | |
29771 #endif | |
29772 __Pyx_ErrRestore(old_exc, old_val, old_tb); | |
29773 if (!ctx) { | |
29774 PyErr_WriteUnraisable(Py_None); | |
29775 } else { | |
29776 PyErr_WriteUnraisable(ctx); | |
29777 Py_DECREF(ctx); | |
29778 } | |
29779 #ifdef WITH_THREAD | |
29780 if (nogil) | |
29781 PyGILState_Release(state); | |
29782 #endif | |
29783 } | |
29784 | |
29785 /* KeywordStringCheck */ | |
29786 static int __Pyx_CheckKeywordStrings( | |
29787 PyObject *kw, | |
29788 const char* function_name, | |
29789 int kw_allowed) | |
29790 { | |
29791 PyObject* key = 0; | |
29792 Py_ssize_t pos = 0; | |
29793 #if CYTHON_COMPILING_IN_PYPY | |
29794 if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0)) | |
29795 goto invalid_keyword; | |
29796 return 1; | |
29797 #else | |
29798 if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { | |
29799 Py_ssize_t kwsize; | |
29800 #if CYTHON_ASSUME_SAFE_MACROS | |
29801 kwsize = PyTuple_GET_SIZE(kw); | |
29802 #else | |
29803 kwsize = PyTuple_Size(kw); | |
29804 if (kwsize < 0) return 0; | |
29805 #endif | |
29806 if (unlikely(kwsize == 0)) | |
29807 return 1; | |
29808 if (!kw_allowed) { | |
29809 #if CYTHON_ASSUME_SAFE_MACROS | |
29810 key = PyTuple_GET_ITEM(kw, 0); | |
29811 #else | |
29812 key = PyTuple_GetItem(kw, pos); | |
29813 if (!key) return 0; | |
29814 #endif | |
29815 goto invalid_keyword; | |
29816 } | |
29817 #if PY_VERSION_HEX < 0x03090000 | |
29818 for (pos = 0; pos < kwsize; pos++) { | |
29819 #if CYTHON_ASSUME_SAFE_MACROS | |
29820 key = PyTuple_GET_ITEM(kw, pos); | |
29821 #else | |
29822 key = PyTuple_GetItem(kw, pos); | |
29823 if (!key) return 0; | |
29824 #endif | |
29825 if (unlikely(!PyUnicode_Check(key))) | |
29826 goto invalid_keyword_type; | |
29827 } | |
29828 #endif | |
29829 return 1; | |
29830 } | |
29831 while (PyDict_Next(kw, &pos, &key, 0)) { | |
29832 #if PY_MAJOR_VERSION < 3 | |
29833 if (unlikely(!PyString_Check(key))) | |
29834 #endif | |
29835 if (unlikely(!PyUnicode_Check(key))) | |
29836 goto invalid_keyword_type; | |
29837 } | |
29838 if (!kw_allowed && unlikely(key)) | |
29839 goto invalid_keyword; | |
29840 return 1; | |
29841 invalid_keyword_type: | |
29842 PyErr_Format(PyExc_TypeError, | |
29843 "%.200s() keywords must be strings", function_name); | |
29844 return 0; | |
29845 #endif | |
29846 invalid_keyword: | |
29847 #if PY_MAJOR_VERSION < 3 | |
29848 PyErr_Format(PyExc_TypeError, | |
29849 "%.200s() got an unexpected keyword argument '%.200s'", | |
29850 function_name, PyString_AsString(key)); | |
29851 #else | |
29852 PyErr_Format(PyExc_TypeError, | |
29853 "%s() got an unexpected keyword argument '%U'", | |
29854 function_name, key); | |
29855 #endif | |
29856 return 0; | |
29857 } | |
29858 | |
29859 /* PyObjectCall */ | |
29860 #if CYTHON_COMPILING_IN_CPYTHON | |
29861 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { | |
29862 PyObject *result; | |
29863 ternaryfunc call = Py_TYPE(func)->tp_call; | |
29864 if (unlikely(!call)) | |
29865 return PyObject_Call(func, arg, kw); | |
29866 #if PY_MAJOR_VERSION < 3 | |
29867 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) | |
29868 return NULL; | |
29869 #else | |
29870 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) | |
29871 return NULL; | |
29872 #endif | |
29873 result = (*call)(func, arg, kw); | |
29874 Py_LeaveRecursiveCall(); | |
29875 if (unlikely(!result) && unlikely(!PyErr_Occurred())) { | |
29876 PyErr_SetString( | |
29877 PyExc_SystemError, | |
29878 "NULL result without error in PyObject_Call"); | |
29879 } | |
29880 return result; | |
29881 } | |
29882 #endif | |
29883 | |
29884 /* RaiseException */ | |
29885 #if PY_MAJOR_VERSION < 3 | |
29886 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { | |
29887 __Pyx_PyThreadState_declare | |
29888 CYTHON_UNUSED_VAR(cause); | |
29889 Py_XINCREF(type); | |
29890 if (!value || value == Py_None) | |
29891 value = NULL; | |
29892 else | |
29893 Py_INCREF(value); | |
29894 if (!tb || tb == Py_None) | |
29895 tb = NULL; | |
29896 else { | |
29897 Py_INCREF(tb); | |
29898 if (!PyTraceBack_Check(tb)) { | |
29899 PyErr_SetString(PyExc_TypeError, | |
29900 "raise: arg 3 must be a traceback or None"); | |
29901 goto raise_error; | |
29902 } | |
29903 } | |
29904 if (PyType_Check(type)) { | |
29905 #if CYTHON_COMPILING_IN_PYPY | |
29906 if (!value) { | |
29907 Py_INCREF(Py_None); | |
29908 value = Py_None; | |
29909 } | |
29910 #endif | |
29911 PyErr_NormalizeException(&type, &value, &tb); | |
29912 } else { | |
29913 if (value) { | |
29914 PyErr_SetString(PyExc_TypeError, | |
29915 "instance exception may not have a separate value"); | |
29916 goto raise_error; | |
29917 } | |
29918 value = type; | |
29919 type = (PyObject*) Py_TYPE(type); | |
29920 Py_INCREF(type); | |
29921 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { | |
29922 PyErr_SetString(PyExc_TypeError, | |
29923 "raise: exception class must be a subclass of BaseException"); | |
29924 goto raise_error; | |
29925 } | |
29926 } | |
29927 __Pyx_PyThreadState_assign | |
29928 __Pyx_ErrRestore(type, value, tb); | |
29929 return; | |
29930 raise_error: | |
29931 Py_XDECREF(value); | |
29932 Py_XDECREF(type); | |
29933 Py_XDECREF(tb); | |
29934 return; | |
29935 } | |
29936 #else | |
29937 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { | |
29938 PyObject* owned_instance = NULL; | |
29939 if (tb == Py_None) { | |
29940 tb = 0; | |
29941 } else if (tb && !PyTraceBack_Check(tb)) { | |
29942 PyErr_SetString(PyExc_TypeError, | |
29943 "raise: arg 3 must be a traceback or None"); | |
29944 goto bad; | |
29945 } | |
29946 if (value == Py_None) | |
29947 value = 0; | |
29948 if (PyExceptionInstance_Check(type)) { | |
29949 if (value) { | |
29950 PyErr_SetString(PyExc_TypeError, | |
29951 "instance exception may not have a separate value"); | |
29952 goto bad; | |
29953 } | |
29954 value = type; | |
29955 type = (PyObject*) Py_TYPE(value); | |
29956 } else if (PyExceptionClass_Check(type)) { | |
29957 PyObject *instance_class = NULL; | |
29958 if (value && PyExceptionInstance_Check(value)) { | |
29959 instance_class = (PyObject*) Py_TYPE(value); | |
29960 if (instance_class != type) { | |
29961 int is_subclass = PyObject_IsSubclass(instance_class, type); | |
29962 if (!is_subclass) { | |
29963 instance_class = NULL; | |
29964 } else if (unlikely(is_subclass == -1)) { | |
29965 goto bad; | |
29966 } else { | |
29967 type = instance_class; | |
29968 } | |
29969 } | |
29970 } | |
29971 if (!instance_class) { | |
29972 PyObject *args; | |
29973 if (!value) | |
29974 args = PyTuple_New(0); | |
29975 else if (PyTuple_Check(value)) { | |
29976 Py_INCREF(value); | |
29977 args = value; | |
29978 } else | |
29979 args = PyTuple_Pack(1, value); | |
29980 if (!args) | |
29981 goto bad; | |
29982 owned_instance = PyObject_Call(type, args, NULL); | |
29983 Py_DECREF(args); | |
29984 if (!owned_instance) | |
29985 goto bad; | |
29986 value = owned_instance; | |
29987 if (!PyExceptionInstance_Check(value)) { | |
29988 PyErr_Format(PyExc_TypeError, | |
29989 "calling %R should have returned an instance of " | |
29990 "BaseException, not %R", | |
29991 type, Py_TYPE(value)); | |
29992 goto bad; | |
29993 } | |
29994 } | |
29995 } else { | |
29996 PyErr_SetString(PyExc_TypeError, | |
29997 "raise: exception class must be a subclass of BaseException"); | |
29998 goto bad; | |
29999 } | |
30000 if (cause) { | |
30001 PyObject *fixed_cause; | |
30002 if (cause == Py_None) { | |
30003 fixed_cause = NULL; | |
30004 } else if (PyExceptionClass_Check(cause)) { | |
30005 fixed_cause = PyObject_CallObject(cause, NULL); | |
30006 if (fixed_cause == NULL) | |
30007 goto bad; | |
30008 } else if (PyExceptionInstance_Check(cause)) { | |
30009 fixed_cause = cause; | |
30010 Py_INCREF(fixed_cause); | |
30011 } else { | |
30012 PyErr_SetString(PyExc_TypeError, | |
30013 "exception causes must derive from " | |
30014 "BaseException"); | |
30015 goto bad; | |
30016 } | |
30017 PyException_SetCause(value, fixed_cause); | |
30018 } | |
30019 PyErr_SetObject(type, value); | |
30020 if (tb) { | |
30021 #if PY_VERSION_HEX >= 0x030C00A6 | |
30022 PyException_SetTraceback(value, tb); | |
30023 #elif CYTHON_FAST_THREAD_STATE | |
30024 PyThreadState *tstate = __Pyx_PyThreadState_Current; | |
30025 PyObject* tmp_tb = tstate->curexc_traceback; | |
30026 if (tb != tmp_tb) { | |
30027 Py_INCREF(tb); | |
30028 tstate->curexc_traceback = tb; | |
30029 Py_XDECREF(tmp_tb); | |
30030 } | |
30031 #else | |
30032 PyObject *tmp_type, *tmp_value, *tmp_tb; | |
30033 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); | |
30034 Py_INCREF(tb); | |
30035 PyErr_Restore(tmp_type, tmp_value, tb); | |
30036 Py_XDECREF(tmp_tb); | |
30037 #endif | |
30038 } | |
30039 bad: | |
30040 Py_XDECREF(owned_instance); | |
30041 return; | |
30042 } | |
30043 #endif | |
30044 | |
30045 /* PyFunctionFastCall */ | |
30046 #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL | |
30047 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, | |
30048 PyObject *globals) { | |
30049 PyFrameObject *f; | |
30050 PyThreadState *tstate = __Pyx_PyThreadState_Current; | |
30051 PyObject **fastlocals; | |
30052 Py_ssize_t i; | |
30053 PyObject *result; | |
30054 assert(globals != NULL); | |
30055 /* XXX Perhaps we should create a specialized | |
30056 PyFrame_New() that doesn't take locals, but does | |
30057 take builtins without sanity checking them. | |
30058 */ | |
30059 assert(tstate != NULL); | |
30060 f = PyFrame_New(tstate, co, globals, NULL); | |
30061 if (f == NULL) { | |
30062 return NULL; | |
30063 } | |
30064 fastlocals = __Pyx_PyFrame_GetLocalsplus(f); | |
30065 for (i = 0; i < na; i++) { | |
30066 Py_INCREF(*args); | |
30067 fastlocals[i] = *args++; | |
30068 } | |
30069 result = PyEval_EvalFrameEx(f,0); | |
30070 ++tstate->recursion_depth; | |
30071 Py_DECREF(f); | |
30072 --tstate->recursion_depth; | |
30073 return result; | |
30074 } | |
30075 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { | |
30076 PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); | |
30077 PyObject *globals = PyFunction_GET_GLOBALS(func); | |
30078 PyObject *argdefs = PyFunction_GET_DEFAULTS(func); | |
30079 PyObject *closure; | |
30080 #if PY_MAJOR_VERSION >= 3 | |
30081 PyObject *kwdefs; | |
30082 #endif | |
30083 PyObject *kwtuple, **k; | |
30084 PyObject **d; | |
30085 Py_ssize_t nd; | |
30086 Py_ssize_t nk; | |
30087 PyObject *result; | |
30088 assert(kwargs == NULL || PyDict_Check(kwargs)); | |
30089 nk = kwargs ? PyDict_Size(kwargs) : 0; | |
30090 #if PY_MAJOR_VERSION < 3 | |
30091 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { | |
30092 return NULL; | |
30093 } | |
30094 #else | |
30095 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { | |
30096 return NULL; | |
30097 } | |
30098 #endif | |
30099 if ( | |
30100 #if PY_MAJOR_VERSION >= 3 | |
30101 co->co_kwonlyargcount == 0 && | |
30102 #endif | |
30103 likely(kwargs == NULL || nk == 0) && | |
30104 co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { | |
30105 if (argdefs == NULL && co->co_argcount == nargs) { | |
30106 result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); | |
30107 goto done; | |
30108 } | |
30109 else if (nargs == 0 && argdefs != NULL | |
30110 && co->co_argcount == Py_SIZE(argdefs)) { | |
30111 /* function called with no arguments, but all parameters have | |
30112 a default value: use default values as arguments .*/ | |
30113 args = &PyTuple_GET_ITEM(argdefs, 0); | |
30114 result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); | |
30115 goto done; | |
30116 } | |
30117 } | |
30118 if (kwargs != NULL) { | |
30119 Py_ssize_t pos, i; | |
30120 kwtuple = PyTuple_New(2 * nk); | |
30121 if (kwtuple == NULL) { | |
30122 result = NULL; | |
30123 goto done; | |
30124 } | |
30125 k = &PyTuple_GET_ITEM(kwtuple, 0); | |
30126 pos = i = 0; | |
30127 while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { | |
30128 Py_INCREF(k[i]); | |
30129 Py_INCREF(k[i+1]); | |
30130 i += 2; | |
30131 } | |
30132 nk = i / 2; | |
30133 } | |
30134 else { | |
30135 kwtuple = NULL; | |
30136 k = NULL; | |
30137 } | |
30138 closure = PyFunction_GET_CLOSURE(func); | |
30139 #if PY_MAJOR_VERSION >= 3 | |
30140 kwdefs = PyFunction_GET_KW_DEFAULTS(func); | |
30141 #endif | |
30142 if (argdefs != NULL) { | |
30143 d = &PyTuple_GET_ITEM(argdefs, 0); | |
30144 nd = Py_SIZE(argdefs); | |
30145 } | |
30146 else { | |
30147 d = NULL; | |
30148 nd = 0; | |
30149 } | |
30150 #if PY_MAJOR_VERSION >= 3 | |
30151 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, | |
30152 args, (int)nargs, | |
30153 k, (int)nk, | |
30154 d, (int)nd, kwdefs, closure); | |
30155 #else | |
30156 result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, | |
30157 args, (int)nargs, | |
30158 k, (int)nk, | |
30159 d, (int)nd, closure); | |
30160 #endif | |
30161 Py_XDECREF(kwtuple); | |
30162 done: | |
30163 Py_LeaveRecursiveCall(); | |
30164 return result; | |
30165 } | |
30166 #endif | |
30167 | |
30168 /* PyObjectCallMethO */ | |
30169 #if CYTHON_COMPILING_IN_CPYTHON | |
30170 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { | |
30171 PyObject *self, *result; | |
30172 PyCFunction cfunc; | |
30173 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); | |
30174 self = __Pyx_CyOrPyCFunction_GET_SELF(func); | |
30175 #if PY_MAJOR_VERSION < 3 | |
30176 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) | |
30177 return NULL; | |
30178 #else | |
30179 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) | |
30180 return NULL; | |
30181 #endif | |
30182 result = cfunc(self, arg); | |
30183 Py_LeaveRecursiveCall(); | |
30184 if (unlikely(!result) && unlikely(!PyErr_Occurred())) { | |
30185 PyErr_SetString( | |
30186 PyExc_SystemError, | |
30187 "NULL result without error in PyObject_Call"); | |
30188 } | |
30189 return result; | |
30190 } | |
30191 #endif | |
30192 | |
30193 /* PyObjectFastCall */ | |
30194 #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API | |
30195 static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { | |
30196 PyObject *argstuple; | |
30197 PyObject *result = 0; | |
30198 size_t i; | |
30199 argstuple = PyTuple_New((Py_ssize_t)nargs); | |
30200 if (unlikely(!argstuple)) return NULL; | |
30201 for (i = 0; i < nargs; i++) { | |
30202 Py_INCREF(args[i]); | |
30203 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad; | |
30204 } | |
30205 result = __Pyx_PyObject_Call(func, argstuple, kwargs); | |
30206 bad: | |
30207 Py_DECREF(argstuple); | |
30208 return result; | |
30209 } | |
30210 #endif | |
30211 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { | |
30212 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); | |
30213 #if CYTHON_COMPILING_IN_CPYTHON | |
30214 if (nargs == 0 && kwargs == NULL) { | |
30215 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) | |
30216 return __Pyx_PyObject_CallMethO(func, NULL); | |
30217 } | |
30218 else if (nargs == 1 && kwargs == NULL) { | |
30219 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) | |
30220 return __Pyx_PyObject_CallMethO(func, args[0]); | |
30221 } | |
30222 #endif | |
30223 #if PY_VERSION_HEX < 0x030800B1 | |
30224 #if CYTHON_FAST_PYCCALL | |
30225 if (PyCFunction_Check(func)) { | |
30226 if (kwargs) { | |
30227 return _PyCFunction_FastCallDict(func, args, nargs, kwargs); | |
30228 } else { | |
30229 return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); | |
30230 } | |
30231 } | |
30232 #if PY_VERSION_HEX >= 0x030700A1 | |
30233 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { | |
30234 return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); | |
30235 } | |
30236 #endif | |
30237 #endif | |
30238 #if CYTHON_FAST_PYCALL | |
30239 if (PyFunction_Check(func)) { | |
30240 return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); | |
30241 } | |
30242 #endif | |
30243 #endif | |
30244 if (kwargs == NULL) { | |
30245 #if CYTHON_VECTORCALL | |
30246 #if PY_VERSION_HEX < 0x03090000 | |
30247 vectorcallfunc f = _PyVectorcall_Function(func); | |
30248 #else | |
30249 vectorcallfunc f = PyVectorcall_Function(func); | |
30250 #endif | |
30251 if (f) { | |
30252 return f(func, args, (size_t)nargs, NULL); | |
30253 } | |
30254 #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL | |
30255 if (__Pyx_CyFunction_CheckExact(func)) { | |
30256 __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); | |
30257 if (f) return f(func, args, (size_t)nargs, NULL); | |
30258 } | |
30259 #endif | |
30260 } | |
30261 if (nargs == 0) { | |
30262 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); | |
30263 } | |
30264 #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API | |
30265 return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); | |
30266 #else | |
30267 return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); | |
30268 #endif | |
30269 } | |
30270 | |
30271 /* ExtTypeTest */ | |
30272 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { | |
30273 __Pyx_TypeName obj_type_name; | |
30274 __Pyx_TypeName type_name; | |
30275 if (unlikely(!type)) { | |
30276 PyErr_SetString(PyExc_SystemError, "Missing type object"); | |
30277 return 0; | |
30278 } | |
30279 if (likely(__Pyx_TypeCheck(obj, type))) | |
30280 return 1; | |
30281 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); | |
30282 type_name = __Pyx_PyType_GetName(type); | |
30283 PyErr_Format(PyExc_TypeError, | |
30284 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, | |
30285 obj_type_name, type_name); | |
30286 __Pyx_DECREF_TypeName(obj_type_name); | |
30287 __Pyx_DECREF_TypeName(type_name); | |
30288 return 0; | |
30289 } | |
30290 | |
30291 /* ArgTypeTest */ | |
30292 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) | |
30293 { | |
30294 __Pyx_TypeName type_name; | |
30295 __Pyx_TypeName obj_type_name; | |
30296 if (unlikely(!type)) { | |
30297 PyErr_SetString(PyExc_SystemError, "Missing type object"); | |
30298 return 0; | |
30299 } | |
30300 else if (exact) { | |
30301 #if PY_MAJOR_VERSION == 2 | |
30302 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; | |
30303 #endif | |
30304 } | |
30305 else { | |
30306 if (likely(__Pyx_TypeCheck(obj, type))) return 1; | |
30307 } | |
30308 type_name = __Pyx_PyType_GetName(type); | |
30309 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); | |
30310 PyErr_Format(PyExc_TypeError, | |
30311 "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME | |
30312 ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name); | |
30313 __Pyx_DECREF_TypeName(type_name); | |
30314 __Pyx_DECREF_TypeName(obj_type_name); | |
30315 return 0; | |
30316 } | |
30317 | |
30318 /* PyIntCompare */ | |
30319 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { | |
30320 CYTHON_MAYBE_UNUSED_VAR(intval); | |
30321 CYTHON_UNUSED_VAR(inplace); | |
30322 if (op1 == op2) { | |
30323 Py_RETURN_TRUE; | |
30324 } | |
30325 #if PY_MAJOR_VERSION < 3 | |
30326 if (likely(PyInt_CheckExact(op1))) { | |
30327 const long b = intval; | |
30328 long a = PyInt_AS_LONG(op1); | |
30329 if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; | |
30330 } | |
30331 #endif | |
30332 #if CYTHON_USE_PYLONG_INTERNALS | |
30333 if (likely(PyLong_CheckExact(op1))) { | |
30334 int unequal; | |
30335 unsigned long uintval; | |
30336 Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); | |
30337 const digit* digits = __Pyx_PyLong_Digits(op1); | |
30338 if (intval == 0) { | |
30339 if (__Pyx_PyLong_IsZero(op1) == 1) Py_RETURN_TRUE; else Py_RETURN_FALSE; | |
30340 } else if (intval < 0) { | |
30341 if (__Pyx_PyLong_IsNonNeg(op1)) | |
30342 Py_RETURN_FALSE; | |
30343 intval = -intval; | |
30344 } else { | |
30345 if (__Pyx_PyLong_IsNeg(op1)) | |
30346 Py_RETURN_FALSE; | |
30347 } | |
30348 uintval = (unsigned long) intval; | |
30349 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8 | |
30350 if (uintval >> (PyLong_SHIFT * 4)) { | |
30351 unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | |
30352 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); | |
30353 } else | |
30354 #endif | |
30355 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8 | |
30356 if (uintval >> (PyLong_SHIFT * 3)) { | |
30357 unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | |
30358 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); | |
30359 } else | |
30360 #endif | |
30361 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8 | |
30362 if (uintval >> (PyLong_SHIFT * 2)) { | |
30363 unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | |
30364 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); | |
30365 } else | |
30366 #endif | |
30367 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8 | |
30368 if (uintval >> (PyLong_SHIFT * 1)) { | |
30369 unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | |
30370 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); | |
30371 } else | |
30372 #endif | |
30373 unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); | |
30374 if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; | |
30375 } | |
30376 #endif | |
30377 if (PyFloat_CheckExact(op1)) { | |
30378 const long b = intval; | |
30379 #if CYTHON_COMPILING_IN_LIMITED_API | |
30380 double a = __pyx_PyFloat_AsDouble(op1); | |
30381 #else | |
30382 double a = PyFloat_AS_DOUBLE(op1); | |
30383 #endif | |
30384 if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; | |
30385 } | |
30386 return ( | |
30387 PyObject_RichCompare(op1, op2, Py_EQ)); | |
30388 } | |
30389 | |
30390 /* PyIntCompare */ | |
30391 static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { | |
30392 CYTHON_MAYBE_UNUSED_VAR(intval); | |
30393 CYTHON_UNUSED_VAR(inplace); | |
30394 if (op1 == op2) { | |
30395 Py_RETURN_FALSE; | |
30396 } | |
30397 #if PY_MAJOR_VERSION < 3 | |
30398 if (likely(PyInt_CheckExact(op1))) { | |
30399 const long b = intval; | |
30400 long a = PyInt_AS_LONG(op1); | |
30401 if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE; | |
30402 } | |
30403 #endif | |
30404 #if CYTHON_USE_PYLONG_INTERNALS | |
30405 if (likely(PyLong_CheckExact(op1))) { | |
30406 int unequal; | |
30407 unsigned long uintval; | |
30408 Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); | |
30409 const digit* digits = __Pyx_PyLong_Digits(op1); | |
30410 if (intval == 0) { | |
30411 if (__Pyx_PyLong_IsZero(op1) != 1) Py_RETURN_TRUE; else Py_RETURN_FALSE; | |
30412 } else if (intval < 0) { | |
30413 if (__Pyx_PyLong_IsNonNeg(op1)) | |
30414 Py_RETURN_TRUE; | |
30415 intval = -intval; | |
30416 } else { | |
30417 if (__Pyx_PyLong_IsNeg(op1)) | |
30418 Py_RETURN_TRUE; | |
30419 } | |
30420 uintval = (unsigned long) intval; | |
30421 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8 | |
30422 if (uintval >> (PyLong_SHIFT * 4)) { | |
30423 unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | |
30424 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); | |
30425 } else | |
30426 #endif | |
30427 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8 | |
30428 if (uintval >> (PyLong_SHIFT * 3)) { | |
30429 unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | |
30430 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); | |
30431 } else | |
30432 #endif | |
30433 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8 | |
30434 if (uintval >> (PyLong_SHIFT * 2)) { | |
30435 unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | |
30436 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); | |
30437 } else | |
30438 #endif | |
30439 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8 | |
30440 if (uintval >> (PyLong_SHIFT * 1)) { | |
30441 unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | |
30442 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); | |
30443 } else | |
30444 #endif | |
30445 unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); | |
30446 if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; | |
30447 } | |
30448 #endif | |
30449 if (PyFloat_CheckExact(op1)) { | |
30450 const long b = intval; | |
30451 #if CYTHON_COMPILING_IN_LIMITED_API | |
30452 double a = __pyx_PyFloat_AsDouble(op1); | |
30453 #else | |
30454 double a = PyFloat_AS_DOUBLE(op1); | |
30455 #endif | |
30456 if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; | |
30457 } | |
30458 return ( | |
30459 PyObject_RichCompare(op1, op2, Py_NE)); | |
30460 } | |
30461 | |
30462 /* PyObjectCallOneArg */ | |
30463 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { | |
30464 PyObject *args[2] = {NULL, arg}; | |
30465 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); | |
30466 } | |
30467 | |
30468 /* PyDictVersioning */ | |
30469 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS | |
30470 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { | |
30471 PyObject *dict = Py_TYPE(obj)->tp_dict; | |
30472 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; | |
30473 } | |
30474 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { | |
30475 PyObject **dictptr = NULL; | |
30476 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; | |
30477 if (offset) { | |
30478 #if CYTHON_COMPILING_IN_CPYTHON | |
30479 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); | |
30480 #else | |
30481 dictptr = _PyObject_GetDictPtr(obj); | |
30482 #endif | |
30483 } | |
30484 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; | |
30485 } | |
30486 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { | |
30487 PyObject *dict = Py_TYPE(obj)->tp_dict; | |
30488 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) | |
30489 return 0; | |
30490 return obj_dict_version == __Pyx_get_object_dict_version(obj); | |
30491 } | |
30492 #endif | |
30493 | |
30494 /* RaiseTooManyValuesToUnpack */ | |
30495 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { | |
30496 PyErr_Format(PyExc_ValueError, | |
30497 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); | |
30498 } | |
30499 | |
30500 /* RaiseNeedMoreValuesToUnpack */ | |
30501 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { | |
30502 PyErr_Format(PyExc_ValueError, | |
30503 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", | |
30504 index, (index == 1) ? "" : "s"); | |
30505 } | |
30506 | |
30507 /* IterFinish */ | |
30508 static CYTHON_INLINE int __Pyx_IterFinish(void) { | |
30509 PyObject* exc_type; | |
30510 __Pyx_PyThreadState_declare | |
30511 __Pyx_PyThreadState_assign | |
30512 exc_type = __Pyx_PyErr_CurrentExceptionType(); | |
30513 if (unlikely(exc_type)) { | |
30514 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) | |
30515 return -1; | |
30516 __Pyx_PyErr_Clear(); | |
30517 return 0; | |
30518 } | |
30519 return 0; | |
30520 } | |
30521 | |
30522 /* UnpackItemEndCheck */ | |
30523 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { | |
30524 if (unlikely(retval)) { | |
30525 Py_DECREF(retval); | |
30526 __Pyx_RaiseTooManyValuesError(expected); | |
30527 return -1; | |
30528 } | |
30529 return __Pyx_IterFinish(); | |
30530 } | |
30531 | |
30532 /* PyObjectCall2Args */ | |
30533 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { | |
30534 PyObject *args[3] = {NULL, arg1, arg2}; | |
30535 return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); | |
30536 } | |
30537 | |
30538 /* PyObjectGetMethod */ | |
30539 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { | |
30540 PyObject *attr; | |
30541 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP | |
30542 __Pyx_TypeName type_name; | |
30543 PyTypeObject *tp = Py_TYPE(obj); | |
30544 PyObject *descr; | |
30545 descrgetfunc f = NULL; | |
30546 PyObject **dictptr, *dict; | |
30547 int meth_found = 0; | |
30548 assert (*method == NULL); | |
30549 if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { | |
30550 attr = __Pyx_PyObject_GetAttrStr(obj, name); | |
30551 goto try_unpack; | |
30552 } | |
30553 if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { | |
30554 return 0; | |
30555 } | |
30556 descr = _PyType_Lookup(tp, name); | |
30557 if (likely(descr != NULL)) { | |
30558 Py_INCREF(descr); | |
30559 #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR | |
30560 if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) | |
30561 #elif PY_MAJOR_VERSION >= 3 | |
30562 #ifdef __Pyx_CyFunction_USED | |
30563 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) | |
30564 #else | |
30565 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) | |
30566 #endif | |
30567 #else | |
30568 #ifdef __Pyx_CyFunction_USED | |
30569 if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) | |
30570 #else | |
30571 if (likely(PyFunction_Check(descr))) | |
30572 #endif | |
30573 #endif | |
30574 { | |
30575 meth_found = 1; | |
30576 } else { | |
30577 f = Py_TYPE(descr)->tp_descr_get; | |
30578 if (f != NULL && PyDescr_IsData(descr)) { | |
30579 attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); | |
30580 Py_DECREF(descr); | |
30581 goto try_unpack; | |
30582 } | |
30583 } | |
30584 } | |
30585 dictptr = _PyObject_GetDictPtr(obj); | |
30586 if (dictptr != NULL && (dict = *dictptr) != NULL) { | |
30587 Py_INCREF(dict); | |
30588 attr = __Pyx_PyDict_GetItemStr(dict, name); | |
30589 if (attr != NULL) { | |
30590 Py_INCREF(attr); | |
30591 Py_DECREF(dict); | |
30592 Py_XDECREF(descr); | |
30593 goto try_unpack; | |
30594 } | |
30595 Py_DECREF(dict); | |
30596 } | |
30597 if (meth_found) { | |
30598 *method = descr; | |
30599 return 1; | |
30600 } | |
30601 if (f != NULL) { | |
30602 attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); | |
30603 Py_DECREF(descr); | |
30604 goto try_unpack; | |
30605 } | |
30606 if (likely(descr != NULL)) { | |
30607 *method = descr; | |
30608 return 0; | |
30609 } | |
30610 type_name = __Pyx_PyType_GetName(tp); | |
30611 PyErr_Format(PyExc_AttributeError, | |
30612 #if PY_MAJOR_VERSION >= 3 | |
30613 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", | |
30614 type_name, name); | |
30615 #else | |
30616 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", | |
30617 type_name, PyString_AS_STRING(name)); | |
30618 #endif | |
30619 __Pyx_DECREF_TypeName(type_name); | |
30620 return 0; | |
30621 #else | |
30622 attr = __Pyx_PyObject_GetAttrStr(obj, name); | |
30623 goto try_unpack; | |
30624 #endif | |
30625 try_unpack: | |
30626 #if CYTHON_UNPACK_METHODS | |
30627 if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { | |
30628 PyObject *function = PyMethod_GET_FUNCTION(attr); | |
30629 Py_INCREF(function); | |
30630 Py_DECREF(attr); | |
30631 *method = function; | |
30632 return 1; | |
30633 } | |
30634 #endif | |
30635 *method = attr; | |
30636 return 0; | |
30637 } | |
30638 | |
30639 /* PyObjectCallMethod1 */ | |
30640 #if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2) | |
30641 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { | |
30642 PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); | |
30643 Py_DECREF(method); | |
30644 return result; | |
30645 } | |
30646 #endif | |
30647 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { | |
30648 #if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2 | |
30649 PyObject *args[2] = {obj, arg}; | |
30650 (void) __Pyx_PyObject_GetMethod; | |
30651 (void) __Pyx_PyObject_CallOneArg; | |
30652 (void) __Pyx_PyObject_Call2Args; | |
30653 return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); | |
30654 #else | |
30655 PyObject *method = NULL, *result; | |
30656 int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); | |
30657 if (likely(is_method)) { | |
30658 result = __Pyx_PyObject_Call2Args(method, obj, arg); | |
30659 Py_DECREF(method); | |
30660 return result; | |
30661 } | |
30662 if (unlikely(!method)) return NULL; | |
30663 return __Pyx__PyObject_CallMethod1(method, arg); | |
30664 #endif | |
30665 } | |
30666 | |
30667 /* append */ | |
30668 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { | |
30669 if (likely(PyList_CheckExact(L))) { | |
30670 if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; | |
30671 } else { | |
30672 PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); | |
30673 if (unlikely(!retval)) | |
30674 return -1; | |
30675 Py_DECREF(retval); | |
30676 } | |
30677 return 0; | |
30678 } | |
30679 | |
30680 /* GetAttr3 */ | |
30681 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 | |
30682 static PyObject *__Pyx_GetAttr3Default(PyObject *d) { | |
30683 __Pyx_PyThreadState_declare | |
30684 __Pyx_PyThreadState_assign | |
30685 if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) | |
30686 return NULL; | |
30687 __Pyx_PyErr_Clear(); | |
30688 Py_INCREF(d); | |
30689 return d; | |
30690 } | |
30691 #endif | |
30692 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { | |
30693 PyObject *r; | |
30694 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 | |
30695 int res = PyObject_GetOptionalAttr(o, n, &r); | |
30696 return (res != 0) ? r : __Pyx_NewRef(d); | |
30697 #else | |
30698 #if CYTHON_USE_TYPE_SLOTS | |
30699 if (likely(PyString_Check(n))) { | |
30700 r = __Pyx_PyObject_GetAttrStrNoError(o, n); | |
30701 if (unlikely(!r) && likely(!PyErr_Occurred())) { | |
30702 r = __Pyx_NewRef(d); | |
30703 } | |
30704 return r; | |
30705 } | |
30706 #endif | |
30707 r = PyObject_GetAttr(o, n); | |
30708 return (likely(r)) ? r : __Pyx_GetAttr3Default(d); | |
30709 #endif | |
30710 } | |
30711 | |
30712 /* GetModuleGlobalName */ | |
30713 #if CYTHON_USE_DICT_VERSIONS | |
30714 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) | |
30715 #else | |
30716 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) | |
30717 #endif | |
30718 { | |
30719 PyObject *result; | |
30720 #if !CYTHON_AVOID_BORROWED_REFS | |
30721 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 | |
30722 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); | |
30723 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) | |
30724 if (likely(result)) { | |
30725 return __Pyx_NewRef(result); | |
30726 } else if (unlikely(PyErr_Occurred())) { | |
30727 return NULL; | |
30728 } | |
30729 #elif CYTHON_COMPILING_IN_LIMITED_API | |
30730 if (unlikely(!__pyx_m)) { | |
30731 return NULL; | |
30732 } | |
30733 result = PyObject_GetAttr(__pyx_m, name); | |
30734 if (likely(result)) { | |
30735 return result; | |
30736 } | |
30737 #else | |
30738 result = PyDict_GetItem(__pyx_d, name); | |
30739 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) | |
30740 if (likely(result)) { | |
30741 return __Pyx_NewRef(result); | |
30742 } | |
30743 #endif | |
30744 #else | |
30745 result = PyObject_GetItem(__pyx_d, name); | |
30746 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) | |
30747 if (likely(result)) { | |
30748 return __Pyx_NewRef(result); | |
30749 } | |
30750 PyErr_Clear(); | |
30751 #endif | |
30752 return __Pyx_GetBuiltinName(name); | |
30753 } | |
30754 | |
30755 /* RaiseUnexpectedTypeError */ | |
30756 static int | |
30757 __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) | |
30758 { | |
30759 __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); | |
30760 PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, | |
30761 expected, obj_type_name); | |
30762 __Pyx_DECREF_TypeName(obj_type_name); | |
30763 return 0; | |
30764 } | |
30765 | |
30766 /* GetItemInt */ | |
30767 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { | |
30768 PyObject *r; | |
30769 if (unlikely(!j)) return NULL; | |
30770 r = PyObject_GetItem(o, j); | |
30771 Py_DECREF(j); | |
30772 return r; | |
30773 } | |
30774 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, | |
30775 CYTHON_NCP_UNUSED int wraparound, | |
30776 CYTHON_NCP_UNUSED int boundscheck) { | |
30777 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
30778 Py_ssize_t wrapped_i = i; | |
30779 if (wraparound & unlikely(i < 0)) { | |
30780 wrapped_i += PyList_GET_SIZE(o); | |
30781 } | |
30782 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { | |
30783 PyObject *r = PyList_GET_ITEM(o, wrapped_i); | |
30784 Py_INCREF(r); | |
30785 return r; | |
30786 } | |
30787 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); | |
30788 #else | |
30789 return PySequence_GetItem(o, i); | |
30790 #endif | |
30791 } | |
30792 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, | |
30793 CYTHON_NCP_UNUSED int wraparound, | |
30794 CYTHON_NCP_UNUSED int boundscheck) { | |
30795 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
30796 Py_ssize_t wrapped_i = i; | |
30797 if (wraparound & unlikely(i < 0)) { | |
30798 wrapped_i += PyTuple_GET_SIZE(o); | |
30799 } | |
30800 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { | |
30801 PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); | |
30802 Py_INCREF(r); | |
30803 return r; | |
30804 } | |
30805 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); | |
30806 #else | |
30807 return PySequence_GetItem(o, i); | |
30808 #endif | |
30809 } | |
30810 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, | |
30811 CYTHON_NCP_UNUSED int wraparound, | |
30812 CYTHON_NCP_UNUSED int boundscheck) { | |
30813 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS | |
30814 if (is_list || PyList_CheckExact(o)) { | |
30815 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); | |
30816 if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { | |
30817 PyObject *r = PyList_GET_ITEM(o, n); | |
30818 Py_INCREF(r); | |
30819 return r; | |
30820 } | |
30821 } | |
30822 else if (PyTuple_CheckExact(o)) { | |
30823 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); | |
30824 if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { | |
30825 PyObject *r = PyTuple_GET_ITEM(o, n); | |
30826 Py_INCREF(r); | |
30827 return r; | |
30828 } | |
30829 } else { | |
30830 PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; | |
30831 PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; | |
30832 if (mm && mm->mp_subscript) { | |
30833 PyObject *r, *key = PyInt_FromSsize_t(i); | |
30834 if (unlikely(!key)) return NULL; | |
30835 r = mm->mp_subscript(o, key); | |
30836 Py_DECREF(key); | |
30837 return r; | |
30838 } | |
30839 if (likely(sm && sm->sq_item)) { | |
30840 if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { | |
30841 Py_ssize_t l = sm->sq_length(o); | |
30842 if (likely(l >= 0)) { | |
30843 i += l; | |
30844 } else { | |
30845 if (!PyErr_ExceptionMatches(PyExc_OverflowError)) | |
30846 return NULL; | |
30847 PyErr_Clear(); | |
30848 } | |
30849 } | |
30850 return sm->sq_item(o, i); | |
30851 } | |
30852 } | |
30853 #else | |
30854 if (is_list || !PyMapping_Check(o)) { | |
30855 return PySequence_GetItem(o, i); | |
30856 } | |
30857 #endif | |
30858 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); | |
30859 } | |
30860 | |
30861 /* ObjectGetItem */ | |
30862 #if CYTHON_USE_TYPE_SLOTS | |
30863 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { | |
30864 PyObject *runerr = NULL; | |
30865 Py_ssize_t key_value; | |
30866 key_value = __Pyx_PyIndex_AsSsize_t(index); | |
30867 if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { | |
30868 return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); | |
30869 } | |
30870 if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { | |
30871 __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index)); | |
30872 PyErr_Clear(); | |
30873 PyErr_Format(PyExc_IndexError, | |
30874 "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); | |
30875 __Pyx_DECREF_TypeName(index_type_name); | |
30876 } | |
30877 return NULL; | |
30878 } | |
30879 static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { | |
30880 __Pyx_TypeName obj_type_name; | |
30881 if (likely(PyType_Check(obj))) { | |
30882 PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem); | |
30883 if (!meth) { | |
30884 PyErr_Clear(); | |
30885 } else { | |
30886 PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); | |
30887 Py_DECREF(meth); | |
30888 return result; | |
30889 } | |
30890 } | |
30891 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); | |
30892 PyErr_Format(PyExc_TypeError, | |
30893 "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); | |
30894 __Pyx_DECREF_TypeName(obj_type_name); | |
30895 return NULL; | |
30896 } | |
30897 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { | |
30898 PyTypeObject *tp = Py_TYPE(obj); | |
30899 PyMappingMethods *mm = tp->tp_as_mapping; | |
30900 PySequenceMethods *sm = tp->tp_as_sequence; | |
30901 if (likely(mm && mm->mp_subscript)) { | |
30902 return mm->mp_subscript(obj, key); | |
30903 } | |
30904 if (likely(sm && sm->sq_item)) { | |
30905 return __Pyx_PyObject_GetIndex(obj, key); | |
30906 } | |
30907 return __Pyx_PyObject_GetItem_Slow(obj, key); | |
30908 } | |
30909 #endif | |
30910 | |
30911 /* GetTopmostException */ | |
30912 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE | |
30913 static _PyErr_StackItem * | |
30914 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) | |
30915 { | |
30916 _PyErr_StackItem *exc_info = tstate->exc_info; | |
30917 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && | |
30918 exc_info->previous_item != NULL) | |
30919 { | |
30920 exc_info = exc_info->previous_item; | |
30921 } | |
30922 return exc_info; | |
30923 } | |
30924 #endif | |
30925 | |
30926 /* SaveResetException */ | |
30927 #if CYTHON_FAST_THREAD_STATE | |
30928 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { | |
30929 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 | |
30930 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); | |
30931 PyObject *exc_value = exc_info->exc_value; | |
30932 if (exc_value == NULL || exc_value == Py_None) { | |
30933 *value = NULL; | |
30934 *type = NULL; | |
30935 *tb = NULL; | |
30936 } else { | |
30937 *value = exc_value; | |
30938 Py_INCREF(*value); | |
30939 *type = (PyObject*) Py_TYPE(exc_value); | |
30940 Py_INCREF(*type); | |
30941 *tb = PyException_GetTraceback(exc_value); | |
30942 } | |
30943 #elif CYTHON_USE_EXC_INFO_STACK | |
30944 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); | |
30945 *type = exc_info->exc_type; | |
30946 *value = exc_info->exc_value; | |
30947 *tb = exc_info->exc_traceback; | |
30948 Py_XINCREF(*type); | |
30949 Py_XINCREF(*value); | |
30950 Py_XINCREF(*tb); | |
30951 #else | |
30952 *type = tstate->exc_type; | |
30953 *value = tstate->exc_value; | |
30954 *tb = tstate->exc_traceback; | |
30955 Py_XINCREF(*type); | |
30956 Py_XINCREF(*value); | |
30957 Py_XINCREF(*tb); | |
30958 #endif | |
30959 } | |
30960 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { | |
30961 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 | |
30962 _PyErr_StackItem *exc_info = tstate->exc_info; | |
30963 PyObject *tmp_value = exc_info->exc_value; | |
30964 exc_info->exc_value = value; | |
30965 Py_XDECREF(tmp_value); | |
30966 Py_XDECREF(type); | |
30967 Py_XDECREF(tb); | |
30968 #else | |
30969 PyObject *tmp_type, *tmp_value, *tmp_tb; | |
30970 #if CYTHON_USE_EXC_INFO_STACK | |
30971 _PyErr_StackItem *exc_info = tstate->exc_info; | |
30972 tmp_type = exc_info->exc_type; | |
30973 tmp_value = exc_info->exc_value; | |
30974 tmp_tb = exc_info->exc_traceback; | |
30975 exc_info->exc_type = type; | |
30976 exc_info->exc_value = value; | |
30977 exc_info->exc_traceback = tb; | |
30978 #else | |
30979 tmp_type = tstate->exc_type; | |
30980 tmp_value = tstate->exc_value; | |
30981 tmp_tb = tstate->exc_traceback; | |
30982 tstate->exc_type = type; | |
30983 tstate->exc_value = value; | |
30984 tstate->exc_traceback = tb; | |
30985 #endif | |
30986 Py_XDECREF(tmp_type); | |
30987 Py_XDECREF(tmp_value); | |
30988 Py_XDECREF(tmp_tb); | |
30989 #endif | |
30990 } | |
30991 #endif | |
30992 | |
30993 /* GetException */ | |
30994 #if CYTHON_FAST_THREAD_STATE | |
30995 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) | |
30996 #else | |
30997 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) | |
30998 #endif | |
30999 { | |
31000 PyObject *local_type = NULL, *local_value, *local_tb = NULL; | |
31001 #if CYTHON_FAST_THREAD_STATE | |
31002 PyObject *tmp_type, *tmp_value, *tmp_tb; | |
31003 #if PY_VERSION_HEX >= 0x030C00A6 | |
31004 local_value = tstate->current_exception; | |
31005 tstate->current_exception = 0; | |
31006 if (likely(local_value)) { | |
31007 local_type = (PyObject*) Py_TYPE(local_value); | |
31008 Py_INCREF(local_type); | |
31009 local_tb = PyException_GetTraceback(local_value); | |
31010 } | |
31011 #else | |
31012 local_type = tstate->curexc_type; | |
31013 local_value = tstate->curexc_value; | |
31014 local_tb = tstate->curexc_traceback; | |
31015 tstate->curexc_type = 0; | |
31016 tstate->curexc_value = 0; | |
31017 tstate->curexc_traceback = 0; | |
31018 #endif | |
31019 #else | |
31020 PyErr_Fetch(&local_type, &local_value, &local_tb); | |
31021 #endif | |
31022 PyErr_NormalizeException(&local_type, &local_value, &local_tb); | |
31023 #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6 | |
31024 if (unlikely(tstate->current_exception)) | |
31025 #elif CYTHON_FAST_THREAD_STATE | |
31026 if (unlikely(tstate->curexc_type)) | |
31027 #else | |
31028 if (unlikely(PyErr_Occurred())) | |
31029 #endif | |
31030 goto bad; | |
31031 #if PY_MAJOR_VERSION >= 3 | |
31032 if (local_tb) { | |
31033 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) | |
31034 goto bad; | |
31035 } | |
31036 #endif | |
31037 Py_XINCREF(local_tb); | |
31038 Py_XINCREF(local_type); | |
31039 Py_XINCREF(local_value); | |
31040 *type = local_type; | |
31041 *value = local_value; | |
31042 *tb = local_tb; | |
31043 #if CYTHON_FAST_THREAD_STATE | |
31044 #if CYTHON_USE_EXC_INFO_STACK | |
31045 { | |
31046 _PyErr_StackItem *exc_info = tstate->exc_info; | |
31047 #if PY_VERSION_HEX >= 0x030B00a4 | |
31048 tmp_value = exc_info->exc_value; | |
31049 exc_info->exc_value = local_value; | |
31050 tmp_type = NULL; | |
31051 tmp_tb = NULL; | |
31052 Py_XDECREF(local_type); | |
31053 Py_XDECREF(local_tb); | |
31054 #else | |
31055 tmp_type = exc_info->exc_type; | |
31056 tmp_value = exc_info->exc_value; | |
31057 tmp_tb = exc_info->exc_traceback; | |
31058 exc_info->exc_type = local_type; | |
31059 exc_info->exc_value = local_value; | |
31060 exc_info->exc_traceback = local_tb; | |
31061 #endif | |
31062 } | |
31063 #else | |
31064 tmp_type = tstate->exc_type; | |
31065 tmp_value = tstate->exc_value; | |
31066 tmp_tb = tstate->exc_traceback; | |
31067 tstate->exc_type = local_type; | |
31068 tstate->exc_value = local_value; | |
31069 tstate->exc_traceback = local_tb; | |
31070 #endif | |
31071 Py_XDECREF(tmp_type); | |
31072 Py_XDECREF(tmp_value); | |
31073 Py_XDECREF(tmp_tb); | |
31074 #else | |
31075 PyErr_SetExcInfo(local_type, local_value, local_tb); | |
31076 #endif | |
31077 return 0; | |
31078 bad: | |
31079 *type = 0; | |
31080 *value = 0; | |
31081 *tb = 0; | |
31082 Py_XDECREF(local_type); | |
31083 Py_XDECREF(local_value); | |
31084 Py_XDECREF(local_tb); | |
31085 return -1; | |
31086 } | |
31087 | |
31088 /* pybytes_as_double */ | |
31089 static double __Pyx_SlowPyString_AsDouble(PyObject *obj) { | |
31090 PyObject *float_value; | |
31091 #if PY_MAJOR_VERSION >= 3 | |
31092 float_value = PyFloat_FromString(obj); | |
31093 #else | |
31094 float_value = PyFloat_FromString(obj, 0); | |
31095 #endif | |
31096 if (likely(float_value)) { | |
31097 #if CYTHON_ASSUME_SAFE_MACROS | |
31098 double value = PyFloat_AS_DOUBLE(float_value); | |
31099 #else | |
31100 double value = PyFloat_AsDouble(float_value); | |
31101 #endif | |
31102 Py_DECREF(float_value); | |
31103 return value; | |
31104 } | |
31105 return (double)-1; | |
31106 } | |
31107 static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) { | |
31108 int last_was_punctuation = 1; | |
31109 Py_ssize_t i; | |
31110 for (i=0; i < length; i++) { | |
31111 char chr = start[i]; | |
31112 int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E'); | |
31113 *buffer = chr; | |
31114 buffer += (chr != '_'); | |
31115 if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure; | |
31116 last_was_punctuation = is_punctuation; | |
31117 } | |
31118 if (unlikely(last_was_punctuation)) goto parse_failure; | |
31119 *buffer = '\0'; | |
31120 return buffer; | |
31121 parse_failure: | |
31122 return NULL; | |
31123 } | |
31124 static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) { | |
31125 int matches = 1; | |
31126 char sign = start[0]; | |
31127 int is_signed = (sign == '+') | (sign == '-'); | |
31128 start += is_signed; | |
31129 length -= is_signed; | |
31130 switch (start[0]) { | |
31131 #ifdef Py_NAN | |
31132 case 'n': | |
31133 case 'N': | |
31134 if (unlikely(length != 3)) goto parse_failure; | |
31135 matches &= (start[1] == 'a' || start[1] == 'A'); | |
31136 matches &= (start[2] == 'n' || start[2] == 'N'); | |
31137 if (unlikely(!matches)) goto parse_failure; | |
31138 return (sign == '-') ? -Py_NAN : Py_NAN; | |
31139 #endif | |
31140 case 'i': | |
31141 case 'I': | |
31142 if (unlikely(length < 3)) goto parse_failure; | |
31143 matches &= (start[1] == 'n' || start[1] == 'N'); | |
31144 matches &= (start[2] == 'f' || start[2] == 'F'); | |
31145 if (likely(length == 3 && matches)) | |
31146 return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; | |
31147 if (unlikely(length != 8)) goto parse_failure; | |
31148 matches &= (start[3] == 'i' || start[3] == 'I'); | |
31149 matches &= (start[4] == 'n' || start[4] == 'N'); | |
31150 matches &= (start[5] == 'i' || start[5] == 'I'); | |
31151 matches &= (start[6] == 't' || start[6] == 'T'); | |
31152 matches &= (start[7] == 'y' || start[7] == 'Y'); | |
31153 if (unlikely(!matches)) goto parse_failure; | |
31154 return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; | |
31155 case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': | |
31156 break; | |
31157 default: | |
31158 goto parse_failure; | |
31159 } | |
31160 return 0.0; | |
31161 parse_failure: | |
31162 return -1.0; | |
31163 } | |
31164 static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) { | |
31165 return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd)); | |
31166 } | |
31167 CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) { | |
31168 double value; | |
31169 Py_ssize_t i, digits; | |
31170 const char *last = start + length; | |
31171 char *end; | |
31172 while (__Pyx__PyBytes_AsDouble_IsSpace(*start)) | |
31173 start++; | |
31174 while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1])) | |
31175 last--; | |
31176 length = last - start; | |
31177 if (unlikely(length <= 0)) goto fallback; | |
31178 value = __Pyx__PyBytes_AsDouble_inf_nan(start, length); | |
31179 if (unlikely(value == -1.0)) goto fallback; | |
31180 if (value != 0.0) return value; | |
31181 digits = 0; | |
31182 for (i=0; i < length; digits += start[i++] != '_'); | |
31183 if (likely(digits == length)) { | |
31184 value = PyOS_string_to_double(start, &end, NULL); | |
31185 } else if (digits < 40) { | |
31186 char number[40]; | |
31187 last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); | |
31188 if (unlikely(!last)) goto fallback; | |
31189 value = PyOS_string_to_double(number, &end, NULL); | |
31190 } else { | |
31191 char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char)); | |
31192 if (unlikely(!number)) goto fallback; | |
31193 last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); | |
31194 if (unlikely(!last)) { | |
31195 PyMem_Free(number); | |
31196 goto fallback; | |
31197 } | |
31198 value = PyOS_string_to_double(number, &end, NULL); | |
31199 PyMem_Free(number); | |
31200 } | |
31201 if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { | |
31202 return value; | |
31203 } | |
31204 fallback: | |
31205 return __Pyx_SlowPyString_AsDouble(obj); | |
31206 } | |
31207 | |
31208 /* pynumber_float */ | |
31209 static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) { | |
31210 double val; | |
31211 if (PyLong_CheckExact(obj)) { | |
31212 #if CYTHON_USE_PYLONG_INTERNALS | |
31213 if (likely(__Pyx_PyLong_IsCompact(obj))) { | |
31214 val = (double) __Pyx_PyLong_CompactValue(obj); | |
31215 goto no_error; | |
31216 } | |
31217 #endif | |
31218 val = PyLong_AsDouble(obj); | |
31219 } else if (PyUnicode_CheckExact(obj)) { | |
31220 val = __Pyx_PyUnicode_AsDouble(obj); | |
31221 } else if (PyBytes_CheckExact(obj)) { | |
31222 val = __Pyx_PyBytes_AsDouble(obj); | |
31223 } else if (PyByteArray_CheckExact(obj)) { | |
31224 val = __Pyx_PyByteArray_AsDouble(obj); | |
31225 } else { | |
31226 return PyNumber_Float(obj); | |
31227 } | |
31228 if (unlikely(val == -1 && PyErr_Occurred())) { | |
31229 return NULL; | |
31230 } | |
31231 #if CYTHON_USE_PYLONG_INTERNALS | |
31232 no_error: | |
31233 #endif | |
31234 return PyFloat_FromDouble(val); | |
31235 } | |
31236 | |
31237 /* PyIntBinop */ | |
31238 #if !CYTHON_COMPILING_IN_PYPY | |
31239 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { | |
31240 CYTHON_MAYBE_UNUSED_VAR(intval); | |
31241 CYTHON_MAYBE_UNUSED_VAR(inplace); | |
31242 CYTHON_UNUSED_VAR(zerodivision_check); | |
31243 #if PY_MAJOR_VERSION < 3 | |
31244 if (likely(PyInt_CheckExact(op1))) { | |
31245 const long b = intval; | |
31246 long x; | |
31247 long a = PyInt_AS_LONG(op1); | |
31248 | |
31249 x = (long)((unsigned long)a + (unsigned long)b); | |
31250 if (likely((x^a) >= 0 || (x^b) >= 0)) | |
31251 return PyInt_FromLong(x); | |
31252 return PyLong_Type.tp_as_number->nb_add(op1, op2); | |
31253 } | |
31254 #endif | |
31255 #if CYTHON_USE_PYLONG_INTERNALS | |
31256 if (likely(PyLong_CheckExact(op1))) { | |
31257 const long b = intval; | |
31258 long a, x; | |
31259 #ifdef HAVE_LONG_LONG | |
31260 const PY_LONG_LONG llb = intval; | |
31261 PY_LONG_LONG lla, llx; | |
31262 #endif | |
31263 if (unlikely(__Pyx_PyLong_IsZero(op1))) { | |
31264 return __Pyx_NewRef(op2); | |
31265 } | |
31266 if (likely(__Pyx_PyLong_IsCompact(op1))) { | |
31267 a = __Pyx_PyLong_CompactValue(op1); | |
31268 } else { | |
31269 const digit* digits = __Pyx_PyLong_Digits(op1); | |
31270 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); | |
31271 switch (size) { | |
31272 case -2: | |
31273 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { | |
31274 a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); | |
31275 break; | |
31276 #ifdef HAVE_LONG_LONG | |
31277 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { | |
31278 lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); | |
31279 goto long_long; | |
31280 #endif | |
31281 } | |
31282 CYTHON_FALLTHROUGH; | |
31283 case 2: | |
31284 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { | |
31285 a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); | |
31286 break; | |
31287 #ifdef HAVE_LONG_LONG | |
31288 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { | |
31289 lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); | |
31290 goto long_long; | |
31291 #endif | |
31292 } | |
31293 CYTHON_FALLTHROUGH; | |
31294 case -3: | |
31295 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { | |
31296 a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); | |
31297 break; | |
31298 #ifdef HAVE_LONG_LONG | |
31299 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { | |
31300 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])); | |
31301 goto long_long; | |
31302 #endif | |
31303 } | |
31304 CYTHON_FALLTHROUGH; | |
31305 case 3: | |
31306 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { | |
31307 a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); | |
31308 break; | |
31309 #ifdef HAVE_LONG_LONG | |
31310 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { | |
31311 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])); | |
31312 goto long_long; | |
31313 #endif | |
31314 } | |
31315 CYTHON_FALLTHROUGH; | |
31316 case -4: | |
31317 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { | |
31318 a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); | |
31319 break; | |
31320 #ifdef HAVE_LONG_LONG | |
31321 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { | |
31322 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])); | |
31323 goto long_long; | |
31324 #endif | |
31325 } | |
31326 CYTHON_FALLTHROUGH; | |
31327 case 4: | |
31328 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { | |
31329 a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); | |
31330 break; | |
31331 #ifdef HAVE_LONG_LONG | |
31332 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { | |
31333 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])); | |
31334 goto long_long; | |
31335 #endif | |
31336 } | |
31337 CYTHON_FALLTHROUGH; | |
31338 default: return PyLong_Type.tp_as_number->nb_add(op1, op2); | |
31339 } | |
31340 } | |
31341 x = a + b; | |
31342 return PyLong_FromLong(x); | |
31343 #ifdef HAVE_LONG_LONG | |
31344 long_long: | |
31345 llx = lla + llb; | |
31346 return PyLong_FromLongLong(llx); | |
31347 #endif | |
31348 | |
31349 | |
31350 } | |
31351 #endif | |
31352 if (PyFloat_CheckExact(op1)) { | |
31353 const long b = intval; | |
31354 #if CYTHON_COMPILING_IN_LIMITED_API | |
31355 double a = __pyx_PyFloat_AsDouble(op1); | |
31356 #else | |
31357 double a = PyFloat_AS_DOUBLE(op1); | |
31358 #endif | |
31359 double result; | |
31360 | |
31361 PyFPE_START_PROTECT("add", return NULL) | |
31362 result = ((double)a) + (double)b; | |
31363 PyFPE_END_PROTECT(result) | |
31364 return PyFloat_FromDouble(result); | |
31365 } | |
31366 return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); | |
31367 } | |
31368 #endif | |
31369 | |
31370 /* PyObjectSetAttrStr */ | |
31371 #if CYTHON_USE_TYPE_SLOTS | |
31372 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { | |
31373 PyTypeObject* tp = Py_TYPE(obj); | |
31374 if (likely(tp->tp_setattro)) | |
31375 return tp->tp_setattro(obj, attr_name, value); | |
31376 #if PY_MAJOR_VERSION < 3 | |
31377 if (likely(tp->tp_setattr)) | |
31378 return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); | |
31379 #endif | |
31380 return PyObject_SetAttr(obj, attr_name, value); | |
31381 } | |
31382 #endif | |
31383 | |
31384 /* PyObjectCallNoArg */ | |
31385 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { | |
31386 PyObject *arg[2] = {NULL, NULL}; | |
31387 return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); | |
31388 } | |
31389 | |
31390 /* PyObjectCallMethod0 */ | |
31391 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { | |
31392 PyObject *method = NULL, *result = NULL; | |
31393 int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); | |
31394 if (likely(is_method)) { | |
31395 result = __Pyx_PyObject_CallOneArg(method, obj); | |
31396 Py_DECREF(method); | |
31397 return result; | |
31398 } | |
31399 if (unlikely(!method)) goto bad; | |
31400 result = __Pyx_PyObject_CallNoArg(method); | |
31401 Py_DECREF(method); | |
31402 bad: | |
31403 return result; | |
31404 } | |
31405 | |
31406 /* RaiseNoneIterError */ | |
31407 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { | |
31408 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); | |
31409 } | |
31410 | |
31411 /* UnpackTupleError */ | |
31412 static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { | |
31413 if (t == Py_None) { | |
31414 __Pyx_RaiseNoneNotIterableError(); | |
31415 } else if (PyTuple_GET_SIZE(t) < index) { | |
31416 __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); | |
31417 } else { | |
31418 __Pyx_RaiseTooManyValuesError(index); | |
31419 } | |
31420 } | |
31421 | |
31422 /* UnpackTuple2 */ | |
31423 static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( | |
31424 PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { | |
31425 PyObject *value1 = NULL, *value2 = NULL; | |
31426 #if CYTHON_COMPILING_IN_PYPY | |
31427 value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; | |
31428 value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; | |
31429 #else | |
31430 value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); | |
31431 value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); | |
31432 #endif | |
31433 if (decref_tuple) { | |
31434 Py_DECREF(tuple); | |
31435 } | |
31436 *pvalue1 = value1; | |
31437 *pvalue2 = value2; | |
31438 return 0; | |
31439 #if CYTHON_COMPILING_IN_PYPY | |
31440 bad: | |
31441 Py_XDECREF(value1); | |
31442 Py_XDECREF(value2); | |
31443 if (decref_tuple) { Py_XDECREF(tuple); } | |
31444 return -1; | |
31445 #endif | |
31446 } | |
31447 static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, | |
31448 int has_known_size, int decref_tuple) { | |
31449 Py_ssize_t index; | |
31450 PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; | |
31451 iternextfunc iternext; | |
31452 iter = PyObject_GetIter(tuple); | |
31453 if (unlikely(!iter)) goto bad; | |
31454 if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } | |
31455 iternext = __Pyx_PyObject_GetIterNextFunc(iter); | |
31456 value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } | |
31457 value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } | |
31458 if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; | |
31459 Py_DECREF(iter); | |
31460 *pvalue1 = value1; | |
31461 *pvalue2 = value2; | |
31462 return 0; | |
31463 unpacking_failed: | |
31464 if (!has_known_size && __Pyx_IterFinish() == 0) | |
31465 __Pyx_RaiseNeedMoreValuesError(index); | |
31466 bad: | |
31467 Py_XDECREF(iter); | |
31468 Py_XDECREF(value1); | |
31469 Py_XDECREF(value2); | |
31470 if (decref_tuple) { Py_XDECREF(tuple); } | |
31471 return -1; | |
31472 } | |
31473 | |
31474 /* dict_iter */ | |
31475 #if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 | |
31476 #include <string.h> | |
31477 #endif | |
31478 static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, | |
31479 Py_ssize_t* p_orig_length, int* p_source_is_dict) { | |
31480 is_dict = is_dict || likely(PyDict_CheckExact(iterable)); | |
31481 *p_source_is_dict = is_dict; | |
31482 if (is_dict) { | |
31483 #if !CYTHON_COMPILING_IN_PYPY | |
31484 *p_orig_length = PyDict_Size(iterable); | |
31485 Py_INCREF(iterable); | |
31486 return iterable; | |
31487 #elif PY_MAJOR_VERSION >= 3 | |
31488 static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; | |
31489 PyObject **pp = NULL; | |
31490 if (method_name) { | |
31491 const char *name = PyUnicode_AsUTF8(method_name); | |
31492 if (strcmp(name, "iteritems") == 0) pp = &py_items; | |
31493 else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; | |
31494 else if (strcmp(name, "itervalues") == 0) pp = &py_values; | |
31495 if (pp) { | |
31496 if (!*pp) { | |
31497 *pp = PyUnicode_FromString(name + 4); | |
31498 if (!*pp) | |
31499 return NULL; | |
31500 } | |
31501 method_name = *pp; | |
31502 } | |
31503 } | |
31504 #endif | |
31505 } | |
31506 *p_orig_length = 0; | |
31507 if (method_name) { | |
31508 PyObject* iter; | |
31509 iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); | |
31510 if (!iterable) | |
31511 return NULL; | |
31512 #if !CYTHON_COMPILING_IN_PYPY | |
31513 if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) | |
31514 return iterable; | |
31515 #endif | |
31516 iter = PyObject_GetIter(iterable); | |
31517 Py_DECREF(iterable); | |
31518 return iter; | |
31519 } | |
31520 return PyObject_GetIter(iterable); | |
31521 } | |
31522 static CYTHON_INLINE int __Pyx_dict_iter_next( | |
31523 PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, | |
31524 PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { | |
31525 PyObject* next_item; | |
31526 #if !CYTHON_COMPILING_IN_PYPY | |
31527 if (source_is_dict) { | |
31528 PyObject *key, *value; | |
31529 if (unlikely(orig_length != PyDict_Size(iter_obj))) { | |
31530 PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); | |
31531 return -1; | |
31532 } | |
31533 if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { | |
31534 return 0; | |
31535 } | |
31536 if (pitem) { | |
31537 PyObject* tuple = PyTuple_New(2); | |
31538 if (unlikely(!tuple)) { | |
31539 return -1; | |
31540 } | |
31541 Py_INCREF(key); | |
31542 Py_INCREF(value); | |
31543 PyTuple_SET_ITEM(tuple, 0, key); | |
31544 PyTuple_SET_ITEM(tuple, 1, value); | |
31545 *pitem = tuple; | |
31546 } else { | |
31547 if (pkey) { | |
31548 Py_INCREF(key); | |
31549 *pkey = key; | |
31550 } | |
31551 if (pvalue) { | |
31552 Py_INCREF(value); | |
31553 *pvalue = value; | |
31554 } | |
31555 } | |
31556 return 1; | |
31557 } else if (PyTuple_CheckExact(iter_obj)) { | |
31558 Py_ssize_t pos = *ppos; | |
31559 if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; | |
31560 *ppos = pos + 1; | |
31561 next_item = PyTuple_GET_ITEM(iter_obj, pos); | |
31562 Py_INCREF(next_item); | |
31563 } else if (PyList_CheckExact(iter_obj)) { | |
31564 Py_ssize_t pos = *ppos; | |
31565 if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; | |
31566 *ppos = pos + 1; | |
31567 next_item = PyList_GET_ITEM(iter_obj, pos); | |
31568 Py_INCREF(next_item); | |
31569 } else | |
31570 #endif | |
31571 { | |
31572 next_item = PyIter_Next(iter_obj); | |
31573 if (unlikely(!next_item)) { | |
31574 return __Pyx_IterFinish(); | |
31575 } | |
31576 } | |
31577 if (pitem) { | |
31578 *pitem = next_item; | |
31579 } else if (pkey && pvalue) { | |
31580 if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) | |
31581 return -1; | |
31582 } else if (pkey) { | |
31583 *pkey = next_item; | |
31584 } else { | |
31585 *pvalue = next_item; | |
31586 } | |
31587 return 1; | |
31588 } | |
31589 | |
31590 /* SliceObject */ | |
31591 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, | |
31592 Py_ssize_t cstart, Py_ssize_t cstop, | |
31593 PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, | |
31594 int has_cstart, int has_cstop, int wraparound) { | |
31595 __Pyx_TypeName obj_type_name; | |
31596 #if CYTHON_USE_TYPE_SLOTS | |
31597 PyMappingMethods* mp; | |
31598 #if PY_MAJOR_VERSION < 3 | |
31599 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; | |
31600 if (likely(ms && ms->sq_slice)) { | |
31601 if (!has_cstart) { | |
31602 if (_py_start && (*_py_start != Py_None)) { | |
31603 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); | |
31604 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; | |
31605 } else | |
31606 cstart = 0; | |
31607 } | |
31608 if (!has_cstop) { | |
31609 if (_py_stop && (*_py_stop != Py_None)) { | |
31610 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); | |
31611 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; | |
31612 } else | |
31613 cstop = PY_SSIZE_T_MAX; | |
31614 } | |
31615 if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { | |
31616 Py_ssize_t l = ms->sq_length(obj); | |
31617 if (likely(l >= 0)) { | |
31618 if (cstop < 0) { | |
31619 cstop += l; | |
31620 if (cstop < 0) cstop = 0; | |
31621 } | |
31622 if (cstart < 0) { | |
31623 cstart += l; | |
31624 if (cstart < 0) cstart = 0; | |
31625 } | |
31626 } else { | |
31627 if (!PyErr_ExceptionMatches(PyExc_OverflowError)) | |
31628 goto bad; | |
31629 PyErr_Clear(); | |
31630 } | |
31631 } | |
31632 return ms->sq_slice(obj, cstart, cstop); | |
31633 } | |
31634 #else | |
31635 CYTHON_UNUSED_VAR(wraparound); | |
31636 #endif | |
31637 mp = Py_TYPE(obj)->tp_as_mapping; | |
31638 if (likely(mp && mp->mp_subscript)) | |
31639 #else | |
31640 CYTHON_UNUSED_VAR(wraparound); | |
31641 #endif | |
31642 { | |
31643 PyObject* result; | |
31644 PyObject *py_slice, *py_start, *py_stop; | |
31645 if (_py_slice) { | |
31646 py_slice = *_py_slice; | |
31647 } else { | |
31648 PyObject* owned_start = NULL; | |
31649 PyObject* owned_stop = NULL; | |
31650 if (_py_start) { | |
31651 py_start = *_py_start; | |
31652 } else { | |
31653 if (has_cstart) { | |
31654 owned_start = py_start = PyInt_FromSsize_t(cstart); | |
31655 if (unlikely(!py_start)) goto bad; | |
31656 } else | |
31657 py_start = Py_None; | |
31658 } | |
31659 if (_py_stop) { | |
31660 py_stop = *_py_stop; | |
31661 } else { | |
31662 if (has_cstop) { | |
31663 owned_stop = py_stop = PyInt_FromSsize_t(cstop); | |
31664 if (unlikely(!py_stop)) { | |
31665 Py_XDECREF(owned_start); | |
31666 goto bad; | |
31667 } | |
31668 } else | |
31669 py_stop = Py_None; | |
31670 } | |
31671 py_slice = PySlice_New(py_start, py_stop, Py_None); | |
31672 Py_XDECREF(owned_start); | |
31673 Py_XDECREF(owned_stop); | |
31674 if (unlikely(!py_slice)) goto bad; | |
31675 } | |
31676 #if CYTHON_USE_TYPE_SLOTS | |
31677 result = mp->mp_subscript(obj, py_slice); | |
31678 #else | |
31679 result = PyObject_GetItem(obj, py_slice); | |
31680 #endif | |
31681 if (!_py_slice) { | |
31682 Py_DECREF(py_slice); | |
31683 } | |
31684 return result; | |
31685 } | |
31686 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); | |
31687 PyErr_Format(PyExc_TypeError, | |
31688 "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); | |
31689 __Pyx_DECREF_TypeName(obj_type_name); | |
31690 bad: | |
31691 return NULL; | |
31692 } | |
31693 | |
31694 /* SliceTupleAndList */ | |
31695 #if CYTHON_COMPILING_IN_CPYTHON | |
31696 static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { | |
31697 Py_ssize_t start = *_start, stop = *_stop, length = *_length; | |
31698 if (start < 0) { | |
31699 start += length; | |
31700 if (start < 0) | |
31701 start = 0; | |
31702 } | |
31703 if (stop < 0) | |
31704 stop += length; | |
31705 else if (stop > length) | |
31706 stop = length; | |
31707 *_length = stop - start; | |
31708 *_start = start; | |
31709 *_stop = stop; | |
31710 } | |
31711 static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice( | |
31712 PyObject* src, Py_ssize_t start, Py_ssize_t stop) { | |
31713 Py_ssize_t length = PyList_GET_SIZE(src); | |
31714 __Pyx_crop_slice(&start, &stop, &length); | |
31715 if (length <= 0) { | |
31716 return PyList_New(0); | |
31717 } | |
31718 return __Pyx_PyList_FromArray(((PyListObject*)src)->ob_item + start, length); | |
31719 } | |
31720 static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( | |
31721 PyObject* src, Py_ssize_t start, Py_ssize_t stop) { | |
31722 Py_ssize_t length = PyTuple_GET_SIZE(src); | |
31723 __Pyx_crop_slice(&start, &stop, &length); | |
31724 return __Pyx_PyTuple_FromArray(((PyTupleObject*)src)->ob_item + start, length); | |
31725 } | |
31726 #endif | |
31727 | |
31728 /* pep479 */ | |
31729 static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { | |
31730 PyObject *exc, *val, *tb, *cur_exc; | |
31731 __Pyx_PyThreadState_declare | |
31732 #ifdef __Pyx_StopAsyncIteration_USED | |
31733 int is_async_stopiteration = 0; | |
31734 #endif | |
31735 CYTHON_MAYBE_UNUSED_VAR(in_async_gen); | |
31736 cur_exc = PyErr_Occurred(); | |
31737 if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { | |
31738 #ifdef __Pyx_StopAsyncIteration_USED | |
31739 if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, __Pyx_PyExc_StopAsyncIteration))) { | |
31740 is_async_stopiteration = 1; | |
31741 } else | |
31742 #endif | |
31743 return; | |
31744 } | |
31745 __Pyx_PyThreadState_assign | |
31746 __Pyx_GetException(&exc, &val, &tb); | |
31747 Py_XDECREF(exc); | |
31748 Py_XDECREF(val); | |
31749 Py_XDECREF(tb); | |
31750 PyErr_SetString(PyExc_RuntimeError, | |
31751 #ifdef __Pyx_StopAsyncIteration_USED | |
31752 is_async_stopiteration ? "async generator raised StopAsyncIteration" : | |
31753 in_async_gen ? "async generator raised StopIteration" : | |
31754 #endif | |
31755 "generator raised StopIteration"); | |
31756 } | |
31757 | |
31758 /* RaiseUnboundLocalError */ | |
31759 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { | |
31760 PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); | |
31761 } | |
31762 | |
31763 /* Import */ | |
31764 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { | |
31765 PyObject *module = 0; | |
31766 PyObject *empty_dict = 0; | |
31767 PyObject *empty_list = 0; | |
31768 #if PY_MAJOR_VERSION < 3 | |
31769 PyObject *py_import; | |
31770 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); | |
31771 if (unlikely(!py_import)) | |
31772 goto bad; | |
31773 if (!from_list) { | |
31774 empty_list = PyList_New(0); | |
31775 if (unlikely(!empty_list)) | |
31776 goto bad; | |
31777 from_list = empty_list; | |
31778 } | |
31779 #endif | |
31780 empty_dict = PyDict_New(); | |
31781 if (unlikely(!empty_dict)) | |
31782 goto bad; | |
31783 { | |
31784 #if PY_MAJOR_VERSION >= 3 | |
31785 if (level == -1) { | |
31786 if (strchr(__Pyx_MODULE_NAME, '.') != NULL) { | |
31787 module = PyImport_ImportModuleLevelObject( | |
31788 name, __pyx_d, empty_dict, from_list, 1); | |
31789 if (unlikely(!module)) { | |
31790 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) | |
31791 goto bad; | |
31792 PyErr_Clear(); | |
31793 } | |
31794 } | |
31795 level = 0; | |
31796 } | |
31797 #endif | |
31798 if (!module) { | |
31799 #if PY_MAJOR_VERSION < 3 | |
31800 PyObject *py_level = PyInt_FromLong(level); | |
31801 if (unlikely(!py_level)) | |
31802 goto bad; | |
31803 module = PyObject_CallFunctionObjArgs(py_import, | |
31804 name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL); | |
31805 Py_DECREF(py_level); | |
31806 #else | |
31807 module = PyImport_ImportModuleLevelObject( | |
31808 name, __pyx_d, empty_dict, from_list, level); | |
31809 #endif | |
31810 } | |
31811 } | |
31812 bad: | |
31813 Py_XDECREF(empty_dict); | |
31814 Py_XDECREF(empty_list); | |
31815 #if PY_MAJOR_VERSION < 3 | |
31816 Py_XDECREF(py_import); | |
31817 #endif | |
31818 return module; | |
31819 } | |
31820 | |
31821 /* ImportFrom */ | |
31822 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { | |
31823 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); | |
31824 if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { | |
31825 const char* module_name_str = 0; | |
31826 PyObject* module_name = 0; | |
31827 PyObject* module_dot = 0; | |
31828 PyObject* full_name = 0; | |
31829 PyErr_Clear(); | |
31830 module_name_str = PyModule_GetName(module); | |
31831 if (unlikely(!module_name_str)) { goto modbad; } | |
31832 module_name = PyUnicode_FromString(module_name_str); | |
31833 if (unlikely(!module_name)) { goto modbad; } | |
31834 module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__12); | |
31835 if (unlikely(!module_dot)) { goto modbad; } | |
31836 full_name = PyUnicode_Concat(module_dot, name); | |
31837 if (unlikely(!full_name)) { goto modbad; } | |
31838 #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) | |
31839 { | |
31840 PyObject *modules = PyImport_GetModuleDict(); | |
31841 if (unlikely(!modules)) | |
31842 goto modbad; | |
31843 value = PyObject_GetItem(modules, full_name); | |
31844 } | |
31845 #else | |
31846 value = PyImport_GetModule(full_name); | |
31847 #endif | |
31848 modbad: | |
31849 Py_XDECREF(full_name); | |
31850 Py_XDECREF(module_dot); | |
31851 Py_XDECREF(module_name); | |
31852 } | |
31853 if (unlikely(!value)) { | |
31854 PyErr_Format(PyExc_ImportError, | |
31855 #if PY_MAJOR_VERSION < 3 | |
31856 "cannot import name %.230s", PyString_AS_STRING(name)); | |
31857 #else | |
31858 "cannot import name %S", name); | |
31859 #endif | |
31860 } | |
31861 return value; | |
31862 } | |
31863 | |
31864 /* GetAttr */ | |
31865 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { | |
31866 #if CYTHON_USE_TYPE_SLOTS | |
31867 #if PY_MAJOR_VERSION >= 3 | |
31868 if (likely(PyUnicode_Check(n))) | |
31869 #else | |
31870 if (likely(PyString_Check(n))) | |
31871 #endif | |
31872 return __Pyx_PyObject_GetAttrStr(o, n); | |
31873 #endif | |
31874 return PyObject_GetAttr(o, n); | |
31875 } | |
31876 | |
31877 /* HasAttr */ | |
31878 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { | |
31879 PyObject *r; | |
31880 if (unlikely(!__Pyx_PyBaseString_Check(n))) { | |
31881 PyErr_SetString(PyExc_TypeError, | |
31882 "hasattr(): attribute name must be string"); | |
31883 return -1; | |
31884 } | |
31885 r = __Pyx_GetAttr(o, n); | |
31886 if (!r) { | |
31887 PyErr_Clear(); | |
31888 return 0; | |
31889 } else { | |
31890 Py_DECREF(r); | |
31891 return 1; | |
31892 } | |
31893 } | |
31894 | |
31895 /* PyObject_GenericGetAttrNoDict */ | |
31896 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 | |
31897 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { | |
31898 __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp); | |
31899 PyErr_Format(PyExc_AttributeError, | |
31900 #if PY_MAJOR_VERSION >= 3 | |
31901 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", | |
31902 type_name, attr_name); | |
31903 #else | |
31904 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", | |
31905 type_name, PyString_AS_STRING(attr_name)); | |
31906 #endif | |
31907 __Pyx_DECREF_TypeName(type_name); | |
31908 return NULL; | |
31909 } | |
31910 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { | |
31911 PyObject *descr; | |
31912 PyTypeObject *tp = Py_TYPE(obj); | |
31913 if (unlikely(!PyString_Check(attr_name))) { | |
31914 return PyObject_GenericGetAttr(obj, attr_name); | |
31915 } | |
31916 assert(!tp->tp_dictoffset); | |
31917 descr = _PyType_Lookup(tp, attr_name); | |
31918 if (unlikely(!descr)) { | |
31919 return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); | |
31920 } | |
31921 Py_INCREF(descr); | |
31922 #if PY_MAJOR_VERSION < 3 | |
31923 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) | |
31924 #endif | |
31925 { | |
31926 descrgetfunc f = Py_TYPE(descr)->tp_descr_get; | |
31927 if (unlikely(f)) { | |
31928 PyObject *res = f(descr, obj, (PyObject *)tp); | |
31929 Py_DECREF(descr); | |
31930 return res; | |
31931 } | |
31932 } | |
31933 return descr; | |
31934 } | |
31935 #endif | |
31936 | |
31937 /* PyObject_GenericGetAttr */ | |
31938 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 | |
31939 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { | |
31940 if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { | |
31941 return PyObject_GenericGetAttr(obj, attr_name); | |
31942 } | |
31943 return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); | |
31944 } | |
31945 #endif | |
31946 | |
31947 /* ValidateBasesTuple */ | |
31948 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS | |
31949 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { | |
31950 Py_ssize_t i, n; | |
31951 #if CYTHON_ASSUME_SAFE_MACROS | |
31952 n = PyTuple_GET_SIZE(bases); | |
31953 #else | |
31954 n = PyTuple_Size(bases); | |
31955 if (n < 0) return -1; | |
31956 #endif | |
31957 for (i = 1; i < n; i++) | |
31958 { | |
31959 #if CYTHON_AVOID_BORROWED_REFS | |
31960 PyObject *b0 = PySequence_GetItem(bases, i); | |
31961 if (!b0) return -1; | |
31962 #elif CYTHON_ASSUME_SAFE_MACROS | |
31963 PyObject *b0 = PyTuple_GET_ITEM(bases, i); | |
31964 #else | |
31965 PyObject *b0 = PyTuple_GetItem(bases, i); | |
31966 if (!b0) return -1; | |
31967 #endif | |
31968 PyTypeObject *b; | |
31969 #if PY_MAJOR_VERSION < 3 | |
31970 if (PyClass_Check(b0)) | |
31971 { | |
31972 PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", | |
31973 PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); | |
31974 #if CYTHON_AVOID_BORROWED_REFS | |
31975 Py_DECREF(b0); | |
31976 #endif | |
31977 return -1; | |
31978 } | |
31979 #endif | |
31980 b = (PyTypeObject*) b0; | |
31981 if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) | |
31982 { | |
31983 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); | |
31984 PyErr_Format(PyExc_TypeError, | |
31985 "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); | |
31986 __Pyx_DECREF_TypeName(b_name); | |
31987 #if CYTHON_AVOID_BORROWED_REFS | |
31988 Py_DECREF(b0); | |
31989 #endif | |
31990 return -1; | |
31991 } | |
31992 if (dictoffset == 0) | |
31993 { | |
31994 Py_ssize_t b_dictoffset = 0; | |
31995 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY | |
31996 b_dictoffset = b->tp_dictoffset; | |
31997 #else | |
31998 PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); | |
31999 if (!py_b_dictoffset) goto dictoffset_return; | |
32000 b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); | |
32001 Py_DECREF(py_b_dictoffset); | |
32002 if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; | |
32003 #endif | |
32004 if (b_dictoffset) { | |
32005 { | |
32006 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); | |
32007 PyErr_Format(PyExc_TypeError, | |
32008 "extension type '%.200s' has no __dict__ slot, " | |
32009 "but base type '" __Pyx_FMT_TYPENAME "' has: " | |
32010 "either add 'cdef dict __dict__' to the extension type " | |
32011 "or add '__slots__ = [...]' to the base type", | |
32012 type_name, b_name); | |
32013 __Pyx_DECREF_TypeName(b_name); | |
32014 } | |
32015 #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) | |
32016 dictoffset_return: | |
32017 #endif | |
32018 #if CYTHON_AVOID_BORROWED_REFS | |
32019 Py_DECREF(b0); | |
32020 #endif | |
32021 return -1; | |
32022 } | |
32023 } | |
32024 #if CYTHON_AVOID_BORROWED_REFS | |
32025 Py_DECREF(b0); | |
32026 #endif | |
32027 } | |
32028 return 0; | |
32029 } | |
32030 #endif | |
32031 | |
32032 /* PyType_Ready */ | |
32033 static int __Pyx_PyType_Ready(PyTypeObject *t) { | |
32034 #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) | |
32035 (void)__Pyx_PyObject_CallMethod0; | |
32036 #if CYTHON_USE_TYPE_SPECS | |
32037 (void)__Pyx_validate_bases_tuple; | |
32038 #endif | |
32039 return PyType_Ready(t); | |
32040 #else | |
32041 int r; | |
32042 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); | |
32043 if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) | |
32044 return -1; | |
32045 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) | |
32046 { | |
32047 int gc_was_enabled; | |
32048 #if PY_VERSION_HEX >= 0x030A00b1 | |
32049 gc_was_enabled = PyGC_Disable(); | |
32050 (void)__Pyx_PyObject_CallMethod0; | |
32051 #else | |
32052 PyObject *ret, *py_status; | |
32053 PyObject *gc = NULL; | |
32054 #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) | |
32055 gc = PyImport_GetModule(__pyx_kp_u_gc); | |
32056 #endif | |
32057 if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc); | |
32058 if (unlikely(!gc)) return -1; | |
32059 py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled); | |
32060 if (unlikely(!py_status)) { | |
32061 Py_DECREF(gc); | |
32062 return -1; | |
32063 } | |
32064 gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); | |
32065 Py_DECREF(py_status); | |
32066 if (gc_was_enabled > 0) { | |
32067 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable); | |
32068 if (unlikely(!ret)) { | |
32069 Py_DECREF(gc); | |
32070 return -1; | |
32071 } | |
32072 Py_DECREF(ret); | |
32073 } else if (unlikely(gc_was_enabled == -1)) { | |
32074 Py_DECREF(gc); | |
32075 return -1; | |
32076 } | |
32077 #endif | |
32078 t->tp_flags |= Py_TPFLAGS_HEAPTYPE; | |
32079 #if PY_VERSION_HEX >= 0x030A0000 | |
32080 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; | |
32081 #endif | |
32082 #else | |
32083 (void)__Pyx_PyObject_CallMethod0; | |
32084 #endif | |
32085 r = PyType_Ready(t); | |
32086 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) | |
32087 t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; | |
32088 #if PY_VERSION_HEX >= 0x030A00b1 | |
32089 if (gc_was_enabled) | |
32090 PyGC_Enable(); | |
32091 #else | |
32092 if (gc_was_enabled) { | |
32093 PyObject *tp, *v, *tb; | |
32094 PyErr_Fetch(&tp, &v, &tb); | |
32095 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable); | |
32096 if (likely(ret || r == -1)) { | |
32097 Py_XDECREF(ret); | |
32098 PyErr_Restore(tp, v, tb); | |
32099 } else { | |
32100 Py_XDECREF(tp); | |
32101 Py_XDECREF(v); | |
32102 Py_XDECREF(tb); | |
32103 r = -1; | |
32104 } | |
32105 } | |
32106 Py_DECREF(gc); | |
32107 #endif | |
32108 } | |
32109 #endif | |
32110 return r; | |
32111 #endif | |
32112 } | |
32113 | |
32114 /* SetVTable */ | |
32115 static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { | |
32116 PyObject *ob = PyCapsule_New(vtable, 0, 0); | |
32117 if (unlikely(!ob)) | |
32118 goto bad; | |
32119 #if CYTHON_COMPILING_IN_LIMITED_API | |
32120 if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0)) | |
32121 #else | |
32122 if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0)) | |
32123 #endif | |
32124 goto bad; | |
32125 Py_DECREF(ob); | |
32126 return 0; | |
32127 bad: | |
32128 Py_XDECREF(ob); | |
32129 return -1; | |
32130 } | |
32131 | |
32132 /* GetVTable */ | |
32133 static void* __Pyx_GetVtable(PyTypeObject *type) { | |
32134 void* ptr; | |
32135 #if CYTHON_COMPILING_IN_LIMITED_API | |
32136 PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable); | |
32137 #else | |
32138 PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable); | |
32139 #endif | |
32140 if (!ob) | |
32141 goto bad; | |
32142 ptr = PyCapsule_GetPointer(ob, 0); | |
32143 if (!ptr && !PyErr_Occurred()) | |
32144 PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); | |
32145 Py_DECREF(ob); | |
32146 return ptr; | |
32147 bad: | |
32148 Py_XDECREF(ob); | |
32149 return NULL; | |
32150 } | |
32151 | |
32152 /* MergeVTables */ | |
32153 #if !CYTHON_COMPILING_IN_LIMITED_API | |
32154 static int __Pyx_MergeVtables(PyTypeObject *type) { | |
32155 int i; | |
32156 void** base_vtables; | |
32157 __Pyx_TypeName tp_base_name; | |
32158 __Pyx_TypeName base_name; | |
32159 void* unknown = (void*)-1; | |
32160 PyObject* bases = type->tp_bases; | |
32161 int base_depth = 0; | |
32162 { | |
32163 PyTypeObject* base = type->tp_base; | |
32164 while (base) { | |
32165 base_depth += 1; | |
32166 base = base->tp_base; | |
32167 } | |
32168 } | |
32169 base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1)); | |
32170 base_vtables[0] = unknown; | |
32171 for (i = 1; i < PyTuple_GET_SIZE(bases); i++) { | |
32172 void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i))); | |
32173 if (base_vtable != NULL) { | |
32174 int j; | |
32175 PyTypeObject* base = type->tp_base; | |
32176 for (j = 0; j < base_depth; j++) { | |
32177 if (base_vtables[j] == unknown) { | |
32178 base_vtables[j] = __Pyx_GetVtable(base); | |
32179 base_vtables[j + 1] = unknown; | |
32180 } | |
32181 if (base_vtables[j] == base_vtable) { | |
32182 break; | |
32183 } else if (base_vtables[j] == NULL) { | |
32184 goto bad; | |
32185 } | |
32186 base = base->tp_base; | |
32187 } | |
32188 } | |
32189 } | |
32190 PyErr_Clear(); | |
32191 free(base_vtables); | |
32192 return 0; | |
32193 bad: | |
32194 tp_base_name = __Pyx_PyType_GetName(type->tp_base); | |
32195 base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i)); | |
32196 PyErr_Format(PyExc_TypeError, | |
32197 "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); | |
32198 __Pyx_DECREF_TypeName(tp_base_name); | |
32199 __Pyx_DECREF_TypeName(base_name); | |
32200 free(base_vtables); | |
32201 return -1; | |
32202 } | |
32203 #endif | |
32204 | |
32205 /* SetupReduce */ | |
32206 #if !CYTHON_COMPILING_IN_LIMITED_API | |
32207 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { | |
32208 int ret; | |
32209 PyObject *name_attr; | |
32210 name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2); | |
32211 if (likely(name_attr)) { | |
32212 ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); | |
32213 } else { | |
32214 ret = -1; | |
32215 } | |
32216 if (unlikely(ret < 0)) { | |
32217 PyErr_Clear(); | |
32218 ret = 0; | |
32219 } | |
32220 Py_XDECREF(name_attr); | |
32221 return ret; | |
32222 } | |
32223 static int __Pyx_setup_reduce(PyObject* type_obj) { | |
32224 int ret = 0; | |
32225 PyObject *object_reduce = NULL; | |
32226 PyObject *object_getstate = NULL; | |
32227 PyObject *object_reduce_ex = NULL; | |
32228 PyObject *reduce = NULL; | |
32229 PyObject *reduce_ex = NULL; | |
32230 PyObject *reduce_cython = NULL; | |
32231 PyObject *setstate = NULL; | |
32232 PyObject *setstate_cython = NULL; | |
32233 PyObject *getstate = NULL; | |
32234 #if CYTHON_USE_PYTYPE_LOOKUP | |
32235 getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate); | |
32236 #else | |
32237 getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate); | |
32238 if (!getstate && PyErr_Occurred()) { | |
32239 goto __PYX_BAD; | |
32240 } | |
32241 #endif | |
32242 if (getstate) { | |
32243 #if CYTHON_USE_PYTYPE_LOOKUP | |
32244 object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate); | |
32245 #else | |
32246 object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate); | |
32247 if (!object_getstate && PyErr_Occurred()) { | |
32248 goto __PYX_BAD; | |
32249 } | |
32250 #endif | |
32251 if (object_getstate != getstate) { | |
32252 goto __PYX_GOOD; | |
32253 } | |
32254 } | |
32255 #if CYTHON_USE_PYTYPE_LOOKUP | |
32256 object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; | |
32257 #else | |
32258 object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; | |
32259 #endif | |
32260 reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; | |
32261 if (reduce_ex == object_reduce_ex) { | |
32262 #if CYTHON_USE_PYTYPE_LOOKUP | |
32263 object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; | |
32264 #else | |
32265 object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; | |
32266 #endif | |
32267 reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; | |
32268 if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { | |
32269 reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); | |
32270 if (likely(reduce_cython)) { | |
32271 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; | |
32272 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; | |
32273 } else if (reduce == object_reduce || PyErr_Occurred()) { | |
32274 goto __PYX_BAD; | |
32275 } | |
32276 setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate); | |
32277 if (!setstate) PyErr_Clear(); | |
32278 if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { | |
32279 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); | |
32280 if (likely(setstate_cython)) { | |
32281 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; | |
32282 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; | |
32283 } else if (!setstate || PyErr_Occurred()) { | |
32284 goto __PYX_BAD; | |
32285 } | |
32286 } | |
32287 PyType_Modified((PyTypeObject*)type_obj); | |
32288 } | |
32289 } | |
32290 goto __PYX_GOOD; | |
32291 __PYX_BAD: | |
32292 if (!PyErr_Occurred()) { | |
32293 __Pyx_TypeName type_obj_name = | |
32294 __Pyx_PyType_GetName((PyTypeObject*)type_obj); | |
32295 PyErr_Format(PyExc_RuntimeError, | |
32296 "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); | |
32297 __Pyx_DECREF_TypeName(type_obj_name); | |
32298 } | |
32299 ret = -1; | |
32300 __PYX_GOOD: | |
32301 #if !CYTHON_USE_PYTYPE_LOOKUP | |
32302 Py_XDECREF(object_reduce); | |
32303 Py_XDECREF(object_reduce_ex); | |
32304 Py_XDECREF(object_getstate); | |
32305 Py_XDECREF(getstate); | |
32306 #endif | |
32307 Py_XDECREF(reduce); | |
32308 Py_XDECREF(reduce_ex); | |
32309 Py_XDECREF(reduce_cython); | |
32310 Py_XDECREF(setstate); | |
32311 Py_XDECREF(setstate_cython); | |
32312 return ret; | |
32313 } | |
32314 #endif | |
32315 | |
32316 /* TypeImport */ | |
32317 #ifndef __PYX_HAVE_RT_ImportType_3_0_11 | |
32318 #define __PYX_HAVE_RT_ImportType_3_0_11 | |
32319 static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name, | |
32320 size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size) | |
32321 { | |
32322 PyObject *result = 0; | |
32323 char warning[200]; | |
32324 Py_ssize_t basicsize; | |
32325 Py_ssize_t itemsize; | |
32326 #if CYTHON_COMPILING_IN_LIMITED_API | |
32327 PyObject *py_basicsize; | |
32328 PyObject *py_itemsize; | |
32329 #endif | |
32330 result = PyObject_GetAttrString(module, class_name); | |
32331 if (!result) | |
32332 goto bad; | |
32333 if (!PyType_Check(result)) { | |
32334 PyErr_Format(PyExc_TypeError, | |
32335 "%.200s.%.200s is not a type object", | |
32336 module_name, class_name); | |
32337 goto bad; | |
32338 } | |
32339 #if !CYTHON_COMPILING_IN_LIMITED_API | |
32340 basicsize = ((PyTypeObject *)result)->tp_basicsize; | |
32341 itemsize = ((PyTypeObject *)result)->tp_itemsize; | |
32342 #else | |
32343 py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); | |
32344 if (!py_basicsize) | |
32345 goto bad; | |
32346 basicsize = PyLong_AsSsize_t(py_basicsize); | |
32347 Py_DECREF(py_basicsize); | |
32348 py_basicsize = 0; | |
32349 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) | |
32350 goto bad; | |
32351 py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); | |
32352 if (!py_itemsize) | |
32353 goto bad; | |
32354 itemsize = PyLong_AsSsize_t(py_itemsize); | |
32355 Py_DECREF(py_itemsize); | |
32356 py_itemsize = 0; | |
32357 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) | |
32358 goto bad; | |
32359 #endif | |
32360 if (itemsize) { | |
32361 if (size % alignment) { | |
32362 alignment = size % alignment; | |
32363 } | |
32364 if (itemsize < (Py_ssize_t)alignment) | |
32365 itemsize = (Py_ssize_t)alignment; | |
32366 } | |
32367 if ((size_t)(basicsize + itemsize) < size) { | |
32368 PyErr_Format(PyExc_ValueError, | |
32369 "%.200s.%.200s size changed, may indicate binary incompatibility. " | |
32370 "Expected %zd from C header, got %zd from PyObject", | |
32371 module_name, class_name, size, basicsize+itemsize); | |
32372 goto bad; | |
32373 } | |
32374 if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 && | |
32375 ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { | |
32376 PyErr_Format(PyExc_ValueError, | |
32377 "%.200s.%.200s size changed, may indicate binary incompatibility. " | |
32378 "Expected %zd from C header, got %zd-%zd from PyObject", | |
32379 module_name, class_name, size, basicsize, basicsize+itemsize); | |
32380 goto bad; | |
32381 } | |
32382 else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) { | |
32383 PyOS_snprintf(warning, sizeof(warning), | |
32384 "%s.%s size changed, may indicate binary incompatibility. " | |
32385 "Expected %zd from C header, got %zd from PyObject", | |
32386 module_name, class_name, size, basicsize); | |
32387 if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; | |
32388 } | |
32389 return (PyTypeObject *)result; | |
32390 bad: | |
32391 Py_XDECREF(result); | |
32392 return NULL; | |
32393 } | |
32394 #endif | |
32395 | |
32396 /* ImportDottedModule */ | |
32397 #if PY_MAJOR_VERSION >= 3 | |
32398 static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { | |
32399 PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; | |
32400 if (unlikely(PyErr_Occurred())) { | |
32401 PyErr_Clear(); | |
32402 } | |
32403 if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) { | |
32404 partial_name = name; | |
32405 } else { | |
32406 slice = PySequence_GetSlice(parts_tuple, 0, count); | |
32407 if (unlikely(!slice)) | |
32408 goto bad; | |
32409 sep = PyUnicode_FromStringAndSize(".", 1); | |
32410 if (unlikely(!sep)) | |
32411 goto bad; | |
32412 partial_name = PyUnicode_Join(sep, slice); | |
32413 } | |
32414 PyErr_Format( | |
32415 #if PY_MAJOR_VERSION < 3 | |
32416 PyExc_ImportError, | |
32417 "No module named '%s'", PyString_AS_STRING(partial_name)); | |
32418 #else | |
32419 #if PY_VERSION_HEX >= 0x030600B1 | |
32420 PyExc_ModuleNotFoundError, | |
32421 #else | |
32422 PyExc_ImportError, | |
32423 #endif | |
32424 "No module named '%U'", partial_name); | |
32425 #endif | |
32426 bad: | |
32427 Py_XDECREF(sep); | |
32428 Py_XDECREF(slice); | |
32429 Py_XDECREF(partial_name); | |
32430 return NULL; | |
32431 } | |
32432 #endif | |
32433 #if PY_MAJOR_VERSION >= 3 | |
32434 static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { | |
32435 PyObject *imported_module; | |
32436 #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) | |
32437 PyObject *modules = PyImport_GetModuleDict(); | |
32438 if (unlikely(!modules)) | |
32439 return NULL; | |
32440 imported_module = __Pyx_PyDict_GetItemStr(modules, name); | |
32441 Py_XINCREF(imported_module); | |
32442 #else | |
32443 imported_module = PyImport_GetModule(name); | |
32444 #endif | |
32445 return imported_module; | |
32446 } | |
32447 #endif | |
32448 #if PY_MAJOR_VERSION >= 3 | |
32449 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { | |
32450 Py_ssize_t i, nparts; | |
32451 nparts = PyTuple_GET_SIZE(parts_tuple); | |
32452 for (i=1; i < nparts && module; i++) { | |
32453 PyObject *part, *submodule; | |
32454 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
32455 part = PyTuple_GET_ITEM(parts_tuple, i); | |
32456 #else | |
32457 part = PySequence_ITEM(parts_tuple, i); | |
32458 #endif | |
32459 submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); | |
32460 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) | |
32461 Py_DECREF(part); | |
32462 #endif | |
32463 Py_DECREF(module); | |
32464 module = submodule; | |
32465 } | |
32466 if (unlikely(!module)) { | |
32467 return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); | |
32468 } | |
32469 return module; | |
32470 } | |
32471 #endif | |
32472 static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { | |
32473 #if PY_MAJOR_VERSION < 3 | |
32474 PyObject *module, *from_list, *star = __pyx_n_s__32; | |
32475 CYTHON_UNUSED_VAR(parts_tuple); | |
32476 from_list = PyList_New(1); | |
32477 if (unlikely(!from_list)) | |
32478 return NULL; | |
32479 Py_INCREF(star); | |
32480 PyList_SET_ITEM(from_list, 0, star); | |
32481 module = __Pyx_Import(name, from_list, 0); | |
32482 Py_DECREF(from_list); | |
32483 return module; | |
32484 #else | |
32485 PyObject *imported_module; | |
32486 PyObject *module = __Pyx_Import(name, NULL, 0); | |
32487 if (!parts_tuple || unlikely(!module)) | |
32488 return module; | |
32489 imported_module = __Pyx__ImportDottedModule_Lookup(name); | |
32490 if (likely(imported_module)) { | |
32491 Py_DECREF(module); | |
32492 return imported_module; | |
32493 } | |
32494 PyErr_Clear(); | |
32495 return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); | |
32496 #endif | |
32497 } | |
32498 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { | |
32499 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1 | |
32500 PyObject *module = __Pyx__ImportDottedModule_Lookup(name); | |
32501 if (likely(module)) { | |
32502 PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec); | |
32503 if (likely(spec)) { | |
32504 PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing); | |
32505 if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { | |
32506 Py_DECREF(spec); | |
32507 spec = NULL; | |
32508 } | |
32509 Py_XDECREF(unsafe); | |
32510 } | |
32511 if (likely(!spec)) { | |
32512 PyErr_Clear(); | |
32513 return module; | |
32514 } | |
32515 Py_DECREF(spec); | |
32516 Py_DECREF(module); | |
32517 } else if (PyErr_Occurred()) { | |
32518 PyErr_Clear(); | |
32519 } | |
32520 #endif | |
32521 return __Pyx__ImportDottedModule(name, parts_tuple); | |
32522 } | |
32523 | |
32524 /* CLineInTraceback */ | |
32525 #ifndef CYTHON_CLINE_IN_TRACEBACK | |
32526 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { | |
32527 PyObject *use_cline; | |
32528 PyObject *ptype, *pvalue, *ptraceback; | |
32529 #if CYTHON_COMPILING_IN_CPYTHON | |
32530 PyObject **cython_runtime_dict; | |
32531 #endif | |
32532 CYTHON_MAYBE_UNUSED_VAR(tstate); | |
32533 if (unlikely(!__pyx_cython_runtime)) { | |
32534 return c_line; | |
32535 } | |
32536 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); | |
32537 #if CYTHON_COMPILING_IN_CPYTHON | |
32538 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); | |
32539 if (likely(cython_runtime_dict)) { | |
32540 __PYX_PY_DICT_LOOKUP_IF_MODIFIED( | |
32541 use_cline, *cython_runtime_dict, | |
32542 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) | |
32543 } else | |
32544 #endif | |
32545 { | |
32546 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); | |
32547 if (use_cline_obj) { | |
32548 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; | |
32549 Py_DECREF(use_cline_obj); | |
32550 } else { | |
32551 PyErr_Clear(); | |
32552 use_cline = NULL; | |
32553 } | |
32554 } | |
32555 if (!use_cline) { | |
32556 c_line = 0; | |
32557 (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); | |
32558 } | |
32559 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { | |
32560 c_line = 0; | |
32561 } | |
32562 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); | |
32563 return c_line; | |
32564 } | |
32565 #endif | |
32566 | |
32567 /* CodeObjectCache */ | |
32568 #if !CYTHON_COMPILING_IN_LIMITED_API | |
32569 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { | |
32570 int start = 0, mid = 0, end = count - 1; | |
32571 if (end >= 0 && code_line > entries[end].code_line) { | |
32572 return count; | |
32573 } | |
32574 while (start < end) { | |
32575 mid = start + (end - start) / 2; | |
32576 if (code_line < entries[mid].code_line) { | |
32577 end = mid; | |
32578 } else if (code_line > entries[mid].code_line) { | |
32579 start = mid + 1; | |
32580 } else { | |
32581 return mid; | |
32582 } | |
32583 } | |
32584 if (code_line <= entries[mid].code_line) { | |
32585 return mid; | |
32586 } else { | |
32587 return mid + 1; | |
32588 } | |
32589 } | |
32590 static PyCodeObject *__pyx_find_code_object(int code_line) { | |
32591 PyCodeObject* code_object; | |
32592 int pos; | |
32593 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { | |
32594 return NULL; | |
32595 } | |
32596 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); | |
32597 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { | |
32598 return NULL; | |
32599 } | |
32600 code_object = __pyx_code_cache.entries[pos].code_object; | |
32601 Py_INCREF(code_object); | |
32602 return code_object; | |
32603 } | |
32604 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { | |
32605 int pos, i; | |
32606 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; | |
32607 if (unlikely(!code_line)) { | |
32608 return; | |
32609 } | |
32610 if (unlikely(!entries)) { | |
32611 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); | |
32612 if (likely(entries)) { | |
32613 __pyx_code_cache.entries = entries; | |
32614 __pyx_code_cache.max_count = 64; | |
32615 __pyx_code_cache.count = 1; | |
32616 entries[0].code_line = code_line; | |
32617 entries[0].code_object = code_object; | |
32618 Py_INCREF(code_object); | |
32619 } | |
32620 return; | |
32621 } | |
32622 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); | |
32623 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { | |
32624 PyCodeObject* tmp = entries[pos].code_object; | |
32625 entries[pos].code_object = code_object; | |
32626 Py_DECREF(tmp); | |
32627 return; | |
32628 } | |
32629 if (__pyx_code_cache.count == __pyx_code_cache.max_count) { | |
32630 int new_max = __pyx_code_cache.max_count + 64; | |
32631 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( | |
32632 __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); | |
32633 if (unlikely(!entries)) { | |
32634 return; | |
32635 } | |
32636 __pyx_code_cache.entries = entries; | |
32637 __pyx_code_cache.max_count = new_max; | |
32638 } | |
32639 for (i=__pyx_code_cache.count; i>pos; i--) { | |
32640 entries[i] = entries[i-1]; | |
32641 } | |
32642 entries[pos].code_line = code_line; | |
32643 entries[pos].code_object = code_object; | |
32644 __pyx_code_cache.count++; | |
32645 Py_INCREF(code_object); | |
32646 } | |
32647 #endif | |
32648 | |
32649 /* AddTraceback */ | |
32650 #include "compile.h" | |
32651 #include "frameobject.h" | |
32652 #include "traceback.h" | |
32653 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API | |
32654 #ifndef Py_BUILD_CORE | |
32655 #define Py_BUILD_CORE 1 | |
32656 #endif | |
32657 #include "internal/pycore_frame.h" | |
32658 #endif | |
32659 #if CYTHON_COMPILING_IN_LIMITED_API | |
32660 static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, | |
32661 PyObject *firstlineno, PyObject *name) { | |
32662 PyObject *replace = NULL; | |
32663 if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; | |
32664 if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; | |
32665 replace = PyObject_GetAttrString(code, "replace"); | |
32666 if (likely(replace)) { | |
32667 PyObject *result; | |
32668 result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict); | |
32669 Py_DECREF(replace); | |
32670 return result; | |
32671 } | |
32672 PyErr_Clear(); | |
32673 #if __PYX_LIMITED_VERSION_HEX < 0x030780000 | |
32674 { | |
32675 PyObject *compiled = NULL, *result = NULL; | |
32676 if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; | |
32677 if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; | |
32678 compiled = Py_CompileString( | |
32679 "out = type(code)(\n" | |
32680 " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" | |
32681 " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" | |
32682 " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" | |
32683 " code.co_lnotab)\n", "<dummy>", Py_file_input); | |
32684 if (!compiled) return NULL; | |
32685 result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); | |
32686 Py_DECREF(compiled); | |
32687 if (!result) PyErr_Print(); | |
32688 Py_DECREF(result); | |
32689 result = PyDict_GetItemString(scratch_dict, "out"); | |
32690 if (result) Py_INCREF(result); | |
32691 return result; | |
32692 } | |
32693 #else | |
32694 return NULL; | |
32695 #endif | |
32696 } | |
32697 static void __Pyx_AddTraceback(const char *funcname, int c_line, | |
32698 int py_line, const char *filename) { | |
32699 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; | |
32700 PyObject *replace = NULL, *getframe = NULL, *frame = NULL; | |
32701 PyObject *exc_type, *exc_value, *exc_traceback; | |
32702 int success = 0; | |
32703 if (c_line) { | |
32704 (void) __pyx_cfilenm; | |
32705 (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); | |
32706 } | |
32707 PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); | |
32708 code_object = Py_CompileString("_getframe()", filename, Py_eval_input); | |
32709 if (unlikely(!code_object)) goto bad; | |
32710 py_py_line = PyLong_FromLong(py_line); | |
32711 if (unlikely(!py_py_line)) goto bad; | |
32712 py_funcname = PyUnicode_FromString(funcname); | |
32713 if (unlikely(!py_funcname)) goto bad; | |
32714 dict = PyDict_New(); | |
32715 if (unlikely(!dict)) goto bad; | |
32716 { | |
32717 PyObject *old_code_object = code_object; | |
32718 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); | |
32719 Py_DECREF(old_code_object); | |
32720 } | |
32721 if (unlikely(!code_object)) goto bad; | |
32722 getframe = PySys_GetObject("_getframe"); | |
32723 if (unlikely(!getframe)) goto bad; | |
32724 if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; | |
32725 frame = PyEval_EvalCode(code_object, dict, dict); | |
32726 if (unlikely(!frame) || frame == Py_None) goto bad; | |
32727 success = 1; | |
32728 bad: | |
32729 PyErr_Restore(exc_type, exc_value, exc_traceback); | |
32730 Py_XDECREF(code_object); | |
32731 Py_XDECREF(py_py_line); | |
32732 Py_XDECREF(py_funcname); | |
32733 Py_XDECREF(dict); | |
32734 Py_XDECREF(replace); | |
32735 if (success) { | |
32736 PyTraceBack_Here( | |
32737 (struct _frame*)frame); | |
32738 } | |
32739 Py_XDECREF(frame); | |
32740 } | |
32741 #else | |
32742 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( | |
32743 const char *funcname, int c_line, | |
32744 int py_line, const char *filename) { | |
32745 PyCodeObject *py_code = NULL; | |
32746 PyObject *py_funcname = NULL; | |
32747 #if PY_MAJOR_VERSION < 3 | |
32748 PyObject *py_srcfile = NULL; | |
32749 py_srcfile = PyString_FromString(filename); | |
32750 if (!py_srcfile) goto bad; | |
32751 #endif | |
32752 if (c_line) { | |
32753 #if PY_MAJOR_VERSION < 3 | |
32754 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); | |
32755 if (!py_funcname) goto bad; | |
32756 #else | |
32757 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); | |
32758 if (!py_funcname) goto bad; | |
32759 funcname = PyUnicode_AsUTF8(py_funcname); | |
32760 if (!funcname) goto bad; | |
32761 #endif | |
32762 } | |
32763 else { | |
32764 #if PY_MAJOR_VERSION < 3 | |
32765 py_funcname = PyString_FromString(funcname); | |
32766 if (!py_funcname) goto bad; | |
32767 #endif | |
32768 } | |
32769 #if PY_MAJOR_VERSION < 3 | |
32770 py_code = __Pyx_PyCode_New( | |
32771 0, | |
32772 0, | |
32773 0, | |
32774 0, | |
32775 0, | |
32776 0, | |
32777 __pyx_empty_bytes, /*PyObject *code,*/ | |
32778 __pyx_empty_tuple, /*PyObject *consts,*/ | |
32779 __pyx_empty_tuple, /*PyObject *names,*/ | |
32780 __pyx_empty_tuple, /*PyObject *varnames,*/ | |
32781 __pyx_empty_tuple, /*PyObject *freevars,*/ | |
32782 __pyx_empty_tuple, /*PyObject *cellvars,*/ | |
32783 py_srcfile, /*PyObject *filename,*/ | |
32784 py_funcname, /*PyObject *name,*/ | |
32785 py_line, | |
32786 __pyx_empty_bytes /*PyObject *lnotab*/ | |
32787 ); | |
32788 Py_DECREF(py_srcfile); | |
32789 #else | |
32790 py_code = PyCode_NewEmpty(filename, funcname, py_line); | |
32791 #endif | |
32792 Py_XDECREF(py_funcname); | |
32793 return py_code; | |
32794 bad: | |
32795 Py_XDECREF(py_funcname); | |
32796 #if PY_MAJOR_VERSION < 3 | |
32797 Py_XDECREF(py_srcfile); | |
32798 #endif | |
32799 return NULL; | |
32800 } | |
32801 static void __Pyx_AddTraceback(const char *funcname, int c_line, | |
32802 int py_line, const char *filename) { | |
32803 PyCodeObject *py_code = 0; | |
32804 PyFrameObject *py_frame = 0; | |
32805 PyThreadState *tstate = __Pyx_PyThreadState_Current; | |
32806 PyObject *ptype, *pvalue, *ptraceback; | |
32807 if (c_line) { | |
32808 c_line = __Pyx_CLineForTraceback(tstate, c_line); | |
32809 } | |
32810 py_code = __pyx_find_code_object(c_line ? -c_line : py_line); | |
32811 if (!py_code) { | |
32812 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); | |
32813 py_code = __Pyx_CreateCodeObjectForTraceback( | |
32814 funcname, c_line, py_line, filename); | |
32815 if (!py_code) { | |
32816 /* If the code object creation fails, then we should clear the | |
32817 fetched exception references and propagate the new exception */ | |
32818 Py_XDECREF(ptype); | |
32819 Py_XDECREF(pvalue); | |
32820 Py_XDECREF(ptraceback); | |
32821 goto bad; | |
32822 } | |
32823 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); | |
32824 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); | |
32825 } | |
32826 py_frame = PyFrame_New( | |
32827 tstate, /*PyThreadState *tstate,*/ | |
32828 py_code, /*PyCodeObject *code,*/ | |
32829 __pyx_d, /*PyObject *globals,*/ | |
32830 0 /*PyObject *locals*/ | |
32831 ); | |
32832 if (!py_frame) goto bad; | |
32833 __Pyx_PyFrame_SetLineNumber(py_frame, py_line); | |
32834 PyTraceBack_Here(py_frame); | |
32835 bad: | |
32836 Py_XDECREF(py_code); | |
32837 Py_XDECREF(py_frame); | |
32838 } | |
32839 #endif | |
32840 | |
32841 /* CIntFromPyVerify */ | |
32842 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ | |
32843 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) | |
32844 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ | |
32845 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) | |
32846 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ | |
32847 {\ | |
32848 func_type value = func_value;\ | |
32849 if (sizeof(target_type) < sizeof(func_type)) {\ | |
32850 if (unlikely(value != (func_type) (target_type) value)) {\ | |
32851 func_type zero = 0;\ | |
32852 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ | |
32853 return (target_type) -1;\ | |
32854 if (is_unsigned && unlikely(value < zero))\ | |
32855 goto raise_neg_overflow;\ | |
32856 else\ | |
32857 goto raise_overflow;\ | |
32858 }\ | |
32859 }\ | |
32860 return (target_type) value;\ | |
32861 } | |
32862 | |
32863 /* CIntToPy */ | |
32864 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { | |
32865 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
32866 #pragma GCC diagnostic push | |
32867 #pragma GCC diagnostic ignored "-Wconversion" | |
32868 #endif | |
32869 const int neg_one = (int) -1, const_zero = (int) 0; | |
32870 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
32871 #pragma GCC diagnostic pop | |
32872 #endif | |
32873 const int is_unsigned = neg_one > const_zero; | |
32874 if (is_unsigned) { | |
32875 if (sizeof(int) < sizeof(long)) { | |
32876 return PyInt_FromLong((long) value); | |
32877 } else if (sizeof(int) <= sizeof(unsigned long)) { | |
32878 return PyLong_FromUnsignedLong((unsigned long) value); | |
32879 #ifdef HAVE_LONG_LONG | |
32880 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { | |
32881 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | |
32882 #endif | |
32883 } | |
32884 } else { | |
32885 if (sizeof(int) <= sizeof(long)) { | |
32886 return PyInt_FromLong((long) value); | |
32887 #ifdef HAVE_LONG_LONG | |
32888 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { | |
32889 return PyLong_FromLongLong((PY_LONG_LONG) value); | |
32890 #endif | |
32891 } | |
32892 } | |
32893 { | |
32894 unsigned char *bytes = (unsigned char *)&value; | |
32895 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 | |
32896 if (is_unsigned) { | |
32897 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); | |
32898 } else { | |
32899 return PyLong_FromNativeBytes(bytes, sizeof(value), -1); | |
32900 } | |
32901 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 | |
32902 int one = 1; int little = (int)*(unsigned char *)&one; | |
32903 return _PyLong_FromByteArray(bytes, sizeof(int), | |
32904 little, !is_unsigned); | |
32905 #else | |
32906 int one = 1; int little = (int)*(unsigned char *)&one; | |
32907 PyObject *from_bytes, *result = NULL; | |
32908 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; | |
32909 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); | |
32910 if (!from_bytes) return NULL; | |
32911 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); | |
32912 if (!py_bytes) goto limited_bad; | |
32913 order_str = PyUnicode_FromString(little ? "little" : "big"); | |
32914 if (!order_str) goto limited_bad; | |
32915 arg_tuple = PyTuple_Pack(2, py_bytes, order_str); | |
32916 if (!arg_tuple) goto limited_bad; | |
32917 if (!is_unsigned) { | |
32918 kwds = PyDict_New(); | |
32919 if (!kwds) goto limited_bad; | |
32920 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; | |
32921 } | |
32922 result = PyObject_Call(from_bytes, arg_tuple, kwds); | |
32923 limited_bad: | |
32924 Py_XDECREF(kwds); | |
32925 Py_XDECREF(arg_tuple); | |
32926 Py_XDECREF(order_str); | |
32927 Py_XDECREF(py_bytes); | |
32928 Py_XDECREF(from_bytes); | |
32929 return result; | |
32930 #endif | |
32931 } | |
32932 } | |
32933 | |
32934 /* CIntFromPy */ | |
32935 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { | |
32936 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
32937 #pragma GCC diagnostic push | |
32938 #pragma GCC diagnostic ignored "-Wconversion" | |
32939 #endif | |
32940 const int neg_one = (int) -1, const_zero = (int) 0; | |
32941 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
32942 #pragma GCC diagnostic pop | |
32943 #endif | |
32944 const int is_unsigned = neg_one > const_zero; | |
32945 #if PY_MAJOR_VERSION < 3 | |
32946 if (likely(PyInt_Check(x))) { | |
32947 if ((sizeof(int) < sizeof(long))) { | |
32948 __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) | |
32949 } else { | |
32950 long val = PyInt_AS_LONG(x); | |
32951 if (is_unsigned && unlikely(val < 0)) { | |
32952 goto raise_neg_overflow; | |
32953 } | |
32954 return (int) val; | |
32955 } | |
32956 } | |
32957 #endif | |
32958 if (unlikely(!PyLong_Check(x))) { | |
32959 int val; | |
32960 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); | |
32961 if (!tmp) return (int) -1; | |
32962 val = __Pyx_PyInt_As_int(tmp); | |
32963 Py_DECREF(tmp); | |
32964 return val; | |
32965 } | |
32966 if (is_unsigned) { | |
32967 #if CYTHON_USE_PYLONG_INTERNALS | |
32968 if (unlikely(__Pyx_PyLong_IsNeg(x))) { | |
32969 goto raise_neg_overflow; | |
32970 } else if (__Pyx_PyLong_IsCompact(x)) { | |
32971 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) | |
32972 } else { | |
32973 const digit* digits = __Pyx_PyLong_Digits(x); | |
32974 assert(__Pyx_PyLong_DigitCount(x) > 1); | |
32975 switch (__Pyx_PyLong_DigitCount(x)) { | |
32976 case 2: | |
32977 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { | |
32978 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { | |
32979 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
32980 } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { | |
32981 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); | |
32982 } | |
32983 } | |
32984 break; | |
32985 case 3: | |
32986 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { | |
32987 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { | |
32988 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
32989 } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { | |
32990 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); | |
32991 } | |
32992 } | |
32993 break; | |
32994 case 4: | |
32995 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { | |
32996 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { | |
32997 __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]))) | |
32998 } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { | |
32999 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); | |
33000 } | |
33001 } | |
33002 break; | |
33003 } | |
33004 } | |
33005 #endif | |
33006 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 | |
33007 if (unlikely(Py_SIZE(x) < 0)) { | |
33008 goto raise_neg_overflow; | |
33009 } | |
33010 #else | |
33011 { | |
33012 int result = PyObject_RichCompareBool(x, Py_False, Py_LT); | |
33013 if (unlikely(result < 0)) | |
33014 return (int) -1; | |
33015 if (unlikely(result == 1)) | |
33016 goto raise_neg_overflow; | |
33017 } | |
33018 #endif | |
33019 if ((sizeof(int) <= sizeof(unsigned long))) { | |
33020 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) | |
33021 #ifdef HAVE_LONG_LONG | |
33022 } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { | |
33023 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) | |
33024 #endif | |
33025 } | |
33026 } else { | |
33027 #if CYTHON_USE_PYLONG_INTERNALS | |
33028 if (__Pyx_PyLong_IsCompact(x)) { | |
33029 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) | |
33030 } else { | |
33031 const digit* digits = __Pyx_PyLong_Digits(x); | |
33032 assert(__Pyx_PyLong_DigitCount(x) > 1); | |
33033 switch (__Pyx_PyLong_SignedDigitCount(x)) { | |
33034 case -2: | |
33035 if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { | |
33036 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { | |
33037 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33038 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { | |
33039 return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); | |
33040 } | |
33041 } | |
33042 break; | |
33043 case 2: | |
33044 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { | |
33045 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { | |
33046 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33047 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { | |
33048 return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); | |
33049 } | |
33050 } | |
33051 break; | |
33052 case -3: | |
33053 if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { | |
33054 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { | |
33055 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33056 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { | |
33057 return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); | |
33058 } | |
33059 } | |
33060 break; | |
33061 case 3: | |
33062 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { | |
33063 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { | |
33064 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33065 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { | |
33066 return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); | |
33067 } | |
33068 } | |
33069 break; | |
33070 case -4: | |
33071 if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { | |
33072 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { | |
33073 __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]))) | |
33074 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { | |
33075 return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); | |
33076 } | |
33077 } | |
33078 break; | |
33079 case 4: | |
33080 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { | |
33081 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { | |
33082 __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]))) | |
33083 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { | |
33084 return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); | |
33085 } | |
33086 } | |
33087 break; | |
33088 } | |
33089 } | |
33090 #endif | |
33091 if ((sizeof(int) <= sizeof(long))) { | |
33092 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) | |
33093 #ifdef HAVE_LONG_LONG | |
33094 } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { | |
33095 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) | |
33096 #endif | |
33097 } | |
33098 } | |
33099 { | |
33100 int val; | |
33101 int ret = -1; | |
33102 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API | |
33103 Py_ssize_t bytes_copied = PyLong_AsNativeBytes( | |
33104 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); | |
33105 if (unlikely(bytes_copied == -1)) { | |
33106 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { | |
33107 goto raise_overflow; | |
33108 } else { | |
33109 ret = 0; | |
33110 } | |
33111 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) | |
33112 int one = 1; int is_little = (int)*(unsigned char *)&one; | |
33113 unsigned char *bytes = (unsigned char *)&val; | |
33114 ret = _PyLong_AsByteArray((PyLongObject *)x, | |
33115 bytes, sizeof(val), | |
33116 is_little, !is_unsigned); | |
33117 #else | |
33118 PyObject *v; | |
33119 PyObject *stepval = NULL, *mask = NULL, *shift = NULL; | |
33120 int bits, remaining_bits, is_negative = 0; | |
33121 int chunk_size = (sizeof(long) < 8) ? 30 : 62; | |
33122 if (likely(PyLong_CheckExact(x))) { | |
33123 v = __Pyx_NewRef(x); | |
33124 } else { | |
33125 v = PyNumber_Long(x); | |
33126 if (unlikely(!v)) return (int) -1; | |
33127 assert(PyLong_CheckExact(v)); | |
33128 } | |
33129 { | |
33130 int result = PyObject_RichCompareBool(v, Py_False, Py_LT); | |
33131 if (unlikely(result < 0)) { | |
33132 Py_DECREF(v); | |
33133 return (int) -1; | |
33134 } | |
33135 is_negative = result == 1; | |
33136 } | |
33137 if (is_unsigned && unlikely(is_negative)) { | |
33138 Py_DECREF(v); | |
33139 goto raise_neg_overflow; | |
33140 } else if (is_negative) { | |
33141 stepval = PyNumber_Invert(v); | |
33142 Py_DECREF(v); | |
33143 if (unlikely(!stepval)) | |
33144 return (int) -1; | |
33145 } else { | |
33146 stepval = v; | |
33147 } | |
33148 v = NULL; | |
33149 val = (int) 0; | |
33150 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; | |
33151 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; | |
33152 for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { | |
33153 PyObject *tmp, *digit; | |
33154 long idigit; | |
33155 digit = PyNumber_And(stepval, mask); | |
33156 if (unlikely(!digit)) goto done; | |
33157 idigit = PyLong_AsLong(digit); | |
33158 Py_DECREF(digit); | |
33159 if (unlikely(idigit < 0)) goto done; | |
33160 val |= ((int) idigit) << bits; | |
33161 tmp = PyNumber_Rshift(stepval, shift); | |
33162 if (unlikely(!tmp)) goto done; | |
33163 Py_DECREF(stepval); stepval = tmp; | |
33164 } | |
33165 Py_DECREF(shift); shift = NULL; | |
33166 Py_DECREF(mask); mask = NULL; | |
33167 { | |
33168 long idigit = PyLong_AsLong(stepval); | |
33169 if (unlikely(idigit < 0)) goto done; | |
33170 remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); | |
33171 if (unlikely(idigit >= (1L << remaining_bits))) | |
33172 goto raise_overflow; | |
33173 val |= ((int) idigit) << bits; | |
33174 } | |
33175 if (!is_unsigned) { | |
33176 if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) | |
33177 goto raise_overflow; | |
33178 if (is_negative) | |
33179 val = ~val; | |
33180 } | |
33181 ret = 0; | |
33182 done: | |
33183 Py_XDECREF(shift); | |
33184 Py_XDECREF(mask); | |
33185 Py_XDECREF(stepval); | |
33186 #endif | |
33187 if (unlikely(ret)) | |
33188 return (int) -1; | |
33189 return val; | |
33190 } | |
33191 raise_overflow: | |
33192 PyErr_SetString(PyExc_OverflowError, | |
33193 "value too large to convert to int"); | |
33194 return (int) -1; | |
33195 raise_neg_overflow: | |
33196 PyErr_SetString(PyExc_OverflowError, | |
33197 "can't convert negative value to int"); | |
33198 return (int) -1; | |
33199 } | |
33200 | |
33201 /* CIntFromPy */ | |
33202 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { | |
33203 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
33204 #pragma GCC diagnostic push | |
33205 #pragma GCC diagnostic ignored "-Wconversion" | |
33206 #endif | |
33207 const long neg_one = (long) -1, const_zero = (long) 0; | |
33208 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
33209 #pragma GCC diagnostic pop | |
33210 #endif | |
33211 const int is_unsigned = neg_one > const_zero; | |
33212 #if PY_MAJOR_VERSION < 3 | |
33213 if (likely(PyInt_Check(x))) { | |
33214 if ((sizeof(long) < sizeof(long))) { | |
33215 __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) | |
33216 } else { | |
33217 long val = PyInt_AS_LONG(x); | |
33218 if (is_unsigned && unlikely(val < 0)) { | |
33219 goto raise_neg_overflow; | |
33220 } | |
33221 return (long) val; | |
33222 } | |
33223 } | |
33224 #endif | |
33225 if (unlikely(!PyLong_Check(x))) { | |
33226 long val; | |
33227 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); | |
33228 if (!tmp) return (long) -1; | |
33229 val = __Pyx_PyInt_As_long(tmp); | |
33230 Py_DECREF(tmp); | |
33231 return val; | |
33232 } | |
33233 if (is_unsigned) { | |
33234 #if CYTHON_USE_PYLONG_INTERNALS | |
33235 if (unlikely(__Pyx_PyLong_IsNeg(x))) { | |
33236 goto raise_neg_overflow; | |
33237 } else if (__Pyx_PyLong_IsCompact(x)) { | |
33238 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) | |
33239 } else { | |
33240 const digit* digits = __Pyx_PyLong_Digits(x); | |
33241 assert(__Pyx_PyLong_DigitCount(x) > 1); | |
33242 switch (__Pyx_PyLong_DigitCount(x)) { | |
33243 case 2: | |
33244 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { | |
33245 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { | |
33246 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33247 } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { | |
33248 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); | |
33249 } | |
33250 } | |
33251 break; | |
33252 case 3: | |
33253 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { | |
33254 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { | |
33255 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33256 } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { | |
33257 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); | |
33258 } | |
33259 } | |
33260 break; | |
33261 case 4: | |
33262 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { | |
33263 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { | |
33264 __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]))) | |
33265 } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { | |
33266 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); | |
33267 } | |
33268 } | |
33269 break; | |
33270 } | |
33271 } | |
33272 #endif | |
33273 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 | |
33274 if (unlikely(Py_SIZE(x) < 0)) { | |
33275 goto raise_neg_overflow; | |
33276 } | |
33277 #else | |
33278 { | |
33279 int result = PyObject_RichCompareBool(x, Py_False, Py_LT); | |
33280 if (unlikely(result < 0)) | |
33281 return (long) -1; | |
33282 if (unlikely(result == 1)) | |
33283 goto raise_neg_overflow; | |
33284 } | |
33285 #endif | |
33286 if ((sizeof(long) <= sizeof(unsigned long))) { | |
33287 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) | |
33288 #ifdef HAVE_LONG_LONG | |
33289 } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { | |
33290 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) | |
33291 #endif | |
33292 } | |
33293 } else { | |
33294 #if CYTHON_USE_PYLONG_INTERNALS | |
33295 if (__Pyx_PyLong_IsCompact(x)) { | |
33296 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) | |
33297 } else { | |
33298 const digit* digits = __Pyx_PyLong_Digits(x); | |
33299 assert(__Pyx_PyLong_DigitCount(x) > 1); | |
33300 switch (__Pyx_PyLong_SignedDigitCount(x)) { | |
33301 case -2: | |
33302 if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { | |
33303 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { | |
33304 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33305 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { | |
33306 return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); | |
33307 } | |
33308 } | |
33309 break; | |
33310 case 2: | |
33311 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { | |
33312 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { | |
33313 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33314 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { | |
33315 return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); | |
33316 } | |
33317 } | |
33318 break; | |
33319 case -3: | |
33320 if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { | |
33321 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { | |
33322 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33323 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { | |
33324 return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); | |
33325 } | |
33326 } | |
33327 break; | |
33328 case 3: | |
33329 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { | |
33330 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { | |
33331 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33332 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { | |
33333 return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); | |
33334 } | |
33335 } | |
33336 break; | |
33337 case -4: | |
33338 if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { | |
33339 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { | |
33340 __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]))) | |
33341 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { | |
33342 return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); | |
33343 } | |
33344 } | |
33345 break; | |
33346 case 4: | |
33347 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { | |
33348 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { | |
33349 __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]))) | |
33350 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { | |
33351 return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); | |
33352 } | |
33353 } | |
33354 break; | |
33355 } | |
33356 } | |
33357 #endif | |
33358 if ((sizeof(long) <= sizeof(long))) { | |
33359 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) | |
33360 #ifdef HAVE_LONG_LONG | |
33361 } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { | |
33362 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) | |
33363 #endif | |
33364 } | |
33365 } | |
33366 { | |
33367 long val; | |
33368 int ret = -1; | |
33369 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API | |
33370 Py_ssize_t bytes_copied = PyLong_AsNativeBytes( | |
33371 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); | |
33372 if (unlikely(bytes_copied == -1)) { | |
33373 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { | |
33374 goto raise_overflow; | |
33375 } else { | |
33376 ret = 0; | |
33377 } | |
33378 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) | |
33379 int one = 1; int is_little = (int)*(unsigned char *)&one; | |
33380 unsigned char *bytes = (unsigned char *)&val; | |
33381 ret = _PyLong_AsByteArray((PyLongObject *)x, | |
33382 bytes, sizeof(val), | |
33383 is_little, !is_unsigned); | |
33384 #else | |
33385 PyObject *v; | |
33386 PyObject *stepval = NULL, *mask = NULL, *shift = NULL; | |
33387 int bits, remaining_bits, is_negative = 0; | |
33388 int chunk_size = (sizeof(long) < 8) ? 30 : 62; | |
33389 if (likely(PyLong_CheckExact(x))) { | |
33390 v = __Pyx_NewRef(x); | |
33391 } else { | |
33392 v = PyNumber_Long(x); | |
33393 if (unlikely(!v)) return (long) -1; | |
33394 assert(PyLong_CheckExact(v)); | |
33395 } | |
33396 { | |
33397 int result = PyObject_RichCompareBool(v, Py_False, Py_LT); | |
33398 if (unlikely(result < 0)) { | |
33399 Py_DECREF(v); | |
33400 return (long) -1; | |
33401 } | |
33402 is_negative = result == 1; | |
33403 } | |
33404 if (is_unsigned && unlikely(is_negative)) { | |
33405 Py_DECREF(v); | |
33406 goto raise_neg_overflow; | |
33407 } else if (is_negative) { | |
33408 stepval = PyNumber_Invert(v); | |
33409 Py_DECREF(v); | |
33410 if (unlikely(!stepval)) | |
33411 return (long) -1; | |
33412 } else { | |
33413 stepval = v; | |
33414 } | |
33415 v = NULL; | |
33416 val = (long) 0; | |
33417 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; | |
33418 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; | |
33419 for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { | |
33420 PyObject *tmp, *digit; | |
33421 long idigit; | |
33422 digit = PyNumber_And(stepval, mask); | |
33423 if (unlikely(!digit)) goto done; | |
33424 idigit = PyLong_AsLong(digit); | |
33425 Py_DECREF(digit); | |
33426 if (unlikely(idigit < 0)) goto done; | |
33427 val |= ((long) idigit) << bits; | |
33428 tmp = PyNumber_Rshift(stepval, shift); | |
33429 if (unlikely(!tmp)) goto done; | |
33430 Py_DECREF(stepval); stepval = tmp; | |
33431 } | |
33432 Py_DECREF(shift); shift = NULL; | |
33433 Py_DECREF(mask); mask = NULL; | |
33434 { | |
33435 long idigit = PyLong_AsLong(stepval); | |
33436 if (unlikely(idigit < 0)) goto done; | |
33437 remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); | |
33438 if (unlikely(idigit >= (1L << remaining_bits))) | |
33439 goto raise_overflow; | |
33440 val |= ((long) idigit) << bits; | |
33441 } | |
33442 if (!is_unsigned) { | |
33443 if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) | |
33444 goto raise_overflow; | |
33445 if (is_negative) | |
33446 val = ~val; | |
33447 } | |
33448 ret = 0; | |
33449 done: | |
33450 Py_XDECREF(shift); | |
33451 Py_XDECREF(mask); | |
33452 Py_XDECREF(stepval); | |
33453 #endif | |
33454 if (unlikely(ret)) | |
33455 return (long) -1; | |
33456 return val; | |
33457 } | |
33458 raise_overflow: | |
33459 PyErr_SetString(PyExc_OverflowError, | |
33460 "value too large to convert to long"); | |
33461 return (long) -1; | |
33462 raise_neg_overflow: | |
33463 PyErr_SetString(PyExc_OverflowError, | |
33464 "can't convert negative value to long"); | |
33465 return (long) -1; | |
33466 } | |
33467 | |
33468 /* CIntToPy */ | |
33469 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { | |
33470 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
33471 #pragma GCC diagnostic push | |
33472 #pragma GCC diagnostic ignored "-Wconversion" | |
33473 #endif | |
33474 const long neg_one = (long) -1, const_zero = (long) 0; | |
33475 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
33476 #pragma GCC diagnostic pop | |
33477 #endif | |
33478 const int is_unsigned = neg_one > const_zero; | |
33479 if (is_unsigned) { | |
33480 if (sizeof(long) < sizeof(long)) { | |
33481 return PyInt_FromLong((long) value); | |
33482 } else if (sizeof(long) <= sizeof(unsigned long)) { | |
33483 return PyLong_FromUnsignedLong((unsigned long) value); | |
33484 #ifdef HAVE_LONG_LONG | |
33485 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { | |
33486 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | |
33487 #endif | |
33488 } | |
33489 } else { | |
33490 if (sizeof(long) <= sizeof(long)) { | |
33491 return PyInt_FromLong((long) value); | |
33492 #ifdef HAVE_LONG_LONG | |
33493 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { | |
33494 return PyLong_FromLongLong((PY_LONG_LONG) value); | |
33495 #endif | |
33496 } | |
33497 } | |
33498 { | |
33499 unsigned char *bytes = (unsigned char *)&value; | |
33500 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 | |
33501 if (is_unsigned) { | |
33502 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); | |
33503 } else { | |
33504 return PyLong_FromNativeBytes(bytes, sizeof(value), -1); | |
33505 } | |
33506 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 | |
33507 int one = 1; int little = (int)*(unsigned char *)&one; | |
33508 return _PyLong_FromByteArray(bytes, sizeof(long), | |
33509 little, !is_unsigned); | |
33510 #else | |
33511 int one = 1; int little = (int)*(unsigned char *)&one; | |
33512 PyObject *from_bytes, *result = NULL; | |
33513 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; | |
33514 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); | |
33515 if (!from_bytes) return NULL; | |
33516 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); | |
33517 if (!py_bytes) goto limited_bad; | |
33518 order_str = PyUnicode_FromString(little ? "little" : "big"); | |
33519 if (!order_str) goto limited_bad; | |
33520 arg_tuple = PyTuple_Pack(2, py_bytes, order_str); | |
33521 if (!arg_tuple) goto limited_bad; | |
33522 if (!is_unsigned) { | |
33523 kwds = PyDict_New(); | |
33524 if (!kwds) goto limited_bad; | |
33525 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; | |
33526 } | |
33527 result = PyObject_Call(from_bytes, arg_tuple, kwds); | |
33528 limited_bad: | |
33529 Py_XDECREF(kwds); | |
33530 Py_XDECREF(arg_tuple); | |
33531 Py_XDECREF(order_str); | |
33532 Py_XDECREF(py_bytes); | |
33533 Py_XDECREF(from_bytes); | |
33534 return result; | |
33535 #endif | |
33536 } | |
33537 } | |
33538 | |
33539 /* CIntFromPy */ | |
33540 static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) { | |
33541 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
33542 #pragma GCC diagnostic push | |
33543 #pragma GCC diagnostic ignored "-Wconversion" | |
33544 #endif | |
33545 const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0; | |
33546 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
33547 #pragma GCC diagnostic pop | |
33548 #endif | |
33549 const int is_unsigned = neg_one > const_zero; | |
33550 #if PY_MAJOR_VERSION < 3 | |
33551 if (likely(PyInt_Check(x))) { | |
33552 if ((sizeof(uint32_t) < sizeof(long))) { | |
33553 __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x)) | |
33554 } else { | |
33555 long val = PyInt_AS_LONG(x); | |
33556 if (is_unsigned && unlikely(val < 0)) { | |
33557 goto raise_neg_overflow; | |
33558 } | |
33559 return (uint32_t) val; | |
33560 } | |
33561 } | |
33562 #endif | |
33563 if (unlikely(!PyLong_Check(x))) { | |
33564 uint32_t val; | |
33565 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); | |
33566 if (!tmp) return (uint32_t) -1; | |
33567 val = __Pyx_PyInt_As_uint32_t(tmp); | |
33568 Py_DECREF(tmp); | |
33569 return val; | |
33570 } | |
33571 if (is_unsigned) { | |
33572 #if CYTHON_USE_PYLONG_INTERNALS | |
33573 if (unlikely(__Pyx_PyLong_IsNeg(x))) { | |
33574 goto raise_neg_overflow; | |
33575 } else if (__Pyx_PyLong_IsCompact(x)) { | |
33576 __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) | |
33577 } else { | |
33578 const digit* digits = __Pyx_PyLong_Digits(x); | |
33579 assert(__Pyx_PyLong_DigitCount(x) > 1); | |
33580 switch (__Pyx_PyLong_DigitCount(x)) { | |
33581 case 2: | |
33582 if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) { | |
33583 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { | |
33584 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33585 } else if ((8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT)) { | |
33586 return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); | |
33587 } | |
33588 } | |
33589 break; | |
33590 case 3: | |
33591 if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) { | |
33592 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { | |
33593 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33594 } else if ((8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT)) { | |
33595 return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); | |
33596 } | |
33597 } | |
33598 break; | |
33599 case 4: | |
33600 if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) { | |
33601 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { | |
33602 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33603 } else if ((8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT)) { | |
33604 return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); | |
33605 } | |
33606 } | |
33607 break; | |
33608 } | |
33609 } | |
33610 #endif | |
33611 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 | |
33612 if (unlikely(Py_SIZE(x) < 0)) { | |
33613 goto raise_neg_overflow; | |
33614 } | |
33615 #else | |
33616 { | |
33617 int result = PyObject_RichCompareBool(x, Py_False, Py_LT); | |
33618 if (unlikely(result < 0)) | |
33619 return (uint32_t) -1; | |
33620 if (unlikely(result == 1)) | |
33621 goto raise_neg_overflow; | |
33622 } | |
33623 #endif | |
33624 if ((sizeof(uint32_t) <= sizeof(unsigned long))) { | |
33625 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x)) | |
33626 #ifdef HAVE_LONG_LONG | |
33627 } else if ((sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG))) { | |
33628 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) | |
33629 #endif | |
33630 } | |
33631 } else { | |
33632 #if CYTHON_USE_PYLONG_INTERNALS | |
33633 if (__Pyx_PyLong_IsCompact(x)) { | |
33634 __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) | |
33635 } else { | |
33636 const digit* digits = __Pyx_PyLong_Digits(x); | |
33637 assert(__Pyx_PyLong_DigitCount(x) > 1); | |
33638 switch (__Pyx_PyLong_SignedDigitCount(x)) { | |
33639 case -2: | |
33640 if ((8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT)) { | |
33641 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { | |
33642 __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33643 } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) { | |
33644 return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); | |
33645 } | |
33646 } | |
33647 break; | |
33648 case 2: | |
33649 if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) { | |
33650 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { | |
33651 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33652 } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) { | |
33653 return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); | |
33654 } | |
33655 } | |
33656 break; | |
33657 case -3: | |
33658 if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) { | |
33659 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { | |
33660 __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33661 } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) { | |
33662 return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); | |
33663 } | |
33664 } | |
33665 break; | |
33666 case 3: | |
33667 if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) { | |
33668 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { | |
33669 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33670 } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) { | |
33671 return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); | |
33672 } | |
33673 } | |
33674 break; | |
33675 case -4: | |
33676 if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) { | |
33677 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { | |
33678 __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33679 } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) { | |
33680 return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); | |
33681 } | |
33682 } | |
33683 break; | |
33684 case 4: | |
33685 if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) { | |
33686 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { | |
33687 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) | |
33688 } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) { | |
33689 return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); | |
33690 } | |
33691 } | |
33692 break; | |
33693 } | |
33694 } | |
33695 #endif | |
33696 if ((sizeof(uint32_t) <= sizeof(long))) { | |
33697 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x)) | |
33698 #ifdef HAVE_LONG_LONG | |
33699 } else if ((sizeof(uint32_t) <= sizeof(PY_LONG_LONG))) { | |
33700 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x)) | |
33701 #endif | |
33702 } | |
33703 } | |
33704 { | |
33705 uint32_t val; | |
33706 int ret = -1; | |
33707 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API | |
33708 Py_ssize_t bytes_copied = PyLong_AsNativeBytes( | |
33709 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); | |
33710 if (unlikely(bytes_copied == -1)) { | |
33711 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { | |
33712 goto raise_overflow; | |
33713 } else { | |
33714 ret = 0; | |
33715 } | |
33716 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) | |
33717 int one = 1; int is_little = (int)*(unsigned char *)&one; | |
33718 unsigned char *bytes = (unsigned char *)&val; | |
33719 ret = _PyLong_AsByteArray((PyLongObject *)x, | |
33720 bytes, sizeof(val), | |
33721 is_little, !is_unsigned); | |
33722 #else | |
33723 PyObject *v; | |
33724 PyObject *stepval = NULL, *mask = NULL, *shift = NULL; | |
33725 int bits, remaining_bits, is_negative = 0; | |
33726 int chunk_size = (sizeof(long) < 8) ? 30 : 62; | |
33727 if (likely(PyLong_CheckExact(x))) { | |
33728 v = __Pyx_NewRef(x); | |
33729 } else { | |
33730 v = PyNumber_Long(x); | |
33731 if (unlikely(!v)) return (uint32_t) -1; | |
33732 assert(PyLong_CheckExact(v)); | |
33733 } | |
33734 { | |
33735 int result = PyObject_RichCompareBool(v, Py_False, Py_LT); | |
33736 if (unlikely(result < 0)) { | |
33737 Py_DECREF(v); | |
33738 return (uint32_t) -1; | |
33739 } | |
33740 is_negative = result == 1; | |
33741 } | |
33742 if (is_unsigned && unlikely(is_negative)) { | |
33743 Py_DECREF(v); | |
33744 goto raise_neg_overflow; | |
33745 } else if (is_negative) { | |
33746 stepval = PyNumber_Invert(v); | |
33747 Py_DECREF(v); | |
33748 if (unlikely(!stepval)) | |
33749 return (uint32_t) -1; | |
33750 } else { | |
33751 stepval = v; | |
33752 } | |
33753 v = NULL; | |
33754 val = (uint32_t) 0; | |
33755 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; | |
33756 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; | |
33757 for (bits = 0; bits < (int) sizeof(uint32_t) * 8 - chunk_size; bits += chunk_size) { | |
33758 PyObject *tmp, *digit; | |
33759 long idigit; | |
33760 digit = PyNumber_And(stepval, mask); | |
33761 if (unlikely(!digit)) goto done; | |
33762 idigit = PyLong_AsLong(digit); | |
33763 Py_DECREF(digit); | |
33764 if (unlikely(idigit < 0)) goto done; | |
33765 val |= ((uint32_t) idigit) << bits; | |
33766 tmp = PyNumber_Rshift(stepval, shift); | |
33767 if (unlikely(!tmp)) goto done; | |
33768 Py_DECREF(stepval); stepval = tmp; | |
33769 } | |
33770 Py_DECREF(shift); shift = NULL; | |
33771 Py_DECREF(mask); mask = NULL; | |
33772 { | |
33773 long idigit = PyLong_AsLong(stepval); | |
33774 if (unlikely(idigit < 0)) goto done; | |
33775 remaining_bits = ((int) sizeof(uint32_t) * 8) - bits - (is_unsigned ? 0 : 1); | |
33776 if (unlikely(idigit >= (1L << remaining_bits))) | |
33777 goto raise_overflow; | |
33778 val |= ((uint32_t) idigit) << bits; | |
33779 } | |
33780 if (!is_unsigned) { | |
33781 if (unlikely(val & (((uint32_t) 1) << (sizeof(uint32_t) * 8 - 1)))) | |
33782 goto raise_overflow; | |
33783 if (is_negative) | |
33784 val = ~val; | |
33785 } | |
33786 ret = 0; | |
33787 done: | |
33788 Py_XDECREF(shift); | |
33789 Py_XDECREF(mask); | |
33790 Py_XDECREF(stepval); | |
33791 #endif | |
33792 if (unlikely(ret)) | |
33793 return (uint32_t) -1; | |
33794 return val; | |
33795 } | |
33796 raise_overflow: | |
33797 PyErr_SetString(PyExc_OverflowError, | |
33798 "value too large to convert to uint32_t"); | |
33799 return (uint32_t) -1; | |
33800 raise_neg_overflow: | |
33801 PyErr_SetString(PyExc_OverflowError, | |
33802 "can't convert negative value to uint32_t"); | |
33803 return (uint32_t) -1; | |
33804 } | |
33805 | |
33806 /* CIntToPy */ | |
33807 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) { | |
33808 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
33809 #pragma GCC diagnostic push | |
33810 #pragma GCC diagnostic ignored "-Wconversion" | |
33811 #endif | |
33812 const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0; | |
33813 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC | |
33814 #pragma GCC diagnostic pop | |
33815 #endif | |
33816 const int is_unsigned = neg_one > const_zero; | |
33817 if (is_unsigned) { | |
33818 if (sizeof(uint32_t) < sizeof(long)) { | |
33819 return PyInt_FromLong((long) value); | |
33820 } else if (sizeof(uint32_t) <= sizeof(unsigned long)) { | |
33821 return PyLong_FromUnsignedLong((unsigned long) value); | |
33822 #ifdef HAVE_LONG_LONG | |
33823 } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) { | |
33824 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | |
33825 #endif | |
33826 } | |
33827 } else { | |
33828 if (sizeof(uint32_t) <= sizeof(long)) { | |
33829 return PyInt_FromLong((long) value); | |
33830 #ifdef HAVE_LONG_LONG | |
33831 } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) { | |
33832 return PyLong_FromLongLong((PY_LONG_LONG) value); | |
33833 #endif | |
33834 } | |
33835 } | |
33836 { | |
33837 unsigned char *bytes = (unsigned char *)&value; | |
33838 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 | |
33839 if (is_unsigned) { | |
33840 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); | |
33841 } else { | |
33842 return PyLong_FromNativeBytes(bytes, sizeof(value), -1); | |
33843 } | |
33844 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 | |
33845 int one = 1; int little = (int)*(unsigned char *)&one; | |
33846 return _PyLong_FromByteArray(bytes, sizeof(uint32_t), | |
33847 little, !is_unsigned); | |
33848 #else | |
33849 int one = 1; int little = (int)*(unsigned char *)&one; | |
33850 PyObject *from_bytes, *result = NULL; | |
33851 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; | |
33852 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); | |
33853 if (!from_bytes) return NULL; | |
33854 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint32_t)); | |
33855 if (!py_bytes) goto limited_bad; | |
33856 order_str = PyUnicode_FromString(little ? "little" : "big"); | |
33857 if (!order_str) goto limited_bad; | |
33858 arg_tuple = PyTuple_Pack(2, py_bytes, order_str); | |
33859 if (!arg_tuple) goto limited_bad; | |
33860 if (!is_unsigned) { | |
33861 kwds = PyDict_New(); | |
33862 if (!kwds) goto limited_bad; | |
33863 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; | |
33864 } | |
33865 result = PyObject_Call(from_bytes, arg_tuple, kwds); | |
33866 limited_bad: | |
33867 Py_XDECREF(kwds); | |
33868 Py_XDECREF(arg_tuple); | |
33869 Py_XDECREF(order_str); | |
33870 Py_XDECREF(py_bytes); | |
33871 Py_XDECREF(from_bytes); | |
33872 return result; | |
33873 #endif | |
33874 } | |
33875 } | |
33876 | |
33877 /* FormatTypeName */ | |
33878 #if CYTHON_COMPILING_IN_LIMITED_API | |
33879 static __Pyx_TypeName | |
33880 __Pyx_PyType_GetName(PyTypeObject* tp) | |
33881 { | |
33882 PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, | |
33883 __pyx_n_s_name_2); | |
33884 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { | |
33885 PyErr_Clear(); | |
33886 Py_XDECREF(name); | |
33887 name = __Pyx_NewRef(__pyx_n_s__88); | |
33888 } | |
33889 return name; | |
33890 } | |
33891 #endif | |
33892 | |
33893 /* FastTypeChecks */ | |
33894 #if CYTHON_COMPILING_IN_CPYTHON | |
33895 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { | |
33896 while (a) { | |
33897 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); | |
33898 if (a == b) | |
33899 return 1; | |
33900 } | |
33901 return b == &PyBaseObject_Type; | |
33902 } | |
33903 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { | |
33904 PyObject *mro; | |
33905 if (a == b) return 1; | |
33906 mro = a->tp_mro; | |
33907 if (likely(mro)) { | |
33908 Py_ssize_t i, n; | |
33909 n = PyTuple_GET_SIZE(mro); | |
33910 for (i = 0; i < n; i++) { | |
33911 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) | |
33912 return 1; | |
33913 } | |
33914 return 0; | |
33915 } | |
33916 return __Pyx_InBases(a, b); | |
33917 } | |
33918 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { | |
33919 PyObject *mro; | |
33920 if (cls == a || cls == b) return 1; | |
33921 mro = cls->tp_mro; | |
33922 if (likely(mro)) { | |
33923 Py_ssize_t i, n; | |
33924 n = PyTuple_GET_SIZE(mro); | |
33925 for (i = 0; i < n; i++) { | |
33926 PyObject *base = PyTuple_GET_ITEM(mro, i); | |
33927 if (base == (PyObject *)a || base == (PyObject *)b) | |
33928 return 1; | |
33929 } | |
33930 return 0; | |
33931 } | |
33932 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); | |
33933 } | |
33934 #if PY_MAJOR_VERSION == 2 | |
33935 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { | |
33936 PyObject *exception, *value, *tb; | |
33937 int res; | |
33938 __Pyx_PyThreadState_declare | |
33939 __Pyx_PyThreadState_assign | |
33940 __Pyx_ErrFetch(&exception, &value, &tb); | |
33941 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; | |
33942 if (unlikely(res == -1)) { | |
33943 PyErr_WriteUnraisable(err); | |
33944 res = 0; | |
33945 } | |
33946 if (!res) { | |
33947 res = PyObject_IsSubclass(err, exc_type2); | |
33948 if (unlikely(res == -1)) { | |
33949 PyErr_WriteUnraisable(err); | |
33950 res = 0; | |
33951 } | |
33952 } | |
33953 __Pyx_ErrRestore(exception, value, tb); | |
33954 return res; | |
33955 } | |
33956 #else | |
33957 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { | |
33958 if (exc_type1) { | |
33959 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); | |
33960 } else { | |
33961 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); | |
33962 } | |
33963 } | |
33964 #endif | |
33965 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { | |
33966 Py_ssize_t i, n; | |
33967 assert(PyExceptionClass_Check(exc_type)); | |
33968 n = PyTuple_GET_SIZE(tuple); | |
33969 #if PY_MAJOR_VERSION >= 3 | |
33970 for (i=0; i<n; i++) { | |
33971 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1; | |
33972 } | |
33973 #endif | |
33974 for (i=0; i<n; i++) { | |
33975 PyObject *t = PyTuple_GET_ITEM(tuple, i); | |
33976 #if PY_MAJOR_VERSION < 3 | |
33977 if (likely(exc_type == t)) return 1; | |
33978 #endif | |
33979 if (likely(PyExceptionClass_Check(t))) { | |
33980 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1; | |
33981 } else { | |
33982 } | |
33983 } | |
33984 return 0; | |
33985 } | |
33986 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) { | |
33987 if (likely(err == exc_type)) return 1; | |
33988 if (likely(PyExceptionClass_Check(err))) { | |
33989 if (likely(PyExceptionClass_Check(exc_type))) { | |
33990 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type); | |
33991 } else if (likely(PyTuple_Check(exc_type))) { | |
33992 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type); | |
33993 } else { | |
33994 } | |
33995 } | |
33996 return PyErr_GivenExceptionMatches(err, exc_type); | |
33997 } | |
33998 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) { | |
33999 assert(PyExceptionClass_Check(exc_type1)); | |
34000 assert(PyExceptionClass_Check(exc_type2)); | |
34001 if (likely(err == exc_type1 || err == exc_type2)) return 1; | |
34002 if (likely(PyExceptionClass_Check(err))) { | |
34003 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2); | |
34004 } | |
34005 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2)); | |
34006 } | |
34007 #endif | |
34008 | |
34009 /* SwapException */ | |
34010 #if CYTHON_FAST_THREAD_STATE | |
34011 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { | |
34012 PyObject *tmp_type, *tmp_value, *tmp_tb; | |
34013 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 | |
34014 _PyErr_StackItem *exc_info = tstate->exc_info; | |
34015 tmp_value = exc_info->exc_value; | |
34016 exc_info->exc_value = *value; | |
34017 if (tmp_value == NULL || tmp_value == Py_None) { | |
34018 Py_XDECREF(tmp_value); | |
34019 tmp_value = NULL; | |
34020 tmp_type = NULL; | |
34021 tmp_tb = NULL; | |
34022 } else { | |
34023 tmp_type = (PyObject*) Py_TYPE(tmp_value); | |
34024 Py_INCREF(tmp_type); | |
34025 #if CYTHON_COMPILING_IN_CPYTHON | |
34026 tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; | |
34027 Py_XINCREF(tmp_tb); | |
34028 #else | |
34029 tmp_tb = PyException_GetTraceback(tmp_value); | |
34030 #endif | |
34031 } | |
34032 #elif CYTHON_USE_EXC_INFO_STACK | |
34033 _PyErr_StackItem *exc_info = tstate->exc_info; | |
34034 tmp_type = exc_info->exc_type; | |
34035 tmp_value = exc_info->exc_value; | |
34036 tmp_tb = exc_info->exc_traceback; | |
34037 exc_info->exc_type = *type; | |
34038 exc_info->exc_value = *value; | |
34039 exc_info->exc_traceback = *tb; | |
34040 #else | |
34041 tmp_type = tstate->exc_type; | |
34042 tmp_value = tstate->exc_value; | |
34043 tmp_tb = tstate->exc_traceback; | |
34044 tstate->exc_type = *type; | |
34045 tstate->exc_value = *value; | |
34046 tstate->exc_traceback = *tb; | |
34047 #endif | |
34048 *type = tmp_type; | |
34049 *value = tmp_value; | |
34050 *tb = tmp_tb; | |
34051 } | |
34052 #else | |
34053 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { | |
34054 PyObject *tmp_type, *tmp_value, *tmp_tb; | |
34055 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); | |
34056 PyErr_SetExcInfo(*type, *value, *tb); | |
34057 *type = tmp_type; | |
34058 *value = tmp_value; | |
34059 *tb = tmp_tb; | |
34060 } | |
34061 #endif | |
34062 | |
34063 /* CoroutineBase */ | |
34064 #include <frameobject.h> | |
34065 #if PY_VERSION_HEX >= 0x030b00a6 | |
34066 #ifndef Py_BUILD_CORE | |
34067 #define Py_BUILD_CORE 1 | |
34068 #endif | |
34069 #include "internal/pycore_frame.h" | |
34070 #endif | |
34071 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) | |
34072 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) { | |
34073 PyObject *et, *ev, *tb; | |
34074 PyObject *value = NULL; | |
34075 CYTHON_UNUSED_VAR(__pyx_tstate); | |
34076 __Pyx_ErrFetch(&et, &ev, &tb); | |
34077 if (!et) { | |
34078 Py_XDECREF(tb); | |
34079 Py_XDECREF(ev); | |
34080 Py_INCREF(Py_None); | |
34081 *pvalue = Py_None; | |
34082 return 0; | |
34083 } | |
34084 if (likely(et == PyExc_StopIteration)) { | |
34085 if (!ev) { | |
34086 Py_INCREF(Py_None); | |
34087 value = Py_None; | |
34088 } | |
34089 #if PY_VERSION_HEX >= 0x030300A0 | |
34090 else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) { | |
34091 value = ((PyStopIterationObject *)ev)->value; | |
34092 Py_INCREF(value); | |
34093 Py_DECREF(ev); | |
34094 } | |
34095 #endif | |
34096 else if (unlikely(PyTuple_Check(ev))) { | |
34097 if (PyTuple_GET_SIZE(ev) >= 1) { | |
34098 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS | |
34099 value = PyTuple_GET_ITEM(ev, 0); | |
34100 Py_INCREF(value); | |
34101 #else | |
34102 value = PySequence_ITEM(ev, 0); | |
34103 #endif | |
34104 } else { | |
34105 Py_INCREF(Py_None); | |
34106 value = Py_None; | |
34107 } | |
34108 Py_DECREF(ev); | |
34109 } | |
34110 else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { | |
34111 value = ev; | |
34112 } | |
34113 if (likely(value)) { | |
34114 Py_XDECREF(tb); | |
34115 Py_DECREF(et); | |
34116 *pvalue = value; | |
34117 return 0; | |
34118 } | |
34119 } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { | |
34120 __Pyx_ErrRestore(et, ev, tb); | |
34121 return -1; | |
34122 } | |
34123 PyErr_NormalizeException(&et, &ev, &tb); | |
34124 if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { | |
34125 __Pyx_ErrRestore(et, ev, tb); | |
34126 return -1; | |
34127 } | |
34128 Py_XDECREF(tb); | |
34129 Py_DECREF(et); | |
34130 #if PY_VERSION_HEX >= 0x030300A0 | |
34131 value = ((PyStopIterationObject *)ev)->value; | |
34132 Py_INCREF(value); | |
34133 Py_DECREF(ev); | |
34134 #else | |
34135 { | |
34136 PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args); | |
34137 Py_DECREF(ev); | |
34138 if (likely(args)) { | |
34139 value = PySequence_GetItem(args, 0); | |
34140 Py_DECREF(args); | |
34141 } | |
34142 if (unlikely(!value)) { | |
34143 __Pyx_ErrRestore(NULL, NULL, NULL); | |
34144 Py_INCREF(Py_None); | |
34145 value = Py_None; | |
34146 } | |
34147 } | |
34148 #endif | |
34149 *pvalue = value; | |
34150 return 0; | |
34151 } | |
34152 static CYTHON_INLINE | |
34153 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { | |
34154 #if PY_VERSION_HEX >= 0x030B00a4 | |
34155 Py_CLEAR(exc_state->exc_value); | |
34156 #else | |
34157 PyObject *t, *v, *tb; | |
34158 t = exc_state->exc_type; | |
34159 v = exc_state->exc_value; | |
34160 tb = exc_state->exc_traceback; | |
34161 exc_state->exc_type = NULL; | |
34162 exc_state->exc_value = NULL; | |
34163 exc_state->exc_traceback = NULL; | |
34164 Py_XDECREF(t); | |
34165 Py_XDECREF(v); | |
34166 Py_XDECREF(tb); | |
34167 #endif | |
34168 } | |
34169 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) | |
34170 static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) { | |
34171 const char *msg; | |
34172 CYTHON_MAYBE_UNUSED_VAR(gen); | |
34173 if ((0)) { | |
34174 #ifdef __Pyx_Coroutine_USED | |
34175 } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { | |
34176 msg = "coroutine already executing"; | |
34177 #endif | |
34178 #ifdef __Pyx_AsyncGen_USED | |
34179 } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { | |
34180 msg = "async generator already executing"; | |
34181 #endif | |
34182 } else { | |
34183 msg = "generator already executing"; | |
34184 } | |
34185 PyErr_SetString(PyExc_ValueError, msg); | |
34186 } | |
34187 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL) | |
34188 static void __Pyx__Coroutine_NotStartedError(PyObject *gen) { | |
34189 const char *msg; | |
34190 CYTHON_MAYBE_UNUSED_VAR(gen); | |
34191 if ((0)) { | |
34192 #ifdef __Pyx_Coroutine_USED | |
34193 } else if (__Pyx_Coroutine_Check(gen)) { | |
34194 msg = "can't send non-None value to a just-started coroutine"; | |
34195 #endif | |
34196 #ifdef __Pyx_AsyncGen_USED | |
34197 } else if (__Pyx_AsyncGen_CheckExact(gen)) { | |
34198 msg = "can't send non-None value to a just-started async generator"; | |
34199 #endif | |
34200 } else { | |
34201 msg = "can't send non-None value to a just-started generator"; | |
34202 } | |
34203 PyErr_SetString(PyExc_TypeError, msg); | |
34204 } | |
34205 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL) | |
34206 static void __Pyx__Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) { | |
34207 CYTHON_MAYBE_UNUSED_VAR(gen); | |
34208 CYTHON_MAYBE_UNUSED_VAR(closing); | |
34209 #ifdef __Pyx_Coroutine_USED | |
34210 if (!closing && __Pyx_Coroutine_Check(gen)) { | |
34211 PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); | |
34212 } else | |
34213 #endif | |
34214 if (value) { | |
34215 #ifdef __Pyx_AsyncGen_USED | |
34216 if (__Pyx_AsyncGen_CheckExact(gen)) | |
34217 PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration); | |
34218 else | |
34219 #endif | |
34220 PyErr_SetNone(PyExc_StopIteration); | |
34221 } | |
34222 } | |
34223 static | |
34224 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) { | |
34225 __Pyx_PyThreadState_declare | |
34226 PyThreadState *tstate; | |
34227 __Pyx_ExcInfoStruct *exc_state; | |
34228 PyObject *retval; | |
34229 assert(!self->is_running); | |
34230 if (unlikely(self->resume_label == 0)) { | |
34231 if (unlikely(value && value != Py_None)) { | |
34232 return __Pyx_Coroutine_NotStartedError((PyObject*)self); | |
34233 } | |
34234 } | |
34235 if (unlikely(self->resume_label == -1)) { | |
34236 return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); | |
34237 } | |
34238 #if CYTHON_FAST_THREAD_STATE | |
34239 __Pyx_PyThreadState_assign | |
34240 tstate = __pyx_tstate; | |
34241 #else | |
34242 tstate = __Pyx_PyThreadState_Current; | |
34243 #endif | |
34244 exc_state = &self->gi_exc_state; | |
34245 if (exc_state->exc_value) { | |
34246 #if CYTHON_COMPILING_IN_PYPY | |
34247 #else | |
34248 PyObject *exc_tb; | |
34249 #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON | |
34250 exc_tb = PyException_GetTraceback(exc_state->exc_value); | |
34251 #elif PY_VERSION_HEX >= 0x030B00a4 | |
34252 exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback; | |
34253 #else | |
34254 exc_tb = exc_state->exc_traceback; | |
34255 #endif | |
34256 if (exc_tb) { | |
34257 PyTracebackObject *tb = (PyTracebackObject *) exc_tb; | |
34258 PyFrameObject *f = tb->tb_frame; | |
34259 assert(f->f_back == NULL); | |
34260 #if PY_VERSION_HEX >= 0x030B00A1 | |
34261 f->f_back = PyThreadState_GetFrame(tstate); | |
34262 #else | |
34263 Py_XINCREF(tstate->frame); | |
34264 f->f_back = tstate->frame; | |
34265 #endif | |
34266 #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON | |
34267 Py_DECREF(exc_tb); | |
34268 #endif | |
34269 } | |
34270 #endif | |
34271 } | |
34272 #if CYTHON_USE_EXC_INFO_STACK | |
34273 exc_state->previous_item = tstate->exc_info; | |
34274 tstate->exc_info = exc_state; | |
34275 #else | |
34276 if (exc_state->exc_type) { | |
34277 __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); | |
34278 } else { | |
34279 __Pyx_Coroutine_ExceptionClear(exc_state); | |
34280 __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); | |
34281 } | |
34282 #endif | |
34283 self->is_running = 1; | |
34284 retval = self->body(self, tstate, value); | |
34285 self->is_running = 0; | |
34286 #if CYTHON_USE_EXC_INFO_STACK | |
34287 exc_state = &self->gi_exc_state; | |
34288 tstate->exc_info = exc_state->previous_item; | |
34289 exc_state->previous_item = NULL; | |
34290 __Pyx_Coroutine_ResetFrameBackpointer(exc_state); | |
34291 #endif | |
34292 return retval; | |
34293 } | |
34294 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { | |
34295 #if CYTHON_COMPILING_IN_PYPY | |
34296 CYTHON_UNUSED_VAR(exc_state); | |
34297 #else | |
34298 PyObject *exc_tb; | |
34299 #if PY_VERSION_HEX >= 0x030B00a4 | |
34300 if (!exc_state->exc_value) return; | |
34301 exc_tb = PyException_GetTraceback(exc_state->exc_value); | |
34302 #else | |
34303 exc_tb = exc_state->exc_traceback; | |
34304 #endif | |
34305 if (likely(exc_tb)) { | |
34306 PyTracebackObject *tb = (PyTracebackObject *) exc_tb; | |
34307 PyFrameObject *f = tb->tb_frame; | |
34308 Py_CLEAR(f->f_back); | |
34309 #if PY_VERSION_HEX >= 0x030B00a4 | |
34310 Py_DECREF(exc_tb); | |
34311 #endif | |
34312 } | |
34313 #endif | |
34314 } | |
34315 static CYTHON_INLINE | |
34316 PyObject *__Pyx_Coroutine_MethodReturn(PyObject* gen, PyObject *retval) { | |
34317 CYTHON_MAYBE_UNUSED_VAR(gen); | |
34318 if (unlikely(!retval)) { | |
34319 __Pyx_PyThreadState_declare | |
34320 __Pyx_PyThreadState_assign | |
34321 if (!__Pyx_PyErr_Occurred()) { | |
34322 PyObject *exc = PyExc_StopIteration; | |
34323 #ifdef __Pyx_AsyncGen_USED | |
34324 if (__Pyx_AsyncGen_CheckExact(gen)) | |
34325 exc = __Pyx_PyExc_StopAsyncIteration; | |
34326 #endif | |
34327 __Pyx_PyErr_SetNone(exc); | |
34328 } | |
34329 } | |
34330 return retval; | |
34331 } | |
34332 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) | |
34333 static CYTHON_INLINE | |
34334 PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { | |
34335 #if PY_VERSION_HEX <= 0x030A00A1 | |
34336 return _PyGen_Send(gen, arg); | |
34337 #else | |
34338 PyObject *result; | |
34339 if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { | |
34340 if (PyAsyncGen_CheckExact(gen)) { | |
34341 assert(result == Py_None); | |
34342 PyErr_SetNone(PyExc_StopAsyncIteration); | |
34343 } | |
34344 else if (result == Py_None) { | |
34345 PyErr_SetNone(PyExc_StopIteration); | |
34346 } | |
34347 else { | |
34348 #if PY_VERSION_HEX < 0x030d00A1 | |
34349 _PyGen_SetStopIterationValue(result); | |
34350 #else | |
34351 if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { | |
34352 PyErr_SetObject(PyExc_StopIteration, result); | |
34353 } else { | |
34354 PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); | |
34355 if (likely(exc != NULL)) { | |
34356 PyErr_SetObject(PyExc_StopIteration, exc); | |
34357 Py_DECREF(exc); | |
34358 } | |
34359 } | |
34360 #endif | |
34361 } | |
34362 Py_DECREF(result); | |
34363 result = NULL; | |
34364 } | |
34365 return result; | |
34366 #endif | |
34367 } | |
34368 #endif | |
34369 static CYTHON_INLINE | |
34370 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { | |
34371 PyObject *ret; | |
34372 PyObject *val = NULL; | |
34373 __Pyx_Coroutine_Undelegate(gen); | |
34374 __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); | |
34375 ret = __Pyx_Coroutine_SendEx(gen, val, 0); | |
34376 Py_XDECREF(val); | |
34377 return ret; | |
34378 } | |
34379 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { | |
34380 PyObject *retval; | |
34381 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; | |
34382 PyObject *yf = gen->yieldfrom; | |
34383 if (unlikely(gen->is_running)) | |
34384 return __Pyx_Coroutine_AlreadyRunningError(gen); | |
34385 if (yf) { | |
34386 PyObject *ret; | |
34387 gen->is_running = 1; | |
34388 #ifdef __Pyx_Generator_USED | |
34389 if (__Pyx_Generator_CheckExact(yf)) { | |
34390 ret = __Pyx_Coroutine_Send(yf, value); | |
34391 } else | |
34392 #endif | |
34393 #ifdef __Pyx_Coroutine_USED | |
34394 if (__Pyx_Coroutine_Check(yf)) { | |
34395 ret = __Pyx_Coroutine_Send(yf, value); | |
34396 } else | |
34397 #endif | |
34398 #ifdef __Pyx_AsyncGen_USED | |
34399 if (__pyx_PyAsyncGenASend_CheckExact(yf)) { | |
34400 ret = __Pyx_async_gen_asend_send(yf, value); | |
34401 } else | |
34402 #endif | |
34403 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) | |
34404 if (PyGen_CheckExact(yf)) { | |
34405 ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); | |
34406 } else | |
34407 #endif | |
34408 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) | |
34409 if (PyCoro_CheckExact(yf)) { | |
34410 ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); | |
34411 } else | |
34412 #endif | |
34413 { | |
34414 if (value == Py_None) | |
34415 ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf); | |
34416 else | |
34417 ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); | |
34418 } | |
34419 gen->is_running = 0; | |
34420 if (likely(ret)) { | |
34421 return ret; | |
34422 } | |
34423 retval = __Pyx_Coroutine_FinishDelegation(gen); | |
34424 } else { | |
34425 retval = __Pyx_Coroutine_SendEx(gen, value, 0); | |
34426 } | |
34427 return __Pyx_Coroutine_MethodReturn(self, retval); | |
34428 } | |
34429 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { | |
34430 PyObject *retval = NULL; | |
34431 int err = 0; | |
34432 #ifdef __Pyx_Generator_USED | |
34433 if (__Pyx_Generator_CheckExact(yf)) { | |
34434 retval = __Pyx_Coroutine_Close(yf); | |
34435 if (!retval) | |
34436 return -1; | |
34437 } else | |
34438 #endif | |
34439 #ifdef __Pyx_Coroutine_USED | |
34440 if (__Pyx_Coroutine_Check(yf)) { | |
34441 retval = __Pyx_Coroutine_Close(yf); | |
34442 if (!retval) | |
34443 return -1; | |
34444 } else | |
34445 if (__Pyx_CoroutineAwait_CheckExact(yf)) { | |
34446 retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL); | |
34447 if (!retval) | |
34448 return -1; | |
34449 } else | |
34450 #endif | |
34451 #ifdef __Pyx_AsyncGen_USED | |
34452 if (__pyx_PyAsyncGenASend_CheckExact(yf)) { | |
34453 retval = __Pyx_async_gen_asend_close(yf, NULL); | |
34454 } else | |
34455 if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { | |
34456 retval = __Pyx_async_gen_athrow_close(yf, NULL); | |
34457 } else | |
34458 #endif | |
34459 { | |
34460 PyObject *meth; | |
34461 gen->is_running = 1; | |
34462 meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_close); | |
34463 if (unlikely(!meth)) { | |
34464 if (unlikely(PyErr_Occurred())) { | |
34465 PyErr_WriteUnraisable(yf); | |
34466 } | |
34467 } else { | |
34468 retval = __Pyx_PyObject_CallNoArg(meth); | |
34469 Py_DECREF(meth); | |
34470 if (unlikely(!retval)) | |
34471 err = -1; | |
34472 } | |
34473 gen->is_running = 0; | |
34474 } | |
34475 Py_XDECREF(retval); | |
34476 return err; | |
34477 } | |
34478 static PyObject *__Pyx_Generator_Next(PyObject *self) { | |
34479 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; | |
34480 PyObject *yf = gen->yieldfrom; | |
34481 if (unlikely(gen->is_running)) | |
34482 return __Pyx_Coroutine_AlreadyRunningError(gen); | |
34483 if (yf) { | |
34484 PyObject *ret; | |
34485 gen->is_running = 1; | |
34486 #ifdef __Pyx_Generator_USED | |
34487 if (__Pyx_Generator_CheckExact(yf)) { | |
34488 ret = __Pyx_Generator_Next(yf); | |
34489 } else | |
34490 #endif | |
34491 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) | |
34492 if (PyGen_CheckExact(yf)) { | |
34493 ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); | |
34494 } else | |
34495 #endif | |
34496 #ifdef __Pyx_Coroutine_USED | |
34497 if (__Pyx_Coroutine_Check(yf)) { | |
34498 ret = __Pyx_Coroutine_Send(yf, Py_None); | |
34499 } else | |
34500 #endif | |
34501 ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf); | |
34502 gen->is_running = 0; | |
34503 if (likely(ret)) { | |
34504 return ret; | |
34505 } | |
34506 return __Pyx_Coroutine_FinishDelegation(gen); | |
34507 } | |
34508 return __Pyx_Coroutine_SendEx(gen, Py_None, 0); | |
34509 } | |
34510 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) { | |
34511 CYTHON_UNUSED_VAR(arg); | |
34512 return __Pyx_Coroutine_Close(self); | |
34513 } | |
34514 static PyObject *__Pyx_Coroutine_Close(PyObject *self) { | |
34515 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; | |
34516 PyObject *retval, *raised_exception; | |
34517 PyObject *yf = gen->yieldfrom; | |
34518 int err = 0; | |
34519 if (unlikely(gen->is_running)) | |
34520 return __Pyx_Coroutine_AlreadyRunningError(gen); | |
34521 if (yf) { | |
34522 Py_INCREF(yf); | |
34523 err = __Pyx_Coroutine_CloseIter(gen, yf); | |
34524 __Pyx_Coroutine_Undelegate(gen); | |
34525 Py_DECREF(yf); | |
34526 } | |
34527 if (err == 0) | |
34528 PyErr_SetNone(PyExc_GeneratorExit); | |
34529 retval = __Pyx_Coroutine_SendEx(gen, NULL, 1); | |
34530 if (unlikely(retval)) { | |
34531 const char *msg; | |
34532 Py_DECREF(retval); | |
34533 if ((0)) { | |
34534 #ifdef __Pyx_Coroutine_USED | |
34535 } else if (__Pyx_Coroutine_Check(self)) { | |
34536 msg = "coroutine ignored GeneratorExit"; | |
34537 #endif | |
34538 #ifdef __Pyx_AsyncGen_USED | |
34539 } else if (__Pyx_AsyncGen_CheckExact(self)) { | |
34540 #if PY_VERSION_HEX < 0x03060000 | |
34541 msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)"; | |
34542 #else | |
34543 msg = "async generator ignored GeneratorExit"; | |
34544 #endif | |
34545 #endif | |
34546 } else { | |
34547 msg = "generator ignored GeneratorExit"; | |
34548 } | |
34549 PyErr_SetString(PyExc_RuntimeError, msg); | |
34550 return NULL; | |
34551 } | |
34552 raised_exception = PyErr_Occurred(); | |
34553 if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) { | |
34554 if (raised_exception) PyErr_Clear(); | |
34555 Py_INCREF(Py_None); | |
34556 return Py_None; | |
34557 } | |
34558 return NULL; | |
34559 } | |
34560 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, | |
34561 PyObject *args, int close_on_genexit) { | |
34562 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; | |
34563 PyObject *yf = gen->yieldfrom; | |
34564 if (unlikely(gen->is_running)) | |
34565 return __Pyx_Coroutine_AlreadyRunningError(gen); | |
34566 if (yf) { | |
34567 PyObject *ret; | |
34568 Py_INCREF(yf); | |
34569 if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { | |
34570 int err = __Pyx_Coroutine_CloseIter(gen, yf); | |
34571 Py_DECREF(yf); | |
34572 __Pyx_Coroutine_Undelegate(gen); | |
34573 if (err < 0) | |
34574 return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); | |
34575 goto throw_here; | |
34576 } | |
34577 gen->is_running = 1; | |
34578 if (0 | |
34579 #ifdef __Pyx_Generator_USED | |
34580 || __Pyx_Generator_CheckExact(yf) | |
34581 #endif | |
34582 #ifdef __Pyx_Coroutine_USED | |
34583 || __Pyx_Coroutine_Check(yf) | |
34584 #endif | |
34585 ) { | |
34586 ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); | |
34587 #ifdef __Pyx_Coroutine_USED | |
34588 } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { | |
34589 ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); | |
34590 #endif | |
34591 } else { | |
34592 PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_throw); | |
34593 if (unlikely(!meth)) { | |
34594 Py_DECREF(yf); | |
34595 if (unlikely(PyErr_Occurred())) { | |
34596 gen->is_running = 0; | |
34597 return NULL; | |
34598 } | |
34599 __Pyx_Coroutine_Undelegate(gen); | |
34600 gen->is_running = 0; | |
34601 goto throw_here; | |
34602 } | |
34603 if (likely(args)) { | |
34604 ret = __Pyx_PyObject_Call(meth, args, NULL); | |
34605 } else { | |
34606 PyObject *cargs[4] = {NULL, typ, val, tb}; | |
34607 ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); | |
34608 } | |
34609 Py_DECREF(meth); | |
34610 } | |
34611 gen->is_running = 0; | |
34612 Py_DECREF(yf); | |
34613 if (!ret) { | |
34614 ret = __Pyx_Coroutine_FinishDelegation(gen); | |
34615 } | |
34616 return __Pyx_Coroutine_MethodReturn(self, ret); | |
34617 } | |
34618 throw_here: | |
34619 __Pyx_Raise(typ, val, tb, NULL); | |
34620 return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); | |
34621 } | |
34622 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { | |
34623 PyObject *typ; | |
34624 PyObject *val = NULL; | |
34625 PyObject *tb = NULL; | |
34626 if (unlikely(!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))) | |
34627 return NULL; | |
34628 return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); | |
34629 } | |
34630 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { | |
34631 #if PY_VERSION_HEX >= 0x030B00a4 | |
34632 Py_VISIT(exc_state->exc_value); | |
34633 #else | |
34634 Py_VISIT(exc_state->exc_type); | |
34635 Py_VISIT(exc_state->exc_value); | |
34636 Py_VISIT(exc_state->exc_traceback); | |
34637 #endif | |
34638 return 0; | |
34639 } | |
34640 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { | |
34641 Py_VISIT(gen->closure); | |
34642 Py_VISIT(gen->classobj); | |
34643 Py_VISIT(gen->yieldfrom); | |
34644 return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); | |
34645 } | |
34646 static int __Pyx_Coroutine_clear(PyObject *self) { | |
34647 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; | |
34648 Py_CLEAR(gen->closure); | |
34649 Py_CLEAR(gen->classobj); | |
34650 Py_CLEAR(gen->yieldfrom); | |
34651 __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); | |
34652 #ifdef __Pyx_AsyncGen_USED | |
34653 if (__Pyx_AsyncGen_CheckExact(self)) { | |
34654 Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); | |
34655 } | |
34656 #endif | |
34657 Py_CLEAR(gen->gi_code); | |
34658 Py_CLEAR(gen->gi_frame); | |
34659 Py_CLEAR(gen->gi_name); | |
34660 Py_CLEAR(gen->gi_qualname); | |
34661 Py_CLEAR(gen->gi_modulename); | |
34662 return 0; | |
34663 } | |
34664 static void __Pyx_Coroutine_dealloc(PyObject *self) { | |
34665 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; | |
34666 PyObject_GC_UnTrack(gen); | |
34667 if (gen->gi_weakreflist != NULL) | |
34668 PyObject_ClearWeakRefs(self); | |
34669 if (gen->resume_label >= 0) { | |
34670 PyObject_GC_Track(self); | |
34671 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE | |
34672 if (unlikely(PyObject_CallFinalizerFromDealloc(self))) | |
34673 #else | |
34674 Py_TYPE(gen)->tp_del(self); | |
34675 if (unlikely(Py_REFCNT(self) > 0)) | |
34676 #endif | |
34677 { | |
34678 return; | |
34679 } | |
34680 PyObject_GC_UnTrack(self); | |
34681 } | |
34682 #ifdef __Pyx_AsyncGen_USED | |
34683 if (__Pyx_AsyncGen_CheckExact(self)) { | |
34684 /* We have to handle this case for asynchronous generators | |
34685 right here, because this code has to be between UNTRACK | |
34686 and GC_Del. */ | |
34687 Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); | |
34688 } | |
34689 #endif | |
34690 __Pyx_Coroutine_clear(self); | |
34691 __Pyx_PyHeapTypeObject_GC_Del(gen); | |
34692 } | |
34693 static void __Pyx_Coroutine_del(PyObject *self) { | |
34694 PyObject *error_type, *error_value, *error_traceback; | |
34695 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; | |
34696 __Pyx_PyThreadState_declare | |
34697 if (gen->resume_label < 0) { | |
34698 return; | |
34699 } | |
34700 #if !CYTHON_USE_TP_FINALIZE | |
34701 assert(self->ob_refcnt == 0); | |
34702 __Pyx_SET_REFCNT(self, 1); | |
34703 #endif | |
34704 __Pyx_PyThreadState_assign | |
34705 __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); | |
34706 #ifdef __Pyx_AsyncGen_USED | |
34707 if (__Pyx_AsyncGen_CheckExact(self)) { | |
34708 __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; | |
34709 PyObject *finalizer = agen->ag_finalizer; | |
34710 if (finalizer && !agen->ag_closed) { | |
34711 PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); | |
34712 if (unlikely(!res)) { | |
34713 PyErr_WriteUnraisable(self); | |
34714 } else { | |
34715 Py_DECREF(res); | |
34716 } | |
34717 __Pyx_ErrRestore(error_type, error_value, error_traceback); | |
34718 return; | |
34719 } | |
34720 } | |
34721 #endif | |
34722 if (unlikely(gen->resume_label == 0 && !error_value)) { | |
34723 #ifdef __Pyx_Coroutine_USED | |
34724 #ifdef __Pyx_Generator_USED | |
34725 if (!__Pyx_Generator_CheckExact(self)) | |
34726 #endif | |
34727 { | |
34728 PyObject_GC_UnTrack(self); | |
34729 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat) | |
34730 if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) | |
34731 PyErr_WriteUnraisable(self); | |
34732 #else | |
34733 {PyObject *msg; | |
34734 char *cmsg; | |
34735 #if CYTHON_COMPILING_IN_PYPY | |
34736 msg = NULL; | |
34737 cmsg = (char*) "coroutine was never awaited"; | |
34738 #else | |
34739 char *cname; | |
34740 PyObject *qualname; | |
34741 qualname = gen->gi_qualname; | |
34742 cname = PyString_AS_STRING(qualname); | |
34743 msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname); | |
34744 if (unlikely(!msg)) { | |
34745 PyErr_Clear(); | |
34746 cmsg = (char*) "coroutine was never awaited"; | |
34747 } else { | |
34748 cmsg = PyString_AS_STRING(msg); | |
34749 } | |
34750 #endif | |
34751 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0)) | |
34752 PyErr_WriteUnraisable(self); | |
34753 Py_XDECREF(msg);} | |
34754 #endif | |
34755 PyObject_GC_Track(self); | |
34756 } | |
34757 #endif | |
34758 } else { | |
34759 PyObject *res = __Pyx_Coroutine_Close(self); | |
34760 if (unlikely(!res)) { | |
34761 if (PyErr_Occurred()) | |
34762 PyErr_WriteUnraisable(self); | |
34763 } else { | |
34764 Py_DECREF(res); | |
34765 } | |
34766 } | |
34767 __Pyx_ErrRestore(error_type, error_value, error_traceback); | |
34768 #if !CYTHON_USE_TP_FINALIZE | |
34769 assert(Py_REFCNT(self) > 0); | |
34770 if (likely(--self->ob_refcnt == 0)) { | |
34771 return; | |
34772 } | |
34773 { | |
34774 Py_ssize_t refcnt = Py_REFCNT(self); | |
34775 _Py_NewReference(self); | |
34776 __Pyx_SET_REFCNT(self, refcnt); | |
34777 } | |
34778 #if CYTHON_COMPILING_IN_CPYTHON | |
34779 assert(PyType_IS_GC(Py_TYPE(self)) && | |
34780 _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); | |
34781 _Py_DEC_REFTOTAL; | |
34782 #endif | |
34783 #ifdef COUNT_ALLOCS | |
34784 --Py_TYPE(self)->tp_frees; | |
34785 --Py_TYPE(self)->tp_allocs; | |
34786 #endif | |
34787 #endif | |
34788 } | |
34789 static PyObject * | |
34790 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context) | |
34791 { | |
34792 PyObject *name = self->gi_name; | |
34793 CYTHON_UNUSED_VAR(context); | |
34794 if (unlikely(!name)) name = Py_None; | |
34795 Py_INCREF(name); | |
34796 return name; | |
34797 } | |
34798 static int | |
34799 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context) | |
34800 { | |
34801 CYTHON_UNUSED_VAR(context); | |
34802 #if PY_MAJOR_VERSION >= 3 | |
34803 if (unlikely(value == NULL || !PyUnicode_Check(value))) | |
34804 #else | |
34805 if (unlikely(value == NULL || !PyString_Check(value))) | |
34806 #endif | |
34807 { | |
34808 PyErr_SetString(PyExc_TypeError, | |
34809 "__name__ must be set to a string object"); | |
34810 return -1; | |
34811 } | |
34812 Py_INCREF(value); | |
34813 __Pyx_Py_XDECREF_SET(self->gi_name, value); | |
34814 return 0; | |
34815 } | |
34816 static PyObject * | |
34817 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context) | |
34818 { | |
34819 PyObject *name = self->gi_qualname; | |
34820 CYTHON_UNUSED_VAR(context); | |
34821 if (unlikely(!name)) name = Py_None; | |
34822 Py_INCREF(name); | |
34823 return name; | |
34824 } | |
34825 static int | |
34826 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context) | |
34827 { | |
34828 CYTHON_UNUSED_VAR(context); | |
34829 #if PY_MAJOR_VERSION >= 3 | |
34830 if (unlikely(value == NULL || !PyUnicode_Check(value))) | |
34831 #else | |
34832 if (unlikely(value == NULL || !PyString_Check(value))) | |
34833 #endif | |
34834 { | |
34835 PyErr_SetString(PyExc_TypeError, | |
34836 "__qualname__ must be set to a string object"); | |
34837 return -1; | |
34838 } | |
34839 Py_INCREF(value); | |
34840 __Pyx_Py_XDECREF_SET(self->gi_qualname, value); | |
34841 return 0; | |
34842 } | |
34843 static PyObject * | |
34844 __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) | |
34845 { | |
34846 PyObject *frame = self->gi_frame; | |
34847 CYTHON_UNUSED_VAR(context); | |
34848 if (!frame) { | |
34849 if (unlikely(!self->gi_code)) { | |
34850 Py_RETURN_NONE; | |
34851 } | |
34852 frame = (PyObject *) PyFrame_New( | |
34853 PyThreadState_Get(), /*PyThreadState *tstate,*/ | |
34854 (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ | |
34855 __pyx_d, /*PyObject *globals,*/ | |
34856 0 /*PyObject *locals*/ | |
34857 ); | |
34858 if (unlikely(!frame)) | |
34859 return NULL; | |
34860 self->gi_frame = frame; | |
34861 } | |
34862 Py_INCREF(frame); | |
34863 return frame; | |
34864 } | |
34865 static __pyx_CoroutineObject *__Pyx__Coroutine_New( | |
34866 PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, | |
34867 PyObject *name, PyObject *qualname, PyObject *module_name) { | |
34868 __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); | |
34869 if (unlikely(!gen)) | |
34870 return NULL; | |
34871 return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); | |
34872 } | |
34873 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( | |
34874 __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, | |
34875 PyObject *name, PyObject *qualname, PyObject *module_name) { | |
34876 gen->body = body; | |
34877 gen->closure = closure; | |
34878 Py_XINCREF(closure); | |
34879 gen->is_running = 0; | |
34880 gen->resume_label = 0; | |
34881 gen->classobj = NULL; | |
34882 gen->yieldfrom = NULL; | |
34883 #if PY_VERSION_HEX >= 0x030B00a4 | |
34884 gen->gi_exc_state.exc_value = NULL; | |
34885 #else | |
34886 gen->gi_exc_state.exc_type = NULL; | |
34887 gen->gi_exc_state.exc_value = NULL; | |
34888 gen->gi_exc_state.exc_traceback = NULL; | |
34889 #endif | |
34890 #if CYTHON_USE_EXC_INFO_STACK | |
34891 gen->gi_exc_state.previous_item = NULL; | |
34892 #endif | |
34893 gen->gi_weakreflist = NULL; | |
34894 Py_XINCREF(qualname); | |
34895 gen->gi_qualname = qualname; | |
34896 Py_XINCREF(name); | |
34897 gen->gi_name = name; | |
34898 Py_XINCREF(module_name); | |
34899 gen->gi_modulename = module_name; | |
34900 Py_XINCREF(code); | |
34901 gen->gi_code = code; | |
34902 gen->gi_frame = NULL; | |
34903 PyObject_GC_Track(gen); | |
34904 return gen; | |
34905 } | |
34906 | |
34907 /* PatchModuleWithCoroutine */ | |
34908 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { | |
34909 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) | |
34910 int result; | |
34911 PyObject *globals, *result_obj; | |
34912 globals = PyDict_New(); if (unlikely(!globals)) goto ignore; | |
34913 result = PyDict_SetItemString(globals, "_cython_coroutine_type", | |
34914 #ifdef __Pyx_Coroutine_USED | |
34915 (PyObject*)__pyx_CoroutineType); | |
34916 #else | |
34917 Py_None); | |
34918 #endif | |
34919 if (unlikely(result < 0)) goto ignore; | |
34920 result = PyDict_SetItemString(globals, "_cython_generator_type", | |
34921 #ifdef __Pyx_Generator_USED | |
34922 (PyObject*)__pyx_GeneratorType); | |
34923 #else | |
34924 Py_None); | |
34925 #endif | |
34926 if (unlikely(result < 0)) goto ignore; | |
34927 if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; | |
34928 if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore; | |
34929 result_obj = PyRun_String(py_code, Py_file_input, globals, globals); | |
34930 if (unlikely(!result_obj)) goto ignore; | |
34931 Py_DECREF(result_obj); | |
34932 Py_DECREF(globals); | |
34933 return module; | |
34934 ignore: | |
34935 Py_XDECREF(globals); | |
34936 PyErr_WriteUnraisable(module); | |
34937 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { | |
34938 Py_DECREF(module); | |
34939 module = NULL; | |
34940 } | |
34941 #else | |
34942 py_code++; | |
34943 #endif | |
34944 return module; | |
34945 } | |
34946 | |
34947 /* PatchGeneratorABC */ | |
34948 #ifndef CYTHON_REGISTER_ABCS | |
34949 #define CYTHON_REGISTER_ABCS 1 | |
34950 #endif | |
34951 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) | |
34952 static PyObject* __Pyx_patch_abc_module(PyObject *module); | |
34953 static PyObject* __Pyx_patch_abc_module(PyObject *module) { | |
34954 module = __Pyx_Coroutine_patch_module( | |
34955 module, "" | |
34956 "if _cython_generator_type is not None:\n" | |
34957 " try: Generator = _module.Generator\n" | |
34958 " except AttributeError: pass\n" | |
34959 " else: Generator.register(_cython_generator_type)\n" | |
34960 "if _cython_coroutine_type is not None:\n" | |
34961 " try: Coroutine = _module.Coroutine\n" | |
34962 " except AttributeError: pass\n" | |
34963 " else: Coroutine.register(_cython_coroutine_type)\n" | |
34964 ); | |
34965 return module; | |
34966 } | |
34967 #endif | |
34968 static int __Pyx_patch_abc(void) { | |
34969 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) | |
34970 static int abc_patched = 0; | |
34971 if (CYTHON_REGISTER_ABCS && !abc_patched) { | |
34972 PyObject *module; | |
34973 module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections"); | |
34974 if (unlikely(!module)) { | |
34975 PyErr_WriteUnraisable(NULL); | |
34976 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, | |
34977 ((PY_MAJOR_VERSION >= 3) ? | |
34978 "Cython module failed to register with collections.abc module" : | |
34979 "Cython module failed to register with collections module"), 1) < 0)) { | |
34980 return -1; | |
34981 } | |
34982 } else { | |
34983 module = __Pyx_patch_abc_module(module); | |
34984 abc_patched = 1; | |
34985 if (unlikely(!module)) | |
34986 return -1; | |
34987 Py_DECREF(module); | |
34988 } | |
34989 module = PyImport_ImportModule("backports_abc"); | |
34990 if (module) { | |
34991 module = __Pyx_patch_abc_module(module); | |
34992 Py_XDECREF(module); | |
34993 } | |
34994 if (!module) { | |
34995 PyErr_Clear(); | |
34996 } | |
34997 } | |
34998 #else | |
34999 if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL); | |
35000 #endif | |
35001 return 0; | |
35002 } | |
35003 | |
35004 /* Generator */ | |
35005 static PyMethodDef __pyx_Generator_methods[] = { | |
35006 {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, | |
35007 (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, | |
35008 {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, | |
35009 (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, | |
35010 {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, | |
35011 (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, | |
35012 {0, 0, 0, 0} | |
35013 }; | |
35014 static PyMemberDef __pyx_Generator_memberlist[] = { | |
35015 {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, | |
35016 {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, | |
35017 (char*) PyDoc_STR("object being iterated by 'yield from', or None")}, | |
35018 {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, | |
35019 {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0}, | |
35020 #if CYTHON_USE_TYPE_SPECS | |
35021 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0}, | |
35022 #endif | |
35023 {0, 0, 0, 0, 0} | |
35024 }; | |
35025 static PyGetSetDef __pyx_Generator_getsets[] = { | |
35026 {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, | |
35027 (char*) PyDoc_STR("name of the generator"), 0}, | |
35028 {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, | |
35029 (char*) PyDoc_STR("qualified name of the generator"), 0}, | |
35030 {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, | |
35031 (char*) PyDoc_STR("Frame of the generator"), 0}, | |
35032 {0, 0, 0, 0, 0} | |
35033 }; | |
35034 #if CYTHON_USE_TYPE_SPECS | |
35035 static PyType_Slot __pyx_GeneratorType_slots[] = { | |
35036 {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc}, | |
35037 {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse}, | |
35038 {Py_tp_iter, (void *)PyObject_SelfIter}, | |
35039 {Py_tp_iternext, (void *)__Pyx_Generator_Next}, | |
35040 {Py_tp_methods, (void *)__pyx_Generator_methods}, | |
35041 {Py_tp_members, (void *)__pyx_Generator_memberlist}, | |
35042 {Py_tp_getset, (void *)__pyx_Generator_getsets}, | |
35043 {Py_tp_getattro, (void *) __Pyx_PyObject_GenericGetAttrNoDict}, | |
35044 #if CYTHON_USE_TP_FINALIZE | |
35045 {Py_tp_finalize, (void *)__Pyx_Coroutine_del}, | |
35046 #endif | |
35047 {0, 0}, | |
35048 }; | |
35049 static PyType_Spec __pyx_GeneratorType_spec = { | |
35050 __PYX_TYPE_MODULE_PREFIX "generator", | |
35051 sizeof(__pyx_CoroutineObject), | |
35052 0, | |
35053 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, | |
35054 __pyx_GeneratorType_slots | |
35055 }; | |
35056 #else | |
35057 static PyTypeObject __pyx_GeneratorType_type = { | |
35058 PyVarObject_HEAD_INIT(0, 0) | |
35059 __PYX_TYPE_MODULE_PREFIX "generator", | |
35060 sizeof(__pyx_CoroutineObject), | |
35061 0, | |
35062 (destructor) __Pyx_Coroutine_dealloc, | |
35063 0, | |
35064 0, | |
35065 0, | |
35066 0, | |
35067 0, | |
35068 0, | |
35069 0, | |
35070 0, | |
35071 0, | |
35072 0, | |
35073 0, | |
35074 0, | |
35075 0, | |
35076 0, | |
35077 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, | |
35078 0, | |
35079 (traverseproc) __Pyx_Coroutine_traverse, | |
35080 0, | |
35081 0, | |
35082 offsetof(__pyx_CoroutineObject, gi_weakreflist), | |
35083 0, | |
35084 (iternextfunc) __Pyx_Generator_Next, | |
35085 __pyx_Generator_methods, | |
35086 __pyx_Generator_memberlist, | |
35087 __pyx_Generator_getsets, | |
35088 0, | |
35089 0, | |
35090 0, | |
35091 0, | |
35092 0, | |
35093 0, | |
35094 0, | |
35095 0, | |
35096 0, | |
35097 0, | |
35098 0, | |
35099 0, | |
35100 0, | |
35101 0, | |
35102 0, | |
35103 #if CYTHON_USE_TP_FINALIZE | |
35104 0, | |
35105 #else | |
35106 __Pyx_Coroutine_del, | |
35107 #endif | |
35108 0, | |
35109 #if CYTHON_USE_TP_FINALIZE | |
35110 __Pyx_Coroutine_del, | |
35111 #elif PY_VERSION_HEX >= 0x030400a1 | |
35112 0, | |
35113 #endif | |
35114 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) | |
35115 0, | |
35116 #endif | |
35117 #if __PYX_NEED_TP_PRINT_SLOT | |
35118 0, | |
35119 #endif | |
35120 #if PY_VERSION_HEX >= 0x030C0000 | |
35121 0, | |
35122 #endif | |
35123 #if PY_VERSION_HEX >= 0x030d00A4 | |
35124 0, | |
35125 #endif | |
35126 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 | |
35127 0, | |
35128 #endif | |
35129 }; | |
35130 #endif | |
35131 static int __pyx_Generator_init(PyObject *module) { | |
35132 #if CYTHON_USE_TYPE_SPECS | |
35133 __pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_GeneratorType_spec, NULL); | |
35134 #else | |
35135 CYTHON_UNUSED_VAR(module); | |
35136 __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; | |
35137 __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; | |
35138 __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); | |
35139 #endif | |
35140 if (unlikely(!__pyx_GeneratorType)) { | |
35141 return -1; | |
35142 } | |
35143 return 0; | |
35144 } | |
35145 | |
35146 /* CheckBinaryVersion */ | |
35147 static unsigned long __Pyx_get_runtime_version(void) { | |
35148 #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 | |
35149 return Py_Version & ~0xFFUL; | |
35150 #else | |
35151 const char* rt_version = Py_GetVersion(); | |
35152 unsigned long version = 0; | |
35153 unsigned long factor = 0x01000000UL; | |
35154 unsigned int digit = 0; | |
35155 int i = 0; | |
35156 while (factor) { | |
35157 while ('0' <= rt_version[i] && rt_version[i] <= '9') { | |
35158 digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); | |
35159 ++i; | |
35160 } | |
35161 version += factor * digit; | |
35162 if (rt_version[i] != '.') | |
35163 break; | |
35164 digit = 0; | |
35165 factor >>= 8; | |
35166 ++i; | |
35167 } | |
35168 return version; | |
35169 #endif | |
35170 } | |
35171 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { | |
35172 const unsigned long MAJOR_MINOR = 0xFFFF0000UL; | |
35173 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) | |
35174 return 0; | |
35175 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) | |
35176 return 1; | |
35177 { | |
35178 char message[200]; | |
35179 PyOS_snprintf(message, sizeof(message), | |
35180 "compile time Python version %d.%d " | |
35181 "of module '%.100s' " | |
35182 "%s " | |
35183 "runtime version %d.%d", | |
35184 (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), | |
35185 __Pyx_MODULE_NAME, | |
35186 (allow_newer) ? "was newer than" : "does not match", | |
35187 (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) | |
35188 ); | |
35189 return PyErr_WarnEx(NULL, message, 1); | |
35190 } | |
35191 } | |
35192 | |
35193 /* FunctionImport */ | |
35194 #ifndef __PYX_HAVE_RT_ImportFunction_3_0_11 | |
35195 #define __PYX_HAVE_RT_ImportFunction_3_0_11 | |
35196 static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { | |
35197 PyObject *d = 0; | |
35198 PyObject *cobj = 0; | |
35199 union { | |
35200 void (*fp)(void); | |
35201 void *p; | |
35202 } tmp; | |
35203 d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); | |
35204 if (!d) | |
35205 goto bad; | |
35206 cobj = PyDict_GetItemString(d, funcname); | |
35207 if (!cobj) { | |
35208 PyErr_Format(PyExc_ImportError, | |
35209 "%.200s does not export expected C function %.200s", | |
35210 PyModule_GetName(module), funcname); | |
35211 goto bad; | |
35212 } | |
35213 if (!PyCapsule_IsValid(cobj, sig)) { | |
35214 PyErr_Format(PyExc_TypeError, | |
35215 "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", | |
35216 PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); | |
35217 goto bad; | |
35218 } | |
35219 tmp.p = PyCapsule_GetPointer(cobj, sig); | |
35220 *f = tmp.fp; | |
35221 if (!(*f)) | |
35222 goto bad; | |
35223 Py_DECREF(d); | |
35224 return 0; | |
35225 bad: | |
35226 Py_XDECREF(d); | |
35227 return -1; | |
35228 } | |
35229 #endif | |
35230 | |
35231 /* InitStrings */ | |
35232 #if PY_MAJOR_VERSION >= 3 | |
35233 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { | |
35234 if (t.is_unicode | t.is_str) { | |
35235 if (t.intern) { | |
35236 *str = PyUnicode_InternFromString(t.s); | |
35237 } else if (t.encoding) { | |
35238 *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); | |
35239 } else { | |
35240 *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); | |
35241 } | |
35242 } else { | |
35243 *str = PyBytes_FromStringAndSize(t.s, t.n - 1); | |
35244 } | |
35245 if (!*str) | |
35246 return -1; | |
35247 if (PyObject_Hash(*str) == -1) | |
35248 return -1; | |
35249 return 0; | |
35250 } | |
35251 #endif | |
35252 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { | |
35253 while (t->p) { | |
35254 #if PY_MAJOR_VERSION >= 3 | |
35255 __Pyx_InitString(*t, t->p); | |
35256 #else | |
35257 if (t->is_unicode) { | |
35258 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); | |
35259 } else if (t->intern) { | |
35260 *t->p = PyString_InternFromString(t->s); | |
35261 } else { | |
35262 *t->p = PyString_FromStringAndSize(t->s, t->n - 1); | |
35263 } | |
35264 if (!*t->p) | |
35265 return -1; | |
35266 if (PyObject_Hash(*t->p) == -1) | |
35267 return -1; | |
35268 #endif | |
35269 ++t; | |
35270 } | |
35271 return 0; | |
35272 } | |
35273 | |
35274 #include <string.h> | |
35275 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { | |
35276 size_t len = strlen(s); | |
35277 if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { | |
35278 PyErr_SetString(PyExc_OverflowError, "byte string is too long"); | |
35279 return -1; | |
35280 } | |
35281 return (Py_ssize_t) len; | |
35282 } | |
35283 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { | |
35284 Py_ssize_t len = __Pyx_ssize_strlen(c_str); | |
35285 if (unlikely(len < 0)) return NULL; | |
35286 return __Pyx_PyUnicode_FromStringAndSize(c_str, len); | |
35287 } | |
35288 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { | |
35289 Py_ssize_t len = __Pyx_ssize_strlen(c_str); | |
35290 if (unlikely(len < 0)) return NULL; | |
35291 return PyByteArray_FromStringAndSize(c_str, len); | |
35292 } | |
35293 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { | |
35294 Py_ssize_t ignore; | |
35295 return __Pyx_PyObject_AsStringAndSize(o, &ignore); | |
35296 } | |
35297 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT | |
35298 #if !CYTHON_PEP393_ENABLED | |
35299 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { | |
35300 char* defenc_c; | |
35301 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); | |
35302 if (!defenc) return NULL; | |
35303 defenc_c = PyBytes_AS_STRING(defenc); | |
35304 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII | |
35305 { | |
35306 char* end = defenc_c + PyBytes_GET_SIZE(defenc); | |
35307 char* c; | |
35308 for (c = defenc_c; c < end; c++) { | |
35309 if ((unsigned char) (*c) >= 128) { | |
35310 PyUnicode_AsASCIIString(o); | |
35311 return NULL; | |
35312 } | |
35313 } | |
35314 } | |
35315 #endif | |
35316 *length = PyBytes_GET_SIZE(defenc); | |
35317 return defenc_c; | |
35318 } | |
35319 #else | |
35320 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { | |
35321 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; | |
35322 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII | |
35323 if (likely(PyUnicode_IS_ASCII(o))) { | |
35324 *length = PyUnicode_GET_LENGTH(o); | |
35325 return PyUnicode_AsUTF8(o); | |
35326 } else { | |
35327 PyUnicode_AsASCIIString(o); | |
35328 return NULL; | |
35329 } | |
35330 #else | |
35331 return PyUnicode_AsUTF8AndSize(o, length); | |
35332 #endif | |
35333 } | |
35334 #endif | |
35335 #endif | |
35336 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { | |
35337 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT | |
35338 if ( | |
35339 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII | |
35340 __Pyx_sys_getdefaultencoding_not_ascii && | |
35341 #endif | |
35342 PyUnicode_Check(o)) { | |
35343 return __Pyx_PyUnicode_AsStringAndSize(o, length); | |
35344 } else | |
35345 #endif | |
35346 #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) | |
35347 if (PyByteArray_Check(o)) { | |
35348 *length = PyByteArray_GET_SIZE(o); | |
35349 return PyByteArray_AS_STRING(o); | |
35350 } else | |
35351 #endif | |
35352 { | |
35353 char* result; | |
35354 int r = PyBytes_AsStringAndSize(o, &result, length); | |
35355 if (unlikely(r < 0)) { | |
35356 return NULL; | |
35357 } else { | |
35358 return result; | |
35359 } | |
35360 } | |
35361 } | |
35362 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { | |
35363 int is_true = x == Py_True; | |
35364 if (is_true | (x == Py_False) | (x == Py_None)) return is_true; | |
35365 else return PyObject_IsTrue(x); | |
35366 } | |
35367 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { | |
35368 int retval; | |
35369 if (unlikely(!x)) return -1; | |
35370 retval = __Pyx_PyObject_IsTrue(x); | |
35371 Py_DECREF(x); | |
35372 return retval; | |
35373 } | |
35374 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { | |
35375 __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); | |
35376 #if PY_MAJOR_VERSION >= 3 | |
35377 if (PyLong_Check(result)) { | |
35378 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, | |
35379 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " | |
35380 "The ability to return an instance of a strict subclass of int is deprecated, " | |
35381 "and may be removed in a future version of Python.", | |
35382 result_type_name)) { | |
35383 __Pyx_DECREF_TypeName(result_type_name); | |
35384 Py_DECREF(result); | |
35385 return NULL; | |
35386 } | |
35387 __Pyx_DECREF_TypeName(result_type_name); | |
35388 return result; | |
35389 } | |
35390 #endif | |
35391 PyErr_Format(PyExc_TypeError, | |
35392 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", | |
35393 type_name, type_name, result_type_name); | |
35394 __Pyx_DECREF_TypeName(result_type_name); | |
35395 Py_DECREF(result); | |
35396 return NULL; | |
35397 } | |
35398 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { | |
35399 #if CYTHON_USE_TYPE_SLOTS | |
35400 PyNumberMethods *m; | |
35401 #endif | |
35402 const char *name = NULL; | |
35403 PyObject *res = NULL; | |
35404 #if PY_MAJOR_VERSION < 3 | |
35405 if (likely(PyInt_Check(x) || PyLong_Check(x))) | |
35406 #else | |
35407 if (likely(PyLong_Check(x))) | |
35408 #endif | |
35409 return __Pyx_NewRef(x); | |
35410 #if CYTHON_USE_TYPE_SLOTS | |
35411 m = Py_TYPE(x)->tp_as_number; | |
35412 #if PY_MAJOR_VERSION < 3 | |
35413 if (m && m->nb_int) { | |
35414 name = "int"; | |
35415 res = m->nb_int(x); | |
35416 } | |
35417 else if (m && m->nb_long) { | |
35418 name = "long"; | |
35419 res = m->nb_long(x); | |
35420 } | |
35421 #else | |
35422 if (likely(m && m->nb_int)) { | |
35423 name = "int"; | |
35424 res = m->nb_int(x); | |
35425 } | |
35426 #endif | |
35427 #else | |
35428 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { | |
35429 res = PyNumber_Int(x); | |
35430 } | |
35431 #endif | |
35432 if (likely(res)) { | |
35433 #if PY_MAJOR_VERSION < 3 | |
35434 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { | |
35435 #else | |
35436 if (unlikely(!PyLong_CheckExact(res))) { | |
35437 #endif | |
35438 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); | |
35439 } | |
35440 } | |
35441 else if (!PyErr_Occurred()) { | |
35442 PyErr_SetString(PyExc_TypeError, | |
35443 "an integer is required"); | |
35444 } | |
35445 return res; | |
35446 } | |
35447 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { | |
35448 Py_ssize_t ival; | |
35449 PyObject *x; | |
35450 #if PY_MAJOR_VERSION < 3 | |
35451 if (likely(PyInt_CheckExact(b))) { | |
35452 if (sizeof(Py_ssize_t) >= sizeof(long)) | |
35453 return PyInt_AS_LONG(b); | |
35454 else | |
35455 return PyInt_AsSsize_t(b); | |
35456 } | |
35457 #endif | |
35458 if (likely(PyLong_CheckExact(b))) { | |
35459 #if CYTHON_USE_PYLONG_INTERNALS | |
35460 if (likely(__Pyx_PyLong_IsCompact(b))) { | |
35461 return __Pyx_PyLong_CompactValue(b); | |
35462 } else { | |
35463 const digit* digits = __Pyx_PyLong_Digits(b); | |
35464 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); | |
35465 switch (size) { | |
35466 case 2: | |
35467 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { | |
35468 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); | |
35469 } | |
35470 break; | |
35471 case -2: | |
35472 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { | |
35473 return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); | |
35474 } | |
35475 break; | |
35476 case 3: | |
35477 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { | |
35478 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); | |
35479 } | |
35480 break; | |
35481 case -3: | |
35482 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { | |
35483 return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); | |
35484 } | |
35485 break; | |
35486 case 4: | |
35487 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { | |
35488 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])); | |
35489 } | |
35490 break; | |
35491 case -4: | |
35492 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { | |
35493 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])); | |
35494 } | |
35495 break; | |
35496 } | |
35497 } | |
35498 #endif | |
35499 return PyLong_AsSsize_t(b); | |
35500 } | |
35501 x = PyNumber_Index(b); | |
35502 if (!x) return -1; | |
35503 ival = PyInt_AsSsize_t(x); | |
35504 Py_DECREF(x); | |
35505 return ival; | |
35506 } | |
35507 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { | |
35508 if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { | |
35509 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); | |
35510 #if PY_MAJOR_VERSION < 3 | |
35511 } else if (likely(PyInt_CheckExact(o))) { | |
35512 return PyInt_AS_LONG(o); | |
35513 #endif | |
35514 } else { | |
35515 Py_ssize_t ival; | |
35516 PyObject *x; | |
35517 x = PyNumber_Index(o); | |
35518 if (!x) return -1; | |
35519 ival = PyInt_AsLong(x); | |
35520 Py_DECREF(x); | |
35521 return ival; | |
35522 } | |
35523 } | |
35524 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { | |
35525 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); | |
35526 } | |
35527 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { | |
35528 return PyInt_FromSize_t(ival); | |
35529 } | |
35530 | |
35531 | |
35532 /* #### Code section: utility_code_pragmas_end ### */ | |
35533 #ifdef _MSC_VER | |
35534 #pragma warning( pop ) | |
35535 #endif | |
35536 | |
35537 | |
35538 | |
35539 /* #### Code section: end ### */ | |
35540 #endif /* Py_PYTHON_H */ |