annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/site-packages/pysam/libctabix.c @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /* Generated by Cython 3.0.11 */
jpayne@69 2
jpayne@69 3 /* BEGIN: Cython Metadata
jpayne@69 4 {
jpayne@69 5 "distutils": {
jpayne@69 6 "define_macros": [
jpayne@69 7 [
jpayne@69 8 "BUILDING_WHEEL",
jpayne@69 9 null
jpayne@69 10 ]
jpayne@69 11 ],
jpayne@69 12 "depends": [
jpayne@69 13 "/project/htslib/htslib/bgzf.h",
jpayne@69 14 "/project/htslib/htslib/cram.h",
jpayne@69 15 "/project/htslib/htslib/faidx.h",
jpayne@69 16 "/project/htslib/htslib/hfile.h",
jpayne@69 17 "/project/htslib/htslib/hts.h",
jpayne@69 18 "/project/htslib/htslib/kstring.h",
jpayne@69 19 "/project/htslib/htslib/sam.h",
jpayne@69 20 "/project/htslib/htslib/tbx.h",
jpayne@69 21 "/project/htslib/htslib/vcf.h",
jpayne@69 22 "/project/htslib/htslib/vcfutils.h",
jpayne@69 23 "/project/pysam/htslib_util.h",
jpayne@69 24 "/project/pysam/pysam_stream.h"
jpayne@69 25 ],
jpayne@69 26 "extra_compile_args": [
jpayne@69 27 "-Wno-unused",
jpayne@69 28 "-Wno-strict-prototypes",
jpayne@69 29 "-Wno-sign-compare",
jpayne@69 30 "-Wno-error=declaration-after-statement"
jpayne@69 31 ],
jpayne@69 32 "extra_link_args": [
jpayne@69 33 "-Wl,-rpath,$ORIGIN"
jpayne@69 34 ],
jpayne@69 35 "include_dirs": [
jpayne@69 36 "pysam",
jpayne@69 37 "/project/pysam",
jpayne@69 38 "/project/htslib",
jpayne@69 39 "/project/samtools",
jpayne@69 40 "/project/samtools/lz4",
jpayne@69 41 "/project/bcftools",
jpayne@69 42 "/project"
jpayne@69 43 ],
jpayne@69 44 "language": "c",
jpayne@69 45 "libraries": [
jpayne@69 46 "z",
jpayne@69 47 "lzma",
jpayne@69 48 "bz2",
jpayne@69 49 "z",
jpayne@69 50 "m",
jpayne@69 51 "curl",
jpayne@69 52 "crypto",
jpayne@69 53 "chtslib.cpython-37m-x86_64-linux-gnu",
jpayne@69 54 "cutils.cpython-37m-x86_64-linux-gnu"
jpayne@69 55 ],
jpayne@69 56 "library_dirs": [
jpayne@69 57 "/project/pysam",
jpayne@69 58 "/project",
jpayne@69 59 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 60 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 61 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 62 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 63 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 64 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 65 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 66 "build/lib.linux-x86_64-cpython-37/pysam"
jpayne@69 67 ],
jpayne@69 68 "name": "pysam.libctabix",
jpayne@69 69 "sources": [
jpayne@69 70 "pysam/libctabix.pyx"
jpayne@69 71 ]
jpayne@69 72 },
jpayne@69 73 "module_name": "pysam.libctabix"
jpayne@69 74 }
jpayne@69 75 END: Cython Metadata */
jpayne@69 76
jpayne@69 77 #ifndef PY_SSIZE_T_CLEAN
jpayne@69 78 #define PY_SSIZE_T_CLEAN
jpayne@69 79 #endif /* PY_SSIZE_T_CLEAN */
jpayne@69 80 #if defined(CYTHON_LIMITED_API) && 0
jpayne@69 81 #ifndef Py_LIMITED_API
jpayne@69 82 #if CYTHON_LIMITED_API+0 > 0x03030000
jpayne@69 83 #define Py_LIMITED_API CYTHON_LIMITED_API
jpayne@69 84 #else
jpayne@69 85 #define Py_LIMITED_API 0x03030000
jpayne@69 86 #endif
jpayne@69 87 #endif
jpayne@69 88 #endif
jpayne@69 89
jpayne@69 90 #include "Python.h"
jpayne@69 91
jpayne@69 92 #if PY_MAJOR_VERSION >= 3
jpayne@69 93 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj)
jpayne@69 94 #else
jpayne@69 95 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL)
jpayne@69 96 #endif
jpayne@69 97
jpayne@69 98
jpayne@69 99 #if PY_MAJOR_VERSION <= 2
jpayne@69 100 #define PyDict_GetItemWithError _PyDict_GetItemWithError
jpayne@69 101 #endif
jpayne@69 102
jpayne@69 103
jpayne@69 104 #if (PY_VERSION_HEX < 0x030700b1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600)) && !defined(PyContextVar_Get)
jpayne@69 105 #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) )
jpayne@69 106 #endif
jpayne@69 107
jpayne@69 108 #ifndef Py_PYTHON_H
jpayne@69 109 #error Python headers needed to compile C extensions, please install development version of Python.
jpayne@69 110 #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
jpayne@69 111 #error Cython requires Python 2.7+ or Python 3.3+.
jpayne@69 112 #else
jpayne@69 113 #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
jpayne@69 114 #define __PYX_EXTRA_ABI_MODULE_NAME "limited"
jpayne@69 115 #else
jpayne@69 116 #define __PYX_EXTRA_ABI_MODULE_NAME ""
jpayne@69 117 #endif
jpayne@69 118 #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
jpayne@69 119 #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
jpayne@69 120 #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
jpayne@69 121 #define CYTHON_HEX_VERSION 0x03000BF0
jpayne@69 122 #define CYTHON_FUTURE_DIVISION 1
jpayne@69 123 #include <stddef.h>
jpayne@69 124 #ifndef offsetof
jpayne@69 125 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
jpayne@69 126 #endif
jpayne@69 127 #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
jpayne@69 128 #ifndef __stdcall
jpayne@69 129 #define __stdcall
jpayne@69 130 #endif
jpayne@69 131 #ifndef __cdecl
jpayne@69 132 #define __cdecl
jpayne@69 133 #endif
jpayne@69 134 #ifndef __fastcall
jpayne@69 135 #define __fastcall
jpayne@69 136 #endif
jpayne@69 137 #endif
jpayne@69 138 #ifndef DL_IMPORT
jpayne@69 139 #define DL_IMPORT(t) t
jpayne@69 140 #endif
jpayne@69 141 #ifndef DL_EXPORT
jpayne@69 142 #define DL_EXPORT(t) t
jpayne@69 143 #endif
jpayne@69 144 #define __PYX_COMMA ,
jpayne@69 145 #ifndef HAVE_LONG_LONG
jpayne@69 146 #define HAVE_LONG_LONG
jpayne@69 147 #endif
jpayne@69 148 #ifndef PY_LONG_LONG
jpayne@69 149 #define PY_LONG_LONG LONG_LONG
jpayne@69 150 #endif
jpayne@69 151 #ifndef Py_HUGE_VAL
jpayne@69 152 #define Py_HUGE_VAL HUGE_VAL
jpayne@69 153 #endif
jpayne@69 154 #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
jpayne@69 155 #if defined(GRAALVM_PYTHON)
jpayne@69 156 /* For very preliminary testing purposes. Most variables are set the same as PyPy.
jpayne@69 157 The existence of this section does not imply that anything works or is even tested */
jpayne@69 158 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@69 159 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@69 160 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@69 161 #define CYTHON_COMPILING_IN_GRAAL 1
jpayne@69 162 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@69 163 #undef CYTHON_USE_TYPE_SLOTS
jpayne@69 164 #define CYTHON_USE_TYPE_SLOTS 0
jpayne@69 165 #undef CYTHON_USE_TYPE_SPECS
jpayne@69 166 #define CYTHON_USE_TYPE_SPECS 0
jpayne@69 167 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 168 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@69 169 #if PY_VERSION_HEX < 0x03050000
jpayne@69 170 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@69 171 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@69 172 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
jpayne@69 173 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@69 174 #endif
jpayne@69 175 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@69 176 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@69 177 #undef CYTHON_USE_UNICODE_INTERNALS
jpayne@69 178 #define CYTHON_USE_UNICODE_INTERNALS 0
jpayne@69 179 #undef CYTHON_USE_UNICODE_WRITER
jpayne@69 180 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@69 181 #undef CYTHON_USE_PYLONG_INTERNALS
jpayne@69 182 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@69 183 #undef CYTHON_AVOID_BORROWED_REFS
jpayne@69 184 #define CYTHON_AVOID_BORROWED_REFS 1
jpayne@69 185 #undef CYTHON_ASSUME_SAFE_MACROS
jpayne@69 186 #define CYTHON_ASSUME_SAFE_MACROS 0
jpayne@69 187 #undef CYTHON_UNPACK_METHODS
jpayne@69 188 #define CYTHON_UNPACK_METHODS 0
jpayne@69 189 #undef CYTHON_FAST_THREAD_STATE
jpayne@69 190 #define CYTHON_FAST_THREAD_STATE 0
jpayne@69 191 #undef CYTHON_FAST_GIL
jpayne@69 192 #define CYTHON_FAST_GIL 0
jpayne@69 193 #undef CYTHON_METH_FASTCALL
jpayne@69 194 #define CYTHON_METH_FASTCALL 0
jpayne@69 195 #undef CYTHON_FAST_PYCALL
jpayne@69 196 #define CYTHON_FAST_PYCALL 0
jpayne@69 197 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 198 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
jpayne@69 199 #endif
jpayne@69 200 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 201 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@69 202 #undef CYTHON_USE_MODULE_STATE
jpayne@69 203 #define CYTHON_USE_MODULE_STATE 0
jpayne@69 204 #undef CYTHON_USE_TP_FINALIZE
jpayne@69 205 #define CYTHON_USE_TP_FINALIZE 0
jpayne@69 206 #undef CYTHON_USE_DICT_VERSIONS
jpayne@69 207 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@69 208 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@69 209 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@69 210 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 211 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
jpayne@69 212 #endif
jpayne@69 213 #undef CYTHON_USE_FREELISTS
jpayne@69 214 #define CYTHON_USE_FREELISTS 0
jpayne@69 215 #elif defined(PYPY_VERSION)
jpayne@69 216 #define CYTHON_COMPILING_IN_PYPY 1
jpayne@69 217 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@69 218 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@69 219 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@69 220 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@69 221 #undef CYTHON_USE_TYPE_SLOTS
jpayne@69 222 #define CYTHON_USE_TYPE_SLOTS 0
jpayne@69 223 #ifndef CYTHON_USE_TYPE_SPECS
jpayne@69 224 #define CYTHON_USE_TYPE_SPECS 0
jpayne@69 225 #endif
jpayne@69 226 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 227 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@69 228 #if PY_VERSION_HEX < 0x03050000
jpayne@69 229 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@69 230 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@69 231 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
jpayne@69 232 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@69 233 #endif
jpayne@69 234 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@69 235 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@69 236 #undef CYTHON_USE_UNICODE_INTERNALS
jpayne@69 237 #define CYTHON_USE_UNICODE_INTERNALS 0
jpayne@69 238 #undef CYTHON_USE_UNICODE_WRITER
jpayne@69 239 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@69 240 #undef CYTHON_USE_PYLONG_INTERNALS
jpayne@69 241 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@69 242 #undef CYTHON_AVOID_BORROWED_REFS
jpayne@69 243 #define CYTHON_AVOID_BORROWED_REFS 1
jpayne@69 244 #undef CYTHON_ASSUME_SAFE_MACROS
jpayne@69 245 #define CYTHON_ASSUME_SAFE_MACROS 0
jpayne@69 246 #undef CYTHON_UNPACK_METHODS
jpayne@69 247 #define CYTHON_UNPACK_METHODS 0
jpayne@69 248 #undef CYTHON_FAST_THREAD_STATE
jpayne@69 249 #define CYTHON_FAST_THREAD_STATE 0
jpayne@69 250 #undef CYTHON_FAST_GIL
jpayne@69 251 #define CYTHON_FAST_GIL 0
jpayne@69 252 #undef CYTHON_METH_FASTCALL
jpayne@69 253 #define CYTHON_METH_FASTCALL 0
jpayne@69 254 #undef CYTHON_FAST_PYCALL
jpayne@69 255 #define CYTHON_FAST_PYCALL 0
jpayne@69 256 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 257 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
jpayne@69 258 #endif
jpayne@69 259 #if PY_VERSION_HEX < 0x03090000
jpayne@69 260 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 261 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
jpayne@69 262 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
jpayne@69 263 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@69 264 #endif
jpayne@69 265 #undef CYTHON_USE_MODULE_STATE
jpayne@69 266 #define CYTHON_USE_MODULE_STATE 0
jpayne@69 267 #undef CYTHON_USE_TP_FINALIZE
jpayne@69 268 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
jpayne@69 269 #undef CYTHON_USE_DICT_VERSIONS
jpayne@69 270 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@69 271 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@69 272 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@69 273 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 274 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
jpayne@69 275 #endif
jpayne@69 276 #undef CYTHON_USE_FREELISTS
jpayne@69 277 #define CYTHON_USE_FREELISTS 0
jpayne@69 278 #elif defined(CYTHON_LIMITED_API)
jpayne@69 279 #ifdef Py_LIMITED_API
jpayne@69 280 #undef __PYX_LIMITED_VERSION_HEX
jpayne@69 281 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
jpayne@69 282 #endif
jpayne@69 283 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@69 284 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@69 285 #define CYTHON_COMPILING_IN_LIMITED_API 1
jpayne@69 286 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@69 287 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@69 288 #undef CYTHON_CLINE_IN_TRACEBACK
jpayne@69 289 #define CYTHON_CLINE_IN_TRACEBACK 0
jpayne@69 290 #undef CYTHON_USE_TYPE_SLOTS
jpayne@69 291 #define CYTHON_USE_TYPE_SLOTS 0
jpayne@69 292 #undef CYTHON_USE_TYPE_SPECS
jpayne@69 293 #define CYTHON_USE_TYPE_SPECS 1
jpayne@69 294 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 295 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@69 296 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@69 297 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@69 298 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@69 299 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@69 300 #undef CYTHON_USE_UNICODE_INTERNALS
jpayne@69 301 #define CYTHON_USE_UNICODE_INTERNALS 0
jpayne@69 302 #ifndef CYTHON_USE_UNICODE_WRITER
jpayne@69 303 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@69 304 #endif
jpayne@69 305 #undef CYTHON_USE_PYLONG_INTERNALS
jpayne@69 306 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@69 307 #ifndef CYTHON_AVOID_BORROWED_REFS
jpayne@69 308 #define CYTHON_AVOID_BORROWED_REFS 0
jpayne@69 309 #endif
jpayne@69 310 #undef CYTHON_ASSUME_SAFE_MACROS
jpayne@69 311 #define CYTHON_ASSUME_SAFE_MACROS 0
jpayne@69 312 #undef CYTHON_UNPACK_METHODS
jpayne@69 313 #define CYTHON_UNPACK_METHODS 0
jpayne@69 314 #undef CYTHON_FAST_THREAD_STATE
jpayne@69 315 #define CYTHON_FAST_THREAD_STATE 0
jpayne@69 316 #undef CYTHON_FAST_GIL
jpayne@69 317 #define CYTHON_FAST_GIL 0
jpayne@69 318 #undef CYTHON_METH_FASTCALL
jpayne@69 319 #define CYTHON_METH_FASTCALL 0
jpayne@69 320 #undef CYTHON_FAST_PYCALL
jpayne@69 321 #define CYTHON_FAST_PYCALL 0
jpayne@69 322 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 323 #define CYTHON_PEP487_INIT_SUBCLASS 1
jpayne@69 324 #endif
jpayne@69 325 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 326 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
jpayne@69 327 #undef CYTHON_USE_MODULE_STATE
jpayne@69 328 #define CYTHON_USE_MODULE_STATE 1
jpayne@69 329 #ifndef CYTHON_USE_TP_FINALIZE
jpayne@69 330 #define CYTHON_USE_TP_FINALIZE 0
jpayne@69 331 #endif
jpayne@69 332 #undef CYTHON_USE_DICT_VERSIONS
jpayne@69 333 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@69 334 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@69 335 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@69 336 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 337 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
jpayne@69 338 #endif
jpayne@69 339 #undef CYTHON_USE_FREELISTS
jpayne@69 340 #define CYTHON_USE_FREELISTS 0
jpayne@69 341 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
jpayne@69 342 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@69 343 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@69 344 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@69 345 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@69 346 #define CYTHON_COMPILING_IN_NOGIL 1
jpayne@69 347 #ifndef CYTHON_USE_TYPE_SLOTS
jpayne@69 348 #define CYTHON_USE_TYPE_SLOTS 1
jpayne@69 349 #endif
jpayne@69 350 #ifndef CYTHON_USE_TYPE_SPECS
jpayne@69 351 #define CYTHON_USE_TYPE_SPECS 0
jpayne@69 352 #endif
jpayne@69 353 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 354 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@69 355 #ifndef CYTHON_USE_ASYNC_SLOTS
jpayne@69 356 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@69 357 #endif
jpayne@69 358 #ifndef CYTHON_USE_PYLONG_INTERNALS
jpayne@69 359 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@69 360 #endif
jpayne@69 361 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@69 362 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@69 363 #ifndef CYTHON_USE_UNICODE_INTERNALS
jpayne@69 364 #define CYTHON_USE_UNICODE_INTERNALS 1
jpayne@69 365 #endif
jpayne@69 366 #undef CYTHON_USE_UNICODE_WRITER
jpayne@69 367 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@69 368 #ifndef CYTHON_AVOID_BORROWED_REFS
jpayne@69 369 #define CYTHON_AVOID_BORROWED_REFS 0
jpayne@69 370 #endif
jpayne@69 371 #ifndef CYTHON_ASSUME_SAFE_MACROS
jpayne@69 372 #define CYTHON_ASSUME_SAFE_MACROS 1
jpayne@69 373 #endif
jpayne@69 374 #ifndef CYTHON_UNPACK_METHODS
jpayne@69 375 #define CYTHON_UNPACK_METHODS 1
jpayne@69 376 #endif
jpayne@69 377 #undef CYTHON_FAST_THREAD_STATE
jpayne@69 378 #define CYTHON_FAST_THREAD_STATE 0
jpayne@69 379 #undef CYTHON_FAST_GIL
jpayne@69 380 #define CYTHON_FAST_GIL 0
jpayne@69 381 #ifndef CYTHON_METH_FASTCALL
jpayne@69 382 #define CYTHON_METH_FASTCALL 1
jpayne@69 383 #endif
jpayne@69 384 #undef CYTHON_FAST_PYCALL
jpayne@69 385 #define CYTHON_FAST_PYCALL 0
jpayne@69 386 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 387 #define CYTHON_PEP487_INIT_SUBCLASS 1
jpayne@69 388 #endif
jpayne@69 389 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 390 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@69 391 #endif
jpayne@69 392 #ifndef CYTHON_USE_MODULE_STATE
jpayne@69 393 #define CYTHON_USE_MODULE_STATE 0
jpayne@69 394 #endif
jpayne@69 395 #ifndef CYTHON_USE_TP_FINALIZE
jpayne@69 396 #define CYTHON_USE_TP_FINALIZE 1
jpayne@69 397 #endif
jpayne@69 398 #undef CYTHON_USE_DICT_VERSIONS
jpayne@69 399 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@69 400 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@69 401 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@69 402 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 403 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
jpayne@69 404 #endif
jpayne@69 405 #ifndef CYTHON_USE_FREELISTS
jpayne@69 406 #define CYTHON_USE_FREELISTS 0
jpayne@69 407 #endif
jpayne@69 408 #else
jpayne@69 409 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@69 410 #define CYTHON_COMPILING_IN_CPYTHON 1
jpayne@69 411 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@69 412 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@69 413 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@69 414 #ifndef CYTHON_USE_TYPE_SLOTS
jpayne@69 415 #define CYTHON_USE_TYPE_SLOTS 1
jpayne@69 416 #endif
jpayne@69 417 #ifndef CYTHON_USE_TYPE_SPECS
jpayne@69 418 #define CYTHON_USE_TYPE_SPECS 0
jpayne@69 419 #endif
jpayne@69 420 #ifndef CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 421 #define CYTHON_USE_PYTYPE_LOOKUP 1
jpayne@69 422 #endif
jpayne@69 423 #if PY_MAJOR_VERSION < 3
jpayne@69 424 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@69 425 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@69 426 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
jpayne@69 427 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@69 428 #endif
jpayne@69 429 #ifndef CYTHON_USE_PYLONG_INTERNALS
jpayne@69 430 #define CYTHON_USE_PYLONG_INTERNALS 1
jpayne@69 431 #endif
jpayne@69 432 #ifndef CYTHON_USE_PYLIST_INTERNALS
jpayne@69 433 #define CYTHON_USE_PYLIST_INTERNALS 1
jpayne@69 434 #endif
jpayne@69 435 #ifndef CYTHON_USE_UNICODE_INTERNALS
jpayne@69 436 #define CYTHON_USE_UNICODE_INTERNALS 1
jpayne@69 437 #endif
jpayne@69 438 #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
jpayne@69 439 #undef CYTHON_USE_UNICODE_WRITER
jpayne@69 440 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@69 441 #elif !defined(CYTHON_USE_UNICODE_WRITER)
jpayne@69 442 #define CYTHON_USE_UNICODE_WRITER 1
jpayne@69 443 #endif
jpayne@69 444 #ifndef CYTHON_AVOID_BORROWED_REFS
jpayne@69 445 #define CYTHON_AVOID_BORROWED_REFS 0
jpayne@69 446 #endif
jpayne@69 447 #ifndef CYTHON_ASSUME_SAFE_MACROS
jpayne@69 448 #define CYTHON_ASSUME_SAFE_MACROS 1
jpayne@69 449 #endif
jpayne@69 450 #ifndef CYTHON_UNPACK_METHODS
jpayne@69 451 #define CYTHON_UNPACK_METHODS 1
jpayne@69 452 #endif
jpayne@69 453 #ifndef CYTHON_FAST_THREAD_STATE
jpayne@69 454 #define CYTHON_FAST_THREAD_STATE 1
jpayne@69 455 #endif
jpayne@69 456 #ifndef CYTHON_FAST_GIL
jpayne@69 457 #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
jpayne@69 458 #endif
jpayne@69 459 #ifndef CYTHON_METH_FASTCALL
jpayne@69 460 #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
jpayne@69 461 #endif
jpayne@69 462 #ifndef CYTHON_FAST_PYCALL
jpayne@69 463 #define CYTHON_FAST_PYCALL 1
jpayne@69 464 #endif
jpayne@69 465 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 466 #define CYTHON_PEP487_INIT_SUBCLASS 1
jpayne@69 467 #endif
jpayne@69 468 #if PY_VERSION_HEX < 0x03050000
jpayne@69 469 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 470 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
jpayne@69 471 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
jpayne@69 472 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@69 473 #endif
jpayne@69 474 #ifndef CYTHON_USE_MODULE_STATE
jpayne@69 475 #define CYTHON_USE_MODULE_STATE 0
jpayne@69 476 #endif
jpayne@69 477 #if PY_VERSION_HEX < 0x030400a1
jpayne@69 478 #undef CYTHON_USE_TP_FINALIZE
jpayne@69 479 #define CYTHON_USE_TP_FINALIZE 0
jpayne@69 480 #elif !defined(CYTHON_USE_TP_FINALIZE)
jpayne@69 481 #define CYTHON_USE_TP_FINALIZE 1
jpayne@69 482 #endif
jpayne@69 483 #if PY_VERSION_HEX < 0x030600B1
jpayne@69 484 #undef CYTHON_USE_DICT_VERSIONS
jpayne@69 485 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@69 486 #elif !defined(CYTHON_USE_DICT_VERSIONS)
jpayne@69 487 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5)
jpayne@69 488 #endif
jpayne@69 489 #if PY_VERSION_HEX < 0x030700A3
jpayne@69 490 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@69 491 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@69 492 #elif !defined(CYTHON_USE_EXC_INFO_STACK)
jpayne@69 493 #define CYTHON_USE_EXC_INFO_STACK 1
jpayne@69 494 #endif
jpayne@69 495 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 496 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
jpayne@69 497 #endif
jpayne@69 498 #ifndef CYTHON_USE_FREELISTS
jpayne@69 499 #define CYTHON_USE_FREELISTS 1
jpayne@69 500 #endif
jpayne@69 501 #endif
jpayne@69 502 #if !defined(CYTHON_FAST_PYCCALL)
jpayne@69 503 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
jpayne@69 504 #endif
jpayne@69 505 #if !defined(CYTHON_VECTORCALL)
jpayne@69 506 #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
jpayne@69 507 #endif
jpayne@69 508 #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
jpayne@69 509 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 510 #if PY_MAJOR_VERSION < 3
jpayne@69 511 #include "longintrepr.h"
jpayne@69 512 #endif
jpayne@69 513 #undef SHIFT
jpayne@69 514 #undef BASE
jpayne@69 515 #undef MASK
jpayne@69 516 #ifdef SIZEOF_VOID_P
jpayne@69 517 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
jpayne@69 518 #endif
jpayne@69 519 #endif
jpayne@69 520 #ifndef __has_attribute
jpayne@69 521 #define __has_attribute(x) 0
jpayne@69 522 #endif
jpayne@69 523 #ifndef __has_cpp_attribute
jpayne@69 524 #define __has_cpp_attribute(x) 0
jpayne@69 525 #endif
jpayne@69 526 #ifndef CYTHON_RESTRICT
jpayne@69 527 #if defined(__GNUC__)
jpayne@69 528 #define CYTHON_RESTRICT __restrict__
jpayne@69 529 #elif defined(_MSC_VER) && _MSC_VER >= 1400
jpayne@69 530 #define CYTHON_RESTRICT __restrict
jpayne@69 531 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
jpayne@69 532 #define CYTHON_RESTRICT restrict
jpayne@69 533 #else
jpayne@69 534 #define CYTHON_RESTRICT
jpayne@69 535 #endif
jpayne@69 536 #endif
jpayne@69 537 #ifndef CYTHON_UNUSED
jpayne@69 538 #if defined(__cplusplus)
jpayne@69 539 /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
jpayne@69 540 * but leads to warnings with -pedantic, since it is a C++17 feature */
jpayne@69 541 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
jpayne@69 542 #if __has_cpp_attribute(maybe_unused)
jpayne@69 543 #define CYTHON_UNUSED [[maybe_unused]]
jpayne@69 544 #endif
jpayne@69 545 #endif
jpayne@69 546 #endif
jpayne@69 547 #endif
jpayne@69 548 #ifndef CYTHON_UNUSED
jpayne@69 549 # if defined(__GNUC__)
jpayne@69 550 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
jpayne@69 551 # define CYTHON_UNUSED __attribute__ ((__unused__))
jpayne@69 552 # else
jpayne@69 553 # define CYTHON_UNUSED
jpayne@69 554 # endif
jpayne@69 555 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
jpayne@69 556 # define CYTHON_UNUSED __attribute__ ((__unused__))
jpayne@69 557 # else
jpayne@69 558 # define CYTHON_UNUSED
jpayne@69 559 # endif
jpayne@69 560 #endif
jpayne@69 561 #ifndef CYTHON_UNUSED_VAR
jpayne@69 562 # if defined(__cplusplus)
jpayne@69 563 template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
jpayne@69 564 # else
jpayne@69 565 # define CYTHON_UNUSED_VAR(x) (void)(x)
jpayne@69 566 # endif
jpayne@69 567 #endif
jpayne@69 568 #ifndef CYTHON_MAYBE_UNUSED_VAR
jpayne@69 569 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
jpayne@69 570 #endif
jpayne@69 571 #ifndef CYTHON_NCP_UNUSED
jpayne@69 572 # if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 573 # define CYTHON_NCP_UNUSED
jpayne@69 574 # else
jpayne@69 575 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
jpayne@69 576 # endif
jpayne@69 577 #endif
jpayne@69 578 #ifndef CYTHON_USE_CPP_STD_MOVE
jpayne@69 579 #if defined(__cplusplus) && (\
jpayne@69 580 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
jpayne@69 581 #define CYTHON_USE_CPP_STD_MOVE 1
jpayne@69 582 #else
jpayne@69 583 #define CYTHON_USE_CPP_STD_MOVE 0
jpayne@69 584 #endif
jpayne@69 585 #endif
jpayne@69 586 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
jpayne@69 587 #ifdef _MSC_VER
jpayne@69 588 #ifndef _MSC_STDINT_H_
jpayne@69 589 #if _MSC_VER < 1300
jpayne@69 590 typedef unsigned char uint8_t;
jpayne@69 591 typedef unsigned short uint16_t;
jpayne@69 592 typedef unsigned int uint32_t;
jpayne@69 593 #else
jpayne@69 594 typedef unsigned __int8 uint8_t;
jpayne@69 595 typedef unsigned __int16 uint16_t;
jpayne@69 596 typedef unsigned __int32 uint32_t;
jpayne@69 597 #endif
jpayne@69 598 #endif
jpayne@69 599 #if _MSC_VER < 1300
jpayne@69 600 #ifdef _WIN64
jpayne@69 601 typedef unsigned long long __pyx_uintptr_t;
jpayne@69 602 #else
jpayne@69 603 typedef unsigned int __pyx_uintptr_t;
jpayne@69 604 #endif
jpayne@69 605 #else
jpayne@69 606 #ifdef _WIN64
jpayne@69 607 typedef unsigned __int64 __pyx_uintptr_t;
jpayne@69 608 #else
jpayne@69 609 typedef unsigned __int32 __pyx_uintptr_t;
jpayne@69 610 #endif
jpayne@69 611 #endif
jpayne@69 612 #else
jpayne@69 613 #include <stdint.h>
jpayne@69 614 typedef uintptr_t __pyx_uintptr_t;
jpayne@69 615 #endif
jpayne@69 616 #ifndef CYTHON_FALLTHROUGH
jpayne@69 617 #if defined(__cplusplus)
jpayne@69 618 /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
jpayne@69 619 * but leads to warnings with -pedantic, since it is a C++17 feature */
jpayne@69 620 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
jpayne@69 621 #if __has_cpp_attribute(fallthrough)
jpayne@69 622 #define CYTHON_FALLTHROUGH [[fallthrough]]
jpayne@69 623 #endif
jpayne@69 624 #endif
jpayne@69 625 #ifndef CYTHON_FALLTHROUGH
jpayne@69 626 #if __has_cpp_attribute(clang::fallthrough)
jpayne@69 627 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
jpayne@69 628 #elif __has_cpp_attribute(gnu::fallthrough)
jpayne@69 629 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
jpayne@69 630 #endif
jpayne@69 631 #endif
jpayne@69 632 #endif
jpayne@69 633 #ifndef CYTHON_FALLTHROUGH
jpayne@69 634 #if __has_attribute(fallthrough)
jpayne@69 635 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
jpayne@69 636 #else
jpayne@69 637 #define CYTHON_FALLTHROUGH
jpayne@69 638 #endif
jpayne@69 639 #endif
jpayne@69 640 #if defined(__clang__) && defined(__apple_build_version__)
jpayne@69 641 #if __apple_build_version__ < 7000000
jpayne@69 642 #undef CYTHON_FALLTHROUGH
jpayne@69 643 #define CYTHON_FALLTHROUGH
jpayne@69 644 #endif
jpayne@69 645 #endif
jpayne@69 646 #endif
jpayne@69 647 #ifdef __cplusplus
jpayne@69 648 template <typename T>
jpayne@69 649 struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
jpayne@69 650 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
jpayne@69 651 #else
jpayne@69 652 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
jpayne@69 653 #endif
jpayne@69 654 #if CYTHON_COMPILING_IN_PYPY == 1
jpayne@69 655 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
jpayne@69 656 #else
jpayne@69 657 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
jpayne@69 658 #endif
jpayne@69 659 #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
jpayne@69 660
jpayne@69 661 #ifndef CYTHON_INLINE
jpayne@69 662 #if defined(__clang__)
jpayne@69 663 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
jpayne@69 664 #elif defined(__GNUC__)
jpayne@69 665 #define CYTHON_INLINE __inline__
jpayne@69 666 #elif defined(_MSC_VER)
jpayne@69 667 #define CYTHON_INLINE __inline
jpayne@69 668 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
jpayne@69 669 #define CYTHON_INLINE inline
jpayne@69 670 #else
jpayne@69 671 #define CYTHON_INLINE
jpayne@69 672 #endif
jpayne@69 673 #endif
jpayne@69 674
jpayne@69 675 #define __PYX_BUILD_PY_SSIZE_T "n"
jpayne@69 676 #define CYTHON_FORMAT_SSIZE_T "z"
jpayne@69 677 #if PY_MAJOR_VERSION < 3
jpayne@69 678 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
jpayne@69 679 #define __Pyx_DefaultClassType PyClass_Type
jpayne@69 680 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
jpayne@69 681 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
jpayne@69 682 #else
jpayne@69 683 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
jpayne@69 684 #define __Pyx_DefaultClassType PyType_Type
jpayne@69 685 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 686 static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
jpayne@69 687 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
jpayne@69 688 PyObject *fv, PyObject *cell, PyObject* fn,
jpayne@69 689 PyObject *name, int fline, PyObject *lnos) {
jpayne@69 690 PyObject *exception_table = NULL;
jpayne@69 691 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
jpayne@69 692 #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
jpayne@69 693 PyObject *version_info;
jpayne@69 694 PyObject *py_minor_version = NULL;
jpayne@69 695 #endif
jpayne@69 696 long minor_version = 0;
jpayne@69 697 PyObject *type, *value, *traceback;
jpayne@69 698 PyErr_Fetch(&type, &value, &traceback);
jpayne@69 699 #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
jpayne@69 700 minor_version = 11;
jpayne@69 701 #else
jpayne@69 702 if (!(version_info = PySys_GetObject("version_info"))) goto end;
jpayne@69 703 if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
jpayne@69 704 minor_version = PyLong_AsLong(py_minor_version);
jpayne@69 705 Py_DECREF(py_minor_version);
jpayne@69 706 if (minor_version == -1 && PyErr_Occurred()) goto end;
jpayne@69 707 #endif
jpayne@69 708 if (!(types_module = PyImport_ImportModule("types"))) goto end;
jpayne@69 709 if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
jpayne@69 710 if (minor_version <= 7) {
jpayne@69 711 (void)p;
jpayne@69 712 result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
jpayne@69 713 c, n, v, fn, name, fline, lnos, fv, cell);
jpayne@69 714 } else if (minor_version <= 10) {
jpayne@69 715 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
jpayne@69 716 c, n, v, fn, name, fline, lnos, fv, cell);
jpayne@69 717 } else {
jpayne@69 718 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
jpayne@69 719 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
jpayne@69 720 c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
jpayne@69 721 }
jpayne@69 722 end:
jpayne@69 723 Py_XDECREF(code_type);
jpayne@69 724 Py_XDECREF(exception_table);
jpayne@69 725 Py_XDECREF(types_module);
jpayne@69 726 if (type) {
jpayne@69 727 PyErr_Restore(type, value, traceback);
jpayne@69 728 }
jpayne@69 729 return result;
jpayne@69 730 }
jpayne@69 731 #ifndef CO_OPTIMIZED
jpayne@69 732 #define CO_OPTIMIZED 0x0001
jpayne@69 733 #endif
jpayne@69 734 #ifndef CO_NEWLOCALS
jpayne@69 735 #define CO_NEWLOCALS 0x0002
jpayne@69 736 #endif
jpayne@69 737 #ifndef CO_VARARGS
jpayne@69 738 #define CO_VARARGS 0x0004
jpayne@69 739 #endif
jpayne@69 740 #ifndef CO_VARKEYWORDS
jpayne@69 741 #define CO_VARKEYWORDS 0x0008
jpayne@69 742 #endif
jpayne@69 743 #ifndef CO_ASYNC_GENERATOR
jpayne@69 744 #define CO_ASYNC_GENERATOR 0x0200
jpayne@69 745 #endif
jpayne@69 746 #ifndef CO_GENERATOR
jpayne@69 747 #define CO_GENERATOR 0x0020
jpayne@69 748 #endif
jpayne@69 749 #ifndef CO_COROUTINE
jpayne@69 750 #define CO_COROUTINE 0x0080
jpayne@69 751 #endif
jpayne@69 752 #elif PY_VERSION_HEX >= 0x030B0000
jpayne@69 753 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
jpayne@69 754 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
jpayne@69 755 PyObject *fv, PyObject *cell, PyObject* fn,
jpayne@69 756 PyObject *name, int fline, PyObject *lnos) {
jpayne@69 757 PyCodeObject *result;
jpayne@69 758 PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
jpayne@69 759 if (!empty_bytes) return NULL;
jpayne@69 760 result =
jpayne@69 761 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 762 PyUnstable_Code_NewWithPosOnlyArgs
jpayne@69 763 #else
jpayne@69 764 PyCode_NewWithPosOnlyArgs
jpayne@69 765 #endif
jpayne@69 766 (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
jpayne@69 767 Py_DECREF(empty_bytes);
jpayne@69 768 return result;
jpayne@69 769 }
jpayne@69 770 #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
jpayne@69 771 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
jpayne@69 772 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
jpayne@69 773 #else
jpayne@69 774 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
jpayne@69 775 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
jpayne@69 776 #endif
jpayne@69 777 #endif
jpayne@69 778 #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
jpayne@69 779 #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
jpayne@69 780 #else
jpayne@69 781 #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
jpayne@69 782 #endif
jpayne@69 783 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
jpayne@69 784 #define __Pyx_Py_Is(x, y) Py_Is(x, y)
jpayne@69 785 #else
jpayne@69 786 #define __Pyx_Py_Is(x, y) ((x) == (y))
jpayne@69 787 #endif
jpayne@69 788 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
jpayne@69 789 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
jpayne@69 790 #else
jpayne@69 791 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
jpayne@69 792 #endif
jpayne@69 793 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
jpayne@69 794 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
jpayne@69 795 #else
jpayne@69 796 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
jpayne@69 797 #endif
jpayne@69 798 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
jpayne@69 799 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
jpayne@69 800 #else
jpayne@69 801 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
jpayne@69 802 #endif
jpayne@69 803 #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
jpayne@69 804 #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
jpayne@69 805 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
jpayne@69 806 #else
jpayne@69 807 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
jpayne@69 808 #endif
jpayne@69 809 #ifndef CO_COROUTINE
jpayne@69 810 #define CO_COROUTINE 0x80
jpayne@69 811 #endif
jpayne@69 812 #ifndef CO_ASYNC_GENERATOR
jpayne@69 813 #define CO_ASYNC_GENERATOR 0x200
jpayne@69 814 #endif
jpayne@69 815 #ifndef Py_TPFLAGS_CHECKTYPES
jpayne@69 816 #define Py_TPFLAGS_CHECKTYPES 0
jpayne@69 817 #endif
jpayne@69 818 #ifndef Py_TPFLAGS_HAVE_INDEX
jpayne@69 819 #define Py_TPFLAGS_HAVE_INDEX 0
jpayne@69 820 #endif
jpayne@69 821 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
jpayne@69 822 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
jpayne@69 823 #endif
jpayne@69 824 #ifndef Py_TPFLAGS_HAVE_FINALIZE
jpayne@69 825 #define Py_TPFLAGS_HAVE_FINALIZE 0
jpayne@69 826 #endif
jpayne@69 827 #ifndef Py_TPFLAGS_SEQUENCE
jpayne@69 828 #define Py_TPFLAGS_SEQUENCE 0
jpayne@69 829 #endif
jpayne@69 830 #ifndef Py_TPFLAGS_MAPPING
jpayne@69 831 #define Py_TPFLAGS_MAPPING 0
jpayne@69 832 #endif
jpayne@69 833 #ifndef METH_STACKLESS
jpayne@69 834 #define METH_STACKLESS 0
jpayne@69 835 #endif
jpayne@69 836 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
jpayne@69 837 #ifndef METH_FASTCALL
jpayne@69 838 #define METH_FASTCALL 0x80
jpayne@69 839 #endif
jpayne@69 840 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
jpayne@69 841 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
jpayne@69 842 Py_ssize_t nargs, PyObject *kwnames);
jpayne@69 843 #else
jpayne@69 844 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 845 # define __Pyx_PyCFunctionFast PyCFunctionFast
jpayne@69 846 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
jpayne@69 847 #else
jpayne@69 848 # define __Pyx_PyCFunctionFast _PyCFunctionFast
jpayne@69 849 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
jpayne@69 850 #endif
jpayne@69 851 #endif
jpayne@69 852 #if CYTHON_METH_FASTCALL
jpayne@69 853 #define __Pyx_METH_FASTCALL METH_FASTCALL
jpayne@69 854 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
jpayne@69 855 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
jpayne@69 856 #else
jpayne@69 857 #define __Pyx_METH_FASTCALL METH_VARARGS
jpayne@69 858 #define __Pyx_PyCFunction_FastCall PyCFunction
jpayne@69 859 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
jpayne@69 860 #endif
jpayne@69 861 #if CYTHON_VECTORCALL
jpayne@69 862 #define __pyx_vectorcallfunc vectorcallfunc
jpayne@69 863 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
jpayne@69 864 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
jpayne@69 865 #elif CYTHON_BACKPORT_VECTORCALL
jpayne@69 866 typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
jpayne@69 867 size_t nargsf, PyObject *kwnames);
jpayne@69 868 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1))
jpayne@69 869 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
jpayne@69 870 #else
jpayne@69 871 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
jpayne@69 872 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
jpayne@69 873 #endif
jpayne@69 874 #if PY_MAJOR_VERSION >= 0x030900B1
jpayne@69 875 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
jpayne@69 876 #else
jpayne@69 877 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func)
jpayne@69 878 #endif
jpayne@69 879 #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
jpayne@69 880 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 881 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
jpayne@69 882 #elif !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 883 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
jpayne@69 884 #endif
jpayne@69 885 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 886 #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
jpayne@69 887 static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
jpayne@69 888 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
jpayne@69 889 }
jpayne@69 890 #endif
jpayne@69 891 static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
jpayne@69 892 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 893 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
jpayne@69 894 #else
jpayne@69 895 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
jpayne@69 896 #endif
jpayne@69 897 }
jpayne@69 898 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
jpayne@69 899 #if __PYX_LIMITED_VERSION_HEX < 0x030900B1
jpayne@69 900 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
jpayne@69 901 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
jpayne@69 902 #else
jpayne@69 903 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
jpayne@69 904 #define __Pyx_PyCMethod PyCMethod
jpayne@69 905 #endif
jpayne@69 906 #ifndef METH_METHOD
jpayne@69 907 #define METH_METHOD 0x200
jpayne@69 908 #endif
jpayne@69 909 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
jpayne@69 910 #define PyObject_Malloc(s) PyMem_Malloc(s)
jpayne@69 911 #define PyObject_Free(p) PyMem_Free(p)
jpayne@69 912 #define PyObject_Realloc(p) PyMem_Realloc(p)
jpayne@69 913 #endif
jpayne@69 914 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 915 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
jpayne@69 916 #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
jpayne@69 917 #else
jpayne@69 918 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
jpayne@69 919 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
jpayne@69 920 #endif
jpayne@69 921 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 922 #define __Pyx_PyThreadState_Current PyThreadState_Get()
jpayne@69 923 #elif !CYTHON_FAST_THREAD_STATE
jpayne@69 924 #define __Pyx_PyThreadState_Current PyThreadState_GET()
jpayne@69 925 #elif PY_VERSION_HEX >= 0x030d00A1
jpayne@69 926 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
jpayne@69 927 #elif PY_VERSION_HEX >= 0x03060000
jpayne@69 928 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
jpayne@69 929 #elif PY_VERSION_HEX >= 0x03000000
jpayne@69 930 #define __Pyx_PyThreadState_Current PyThreadState_GET()
jpayne@69 931 #else
jpayne@69 932 #define __Pyx_PyThreadState_Current _PyThreadState_Current
jpayne@69 933 #endif
jpayne@69 934 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 935 static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
jpayne@69 936 {
jpayne@69 937 void *result;
jpayne@69 938 result = PyModule_GetState(op);
jpayne@69 939 if (!result)
jpayne@69 940 Py_FatalError("Couldn't find the module state");
jpayne@69 941 return result;
jpayne@69 942 }
jpayne@69 943 #endif
jpayne@69 944 #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
jpayne@69 945 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 946 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
jpayne@69 947 #else
jpayne@69 948 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
jpayne@69 949 #endif
jpayne@69 950 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
jpayne@69 951 #include "pythread.h"
jpayne@69 952 #define Py_tss_NEEDS_INIT 0
jpayne@69 953 typedef int Py_tss_t;
jpayne@69 954 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
jpayne@69 955 *key = PyThread_create_key();
jpayne@69 956 return 0;
jpayne@69 957 }
jpayne@69 958 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
jpayne@69 959 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
jpayne@69 960 *key = Py_tss_NEEDS_INIT;
jpayne@69 961 return key;
jpayne@69 962 }
jpayne@69 963 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
jpayne@69 964 PyObject_Free(key);
jpayne@69 965 }
jpayne@69 966 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
jpayne@69 967 return *key != Py_tss_NEEDS_INIT;
jpayne@69 968 }
jpayne@69 969 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
jpayne@69 970 PyThread_delete_key(*key);
jpayne@69 971 *key = Py_tss_NEEDS_INIT;
jpayne@69 972 }
jpayne@69 973 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
jpayne@69 974 return PyThread_set_key_value(*key, value);
jpayne@69 975 }
jpayne@69 976 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
jpayne@69 977 return PyThread_get_key_value(*key);
jpayne@69 978 }
jpayne@69 979 #endif
jpayne@69 980 #if PY_MAJOR_VERSION < 3
jpayne@69 981 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 982 #if PYPY_VERSION_NUM < 0x07030600
jpayne@69 983 #if defined(__cplusplus) && __cplusplus >= 201402L
jpayne@69 984 [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
jpayne@69 985 #elif defined(__GNUC__) || defined(__clang__)
jpayne@69 986 __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
jpayne@69 987 #elif defined(_MSC_VER)
jpayne@69 988 __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
jpayne@69 989 #endif
jpayne@69 990 static CYTHON_INLINE int PyGILState_Check(void) {
jpayne@69 991 return 0;
jpayne@69 992 }
jpayne@69 993 #else // PYPY_VERSION_NUM < 0x07030600
jpayne@69 994 #endif // PYPY_VERSION_NUM < 0x07030600
jpayne@69 995 #else
jpayne@69 996 static CYTHON_INLINE int PyGILState_Check(void) {
jpayne@69 997 PyThreadState * tstate = _PyThreadState_Current;
jpayne@69 998 return tstate && (tstate == PyGILState_GetThisThreadState());
jpayne@69 999 }
jpayne@69 1000 #endif
jpayne@69 1001 #endif
jpayne@69 1002 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
jpayne@69 1003 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
jpayne@69 1004 #else
jpayne@69 1005 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
jpayne@69 1006 #endif
jpayne@69 1007 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
jpayne@69 1008 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
jpayne@69 1009 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
jpayne@69 1010 #else
jpayne@69 1011 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
jpayne@69 1012 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
jpayne@69 1013 #endif
jpayne@69 1014 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
jpayne@69 1015 #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
jpayne@69 1016 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
jpayne@69 1017 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
jpayne@69 1018 if (res == NULL) PyErr_Clear();
jpayne@69 1019 return res;
jpayne@69 1020 }
jpayne@69 1021 #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
jpayne@69 1022 #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
jpayne@69 1023 #define __Pyx_PyDict_GetItemStr PyDict_GetItem
jpayne@69 1024 #else
jpayne@69 1025 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
jpayne@69 1026 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 1027 return PyDict_GetItem(dict, name);
jpayne@69 1028 #else
jpayne@69 1029 PyDictEntry *ep;
jpayne@69 1030 PyDictObject *mp = (PyDictObject*) dict;
jpayne@69 1031 long hash = ((PyStringObject *) name)->ob_shash;
jpayne@69 1032 assert(hash != -1);
jpayne@69 1033 ep = (mp->ma_lookup)(mp, name, hash);
jpayne@69 1034 if (ep == NULL) {
jpayne@69 1035 return NULL;
jpayne@69 1036 }
jpayne@69 1037 return ep->me_value;
jpayne@69 1038 #endif
jpayne@69 1039 }
jpayne@69 1040 #define __Pyx_PyDict_GetItemStr PyDict_GetItem
jpayne@69 1041 #endif
jpayne@69 1042 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 1043 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
jpayne@69 1044 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
jpayne@69 1045 #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext)
jpayne@69 1046 #else
jpayne@69 1047 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
jpayne@69 1048 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
jpayne@69 1049 #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next
jpayne@69 1050 #endif
jpayne@69 1051 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 1052 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
jpayne@69 1053 #else
jpayne@69 1054 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
jpayne@69 1055 #endif
jpayne@69 1056 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
jpayne@69 1057 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
jpayne@69 1058 PyTypeObject *type = Py_TYPE((PyObject*)obj);\
jpayne@69 1059 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
jpayne@69 1060 PyObject_GC_Del(obj);\
jpayne@69 1061 Py_DECREF(type);\
jpayne@69 1062 }
jpayne@69 1063 #else
jpayne@69 1064 #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
jpayne@69 1065 #endif
jpayne@69 1066 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 1067 #define CYTHON_PEP393_ENABLED 1
jpayne@69 1068 #define __Pyx_PyUnicode_READY(op) (0)
jpayne@69 1069 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u)
jpayne@69 1070 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
jpayne@69 1071 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
jpayne@69 1072 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
jpayne@69 1073 #define __Pyx_PyUnicode_DATA(u) ((void*)u)
jpayne@69 1074 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
jpayne@69 1075 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
jpayne@69 1076 #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
jpayne@69 1077 #define CYTHON_PEP393_ENABLED 1
jpayne@69 1078 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 1079 #define __Pyx_PyUnicode_READY(op) (0)
jpayne@69 1080 #else
jpayne@69 1081 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
jpayne@69 1082 0 : _PyUnicode_Ready((PyObject *)(op)))
jpayne@69 1083 #endif
jpayne@69 1084 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
jpayne@69 1085 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
jpayne@69 1086 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
jpayne@69 1087 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
jpayne@69 1088 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
jpayne@69 1089 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
jpayne@69 1090 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
jpayne@69 1091 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 1092 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
jpayne@69 1093 #else
jpayne@69 1094 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
jpayne@69 1095 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
jpayne@69 1096 #else
jpayne@69 1097 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
jpayne@69 1098 #endif
jpayne@69 1099 #endif
jpayne@69 1100 #else
jpayne@69 1101 #define CYTHON_PEP393_ENABLED 0
jpayne@69 1102 #define PyUnicode_1BYTE_KIND 1
jpayne@69 1103 #define PyUnicode_2BYTE_KIND 2
jpayne@69 1104 #define PyUnicode_4BYTE_KIND 4
jpayne@69 1105 #define __Pyx_PyUnicode_READY(op) (0)
jpayne@69 1106 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
jpayne@69 1107 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
jpayne@69 1108 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
jpayne@69 1109 #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE))
jpayne@69 1110 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
jpayne@69 1111 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
jpayne@69 1112 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
jpayne@69 1113 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
jpayne@69 1114 #endif
jpayne@69 1115 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 1116 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
jpayne@69 1117 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
jpayne@69 1118 #else
jpayne@69 1119 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
jpayne@69 1120 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
jpayne@69 1121 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
jpayne@69 1122 #endif
jpayne@69 1123 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 1124 #if !defined(PyUnicode_DecodeUnicodeEscape)
jpayne@69 1125 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
jpayne@69 1126 #endif
jpayne@69 1127 #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
jpayne@69 1128 #undef PyUnicode_Contains
jpayne@69 1129 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
jpayne@69 1130 #endif
jpayne@69 1131 #if !defined(PyByteArray_Check)
jpayne@69 1132 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
jpayne@69 1133 #endif
jpayne@69 1134 #if !defined(PyObject_Format)
jpayne@69 1135 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
jpayne@69 1136 #endif
jpayne@69 1137 #endif
jpayne@69 1138 #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))
jpayne@69 1139 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
jpayne@69 1140 #if PY_MAJOR_VERSION >= 3
jpayne@69 1141 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
jpayne@69 1142 #else
jpayne@69 1143 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
jpayne@69 1144 #endif
jpayne@69 1145 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
jpayne@69 1146 #define PyObject_ASCII(o) PyObject_Repr(o)
jpayne@69 1147 #endif
jpayne@69 1148 #if PY_MAJOR_VERSION >= 3
jpayne@69 1149 #define PyBaseString_Type PyUnicode_Type
jpayne@69 1150 #define PyStringObject PyUnicodeObject
jpayne@69 1151 #define PyString_Type PyUnicode_Type
jpayne@69 1152 #define PyString_Check PyUnicode_Check
jpayne@69 1153 #define PyString_CheckExact PyUnicode_CheckExact
jpayne@69 1154 #ifndef PyObject_Unicode
jpayne@69 1155 #define PyObject_Unicode PyObject_Str
jpayne@69 1156 #endif
jpayne@69 1157 #endif
jpayne@69 1158 #if PY_MAJOR_VERSION >= 3
jpayne@69 1159 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
jpayne@69 1160 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
jpayne@69 1161 #else
jpayne@69 1162 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
jpayne@69 1163 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
jpayne@69 1164 #endif
jpayne@69 1165 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 1166 #define __Pyx_PySequence_ListKeepNew(obj)\
jpayne@69 1167 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
jpayne@69 1168 #else
jpayne@69 1169 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
jpayne@69 1170 #endif
jpayne@69 1171 #ifndef PySet_CheckExact
jpayne@69 1172 #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type)
jpayne@69 1173 #endif
jpayne@69 1174 #if PY_VERSION_HEX >= 0x030900A4
jpayne@69 1175 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
jpayne@69 1176 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
jpayne@69 1177 #else
jpayne@69 1178 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
jpayne@69 1179 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
jpayne@69 1180 #endif
jpayne@69 1181 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 1182 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
jpayne@69 1183 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
jpayne@69 1184 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
jpayne@69 1185 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
jpayne@69 1186 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
jpayne@69 1187 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
jpayne@69 1188 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
jpayne@69 1189 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
jpayne@69 1190 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
jpayne@69 1191 #else
jpayne@69 1192 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
jpayne@69 1193 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
jpayne@69 1194 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
jpayne@69 1195 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
jpayne@69 1196 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
jpayne@69 1197 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
jpayne@69 1198 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
jpayne@69 1199 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
jpayne@69 1200 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
jpayne@69 1201 #endif
jpayne@69 1202 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
jpayne@69 1203 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
jpayne@69 1204 #else
jpayne@69 1205 static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
jpayne@69 1206 PyObject *module = PyImport_AddModule(name);
jpayne@69 1207 Py_XINCREF(module);
jpayne@69 1208 return module;
jpayne@69 1209 }
jpayne@69 1210 #endif
jpayne@69 1211 #if PY_MAJOR_VERSION >= 3
jpayne@69 1212 #define PyIntObject PyLongObject
jpayne@69 1213 #define PyInt_Type PyLong_Type
jpayne@69 1214 #define PyInt_Check(op) PyLong_Check(op)
jpayne@69 1215 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
jpayne@69 1216 #define __Pyx_Py3Int_Check(op) PyLong_Check(op)
jpayne@69 1217 #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op)
jpayne@69 1218 #define PyInt_FromString PyLong_FromString
jpayne@69 1219 #define PyInt_FromUnicode PyLong_FromUnicode
jpayne@69 1220 #define PyInt_FromLong PyLong_FromLong
jpayne@69 1221 #define PyInt_FromSize_t PyLong_FromSize_t
jpayne@69 1222 #define PyInt_FromSsize_t PyLong_FromSsize_t
jpayne@69 1223 #define PyInt_AsLong PyLong_AsLong
jpayne@69 1224 #define PyInt_AS_LONG PyLong_AS_LONG
jpayne@69 1225 #define PyInt_AsSsize_t PyLong_AsSsize_t
jpayne@69 1226 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
jpayne@69 1227 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
jpayne@69 1228 #define PyNumber_Int PyNumber_Long
jpayne@69 1229 #else
jpayne@69 1230 #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op))
jpayne@69 1231 #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op))
jpayne@69 1232 #endif
jpayne@69 1233 #if PY_MAJOR_VERSION >= 3
jpayne@69 1234 #define PyBoolObject PyLongObject
jpayne@69 1235 #endif
jpayne@69 1236 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
jpayne@69 1237 #ifndef PyUnicode_InternFromString
jpayne@69 1238 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
jpayne@69 1239 #endif
jpayne@69 1240 #endif
jpayne@69 1241 #if PY_VERSION_HEX < 0x030200A4
jpayne@69 1242 typedef long Py_hash_t;
jpayne@69 1243 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
jpayne@69 1244 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
jpayne@69 1245 #else
jpayne@69 1246 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
jpayne@69 1247 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
jpayne@69 1248 #endif
jpayne@69 1249 #if CYTHON_USE_ASYNC_SLOTS
jpayne@69 1250 #if PY_VERSION_HEX >= 0x030500B1
jpayne@69 1251 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
jpayne@69 1252 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
jpayne@69 1253 #else
jpayne@69 1254 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
jpayne@69 1255 #endif
jpayne@69 1256 #else
jpayne@69 1257 #define __Pyx_PyType_AsAsync(obj) NULL
jpayne@69 1258 #endif
jpayne@69 1259 #ifndef __Pyx_PyAsyncMethodsStruct
jpayne@69 1260 typedef struct {
jpayne@69 1261 unaryfunc am_await;
jpayne@69 1262 unaryfunc am_aiter;
jpayne@69 1263 unaryfunc am_anext;
jpayne@69 1264 } __Pyx_PyAsyncMethodsStruct;
jpayne@69 1265 #endif
jpayne@69 1266
jpayne@69 1267 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
jpayne@69 1268 #if !defined(_USE_MATH_DEFINES)
jpayne@69 1269 #define _USE_MATH_DEFINES
jpayne@69 1270 #endif
jpayne@69 1271 #endif
jpayne@69 1272 #include <math.h>
jpayne@69 1273 #ifdef NAN
jpayne@69 1274 #define __PYX_NAN() ((float) NAN)
jpayne@69 1275 #else
jpayne@69 1276 static CYTHON_INLINE float __PYX_NAN() {
jpayne@69 1277 float value;
jpayne@69 1278 memset(&value, 0xFF, sizeof(value));
jpayne@69 1279 return value;
jpayne@69 1280 }
jpayne@69 1281 #endif
jpayne@69 1282 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
jpayne@69 1283 #define __Pyx_truncl trunc
jpayne@69 1284 #else
jpayne@69 1285 #define __Pyx_truncl truncl
jpayne@69 1286 #endif
jpayne@69 1287
jpayne@69 1288 #define __PYX_MARK_ERR_POS(f_index, lineno) \
jpayne@69 1289 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
jpayne@69 1290 #define __PYX_ERR(f_index, lineno, Ln_error) \
jpayne@69 1291 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
jpayne@69 1292
jpayne@69 1293 #ifdef CYTHON_EXTERN_C
jpayne@69 1294 #undef __PYX_EXTERN_C
jpayne@69 1295 #define __PYX_EXTERN_C CYTHON_EXTERN_C
jpayne@69 1296 #elif defined(__PYX_EXTERN_C)
jpayne@69 1297 #ifdef _MSC_VER
jpayne@69 1298 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
jpayne@69 1299 #else
jpayne@69 1300 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
jpayne@69 1301 #endif
jpayne@69 1302 #else
jpayne@69 1303 #ifdef __cplusplus
jpayne@69 1304 #define __PYX_EXTERN_C extern "C"
jpayne@69 1305 #else
jpayne@69 1306 #define __PYX_EXTERN_C extern
jpayne@69 1307 #endif
jpayne@69 1308 #endif
jpayne@69 1309
jpayne@69 1310 #define __PYX_HAVE__pysam__libctabix
jpayne@69 1311 #define __PYX_HAVE_API__pysam__libctabix
jpayne@69 1312 /* Early includes */
jpayne@69 1313 #include <stdint.h>
jpayne@69 1314 #include <string.h>
jpayne@69 1315 #include <stdlib.h>
jpayne@69 1316 #include <stdio.h>
jpayne@69 1317 #include "fcntl.h"
jpayne@69 1318 #include "unistd.h"
jpayne@69 1319 #include <sys/types.h>
jpayne@69 1320 #include "stdarg.h"
jpayne@69 1321 #include "htslib/kstring.h"
jpayne@69 1322 #include "htslib_util.h"
jpayne@69 1323 #include "htslib/hfile.h"
jpayne@69 1324 #include "htslib/bgzf.h"
jpayne@69 1325 #include "htslib/hts.h"
jpayne@69 1326 #include "htslib/sam.h"
jpayne@69 1327 #include "htslib/faidx.h"
jpayne@69 1328 #include "htslib/tbx.h"
jpayne@69 1329 #include "htslib/vcf.h"
jpayne@69 1330 #include "htslib/vcfutils.h"
jpayne@69 1331 #include "htslib/cram.h"
jpayne@69 1332 #include "pysam_stream.h"
jpayne@69 1333 #include <errno.h>
jpayne@69 1334 #include <unistd.h>
jpayne@69 1335 #include <stddef.h>
jpayne@69 1336 #include "pythread.h"
jpayne@69 1337
jpayne@69 1338 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 1339 #ifdef _MSC_VER
jpayne@69 1340 #pragma message ("This module uses CPython specific internals of 'array.array', which are not available in PyPy.")
jpayne@69 1341 #else
jpayne@69 1342 #warning This module uses CPython specific internals of 'array.array', which are not available in PyPy.
jpayne@69 1343 #endif
jpayne@69 1344 #endif
jpayne@69 1345
jpayne@69 1346 #ifdef _OPENMP
jpayne@69 1347 #include <omp.h>
jpayne@69 1348 #endif /* _OPENMP */
jpayne@69 1349
jpayne@69 1350 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
jpayne@69 1351 #define CYTHON_WITHOUT_ASSERTIONS
jpayne@69 1352 #endif
jpayne@69 1353
jpayne@69 1354 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
jpayne@69 1355 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
jpayne@69 1356
jpayne@69 1357 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
jpayne@69 1358 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
jpayne@69 1359 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
jpayne@69 1360 #define __PYX_DEFAULT_STRING_ENCODING ""
jpayne@69 1361 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
jpayne@69 1362 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
jpayne@69 1363 #define __Pyx_uchar_cast(c) ((unsigned char)c)
jpayne@69 1364 #define __Pyx_long_cast(x) ((long)x)
jpayne@69 1365 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
jpayne@69 1366 (sizeof(type) < sizeof(Py_ssize_t)) ||\
jpayne@69 1367 (sizeof(type) > sizeof(Py_ssize_t) &&\
jpayne@69 1368 likely(v < (type)PY_SSIZE_T_MAX ||\
jpayne@69 1369 v == (type)PY_SSIZE_T_MAX) &&\
jpayne@69 1370 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
jpayne@69 1371 v == (type)PY_SSIZE_T_MIN))) ||\
jpayne@69 1372 (sizeof(type) == sizeof(Py_ssize_t) &&\
jpayne@69 1373 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
jpayne@69 1374 v == (type)PY_SSIZE_T_MAX))) )
jpayne@69 1375 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
jpayne@69 1376 return (size_t) i < (size_t) limit;
jpayne@69 1377 }
jpayne@69 1378 #if defined (__cplusplus) && __cplusplus >= 201103L
jpayne@69 1379 #include <cstdlib>
jpayne@69 1380 #define __Pyx_sst_abs(value) std::abs(value)
jpayne@69 1381 #elif SIZEOF_INT >= SIZEOF_SIZE_T
jpayne@69 1382 #define __Pyx_sst_abs(value) abs(value)
jpayne@69 1383 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
jpayne@69 1384 #define __Pyx_sst_abs(value) labs(value)
jpayne@69 1385 #elif defined (_MSC_VER)
jpayne@69 1386 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
jpayne@69 1387 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
jpayne@69 1388 #define __Pyx_sst_abs(value) llabs(value)
jpayne@69 1389 #elif defined (__GNUC__)
jpayne@69 1390 #define __Pyx_sst_abs(value) __builtin_llabs(value)
jpayne@69 1391 #else
jpayne@69 1392 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
jpayne@69 1393 #endif
jpayne@69 1394 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
jpayne@69 1395 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
jpayne@69 1396 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
jpayne@69 1397 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
jpayne@69 1398 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
jpayne@69 1399 #define __Pyx_PyBytes_FromString PyBytes_FromString
jpayne@69 1400 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
jpayne@69 1401 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
jpayne@69 1402 #if PY_MAJOR_VERSION < 3
jpayne@69 1403 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
jpayne@69 1404 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
jpayne@69 1405 #else
jpayne@69 1406 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
jpayne@69 1407 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
jpayne@69 1408 #endif
jpayne@69 1409 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
jpayne@69 1410 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
jpayne@69 1411 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
jpayne@69 1412 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
jpayne@69 1413 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
jpayne@69 1414 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
jpayne@69 1415 #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
jpayne@69 1416 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
jpayne@69 1417 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
jpayne@69 1418 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
jpayne@69 1419 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
jpayne@69 1420 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
jpayne@69 1421 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
jpayne@69 1422 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
jpayne@69 1423 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
jpayne@69 1424 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
jpayne@69 1425 #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
jpayne@69 1426 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
jpayne@69 1427 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
jpayne@69 1428 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
jpayne@69 1429 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
jpayne@69 1430 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
jpayne@69 1431 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
jpayne@69 1432 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
jpayne@69 1433 #define __Pyx_PySequence_Tuple(obj)\
jpayne@69 1434 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
jpayne@69 1435 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
jpayne@69 1436 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
jpayne@69 1437 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
jpayne@69 1438 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 1439 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
jpayne@69 1440 #else
jpayne@69 1441 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
jpayne@69 1442 #endif
jpayne@69 1443 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
jpayne@69 1444 #if PY_MAJOR_VERSION >= 3
jpayne@69 1445 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
jpayne@69 1446 #else
jpayne@69 1447 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
jpayne@69 1448 #endif
jpayne@69 1449 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 1450 #if PY_VERSION_HEX >= 0x030C00A7
jpayne@69 1451 #ifndef _PyLong_SIGN_MASK
jpayne@69 1452 #define _PyLong_SIGN_MASK 3
jpayne@69 1453 #endif
jpayne@69 1454 #ifndef _PyLong_NON_SIZE_BITS
jpayne@69 1455 #define _PyLong_NON_SIZE_BITS 3
jpayne@69 1456 #endif
jpayne@69 1457 #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
jpayne@69 1458 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0)
jpayne@69 1459 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
jpayne@69 1460 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1)
jpayne@69 1461 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0)
jpayne@69 1462 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
jpayne@69 1463 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
jpayne@69 1464 #define __Pyx_PyLong_SignedDigitCount(x)\
jpayne@69 1465 ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
jpayne@69 1466 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
jpayne@69 1467 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
jpayne@69 1468 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
jpayne@69 1469 #else
jpayne@69 1470 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
jpayne@69 1471 #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
jpayne@69 1472 #endif
jpayne@69 1473 typedef Py_ssize_t __Pyx_compact_pylong;
jpayne@69 1474 typedef size_t __Pyx_compact_upylong;
jpayne@69 1475 #else
jpayne@69 1476 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
jpayne@69 1477 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
jpayne@69 1478 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
jpayne@69 1479 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
jpayne@69 1480 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
jpayne@69 1481 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
jpayne@69 1482 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
jpayne@69 1483 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
jpayne@69 1484 #define __Pyx_PyLong_CompactValue(x)\
jpayne@69 1485 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
jpayne@69 1486 typedef sdigit __Pyx_compact_pylong;
jpayne@69 1487 typedef digit __Pyx_compact_upylong;
jpayne@69 1488 #endif
jpayne@69 1489 #if PY_VERSION_HEX >= 0x030C00A5
jpayne@69 1490 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
jpayne@69 1491 #else
jpayne@69 1492 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
jpayne@69 1493 #endif
jpayne@69 1494 #endif
jpayne@69 1495 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@69 1496 #include <string.h>
jpayne@69 1497 static int __Pyx_sys_getdefaultencoding_not_ascii;
jpayne@69 1498 static int __Pyx_init_sys_getdefaultencoding_params(void) {
jpayne@69 1499 PyObject* sys;
jpayne@69 1500 PyObject* default_encoding = NULL;
jpayne@69 1501 PyObject* ascii_chars_u = NULL;
jpayne@69 1502 PyObject* ascii_chars_b = NULL;
jpayne@69 1503 const char* default_encoding_c;
jpayne@69 1504 sys = PyImport_ImportModule("sys");
jpayne@69 1505 if (!sys) goto bad;
jpayne@69 1506 default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
jpayne@69 1507 Py_DECREF(sys);
jpayne@69 1508 if (!default_encoding) goto bad;
jpayne@69 1509 default_encoding_c = PyBytes_AsString(default_encoding);
jpayne@69 1510 if (!default_encoding_c) goto bad;
jpayne@69 1511 if (strcmp(default_encoding_c, "ascii") == 0) {
jpayne@69 1512 __Pyx_sys_getdefaultencoding_not_ascii = 0;
jpayne@69 1513 } else {
jpayne@69 1514 char ascii_chars[128];
jpayne@69 1515 int c;
jpayne@69 1516 for (c = 0; c < 128; c++) {
jpayne@69 1517 ascii_chars[c] = (char) c;
jpayne@69 1518 }
jpayne@69 1519 __Pyx_sys_getdefaultencoding_not_ascii = 1;
jpayne@69 1520 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
jpayne@69 1521 if (!ascii_chars_u) goto bad;
jpayne@69 1522 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
jpayne@69 1523 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
jpayne@69 1524 PyErr_Format(
jpayne@69 1525 PyExc_ValueError,
jpayne@69 1526 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
jpayne@69 1527 default_encoding_c);
jpayne@69 1528 goto bad;
jpayne@69 1529 }
jpayne@69 1530 Py_DECREF(ascii_chars_u);
jpayne@69 1531 Py_DECREF(ascii_chars_b);
jpayne@69 1532 }
jpayne@69 1533 Py_DECREF(default_encoding);
jpayne@69 1534 return 0;
jpayne@69 1535 bad:
jpayne@69 1536 Py_XDECREF(default_encoding);
jpayne@69 1537 Py_XDECREF(ascii_chars_u);
jpayne@69 1538 Py_XDECREF(ascii_chars_b);
jpayne@69 1539 return -1;
jpayne@69 1540 }
jpayne@69 1541 #endif
jpayne@69 1542 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
jpayne@69 1543 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
jpayne@69 1544 #else
jpayne@69 1545 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
jpayne@69 1546 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
jpayne@69 1547 #include <string.h>
jpayne@69 1548 static char* __PYX_DEFAULT_STRING_ENCODING;
jpayne@69 1549 static int __Pyx_init_sys_getdefaultencoding_params(void) {
jpayne@69 1550 PyObject* sys;
jpayne@69 1551 PyObject* default_encoding = NULL;
jpayne@69 1552 char* default_encoding_c;
jpayne@69 1553 sys = PyImport_ImportModule("sys");
jpayne@69 1554 if (!sys) goto bad;
jpayne@69 1555 default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
jpayne@69 1556 Py_DECREF(sys);
jpayne@69 1557 if (!default_encoding) goto bad;
jpayne@69 1558 default_encoding_c = PyBytes_AsString(default_encoding);
jpayne@69 1559 if (!default_encoding_c) goto bad;
jpayne@69 1560 __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
jpayne@69 1561 if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
jpayne@69 1562 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
jpayne@69 1563 Py_DECREF(default_encoding);
jpayne@69 1564 return 0;
jpayne@69 1565 bad:
jpayne@69 1566 Py_XDECREF(default_encoding);
jpayne@69 1567 return -1;
jpayne@69 1568 }
jpayne@69 1569 #endif
jpayne@69 1570 #endif
jpayne@69 1571
jpayne@69 1572
jpayne@69 1573 /* Test for GCC > 2.95 */
jpayne@69 1574 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
jpayne@69 1575 #define likely(x) __builtin_expect(!!(x), 1)
jpayne@69 1576 #define unlikely(x) __builtin_expect(!!(x), 0)
jpayne@69 1577 #else /* !__GNUC__ or GCC < 2.95 */
jpayne@69 1578 #define likely(x) (x)
jpayne@69 1579 #define unlikely(x) (x)
jpayne@69 1580 #endif /* __GNUC__ */
jpayne@69 1581 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
jpayne@69 1582
jpayne@69 1583 #if !CYTHON_USE_MODULE_STATE
jpayne@69 1584 static PyObject *__pyx_m = NULL;
jpayne@69 1585 #endif
jpayne@69 1586 static int __pyx_lineno;
jpayne@69 1587 static int __pyx_clineno = 0;
jpayne@69 1588 static const char * __pyx_cfilenm = __FILE__;
jpayne@69 1589 static const char *__pyx_filename;
jpayne@69 1590
jpayne@69 1591 /* #### Code section: filename_table ### */
jpayne@69 1592
jpayne@69 1593 static const char *__pyx_f[] = {
jpayne@69 1594 "pysam/libctabix.pyx",
jpayne@69 1595 "<stringsource>",
jpayne@69 1596 "contextvars.pxd",
jpayne@69 1597 "array.pxd",
jpayne@69 1598 "pysam/libctabix.pxd",
jpayne@69 1599 "type.pxd",
jpayne@69 1600 "bool.pxd",
jpayne@69 1601 "complex.pxd",
jpayne@69 1602 "pysam/libctabixproxies.pxd",
jpayne@69 1603 };
jpayne@69 1604 /* #### Code section: utility_code_proto_before_types ### */
jpayne@69 1605 /* ForceInitThreads.proto */
jpayne@69 1606 #ifndef __PYX_FORCE_INIT_THREADS
jpayne@69 1607 #define __PYX_FORCE_INIT_THREADS 0
jpayne@69 1608 #endif
jpayne@69 1609
jpayne@69 1610 /* NoFastGil.proto */
jpayne@69 1611 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
jpayne@69 1612 #define __Pyx_PyGILState_Release PyGILState_Release
jpayne@69 1613 #define __Pyx_FastGIL_Remember()
jpayne@69 1614 #define __Pyx_FastGIL_Forget()
jpayne@69 1615 #define __Pyx_FastGilFuncInit()
jpayne@69 1616
jpayne@69 1617 /* #### Code section: numeric_typedefs ### */
jpayne@69 1618 /* #### Code section: complex_type_declarations ### */
jpayne@69 1619 /* #### Code section: type_declarations ### */
jpayne@69 1620
jpayne@69 1621 /*--- Type declarations ---*/
jpayne@69 1622 #ifndef _ARRAYARRAY_H
jpayne@69 1623 struct arrayobject;
jpayne@69 1624 typedef struct arrayobject arrayobject;
jpayne@69 1625 #endif
jpayne@69 1626 struct __pyx_obj_5pysam_10libchtslib_HTSFile;
jpayne@69 1627 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy;
jpayne@69 1628 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator;
jpayne@69 1629 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy;
jpayne@69 1630 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy;
jpayne@69 1631 struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy;
jpayne@69 1632 struct __pyx_obj_5pysam_16libctabixproxies_BedProxy;
jpayne@69 1633 struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy;
jpayne@69 1634 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator;
jpayne@69 1635 struct __pyx_obj_5pysam_9libctabix_TabixFile;
jpayne@69 1636 struct __pyx_obj_5pysam_9libctabix_Parser;
jpayne@69 1637 struct __pyx_obj_5pysam_9libctabix_asTuple;
jpayne@69 1638 struct __pyx_obj_5pysam_9libctabix_asGTF;
jpayne@69 1639 struct __pyx_obj_5pysam_9libctabix_asGFF3;
jpayne@69 1640 struct __pyx_obj_5pysam_9libctabix_asBed;
jpayne@69 1641 struct __pyx_obj_5pysam_9libctabix_asVCF;
jpayne@69 1642 struct __pyx_obj_5pysam_9libctabix_TabixIterator;
jpayne@69 1643 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed;
jpayne@69 1644 struct __pyx_obj_5pysam_9libctabix_GZIterator;
jpayne@69 1645 struct __pyx_obj_5pysam_9libctabix_GZIteratorHead;
jpayne@69 1646 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed;
jpayne@69 1647 struct __pyx_obj_5pysam_9libctabix_Tabixfile;
jpayne@69 1648 struct __pyx_opt_args_7cpython_11contextvars_get_value;
jpayne@69 1649 struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default;
jpayne@69 1650
jpayne@69 1651 /* "cpython/contextvars.pxd":112
jpayne@69 1652 *
jpayne@69 1653 *
jpayne@69 1654 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 1655 * """Return a new reference to the value of the context variable,
jpayne@69 1656 * or the default value of the context variable,
jpayne@69 1657 */
jpayne@69 1658 struct __pyx_opt_args_7cpython_11contextvars_get_value {
jpayne@69 1659 int __pyx_n;
jpayne@69 1660 PyObject *default_value;
jpayne@69 1661 };
jpayne@69 1662
jpayne@69 1663 /* "cpython/contextvars.pxd":129
jpayne@69 1664 *
jpayne@69 1665 *
jpayne@69 1666 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 1667 * """Return a new reference to the value of the context variable,
jpayne@69 1668 * or the provided default value if no such value was found.
jpayne@69 1669 */
jpayne@69 1670 struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default {
jpayne@69 1671 int __pyx_n;
jpayne@69 1672 PyObject *default_value;
jpayne@69 1673 };
jpayne@69 1674 struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy;
jpayne@69 1675
jpayne@69 1676 /* "pysam/libctabixproxies.pxd":23
jpayne@69 1677 * cdef take(self, char * buffer, size_t nbytes)
jpayne@69 1678 * cdef present(self, char * buffer, size_t nbytes)
jpayne@69 1679 * cdef copy(self, char * buffer, size_t nbytes, bint reset=*) # <<<<<<<<<<<<<<
jpayne@69 1680 * cdef update(self, char * buffer, size_t nbytes)
jpayne@69 1681 *
jpayne@69 1682 */
jpayne@69 1683 struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy {
jpayne@69 1684 int __pyx_n;
jpayne@69 1685 int reset;
jpayne@69 1686 };
jpayne@69 1687 struct __pyx_opt_args_5pysam_9libcutils_parse_region;
jpayne@69 1688 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array;
jpayne@69 1689 struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring;
jpayne@69 1690 struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring;
jpayne@69 1691 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str;
jpayne@69 1692 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes;
jpayne@69 1693 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len;
jpayne@69 1694 struct __pyx_opt_args_5pysam_9libcutils_force_str;
jpayne@69 1695 struct __pyx_opt_args_5pysam_9libcutils_force_bytes;
jpayne@69 1696 struct __pyx_opt_args_5pysam_9libcutils_decode_bytes;
jpayne@69 1697
jpayne@69 1698 /* "pysam/libcutils.pxd":8
jpayne@69 1699 * from cpython cimport array as c_array
jpayne@69 1700 *
jpayne@69 1701 * cpdef parse_region(contig=*, start=*, stop=*, region=*, reference=*, end=*) # <<<<<<<<<<<<<<
jpayne@69 1702 *
jpayne@69 1703 * cdef int libc_whence_from_io(int whence)
jpayne@69 1704 */
jpayne@69 1705 struct __pyx_opt_args_5pysam_9libcutils_parse_region {
jpayne@69 1706 int __pyx_n;
jpayne@69 1707 PyObject *contig;
jpayne@69 1708 PyObject *start;
jpayne@69 1709 PyObject *stop;
jpayne@69 1710 PyObject *region;
jpayne@69 1711 PyObject *reference;
jpayne@69 1712 PyObject *end;
jpayne@69 1713 };
jpayne@69 1714
jpayne@69 1715 /* "pysam/libcutils.pxd":15
jpayne@69 1716 * # Utility functions for quality string conversions
jpayne@69 1717 *
jpayne@69 1718 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*) # <<<<<<<<<<<<<<
jpayne@69 1719 * cpdef array_to_qualitystring(c_array.array arr, int offset=*)
jpayne@69 1720 * cpdef qualities_to_qualitystring(qualities, int offset=*)
jpayne@69 1721 */
jpayne@69 1722 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array {
jpayne@69 1723 int __pyx_n;
jpayne@69 1724 int offset;
jpayne@69 1725 };
jpayne@69 1726
jpayne@69 1727 /* "pysam/libcutils.pxd":16
jpayne@69 1728 *
jpayne@69 1729 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*)
jpayne@69 1730 * cpdef array_to_qualitystring(c_array.array arr, int offset=*) # <<<<<<<<<<<<<<
jpayne@69 1731 * cpdef qualities_to_qualitystring(qualities, int offset=*)
jpayne@69 1732 *
jpayne@69 1733 */
jpayne@69 1734 struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring {
jpayne@69 1735 int __pyx_n;
jpayne@69 1736 int offset;
jpayne@69 1737 };
jpayne@69 1738
jpayne@69 1739 /* "pysam/libcutils.pxd":17
jpayne@69 1740 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*)
jpayne@69 1741 * cpdef array_to_qualitystring(c_array.array arr, int offset=*)
jpayne@69 1742 * cpdef qualities_to_qualitystring(qualities, int offset=*) # <<<<<<<<<<<<<<
jpayne@69 1743 *
jpayne@69 1744 * ########################################################################
jpayne@69 1745 */
jpayne@69 1746 struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring {
jpayne@69 1747 int __pyx_n;
jpayne@69 1748 int offset;
jpayne@69 1749 };
jpayne@69 1750
jpayne@69 1751 /* "pysam/libcutils.pxd":29
jpayne@69 1752 * ## Python 3 compatibility functions
jpayne@69 1753 * ########################################################################
jpayne@69 1754 * cdef charptr_to_str(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1755 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
jpayne@69 1756 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@69 1757 */
jpayne@69 1758 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str {
jpayne@69 1759 int __pyx_n;
jpayne@69 1760 PyObject *encoding;
jpayne@69 1761 PyObject *errors;
jpayne@69 1762 };
jpayne@69 1763
jpayne@69 1764 /* "pysam/libcutils.pxd":30
jpayne@69 1765 * ########################################################################
jpayne@69 1766 * cdef charptr_to_str(const char *s, encoding=*, errors=*)
jpayne@69 1767 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1768 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@69 1769 * cdef force_str(object s, encoding=*, errors=*)
jpayne@69 1770 */
jpayne@69 1771 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes {
jpayne@69 1772 int __pyx_n;
jpayne@69 1773 PyObject *encoding;
jpayne@69 1774 PyObject *errors;
jpayne@69 1775 };
jpayne@69 1776
jpayne@69 1777 /* "pysam/libcutils.pxd":31
jpayne@69 1778 * cdef charptr_to_str(const char *s, encoding=*, errors=*)
jpayne@69 1779 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
jpayne@69 1780 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1781 * cdef force_str(object s, encoding=*, errors=*)
jpayne@69 1782 * cdef bytes force_bytes(object s, encoding=*, errors=*)
jpayne@69 1783 */
jpayne@69 1784 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len {
jpayne@69 1785 int __pyx_n;
jpayne@69 1786 PyObject *encoding;
jpayne@69 1787 PyObject *errors;
jpayne@69 1788 };
jpayne@69 1789
jpayne@69 1790 /* "pysam/libcutils.pxd":32
jpayne@69 1791 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
jpayne@69 1792 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@69 1793 * cdef force_str(object s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1794 * cdef bytes force_bytes(object s, encoding=*, errors=*)
jpayne@69 1795 * cdef decode_bytes(bytes s, encoding=*, errors=*)
jpayne@69 1796 */
jpayne@69 1797 struct __pyx_opt_args_5pysam_9libcutils_force_str {
jpayne@69 1798 int __pyx_n;
jpayne@69 1799 PyObject *encoding;
jpayne@69 1800 PyObject *errors;
jpayne@69 1801 };
jpayne@69 1802
jpayne@69 1803 /* "pysam/libcutils.pxd":33
jpayne@69 1804 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@69 1805 * cdef force_str(object s, encoding=*, errors=*)
jpayne@69 1806 * cdef bytes force_bytes(object s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1807 * cdef decode_bytes(bytes s, encoding=*, errors=*)
jpayne@69 1808 * cdef bytes encode_filename(object filename)
jpayne@69 1809 */
jpayne@69 1810 struct __pyx_opt_args_5pysam_9libcutils_force_bytes {
jpayne@69 1811 int __pyx_n;
jpayne@69 1812 PyObject *encoding;
jpayne@69 1813 PyObject *errors;
jpayne@69 1814 };
jpayne@69 1815
jpayne@69 1816 /* "pysam/libcutils.pxd":34
jpayne@69 1817 * cdef force_str(object s, encoding=*, errors=*)
jpayne@69 1818 * cdef bytes force_bytes(object s, encoding=*, errors=*)
jpayne@69 1819 * cdef decode_bytes(bytes s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1820 * cdef bytes encode_filename(object filename)
jpayne@69 1821 * cdef from_string_and_size(const char *s, size_t length)
jpayne@69 1822 */
jpayne@69 1823 struct __pyx_opt_args_5pysam_9libcutils_decode_bytes {
jpayne@69 1824 int __pyx_n;
jpayne@69 1825 PyObject *encoding;
jpayne@69 1826 PyObject *errors;
jpayne@69 1827 };
jpayne@69 1828
jpayne@69 1829 /* "pysam/libchtslib.pxd":2706
jpayne@69 1830 *
jpayne@69 1831 *
jpayne@69 1832 * cdef class HTSFile(object): # <<<<<<<<<<<<<<
jpayne@69 1833 * cdef htsFile *htsfile # pointer to htsFile structure
jpayne@69 1834 * cdef int64_t start_offset # BGZF offset of first record
jpayne@69 1835 */
jpayne@69 1836 struct __pyx_obj_5pysam_10libchtslib_HTSFile {
jpayne@69 1837 PyObject_HEAD
jpayne@69 1838 struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile *__pyx_vtab;
jpayne@69 1839 htsFile *htsfile;
jpayne@69 1840 int64_t start_offset;
jpayne@69 1841 PyObject *filename;
jpayne@69 1842 PyObject *mode;
jpayne@69 1843 PyObject *threads;
jpayne@69 1844 PyObject *index_filename;
jpayne@69 1845 int is_stream;
jpayne@69 1846 int is_remote;
jpayne@69 1847 int duplicate_filehandle;
jpayne@69 1848 };
jpayne@69 1849
jpayne@69 1850
jpayne@69 1851 /* "pysam/libctabixproxies.pxd":5
jpayne@69 1852 * from libc.stdint cimport uint8_t, int32_t, uint32_t, int64_t, uint64_t
jpayne@69 1853 *
jpayne@69 1854 * cdef class TupleProxy: # <<<<<<<<<<<<<<
jpayne@69 1855 *
jpayne@69 1856 * cdef:
jpayne@69 1857 */
jpayne@69 1858 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy {
jpayne@69 1859 PyObject_HEAD
jpayne@69 1860 struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *__pyx_vtab;
jpayne@69 1861 char *data;
jpayne@69 1862 char **fields;
jpayne@69 1863 int nfields;
jpayne@69 1864 int nbytes;
jpayne@69 1865 int offset;
jpayne@69 1866 int is_modified;
jpayne@69 1867 PyObject *encoding;
jpayne@69 1868 };
jpayne@69 1869
jpayne@69 1870
jpayne@69 1871 /* "pysam/libctabixproxies.pxd":27
jpayne@69 1872 *
jpayne@69 1873 *
jpayne@69 1874 * cdef class TupleProxyIterator: # <<<<<<<<<<<<<<
jpayne@69 1875 * cdef TupleProxy proxy
jpayne@69 1876 * cdef int index
jpayne@69 1877 */
jpayne@69 1878 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator {
jpayne@69 1879 PyObject_HEAD
jpayne@69 1880 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *proxy;
jpayne@69 1881 int index;
jpayne@69 1882 };
jpayne@69 1883
jpayne@69 1884
jpayne@69 1885 /* "pysam/libctabixproxies.pxd":32
jpayne@69 1886 *
jpayne@69 1887 *
jpayne@69 1888 * cdef class NamedTupleProxy(TupleProxy): # <<<<<<<<<<<<<<
jpayne@69 1889 * pass
jpayne@69 1890 *
jpayne@69 1891 */
jpayne@69 1892 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy {
jpayne@69 1893 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy __pyx_base;
jpayne@69 1894 };
jpayne@69 1895
jpayne@69 1896
jpayne@69 1897 /* "pysam/libctabixproxies.pxd":36
jpayne@69 1898 *
jpayne@69 1899 *
jpayne@69 1900 * cdef class GTFProxy(NamedTupleProxy): # <<<<<<<<<<<<<<
jpayne@69 1901 * cdef object attribute_dict
jpayne@69 1902 * cpdef int getMaxFields(self)
jpayne@69 1903 */
jpayne@69 1904 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy {
jpayne@69 1905 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@69 1906 PyObject *attribute_dict;
jpayne@69 1907 };
jpayne@69 1908
jpayne@69 1909
jpayne@69 1910 /* "pysam/libctabixproxies.pxd":42
jpayne@69 1911 *
jpayne@69 1912 *
jpayne@69 1913 * cdef class GFF3Proxy(GTFProxy): # <<<<<<<<<<<<<<
jpayne@69 1914 * pass
jpayne@69 1915 *
jpayne@69 1916 */
jpayne@69 1917 struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy {
jpayne@69 1918 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy __pyx_base;
jpayne@69 1919 };
jpayne@69 1920
jpayne@69 1921
jpayne@69 1922 /* "pysam/libctabixproxies.pxd":46
jpayne@69 1923 *
jpayne@69 1924 *
jpayne@69 1925 * cdef class BedProxy(NamedTupleProxy): # <<<<<<<<<<<<<<
jpayne@69 1926 *
jpayne@69 1927 * cdef:
jpayne@69 1928 */
jpayne@69 1929 struct __pyx_obj_5pysam_16libctabixproxies_BedProxy {
jpayne@69 1930 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@69 1931 char *contig;
jpayne@69 1932 uint32_t start;
jpayne@69 1933 uint32_t end;
jpayne@69 1934 int bedfields;
jpayne@69 1935 };
jpayne@69 1936
jpayne@69 1937
jpayne@69 1938 /* "pysam/libctabixproxies.pxd":58
jpayne@69 1939 * cdef update(self, char * buffer, size_t nbytes)
jpayne@69 1940 *
jpayne@69 1941 * cdef class VCFProxy(NamedTupleProxy) : # <<<<<<<<<<<<<<
jpayne@69 1942 *
jpayne@69 1943 * cdef:
jpayne@69 1944 */
jpayne@69 1945 struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy {
jpayne@69 1946 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@69 1947 char *contig;
jpayne@69 1948 uint32_t pos;
jpayne@69 1949 };
jpayne@69 1950
jpayne@69 1951
jpayne@69 1952 /* "pysam/libctabix.pxd":48
jpayne@69 1953 *
jpayne@69 1954 *
jpayne@69 1955 * cdef class tabix_file_iterator: # <<<<<<<<<<<<<<
jpayne@69 1956 * cdef BGZF * fh
jpayne@69 1957 * cdef kstream_t * kstream
jpayne@69 1958 */
jpayne@69 1959 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator {
jpayne@69 1960 PyObject_HEAD
jpayne@69 1961 struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator *__pyx_vtab;
jpayne@69 1962 BGZF *fh;
jpayne@69 1963 kstream_t *kstream;
jpayne@69 1964 kstring_t buffer;
jpayne@69 1965 size_t size;
jpayne@69 1966 struct __pyx_obj_5pysam_9libctabix_Parser *parser;
jpayne@69 1967 int fd;
jpayne@69 1968 int duplicated_fd;
jpayne@69 1969 PyObject *infile;
jpayne@69 1970 };
jpayne@69 1971
jpayne@69 1972
jpayne@69 1973 /* "pysam/libctabix.pxd":61
jpayne@69 1974 *
jpayne@69 1975 *
jpayne@69 1976 * cdef class TabixFile(HTSFile): # <<<<<<<<<<<<<<
jpayne@69 1977 * # pointer to index structure
jpayne@69 1978 * cdef tbx_t * index
jpayne@69 1979 */
jpayne@69 1980 struct __pyx_obj_5pysam_9libctabix_TabixFile {
jpayne@69 1981 struct __pyx_obj_5pysam_10libchtslib_HTSFile __pyx_base;
jpayne@69 1982 tbx_t *index;
jpayne@69 1983 PyObject *filename_index;
jpayne@69 1984 struct __pyx_obj_5pysam_9libctabix_Parser *parser;
jpayne@69 1985 PyObject *encoding;
jpayne@69 1986 };
jpayne@69 1987
jpayne@69 1988
jpayne@69 1989 /* "pysam/libctabix.pxd":72
jpayne@69 1990 *
jpayne@69 1991 *
jpayne@69 1992 * cdef class Parser: # <<<<<<<<<<<<<<
jpayne@69 1993 * cdef encoding
jpayne@69 1994 * cdef parse(self, char * buffer, int len)
jpayne@69 1995 */
jpayne@69 1996 struct __pyx_obj_5pysam_9libctabix_Parser {
jpayne@69 1997 PyObject_HEAD
jpayne@69 1998 struct __pyx_vtabstruct_5pysam_9libctabix_Parser *__pyx_vtab;
jpayne@69 1999 PyObject *encoding;
jpayne@69 2000 };
jpayne@69 2001
jpayne@69 2002
jpayne@69 2003 /* "pysam/libctabix.pxd":77
jpayne@69 2004 *
jpayne@69 2005 *
jpayne@69 2006 * cdef class asTuple(Parser): # <<<<<<<<<<<<<<
jpayne@69 2007 * cdef parse(self, char * buffer, int len)
jpayne@69 2008 *
jpayne@69 2009 */
jpayne@69 2010 struct __pyx_obj_5pysam_9libctabix_asTuple {
jpayne@69 2011 struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base;
jpayne@69 2012 };
jpayne@69 2013
jpayne@69 2014
jpayne@69 2015 /* "pysam/libctabix.pxd":81
jpayne@69 2016 *
jpayne@69 2017 *
jpayne@69 2018 * cdef class asGTF(Parser): # <<<<<<<<<<<<<<
jpayne@69 2019 * pass
jpayne@69 2020 *
jpayne@69 2021 */
jpayne@69 2022 struct __pyx_obj_5pysam_9libctabix_asGTF {
jpayne@69 2023 struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base;
jpayne@69 2024 };
jpayne@69 2025
jpayne@69 2026
jpayne@69 2027 /* "pysam/libctabix.pxd":85
jpayne@69 2028 *
jpayne@69 2029 *
jpayne@69 2030 * cdef class asGFF3(Parser): # <<<<<<<<<<<<<<
jpayne@69 2031 * pass
jpayne@69 2032 *
jpayne@69 2033 */
jpayne@69 2034 struct __pyx_obj_5pysam_9libctabix_asGFF3 {
jpayne@69 2035 struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base;
jpayne@69 2036 };
jpayne@69 2037
jpayne@69 2038
jpayne@69 2039 /* "pysam/libctabix.pxd":89
jpayne@69 2040 *
jpayne@69 2041 *
jpayne@69 2042 * cdef class asBed(Parser): # <<<<<<<<<<<<<<
jpayne@69 2043 * pass
jpayne@69 2044 *
jpayne@69 2045 */
jpayne@69 2046 struct __pyx_obj_5pysam_9libctabix_asBed {
jpayne@69 2047 struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base;
jpayne@69 2048 };
jpayne@69 2049
jpayne@69 2050
jpayne@69 2051 /* "pysam/libctabix.pxd":93
jpayne@69 2052 *
jpayne@69 2053 *
jpayne@69 2054 * cdef class asVCF(Parser): # <<<<<<<<<<<<<<
jpayne@69 2055 * pass
jpayne@69 2056 *
jpayne@69 2057 */
jpayne@69 2058 struct __pyx_obj_5pysam_9libctabix_asVCF {
jpayne@69 2059 struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base;
jpayne@69 2060 };
jpayne@69 2061
jpayne@69 2062
jpayne@69 2063 /* "pysam/libctabix.pxd":97
jpayne@69 2064 *
jpayne@69 2065 *
jpayne@69 2066 * cdef class TabixIterator: # <<<<<<<<<<<<<<
jpayne@69 2067 * cdef hts_itr_t * iterator
jpayne@69 2068 * cdef TabixFile tabixfile
jpayne@69 2069 */
jpayne@69 2070 struct __pyx_obj_5pysam_9libctabix_TabixIterator {
jpayne@69 2071 PyObject_HEAD
jpayne@69 2072 struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator *__pyx_vtab;
jpayne@69 2073 hts_itr_t *iterator;
jpayne@69 2074 struct __pyx_obj_5pysam_9libctabix_TabixFile *tabixfile;
jpayne@69 2075 kstring_t buffer;
jpayne@69 2076 PyObject *encoding;
jpayne@69 2077 };
jpayne@69 2078
jpayne@69 2079
jpayne@69 2080 /* "pysam/libctabix.pxd":105
jpayne@69 2081 *
jpayne@69 2082 *
jpayne@69 2083 * cdef class TabixIteratorParsed(TabixIterator): # <<<<<<<<<<<<<<
jpayne@69 2084 * cdef Parser parser
jpayne@69 2085 *
jpayne@69 2086 */
jpayne@69 2087 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed {
jpayne@69 2088 struct __pyx_obj_5pysam_9libctabix_TabixIterator __pyx_base;
jpayne@69 2089 struct __pyx_obj_5pysam_9libctabix_Parser *parser;
jpayne@69 2090 };
jpayne@69 2091
jpayne@69 2092
jpayne@69 2093 /* "pysam/libctabix.pxd":109
jpayne@69 2094 *
jpayne@69 2095 *
jpayne@69 2096 * cdef class GZIterator: # <<<<<<<<<<<<<<
jpayne@69 2097 * cdef object _filename
jpayne@69 2098 * cdef BGZF * gzipfile
jpayne@69 2099 */
jpayne@69 2100 struct __pyx_obj_5pysam_9libctabix_GZIterator {
jpayne@69 2101 PyObject_HEAD
jpayne@69 2102 struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator *__pyx_vtab;
jpayne@69 2103 PyObject *_filename;
jpayne@69 2104 BGZF *gzipfile;
jpayne@69 2105 kstream_t *kstream;
jpayne@69 2106 kstring_t buffer;
jpayne@69 2107 PyObject *encoding;
jpayne@69 2108 };
jpayne@69 2109
jpayne@69 2110
jpayne@69 2111 /* "pysam/libctabix.pxd":118
jpayne@69 2112 *
jpayne@69 2113 *
jpayne@69 2114 * cdef class GZIteratorHead(GZIterator): # <<<<<<<<<<<<<<
jpayne@69 2115 * pass
jpayne@69 2116 *
jpayne@69 2117 */
jpayne@69 2118 struct __pyx_obj_5pysam_9libctabix_GZIteratorHead {
jpayne@69 2119 struct __pyx_obj_5pysam_9libctabix_GZIterator __pyx_base;
jpayne@69 2120 };
jpayne@69 2121
jpayne@69 2122
jpayne@69 2123 /* "pysam/libctabix.pxd":122
jpayne@69 2124 *
jpayne@69 2125 *
jpayne@69 2126 * cdef class GZIteratorParsed(GZIterator): # <<<<<<<<<<<<<<
jpayne@69 2127 * cdef Parser parser
jpayne@69 2128 *
jpayne@69 2129 */
jpayne@69 2130 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed {
jpayne@69 2131 struct __pyx_obj_5pysam_9libctabix_GZIterator __pyx_base;
jpayne@69 2132 struct __pyx_obj_5pysam_9libctabix_Parser *parser;
jpayne@69 2133 };
jpayne@69 2134
jpayne@69 2135
jpayne@69 2136 /* "pysam/libctabix.pxd":127
jpayne@69 2137 *
jpayne@69 2138 * # Compatibility Layer for pysam < 0.8
jpayne@69 2139 * cdef class Tabixfile(TabixFile): # <<<<<<<<<<<<<<
jpayne@69 2140 * pass
jpayne@69 2141 */
jpayne@69 2142 struct __pyx_obj_5pysam_9libctabix_Tabixfile {
jpayne@69 2143 struct __pyx_obj_5pysam_9libctabix_TabixFile __pyx_base;
jpayne@69 2144 };
jpayne@69 2145
jpayne@69 2146
jpayne@69 2147
jpayne@69 2148 /* "pysam/libchtslib.pxd":2706
jpayne@69 2149 *
jpayne@69 2150 *
jpayne@69 2151 * cdef class HTSFile(object): # <<<<<<<<<<<<<<
jpayne@69 2152 * cdef htsFile *htsfile # pointer to htsFile structure
jpayne@69 2153 * cdef int64_t start_offset # BGZF offset of first record
jpayne@69 2154 */
jpayne@69 2155
jpayne@69 2156 struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile {
jpayne@69 2157 htsFile *(*_open_htsfile)(struct __pyx_obj_5pysam_10libchtslib_HTSFile *);
jpayne@69 2158 };
jpayne@69 2159 static struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile *__pyx_vtabptr_5pysam_10libchtslib_HTSFile;
jpayne@69 2160
jpayne@69 2161
jpayne@69 2162 /* "pysam/libctabixproxies.pxd":5
jpayne@69 2163 * from libc.stdint cimport uint8_t, int32_t, uint32_t, int64_t, uint64_t
jpayne@69 2164 *
jpayne@69 2165 * cdef class TupleProxy: # <<<<<<<<<<<<<<
jpayne@69 2166 *
jpayne@69 2167 * cdef:
jpayne@69 2168 */
jpayne@69 2169
jpayne@69 2170 struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy {
jpayne@69 2171 int (*getMaxFields)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch);
jpayne@69 2172 int (*getMinFields)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch);
jpayne@69 2173 PyObject *(*take)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t);
jpayne@69 2174 PyObject *(*present)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t);
jpayne@69 2175 PyObject *(*copy)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t, struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy *__pyx_optional_args);
jpayne@69 2176 PyObject *(*update)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t);
jpayne@69 2177 };
jpayne@69 2178 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *__pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy;
jpayne@69 2179
jpayne@69 2180
jpayne@69 2181 /* "pysam/libctabixproxies.pxd":32
jpayne@69 2182 *
jpayne@69 2183 *
jpayne@69 2184 * cdef class NamedTupleProxy(TupleProxy): # <<<<<<<<<<<<<<
jpayne@69 2185 * pass
jpayne@69 2186 *
jpayne@69 2187 */
jpayne@69 2188
jpayne@69 2189 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy {
jpayne@69 2190 struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy __pyx_base;
jpayne@69 2191 };
jpayne@69 2192 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy;
jpayne@69 2193
jpayne@69 2194
jpayne@69 2195 /* "pysam/libctabixproxies.pxd":36
jpayne@69 2196 *
jpayne@69 2197 *
jpayne@69 2198 * cdef class GTFProxy(NamedTupleProxy): # <<<<<<<<<<<<<<
jpayne@69 2199 * cdef object attribute_dict
jpayne@69 2200 * cpdef int getMaxFields(self)
jpayne@69 2201 */
jpayne@69 2202
jpayne@69 2203 struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy {
jpayne@69 2204 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@69 2205 };
jpayne@69 2206 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy *__pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy;
jpayne@69 2207
jpayne@69 2208
jpayne@69 2209 /* "pysam/libctabixproxies.pxd":42
jpayne@69 2210 *
jpayne@69 2211 *
jpayne@69 2212 * cdef class GFF3Proxy(GTFProxy): # <<<<<<<<<<<<<<
jpayne@69 2213 * pass
jpayne@69 2214 *
jpayne@69 2215 */
jpayne@69 2216
jpayne@69 2217 struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy {
jpayne@69 2218 struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy __pyx_base;
jpayne@69 2219 };
jpayne@69 2220 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy *__pyx_vtabptr_5pysam_16libctabixproxies_GFF3Proxy;
jpayne@69 2221
jpayne@69 2222
jpayne@69 2223 /* "pysam/libctabixproxies.pxd":46
jpayne@69 2224 *
jpayne@69 2225 *
jpayne@69 2226 * cdef class BedProxy(NamedTupleProxy): # <<<<<<<<<<<<<<
jpayne@69 2227 *
jpayne@69 2228 * cdef:
jpayne@69 2229 */
jpayne@69 2230
jpayne@69 2231 struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy {
jpayne@69 2232 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@69 2233 };
jpayne@69 2234 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy *__pyx_vtabptr_5pysam_16libctabixproxies_BedProxy;
jpayne@69 2235
jpayne@69 2236
jpayne@69 2237 /* "pysam/libctabixproxies.pxd":58
jpayne@69 2238 * cdef update(self, char * buffer, size_t nbytes)
jpayne@69 2239 *
jpayne@69 2240 * cdef class VCFProxy(NamedTupleProxy) : # <<<<<<<<<<<<<<
jpayne@69 2241 *
jpayne@69 2242 * cdef:
jpayne@69 2243 */
jpayne@69 2244
jpayne@69 2245 struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy {
jpayne@69 2246 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@69 2247 };
jpayne@69 2248 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy *__pyx_vtabptr_5pysam_16libctabixproxies_VCFProxy;
jpayne@69 2249
jpayne@69 2250
jpayne@69 2251 /* "pysam/libctabix.pyx":1098
jpayne@69 2252 *
jpayne@69 2253 *
jpayne@69 2254 * cdef class tabix_file_iterator: # <<<<<<<<<<<<<<
jpayne@69 2255 * '''iterate over a compressed or uncompressed ``infile``.
jpayne@69 2256 * '''
jpayne@69 2257 */
jpayne@69 2258
jpayne@69 2259 struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator {
jpayne@69 2260 PyObject *(*__pyx___cnext__)(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *);
jpayne@69 2261 };
jpayne@69 2262 static struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator *__pyx_vtabptr_5pysam_9libctabix_tabix_file_iterator;
jpayne@69 2263
jpayne@69 2264
jpayne@69 2265 /* "pysam/libctabix.pyx":287
jpayne@69 2266 *
jpayne@69 2267 *
jpayne@69 2268 * cdef class TabixFile: # <<<<<<<<<<<<<<
jpayne@69 2269 * """Random access to bgzf formatted files that
jpayne@69 2270 * have been indexed by :term:`tabix`.
jpayne@69 2271 */
jpayne@69 2272
jpayne@69 2273 struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile {
jpayne@69 2274 struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile __pyx_base;
jpayne@69 2275 };
jpayne@69 2276 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile *__pyx_vtabptr_5pysam_9libctabix_TabixFile;
jpayne@69 2277
jpayne@69 2278
jpayne@69 2279 /* "pysam/libctabix.pyx":82
jpayne@69 2280 * from pysam.libcutils cimport encode_filename, from_string_and_size
jpayne@69 2281 *
jpayne@69 2282 * cdef class Parser: # <<<<<<<<<<<<<<
jpayne@69 2283 *
jpayne@69 2284 * def __init__(self, encoding="ascii"):
jpayne@69 2285 */
jpayne@69 2286
jpayne@69 2287 struct __pyx_vtabstruct_5pysam_9libctabix_Parser {
jpayne@69 2288 PyObject *(*parse)(struct __pyx_obj_5pysam_9libctabix_Parser *, char *, int);
jpayne@69 2289 };
jpayne@69 2290 static struct __pyx_vtabstruct_5pysam_9libctabix_Parser *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@69 2291
jpayne@69 2292
jpayne@69 2293 /* "pysam/libctabix.pyx":101
jpayne@69 2294 *
jpayne@69 2295 *
jpayne@69 2296 * cdef class asTuple(Parser): # <<<<<<<<<<<<<<
jpayne@69 2297 * '''converts a :term:`tabix row` into a python tuple.
jpayne@69 2298 *
jpayne@69 2299 */
jpayne@69 2300
jpayne@69 2301 struct __pyx_vtabstruct_5pysam_9libctabix_asTuple {
jpayne@69 2302 struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base;
jpayne@69 2303 };
jpayne@69 2304 static struct __pyx_vtabstruct_5pysam_9libctabix_asTuple *__pyx_vtabptr_5pysam_9libctabix_asTuple;
jpayne@69 2305
jpayne@69 2306
jpayne@69 2307 /* "pysam/libctabix.pyx":151
jpayne@69 2308 *
jpayne@69 2309 *
jpayne@69 2310 * cdef class asGTF(Parser): # <<<<<<<<<<<<<<
jpayne@69 2311 * '''converts a :term:`tabix row` into a GTF record with the following
jpayne@69 2312 * fields:
jpayne@69 2313 */
jpayne@69 2314
jpayne@69 2315 struct __pyx_vtabstruct_5pysam_9libctabix_asGTF {
jpayne@69 2316 struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base;
jpayne@69 2317 };
jpayne@69 2318 static struct __pyx_vtabstruct_5pysam_9libctabix_asGTF *__pyx_vtabptr_5pysam_9libctabix_asGTF;
jpayne@69 2319
jpayne@69 2320
jpayne@69 2321 /* "pysam/libctabix.pyx":115
jpayne@69 2322 *
jpayne@69 2323 *
jpayne@69 2324 * cdef class asGFF3(Parser): # <<<<<<<<<<<<<<
jpayne@69 2325 * '''converts a :term:`tabix row` into a GFF record with the following
jpayne@69 2326 * fields:
jpayne@69 2327 */
jpayne@69 2328
jpayne@69 2329 struct __pyx_vtabstruct_5pysam_9libctabix_asGFF3 {
jpayne@69 2330 struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base;
jpayne@69 2331 };
jpayne@69 2332 static struct __pyx_vtabstruct_5pysam_9libctabix_asGFF3 *__pyx_vtabptr_5pysam_9libctabix_asGFF3;
jpayne@69 2333
jpayne@69 2334
jpayne@69 2335 /* "pysam/libctabix.pyx":198
jpayne@69 2336 *
jpayne@69 2337 *
jpayne@69 2338 * cdef class asBed(Parser): # <<<<<<<<<<<<<<
jpayne@69 2339 * '''converts a :term:`tabix row` into a bed record
jpayne@69 2340 * with the following fields:
jpayne@69 2341 */
jpayne@69 2342
jpayne@69 2343 struct __pyx_vtabstruct_5pysam_9libctabix_asBed {
jpayne@69 2344 struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base;
jpayne@69 2345 };
jpayne@69 2346 static struct __pyx_vtabstruct_5pysam_9libctabix_asBed *__pyx_vtabptr_5pysam_9libctabix_asBed;
jpayne@69 2347
jpayne@69 2348
jpayne@69 2349 /* "pysam/libctabix.pyx":246
jpayne@69 2350 *
jpayne@69 2351 *
jpayne@69 2352 * cdef class asVCF(Parser): # <<<<<<<<<<<<<<
jpayne@69 2353 * '''converts a :term:`tabix row` into a VCF record with
jpayne@69 2354 * the following fields:
jpayne@69 2355 */
jpayne@69 2356
jpayne@69 2357 struct __pyx_vtabstruct_5pysam_9libctabix_asVCF {
jpayne@69 2358 struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base;
jpayne@69 2359 };
jpayne@69 2360 static struct __pyx_vtabstruct_5pysam_9libctabix_asVCF *__pyx_vtabptr_5pysam_9libctabix_asVCF;
jpayne@69 2361
jpayne@69 2362
jpayne@69 2363 /* "pysam/libctabix.pyx":619
jpayne@69 2364 *
jpayne@69 2365 *
jpayne@69 2366 * cdef class TabixIterator: # <<<<<<<<<<<<<<
jpayne@69 2367 * """iterates over rows in *tabixfile* in region
jpayne@69 2368 * given by *tid*, *start* and *end*.
jpayne@69 2369 */
jpayne@69 2370
jpayne@69 2371 struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator {
jpayne@69 2372 int (*__pyx___cnext__)(struct __pyx_obj_5pysam_9libctabix_TabixIterator *);
jpayne@69 2373 };
jpayne@69 2374 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator *__pyx_vtabptr_5pysam_9libctabix_TabixIterator;
jpayne@69 2375
jpayne@69 2376
jpayne@69 2377 /* "pysam/libctabix.pyx":692
jpayne@69 2378 *
jpayne@69 2379 *
jpayne@69 2380 * cdef class TabixIteratorParsed(TabixIterator): # <<<<<<<<<<<<<<
jpayne@69 2381 * """iterates over mapped reads in a region.
jpayne@69 2382 *
jpayne@69 2383 */
jpayne@69 2384
jpayne@69 2385 struct __pyx_vtabstruct_5pysam_9libctabix_TabixIteratorParsed {
jpayne@69 2386 struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator __pyx_base;
jpayne@69 2387 };
jpayne@69 2388 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixIteratorParsed *__pyx_vtabptr_5pysam_9libctabix_TabixIteratorParsed;
jpayne@69 2389
jpayne@69 2390
jpayne@69 2391 /* "pysam/libctabix.pyx":720
jpayne@69 2392 *
jpayne@69 2393 *
jpayne@69 2394 * cdef class GZIterator: # <<<<<<<<<<<<<<
jpayne@69 2395 * def __init__(self, filename, int buffer_size=65536, encoding="ascii"):
jpayne@69 2396 * '''iterate line-by-line through gzip (or bgzip)
jpayne@69 2397 */
jpayne@69 2398
jpayne@69 2399 struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator {
jpayne@69 2400 int (*__pyx___cnext__)(struct __pyx_obj_5pysam_9libctabix_GZIterator *);
jpayne@69 2401 };
jpayne@69 2402 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator *__pyx_vtabptr_5pysam_9libctabix_GZIterator;
jpayne@69 2403
jpayne@69 2404
jpayne@69 2405 /* "pysam/libctabix.pyx":775
jpayne@69 2406 *
jpayne@69 2407 *
jpayne@69 2408 * cdef class GZIteratorHead(GZIterator): # <<<<<<<<<<<<<<
jpayne@69 2409 * '''iterate line-by-line through gzip (or bgzip)
jpayne@69 2410 * compressed file returning comments at top of file.
jpayne@69 2411 */
jpayne@69 2412
jpayne@69 2413 struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorHead {
jpayne@69 2414 struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator __pyx_base;
jpayne@69 2415 };
jpayne@69 2416 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorHead *__pyx_vtabptr_5pysam_9libctabix_GZIteratorHead;
jpayne@69 2417
jpayne@69 2418
jpayne@69 2419 /* "pysam/libctabix.pyx":792
jpayne@69 2420 *
jpayne@69 2421 *
jpayne@69 2422 * cdef class GZIteratorParsed(GZIterator): # <<<<<<<<<<<<<<
jpayne@69 2423 * '''iterate line-by-line through gzip (or bgzip)
jpayne@69 2424 * compressed file returning comments at top of file.
jpayne@69 2425 */
jpayne@69 2426
jpayne@69 2427 struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorParsed {
jpayne@69 2428 struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator __pyx_base;
jpayne@69 2429 };
jpayne@69 2430 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorParsed *__pyx_vtabptr_5pysam_9libctabix_GZIteratorParsed;
jpayne@69 2431
jpayne@69 2432
jpayne@69 2433 /* "pysam/libctabix.pyx":1251
jpayne@69 2434 *
jpayne@69 2435 *
jpayne@69 2436 * cdef class Tabixfile(TabixFile): # <<<<<<<<<<<<<<
jpayne@69 2437 * """Tabixfile is deprecated: use TabixFile instead"""
jpayne@69 2438 * pass
jpayne@69 2439 */
jpayne@69 2440
jpayne@69 2441 struct __pyx_vtabstruct_5pysam_9libctabix_Tabixfile {
jpayne@69 2442 struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile __pyx_base;
jpayne@69 2443 };
jpayne@69 2444 static struct __pyx_vtabstruct_5pysam_9libctabix_Tabixfile *__pyx_vtabptr_5pysam_9libctabix_Tabixfile;
jpayne@69 2445 /* #### Code section: utility_code_proto ### */
jpayne@69 2446
jpayne@69 2447 /* --- Runtime support code (head) --- */
jpayne@69 2448 /* Refnanny.proto */
jpayne@69 2449 #ifndef CYTHON_REFNANNY
jpayne@69 2450 #define CYTHON_REFNANNY 0
jpayne@69 2451 #endif
jpayne@69 2452 #if CYTHON_REFNANNY
jpayne@69 2453 typedef struct {
jpayne@69 2454 void (*INCREF)(void*, PyObject*, Py_ssize_t);
jpayne@69 2455 void (*DECREF)(void*, PyObject*, Py_ssize_t);
jpayne@69 2456 void (*GOTREF)(void*, PyObject*, Py_ssize_t);
jpayne@69 2457 void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
jpayne@69 2458 void* (*SetupContext)(const char*, Py_ssize_t, const char*);
jpayne@69 2459 void (*FinishContext)(void**);
jpayne@69 2460 } __Pyx_RefNannyAPIStruct;
jpayne@69 2461 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
jpayne@69 2462 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
jpayne@69 2463 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
jpayne@69 2464 #ifdef WITH_THREAD
jpayne@69 2465 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
jpayne@69 2466 if (acquire_gil) {\
jpayne@69 2467 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
jpayne@69 2468 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
jpayne@69 2469 PyGILState_Release(__pyx_gilstate_save);\
jpayne@69 2470 } else {\
jpayne@69 2471 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
jpayne@69 2472 }
jpayne@69 2473 #define __Pyx_RefNannyFinishContextNogil() {\
jpayne@69 2474 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
jpayne@69 2475 __Pyx_RefNannyFinishContext();\
jpayne@69 2476 PyGILState_Release(__pyx_gilstate_save);\
jpayne@69 2477 }
jpayne@69 2478 #else
jpayne@69 2479 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
jpayne@69 2480 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
jpayne@69 2481 #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
jpayne@69 2482 #endif
jpayne@69 2483 #define __Pyx_RefNannyFinishContextNogil() {\
jpayne@69 2484 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
jpayne@69 2485 __Pyx_RefNannyFinishContext();\
jpayne@69 2486 PyGILState_Release(__pyx_gilstate_save);\
jpayne@69 2487 }
jpayne@69 2488 #define __Pyx_RefNannyFinishContext()\
jpayne@69 2489 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
jpayne@69 2490 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@69 2491 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@69 2492 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@69 2493 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@69 2494 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
jpayne@69 2495 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
jpayne@69 2496 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
jpayne@69 2497 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
jpayne@69 2498 #else
jpayne@69 2499 #define __Pyx_RefNannyDeclarations
jpayne@69 2500 #define __Pyx_RefNannySetupContext(name, acquire_gil)
jpayne@69 2501 #define __Pyx_RefNannyFinishContextNogil()
jpayne@69 2502 #define __Pyx_RefNannyFinishContext()
jpayne@69 2503 #define __Pyx_INCREF(r) Py_INCREF(r)
jpayne@69 2504 #define __Pyx_DECREF(r) Py_DECREF(r)
jpayne@69 2505 #define __Pyx_GOTREF(r)
jpayne@69 2506 #define __Pyx_GIVEREF(r)
jpayne@69 2507 #define __Pyx_XINCREF(r) Py_XINCREF(r)
jpayne@69 2508 #define __Pyx_XDECREF(r) Py_XDECREF(r)
jpayne@69 2509 #define __Pyx_XGOTREF(r)
jpayne@69 2510 #define __Pyx_XGIVEREF(r)
jpayne@69 2511 #endif
jpayne@69 2512 #define __Pyx_Py_XDECREF_SET(r, v) do {\
jpayne@69 2513 PyObject *tmp = (PyObject *) r;\
jpayne@69 2514 r = v; Py_XDECREF(tmp);\
jpayne@69 2515 } while (0)
jpayne@69 2516 #define __Pyx_XDECREF_SET(r, v) do {\
jpayne@69 2517 PyObject *tmp = (PyObject *) r;\
jpayne@69 2518 r = v; __Pyx_XDECREF(tmp);\
jpayne@69 2519 } while (0)
jpayne@69 2520 #define __Pyx_DECREF_SET(r, v) do {\
jpayne@69 2521 PyObject *tmp = (PyObject *) r;\
jpayne@69 2522 r = v; __Pyx_DECREF(tmp);\
jpayne@69 2523 } while (0)
jpayne@69 2524 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
jpayne@69 2525 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
jpayne@69 2526
jpayne@69 2527 /* PyErrExceptionMatches.proto */
jpayne@69 2528 #if CYTHON_FAST_THREAD_STATE
jpayne@69 2529 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
jpayne@69 2530 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
jpayne@69 2531 #else
jpayne@69 2532 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
jpayne@69 2533 #endif
jpayne@69 2534
jpayne@69 2535 /* PyThreadStateGet.proto */
jpayne@69 2536 #if CYTHON_FAST_THREAD_STATE
jpayne@69 2537 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
jpayne@69 2538 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
jpayne@69 2539 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 2540 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
jpayne@69 2541 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
jpayne@69 2542 #else
jpayne@69 2543 #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
jpayne@69 2544 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
jpayne@69 2545 #endif
jpayne@69 2546 #else
jpayne@69 2547 #define __Pyx_PyThreadState_declare
jpayne@69 2548 #define __Pyx_PyThreadState_assign
jpayne@69 2549 #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
jpayne@69 2550 #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
jpayne@69 2551 #endif
jpayne@69 2552
jpayne@69 2553 /* PyErrFetchRestore.proto */
jpayne@69 2554 #if CYTHON_FAST_THREAD_STATE
jpayne@69 2555 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
jpayne@69 2556 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
jpayne@69 2557 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
jpayne@69 2558 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
jpayne@69 2559 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
jpayne@69 2560 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
jpayne@69 2561 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
jpayne@69 2562 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
jpayne@69 2563 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
jpayne@69 2564 #else
jpayne@69 2565 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
jpayne@69 2566 #endif
jpayne@69 2567 #else
jpayne@69 2568 #define __Pyx_PyErr_Clear() PyErr_Clear()
jpayne@69 2569 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
jpayne@69 2570 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
jpayne@69 2571 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
jpayne@69 2572 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
jpayne@69 2573 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
jpayne@69 2574 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
jpayne@69 2575 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
jpayne@69 2576 #endif
jpayne@69 2577
jpayne@69 2578 /* PyObjectGetAttrStr.proto */
jpayne@69 2579 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 2580 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
jpayne@69 2581 #else
jpayne@69 2582 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
jpayne@69 2583 #endif
jpayne@69 2584
jpayne@69 2585 /* PyObjectGetAttrStrNoError.proto */
jpayne@69 2586 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
jpayne@69 2587
jpayne@69 2588 /* GetBuiltinName.proto */
jpayne@69 2589 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
jpayne@69 2590
jpayne@69 2591 /* TupleAndListFromArray.proto */
jpayne@69 2592 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 2593 static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
jpayne@69 2594 static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
jpayne@69 2595 #endif
jpayne@69 2596
jpayne@69 2597 /* IncludeStringH.proto */
jpayne@69 2598 #include <string.h>
jpayne@69 2599
jpayne@69 2600 /* BytesEquals.proto */
jpayne@69 2601 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
jpayne@69 2602
jpayne@69 2603 /* UnicodeEquals.proto */
jpayne@69 2604 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
jpayne@69 2605
jpayne@69 2606 /* fastcall.proto */
jpayne@69 2607 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 2608 #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
jpayne@69 2609 #elif CYTHON_ASSUME_SAFE_MACROS
jpayne@69 2610 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
jpayne@69 2611 #else
jpayne@69 2612 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
jpayne@69 2613 #endif
jpayne@69 2614 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 2615 #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
jpayne@69 2616 #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
jpayne@69 2617 #else
jpayne@69 2618 #define __Pyx_Arg_NewRef_VARARGS(arg) arg
jpayne@69 2619 #define __Pyx_Arg_XDECREF_VARARGS(arg)
jpayne@69 2620 #endif
jpayne@69 2621 #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
jpayne@69 2622 #define __Pyx_KwValues_VARARGS(args, nargs) NULL
jpayne@69 2623 #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
jpayne@69 2624 #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
jpayne@69 2625 #if CYTHON_METH_FASTCALL
jpayne@69 2626 #define __Pyx_Arg_FASTCALL(args, i) args[i]
jpayne@69 2627 #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
jpayne@69 2628 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
jpayne@69 2629 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
jpayne@69 2630 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
jpayne@69 2631 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
jpayne@69 2632 #else
jpayne@69 2633 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
jpayne@69 2634 #endif
jpayne@69 2635 #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
jpayne@69 2636 to have the same reference counting */
jpayne@69 2637 #define __Pyx_Arg_XDECREF_FASTCALL(arg)
jpayne@69 2638 #else
jpayne@69 2639 #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
jpayne@69 2640 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
jpayne@69 2641 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
jpayne@69 2642 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
jpayne@69 2643 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
jpayne@69 2644 #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
jpayne@69 2645 #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
jpayne@69 2646 #endif
jpayne@69 2647 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 2648 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
jpayne@69 2649 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
jpayne@69 2650 #else
jpayne@69 2651 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
jpayne@69 2652 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
jpayne@69 2653 #endif
jpayne@69 2654
jpayne@69 2655 /* RaiseDoubleKeywords.proto */
jpayne@69 2656 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
jpayne@69 2657
jpayne@69 2658 /* ParseKeywords.proto */
jpayne@69 2659 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
jpayne@69 2660 PyObject **argnames[],
jpayne@69 2661 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
jpayne@69 2662 const char* function_name);
jpayne@69 2663
jpayne@69 2664 /* RaiseArgTupleInvalid.proto */
jpayne@69 2665 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
jpayne@69 2666 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
jpayne@69 2667
jpayne@69 2668 /* Profile.proto */
jpayne@69 2669 #ifndef CYTHON_PROFILE
jpayne@69 2670 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
jpayne@69 2671 #define CYTHON_PROFILE 0
jpayne@69 2672 #else
jpayne@69 2673 #define CYTHON_PROFILE 1
jpayne@69 2674 #endif
jpayne@69 2675 #endif
jpayne@69 2676 #ifndef CYTHON_TRACE_NOGIL
jpayne@69 2677 #define CYTHON_TRACE_NOGIL 0
jpayne@69 2678 #else
jpayne@69 2679 #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
jpayne@69 2680 #define CYTHON_TRACE 1
jpayne@69 2681 #endif
jpayne@69 2682 #endif
jpayne@69 2683 #ifndef CYTHON_TRACE
jpayne@69 2684 #define CYTHON_TRACE 0
jpayne@69 2685 #endif
jpayne@69 2686 #if CYTHON_TRACE
jpayne@69 2687 #undef CYTHON_PROFILE_REUSE_FRAME
jpayne@69 2688 #endif
jpayne@69 2689 #ifndef CYTHON_PROFILE_REUSE_FRAME
jpayne@69 2690 #define CYTHON_PROFILE_REUSE_FRAME 0
jpayne@69 2691 #endif
jpayne@69 2692 #if CYTHON_PROFILE || CYTHON_TRACE
jpayne@69 2693 #include "compile.h"
jpayne@69 2694 #include "frameobject.h"
jpayne@69 2695 #include "traceback.h"
jpayne@69 2696 #if PY_VERSION_HEX >= 0x030b00a6
jpayne@69 2697 #ifndef Py_BUILD_CORE
jpayne@69 2698 #define Py_BUILD_CORE 1
jpayne@69 2699 #endif
jpayne@69 2700 #include "internal/pycore_frame.h"
jpayne@69 2701 #endif
jpayne@69 2702 #if CYTHON_PROFILE_REUSE_FRAME
jpayne@69 2703 #define CYTHON_FRAME_MODIFIER static
jpayne@69 2704 #define CYTHON_FRAME_DEL(frame)
jpayne@69 2705 #else
jpayne@69 2706 #define CYTHON_FRAME_MODIFIER
jpayne@69 2707 #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
jpayne@69 2708 #endif
jpayne@69 2709 #define __Pyx_TraceDeclarations\
jpayne@69 2710 static PyCodeObject *__pyx_frame_code = NULL;\
jpayne@69 2711 CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
jpayne@69 2712 int __Pyx_use_tracing = 0;
jpayne@69 2713 #define __Pyx_TraceFrameInit(codeobj)\
jpayne@69 2714 if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
jpayne@69 2715 #if PY_VERSION_HEX >= 0x030b00a2
jpayne@69 2716 #if PY_VERSION_HEX >= 0x030C00b1
jpayne@69 2717 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@69 2718 ((!(check_tracing) || !(tstate)->tracing) &&\
jpayne@69 2719 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@69 2720 #else
jpayne@69 2721 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@69 2722 (unlikely((tstate)->cframe->use_tracing) &&\
jpayne@69 2723 (!(check_tracing) || !(tstate)->tracing) &&\
jpayne@69 2724 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@69 2725 #endif
jpayne@69 2726 #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
jpayne@69 2727 #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
jpayne@69 2728 #elif PY_VERSION_HEX >= 0x030a00b1
jpayne@69 2729 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@69 2730 (unlikely((tstate)->cframe->use_tracing) &&\
jpayne@69 2731 (!(check_tracing) || !(tstate)->tracing) &&\
jpayne@69 2732 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@69 2733 #define __Pyx_EnterTracing(tstate)\
jpayne@69 2734 do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
jpayne@69 2735 #define __Pyx_LeaveTracing(tstate)\
jpayne@69 2736 do {\
jpayne@69 2737 tstate->tracing--;\
jpayne@69 2738 tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
jpayne@69 2739 || tstate->c_profilefunc != NULL);\
jpayne@69 2740 } while (0)
jpayne@69 2741 #else
jpayne@69 2742 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@69 2743 (unlikely((tstate)->use_tracing) &&\
jpayne@69 2744 (!(check_tracing) || !(tstate)->tracing) &&\
jpayne@69 2745 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@69 2746 #define __Pyx_EnterTracing(tstate)\
jpayne@69 2747 do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
jpayne@69 2748 #define __Pyx_LeaveTracing(tstate)\
jpayne@69 2749 do {\
jpayne@69 2750 tstate->tracing--;\
jpayne@69 2751 tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
jpayne@69 2752 || tstate->c_profilefunc != NULL);\
jpayne@69 2753 } while (0)
jpayne@69 2754 #endif
jpayne@69 2755 #ifdef WITH_THREAD
jpayne@69 2756 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
jpayne@69 2757 if (nogil) {\
jpayne@69 2758 if (CYTHON_TRACE_NOGIL) {\
jpayne@69 2759 PyThreadState *tstate;\
jpayne@69 2760 PyGILState_STATE state = PyGILState_Ensure();\
jpayne@69 2761 tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2762 if (__Pyx_IsTracing(tstate, 1, 1)) {\
jpayne@69 2763 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
jpayne@69 2764 }\
jpayne@69 2765 PyGILState_Release(state);\
jpayne@69 2766 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
jpayne@69 2767 }\
jpayne@69 2768 } else {\
jpayne@69 2769 PyThreadState* tstate = PyThreadState_GET();\
jpayne@69 2770 if (__Pyx_IsTracing(tstate, 1, 1)) {\
jpayne@69 2771 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
jpayne@69 2772 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
jpayne@69 2773 }\
jpayne@69 2774 }
jpayne@69 2775 #else
jpayne@69 2776 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
jpayne@69 2777 { PyThreadState* tstate = PyThreadState_GET();\
jpayne@69 2778 if (__Pyx_IsTracing(tstate, 1, 1)) {\
jpayne@69 2779 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
jpayne@69 2780 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
jpayne@69 2781 }\
jpayne@69 2782 }
jpayne@69 2783 #endif
jpayne@69 2784 #define __Pyx_TraceException()\
jpayne@69 2785 if (likely(!__Pyx_use_tracing)); else {\
jpayne@69 2786 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2787 if (__Pyx_IsTracing(tstate, 0, 1)) {\
jpayne@69 2788 __Pyx_EnterTracing(tstate);\
jpayne@69 2789 PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
jpayne@69 2790 if (exc_info) {\
jpayne@69 2791 if (CYTHON_TRACE && tstate->c_tracefunc)\
jpayne@69 2792 tstate->c_tracefunc(\
jpayne@69 2793 tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
jpayne@69 2794 tstate->c_profilefunc(\
jpayne@69 2795 tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
jpayne@69 2796 Py_DECREF(exc_info);\
jpayne@69 2797 }\
jpayne@69 2798 __Pyx_LeaveTracing(tstate);\
jpayne@69 2799 }\
jpayne@69 2800 }
jpayne@69 2801 static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
jpayne@69 2802 PyObject *type, *value, *traceback;
jpayne@69 2803 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
jpayne@69 2804 __Pyx_EnterTracing(tstate);
jpayne@69 2805 if (CYTHON_TRACE && tstate->c_tracefunc)
jpayne@69 2806 tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
jpayne@69 2807 if (tstate->c_profilefunc)
jpayne@69 2808 tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
jpayne@69 2809 CYTHON_FRAME_DEL(frame);
jpayne@69 2810 __Pyx_LeaveTracing(tstate);
jpayne@69 2811 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
jpayne@69 2812 }
jpayne@69 2813 #ifdef WITH_THREAD
jpayne@69 2814 #define __Pyx_TraceReturn(result, nogil)\
jpayne@69 2815 if (likely(!__Pyx_use_tracing)); else {\
jpayne@69 2816 if (nogil) {\
jpayne@69 2817 if (CYTHON_TRACE_NOGIL) {\
jpayne@69 2818 PyThreadState *tstate;\
jpayne@69 2819 PyGILState_STATE state = PyGILState_Ensure();\
jpayne@69 2820 tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2821 if (__Pyx_IsTracing(tstate, 0, 0)) {\
jpayne@69 2822 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
jpayne@69 2823 }\
jpayne@69 2824 PyGILState_Release(state);\
jpayne@69 2825 }\
jpayne@69 2826 } else {\
jpayne@69 2827 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2828 if (__Pyx_IsTracing(tstate, 0, 0)) {\
jpayne@69 2829 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
jpayne@69 2830 }\
jpayne@69 2831 }\
jpayne@69 2832 }
jpayne@69 2833 #else
jpayne@69 2834 #define __Pyx_TraceReturn(result, nogil)\
jpayne@69 2835 if (likely(!__Pyx_use_tracing)); else {\
jpayne@69 2836 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2837 if (__Pyx_IsTracing(tstate, 0, 0)) {\
jpayne@69 2838 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
jpayne@69 2839 }\
jpayne@69 2840 }
jpayne@69 2841 #endif
jpayne@69 2842 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
jpayne@69 2843 static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
jpayne@69 2844 #else
jpayne@69 2845 #define __Pyx_TraceDeclarations
jpayne@69 2846 #define __Pyx_TraceFrameInit(codeobj)
jpayne@69 2847 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error;
jpayne@69 2848 #define __Pyx_TraceException()
jpayne@69 2849 #define __Pyx_TraceReturn(result, nogil)
jpayne@69 2850 #endif
jpayne@69 2851 #if CYTHON_TRACE
jpayne@69 2852 static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
jpayne@69 2853 int ret;
jpayne@69 2854 PyObject *type, *value, *traceback;
jpayne@69 2855 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
jpayne@69 2856 __Pyx_PyFrame_SetLineNumber(frame, lineno);
jpayne@69 2857 __Pyx_EnterTracing(tstate);
jpayne@69 2858 ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
jpayne@69 2859 __Pyx_LeaveTracing(tstate);
jpayne@69 2860 if (likely(!ret)) {
jpayne@69 2861 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
jpayne@69 2862 } else {
jpayne@69 2863 Py_XDECREF(type);
jpayne@69 2864 Py_XDECREF(value);
jpayne@69 2865 Py_XDECREF(traceback);
jpayne@69 2866 }
jpayne@69 2867 return ret;
jpayne@69 2868 }
jpayne@69 2869 #ifdef WITH_THREAD
jpayne@69 2870 #define __Pyx_TraceLine(lineno, nogil, goto_error)\
jpayne@69 2871 if (likely(!__Pyx_use_tracing)); else {\
jpayne@69 2872 if (nogil) {\
jpayne@69 2873 if (CYTHON_TRACE_NOGIL) {\
jpayne@69 2874 int ret = 0;\
jpayne@69 2875 PyThreadState *tstate;\
jpayne@69 2876 PyGILState_STATE state = __Pyx_PyGILState_Ensure();\
jpayne@69 2877 tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2878 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
jpayne@69 2879 ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
jpayne@69 2880 }\
jpayne@69 2881 __Pyx_PyGILState_Release(state);\
jpayne@69 2882 if (unlikely(ret)) goto_error;\
jpayne@69 2883 }\
jpayne@69 2884 } else {\
jpayne@69 2885 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2886 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
jpayne@69 2887 int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
jpayne@69 2888 if (unlikely(ret)) goto_error;\
jpayne@69 2889 }\
jpayne@69 2890 }\
jpayne@69 2891 }
jpayne@69 2892 #else
jpayne@69 2893 #define __Pyx_TraceLine(lineno, nogil, goto_error)\
jpayne@69 2894 if (likely(!__Pyx_use_tracing)); else {\
jpayne@69 2895 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2896 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
jpayne@69 2897 int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
jpayne@69 2898 if (unlikely(ret)) goto_error;\
jpayne@69 2899 }\
jpayne@69 2900 }
jpayne@69 2901 #endif
jpayne@69 2902 #else
jpayne@69 2903 #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error;
jpayne@69 2904 #endif
jpayne@69 2905
jpayne@69 2906 /* KeywordStringCheck.proto */
jpayne@69 2907 static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);
jpayne@69 2908
jpayne@69 2909 /* PyObject_Unicode.proto */
jpayne@69 2910 #if PY_MAJOR_VERSION >= 3
jpayne@69 2911 #define __Pyx_PyObject_Unicode(obj)\
jpayne@69 2912 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
jpayne@69 2913 #else
jpayne@69 2914 #define __Pyx_PyObject_Unicode(obj)\
jpayne@69 2915 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
jpayne@69 2916 #endif
jpayne@69 2917
jpayne@69 2918 /* PyFunctionFastCall.proto */
jpayne@69 2919 #if CYTHON_FAST_PYCALL
jpayne@69 2920 #if !CYTHON_VECTORCALL
jpayne@69 2921 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
jpayne@69 2922 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
jpayne@69 2923 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
jpayne@69 2924 #endif
jpayne@69 2925 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
jpayne@69 2926 (sizeof(char [1 - 2*!(cond)]) - 1)
jpayne@69 2927 #ifndef Py_MEMBER_SIZE
jpayne@69 2928 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
jpayne@69 2929 #endif
jpayne@69 2930 #if !CYTHON_VECTORCALL
jpayne@69 2931 #if PY_VERSION_HEX >= 0x03080000
jpayne@69 2932 #include "frameobject.h"
jpayne@69 2933 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 2934 #ifndef Py_BUILD_CORE
jpayne@69 2935 #define Py_BUILD_CORE 1
jpayne@69 2936 #endif
jpayne@69 2937 #include "internal/pycore_frame.h"
jpayne@69 2938 #endif
jpayne@69 2939 #define __Pxy_PyFrame_Initialize_Offsets()
jpayne@69 2940 #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus)
jpayne@69 2941 #else
jpayne@69 2942 static size_t __pyx_pyframe_localsplus_offset = 0;
jpayne@69 2943 #include "frameobject.h"
jpayne@69 2944 #define __Pxy_PyFrame_Initialize_Offsets()\
jpayne@69 2945 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
jpayne@69 2946 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
jpayne@69 2947 #define __Pyx_PyFrame_GetLocalsplus(frame)\
jpayne@69 2948 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
jpayne@69 2949 #endif
jpayne@69 2950 #endif
jpayne@69 2951 #endif
jpayne@69 2952
jpayne@69 2953 /* PyObjectCall.proto */
jpayne@69 2954 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 2955 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
jpayne@69 2956 #else
jpayne@69 2957 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
jpayne@69 2958 #endif
jpayne@69 2959
jpayne@69 2960 /* PyObjectCallMethO.proto */
jpayne@69 2961 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 2962 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
jpayne@69 2963 #endif
jpayne@69 2964
jpayne@69 2965 /* PyObjectFastCall.proto */
jpayne@69 2966 #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
jpayne@69 2967 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);
jpayne@69 2968
jpayne@69 2969 /* PyObjectCallOneArg.proto */
jpayne@69 2970 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
jpayne@69 2971
jpayne@69 2972 /* RaiseException.proto */
jpayne@69 2973 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
jpayne@69 2974
jpayne@69 2975 /* GetAttr3.proto */
jpayne@69 2976 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
jpayne@69 2977
jpayne@69 2978 /* PyDictVersioning.proto */
jpayne@69 2979 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
jpayne@69 2980 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
jpayne@69 2981 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
jpayne@69 2982 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
jpayne@69 2983 (version_var) = __PYX_GET_DICT_VERSION(dict);\
jpayne@69 2984 (cache_var) = (value);
jpayne@69 2985 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
jpayne@69 2986 static PY_UINT64_T __pyx_dict_version = 0;\
jpayne@69 2987 static PyObject *__pyx_dict_cached_value = NULL;\
jpayne@69 2988 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
jpayne@69 2989 (VAR) = __pyx_dict_cached_value;\
jpayne@69 2990 } else {\
jpayne@69 2991 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
jpayne@69 2992 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
jpayne@69 2993 }\
jpayne@69 2994 }
jpayne@69 2995 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
jpayne@69 2996 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
jpayne@69 2997 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
jpayne@69 2998 #else
jpayne@69 2999 #define __PYX_GET_DICT_VERSION(dict) (0)
jpayne@69 3000 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
jpayne@69 3001 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
jpayne@69 3002 #endif
jpayne@69 3003
jpayne@69 3004 /* GetModuleGlobalName.proto */
jpayne@69 3005 #if CYTHON_USE_DICT_VERSIONS
jpayne@69 3006 #define __Pyx_GetModuleGlobalName(var, name) do {\
jpayne@69 3007 static PY_UINT64_T __pyx_dict_version = 0;\
jpayne@69 3008 static PyObject *__pyx_dict_cached_value = NULL;\
jpayne@69 3009 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
jpayne@69 3010 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
jpayne@69 3011 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
jpayne@69 3012 } while(0)
jpayne@69 3013 #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
jpayne@69 3014 PY_UINT64_T __pyx_dict_version;\
jpayne@69 3015 PyObject *__pyx_dict_cached_value;\
jpayne@69 3016 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
jpayne@69 3017 } while(0)
jpayne@69 3018 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
jpayne@69 3019 #else
jpayne@69 3020 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
jpayne@69 3021 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
jpayne@69 3022 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
jpayne@69 3023 #endif
jpayne@69 3024
jpayne@69 3025 /* RaiseUnexpectedTypeError.proto */
jpayne@69 3026 static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
jpayne@69 3027
jpayne@69 3028 /* ExtTypeTest.proto */
jpayne@69 3029 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
jpayne@69 3030
jpayne@69 3031 /* PyIntBinop.proto */
jpayne@69 3032 #if !CYTHON_COMPILING_IN_PYPY
jpayne@69 3033 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
jpayne@69 3034 #else
jpayne@69 3035 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
jpayne@69 3036 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
jpayne@69 3037 #endif
jpayne@69 3038
jpayne@69 3039 /* ListAppend.proto */
jpayne@69 3040 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
jpayne@69 3041 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
jpayne@69 3042 PyListObject* L = (PyListObject*) list;
jpayne@69 3043 Py_ssize_t len = Py_SIZE(list);
jpayne@69 3044 if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
jpayne@69 3045 Py_INCREF(x);
jpayne@69 3046 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
jpayne@69 3047 L->ob_item[len] = x;
jpayne@69 3048 #else
jpayne@69 3049 PyList_SET_ITEM(list, len, x);
jpayne@69 3050 #endif
jpayne@69 3051 __Pyx_SET_SIZE(list, len + 1);
jpayne@69 3052 return 0;
jpayne@69 3053 }
jpayne@69 3054 return PyList_Append(list, x);
jpayne@69 3055 }
jpayne@69 3056 #else
jpayne@69 3057 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
jpayne@69 3058 #endif
jpayne@69 3059
jpayne@69 3060 /* WriteUnraisableException.proto */
jpayne@69 3061 static void __Pyx_WriteUnraisable(const char *name, int clineno,
jpayne@69 3062 int lineno, const char *filename,
jpayne@69 3063 int full_traceback, int nogil);
jpayne@69 3064
jpayne@69 3065 /* PyObjectCallNoArg.proto */
jpayne@69 3066 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
jpayne@69 3067
jpayne@69 3068 /* ArgTypeTest.proto */
jpayne@69 3069 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
jpayne@69 3070 ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
jpayne@69 3071 __Pyx__ArgTypeTest(obj, type, name, exact))
jpayne@69 3072 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
jpayne@69 3073
jpayne@69 3074 /* PyObjectFormatAndDecref.proto */
jpayne@69 3075 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
jpayne@69 3076 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);
jpayne@69 3077
jpayne@69 3078 /* JoinPyUnicode.proto */
jpayne@69 3079 static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
jpayne@69 3080 Py_UCS4 max_char);
jpayne@69 3081
jpayne@69 3082 /* DictGetItem.proto */
jpayne@69 3083 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
jpayne@69 3084 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
jpayne@69 3085 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
jpayne@69 3086 (likely(PyDict_CheckExact(obj)) ?\
jpayne@69 3087 __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
jpayne@69 3088 #else
jpayne@69 3089 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
jpayne@69 3090 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
jpayne@69 3091 #endif
jpayne@69 3092
jpayne@69 3093 /* GetTopmostException.proto */
jpayne@69 3094 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
jpayne@69 3095 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
jpayne@69 3096 #endif
jpayne@69 3097
jpayne@69 3098 /* SaveResetException.proto */
jpayne@69 3099 #if CYTHON_FAST_THREAD_STATE
jpayne@69 3100 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
jpayne@69 3101 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
jpayne@69 3102 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
jpayne@69 3103 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
jpayne@69 3104 #else
jpayne@69 3105 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
jpayne@69 3106 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
jpayne@69 3107 #endif
jpayne@69 3108
jpayne@69 3109 /* GetException.proto */
jpayne@69 3110 #if CYTHON_FAST_THREAD_STATE
jpayne@69 3111 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
jpayne@69 3112 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
jpayne@69 3113 #else
jpayne@69 3114 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
jpayne@69 3115 #endif
jpayne@69 3116
jpayne@69 3117 /* py_dict_keys.proto */
jpayne@69 3118 static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d);
jpayne@69 3119
jpayne@69 3120 /* UnpackUnboundCMethod.proto */
jpayne@69 3121 typedef struct {
jpayne@69 3122 PyObject *type;
jpayne@69 3123 PyObject **method_name;
jpayne@69 3124 PyCFunction func;
jpayne@69 3125 PyObject *method;
jpayne@69 3126 int flag;
jpayne@69 3127 } __Pyx_CachedCFunction;
jpayne@69 3128
jpayne@69 3129 /* CallUnboundCMethod0.proto */
jpayne@69 3130 static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
jpayne@69 3131 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 3132 #define __Pyx_CallUnboundCMethod0(cfunc, self)\
jpayne@69 3133 (likely((cfunc)->func) ?\
jpayne@69 3134 (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\
jpayne@69 3135 (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
jpayne@69 3136 (PY_VERSION_HEX >= 0x030700A0 ?\
jpayne@69 3137 (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
jpayne@69 3138 (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
jpayne@69 3139 (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
jpayne@69 3140 (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
jpayne@69 3141 (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
jpayne@69 3142 ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\
jpayne@69 3143 __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
jpayne@69 3144 __Pyx__CallUnboundCMethod0(cfunc, self))
jpayne@69 3145 #else
jpayne@69 3146 #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
jpayne@69 3147 #endif
jpayne@69 3148
jpayne@69 3149 /* UnicodeAsUCS4.proto */
jpayne@69 3150 static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);
jpayne@69 3151
jpayne@69 3152 /* object_ord.proto */
jpayne@69 3153 #if PY_MAJOR_VERSION >= 3
jpayne@69 3154 #define __Pyx_PyObject_Ord(c)\
jpayne@69 3155 (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c))
jpayne@69 3156 #else
jpayne@69 3157 #define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c)
jpayne@69 3158 #endif
jpayne@69 3159 static long __Pyx__PyObject_Ord(PyObject* c);
jpayne@69 3160
jpayne@69 3161 /* RaiseTooManyValuesToUnpack.proto */
jpayne@69 3162 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
jpayne@69 3163
jpayne@69 3164 /* RaiseNeedMoreValuesToUnpack.proto */
jpayne@69 3165 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
jpayne@69 3166
jpayne@69 3167 /* IterFinish.proto */
jpayne@69 3168 static CYTHON_INLINE int __Pyx_IterFinish(void);
jpayne@69 3169
jpayne@69 3170 /* UnpackItemEndCheck.proto */
jpayne@69 3171 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
jpayne@69 3172
jpayne@69 3173 /* PyObjectSetAttrStr.proto */
jpayne@69 3174 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 3175 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
jpayne@69 3176 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
jpayne@69 3177 #else
jpayne@69 3178 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
jpayne@69 3179 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
jpayne@69 3180 #endif
jpayne@69 3181
jpayne@69 3182 /* AssertionsEnabled.proto */
jpayne@69 3183 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
jpayne@69 3184 #define __Pyx_init_assertions_enabled() (0)
jpayne@69 3185 #define __pyx_assertions_enabled() (1)
jpayne@69 3186 #elif CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000)
jpayne@69 3187 static int __pyx_assertions_enabled_flag;
jpayne@69 3188 #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
jpayne@69 3189 static int __Pyx_init_assertions_enabled(void) {
jpayne@69 3190 PyObject *builtins, *debug, *debug_str;
jpayne@69 3191 int flag;
jpayne@69 3192 builtins = PyEval_GetBuiltins();
jpayne@69 3193 if (!builtins) goto bad;
jpayne@69 3194 debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
jpayne@69 3195 if (!debug_str) goto bad;
jpayne@69 3196 debug = PyObject_GetItem(builtins, debug_str);
jpayne@69 3197 Py_DECREF(debug_str);
jpayne@69 3198 if (!debug) goto bad;
jpayne@69 3199 flag = PyObject_IsTrue(debug);
jpayne@69 3200 Py_DECREF(debug);
jpayne@69 3201 if (flag == -1) goto bad;
jpayne@69 3202 __pyx_assertions_enabled_flag = flag;
jpayne@69 3203 return 0;
jpayne@69 3204 bad:
jpayne@69 3205 __pyx_assertions_enabled_flag = 1;
jpayne@69 3206 return -1;
jpayne@69 3207 }
jpayne@69 3208 #else
jpayne@69 3209 #define __Pyx_init_assertions_enabled() (0)
jpayne@69 3210 #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
jpayne@69 3211 #endif
jpayne@69 3212
jpayne@69 3213 /* PySequenceContains.proto */
jpayne@69 3214 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
jpayne@69 3215 int result = PySequence_Contains(seq, item);
jpayne@69 3216 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
jpayne@69 3217 }
jpayne@69 3218
jpayne@69 3219 /* Import.proto */
jpayne@69 3220 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
jpayne@69 3221
jpayne@69 3222 /* ImportFrom.proto */
jpayne@69 3223 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
jpayne@69 3224
jpayne@69 3225 /* GetItemInt.proto */
jpayne@69 3226 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
jpayne@69 3227 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
jpayne@69 3228 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
jpayne@69 3229 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
jpayne@69 3230 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
jpayne@69 3231 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
jpayne@69 3232 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
jpayne@69 3233 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
jpayne@69 3234 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
jpayne@69 3235 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
jpayne@69 3236 int wraparound, int boundscheck);
jpayne@69 3237 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
jpayne@69 3238 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
jpayne@69 3239 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
jpayne@69 3240 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
jpayne@69 3241 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
jpayne@69 3242 int wraparound, int boundscheck);
jpayne@69 3243 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
jpayne@69 3244 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
jpayne@69 3245 int is_list, int wraparound, int boundscheck);
jpayne@69 3246
jpayne@69 3247 /* GetAttr.proto */
jpayne@69 3248 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
jpayne@69 3249
jpayne@69 3250 /* HasAttr.proto */
jpayne@69 3251 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
jpayne@69 3252
jpayne@69 3253 /* CallNextTpDealloc.proto */
jpayne@69 3254 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);
jpayne@69 3255
jpayne@69 3256 /* CallNextTpTraverse.proto */
jpayne@69 3257 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
jpayne@69 3258
jpayne@69 3259 /* CallNextTpClear.proto */
jpayne@69 3260 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear);
jpayne@69 3261
jpayne@69 3262 /* IncludeStructmemberH.proto */
jpayne@69 3263 #include <structmember.h>
jpayne@69 3264
jpayne@69 3265 /* FixUpExtensionType.proto */
jpayne@69 3266 #if CYTHON_USE_TYPE_SPECS
jpayne@69 3267 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
jpayne@69 3268 #endif
jpayne@69 3269
jpayne@69 3270 /* PyObjectGetMethod.proto */
jpayne@69 3271 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
jpayne@69 3272
jpayne@69 3273 /* PyObjectCallMethod0.proto */
jpayne@69 3274 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
jpayne@69 3275
jpayne@69 3276 /* ValidateBasesTuple.proto */
jpayne@69 3277 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
jpayne@69 3278 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
jpayne@69 3279 #endif
jpayne@69 3280
jpayne@69 3281 /* PyType_Ready.proto */
jpayne@69 3282 CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
jpayne@69 3283
jpayne@69 3284 /* PyObject_GenericGetAttrNoDict.proto */
jpayne@69 3285 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@69 3286 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
jpayne@69 3287 #else
jpayne@69 3288 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
jpayne@69 3289 #endif
jpayne@69 3290
jpayne@69 3291 /* PyObject_GenericGetAttr.proto */
jpayne@69 3292 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@69 3293 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
jpayne@69 3294 #else
jpayne@69 3295 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
jpayne@69 3296 #endif
jpayne@69 3297
jpayne@69 3298 /* SetVTable.proto */
jpayne@69 3299 static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);
jpayne@69 3300
jpayne@69 3301 /* GetVTable.proto */
jpayne@69 3302 static void* __Pyx_GetVtable(PyTypeObject *type);
jpayne@69 3303
jpayne@69 3304 /* MergeVTables.proto */
jpayne@69 3305 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 3306 static int __Pyx_MergeVtables(PyTypeObject *type);
jpayne@69 3307 #endif
jpayne@69 3308
jpayne@69 3309 /* SetupReduce.proto */
jpayne@69 3310 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 3311 static int __Pyx_setup_reduce(PyObject* type_obj);
jpayne@69 3312 #endif
jpayne@69 3313
jpayne@69 3314 /* TypeImport.proto */
jpayne@69 3315 #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11
jpayne@69 3316 #define __PYX_HAVE_RT_ImportType_proto_3_0_11
jpayne@69 3317 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
jpayne@69 3318 #include <stdalign.h>
jpayne@69 3319 #endif
jpayne@69 3320 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
jpayne@69 3321 #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s)
jpayne@69 3322 #else
jpayne@69 3323 #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*)
jpayne@69 3324 #endif
jpayne@69 3325 enum __Pyx_ImportType_CheckSize_3_0_11 {
jpayne@69 3326 __Pyx_ImportType_CheckSize_Error_3_0_11 = 0,
jpayne@69 3327 __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1,
jpayne@69 3328 __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2
jpayne@69 3329 };
jpayne@69 3330 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);
jpayne@69 3331 #endif
jpayne@69 3332
jpayne@69 3333 /* ImportDottedModule.proto */
jpayne@69 3334 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
jpayne@69 3335 #if PY_MAJOR_VERSION >= 3
jpayne@69 3336 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
jpayne@69 3337 #endif
jpayne@69 3338
jpayne@69 3339 /* FetchSharedCythonModule.proto */
jpayne@69 3340 static PyObject *__Pyx_FetchSharedCythonABIModule(void);
jpayne@69 3341
jpayne@69 3342 /* FetchCommonType.proto */
jpayne@69 3343 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 3344 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
jpayne@69 3345 #else
jpayne@69 3346 static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
jpayne@69 3347 #endif
jpayne@69 3348
jpayne@69 3349 /* PyMethodNew.proto */
jpayne@69 3350 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 3351 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
jpayne@69 3352 PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
jpayne@69 3353 CYTHON_UNUSED_VAR(typ);
jpayne@69 3354 if (!self)
jpayne@69 3355 return __Pyx_NewRef(func);
jpayne@69 3356 typesModule = PyImport_ImportModule("types");
jpayne@69 3357 if (!typesModule) return NULL;
jpayne@69 3358 methodType = PyObject_GetAttrString(typesModule, "MethodType");
jpayne@69 3359 Py_DECREF(typesModule);
jpayne@69 3360 if (!methodType) return NULL;
jpayne@69 3361 result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
jpayne@69 3362 Py_DECREF(methodType);
jpayne@69 3363 return result;
jpayne@69 3364 }
jpayne@69 3365 #elif PY_MAJOR_VERSION >= 3
jpayne@69 3366 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
jpayne@69 3367 CYTHON_UNUSED_VAR(typ);
jpayne@69 3368 if (!self)
jpayne@69 3369 return __Pyx_NewRef(func);
jpayne@69 3370 return PyMethod_New(func, self);
jpayne@69 3371 }
jpayne@69 3372 #else
jpayne@69 3373 #define __Pyx_PyMethod_New PyMethod_New
jpayne@69 3374 #endif
jpayne@69 3375
jpayne@69 3376 /* PyVectorcallFastCallDict.proto */
jpayne@69 3377 #if CYTHON_METH_FASTCALL
jpayne@69 3378 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
jpayne@69 3379 #endif
jpayne@69 3380
jpayne@69 3381 /* CythonFunctionShared.proto */
jpayne@69 3382 #define __Pyx_CyFunction_USED
jpayne@69 3383 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
jpayne@69 3384 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
jpayne@69 3385 #define __Pyx_CYFUNCTION_CCLASS 0x04
jpayne@69 3386 #define __Pyx_CYFUNCTION_COROUTINE 0x08
jpayne@69 3387 #define __Pyx_CyFunction_GetClosure(f)\
jpayne@69 3388 (((__pyx_CyFunctionObject *) (f))->func_closure)
jpayne@69 3389 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 3390 #define __Pyx_CyFunction_GetClassObj(f)\
jpayne@69 3391 (((__pyx_CyFunctionObject *) (f))->func_classobj)
jpayne@69 3392 #else
jpayne@69 3393 #define __Pyx_CyFunction_GetClassObj(f)\
jpayne@69 3394 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
jpayne@69 3395 #endif
jpayne@69 3396 #define __Pyx_CyFunction_SetClassObj(f, classobj)\
jpayne@69 3397 __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
jpayne@69 3398 #define __Pyx_CyFunction_Defaults(type, f)\
jpayne@69 3399 ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
jpayne@69 3400 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
jpayne@69 3401 ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
jpayne@69 3402 typedef struct {
jpayne@69 3403 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 3404 PyObject_HEAD
jpayne@69 3405 PyObject *func;
jpayne@69 3406 #elif PY_VERSION_HEX < 0x030900B1
jpayne@69 3407 PyCFunctionObject func;
jpayne@69 3408 #else
jpayne@69 3409 PyCMethodObject func;
jpayne@69 3410 #endif
jpayne@69 3411 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 3412 __pyx_vectorcallfunc func_vectorcall;
jpayne@69 3413 #endif
jpayne@69 3414 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 3415 PyObject *func_weakreflist;
jpayne@69 3416 #endif
jpayne@69 3417 PyObject *func_dict;
jpayne@69 3418 PyObject *func_name;
jpayne@69 3419 PyObject *func_qualname;
jpayne@69 3420 PyObject *func_doc;
jpayne@69 3421 PyObject *func_globals;
jpayne@69 3422 PyObject *func_code;
jpayne@69 3423 PyObject *func_closure;
jpayne@69 3424 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 3425 PyObject *func_classobj;
jpayne@69 3426 #endif
jpayne@69 3427 void *defaults;
jpayne@69 3428 int defaults_pyobjects;
jpayne@69 3429 size_t defaults_size;
jpayne@69 3430 int flags;
jpayne@69 3431 PyObject *defaults_tuple;
jpayne@69 3432 PyObject *defaults_kwdict;
jpayne@69 3433 PyObject *(*defaults_getter)(PyObject *);
jpayne@69 3434 PyObject *func_annotations;
jpayne@69 3435 PyObject *func_is_coroutine;
jpayne@69 3436 } __pyx_CyFunctionObject;
jpayne@69 3437 #undef __Pyx_CyOrPyCFunction_Check
jpayne@69 3438 #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
jpayne@69 3439 #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
jpayne@69 3440 #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
jpayne@69 3441 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
jpayne@69 3442 #undef __Pyx_IsSameCFunction
jpayne@69 3443 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
jpayne@69 3444 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
jpayne@69 3445 int flags, PyObject* qualname,
jpayne@69 3446 PyObject *closure,
jpayne@69 3447 PyObject *module, PyObject *globals,
jpayne@69 3448 PyObject* code);
jpayne@69 3449 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
jpayne@69 3450 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
jpayne@69 3451 size_t size,
jpayne@69 3452 int pyobjects);
jpayne@69 3453 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
jpayne@69 3454 PyObject *tuple);
jpayne@69 3455 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
jpayne@69 3456 PyObject *dict);
jpayne@69 3457 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
jpayne@69 3458 PyObject *dict);
jpayne@69 3459 static int __pyx_CyFunction_init(PyObject *module);
jpayne@69 3460 #if CYTHON_METH_FASTCALL
jpayne@69 3461 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@69 3462 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@69 3463 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@69 3464 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@69 3465 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 3466 #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
jpayne@69 3467 #else
jpayne@69 3468 #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
jpayne@69 3469 #endif
jpayne@69 3470 #endif
jpayne@69 3471
jpayne@69 3472 /* CythonFunction.proto */
jpayne@69 3473 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
jpayne@69 3474 int flags, PyObject* qualname,
jpayne@69 3475 PyObject *closure,
jpayne@69 3476 PyObject *module, PyObject *globals,
jpayne@69 3477 PyObject* code);
jpayne@69 3478
jpayne@69 3479 /* SetNameInClass.proto */
jpayne@69 3480 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
jpayne@69 3481 #define __Pyx_SetNameInClass(ns, name, value)\
jpayne@69 3482 (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
jpayne@69 3483 #elif CYTHON_COMPILING_IN_CPYTHON
jpayne@69 3484 #define __Pyx_SetNameInClass(ns, name, value)\
jpayne@69 3485 (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
jpayne@69 3486 #else
jpayne@69 3487 #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
jpayne@69 3488 #endif
jpayne@69 3489
jpayne@69 3490 /* CalculateMetaclass.proto */
jpayne@69 3491 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
jpayne@69 3492
jpayne@69 3493 /* PyObjectCall2Args.proto */
jpayne@69 3494 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
jpayne@69 3495
jpayne@69 3496 /* PyObjectLookupSpecial.proto */
jpayne@69 3497 #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
jpayne@69 3498 #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
jpayne@69 3499 #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
jpayne@69 3500 static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
jpayne@69 3501 #else
jpayne@69 3502 #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
jpayne@69 3503 #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
jpayne@69 3504 #endif
jpayne@69 3505
jpayne@69 3506 /* Py3ClassCreate.proto */
jpayne@69 3507 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
jpayne@69 3508 PyObject *mkw, PyObject *modname, PyObject *doc);
jpayne@69 3509 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
jpayne@69 3510 PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
jpayne@69 3511
jpayne@69 3512 /* CLineInTraceback.proto */
jpayne@69 3513 #ifdef CYTHON_CLINE_IN_TRACEBACK
jpayne@69 3514 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
jpayne@69 3515 #else
jpayne@69 3516 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
jpayne@69 3517 #endif
jpayne@69 3518
jpayne@69 3519 /* CodeObjectCache.proto */
jpayne@69 3520 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 3521 typedef struct {
jpayne@69 3522 PyCodeObject* code_object;
jpayne@69 3523 int code_line;
jpayne@69 3524 } __Pyx_CodeObjectCacheEntry;
jpayne@69 3525 struct __Pyx_CodeObjectCache {
jpayne@69 3526 int count;
jpayne@69 3527 int max_count;
jpayne@69 3528 __Pyx_CodeObjectCacheEntry* entries;
jpayne@69 3529 };
jpayne@69 3530 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
jpayne@69 3531 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
jpayne@69 3532 static PyCodeObject *__pyx_find_code_object(int code_line);
jpayne@69 3533 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
jpayne@69 3534 #endif
jpayne@69 3535
jpayne@69 3536 /* AddTraceback.proto */
jpayne@69 3537 static void __Pyx_AddTraceback(const char *funcname, int c_line,
jpayne@69 3538 int py_line, const char *filename);
jpayne@69 3539
jpayne@69 3540 /* GCCDiagnostics.proto */
jpayne@69 3541 #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
jpayne@69 3542 #define __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 3543 #endif
jpayne@69 3544
jpayne@69 3545 /* ArrayAPI.proto */
jpayne@69 3546 #ifndef _ARRAYARRAY_H
jpayne@69 3547 #define _ARRAYARRAY_H
jpayne@69 3548 typedef struct arraydescr {
jpayne@69 3549 int typecode;
jpayne@69 3550 int itemsize;
jpayne@69 3551 PyObject * (*getitem)(struct arrayobject *, Py_ssize_t);
jpayne@69 3552 int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *);
jpayne@69 3553 #if PY_MAJOR_VERSION >= 3
jpayne@69 3554 char *formats;
jpayne@69 3555 #endif
jpayne@69 3556 } arraydescr;
jpayne@69 3557 struct arrayobject {
jpayne@69 3558 PyObject_HEAD
jpayne@69 3559 Py_ssize_t ob_size;
jpayne@69 3560 union {
jpayne@69 3561 char *ob_item;
jpayne@69 3562 float *as_floats;
jpayne@69 3563 double *as_doubles;
jpayne@69 3564 int *as_ints;
jpayne@69 3565 unsigned int *as_uints;
jpayne@69 3566 unsigned char *as_uchars;
jpayne@69 3567 signed char *as_schars;
jpayne@69 3568 char *as_chars;
jpayne@69 3569 unsigned long *as_ulongs;
jpayne@69 3570 long *as_longs;
jpayne@69 3571 #if PY_MAJOR_VERSION >= 3
jpayne@69 3572 unsigned long long *as_ulonglongs;
jpayne@69 3573 long long *as_longlongs;
jpayne@69 3574 #endif
jpayne@69 3575 short *as_shorts;
jpayne@69 3576 unsigned short *as_ushorts;
jpayne@69 3577 Py_UNICODE *as_pyunicodes;
jpayne@69 3578 void *as_voidptr;
jpayne@69 3579 } data;
jpayne@69 3580 Py_ssize_t allocated;
jpayne@69 3581 struct arraydescr *ob_descr;
jpayne@69 3582 PyObject *weakreflist;
jpayne@69 3583 #if PY_MAJOR_VERSION >= 3
jpayne@69 3584 int ob_exports;
jpayne@69 3585 #endif
jpayne@69 3586 };
jpayne@69 3587 #ifndef NO_NEWARRAY_INLINE
jpayne@69 3588 static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size,
jpayne@69 3589 struct arraydescr *descr) {
jpayne@69 3590 arrayobject *op;
jpayne@69 3591 size_t nbytes;
jpayne@69 3592 if (size < 0) {
jpayne@69 3593 PyErr_BadInternalCall();
jpayne@69 3594 return NULL;
jpayne@69 3595 }
jpayne@69 3596 nbytes = size * descr->itemsize;
jpayne@69 3597 if (nbytes / descr->itemsize != (size_t)size) {
jpayne@69 3598 return PyErr_NoMemory();
jpayne@69 3599 }
jpayne@69 3600 op = (arrayobject *) type->tp_alloc(type, 0);
jpayne@69 3601 if (op == NULL) {
jpayne@69 3602 return NULL;
jpayne@69 3603 }
jpayne@69 3604 op->ob_descr = descr;
jpayne@69 3605 op->allocated = size;
jpayne@69 3606 op->weakreflist = NULL;
jpayne@69 3607 __Pyx_SET_SIZE(op, size);
jpayne@69 3608 if (size <= 0) {
jpayne@69 3609 op->data.ob_item = NULL;
jpayne@69 3610 }
jpayne@69 3611 else {
jpayne@69 3612 op->data.ob_item = PyMem_NEW(char, nbytes);
jpayne@69 3613 if (op->data.ob_item == NULL) {
jpayne@69 3614 Py_DECREF(op);
jpayne@69 3615 return PyErr_NoMemory();
jpayne@69 3616 }
jpayne@69 3617 }
jpayne@69 3618 return (PyObject *) op;
jpayne@69 3619 }
jpayne@69 3620 #else
jpayne@69 3621 PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size,
jpayne@69 3622 struct arraydescr *descr);
jpayne@69 3623 #endif
jpayne@69 3624 static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) {
jpayne@69 3625 void *items = (void*) self->data.ob_item;
jpayne@69 3626 PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize));
jpayne@69 3627 if (items == NULL) {
jpayne@69 3628 PyErr_NoMemory();
jpayne@69 3629 return -1;
jpayne@69 3630 }
jpayne@69 3631 self->data.ob_item = (char*) items;
jpayne@69 3632 __Pyx_SET_SIZE(self, n);
jpayne@69 3633 self->allocated = n;
jpayne@69 3634 return 0;
jpayne@69 3635 }
jpayne@69 3636 static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) {
jpayne@69 3637 void *items = (void*) self->data.ob_item;
jpayne@69 3638 Py_ssize_t newsize;
jpayne@69 3639 if (n < self->allocated && n*4 > self->allocated) {
jpayne@69 3640 __Pyx_SET_SIZE(self, n);
jpayne@69 3641 return 0;
jpayne@69 3642 }
jpayne@69 3643 newsize = n + (n / 2) + 1;
jpayne@69 3644 if (newsize <= n) {
jpayne@69 3645 PyErr_NoMemory();
jpayne@69 3646 return -1;
jpayne@69 3647 }
jpayne@69 3648 PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize));
jpayne@69 3649 if (items == NULL) {
jpayne@69 3650 PyErr_NoMemory();
jpayne@69 3651 return -1;
jpayne@69 3652 }
jpayne@69 3653 self->data.ob_item = (char*) items;
jpayne@69 3654 __Pyx_SET_SIZE(self, n);
jpayne@69 3655 self->allocated = newsize;
jpayne@69 3656 return 0;
jpayne@69 3657 }
jpayne@69 3658 #endif
jpayne@69 3659
jpayne@69 3660 /* CIntFromPy.proto */
jpayne@69 3661 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
jpayne@69 3662
jpayne@69 3663 /* CIntToPy.proto */
jpayne@69 3664 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
jpayne@69 3665
jpayne@69 3666 /* CIntFromPy.proto */
jpayne@69 3667 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
jpayne@69 3668
jpayne@69 3669 /* CIntFromPy.proto */
jpayne@69 3670 static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);
jpayne@69 3671
jpayne@69 3672 /* CIntToPy.proto */
jpayne@69 3673 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);
jpayne@69 3674
jpayne@69 3675 /* CIntToPy.proto */
jpayne@69 3676 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
jpayne@69 3677
jpayne@69 3678 /* CIntFromPy.proto */
jpayne@69 3679 static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *);
jpayne@69 3680
jpayne@69 3681 /* FormatTypeName.proto */
jpayne@69 3682 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 3683 typedef PyObject *__Pyx_TypeName;
jpayne@69 3684 #define __Pyx_FMT_TYPENAME "%U"
jpayne@69 3685 static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
jpayne@69 3686 #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
jpayne@69 3687 #else
jpayne@69 3688 typedef const char *__Pyx_TypeName;
jpayne@69 3689 #define __Pyx_FMT_TYPENAME "%.200s"
jpayne@69 3690 #define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
jpayne@69 3691 #define __Pyx_DECREF_TypeName(obj)
jpayne@69 3692 #endif
jpayne@69 3693
jpayne@69 3694 /* FastTypeChecks.proto */
jpayne@69 3695 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 3696 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
jpayne@69 3697 #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
jpayne@69 3698 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
jpayne@69 3699 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
jpayne@69 3700 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
jpayne@69 3701 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
jpayne@69 3702 #else
jpayne@69 3703 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
jpayne@69 3704 #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
jpayne@69 3705 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
jpayne@69 3706 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
jpayne@69 3707 #endif
jpayne@69 3708 #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
jpayne@69 3709 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
jpayne@69 3710
jpayne@69 3711 /* CheckBinaryVersion.proto */
jpayne@69 3712 static unsigned long __Pyx_get_runtime_version(void);
jpayne@69 3713 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
jpayne@69 3714
jpayne@69 3715 /* FunctionImport.proto */
jpayne@69 3716 static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
jpayne@69 3717
jpayne@69 3718 /* InitStrings.proto */
jpayne@69 3719 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
jpayne@69 3720
jpayne@69 3721 /* #### Code section: module_declarations ### */
jpayne@69 3722 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/
jpayne@69 3723 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/
jpayne@69 3724 static PyObject *__pyx_f_5pysam_9libctabix_6Parser_parse(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, CYTHON_UNUSED char *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_length); /* proto*/
jpayne@69 3725 static PyObject *__pyx_f_5pysam_9libctabix_7asTuple_parse(struct __pyx_obj_5pysam_9libctabix_asTuple *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len); /* proto*/
jpayne@69 3726 static PyObject *__pyx_f_5pysam_9libctabix_6asGFF3_parse(struct __pyx_obj_5pysam_9libctabix_asGFF3 *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len); /* proto*/
jpayne@69 3727 static PyObject *__pyx_f_5pysam_9libctabix_5asGTF_parse(struct __pyx_obj_5pysam_9libctabix_asGTF *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len); /* proto*/
jpayne@69 3728 static PyObject *__pyx_f_5pysam_9libctabix_5asBed_parse(struct __pyx_obj_5pysam_9libctabix_asBed *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len); /* proto*/
jpayne@69 3729 static PyObject *__pyx_f_5pysam_9libctabix_5asVCF_parse(struct __pyx_obj_5pysam_9libctabix_asVCF *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len); /* proto*/
jpayne@69 3730 static int __pyx_f_5pysam_9libctabix_13TabixIterator___cnext__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self); /* proto*/
jpayne@69 3731 static int __pyx_f_5pysam_9libctabix_10GZIterator___cnext__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self); /* proto*/
jpayne@69 3732 static PyObject *__pyx_f_5pysam_9libctabix_19tabix_file_iterator___cnext__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self); /* proto*/
jpayne@69 3733
jpayne@69 3734 /* Module declarations from "libc.stdint" */
jpayne@69 3735
jpayne@69 3736 /* Module declarations from "libc.string" */
jpayne@69 3737
jpayne@69 3738 /* Module declarations from "libc.stdlib" */
jpayne@69 3739
jpayne@69 3740 /* Module declarations from "libc.stdio" */
jpayne@69 3741
jpayne@69 3742 /* Module declarations from "posix.types" */
jpayne@69 3743
jpayne@69 3744 /* Module declarations from "pysam.libchtslib" */
jpayne@69 3745
jpayne@69 3746 /* Module declarations from "libc.errno" */
jpayne@69 3747
jpayne@69 3748 /* Module declarations from "posix.unistd" */
jpayne@69 3749
jpayne@69 3750 /* Module declarations from "cpython.version" */
jpayne@69 3751
jpayne@69 3752 /* Module declarations from "__builtin__" */
jpayne@69 3753
jpayne@69 3754 /* Module declarations from "cpython.type" */
jpayne@69 3755
jpayne@69 3756 /* Module declarations from "cpython.object" */
jpayne@69 3757
jpayne@69 3758 /* Module declarations from "cpython.ref" */
jpayne@69 3759
jpayne@69 3760 /* Module declarations from "cpython.exc" */
jpayne@69 3761
jpayne@69 3762 /* Module declarations from "cpython.module" */
jpayne@69 3763
jpayne@69 3764 /* Module declarations from "cpython.mem" */
jpayne@69 3765
jpayne@69 3766 /* Module declarations from "cpython.tuple" */
jpayne@69 3767
jpayne@69 3768 /* Module declarations from "cpython.list" */
jpayne@69 3769
jpayne@69 3770 /* Module declarations from "cpython.sequence" */
jpayne@69 3771
jpayne@69 3772 /* Module declarations from "cpython.mapping" */
jpayne@69 3773
jpayne@69 3774 /* Module declarations from "cpython.iterator" */
jpayne@69 3775
jpayne@69 3776 /* Module declarations from "cpython.number" */
jpayne@69 3777
jpayne@69 3778 /* Module declarations from "cpython.int" */
jpayne@69 3779
jpayne@69 3780 /* Module declarations from "__builtin__" */
jpayne@69 3781
jpayne@69 3782 /* Module declarations from "cpython.bool" */
jpayne@69 3783
jpayne@69 3784 /* Module declarations from "cpython.long" */
jpayne@69 3785
jpayne@69 3786 /* Module declarations from "cpython.float" */
jpayne@69 3787
jpayne@69 3788 /* Module declarations from "__builtin__" */
jpayne@69 3789
jpayne@69 3790 /* Module declarations from "cpython.complex" */
jpayne@69 3791
jpayne@69 3792 /* Module declarations from "cpython.string" */
jpayne@69 3793
jpayne@69 3794 /* Module declarations from "libc.stddef" */
jpayne@69 3795
jpayne@69 3796 /* Module declarations from "cpython.unicode" */
jpayne@69 3797
jpayne@69 3798 /* Module declarations from "cpython.pyport" */
jpayne@69 3799
jpayne@69 3800 /* Module declarations from "cpython.dict" */
jpayne@69 3801
jpayne@69 3802 /* Module declarations from "cpython.instance" */
jpayne@69 3803
jpayne@69 3804 /* Module declarations from "cpython.function" */
jpayne@69 3805
jpayne@69 3806 /* Module declarations from "cpython.method" */
jpayne@69 3807
jpayne@69 3808 /* Module declarations from "cpython.weakref" */
jpayne@69 3809
jpayne@69 3810 /* Module declarations from "cpython.getargs" */
jpayne@69 3811
jpayne@69 3812 /* Module declarations from "cpython.pythread" */
jpayne@69 3813
jpayne@69 3814 /* Module declarations from "cpython.pystate" */
jpayne@69 3815
jpayne@69 3816 /* Module declarations from "cpython.cobject" */
jpayne@69 3817
jpayne@69 3818 /* Module declarations from "cpython.oldbuffer" */
jpayne@69 3819
jpayne@69 3820 /* Module declarations from "cpython.set" */
jpayne@69 3821
jpayne@69 3822 /* Module declarations from "cpython.buffer" */
jpayne@69 3823
jpayne@69 3824 /* Module declarations from "cpython.bytes" */
jpayne@69 3825
jpayne@69 3826 /* Module declarations from "cpython.pycapsule" */
jpayne@69 3827
jpayne@69 3828 /* Module declarations from "cpython.contextvars" */
jpayne@69 3829
jpayne@69 3830 /* Module declarations from "cpython" */
jpayne@69 3831
jpayne@69 3832 /* Module declarations from "pysam.libctabixproxies" */
jpayne@69 3833
jpayne@69 3834 /* Module declarations from "cython" */
jpayne@69 3835
jpayne@69 3836 /* Module declarations from "array" */
jpayne@69 3837
jpayne@69 3838 /* Module declarations from "cpython.array" */
jpayne@69 3839 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/
jpayne@69 3840
jpayne@69 3841 /* Module declarations from "pysam.libcutils" */
jpayne@69 3842 static PyObject *(*__pyx_f_5pysam_9libcutils_charptr_to_str)(char const *, struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str *__pyx_optional_args); /*proto*/
jpayne@69 3843 static PyObject *(*__pyx_f_5pysam_9libcutils_force_str)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_str *__pyx_optional_args); /*proto*/
jpayne@69 3844 static PyObject *(*__pyx_f_5pysam_9libcutils_force_bytes)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_bytes *__pyx_optional_args); /*proto*/
jpayne@69 3845 static PyObject *(*__pyx_f_5pysam_9libcutils_encode_filename)(PyObject *); /*proto*/
jpayne@69 3846 static PyObject *(*__pyx_f_5pysam_9libcutils_from_string_and_size)(char const *, size_t); /*proto*/
jpayne@69 3847
jpayne@69 3848 /* Module declarations from "pysam.libctabix" */
jpayne@69 3849 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_Parser__set_state(struct __pyx_obj_5pysam_9libctabix_Parser *, PyObject *); /*proto*/
jpayne@69 3850 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asTuple__set_state(struct __pyx_obj_5pysam_9libctabix_asTuple *, PyObject *); /*proto*/
jpayne@69 3851 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asGFF3__set_state(struct __pyx_obj_5pysam_9libctabix_asGFF3 *, PyObject *); /*proto*/
jpayne@69 3852 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asGTF__set_state(struct __pyx_obj_5pysam_9libctabix_asGTF *, PyObject *); /*proto*/
jpayne@69 3853 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asBed__set_state(struct __pyx_obj_5pysam_9libctabix_asBed *, PyObject *); /*proto*/
jpayne@69 3854 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asVCF__set_state(struct __pyx_obj_5pysam_9libctabix_asVCF *, PyObject *); /*proto*/
jpayne@69 3855 /* #### Code section: typeinfo ### */
jpayne@69 3856 /* #### Code section: before_global_var ### */
jpayne@69 3857 #define __Pyx_MODULE_NAME "pysam.libctabix"
jpayne@69 3858 extern int __pyx_module_is_main_pysam__libctabix;
jpayne@69 3859 int __pyx_module_is_main_pysam__libctabix = 0;
jpayne@69 3860
jpayne@69 3861 /* Implementation of "pysam.libctabix" */
jpayne@69 3862 /* #### Code section: global_var ### */
jpayne@69 3863 static PyObject *__pyx_builtin_NotImplementedError;
jpayne@69 3864 static PyObject *__pyx_builtin_ValueError;
jpayne@69 3865 static PyObject *__pyx_builtin_IOError;
jpayne@69 3866 static PyObject *__pyx_builtin_OSError;
jpayne@69 3867 static PyObject *__pyx_builtin_TypeError;
jpayne@69 3868 static PyObject *__pyx_builtin_StopIteration;
jpayne@69 3869 static PyObject *__pyx_builtin_super;
jpayne@69 3870 static PyObject *__pyx_builtin_KeyError;
jpayne@69 3871 static PyObject *__pyx_builtin_AssertionError;
jpayne@69 3872 static PyObject *__pyx_builtin_MemoryError;
jpayne@69 3873 /* #### Code section: string_decls ### */
jpayne@69 3874 static const char __pyx_k_a[] = "a";
jpayne@69 3875 static const char __pyx_k_b[] = "b";
jpayne@69 3876 static const char __pyx_k_c[] = "c";
jpayne@69 3877 static const char __pyx_k_r[] = "r";
jpayne@69 3878 static const char __pyx_k_s[] = "%s";
jpayne@69 3879 static const char __pyx_k_fn[] = "fn";
jpayne@69 3880 static const char __pyx_k_fp[] = "fp";
jpayne@69 3881 static const char __pyx_k_gc[] = "gc";
jpayne@69 3882 static const char __pyx_k_gz[] = ".gz";
jpayne@69 3883 static const char __pyx_k_os[] = "os";
jpayne@69 3884 static const char __pyx_k__16[] = "-";
jpayne@69 3885 static const char __pyx_k__39[] = "#";
jpayne@69 3886 static const char __pyx_k__42[] = "': ";
jpayne@69 3887 static const char __pyx_k__43[] = ",";
jpayne@69 3888 static const char __pyx_k__44[] = "'";
jpayne@69 3889 static const char __pyx_k__56[] = ".";
jpayne@69 3890 static const char __pyx_k__62[] = "*";
jpayne@69 3891 static const char __pyx_k__78[] = "?";
jpayne@69 3892 static const char __pyx_k_all[] = "__all__";
jpayne@69 3893 static const char __pyx_k_bcf[] = "bcf";
jpayne@69 3894 static const char __pyx_k_bed[] = "bed";
jpayne@69 3895 static const char __pyx_k_cfn[] = "cfn";
jpayne@69 3896 static const char __pyx_k_cpy[] = "cpy";
jpayne@69 3897 static const char __pyx_k_csi[] = "csi";
jpayne@69 3898 static const char __pyx_k_doc[] = "__doc__";
jpayne@69 3899 static const char __pyx_k_dup[] = "_dup";
jpayne@69 3900 static const char __pyx_k_end[] = "end";
jpayne@69 3901 static const char __pyx_k_fmt[] = "fmt";
jpayne@69 3902 static const char __pyx_k_gff[] = "gff";
jpayne@69 3903 static const char __pyx_k_itr[] = "itr";
jpayne@69 3904 static const char __pyx_k_new[] = "__new__";
jpayne@69 3905 static const char __pyx_k_s_2[] = "s";
jpayne@69 3906 static const char __pyx_k_s_i[] = "%s:%i";
jpayne@69 3907 static const char __pyx_k_sam[] = "sam";
jpayne@69 3908 static const char __pyx_k_sys[] = "sys";
jpayne@69 3909 static const char __pyx_k_tbi[] = ".tbi";
jpayne@69 3910 static const char __pyx_k_vcf[] = "vcf";
jpayne@69 3911 static const char __pyx_k_conf[] = "conf";
jpayne@69 3912 static const char __pyx_k_cstr[] = "cstr";
jpayne@69 3913 static const char __pyx_k_dict[] = "__dict__";
jpayne@69 3914 static const char __pyx_k_init[] = "__init__";
jpayne@69 3915 static const char __pyx_k_iter[] = "__iter__";
jpayne@69 3916 static const char __pyx_k_keys[] = "keys";
jpayne@69 3917 static const char __pyx_k_line[] = "line";
jpayne@69 3918 static const char __pyx_k_main[] = "__main__";
jpayne@69 3919 static const char __pyx_k_mode[] = "mode";
jpayne@69 3920 static const char __pyx_k_name[] = "__name__";
jpayne@69 3921 static const char __pyx_k_next[] = "__next__";
jpayne@69 3922 static const char __pyx_k_open[] = "_open";
jpayne@69 3923 static const char __pyx_k_path[] = "path";
jpayne@69 3924 static const char __pyx_k_self[] = "self";
jpayne@69 3925 static const char __pyx_k_spec[] = "__spec__";
jpayne@69 3926 static const char __pyx_k_tell[] = "tell";
jpayne@69 3927 static const char __pyx_k_test[] = "__test__";
jpayne@69 3928 static const char __pyx_k_asBed[] = "asBed";
jpayne@69 3929 static const char __pyx_k_asGTF[] = "asGTF";
jpayne@69 3930 static const char __pyx_k_asVCF[] = "asVCF";
jpayne@69 3931 static const char __pyx_k_ascii[] = "ascii";
jpayne@69 3932 static const char __pyx_k_close[] = "close";
jpayne@69 3933 static const char __pyx_k_csi_2[] = ".csi";
jpayne@69 3934 static const char __pyx_k_fetch[] = "fetch";
jpayne@69 3935 static const char __pyx_k_fnidx[] = "fnidx";
jpayne@69 3936 static const char __pyx_k_force[] = "force";
jpayne@69 3937 static const char __pyx_k_index[] = "index";
jpayne@69 3938 static const char __pyx_k_s_i_i[] = "%s:%i-%i";
jpayne@69 3939 static const char __pyx_k_start[] = "start";
jpayne@69 3940 static const char __pyx_k_state[] = "state";
jpayne@69 3941 static const char __pyx_k_super[] = "super";
jpayne@69 3942 static const char __pyx_k_Parser[] = "Parser";
jpayne@69 3943 static const char __pyx_k_asGFF3[] = "asGFF3";
jpayne@69 3944 static const char __pyx_k_buffer[] = "buffer";
jpayne@69 3945 static const char __pyx_k_closed[] = "closed";
jpayne@69 3946 static const char __pyx_k_dict_2[] = "_dict";
jpayne@69 3947 static const char __pyx_k_enable[] = "enable";
jpayne@69 3948 static const char __pyx_k_exists[] = "exists";
jpayne@69 3949 static const char __pyx_k_fd_src[] = "fd_src";
jpayne@69 3950 static const char __pyx_k_format[] = "format";
jpayne@69 3951 static const char __pyx_k_import[] = "__import__";
jpayne@69 3952 static const char __pyx_k_infile[] = "infile";
jpayne@69 3953 static const char __pyx_k_length[] = "length";
jpayne@69 3954 static const char __pyx_k_module[] = "__module__";
jpayne@69 3955 static const char __pyx_k_nbytes[] = "nbytes";
jpayne@69 3956 static const char __pyx_k_parser[] = "parser";
jpayne@69 3957 static const char __pyx_k_pickle[] = "pickle";
jpayne@69 3958 static const char __pyx_k_preset[] = "preset";
jpayne@69 3959 static const char __pyx_k_psltbl[] = "psltbl";
jpayne@69 3960 static const char __pyx_k_reduce[] = "__reduce__";
jpayne@69 3961 static const char __pyx_k_region[] = "region";
jpayne@69 3962 static const char __pyx_k_retval[] = "retval";
jpayne@69 3963 static const char __pyx_k_suffix[] = "suffix";
jpayne@69 3964 static const char __pyx_k_unlink[] = "unlink";
jpayne@69 3965 static const char __pyx_k_update[] = "update";
jpayne@69 3966 static const char __pyx_k_IOError[] = "IOError";
jpayne@69 3967 static const char __pyx_k_OSError[] = "OSError";
jpayne@69 3968 static const char __pyx_k_asTuple[] = "asTuple";
jpayne@69 3969 static const char __pyx_k_contigs[] = "contigs";
jpayne@69 3970 static const char __pyx_k_disable[] = "disable";
jpayne@69 3971 static const char __pyx_k_end_col[] = "end_col";
jpayne@69 3972 static const char __pyx_k_fileobj[] = "fileobj";
jpayne@69 3973 static const char __pyx_k_is_open[] = "is_open";
jpayne@69 3974 static const char __pyx_k_prepare[] = "__prepare__";
jpayne@69 3975 static const char __pyx_k_seq_col[] = "seq_col";
jpayne@69 3976 static const char __pyx_k_threads[] = "threads";
jpayne@69 3977 static const char __pyx_k_KeyError[] = "KeyError";
jpayne@69 3978 static const char __pyx_k_O_RDONLY[] = "O_RDONLY";
jpayne@69 3979 static const char __pyx_k_encoding[] = "encoding";
jpayne@69 3980 static const char __pyx_k_filename[] = "filename";
jpayne@69 3981 static const char __pyx_k_fn_index[] = "fn_index";
jpayne@69 3982 static const char __pyx_k_getstate[] = "__getstate__";
jpayne@69 3983 static const char __pyx_k_is_empty[] = "is_empty";
jpayne@69 3984 static const char __pyx_k_pyx_type[] = "__pyx_type";
jpayne@69 3985 static const char __pyx_k_qualname[] = "__qualname__";
jpayne@69 3986 static const char __pyx_k_readline[] = "readline";
jpayne@69 3987 static const char __pyx_k_set_name[] = "__set_name__";
jpayne@69 3988 static const char __pyx_k_setstate[] = "__setstate__";
jpayne@69 3989 static const char __pyx_k_TabixFile[] = "TabixFile";
jpayne@69 3990 static const char __pyx_k_Tabixfile[] = "Tabixfile";
jpayne@69 3991 static const char __pyx_k_TypeError[] = "TypeError";
jpayne@69 3992 static const char __pyx_k_bytes_cpy[] = "bytes_cpy";
jpayne@69 3993 static const char __pyx_k_cfilename[] = "cfilename";
jpayne@69 3994 static const char __pyx_k_conf_data[] = "conf_data";
jpayne@69 3995 static const char __pyx_k_isenabled[] = "isenabled";
jpayne@69 3996 static const char __pyx_k_line_skip[] = "line_skip";
jpayne@69 3997 static const char __pyx_k_meta_char[] = "meta_char";
jpayne@69 3998 static const char __pyx_k_metaclass[] = "__metaclass__";
jpayne@69 3999 static const char __pyx_k_min_shift[] = "min_shift";
jpayne@69 4000 static const char __pyx_k_pyx_state[] = "__pyx_state";
jpayne@69 4001 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
jpayne@69 4002 static const char __pyx_k_reference[] = "reference";
jpayne@69 4003 static const char __pyx_k_start_col[] = "start_col";
jpayne@69 4004 static const char __pyx_k_zerobased[] = "zerobased";
jpayne@69 4005 static const char __pyx_k_GZIterator[] = "GZIterator";
jpayne@69 4006 static const char __pyx_k_ValueError[] = "ValueError";
jpayne@69 4007 static const char __pyx_k_pyx_result[] = "__pyx_result";
jpayne@69 4008 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
jpayne@69 4009 static const char __pyx_k_MemoryError[] = "MemoryError";
jpayne@69 4010 static const char __pyx_k_PickleError[] = "PickleError";
jpayne@69 4011 static const char __pyx_k_WINDOW_SIZE[] = "WINDOW_SIZE";
jpayne@69 4012 static const char __pyx_k_buffer_size[] = "buffer_size";
jpayne@69 4013 static const char __pyx_k_filename_in[] = "filename_in";
jpayne@69 4014 static const char __pyx_k_preset2conf[] = "preset2conf";
jpayne@69 4015 static const char __pyx_k_tabix_index[] = "tabix_index";
jpayne@69 4016 static const char __pyx_k_filename_out[] = "filename_out";
jpayne@69 4017 static const char __pyx_k_get_encoding[] = "get_encoding";
jpayne@69 4018 static const char __pyx_k_initializing[] = "_initializing";
jpayne@69 4019 static const char __pyx_k_is_coroutine[] = "_is_coroutine";
jpayne@69 4020 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
jpayne@69 4021 static const char __pyx_k_set_encoding[] = "set_encoding";
jpayne@69 4022 static const char __pyx_k_stringsource[] = "<stringsource>";
jpayne@69 4023 static const char __pyx_k_use_setstate[] = "use_setstate";
jpayne@69 4024 static const char __pyx_k_EmptyIterator[] = "EmptyIterator";
jpayne@69 4025 static const char __pyx_k_StopIteration[] = "StopIteration";
jpayne@69 4026 static const char __pyx_k_TabixIterator[] = "TabixIterator";
jpayne@69 4027 static const char __pyx_k_init_subclass[] = "__init_subclass__";
jpayne@69 4028 static const char __pyx_k_keep_original[] = "keep_original";
jpayne@69 4029 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
jpayne@69 4030 static const char __pyx_k_start_i_end_i[] = "start (%i) >= end (%i)";
jpayne@69 4031 static const char __pyx_k_AssertionError[] = "AssertionError";
jpayne@69 4032 static const char __pyx_k_GZIteratorHead[] = "GZIteratorHead";
jpayne@69 4033 static const char __pyx_k_TabixFile__dup[] = "TabixFile._dup";
jpayne@69 4034 static const char __pyx_k_empty_iterator[] = "empty iterator";
jpayne@69 4035 static const char __pyx_k_filename_index[] = "filename_index";
jpayne@69 4036 static const char __pyx_k_tabix_compress[] = "tabix_compress";
jpayne@69 4037 static const char __pyx_k_tabix_iterator[] = "tabix_iterator";
jpayne@69 4038 static const char __pyx_k_unknown_preset[] = "unknown preset '";
jpayne@69 4039 static const char __pyx_k_writing_failed[] = "writing failed";
jpayne@69 4040 static const char __pyx_k_TabixFile__open[] = "TabixFile._open";
jpayne@69 4041 static const char __pyx_k_TabixFile_close[] = "TabixFile.close";
jpayne@69 4042 static const char __pyx_k_TabixFile_fetch[] = "TabixFile.fetch";
jpayne@69 4043 static const char __pyx_k_cfilename_index[] = "cfilename_index";
jpayne@69 4044 static const char __pyx_k_pysam_libctabix[] = "pysam.libctabix";
jpayne@69 4045 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
jpayne@69 4046 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
jpayne@69 4047 static const char __pyx_k_GZIteratorParsed[] = "GZIteratorParsed";
jpayne@69 4048 static const char __pyx_k_file_s_not_found[] = "file `%s` not found";
jpayne@69 4049 static const char __pyx_k_index_s_not_found[] = "index `%s` not found";
jpayne@69 4050 static const char __pyx_k_valid_presets_are[] = "', valid presets are '";
jpayne@69 4051 static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
jpayne@69 4052 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
jpayne@69 4053 static const char __pyx_k_end_out_of_range_i[] = "end out of range (%i)";
jpayne@69 4054 static const char __pyx_k_multiple_iterators[] = "multiple_iterators";
jpayne@69 4055 static const char __pyx_k_pyx_unpickle_asBed[] = "__pyx_unpickle_asBed";
jpayne@69 4056 static const char __pyx_k_pyx_unpickle_asGTF[] = "__pyx_unpickle_asGTF";
jpayne@69 4057 static const char __pyx_k_pyx_unpickle_asVCF[] = "__pyx_unpickle_asVCF";
jpayne@69 4058 static const char __pyx_k_Could_not_open_file[] = "Could not open file '";
jpayne@69 4059 static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
jpayne@69 4060 static const char __pyx_k_Parser_get_encoding[] = "Parser.get_encoding";
jpayne@69 4061 static const char __pyx_k_Parser_set_encoding[] = "Parser.set_encoding";
jpayne@69 4062 static const char __pyx_k_TabixIteratorParsed[] = "TabixIteratorParsed";
jpayne@69 4063 static const char __pyx_k_pysam_libctabix_pyx[] = "pysam/libctabix.pyx";
jpayne@69 4064 static const char __pyx_k_pyx_unpickle_Parser[] = "__pyx_unpickle_Parser";
jpayne@69 4065 static const char __pyx_k_pyx_unpickle_asGFF3[] = "__pyx_unpickle_asGFF3";
jpayne@69 4066 static const char __pyx_k_tabix_file_iterator[] = "tabix_file_iterator";
jpayne@69 4067 static const char __pyx_k_EmptyIterator___iter[] = "EmptyIterator.__iter__";
jpayne@69 4068 static const char __pyx_k_EmptyIterator___next[] = "EmptyIterator.__next__";
jpayne@69 4069 static const char __pyx_k_incomplete_line_at_s[] = "incomplete line at %s";
jpayne@69 4070 static const char __pyx_k_pyx_unpickle_asTuple[] = "__pyx_unpickle_asTuple";
jpayne@69 4071 static const char __pyx_k_start_out_of_range_i[] = "start out of range (%i)";
jpayne@69 4072 static const char __pyx_k_asBed___reduce_cython[] = "asBed.__reduce_cython__";
jpayne@69 4073 static const char __pyx_k_asGTF___reduce_cython[] = "asGTF.__reduce_cython__";
jpayne@69 4074 static const char __pyx_k_asVCF___reduce_cython[] = "asVCF.__reduce_cython__";
jpayne@69 4075 static const char __pyx_k_could_not_open_file_s[] = "could not open file `%s`";
jpayne@69 4076 static const char __pyx_k_Parser___reduce_cython[] = "Parser.__reduce_cython__";
jpayne@69 4077 static const char __pyx_k_asGFF3___reduce_cython[] = "asGFF3.__reduce_cython__";
jpayne@69 4078 static const char __pyx_k_tabix_generic_iterator[] = "tabix_generic_iterator";
jpayne@69 4079 static const char __pyx_k_asBed___setstate_cython[] = "asBed.__setstate_cython__";
jpayne@69 4080 static const char __pyx_k_asGTF___setstate_cython[] = "asGTF.__setstate_cython__";
jpayne@69 4081 static const char __pyx_k_asTuple___reduce_cython[] = "asTuple.__reduce_cython__";
jpayne@69 4082 static const char __pyx_k_asVCF___setstate_cython[] = "asVCF.__setstate_cython__";
jpayne@69 4083 static const char __pyx_k_Parser___setstate_cython[] = "Parser.__setstate_cython__";
jpayne@69 4084 static const char __pyx_k_asGFF3___setstate_cython[] = "asGFF3.__setstate_cython__";
jpayne@69 4085 static const char __pyx_k_iteration_on_closed_file[] = "iteration on closed file";
jpayne@69 4086 static const char __pyx_k_TabixFile___reduce_cython[] = "TabixFile.__reduce_cython__";
jpayne@69 4087 static const char __pyx_k_Tabixfile___reduce_cython[] = "Tabixfile.__reduce_cython__";
jpayne@69 4088 static const char __pyx_k_asTuple___setstate_cython[] = "asTuple.__setstate_cython__";
jpayne@69 4089 static const char __pyx_k_GZIterator___reduce_cython[] = "GZIterator.__reduce_cython__";
jpayne@69 4090 static const char __pyx_k_could_not_open_index_for_s[] = "could not open index for `%s`";
jpayne@69 4091 static const char __pyx_k_No_such_file_or_directory_s[] = "No such file or directory: %s";
jpayne@69 4092 static const char __pyx_k_TabixFile___setstate_cython[] = "TabixFile.__setstate_cython__";
jpayne@69 4093 static const char __pyx_k_Tabixfile___setstate_cython[] = "Tabixfile.__setstate_cython__";
jpayne@69 4094 static const char __pyx_k_error_i_when_closing_file_s[] = "error %i when closing file %s";
jpayne@69 4095 static const char __pyx_k_invalid_file_opening_mode_s[] = "invalid file opening mode `%s`";
jpayne@69 4096 static const char __pyx_k_GZIterator___setstate_cython[] = "GZIterator.__setstate_cython__";
jpayne@69 4097 static const char __pyx_k_I_O_operation_on_closed_file[] = "I/O operation on closed file";
jpayne@69 4098 static const char __pyx_k_building_of_index_for_failed[] = "building of index for {} failed";
jpayne@69 4099 static const char __pyx_k_could_not_open_s_for_reading[] = "could not open '%s' for reading";
jpayne@69 4100 static const char __pyx_k_could_not_open_s_for_writing[] = "could not open '%s' for writing";
jpayne@69 4101 static const char __pyx_k_TabixIterator___reduce_cython[] = "TabixIterator.__reduce_cython__";
jpayne@69 4102 static const char __pyx_k_tabix_generic_iterator___init[] = "tabix_generic_iterator.__init__";
jpayne@69 4103 static const char __pyx_k_tabix_generic_iterator___iter[] = "tabix_generic_iterator.__iter__";
jpayne@69 4104 static const char __pyx_k_tabix_generic_iterator___next[] = "tabix_generic_iterator.__next__";
jpayne@69 4105 static const char __pyx_k_GZIteratorHead___reduce_cython[] = "GZIteratorHead.__reduce_cython__";
jpayne@69 4106 static const char __pyx_k_I_O_operation_on_closed_file_2[] = "I/O operation on closed file.";
jpayne@69 4107 static const char __pyx_k_error_i_when_writing_to_file_s[] = "error %i when writing to file %s";
jpayne@69 4108 static const char __pyx_k_TabixIterator___setstate_cython[] = "TabixIterator.__setstate_cython__";
jpayne@69 4109 static const char __pyx_k_could_not_load_tbi_csi_index_of[] = "could not load .tbi/.csi index of {}";
jpayne@69 4110 static const char __pyx_k_iterate_over_infile_Permits_the[] = "iterate over ``infile``.\n \n Permits the use of file-like objects for example from the gzip module.\n ";
jpayne@69 4111 static const char __pyx_k_Filename_s_already_exists_use_fo[] = "Filename '%s' already exists, use *force* to overwrite";
jpayne@69 4112 static const char __pyx_k_GZIteratorHead___setstate_cython[] = "GZIteratorHead.__setstate_cython__";
jpayne@69 4113 static const char __pyx_k_GZIteratorParsed___reduce_cython[] = "GZIteratorParsed.__reduce_cython__";
jpayne@69 4114 static const char __pyx_k_GZIteratorParsed___setstate_cyth[] = "GZIteratorParsed.__setstate_cython__";
jpayne@69 4115 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))";
jpayne@69 4116 static const char __pyx_k_TabixIteratorParsed___reduce_cyt[] = "TabixIteratorParsed.__reduce_cython__";
jpayne@69 4117 static const char __pyx_k_TabixIteratorParsed___setstate_c[] = "TabixIteratorParsed.__setstate_cython__";
jpayne@69 4118 static const char __pyx_k_could_not_create_iterator_for_re[] = "could not create iterator for region '%s'";
jpayne@69 4119 static const char __pyx_k_could_not_create_iterator_possib[] = "could not create iterator, possible tabix version mismatch";
jpayne@69 4120 static const char __pyx_k_could_not_open_for_reading_heade[] = "could not open {} for reading header";
jpayne@69 4121 static const char __pyx_k_filename_s_already_exists_use_fo[] = "filename '%s' already exists, use *force* to overwrite";
jpayne@69 4122 static const char __pyx_k_neither_preset_nor_seq_col_start[] = "neither preset nor seq_col,start_col and end_col given";
jpayne@69 4123 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
jpayne@69 4124 static const char __pyx_k_parse_method_of_s_not_implemente[] = "parse method of %s not implemented";
jpayne@69 4125 static const char __pyx_k_self_gzipfile_self_kstream_canno[] = "self.gzipfile,self.kstream cannot be converted to a Python object for pickling";
jpayne@69 4126 static const char __pyx_k_self_iterator_cannot_be_converte[] = "self.iterator cannot be converted to a Python object for pickling";
jpayne@69 4127 static const char __pyx_k_tabix_file_iterator___reduce_cyt[] = "tabix_file_iterator.__reduce_cython__";
jpayne@69 4128 static const char __pyx_k_tabix_file_iterator___setstate_c[] = "tabix_file_iterator.__setstate_cython__";
jpayne@69 4129 /* #### Code section: decls ### */
jpayne@69 4130 static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags); /* proto */
jpayne@69 4131 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
jpayne@69 4132 static int __pyx_pf_5pysam_9libctabix_6Parser___init__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, PyObject *__pyx_v_encoding); /* proto */
jpayne@69 4133 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_2set_encoding(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, PyObject *__pyx_v_encoding); /* proto */
jpayne@69 4134 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_4get_encoding(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self); /* proto */
jpayne@69 4135 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_6__call__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_length); /* proto */
jpayne@69 4136 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_8__reduce_cython__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self); /* proto */
jpayne@69 4137 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_10__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4138 static PyObject *__pyx_pf_5pysam_9libctabix_7asTuple___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asTuple *__pyx_v_self); /* proto */
jpayne@69 4139 static PyObject *__pyx_pf_5pysam_9libctabix_7asTuple_2__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_asTuple *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4140 static PyObject *__pyx_pf_5pysam_9libctabix_6asGFF3___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asGFF3 *__pyx_v_self); /* proto */
jpayne@69 4141 static PyObject *__pyx_pf_5pysam_9libctabix_6asGFF3_2__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_asGFF3 *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4142 static PyObject *__pyx_pf_5pysam_9libctabix_5asGTF___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asGTF *__pyx_v_self); /* proto */
jpayne@69 4143 static PyObject *__pyx_pf_5pysam_9libctabix_5asGTF_2__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_asGTF *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4144 static PyObject *__pyx_pf_5pysam_9libctabix_5asBed___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asBed *__pyx_v_self); /* proto */
jpayne@69 4145 static PyObject *__pyx_pf_5pysam_9libctabix_5asBed_2__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_asBed *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4146 static PyObject *__pyx_pf_5pysam_9libctabix_5asVCF___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asVCF *__pyx_v_self); /* proto */
jpayne@69 4147 static PyObject *__pyx_pf_5pysam_9libctabix_5asVCF_2__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_asVCF *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4148 static int __pyx_pf_5pysam_9libctabix_9TabixFile___cinit__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_parser, PyObject *__pyx_v_index, PyObject *__pyx_v_encoding, PyObject *__pyx_v_threads, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
jpayne@69 4149 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_2_open(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_index, PyObject *__pyx_v_threads); /* proto */
jpayne@69 4150 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_4_dup(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@69 4151 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_6fetch(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_parser, PyObject *__pyx_v_multiple_iterators); /* proto */
jpayne@69 4152 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_6header___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@69 4153 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_7contigs___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@69 4154 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_8close(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@69 4155 static void __pyx_pf_5pysam_9libctabix_9TabixFile_10__dealloc__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@69 4156 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_14filename_index___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@69 4157 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@69 4158 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4159 static int __pyx_pf_5pysam_9libctabix_13TabixIterator___init__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self, PyObject *__pyx_v_encoding); /* proto */
jpayne@69 4160 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_2__iter__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self); /* proto */
jpayne@69 4161 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_4__next__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self); /* proto */
jpayne@69 4162 static void __pyx_pf_5pysam_9libctabix_13TabixIterator_6__dealloc__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self); /* proto */
jpayne@69 4163 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self); /* proto */
jpayne@69 4164 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4165 static PyObject *__pyx_pf_5pysam_9libctabix_13EmptyIterator___iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
jpayne@69 4166 static PyObject *__pyx_pf_5pysam_9libctabix_13EmptyIterator_2__next__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
jpayne@69 4167 static int __pyx_pf_5pysam_9libctabix_19TabixIteratorParsed___init__(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self, struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_parser); /* proto */
jpayne@69 4168 static PyObject *__pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_2__next__(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self); /* proto */
jpayne@69 4169 static PyObject *__pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self); /* proto */
jpayne@69 4170 static PyObject *__pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4171 static int __pyx_pf_5pysam_9libctabix_10GZIterator___init__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self, PyObject *__pyx_v_filename, int __pyx_v_buffer_size, PyObject *__pyx_v_encoding); /* proto */
jpayne@69 4172 static void __pyx_pf_5pysam_9libctabix_10GZIterator_2__dealloc__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self); /* proto */
jpayne@69 4173 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_4__iter__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self); /* proto */
jpayne@69 4174 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_6__next__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self); /* proto */
jpayne@69 4175 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self); /* proto */
jpayne@69 4176 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4177 static PyObject *__pyx_pf_5pysam_9libctabix_14GZIteratorHead___next__(struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *__pyx_v_self); /* proto */
jpayne@69 4178 static PyObject *__pyx_pf_5pysam_9libctabix_14GZIteratorHead_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *__pyx_v_self); /* proto */
jpayne@69 4179 static PyObject *__pyx_pf_5pysam_9libctabix_14GZIteratorHead_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4180 static int __pyx_pf_5pysam_9libctabix_16GZIteratorParsed___init__(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self, PyObject *__pyx_v_parser); /* proto */
jpayne@69 4181 static PyObject *__pyx_pf_5pysam_9libctabix_16GZIteratorParsed_2__next__(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self); /* proto */
jpayne@69 4182 static PyObject *__pyx_pf_5pysam_9libctabix_16GZIteratorParsed_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self); /* proto */
jpayne@69 4183 static PyObject *__pyx_pf_5pysam_9libctabix_16GZIteratorParsed_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4184 static PyObject *__pyx_pf_5pysam_9libctabix_tabix_compress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename_in, PyObject *__pyx_v_filename_out, PyObject *__pyx_v_force); /* proto */
jpayne@69 4185 static PyObject *__pyx_pf_5pysam_9libctabix_2tabix_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_force, PyObject *__pyx_v_seq_col, PyObject *__pyx_v_start_col, PyObject *__pyx_v_end_col, PyObject *__pyx_v_preset, PyObject *__pyx_v_meta_char, int __pyx_v_line_skip, PyObject *__pyx_v_zerobased, int __pyx_v_min_shift, PyObject *__pyx_v_index, PyObject *__pyx_v_keep_original, PyObject *__pyx_v_csi); /* proto */
jpayne@69 4186 static int __pyx_pf_5pysam_9libctabix_19tabix_file_iterator___cinit__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self, PyObject *__pyx_v_infile, struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_parser, int __pyx_v_buffer_size); /* proto */
jpayne@69 4187 static PyObject *__pyx_pf_5pysam_9libctabix_19tabix_file_iterator_2__iter__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self); /* proto */
jpayne@69 4188 static void __pyx_pf_5pysam_9libctabix_19tabix_file_iterator_4__dealloc__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self); /* proto */
jpayne@69 4189 static PyObject *__pyx_pf_5pysam_9libctabix_19tabix_file_iterator_6__next__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self); /* proto */
jpayne@69 4190 static PyObject *__pyx_pf_5pysam_9libctabix_19tabix_file_iterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self); /* proto */
jpayne@69 4191 static PyObject *__pyx_pf_5pysam_9libctabix_19tabix_file_iterator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4192 static PyObject *__pyx_pf_5pysam_9libctabix_22tabix_generic_iterator___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_infile, PyObject *__pyx_v_parser); /* proto */
jpayne@69 4193 static PyObject *__pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
jpayne@69 4194 static PyObject *__pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_4__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
jpayne@69 4195 static PyObject *__pyx_pf_5pysam_9libctabix_4tabix_iterator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_infile, PyObject *__pyx_v_parser); /* proto */
jpayne@69 4196 static PyObject *__pyx_pf_5pysam_9libctabix_9Tabixfile___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_Tabixfile *__pyx_v_self); /* proto */
jpayne@69 4197 static PyObject *__pyx_pf_5pysam_9libctabix_9Tabixfile_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_Tabixfile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4198 static PyObject *__pyx_pf_5pysam_9libctabix_6__pyx_unpickle_Parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4199 static PyObject *__pyx_pf_5pysam_9libctabix_8__pyx_unpickle_asTuple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4200 static PyObject *__pyx_pf_5pysam_9libctabix_10__pyx_unpickle_asGFF3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4201 static PyObject *__pyx_pf_5pysam_9libctabix_12__pyx_unpickle_asGTF(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4202 static PyObject *__pyx_pf_5pysam_9libctabix_14__pyx_unpickle_asBed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4203 static PyObject *__pyx_pf_5pysam_9libctabix_16__pyx_unpickle_asVCF(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 4204 static PyObject *__pyx_tp_new_5pysam_9libctabix_tabix_file_iterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4205 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4206 static PyObject *__pyx_tp_new_5pysam_9libctabix_Parser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4207 static PyObject *__pyx_tp_new_5pysam_9libctabix_asTuple(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4208 static PyObject *__pyx_tp_new_5pysam_9libctabix_asGTF(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4209 static PyObject *__pyx_tp_new_5pysam_9libctabix_asGFF3(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4210 static PyObject *__pyx_tp_new_5pysam_9libctabix_asBed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4211 static PyObject *__pyx_tp_new_5pysam_9libctabix_asVCF(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4212 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4213 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4214 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4215 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIteratorHead(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4216 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4217 static PyObject *__pyx_tp_new_5pysam_9libctabix_Tabixfile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 4218 static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys = {0, 0, 0, 0, 0};
jpayne@69 4219 /* #### Code section: late_includes ### */
jpayne@69 4220 /* #### Code section: module_state ### */
jpayne@69 4221 typedef struct {
jpayne@69 4222 PyObject *__pyx_d;
jpayne@69 4223 PyObject *__pyx_b;
jpayne@69 4224 PyObject *__pyx_cython_runtime;
jpayne@69 4225 PyObject *__pyx_empty_tuple;
jpayne@69 4226 PyObject *__pyx_empty_bytes;
jpayne@69 4227 PyObject *__pyx_empty_unicode;
jpayne@69 4228 #ifdef __Pyx_CyFunction_USED
jpayne@69 4229 PyTypeObject *__pyx_CyFunctionType;
jpayne@69 4230 #endif
jpayne@69 4231 #ifdef __Pyx_FusedFunction_USED
jpayne@69 4232 PyTypeObject *__pyx_FusedFunctionType;
jpayne@69 4233 #endif
jpayne@69 4234 #ifdef __Pyx_Generator_USED
jpayne@69 4235 PyTypeObject *__pyx_GeneratorType;
jpayne@69 4236 #endif
jpayne@69 4237 #ifdef __Pyx_IterableCoroutine_USED
jpayne@69 4238 PyTypeObject *__pyx_IterableCoroutineType;
jpayne@69 4239 #endif
jpayne@69 4240 #ifdef __Pyx_Coroutine_USED
jpayne@69 4241 PyTypeObject *__pyx_CoroutineAwaitType;
jpayne@69 4242 #endif
jpayne@69 4243 #ifdef __Pyx_Coroutine_USED
jpayne@69 4244 PyTypeObject *__pyx_CoroutineType;
jpayne@69 4245 #endif
jpayne@69 4246 #if CYTHON_USE_MODULE_STATE
jpayne@69 4247 #endif
jpayne@69 4248 #if CYTHON_USE_MODULE_STATE
jpayne@69 4249 #endif
jpayne@69 4250 #if CYTHON_USE_MODULE_STATE
jpayne@69 4251 #endif
jpayne@69 4252 #if CYTHON_USE_MODULE_STATE
jpayne@69 4253 #endif
jpayne@69 4254 #if CYTHON_USE_MODULE_STATE
jpayne@69 4255 #endif
jpayne@69 4256 #if CYTHON_USE_MODULE_STATE
jpayne@69 4257 #endif
jpayne@69 4258 PyTypeObject *__pyx_ptype_5pysam_10libchtslib_HTSFile;
jpayne@69 4259 #if CYTHON_USE_MODULE_STATE
jpayne@69 4260 #endif
jpayne@69 4261 #if CYTHON_USE_MODULE_STATE
jpayne@69 4262 #endif
jpayne@69 4263 #if CYTHON_USE_MODULE_STATE
jpayne@69 4264 #endif
jpayne@69 4265 #if CYTHON_USE_MODULE_STATE
jpayne@69 4266 #endif
jpayne@69 4267 #if CYTHON_USE_MODULE_STATE
jpayne@69 4268 #endif
jpayne@69 4269 PyTypeObject *__pyx_ptype_7cpython_4type_type;
jpayne@69 4270 #if CYTHON_USE_MODULE_STATE
jpayne@69 4271 #endif
jpayne@69 4272 #if CYTHON_USE_MODULE_STATE
jpayne@69 4273 #endif
jpayne@69 4274 #if CYTHON_USE_MODULE_STATE
jpayne@69 4275 #endif
jpayne@69 4276 #if CYTHON_USE_MODULE_STATE
jpayne@69 4277 #endif
jpayne@69 4278 #if CYTHON_USE_MODULE_STATE
jpayne@69 4279 #endif
jpayne@69 4280 #if CYTHON_USE_MODULE_STATE
jpayne@69 4281 #endif
jpayne@69 4282 #if CYTHON_USE_MODULE_STATE
jpayne@69 4283 #endif
jpayne@69 4284 #if CYTHON_USE_MODULE_STATE
jpayne@69 4285 #endif
jpayne@69 4286 #if CYTHON_USE_MODULE_STATE
jpayne@69 4287 #endif
jpayne@69 4288 #if CYTHON_USE_MODULE_STATE
jpayne@69 4289 #endif
jpayne@69 4290 #if CYTHON_USE_MODULE_STATE
jpayne@69 4291 #endif
jpayne@69 4292 #if CYTHON_USE_MODULE_STATE
jpayne@69 4293 #endif
jpayne@69 4294 #if CYTHON_USE_MODULE_STATE
jpayne@69 4295 #endif
jpayne@69 4296 #if CYTHON_USE_MODULE_STATE
jpayne@69 4297 #endif
jpayne@69 4298 PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
jpayne@69 4299 #if CYTHON_USE_MODULE_STATE
jpayne@69 4300 #endif
jpayne@69 4301 #if CYTHON_USE_MODULE_STATE
jpayne@69 4302 #endif
jpayne@69 4303 #if CYTHON_USE_MODULE_STATE
jpayne@69 4304 #endif
jpayne@69 4305 #if CYTHON_USE_MODULE_STATE
jpayne@69 4306 #endif
jpayne@69 4307 PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
jpayne@69 4308 #if CYTHON_USE_MODULE_STATE
jpayne@69 4309 #endif
jpayne@69 4310 #if CYTHON_USE_MODULE_STATE
jpayne@69 4311 #endif
jpayne@69 4312 #if CYTHON_USE_MODULE_STATE
jpayne@69 4313 #endif
jpayne@69 4314 #if CYTHON_USE_MODULE_STATE
jpayne@69 4315 #endif
jpayne@69 4316 #if CYTHON_USE_MODULE_STATE
jpayne@69 4317 #endif
jpayne@69 4318 #if CYTHON_USE_MODULE_STATE
jpayne@69 4319 #endif
jpayne@69 4320 #if CYTHON_USE_MODULE_STATE
jpayne@69 4321 #endif
jpayne@69 4322 #if CYTHON_USE_MODULE_STATE
jpayne@69 4323 #endif
jpayne@69 4324 #if CYTHON_USE_MODULE_STATE
jpayne@69 4325 #endif
jpayne@69 4326 #if CYTHON_USE_MODULE_STATE
jpayne@69 4327 #endif
jpayne@69 4328 #if CYTHON_USE_MODULE_STATE
jpayne@69 4329 #endif
jpayne@69 4330 #if CYTHON_USE_MODULE_STATE
jpayne@69 4331 #endif
jpayne@69 4332 #if CYTHON_USE_MODULE_STATE
jpayne@69 4333 #endif
jpayne@69 4334 #if CYTHON_USE_MODULE_STATE
jpayne@69 4335 #endif
jpayne@69 4336 #if CYTHON_USE_MODULE_STATE
jpayne@69 4337 #endif
jpayne@69 4338 #if CYTHON_USE_MODULE_STATE
jpayne@69 4339 #endif
jpayne@69 4340 #if CYTHON_USE_MODULE_STATE
jpayne@69 4341 #endif
jpayne@69 4342 #if CYTHON_USE_MODULE_STATE
jpayne@69 4343 #endif
jpayne@69 4344 #if CYTHON_USE_MODULE_STATE
jpayne@69 4345 #endif
jpayne@69 4346 #if CYTHON_USE_MODULE_STATE
jpayne@69 4347 #endif
jpayne@69 4348 #if CYTHON_USE_MODULE_STATE
jpayne@69 4349 #endif
jpayne@69 4350 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_TupleProxy;
jpayne@69 4351 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator;
jpayne@69 4352 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy;
jpayne@69 4353 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_GTFProxy;
jpayne@69 4354 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy;
jpayne@69 4355 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_BedProxy;
jpayne@69 4356 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_VCFProxy;
jpayne@69 4357 #if CYTHON_USE_MODULE_STATE
jpayne@69 4358 #endif
jpayne@69 4359 #if CYTHON_USE_MODULE_STATE
jpayne@69 4360 #endif
jpayne@69 4361 #if CYTHON_USE_MODULE_STATE
jpayne@69 4362 #endif
jpayne@69 4363 PyTypeObject *__pyx_ptype_7cpython_5array_array;
jpayne@69 4364 #if CYTHON_USE_MODULE_STATE
jpayne@69 4365 #endif
jpayne@69 4366 #if CYTHON_USE_MODULE_STATE
jpayne@69 4367 PyObject *__pyx_type_5pysam_9libctabix_tabix_file_iterator;
jpayne@69 4368 PyObject *__pyx_type_5pysam_9libctabix_TabixFile;
jpayne@69 4369 PyObject *__pyx_type_5pysam_9libctabix_Parser;
jpayne@69 4370 PyObject *__pyx_type_5pysam_9libctabix_asTuple;
jpayne@69 4371 PyObject *__pyx_type_5pysam_9libctabix_asGTF;
jpayne@69 4372 PyObject *__pyx_type_5pysam_9libctabix_asGFF3;
jpayne@69 4373 PyObject *__pyx_type_5pysam_9libctabix_asBed;
jpayne@69 4374 PyObject *__pyx_type_5pysam_9libctabix_asVCF;
jpayne@69 4375 PyObject *__pyx_type_5pysam_9libctabix_TabixIterator;
jpayne@69 4376 PyObject *__pyx_type_5pysam_9libctabix_TabixIteratorParsed;
jpayne@69 4377 PyObject *__pyx_type_5pysam_9libctabix_GZIterator;
jpayne@69 4378 PyObject *__pyx_type_5pysam_9libctabix_GZIteratorHead;
jpayne@69 4379 PyObject *__pyx_type_5pysam_9libctabix_GZIteratorParsed;
jpayne@69 4380 PyObject *__pyx_type_5pysam_9libctabix_Tabixfile;
jpayne@69 4381 #endif
jpayne@69 4382 PyTypeObject *__pyx_ptype_5pysam_9libctabix_tabix_file_iterator;
jpayne@69 4383 PyTypeObject *__pyx_ptype_5pysam_9libctabix_TabixFile;
jpayne@69 4384 PyTypeObject *__pyx_ptype_5pysam_9libctabix_Parser;
jpayne@69 4385 PyTypeObject *__pyx_ptype_5pysam_9libctabix_asTuple;
jpayne@69 4386 PyTypeObject *__pyx_ptype_5pysam_9libctabix_asGTF;
jpayne@69 4387 PyTypeObject *__pyx_ptype_5pysam_9libctabix_asGFF3;
jpayne@69 4388 PyTypeObject *__pyx_ptype_5pysam_9libctabix_asBed;
jpayne@69 4389 PyTypeObject *__pyx_ptype_5pysam_9libctabix_asVCF;
jpayne@69 4390 PyTypeObject *__pyx_ptype_5pysam_9libctabix_TabixIterator;
jpayne@69 4391 PyTypeObject *__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed;
jpayne@69 4392 PyTypeObject *__pyx_ptype_5pysam_9libctabix_GZIterator;
jpayne@69 4393 PyTypeObject *__pyx_ptype_5pysam_9libctabix_GZIteratorHead;
jpayne@69 4394 PyTypeObject *__pyx_ptype_5pysam_9libctabix_GZIteratorParsed;
jpayne@69 4395 PyTypeObject *__pyx_ptype_5pysam_9libctabix_Tabixfile;
jpayne@69 4396 PyObject *__pyx_n_s_AssertionError;
jpayne@69 4397 PyObject *__pyx_kp_u_Could_not_open_file;
jpayne@69 4398 PyObject *__pyx_n_s_EmptyIterator;
jpayne@69 4399 PyObject *__pyx_n_s_EmptyIterator___iter;
jpayne@69 4400 PyObject *__pyx_n_s_EmptyIterator___next;
jpayne@69 4401 PyObject *__pyx_kp_u_Filename_s_already_exists_use_fo;
jpayne@69 4402 PyObject *__pyx_n_s_GZIterator;
jpayne@69 4403 PyObject *__pyx_n_u_GZIterator;
jpayne@69 4404 PyObject *__pyx_n_s_GZIteratorHead;
jpayne@69 4405 PyObject *__pyx_n_u_GZIteratorHead;
jpayne@69 4406 PyObject *__pyx_n_s_GZIteratorHead___reduce_cython;
jpayne@69 4407 PyObject *__pyx_n_s_GZIteratorHead___setstate_cython;
jpayne@69 4408 PyObject *__pyx_n_s_GZIteratorParsed;
jpayne@69 4409 PyObject *__pyx_n_s_GZIteratorParsed___reduce_cython;
jpayne@69 4410 PyObject *__pyx_n_s_GZIteratorParsed___setstate_cyth;
jpayne@69 4411 PyObject *__pyx_n_s_GZIterator___reduce_cython;
jpayne@69 4412 PyObject *__pyx_n_s_GZIterator___setstate_cython;
jpayne@69 4413 PyObject *__pyx_n_s_IOError;
jpayne@69 4414 PyObject *__pyx_kp_u_I_O_operation_on_closed_file;
jpayne@69 4415 PyObject *__pyx_kp_u_I_O_operation_on_closed_file_2;
jpayne@69 4416 PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
jpayne@69 4417 PyObject *__pyx_n_s_KeyError;
jpayne@69 4418 PyObject *__pyx_n_s_MemoryError;
jpayne@69 4419 PyObject *__pyx_kp_u_No_such_file_or_directory_s;
jpayne@69 4420 PyObject *__pyx_n_s_NotImplementedError;
jpayne@69 4421 PyObject *__pyx_n_s_OSError;
jpayne@69 4422 PyObject *__pyx_n_s_O_RDONLY;
jpayne@69 4423 PyObject *__pyx_n_s_Parser;
jpayne@69 4424 PyObject *__pyx_n_s_Parser___reduce_cython;
jpayne@69 4425 PyObject *__pyx_n_s_Parser___setstate_cython;
jpayne@69 4426 PyObject *__pyx_n_s_Parser_get_encoding;
jpayne@69 4427 PyObject *__pyx_n_s_Parser_set_encoding;
jpayne@69 4428 PyObject *__pyx_n_s_PickleError;
jpayne@69 4429 PyObject *__pyx_n_s_StopIteration;
jpayne@69 4430 PyObject *__pyx_n_s_TabixFile;
jpayne@69 4431 PyObject *__pyx_n_u_TabixFile;
jpayne@69 4432 PyObject *__pyx_n_s_TabixFile___reduce_cython;
jpayne@69 4433 PyObject *__pyx_n_s_TabixFile___setstate_cython;
jpayne@69 4434 PyObject *__pyx_n_s_TabixFile__dup;
jpayne@69 4435 PyObject *__pyx_n_s_TabixFile__open;
jpayne@69 4436 PyObject *__pyx_n_s_TabixFile_close;
jpayne@69 4437 PyObject *__pyx_n_s_TabixFile_fetch;
jpayne@69 4438 PyObject *__pyx_n_s_TabixIterator;
jpayne@69 4439 PyObject *__pyx_n_s_TabixIteratorParsed;
jpayne@69 4440 PyObject *__pyx_n_s_TabixIteratorParsed___reduce_cyt;
jpayne@69 4441 PyObject *__pyx_n_s_TabixIteratorParsed___setstate_c;
jpayne@69 4442 PyObject *__pyx_n_s_TabixIterator___reduce_cython;
jpayne@69 4443 PyObject *__pyx_n_s_TabixIterator___setstate_cython;
jpayne@69 4444 PyObject *__pyx_n_s_Tabixfile;
jpayne@69 4445 PyObject *__pyx_n_u_Tabixfile;
jpayne@69 4446 PyObject *__pyx_n_s_Tabixfile___reduce_cython;
jpayne@69 4447 PyObject *__pyx_n_s_Tabixfile___setstate_cython;
jpayne@69 4448 PyObject *__pyx_n_s_TypeError;
jpayne@69 4449 PyObject *__pyx_n_s_ValueError;
jpayne@69 4450 PyObject *__pyx_n_s_WINDOW_SIZE;
jpayne@69 4451 PyObject *__pyx_kp_b__16;
jpayne@69 4452 PyObject *__pyx_kp_u__39;
jpayne@69 4453 PyObject *__pyx_kp_u__42;
jpayne@69 4454 PyObject *__pyx_kp_u__43;
jpayne@69 4455 PyObject *__pyx_kp_u__44;
jpayne@69 4456 PyObject *__pyx_kp_u__56;
jpayne@69 4457 PyObject *__pyx_n_s__62;
jpayne@69 4458 PyObject *__pyx_n_s__78;
jpayne@69 4459 PyObject *__pyx_n_s_a;
jpayne@69 4460 PyObject *__pyx_n_s_all;
jpayne@69 4461 PyObject *__pyx_n_s_asBed;
jpayne@69 4462 PyObject *__pyx_n_u_asBed;
jpayne@69 4463 PyObject *__pyx_n_s_asBed___reduce_cython;
jpayne@69 4464 PyObject *__pyx_n_s_asBed___setstate_cython;
jpayne@69 4465 PyObject *__pyx_n_s_asGFF3;
jpayne@69 4466 PyObject *__pyx_n_u_asGFF3;
jpayne@69 4467 PyObject *__pyx_n_s_asGFF3___reduce_cython;
jpayne@69 4468 PyObject *__pyx_n_s_asGFF3___setstate_cython;
jpayne@69 4469 PyObject *__pyx_n_s_asGTF;
jpayne@69 4470 PyObject *__pyx_n_u_asGTF;
jpayne@69 4471 PyObject *__pyx_n_s_asGTF___reduce_cython;
jpayne@69 4472 PyObject *__pyx_n_s_asGTF___setstate_cython;
jpayne@69 4473 PyObject *__pyx_n_s_asTuple;
jpayne@69 4474 PyObject *__pyx_n_u_asTuple;
jpayne@69 4475 PyObject *__pyx_n_s_asTuple___reduce_cython;
jpayne@69 4476 PyObject *__pyx_n_s_asTuple___setstate_cython;
jpayne@69 4477 PyObject *__pyx_n_s_asVCF;
jpayne@69 4478 PyObject *__pyx_n_u_asVCF;
jpayne@69 4479 PyObject *__pyx_n_s_asVCF___reduce_cython;
jpayne@69 4480 PyObject *__pyx_n_s_asVCF___setstate_cython;
jpayne@69 4481 PyObject *__pyx_n_u_ascii;
jpayne@69 4482 PyObject *__pyx_n_s_asyncio_coroutines;
jpayne@69 4483 PyObject *__pyx_n_s_b;
jpayne@69 4484 PyObject *__pyx_n_u_bcf;
jpayne@69 4485 PyObject *__pyx_n_u_bed;
jpayne@69 4486 PyObject *__pyx_n_s_buffer;
jpayne@69 4487 PyObject *__pyx_n_s_buffer_size;
jpayne@69 4488 PyObject *__pyx_kp_u_building_of_index_for_failed;
jpayne@69 4489 PyObject *__pyx_n_s_bytes_cpy;
jpayne@69 4490 PyObject *__pyx_n_s_c;
jpayne@69 4491 PyObject *__pyx_n_s_cfilename;
jpayne@69 4492 PyObject *__pyx_n_s_cfilename_index;
jpayne@69 4493 PyObject *__pyx_n_s_cfn;
jpayne@69 4494 PyObject *__pyx_n_s_cline_in_traceback;
jpayne@69 4495 PyObject *__pyx_n_s_close;
jpayne@69 4496 PyObject *__pyx_n_s_closed;
jpayne@69 4497 PyObject *__pyx_n_s_conf;
jpayne@69 4498 PyObject *__pyx_n_s_conf_data;
jpayne@69 4499 PyObject *__pyx_n_s_contigs;
jpayne@69 4500 PyObject *__pyx_kp_u_could_not_create_iterator_for_re;
jpayne@69 4501 PyObject *__pyx_kp_u_could_not_create_iterator_possib;
jpayne@69 4502 PyObject *__pyx_kp_u_could_not_load_tbi_csi_index_of;
jpayne@69 4503 PyObject *__pyx_kp_u_could_not_open_file_s;
jpayne@69 4504 PyObject *__pyx_kp_u_could_not_open_for_reading_heade;
jpayne@69 4505 PyObject *__pyx_kp_u_could_not_open_index_for_s;
jpayne@69 4506 PyObject *__pyx_kp_u_could_not_open_s_for_reading;
jpayne@69 4507 PyObject *__pyx_kp_u_could_not_open_s_for_writing;
jpayne@69 4508 PyObject *__pyx_n_s_cpy;
jpayne@69 4509 PyObject *__pyx_n_s_csi;
jpayne@69 4510 PyObject *__pyx_kp_u_csi_2;
jpayne@69 4511 PyObject *__pyx_n_s_cstr;
jpayne@69 4512 PyObject *__pyx_n_s_dict;
jpayne@69 4513 PyObject *__pyx_n_s_dict_2;
jpayne@69 4514 PyObject *__pyx_kp_u_disable;
jpayne@69 4515 PyObject *__pyx_n_s_doc;
jpayne@69 4516 PyObject *__pyx_n_s_dup;
jpayne@69 4517 PyObject *__pyx_kp_s_empty_iterator;
jpayne@69 4518 PyObject *__pyx_kp_u_enable;
jpayne@69 4519 PyObject *__pyx_n_s_encoding;
jpayne@69 4520 PyObject *__pyx_n_s_end;
jpayne@69 4521 PyObject *__pyx_n_s_end_col;
jpayne@69 4522 PyObject *__pyx_kp_u_end_out_of_range_i;
jpayne@69 4523 PyObject *__pyx_kp_u_error_i_when_closing_file_s;
jpayne@69 4524 PyObject *__pyx_kp_u_error_i_when_writing_to_file_s;
jpayne@69 4525 PyObject *__pyx_n_s_exists;
jpayne@69 4526 PyObject *__pyx_n_s_fd_src;
jpayne@69 4527 PyObject *__pyx_n_s_fetch;
jpayne@69 4528 PyObject *__pyx_kp_u_file_s_not_found;
jpayne@69 4529 PyObject *__pyx_n_s_filename;
jpayne@69 4530 PyObject *__pyx_n_s_filename_in;
jpayne@69 4531 PyObject *__pyx_n_s_filename_index;
jpayne@69 4532 PyObject *__pyx_n_s_filename_out;
jpayne@69 4533 PyObject *__pyx_kp_u_filename_s_already_exists_use_fo;
jpayne@69 4534 PyObject *__pyx_n_s_fileobj;
jpayne@69 4535 PyObject *__pyx_n_s_fmt;
jpayne@69 4536 PyObject *__pyx_n_s_fn;
jpayne@69 4537 PyObject *__pyx_n_s_fn_index;
jpayne@69 4538 PyObject *__pyx_n_s_fnidx;
jpayne@69 4539 PyObject *__pyx_n_s_force;
jpayne@69 4540 PyObject *__pyx_n_s_format;
jpayne@69 4541 PyObject *__pyx_n_s_fp;
jpayne@69 4542 PyObject *__pyx_kp_u_gc;
jpayne@69 4543 PyObject *__pyx_n_s_get_encoding;
jpayne@69 4544 PyObject *__pyx_n_s_getstate;
jpayne@69 4545 PyObject *__pyx_n_u_gff;
jpayne@69 4546 PyObject *__pyx_kp_u_gz;
jpayne@69 4547 PyObject *__pyx_n_s_import;
jpayne@69 4548 PyObject *__pyx_kp_u_incomplete_line_at_s;
jpayne@69 4549 PyObject *__pyx_n_s_index;
jpayne@69 4550 PyObject *__pyx_kp_u_index_s_not_found;
jpayne@69 4551 PyObject *__pyx_n_s_infile;
jpayne@69 4552 PyObject *__pyx_n_s_init;
jpayne@69 4553 PyObject *__pyx_n_s_init_subclass;
jpayne@69 4554 PyObject *__pyx_n_s_initializing;
jpayne@69 4555 PyObject *__pyx_kp_u_invalid_file_opening_mode_s;
jpayne@69 4556 PyObject *__pyx_n_s_is_coroutine;
jpayne@69 4557 PyObject *__pyx_n_s_is_empty;
jpayne@69 4558 PyObject *__pyx_n_s_is_open;
jpayne@69 4559 PyObject *__pyx_kp_u_isenabled;
jpayne@69 4560 PyObject *__pyx_n_s_iter;
jpayne@69 4561 PyObject *__pyx_kp_s_iterate_over_infile_Permits_the;
jpayne@69 4562 PyObject *__pyx_kp_u_iteration_on_closed_file;
jpayne@69 4563 PyObject *__pyx_n_s_itr;
jpayne@69 4564 PyObject *__pyx_n_s_keep_original;
jpayne@69 4565 PyObject *__pyx_n_s_keys;
jpayne@69 4566 PyObject *__pyx_n_s_length;
jpayne@69 4567 PyObject *__pyx_n_s_line;
jpayne@69 4568 PyObject *__pyx_n_s_line_skip;
jpayne@69 4569 PyObject *__pyx_n_s_main;
jpayne@69 4570 PyObject *__pyx_n_s_meta_char;
jpayne@69 4571 PyObject *__pyx_n_s_metaclass;
jpayne@69 4572 PyObject *__pyx_n_s_min_shift;
jpayne@69 4573 PyObject *__pyx_n_s_mode;
jpayne@69 4574 PyObject *__pyx_n_s_module;
jpayne@69 4575 PyObject *__pyx_n_s_multiple_iterators;
jpayne@69 4576 PyObject *__pyx_n_s_name;
jpayne@69 4577 PyObject *__pyx_n_s_nbytes;
jpayne@69 4578 PyObject *__pyx_kp_u_neither_preset_nor_seq_col_start;
jpayne@69 4579 PyObject *__pyx_n_s_new;
jpayne@69 4580 PyObject *__pyx_n_s_next;
jpayne@69 4581 PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
jpayne@69 4582 PyObject *__pyx_n_s_open;
jpayne@69 4583 PyObject *__pyx_n_s_os;
jpayne@69 4584 PyObject *__pyx_kp_u_parse_method_of_s_not_implemente;
jpayne@69 4585 PyObject *__pyx_n_s_parser;
jpayne@69 4586 PyObject *__pyx_n_s_path;
jpayne@69 4587 PyObject *__pyx_n_s_pickle;
jpayne@69 4588 PyObject *__pyx_n_s_prepare;
jpayne@69 4589 PyObject *__pyx_n_s_preset;
jpayne@69 4590 PyObject *__pyx_n_s_preset2conf;
jpayne@69 4591 PyObject *__pyx_n_u_psltbl;
jpayne@69 4592 PyObject *__pyx_n_s_pysam_libctabix;
jpayne@69 4593 PyObject *__pyx_kp_s_pysam_libctabix_pyx;
jpayne@69 4594 PyObject *__pyx_n_s_pyx_PickleError;
jpayne@69 4595 PyObject *__pyx_n_s_pyx_checksum;
jpayne@69 4596 PyObject *__pyx_n_s_pyx_result;
jpayne@69 4597 PyObject *__pyx_n_s_pyx_state;
jpayne@69 4598 PyObject *__pyx_n_s_pyx_type;
jpayne@69 4599 PyObject *__pyx_n_s_pyx_unpickle_Parser;
jpayne@69 4600 PyObject *__pyx_n_s_pyx_unpickle_asBed;
jpayne@69 4601 PyObject *__pyx_n_s_pyx_unpickle_asGFF3;
jpayne@69 4602 PyObject *__pyx_n_s_pyx_unpickle_asGTF;
jpayne@69 4603 PyObject *__pyx_n_s_pyx_unpickle_asTuple;
jpayne@69 4604 PyObject *__pyx_n_s_pyx_unpickle_asVCF;
jpayne@69 4605 PyObject *__pyx_n_s_pyx_vtable;
jpayne@69 4606 PyObject *__pyx_n_s_qualname;
jpayne@69 4607 PyObject *__pyx_n_s_r;
jpayne@69 4608 PyObject *__pyx_n_u_r;
jpayne@69 4609 PyObject *__pyx_n_s_readline;
jpayne@69 4610 PyObject *__pyx_n_s_reduce;
jpayne@69 4611 PyObject *__pyx_n_s_reduce_cython;
jpayne@69 4612 PyObject *__pyx_n_s_reduce_ex;
jpayne@69 4613 PyObject *__pyx_n_s_reference;
jpayne@69 4614 PyObject *__pyx_n_s_region;
jpayne@69 4615 PyObject *__pyx_n_s_retval;
jpayne@69 4616 PyObject *__pyx_kp_u_s;
jpayne@69 4617 PyObject *__pyx_n_s_s_2;
jpayne@69 4618 PyObject *__pyx_kp_u_s_i;
jpayne@69 4619 PyObject *__pyx_kp_u_s_i_i;
jpayne@69 4620 PyObject *__pyx_n_u_sam;
jpayne@69 4621 PyObject *__pyx_n_s_self;
jpayne@69 4622 PyObject *__pyx_kp_s_self_gzipfile_self_kstream_canno;
jpayne@69 4623 PyObject *__pyx_kp_s_self_iterator_cannot_be_converte;
jpayne@69 4624 PyObject *__pyx_n_s_seq_col;
jpayne@69 4625 PyObject *__pyx_n_s_set_encoding;
jpayne@69 4626 PyObject *__pyx_n_s_set_name;
jpayne@69 4627 PyObject *__pyx_n_s_setstate;
jpayne@69 4628 PyObject *__pyx_n_s_setstate_cython;
jpayne@69 4629 PyObject *__pyx_n_s_spec;
jpayne@69 4630 PyObject *__pyx_n_s_start;
jpayne@69 4631 PyObject *__pyx_n_s_start_col;
jpayne@69 4632 PyObject *__pyx_kp_u_start_i_end_i;
jpayne@69 4633 PyObject *__pyx_kp_u_start_out_of_range_i;
jpayne@69 4634 PyObject *__pyx_n_s_state;
jpayne@69 4635 PyObject *__pyx_kp_s_stringsource;
jpayne@69 4636 PyObject *__pyx_n_s_suffix;
jpayne@69 4637 PyObject *__pyx_n_s_super;
jpayne@69 4638 PyObject *__pyx_n_s_sys;
jpayne@69 4639 PyObject *__pyx_n_s_tabix_compress;
jpayne@69 4640 PyObject *__pyx_n_u_tabix_compress;
jpayne@69 4641 PyObject *__pyx_n_s_tabix_file_iterator;
jpayne@69 4642 PyObject *__pyx_n_u_tabix_file_iterator;
jpayne@69 4643 PyObject *__pyx_n_s_tabix_file_iterator___reduce_cyt;
jpayne@69 4644 PyObject *__pyx_n_s_tabix_file_iterator___setstate_c;
jpayne@69 4645 PyObject *__pyx_n_s_tabix_generic_iterator;
jpayne@69 4646 PyObject *__pyx_n_u_tabix_generic_iterator;
jpayne@69 4647 PyObject *__pyx_n_s_tabix_generic_iterator___init;
jpayne@69 4648 PyObject *__pyx_n_s_tabix_generic_iterator___iter;
jpayne@69 4649 PyObject *__pyx_n_s_tabix_generic_iterator___next;
jpayne@69 4650 PyObject *__pyx_n_s_tabix_index;
jpayne@69 4651 PyObject *__pyx_n_u_tabix_index;
jpayne@69 4652 PyObject *__pyx_n_s_tabix_iterator;
jpayne@69 4653 PyObject *__pyx_n_u_tabix_iterator;
jpayne@69 4654 PyObject *__pyx_kp_u_tbi;
jpayne@69 4655 PyObject *__pyx_n_s_tell;
jpayne@69 4656 PyObject *__pyx_n_s_test;
jpayne@69 4657 PyObject *__pyx_n_s_threads;
jpayne@69 4658 PyObject *__pyx_kp_u_unknown_preset;
jpayne@69 4659 PyObject *__pyx_n_s_unlink;
jpayne@69 4660 PyObject *__pyx_n_s_update;
jpayne@69 4661 PyObject *__pyx_n_s_use_setstate;
jpayne@69 4662 PyObject *__pyx_kp_u_valid_presets_are;
jpayne@69 4663 PyObject *__pyx_n_u_vcf;
jpayne@69 4664 PyObject *__pyx_kp_u_writing_failed;
jpayne@69 4665 PyObject *__pyx_n_s_zerobased;
jpayne@69 4666 PyObject *__pyx_int_0;
jpayne@69 4667 PyObject *__pyx_int_1;
jpayne@69 4668 PyObject *__pyx_int_2;
jpayne@69 4669 PyObject *__pyx_int_3;
jpayne@69 4670 PyObject *__pyx_int_4;
jpayne@69 4671 PyObject *__pyx_int_5;
jpayne@69 4672 PyObject *__pyx_int_15;
jpayne@69 4673 PyObject *__pyx_int_17;
jpayne@69 4674 PyObject *__pyx_int_18;
jpayne@69 4675 PyObject *__pyx_int_35;
jpayne@69 4676 PyObject *__pyx_int_64;
jpayne@69 4677 PyObject *__pyx_int_21667264;
jpayne@69 4678 PyObject *__pyx_int_139192863;
jpayne@69 4679 PyObject *__pyx_int_243541226;
jpayne@69 4680 PyObject *__pyx_int_neg_1;
jpayne@69 4681 PyObject *__pyx_codeobj_;
jpayne@69 4682 PyObject *__pyx_tuple__19;
jpayne@69 4683 PyObject *__pyx_tuple__20;
jpayne@69 4684 PyObject *__pyx_tuple__24;
jpayne@69 4685 PyObject *__pyx_tuple__38;
jpayne@69 4686 PyObject *__pyx_tuple__41;
jpayne@69 4687 PyObject *__pyx_tuple__45;
jpayne@69 4688 PyObject *__pyx_tuple__55;
jpayne@69 4689 PyObject *__pyx_tuple__63;
jpayne@69 4690 PyObject *__pyx_tuple__64;
jpayne@69 4691 PyObject *__pyx_tuple__65;
jpayne@69 4692 PyObject *__pyx_tuple__66;
jpayne@69 4693 PyObject *__pyx_tuple__67;
jpayne@69 4694 PyObject *__pyx_tuple__68;
jpayne@69 4695 PyObject *__pyx_tuple__69;
jpayne@69 4696 PyObject *__pyx_tuple__70;
jpayne@69 4697 PyObject *__pyx_tuple__71;
jpayne@69 4698 PyObject *__pyx_tuple__72;
jpayne@69 4699 PyObject *__pyx_tuple__73;
jpayne@69 4700 PyObject *__pyx_tuple__74;
jpayne@69 4701 PyObject *__pyx_tuple__75;
jpayne@69 4702 PyObject *__pyx_tuple__76;
jpayne@69 4703 PyObject *__pyx_tuple__77;
jpayne@69 4704 PyObject *__pyx_codeobj__2;
jpayne@69 4705 PyObject *__pyx_codeobj__3;
jpayne@69 4706 PyObject *__pyx_codeobj__4;
jpayne@69 4707 PyObject *__pyx_codeobj__5;
jpayne@69 4708 PyObject *__pyx_codeobj__6;
jpayne@69 4709 PyObject *__pyx_codeobj__7;
jpayne@69 4710 PyObject *__pyx_codeobj__8;
jpayne@69 4711 PyObject *__pyx_codeobj__9;
jpayne@69 4712 PyObject *__pyx_codeobj__10;
jpayne@69 4713 PyObject *__pyx_codeobj__11;
jpayne@69 4714 PyObject *__pyx_codeobj__12;
jpayne@69 4715 PyObject *__pyx_codeobj__13;
jpayne@69 4716 PyObject *__pyx_codeobj__14;
jpayne@69 4717 PyObject *__pyx_codeobj__15;
jpayne@69 4718 PyObject *__pyx_codeobj__17;
jpayne@69 4719 PyObject *__pyx_codeobj__18;
jpayne@69 4720 PyObject *__pyx_codeobj__21;
jpayne@69 4721 PyObject *__pyx_codeobj__22;
jpayne@69 4722 PyObject *__pyx_codeobj__23;
jpayne@69 4723 PyObject *__pyx_codeobj__25;
jpayne@69 4724 PyObject *__pyx_codeobj__26;
jpayne@69 4725 PyObject *__pyx_codeobj__27;
jpayne@69 4726 PyObject *__pyx_codeobj__28;
jpayne@69 4727 PyObject *__pyx_codeobj__29;
jpayne@69 4728 PyObject *__pyx_codeobj__30;
jpayne@69 4729 PyObject *__pyx_codeobj__31;
jpayne@69 4730 PyObject *__pyx_codeobj__32;
jpayne@69 4731 PyObject *__pyx_codeobj__33;
jpayne@69 4732 PyObject *__pyx_codeobj__34;
jpayne@69 4733 PyObject *__pyx_codeobj__35;
jpayne@69 4734 PyObject *__pyx_codeobj__36;
jpayne@69 4735 PyObject *__pyx_codeobj__37;
jpayne@69 4736 PyObject *__pyx_codeobj__40;
jpayne@69 4737 PyObject *__pyx_codeobj__46;
jpayne@69 4738 PyObject *__pyx_codeobj__47;
jpayne@69 4739 PyObject *__pyx_codeobj__48;
jpayne@69 4740 PyObject *__pyx_codeobj__49;
jpayne@69 4741 PyObject *__pyx_codeobj__50;
jpayne@69 4742 PyObject *__pyx_codeobj__51;
jpayne@69 4743 PyObject *__pyx_codeobj__52;
jpayne@69 4744 PyObject *__pyx_codeobj__53;
jpayne@69 4745 PyObject *__pyx_codeobj__54;
jpayne@69 4746 PyObject *__pyx_codeobj__57;
jpayne@69 4747 PyObject *__pyx_codeobj__58;
jpayne@69 4748 PyObject *__pyx_codeobj__59;
jpayne@69 4749 PyObject *__pyx_codeobj__60;
jpayne@69 4750 PyObject *__pyx_codeobj__61;
jpayne@69 4751 } __pyx_mstate;
jpayne@69 4752
jpayne@69 4753 #if CYTHON_USE_MODULE_STATE
jpayne@69 4754 #ifdef __cplusplus
jpayne@69 4755 namespace {
jpayne@69 4756 extern struct PyModuleDef __pyx_moduledef;
jpayne@69 4757 } /* anonymous namespace */
jpayne@69 4758 #else
jpayne@69 4759 static struct PyModuleDef __pyx_moduledef;
jpayne@69 4760 #endif
jpayne@69 4761
jpayne@69 4762 #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))
jpayne@69 4763
jpayne@69 4764 #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))
jpayne@69 4765
jpayne@69 4766 #define __pyx_m (PyState_FindModule(&__pyx_moduledef))
jpayne@69 4767 #else
jpayne@69 4768 static __pyx_mstate __pyx_mstate_global_static =
jpayne@69 4769 #ifdef __cplusplus
jpayne@69 4770 {};
jpayne@69 4771 #else
jpayne@69 4772 {0};
jpayne@69 4773 #endif
jpayne@69 4774 static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
jpayne@69 4775 #endif
jpayne@69 4776 /* #### Code section: module_state_clear ### */
jpayne@69 4777 #if CYTHON_USE_MODULE_STATE
jpayne@69 4778 static int __pyx_m_clear(PyObject *m) {
jpayne@69 4779 __pyx_mstate *clear_module_state = __pyx_mstate(m);
jpayne@69 4780 if (!clear_module_state) return 0;
jpayne@69 4781 Py_CLEAR(clear_module_state->__pyx_d);
jpayne@69 4782 Py_CLEAR(clear_module_state->__pyx_b);
jpayne@69 4783 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
jpayne@69 4784 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
jpayne@69 4785 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
jpayne@69 4786 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
jpayne@69 4787 #ifdef __Pyx_CyFunction_USED
jpayne@69 4788 Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
jpayne@69 4789 #endif
jpayne@69 4790 #ifdef __Pyx_FusedFunction_USED
jpayne@69 4791 Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
jpayne@69 4792 #endif
jpayne@69 4793 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_10libchtslib_HTSFile);
jpayne@69 4794 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
jpayne@69 4795 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
jpayne@69 4796 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
jpayne@69 4797 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy);
jpayne@69 4798 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator);
jpayne@69 4799 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy);
jpayne@69 4800 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy);
jpayne@69 4801 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy);
jpayne@69 4802 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_BedProxy);
jpayne@69 4803 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy);
jpayne@69 4804 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_5array_array);
jpayne@69 4805 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_tabix_file_iterator);
jpayne@69 4806 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_tabix_file_iterator);
jpayne@69 4807 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@69 4808 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_TabixFile);
jpayne@69 4809 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@69 4810 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_Parser);
jpayne@69 4811 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asTuple);
jpayne@69 4812 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_asTuple);
jpayne@69 4813 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asGTF);
jpayne@69 4814 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_asGTF);
jpayne@69 4815 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asGFF3);
jpayne@69 4816 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_asGFF3);
jpayne@69 4817 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asBed);
jpayne@69 4818 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_asBed);
jpayne@69 4819 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asVCF);
jpayne@69 4820 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_asVCF);
jpayne@69 4821 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_TabixIterator);
jpayne@69 4822 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_TabixIterator);
jpayne@69 4823 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed);
jpayne@69 4824 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_TabixIteratorParsed);
jpayne@69 4825 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_GZIterator);
jpayne@69 4826 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_GZIterator);
jpayne@69 4827 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorHead);
jpayne@69 4828 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_GZIteratorHead);
jpayne@69 4829 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorParsed);
jpayne@69 4830 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_GZIteratorParsed);
jpayne@69 4831 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_Tabixfile);
jpayne@69 4832 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_Tabixfile);
jpayne@69 4833 Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
jpayne@69 4834 Py_CLEAR(clear_module_state->__pyx_kp_u_Could_not_open_file);
jpayne@69 4835 Py_CLEAR(clear_module_state->__pyx_n_s_EmptyIterator);
jpayne@69 4836 Py_CLEAR(clear_module_state->__pyx_n_s_EmptyIterator___iter);
jpayne@69 4837 Py_CLEAR(clear_module_state->__pyx_n_s_EmptyIterator___next);
jpayne@69 4838 Py_CLEAR(clear_module_state->__pyx_kp_u_Filename_s_already_exists_use_fo);
jpayne@69 4839 Py_CLEAR(clear_module_state->__pyx_n_s_GZIterator);
jpayne@69 4840 Py_CLEAR(clear_module_state->__pyx_n_u_GZIterator);
jpayne@69 4841 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorHead);
jpayne@69 4842 Py_CLEAR(clear_module_state->__pyx_n_u_GZIteratorHead);
jpayne@69 4843 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorHead___reduce_cython);
jpayne@69 4844 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorHead___setstate_cython);
jpayne@69 4845 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorParsed);
jpayne@69 4846 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorParsed___reduce_cython);
jpayne@69 4847 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorParsed___setstate_cyth);
jpayne@69 4848 Py_CLEAR(clear_module_state->__pyx_n_s_GZIterator___reduce_cython);
jpayne@69 4849 Py_CLEAR(clear_module_state->__pyx_n_s_GZIterator___setstate_cython);
jpayne@69 4850 Py_CLEAR(clear_module_state->__pyx_n_s_IOError);
jpayne@69 4851 Py_CLEAR(clear_module_state->__pyx_kp_u_I_O_operation_on_closed_file);
jpayne@69 4852 Py_CLEAR(clear_module_state->__pyx_kp_u_I_O_operation_on_closed_file_2);
jpayne@69 4853 Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
jpayne@69 4854 Py_CLEAR(clear_module_state->__pyx_n_s_KeyError);
jpayne@69 4855 Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError);
jpayne@69 4856 Py_CLEAR(clear_module_state->__pyx_kp_u_No_such_file_or_directory_s);
jpayne@69 4857 Py_CLEAR(clear_module_state->__pyx_n_s_NotImplementedError);
jpayne@69 4858 Py_CLEAR(clear_module_state->__pyx_n_s_OSError);
jpayne@69 4859 Py_CLEAR(clear_module_state->__pyx_n_s_O_RDONLY);
jpayne@69 4860 Py_CLEAR(clear_module_state->__pyx_n_s_Parser);
jpayne@69 4861 Py_CLEAR(clear_module_state->__pyx_n_s_Parser___reduce_cython);
jpayne@69 4862 Py_CLEAR(clear_module_state->__pyx_n_s_Parser___setstate_cython);
jpayne@69 4863 Py_CLEAR(clear_module_state->__pyx_n_s_Parser_get_encoding);
jpayne@69 4864 Py_CLEAR(clear_module_state->__pyx_n_s_Parser_set_encoding);
jpayne@69 4865 Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
jpayne@69 4866 Py_CLEAR(clear_module_state->__pyx_n_s_StopIteration);
jpayne@69 4867 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile);
jpayne@69 4868 Py_CLEAR(clear_module_state->__pyx_n_u_TabixFile);
jpayne@69 4869 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile___reduce_cython);
jpayne@69 4870 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile___setstate_cython);
jpayne@69 4871 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile__dup);
jpayne@69 4872 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile__open);
jpayne@69 4873 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile_close);
jpayne@69 4874 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile_fetch);
jpayne@69 4875 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIterator);
jpayne@69 4876 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIteratorParsed);
jpayne@69 4877 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIteratorParsed___reduce_cyt);
jpayne@69 4878 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIteratorParsed___setstate_c);
jpayne@69 4879 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIterator___reduce_cython);
jpayne@69 4880 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIterator___setstate_cython);
jpayne@69 4881 Py_CLEAR(clear_module_state->__pyx_n_s_Tabixfile);
jpayne@69 4882 Py_CLEAR(clear_module_state->__pyx_n_u_Tabixfile);
jpayne@69 4883 Py_CLEAR(clear_module_state->__pyx_n_s_Tabixfile___reduce_cython);
jpayne@69 4884 Py_CLEAR(clear_module_state->__pyx_n_s_Tabixfile___setstate_cython);
jpayne@69 4885 Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
jpayne@69 4886 Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
jpayne@69 4887 Py_CLEAR(clear_module_state->__pyx_n_s_WINDOW_SIZE);
jpayne@69 4888 Py_CLEAR(clear_module_state->__pyx_kp_b__16);
jpayne@69 4889 Py_CLEAR(clear_module_state->__pyx_kp_u__39);
jpayne@69 4890 Py_CLEAR(clear_module_state->__pyx_kp_u__42);
jpayne@69 4891 Py_CLEAR(clear_module_state->__pyx_kp_u__43);
jpayne@69 4892 Py_CLEAR(clear_module_state->__pyx_kp_u__44);
jpayne@69 4893 Py_CLEAR(clear_module_state->__pyx_kp_u__56);
jpayne@69 4894 Py_CLEAR(clear_module_state->__pyx_n_s__62);
jpayne@69 4895 Py_CLEAR(clear_module_state->__pyx_n_s__78);
jpayne@69 4896 Py_CLEAR(clear_module_state->__pyx_n_s_a);
jpayne@69 4897 Py_CLEAR(clear_module_state->__pyx_n_s_all);
jpayne@69 4898 Py_CLEAR(clear_module_state->__pyx_n_s_asBed);
jpayne@69 4899 Py_CLEAR(clear_module_state->__pyx_n_u_asBed);
jpayne@69 4900 Py_CLEAR(clear_module_state->__pyx_n_s_asBed___reduce_cython);
jpayne@69 4901 Py_CLEAR(clear_module_state->__pyx_n_s_asBed___setstate_cython);
jpayne@69 4902 Py_CLEAR(clear_module_state->__pyx_n_s_asGFF3);
jpayne@69 4903 Py_CLEAR(clear_module_state->__pyx_n_u_asGFF3);
jpayne@69 4904 Py_CLEAR(clear_module_state->__pyx_n_s_asGFF3___reduce_cython);
jpayne@69 4905 Py_CLEAR(clear_module_state->__pyx_n_s_asGFF3___setstate_cython);
jpayne@69 4906 Py_CLEAR(clear_module_state->__pyx_n_s_asGTF);
jpayne@69 4907 Py_CLEAR(clear_module_state->__pyx_n_u_asGTF);
jpayne@69 4908 Py_CLEAR(clear_module_state->__pyx_n_s_asGTF___reduce_cython);
jpayne@69 4909 Py_CLEAR(clear_module_state->__pyx_n_s_asGTF___setstate_cython);
jpayne@69 4910 Py_CLEAR(clear_module_state->__pyx_n_s_asTuple);
jpayne@69 4911 Py_CLEAR(clear_module_state->__pyx_n_u_asTuple);
jpayne@69 4912 Py_CLEAR(clear_module_state->__pyx_n_s_asTuple___reduce_cython);
jpayne@69 4913 Py_CLEAR(clear_module_state->__pyx_n_s_asTuple___setstate_cython);
jpayne@69 4914 Py_CLEAR(clear_module_state->__pyx_n_s_asVCF);
jpayne@69 4915 Py_CLEAR(clear_module_state->__pyx_n_u_asVCF);
jpayne@69 4916 Py_CLEAR(clear_module_state->__pyx_n_s_asVCF___reduce_cython);
jpayne@69 4917 Py_CLEAR(clear_module_state->__pyx_n_s_asVCF___setstate_cython);
jpayne@69 4918 Py_CLEAR(clear_module_state->__pyx_n_u_ascii);
jpayne@69 4919 Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
jpayne@69 4920 Py_CLEAR(clear_module_state->__pyx_n_s_b);
jpayne@69 4921 Py_CLEAR(clear_module_state->__pyx_n_u_bcf);
jpayne@69 4922 Py_CLEAR(clear_module_state->__pyx_n_u_bed);
jpayne@69 4923 Py_CLEAR(clear_module_state->__pyx_n_s_buffer);
jpayne@69 4924 Py_CLEAR(clear_module_state->__pyx_n_s_buffer_size);
jpayne@69 4925 Py_CLEAR(clear_module_state->__pyx_kp_u_building_of_index_for_failed);
jpayne@69 4926 Py_CLEAR(clear_module_state->__pyx_n_s_bytes_cpy);
jpayne@69 4927 Py_CLEAR(clear_module_state->__pyx_n_s_c);
jpayne@69 4928 Py_CLEAR(clear_module_state->__pyx_n_s_cfilename);
jpayne@69 4929 Py_CLEAR(clear_module_state->__pyx_n_s_cfilename_index);
jpayne@69 4930 Py_CLEAR(clear_module_state->__pyx_n_s_cfn);
jpayne@69 4931 Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
jpayne@69 4932 Py_CLEAR(clear_module_state->__pyx_n_s_close);
jpayne@69 4933 Py_CLEAR(clear_module_state->__pyx_n_s_closed);
jpayne@69 4934 Py_CLEAR(clear_module_state->__pyx_n_s_conf);
jpayne@69 4935 Py_CLEAR(clear_module_state->__pyx_n_s_conf_data);
jpayne@69 4936 Py_CLEAR(clear_module_state->__pyx_n_s_contigs);
jpayne@69 4937 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_create_iterator_for_re);
jpayne@69 4938 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_create_iterator_possib);
jpayne@69 4939 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_load_tbi_csi_index_of);
jpayne@69 4940 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_file_s);
jpayne@69 4941 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_for_reading_heade);
jpayne@69 4942 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_index_for_s);
jpayne@69 4943 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_s_for_reading);
jpayne@69 4944 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_s_for_writing);
jpayne@69 4945 Py_CLEAR(clear_module_state->__pyx_n_s_cpy);
jpayne@69 4946 Py_CLEAR(clear_module_state->__pyx_n_s_csi);
jpayne@69 4947 Py_CLEAR(clear_module_state->__pyx_kp_u_csi_2);
jpayne@69 4948 Py_CLEAR(clear_module_state->__pyx_n_s_cstr);
jpayne@69 4949 Py_CLEAR(clear_module_state->__pyx_n_s_dict);
jpayne@69 4950 Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
jpayne@69 4951 Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
jpayne@69 4952 Py_CLEAR(clear_module_state->__pyx_n_s_doc);
jpayne@69 4953 Py_CLEAR(clear_module_state->__pyx_n_s_dup);
jpayne@69 4954 Py_CLEAR(clear_module_state->__pyx_kp_s_empty_iterator);
jpayne@69 4955 Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
jpayne@69 4956 Py_CLEAR(clear_module_state->__pyx_n_s_encoding);
jpayne@69 4957 Py_CLEAR(clear_module_state->__pyx_n_s_end);
jpayne@69 4958 Py_CLEAR(clear_module_state->__pyx_n_s_end_col);
jpayne@69 4959 Py_CLEAR(clear_module_state->__pyx_kp_u_end_out_of_range_i);
jpayne@69 4960 Py_CLEAR(clear_module_state->__pyx_kp_u_error_i_when_closing_file_s);
jpayne@69 4961 Py_CLEAR(clear_module_state->__pyx_kp_u_error_i_when_writing_to_file_s);
jpayne@69 4962 Py_CLEAR(clear_module_state->__pyx_n_s_exists);
jpayne@69 4963 Py_CLEAR(clear_module_state->__pyx_n_s_fd_src);
jpayne@69 4964 Py_CLEAR(clear_module_state->__pyx_n_s_fetch);
jpayne@69 4965 Py_CLEAR(clear_module_state->__pyx_kp_u_file_s_not_found);
jpayne@69 4966 Py_CLEAR(clear_module_state->__pyx_n_s_filename);
jpayne@69 4967 Py_CLEAR(clear_module_state->__pyx_n_s_filename_in);
jpayne@69 4968 Py_CLEAR(clear_module_state->__pyx_n_s_filename_index);
jpayne@69 4969 Py_CLEAR(clear_module_state->__pyx_n_s_filename_out);
jpayne@69 4970 Py_CLEAR(clear_module_state->__pyx_kp_u_filename_s_already_exists_use_fo);
jpayne@69 4971 Py_CLEAR(clear_module_state->__pyx_n_s_fileobj);
jpayne@69 4972 Py_CLEAR(clear_module_state->__pyx_n_s_fmt);
jpayne@69 4973 Py_CLEAR(clear_module_state->__pyx_n_s_fn);
jpayne@69 4974 Py_CLEAR(clear_module_state->__pyx_n_s_fn_index);
jpayne@69 4975 Py_CLEAR(clear_module_state->__pyx_n_s_fnidx);
jpayne@69 4976 Py_CLEAR(clear_module_state->__pyx_n_s_force);
jpayne@69 4977 Py_CLEAR(clear_module_state->__pyx_n_s_format);
jpayne@69 4978 Py_CLEAR(clear_module_state->__pyx_n_s_fp);
jpayne@69 4979 Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
jpayne@69 4980 Py_CLEAR(clear_module_state->__pyx_n_s_get_encoding);
jpayne@69 4981 Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
jpayne@69 4982 Py_CLEAR(clear_module_state->__pyx_n_u_gff);
jpayne@69 4983 Py_CLEAR(clear_module_state->__pyx_kp_u_gz);
jpayne@69 4984 Py_CLEAR(clear_module_state->__pyx_n_s_import);
jpayne@69 4985 Py_CLEAR(clear_module_state->__pyx_kp_u_incomplete_line_at_s);
jpayne@69 4986 Py_CLEAR(clear_module_state->__pyx_n_s_index);
jpayne@69 4987 Py_CLEAR(clear_module_state->__pyx_kp_u_index_s_not_found);
jpayne@69 4988 Py_CLEAR(clear_module_state->__pyx_n_s_infile);
jpayne@69 4989 Py_CLEAR(clear_module_state->__pyx_n_s_init);
jpayne@69 4990 Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
jpayne@69 4991 Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
jpayne@69 4992 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_file_opening_mode_s);
jpayne@69 4993 Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
jpayne@69 4994 Py_CLEAR(clear_module_state->__pyx_n_s_is_empty);
jpayne@69 4995 Py_CLEAR(clear_module_state->__pyx_n_s_is_open);
jpayne@69 4996 Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
jpayne@69 4997 Py_CLEAR(clear_module_state->__pyx_n_s_iter);
jpayne@69 4998 Py_CLEAR(clear_module_state->__pyx_kp_s_iterate_over_infile_Permits_the);
jpayne@69 4999 Py_CLEAR(clear_module_state->__pyx_kp_u_iteration_on_closed_file);
jpayne@69 5000 Py_CLEAR(clear_module_state->__pyx_n_s_itr);
jpayne@69 5001 Py_CLEAR(clear_module_state->__pyx_n_s_keep_original);
jpayne@69 5002 Py_CLEAR(clear_module_state->__pyx_n_s_keys);
jpayne@69 5003 Py_CLEAR(clear_module_state->__pyx_n_s_length);
jpayne@69 5004 Py_CLEAR(clear_module_state->__pyx_n_s_line);
jpayne@69 5005 Py_CLEAR(clear_module_state->__pyx_n_s_line_skip);
jpayne@69 5006 Py_CLEAR(clear_module_state->__pyx_n_s_main);
jpayne@69 5007 Py_CLEAR(clear_module_state->__pyx_n_s_meta_char);
jpayne@69 5008 Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
jpayne@69 5009 Py_CLEAR(clear_module_state->__pyx_n_s_min_shift);
jpayne@69 5010 Py_CLEAR(clear_module_state->__pyx_n_s_mode);
jpayne@69 5011 Py_CLEAR(clear_module_state->__pyx_n_s_module);
jpayne@69 5012 Py_CLEAR(clear_module_state->__pyx_n_s_multiple_iterators);
jpayne@69 5013 Py_CLEAR(clear_module_state->__pyx_n_s_name);
jpayne@69 5014 Py_CLEAR(clear_module_state->__pyx_n_s_nbytes);
jpayne@69 5015 Py_CLEAR(clear_module_state->__pyx_kp_u_neither_preset_nor_seq_col_start);
jpayne@69 5016 Py_CLEAR(clear_module_state->__pyx_n_s_new);
jpayne@69 5017 Py_CLEAR(clear_module_state->__pyx_n_s_next);
jpayne@69 5018 Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
jpayne@69 5019 Py_CLEAR(clear_module_state->__pyx_n_s_open);
jpayne@69 5020 Py_CLEAR(clear_module_state->__pyx_n_s_os);
jpayne@69 5021 Py_CLEAR(clear_module_state->__pyx_kp_u_parse_method_of_s_not_implemente);
jpayne@69 5022 Py_CLEAR(clear_module_state->__pyx_n_s_parser);
jpayne@69 5023 Py_CLEAR(clear_module_state->__pyx_n_s_path);
jpayne@69 5024 Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
jpayne@69 5025 Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
jpayne@69 5026 Py_CLEAR(clear_module_state->__pyx_n_s_preset);
jpayne@69 5027 Py_CLEAR(clear_module_state->__pyx_n_s_preset2conf);
jpayne@69 5028 Py_CLEAR(clear_module_state->__pyx_n_u_psltbl);
jpayne@69 5029 Py_CLEAR(clear_module_state->__pyx_n_s_pysam_libctabix);
jpayne@69 5030 Py_CLEAR(clear_module_state->__pyx_kp_s_pysam_libctabix_pyx);
jpayne@69 5031 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
jpayne@69 5032 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
jpayne@69 5033 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
jpayne@69 5034 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
jpayne@69 5035 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
jpayne@69 5036 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Parser);
jpayne@69 5037 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_asBed);
jpayne@69 5038 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_asGFF3);
jpayne@69 5039 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_asGTF);
jpayne@69 5040 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_asTuple);
jpayne@69 5041 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_asVCF);
jpayne@69 5042 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
jpayne@69 5043 Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
jpayne@69 5044 Py_CLEAR(clear_module_state->__pyx_n_s_r);
jpayne@69 5045 Py_CLEAR(clear_module_state->__pyx_n_u_r);
jpayne@69 5046 Py_CLEAR(clear_module_state->__pyx_n_s_readline);
jpayne@69 5047 Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
jpayne@69 5048 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
jpayne@69 5049 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
jpayne@69 5050 Py_CLEAR(clear_module_state->__pyx_n_s_reference);
jpayne@69 5051 Py_CLEAR(clear_module_state->__pyx_n_s_region);
jpayne@69 5052 Py_CLEAR(clear_module_state->__pyx_n_s_retval);
jpayne@69 5053 Py_CLEAR(clear_module_state->__pyx_kp_u_s);
jpayne@69 5054 Py_CLEAR(clear_module_state->__pyx_n_s_s_2);
jpayne@69 5055 Py_CLEAR(clear_module_state->__pyx_kp_u_s_i);
jpayne@69 5056 Py_CLEAR(clear_module_state->__pyx_kp_u_s_i_i);
jpayne@69 5057 Py_CLEAR(clear_module_state->__pyx_n_u_sam);
jpayne@69 5058 Py_CLEAR(clear_module_state->__pyx_n_s_self);
jpayne@69 5059 Py_CLEAR(clear_module_state->__pyx_kp_s_self_gzipfile_self_kstream_canno);
jpayne@69 5060 Py_CLEAR(clear_module_state->__pyx_kp_s_self_iterator_cannot_be_converte);
jpayne@69 5061 Py_CLEAR(clear_module_state->__pyx_n_s_seq_col);
jpayne@69 5062 Py_CLEAR(clear_module_state->__pyx_n_s_set_encoding);
jpayne@69 5063 Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
jpayne@69 5064 Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
jpayne@69 5065 Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
jpayne@69 5066 Py_CLEAR(clear_module_state->__pyx_n_s_spec);
jpayne@69 5067 Py_CLEAR(clear_module_state->__pyx_n_s_start);
jpayne@69 5068 Py_CLEAR(clear_module_state->__pyx_n_s_start_col);
jpayne@69 5069 Py_CLEAR(clear_module_state->__pyx_kp_u_start_i_end_i);
jpayne@69 5070 Py_CLEAR(clear_module_state->__pyx_kp_u_start_out_of_range_i);
jpayne@69 5071 Py_CLEAR(clear_module_state->__pyx_n_s_state);
jpayne@69 5072 Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
jpayne@69 5073 Py_CLEAR(clear_module_state->__pyx_n_s_suffix);
jpayne@69 5074 Py_CLEAR(clear_module_state->__pyx_n_s_super);
jpayne@69 5075 Py_CLEAR(clear_module_state->__pyx_n_s_sys);
jpayne@69 5076 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_compress);
jpayne@69 5077 Py_CLEAR(clear_module_state->__pyx_n_u_tabix_compress);
jpayne@69 5078 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_file_iterator);
jpayne@69 5079 Py_CLEAR(clear_module_state->__pyx_n_u_tabix_file_iterator);
jpayne@69 5080 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_file_iterator___reduce_cyt);
jpayne@69 5081 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_file_iterator___setstate_c);
jpayne@69 5082 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_generic_iterator);
jpayne@69 5083 Py_CLEAR(clear_module_state->__pyx_n_u_tabix_generic_iterator);
jpayne@69 5084 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_generic_iterator___init);
jpayne@69 5085 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_generic_iterator___iter);
jpayne@69 5086 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_generic_iterator___next);
jpayne@69 5087 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_index);
jpayne@69 5088 Py_CLEAR(clear_module_state->__pyx_n_u_tabix_index);
jpayne@69 5089 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_iterator);
jpayne@69 5090 Py_CLEAR(clear_module_state->__pyx_n_u_tabix_iterator);
jpayne@69 5091 Py_CLEAR(clear_module_state->__pyx_kp_u_tbi);
jpayne@69 5092 Py_CLEAR(clear_module_state->__pyx_n_s_tell);
jpayne@69 5093 Py_CLEAR(clear_module_state->__pyx_n_s_test);
jpayne@69 5094 Py_CLEAR(clear_module_state->__pyx_n_s_threads);
jpayne@69 5095 Py_CLEAR(clear_module_state->__pyx_kp_u_unknown_preset);
jpayne@69 5096 Py_CLEAR(clear_module_state->__pyx_n_s_unlink);
jpayne@69 5097 Py_CLEAR(clear_module_state->__pyx_n_s_update);
jpayne@69 5098 Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
jpayne@69 5099 Py_CLEAR(clear_module_state->__pyx_kp_u_valid_presets_are);
jpayne@69 5100 Py_CLEAR(clear_module_state->__pyx_n_u_vcf);
jpayne@69 5101 Py_CLEAR(clear_module_state->__pyx_kp_u_writing_failed);
jpayne@69 5102 Py_CLEAR(clear_module_state->__pyx_n_s_zerobased);
jpayne@69 5103 Py_CLEAR(clear_module_state->__pyx_int_0);
jpayne@69 5104 Py_CLEAR(clear_module_state->__pyx_int_1);
jpayne@69 5105 Py_CLEAR(clear_module_state->__pyx_int_2);
jpayne@69 5106 Py_CLEAR(clear_module_state->__pyx_int_3);
jpayne@69 5107 Py_CLEAR(clear_module_state->__pyx_int_4);
jpayne@69 5108 Py_CLEAR(clear_module_state->__pyx_int_5);
jpayne@69 5109 Py_CLEAR(clear_module_state->__pyx_int_15);
jpayne@69 5110 Py_CLEAR(clear_module_state->__pyx_int_17);
jpayne@69 5111 Py_CLEAR(clear_module_state->__pyx_int_18);
jpayne@69 5112 Py_CLEAR(clear_module_state->__pyx_int_35);
jpayne@69 5113 Py_CLEAR(clear_module_state->__pyx_int_64);
jpayne@69 5114 Py_CLEAR(clear_module_state->__pyx_int_21667264);
jpayne@69 5115 Py_CLEAR(clear_module_state->__pyx_int_139192863);
jpayne@69 5116 Py_CLEAR(clear_module_state->__pyx_int_243541226);
jpayne@69 5117 Py_CLEAR(clear_module_state->__pyx_int_neg_1);
jpayne@69 5118 Py_CLEAR(clear_module_state->__pyx_codeobj_);
jpayne@69 5119 Py_CLEAR(clear_module_state->__pyx_tuple__19);
jpayne@69 5120 Py_CLEAR(clear_module_state->__pyx_tuple__20);
jpayne@69 5121 Py_CLEAR(clear_module_state->__pyx_tuple__24);
jpayne@69 5122 Py_CLEAR(clear_module_state->__pyx_tuple__38);
jpayne@69 5123 Py_CLEAR(clear_module_state->__pyx_tuple__41);
jpayne@69 5124 Py_CLEAR(clear_module_state->__pyx_tuple__45);
jpayne@69 5125 Py_CLEAR(clear_module_state->__pyx_tuple__55);
jpayne@69 5126 Py_CLEAR(clear_module_state->__pyx_tuple__63);
jpayne@69 5127 Py_CLEAR(clear_module_state->__pyx_tuple__64);
jpayne@69 5128 Py_CLEAR(clear_module_state->__pyx_tuple__65);
jpayne@69 5129 Py_CLEAR(clear_module_state->__pyx_tuple__66);
jpayne@69 5130 Py_CLEAR(clear_module_state->__pyx_tuple__67);
jpayne@69 5131 Py_CLEAR(clear_module_state->__pyx_tuple__68);
jpayne@69 5132 Py_CLEAR(clear_module_state->__pyx_tuple__69);
jpayne@69 5133 Py_CLEAR(clear_module_state->__pyx_tuple__70);
jpayne@69 5134 Py_CLEAR(clear_module_state->__pyx_tuple__71);
jpayne@69 5135 Py_CLEAR(clear_module_state->__pyx_tuple__72);
jpayne@69 5136 Py_CLEAR(clear_module_state->__pyx_tuple__73);
jpayne@69 5137 Py_CLEAR(clear_module_state->__pyx_tuple__74);
jpayne@69 5138 Py_CLEAR(clear_module_state->__pyx_tuple__75);
jpayne@69 5139 Py_CLEAR(clear_module_state->__pyx_tuple__76);
jpayne@69 5140 Py_CLEAR(clear_module_state->__pyx_tuple__77);
jpayne@69 5141 Py_CLEAR(clear_module_state->__pyx_codeobj__2);
jpayne@69 5142 Py_CLEAR(clear_module_state->__pyx_codeobj__3);
jpayne@69 5143 Py_CLEAR(clear_module_state->__pyx_codeobj__4);
jpayne@69 5144 Py_CLEAR(clear_module_state->__pyx_codeobj__5);
jpayne@69 5145 Py_CLEAR(clear_module_state->__pyx_codeobj__6);
jpayne@69 5146 Py_CLEAR(clear_module_state->__pyx_codeobj__7);
jpayne@69 5147 Py_CLEAR(clear_module_state->__pyx_codeobj__8);
jpayne@69 5148 Py_CLEAR(clear_module_state->__pyx_codeobj__9);
jpayne@69 5149 Py_CLEAR(clear_module_state->__pyx_codeobj__10);
jpayne@69 5150 Py_CLEAR(clear_module_state->__pyx_codeobj__11);
jpayne@69 5151 Py_CLEAR(clear_module_state->__pyx_codeobj__12);
jpayne@69 5152 Py_CLEAR(clear_module_state->__pyx_codeobj__13);
jpayne@69 5153 Py_CLEAR(clear_module_state->__pyx_codeobj__14);
jpayne@69 5154 Py_CLEAR(clear_module_state->__pyx_codeobj__15);
jpayne@69 5155 Py_CLEAR(clear_module_state->__pyx_codeobj__17);
jpayne@69 5156 Py_CLEAR(clear_module_state->__pyx_codeobj__18);
jpayne@69 5157 Py_CLEAR(clear_module_state->__pyx_codeobj__21);
jpayne@69 5158 Py_CLEAR(clear_module_state->__pyx_codeobj__22);
jpayne@69 5159 Py_CLEAR(clear_module_state->__pyx_codeobj__23);
jpayne@69 5160 Py_CLEAR(clear_module_state->__pyx_codeobj__25);
jpayne@69 5161 Py_CLEAR(clear_module_state->__pyx_codeobj__26);
jpayne@69 5162 Py_CLEAR(clear_module_state->__pyx_codeobj__27);
jpayne@69 5163 Py_CLEAR(clear_module_state->__pyx_codeobj__28);
jpayne@69 5164 Py_CLEAR(clear_module_state->__pyx_codeobj__29);
jpayne@69 5165 Py_CLEAR(clear_module_state->__pyx_codeobj__30);
jpayne@69 5166 Py_CLEAR(clear_module_state->__pyx_codeobj__31);
jpayne@69 5167 Py_CLEAR(clear_module_state->__pyx_codeobj__32);
jpayne@69 5168 Py_CLEAR(clear_module_state->__pyx_codeobj__33);
jpayne@69 5169 Py_CLEAR(clear_module_state->__pyx_codeobj__34);
jpayne@69 5170 Py_CLEAR(clear_module_state->__pyx_codeobj__35);
jpayne@69 5171 Py_CLEAR(clear_module_state->__pyx_codeobj__36);
jpayne@69 5172 Py_CLEAR(clear_module_state->__pyx_codeobj__37);
jpayne@69 5173 Py_CLEAR(clear_module_state->__pyx_codeobj__40);
jpayne@69 5174 Py_CLEAR(clear_module_state->__pyx_codeobj__46);
jpayne@69 5175 Py_CLEAR(clear_module_state->__pyx_codeobj__47);
jpayne@69 5176 Py_CLEAR(clear_module_state->__pyx_codeobj__48);
jpayne@69 5177 Py_CLEAR(clear_module_state->__pyx_codeobj__49);
jpayne@69 5178 Py_CLEAR(clear_module_state->__pyx_codeobj__50);
jpayne@69 5179 Py_CLEAR(clear_module_state->__pyx_codeobj__51);
jpayne@69 5180 Py_CLEAR(clear_module_state->__pyx_codeobj__52);
jpayne@69 5181 Py_CLEAR(clear_module_state->__pyx_codeobj__53);
jpayne@69 5182 Py_CLEAR(clear_module_state->__pyx_codeobj__54);
jpayne@69 5183 Py_CLEAR(clear_module_state->__pyx_codeobj__57);
jpayne@69 5184 Py_CLEAR(clear_module_state->__pyx_codeobj__58);
jpayne@69 5185 Py_CLEAR(clear_module_state->__pyx_codeobj__59);
jpayne@69 5186 Py_CLEAR(clear_module_state->__pyx_codeobj__60);
jpayne@69 5187 Py_CLEAR(clear_module_state->__pyx_codeobj__61);
jpayne@69 5188 return 0;
jpayne@69 5189 }
jpayne@69 5190 #endif
jpayne@69 5191 /* #### Code section: module_state_traverse ### */
jpayne@69 5192 #if CYTHON_USE_MODULE_STATE
jpayne@69 5193 static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
jpayne@69 5194 __pyx_mstate *traverse_module_state = __pyx_mstate(m);
jpayne@69 5195 if (!traverse_module_state) return 0;
jpayne@69 5196 Py_VISIT(traverse_module_state->__pyx_d);
jpayne@69 5197 Py_VISIT(traverse_module_state->__pyx_b);
jpayne@69 5198 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
jpayne@69 5199 Py_VISIT(traverse_module_state->__pyx_empty_tuple);
jpayne@69 5200 Py_VISIT(traverse_module_state->__pyx_empty_bytes);
jpayne@69 5201 Py_VISIT(traverse_module_state->__pyx_empty_unicode);
jpayne@69 5202 #ifdef __Pyx_CyFunction_USED
jpayne@69 5203 Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
jpayne@69 5204 #endif
jpayne@69 5205 #ifdef __Pyx_FusedFunction_USED
jpayne@69 5206 Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
jpayne@69 5207 #endif
jpayne@69 5208 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_10libchtslib_HTSFile);
jpayne@69 5209 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
jpayne@69 5210 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
jpayne@69 5211 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
jpayne@69 5212 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy);
jpayne@69 5213 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator);
jpayne@69 5214 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy);
jpayne@69 5215 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy);
jpayne@69 5216 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy);
jpayne@69 5217 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_BedProxy);
jpayne@69 5218 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy);
jpayne@69 5219 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_5array_array);
jpayne@69 5220 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_tabix_file_iterator);
jpayne@69 5221 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_tabix_file_iterator);
jpayne@69 5222 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@69 5223 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_TabixFile);
jpayne@69 5224 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@69 5225 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_Parser);
jpayne@69 5226 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asTuple);
jpayne@69 5227 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_asTuple);
jpayne@69 5228 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asGTF);
jpayne@69 5229 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_asGTF);
jpayne@69 5230 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asGFF3);
jpayne@69 5231 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_asGFF3);
jpayne@69 5232 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asBed);
jpayne@69 5233 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_asBed);
jpayne@69 5234 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asVCF);
jpayne@69 5235 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_asVCF);
jpayne@69 5236 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_TabixIterator);
jpayne@69 5237 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_TabixIterator);
jpayne@69 5238 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed);
jpayne@69 5239 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_TabixIteratorParsed);
jpayne@69 5240 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_GZIterator);
jpayne@69 5241 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_GZIterator);
jpayne@69 5242 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorHead);
jpayne@69 5243 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_GZIteratorHead);
jpayne@69 5244 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorParsed);
jpayne@69 5245 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_GZIteratorParsed);
jpayne@69 5246 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_Tabixfile);
jpayne@69 5247 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_Tabixfile);
jpayne@69 5248 Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
jpayne@69 5249 Py_VISIT(traverse_module_state->__pyx_kp_u_Could_not_open_file);
jpayne@69 5250 Py_VISIT(traverse_module_state->__pyx_n_s_EmptyIterator);
jpayne@69 5251 Py_VISIT(traverse_module_state->__pyx_n_s_EmptyIterator___iter);
jpayne@69 5252 Py_VISIT(traverse_module_state->__pyx_n_s_EmptyIterator___next);
jpayne@69 5253 Py_VISIT(traverse_module_state->__pyx_kp_u_Filename_s_already_exists_use_fo);
jpayne@69 5254 Py_VISIT(traverse_module_state->__pyx_n_s_GZIterator);
jpayne@69 5255 Py_VISIT(traverse_module_state->__pyx_n_u_GZIterator);
jpayne@69 5256 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorHead);
jpayne@69 5257 Py_VISIT(traverse_module_state->__pyx_n_u_GZIteratorHead);
jpayne@69 5258 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorHead___reduce_cython);
jpayne@69 5259 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorHead___setstate_cython);
jpayne@69 5260 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorParsed);
jpayne@69 5261 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorParsed___reduce_cython);
jpayne@69 5262 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorParsed___setstate_cyth);
jpayne@69 5263 Py_VISIT(traverse_module_state->__pyx_n_s_GZIterator___reduce_cython);
jpayne@69 5264 Py_VISIT(traverse_module_state->__pyx_n_s_GZIterator___setstate_cython);
jpayne@69 5265 Py_VISIT(traverse_module_state->__pyx_n_s_IOError);
jpayne@69 5266 Py_VISIT(traverse_module_state->__pyx_kp_u_I_O_operation_on_closed_file);
jpayne@69 5267 Py_VISIT(traverse_module_state->__pyx_kp_u_I_O_operation_on_closed_file_2);
jpayne@69 5268 Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
jpayne@69 5269 Py_VISIT(traverse_module_state->__pyx_n_s_KeyError);
jpayne@69 5270 Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError);
jpayne@69 5271 Py_VISIT(traverse_module_state->__pyx_kp_u_No_such_file_or_directory_s);
jpayne@69 5272 Py_VISIT(traverse_module_state->__pyx_n_s_NotImplementedError);
jpayne@69 5273 Py_VISIT(traverse_module_state->__pyx_n_s_OSError);
jpayne@69 5274 Py_VISIT(traverse_module_state->__pyx_n_s_O_RDONLY);
jpayne@69 5275 Py_VISIT(traverse_module_state->__pyx_n_s_Parser);
jpayne@69 5276 Py_VISIT(traverse_module_state->__pyx_n_s_Parser___reduce_cython);
jpayne@69 5277 Py_VISIT(traverse_module_state->__pyx_n_s_Parser___setstate_cython);
jpayne@69 5278 Py_VISIT(traverse_module_state->__pyx_n_s_Parser_get_encoding);
jpayne@69 5279 Py_VISIT(traverse_module_state->__pyx_n_s_Parser_set_encoding);
jpayne@69 5280 Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
jpayne@69 5281 Py_VISIT(traverse_module_state->__pyx_n_s_StopIteration);
jpayne@69 5282 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile);
jpayne@69 5283 Py_VISIT(traverse_module_state->__pyx_n_u_TabixFile);
jpayne@69 5284 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile___reduce_cython);
jpayne@69 5285 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile___setstate_cython);
jpayne@69 5286 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile__dup);
jpayne@69 5287 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile__open);
jpayne@69 5288 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile_close);
jpayne@69 5289 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile_fetch);
jpayne@69 5290 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIterator);
jpayne@69 5291 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIteratorParsed);
jpayne@69 5292 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIteratorParsed___reduce_cyt);
jpayne@69 5293 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIteratorParsed___setstate_c);
jpayne@69 5294 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIterator___reduce_cython);
jpayne@69 5295 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIterator___setstate_cython);
jpayne@69 5296 Py_VISIT(traverse_module_state->__pyx_n_s_Tabixfile);
jpayne@69 5297 Py_VISIT(traverse_module_state->__pyx_n_u_Tabixfile);
jpayne@69 5298 Py_VISIT(traverse_module_state->__pyx_n_s_Tabixfile___reduce_cython);
jpayne@69 5299 Py_VISIT(traverse_module_state->__pyx_n_s_Tabixfile___setstate_cython);
jpayne@69 5300 Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
jpayne@69 5301 Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
jpayne@69 5302 Py_VISIT(traverse_module_state->__pyx_n_s_WINDOW_SIZE);
jpayne@69 5303 Py_VISIT(traverse_module_state->__pyx_kp_b__16);
jpayne@69 5304 Py_VISIT(traverse_module_state->__pyx_kp_u__39);
jpayne@69 5305 Py_VISIT(traverse_module_state->__pyx_kp_u__42);
jpayne@69 5306 Py_VISIT(traverse_module_state->__pyx_kp_u__43);
jpayne@69 5307 Py_VISIT(traverse_module_state->__pyx_kp_u__44);
jpayne@69 5308 Py_VISIT(traverse_module_state->__pyx_kp_u__56);
jpayne@69 5309 Py_VISIT(traverse_module_state->__pyx_n_s__62);
jpayne@69 5310 Py_VISIT(traverse_module_state->__pyx_n_s__78);
jpayne@69 5311 Py_VISIT(traverse_module_state->__pyx_n_s_a);
jpayne@69 5312 Py_VISIT(traverse_module_state->__pyx_n_s_all);
jpayne@69 5313 Py_VISIT(traverse_module_state->__pyx_n_s_asBed);
jpayne@69 5314 Py_VISIT(traverse_module_state->__pyx_n_u_asBed);
jpayne@69 5315 Py_VISIT(traverse_module_state->__pyx_n_s_asBed___reduce_cython);
jpayne@69 5316 Py_VISIT(traverse_module_state->__pyx_n_s_asBed___setstate_cython);
jpayne@69 5317 Py_VISIT(traverse_module_state->__pyx_n_s_asGFF3);
jpayne@69 5318 Py_VISIT(traverse_module_state->__pyx_n_u_asGFF3);
jpayne@69 5319 Py_VISIT(traverse_module_state->__pyx_n_s_asGFF3___reduce_cython);
jpayne@69 5320 Py_VISIT(traverse_module_state->__pyx_n_s_asGFF3___setstate_cython);
jpayne@69 5321 Py_VISIT(traverse_module_state->__pyx_n_s_asGTF);
jpayne@69 5322 Py_VISIT(traverse_module_state->__pyx_n_u_asGTF);
jpayne@69 5323 Py_VISIT(traverse_module_state->__pyx_n_s_asGTF___reduce_cython);
jpayne@69 5324 Py_VISIT(traverse_module_state->__pyx_n_s_asGTF___setstate_cython);
jpayne@69 5325 Py_VISIT(traverse_module_state->__pyx_n_s_asTuple);
jpayne@69 5326 Py_VISIT(traverse_module_state->__pyx_n_u_asTuple);
jpayne@69 5327 Py_VISIT(traverse_module_state->__pyx_n_s_asTuple___reduce_cython);
jpayne@69 5328 Py_VISIT(traverse_module_state->__pyx_n_s_asTuple___setstate_cython);
jpayne@69 5329 Py_VISIT(traverse_module_state->__pyx_n_s_asVCF);
jpayne@69 5330 Py_VISIT(traverse_module_state->__pyx_n_u_asVCF);
jpayne@69 5331 Py_VISIT(traverse_module_state->__pyx_n_s_asVCF___reduce_cython);
jpayne@69 5332 Py_VISIT(traverse_module_state->__pyx_n_s_asVCF___setstate_cython);
jpayne@69 5333 Py_VISIT(traverse_module_state->__pyx_n_u_ascii);
jpayne@69 5334 Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
jpayne@69 5335 Py_VISIT(traverse_module_state->__pyx_n_s_b);
jpayne@69 5336 Py_VISIT(traverse_module_state->__pyx_n_u_bcf);
jpayne@69 5337 Py_VISIT(traverse_module_state->__pyx_n_u_bed);
jpayne@69 5338 Py_VISIT(traverse_module_state->__pyx_n_s_buffer);
jpayne@69 5339 Py_VISIT(traverse_module_state->__pyx_n_s_buffer_size);
jpayne@69 5340 Py_VISIT(traverse_module_state->__pyx_kp_u_building_of_index_for_failed);
jpayne@69 5341 Py_VISIT(traverse_module_state->__pyx_n_s_bytes_cpy);
jpayne@69 5342 Py_VISIT(traverse_module_state->__pyx_n_s_c);
jpayne@69 5343 Py_VISIT(traverse_module_state->__pyx_n_s_cfilename);
jpayne@69 5344 Py_VISIT(traverse_module_state->__pyx_n_s_cfilename_index);
jpayne@69 5345 Py_VISIT(traverse_module_state->__pyx_n_s_cfn);
jpayne@69 5346 Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
jpayne@69 5347 Py_VISIT(traverse_module_state->__pyx_n_s_close);
jpayne@69 5348 Py_VISIT(traverse_module_state->__pyx_n_s_closed);
jpayne@69 5349 Py_VISIT(traverse_module_state->__pyx_n_s_conf);
jpayne@69 5350 Py_VISIT(traverse_module_state->__pyx_n_s_conf_data);
jpayne@69 5351 Py_VISIT(traverse_module_state->__pyx_n_s_contigs);
jpayne@69 5352 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_create_iterator_for_re);
jpayne@69 5353 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_create_iterator_possib);
jpayne@69 5354 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_load_tbi_csi_index_of);
jpayne@69 5355 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_file_s);
jpayne@69 5356 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_for_reading_heade);
jpayne@69 5357 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_index_for_s);
jpayne@69 5358 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_s_for_reading);
jpayne@69 5359 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_s_for_writing);
jpayne@69 5360 Py_VISIT(traverse_module_state->__pyx_n_s_cpy);
jpayne@69 5361 Py_VISIT(traverse_module_state->__pyx_n_s_csi);
jpayne@69 5362 Py_VISIT(traverse_module_state->__pyx_kp_u_csi_2);
jpayne@69 5363 Py_VISIT(traverse_module_state->__pyx_n_s_cstr);
jpayne@69 5364 Py_VISIT(traverse_module_state->__pyx_n_s_dict);
jpayne@69 5365 Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
jpayne@69 5366 Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
jpayne@69 5367 Py_VISIT(traverse_module_state->__pyx_n_s_doc);
jpayne@69 5368 Py_VISIT(traverse_module_state->__pyx_n_s_dup);
jpayne@69 5369 Py_VISIT(traverse_module_state->__pyx_kp_s_empty_iterator);
jpayne@69 5370 Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
jpayne@69 5371 Py_VISIT(traverse_module_state->__pyx_n_s_encoding);
jpayne@69 5372 Py_VISIT(traverse_module_state->__pyx_n_s_end);
jpayne@69 5373 Py_VISIT(traverse_module_state->__pyx_n_s_end_col);
jpayne@69 5374 Py_VISIT(traverse_module_state->__pyx_kp_u_end_out_of_range_i);
jpayne@69 5375 Py_VISIT(traverse_module_state->__pyx_kp_u_error_i_when_closing_file_s);
jpayne@69 5376 Py_VISIT(traverse_module_state->__pyx_kp_u_error_i_when_writing_to_file_s);
jpayne@69 5377 Py_VISIT(traverse_module_state->__pyx_n_s_exists);
jpayne@69 5378 Py_VISIT(traverse_module_state->__pyx_n_s_fd_src);
jpayne@69 5379 Py_VISIT(traverse_module_state->__pyx_n_s_fetch);
jpayne@69 5380 Py_VISIT(traverse_module_state->__pyx_kp_u_file_s_not_found);
jpayne@69 5381 Py_VISIT(traverse_module_state->__pyx_n_s_filename);
jpayne@69 5382 Py_VISIT(traverse_module_state->__pyx_n_s_filename_in);
jpayne@69 5383 Py_VISIT(traverse_module_state->__pyx_n_s_filename_index);
jpayne@69 5384 Py_VISIT(traverse_module_state->__pyx_n_s_filename_out);
jpayne@69 5385 Py_VISIT(traverse_module_state->__pyx_kp_u_filename_s_already_exists_use_fo);
jpayne@69 5386 Py_VISIT(traverse_module_state->__pyx_n_s_fileobj);
jpayne@69 5387 Py_VISIT(traverse_module_state->__pyx_n_s_fmt);
jpayne@69 5388 Py_VISIT(traverse_module_state->__pyx_n_s_fn);
jpayne@69 5389 Py_VISIT(traverse_module_state->__pyx_n_s_fn_index);
jpayne@69 5390 Py_VISIT(traverse_module_state->__pyx_n_s_fnidx);
jpayne@69 5391 Py_VISIT(traverse_module_state->__pyx_n_s_force);
jpayne@69 5392 Py_VISIT(traverse_module_state->__pyx_n_s_format);
jpayne@69 5393 Py_VISIT(traverse_module_state->__pyx_n_s_fp);
jpayne@69 5394 Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
jpayne@69 5395 Py_VISIT(traverse_module_state->__pyx_n_s_get_encoding);
jpayne@69 5396 Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
jpayne@69 5397 Py_VISIT(traverse_module_state->__pyx_n_u_gff);
jpayne@69 5398 Py_VISIT(traverse_module_state->__pyx_kp_u_gz);
jpayne@69 5399 Py_VISIT(traverse_module_state->__pyx_n_s_import);
jpayne@69 5400 Py_VISIT(traverse_module_state->__pyx_kp_u_incomplete_line_at_s);
jpayne@69 5401 Py_VISIT(traverse_module_state->__pyx_n_s_index);
jpayne@69 5402 Py_VISIT(traverse_module_state->__pyx_kp_u_index_s_not_found);
jpayne@69 5403 Py_VISIT(traverse_module_state->__pyx_n_s_infile);
jpayne@69 5404 Py_VISIT(traverse_module_state->__pyx_n_s_init);
jpayne@69 5405 Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
jpayne@69 5406 Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
jpayne@69 5407 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_file_opening_mode_s);
jpayne@69 5408 Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
jpayne@69 5409 Py_VISIT(traverse_module_state->__pyx_n_s_is_empty);
jpayne@69 5410 Py_VISIT(traverse_module_state->__pyx_n_s_is_open);
jpayne@69 5411 Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
jpayne@69 5412 Py_VISIT(traverse_module_state->__pyx_n_s_iter);
jpayne@69 5413 Py_VISIT(traverse_module_state->__pyx_kp_s_iterate_over_infile_Permits_the);
jpayne@69 5414 Py_VISIT(traverse_module_state->__pyx_kp_u_iteration_on_closed_file);
jpayne@69 5415 Py_VISIT(traverse_module_state->__pyx_n_s_itr);
jpayne@69 5416 Py_VISIT(traverse_module_state->__pyx_n_s_keep_original);
jpayne@69 5417 Py_VISIT(traverse_module_state->__pyx_n_s_keys);
jpayne@69 5418 Py_VISIT(traverse_module_state->__pyx_n_s_length);
jpayne@69 5419 Py_VISIT(traverse_module_state->__pyx_n_s_line);
jpayne@69 5420 Py_VISIT(traverse_module_state->__pyx_n_s_line_skip);
jpayne@69 5421 Py_VISIT(traverse_module_state->__pyx_n_s_main);
jpayne@69 5422 Py_VISIT(traverse_module_state->__pyx_n_s_meta_char);
jpayne@69 5423 Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
jpayne@69 5424 Py_VISIT(traverse_module_state->__pyx_n_s_min_shift);
jpayne@69 5425 Py_VISIT(traverse_module_state->__pyx_n_s_mode);
jpayne@69 5426 Py_VISIT(traverse_module_state->__pyx_n_s_module);
jpayne@69 5427 Py_VISIT(traverse_module_state->__pyx_n_s_multiple_iterators);
jpayne@69 5428 Py_VISIT(traverse_module_state->__pyx_n_s_name);
jpayne@69 5429 Py_VISIT(traverse_module_state->__pyx_n_s_nbytes);
jpayne@69 5430 Py_VISIT(traverse_module_state->__pyx_kp_u_neither_preset_nor_seq_col_start);
jpayne@69 5431 Py_VISIT(traverse_module_state->__pyx_n_s_new);
jpayne@69 5432 Py_VISIT(traverse_module_state->__pyx_n_s_next);
jpayne@69 5433 Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
jpayne@69 5434 Py_VISIT(traverse_module_state->__pyx_n_s_open);
jpayne@69 5435 Py_VISIT(traverse_module_state->__pyx_n_s_os);
jpayne@69 5436 Py_VISIT(traverse_module_state->__pyx_kp_u_parse_method_of_s_not_implemente);
jpayne@69 5437 Py_VISIT(traverse_module_state->__pyx_n_s_parser);
jpayne@69 5438 Py_VISIT(traverse_module_state->__pyx_n_s_path);
jpayne@69 5439 Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
jpayne@69 5440 Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
jpayne@69 5441 Py_VISIT(traverse_module_state->__pyx_n_s_preset);
jpayne@69 5442 Py_VISIT(traverse_module_state->__pyx_n_s_preset2conf);
jpayne@69 5443 Py_VISIT(traverse_module_state->__pyx_n_u_psltbl);
jpayne@69 5444 Py_VISIT(traverse_module_state->__pyx_n_s_pysam_libctabix);
jpayne@69 5445 Py_VISIT(traverse_module_state->__pyx_kp_s_pysam_libctabix_pyx);
jpayne@69 5446 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
jpayne@69 5447 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
jpayne@69 5448 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
jpayne@69 5449 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
jpayne@69 5450 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
jpayne@69 5451 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Parser);
jpayne@69 5452 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_asBed);
jpayne@69 5453 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_asGFF3);
jpayne@69 5454 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_asGTF);
jpayne@69 5455 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_asTuple);
jpayne@69 5456 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_asVCF);
jpayne@69 5457 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
jpayne@69 5458 Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
jpayne@69 5459 Py_VISIT(traverse_module_state->__pyx_n_s_r);
jpayne@69 5460 Py_VISIT(traverse_module_state->__pyx_n_u_r);
jpayne@69 5461 Py_VISIT(traverse_module_state->__pyx_n_s_readline);
jpayne@69 5462 Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
jpayne@69 5463 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
jpayne@69 5464 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
jpayne@69 5465 Py_VISIT(traverse_module_state->__pyx_n_s_reference);
jpayne@69 5466 Py_VISIT(traverse_module_state->__pyx_n_s_region);
jpayne@69 5467 Py_VISIT(traverse_module_state->__pyx_n_s_retval);
jpayne@69 5468 Py_VISIT(traverse_module_state->__pyx_kp_u_s);
jpayne@69 5469 Py_VISIT(traverse_module_state->__pyx_n_s_s_2);
jpayne@69 5470 Py_VISIT(traverse_module_state->__pyx_kp_u_s_i);
jpayne@69 5471 Py_VISIT(traverse_module_state->__pyx_kp_u_s_i_i);
jpayne@69 5472 Py_VISIT(traverse_module_state->__pyx_n_u_sam);
jpayne@69 5473 Py_VISIT(traverse_module_state->__pyx_n_s_self);
jpayne@69 5474 Py_VISIT(traverse_module_state->__pyx_kp_s_self_gzipfile_self_kstream_canno);
jpayne@69 5475 Py_VISIT(traverse_module_state->__pyx_kp_s_self_iterator_cannot_be_converte);
jpayne@69 5476 Py_VISIT(traverse_module_state->__pyx_n_s_seq_col);
jpayne@69 5477 Py_VISIT(traverse_module_state->__pyx_n_s_set_encoding);
jpayne@69 5478 Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
jpayne@69 5479 Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
jpayne@69 5480 Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
jpayne@69 5481 Py_VISIT(traverse_module_state->__pyx_n_s_spec);
jpayne@69 5482 Py_VISIT(traverse_module_state->__pyx_n_s_start);
jpayne@69 5483 Py_VISIT(traverse_module_state->__pyx_n_s_start_col);
jpayne@69 5484 Py_VISIT(traverse_module_state->__pyx_kp_u_start_i_end_i);
jpayne@69 5485 Py_VISIT(traverse_module_state->__pyx_kp_u_start_out_of_range_i);
jpayne@69 5486 Py_VISIT(traverse_module_state->__pyx_n_s_state);
jpayne@69 5487 Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
jpayne@69 5488 Py_VISIT(traverse_module_state->__pyx_n_s_suffix);
jpayne@69 5489 Py_VISIT(traverse_module_state->__pyx_n_s_super);
jpayne@69 5490 Py_VISIT(traverse_module_state->__pyx_n_s_sys);
jpayne@69 5491 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_compress);
jpayne@69 5492 Py_VISIT(traverse_module_state->__pyx_n_u_tabix_compress);
jpayne@69 5493 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_file_iterator);
jpayne@69 5494 Py_VISIT(traverse_module_state->__pyx_n_u_tabix_file_iterator);
jpayne@69 5495 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_file_iterator___reduce_cyt);
jpayne@69 5496 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_file_iterator___setstate_c);
jpayne@69 5497 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_generic_iterator);
jpayne@69 5498 Py_VISIT(traverse_module_state->__pyx_n_u_tabix_generic_iterator);
jpayne@69 5499 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_generic_iterator___init);
jpayne@69 5500 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_generic_iterator___iter);
jpayne@69 5501 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_generic_iterator___next);
jpayne@69 5502 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_index);
jpayne@69 5503 Py_VISIT(traverse_module_state->__pyx_n_u_tabix_index);
jpayne@69 5504 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_iterator);
jpayne@69 5505 Py_VISIT(traverse_module_state->__pyx_n_u_tabix_iterator);
jpayne@69 5506 Py_VISIT(traverse_module_state->__pyx_kp_u_tbi);
jpayne@69 5507 Py_VISIT(traverse_module_state->__pyx_n_s_tell);
jpayne@69 5508 Py_VISIT(traverse_module_state->__pyx_n_s_test);
jpayne@69 5509 Py_VISIT(traverse_module_state->__pyx_n_s_threads);
jpayne@69 5510 Py_VISIT(traverse_module_state->__pyx_kp_u_unknown_preset);
jpayne@69 5511 Py_VISIT(traverse_module_state->__pyx_n_s_unlink);
jpayne@69 5512 Py_VISIT(traverse_module_state->__pyx_n_s_update);
jpayne@69 5513 Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
jpayne@69 5514 Py_VISIT(traverse_module_state->__pyx_kp_u_valid_presets_are);
jpayne@69 5515 Py_VISIT(traverse_module_state->__pyx_n_u_vcf);
jpayne@69 5516 Py_VISIT(traverse_module_state->__pyx_kp_u_writing_failed);
jpayne@69 5517 Py_VISIT(traverse_module_state->__pyx_n_s_zerobased);
jpayne@69 5518 Py_VISIT(traverse_module_state->__pyx_int_0);
jpayne@69 5519 Py_VISIT(traverse_module_state->__pyx_int_1);
jpayne@69 5520 Py_VISIT(traverse_module_state->__pyx_int_2);
jpayne@69 5521 Py_VISIT(traverse_module_state->__pyx_int_3);
jpayne@69 5522 Py_VISIT(traverse_module_state->__pyx_int_4);
jpayne@69 5523 Py_VISIT(traverse_module_state->__pyx_int_5);
jpayne@69 5524 Py_VISIT(traverse_module_state->__pyx_int_15);
jpayne@69 5525 Py_VISIT(traverse_module_state->__pyx_int_17);
jpayne@69 5526 Py_VISIT(traverse_module_state->__pyx_int_18);
jpayne@69 5527 Py_VISIT(traverse_module_state->__pyx_int_35);
jpayne@69 5528 Py_VISIT(traverse_module_state->__pyx_int_64);
jpayne@69 5529 Py_VISIT(traverse_module_state->__pyx_int_21667264);
jpayne@69 5530 Py_VISIT(traverse_module_state->__pyx_int_139192863);
jpayne@69 5531 Py_VISIT(traverse_module_state->__pyx_int_243541226);
jpayne@69 5532 Py_VISIT(traverse_module_state->__pyx_int_neg_1);
jpayne@69 5533 Py_VISIT(traverse_module_state->__pyx_codeobj_);
jpayne@69 5534 Py_VISIT(traverse_module_state->__pyx_tuple__19);
jpayne@69 5535 Py_VISIT(traverse_module_state->__pyx_tuple__20);
jpayne@69 5536 Py_VISIT(traverse_module_state->__pyx_tuple__24);
jpayne@69 5537 Py_VISIT(traverse_module_state->__pyx_tuple__38);
jpayne@69 5538 Py_VISIT(traverse_module_state->__pyx_tuple__41);
jpayne@69 5539 Py_VISIT(traverse_module_state->__pyx_tuple__45);
jpayne@69 5540 Py_VISIT(traverse_module_state->__pyx_tuple__55);
jpayne@69 5541 Py_VISIT(traverse_module_state->__pyx_tuple__63);
jpayne@69 5542 Py_VISIT(traverse_module_state->__pyx_tuple__64);
jpayne@69 5543 Py_VISIT(traverse_module_state->__pyx_tuple__65);
jpayne@69 5544 Py_VISIT(traverse_module_state->__pyx_tuple__66);
jpayne@69 5545 Py_VISIT(traverse_module_state->__pyx_tuple__67);
jpayne@69 5546 Py_VISIT(traverse_module_state->__pyx_tuple__68);
jpayne@69 5547 Py_VISIT(traverse_module_state->__pyx_tuple__69);
jpayne@69 5548 Py_VISIT(traverse_module_state->__pyx_tuple__70);
jpayne@69 5549 Py_VISIT(traverse_module_state->__pyx_tuple__71);
jpayne@69 5550 Py_VISIT(traverse_module_state->__pyx_tuple__72);
jpayne@69 5551 Py_VISIT(traverse_module_state->__pyx_tuple__73);
jpayne@69 5552 Py_VISIT(traverse_module_state->__pyx_tuple__74);
jpayne@69 5553 Py_VISIT(traverse_module_state->__pyx_tuple__75);
jpayne@69 5554 Py_VISIT(traverse_module_state->__pyx_tuple__76);
jpayne@69 5555 Py_VISIT(traverse_module_state->__pyx_tuple__77);
jpayne@69 5556 Py_VISIT(traverse_module_state->__pyx_codeobj__2);
jpayne@69 5557 Py_VISIT(traverse_module_state->__pyx_codeobj__3);
jpayne@69 5558 Py_VISIT(traverse_module_state->__pyx_codeobj__4);
jpayne@69 5559 Py_VISIT(traverse_module_state->__pyx_codeobj__5);
jpayne@69 5560 Py_VISIT(traverse_module_state->__pyx_codeobj__6);
jpayne@69 5561 Py_VISIT(traverse_module_state->__pyx_codeobj__7);
jpayne@69 5562 Py_VISIT(traverse_module_state->__pyx_codeobj__8);
jpayne@69 5563 Py_VISIT(traverse_module_state->__pyx_codeobj__9);
jpayne@69 5564 Py_VISIT(traverse_module_state->__pyx_codeobj__10);
jpayne@69 5565 Py_VISIT(traverse_module_state->__pyx_codeobj__11);
jpayne@69 5566 Py_VISIT(traverse_module_state->__pyx_codeobj__12);
jpayne@69 5567 Py_VISIT(traverse_module_state->__pyx_codeobj__13);
jpayne@69 5568 Py_VISIT(traverse_module_state->__pyx_codeobj__14);
jpayne@69 5569 Py_VISIT(traverse_module_state->__pyx_codeobj__15);
jpayne@69 5570 Py_VISIT(traverse_module_state->__pyx_codeobj__17);
jpayne@69 5571 Py_VISIT(traverse_module_state->__pyx_codeobj__18);
jpayne@69 5572 Py_VISIT(traverse_module_state->__pyx_codeobj__21);
jpayne@69 5573 Py_VISIT(traverse_module_state->__pyx_codeobj__22);
jpayne@69 5574 Py_VISIT(traverse_module_state->__pyx_codeobj__23);
jpayne@69 5575 Py_VISIT(traverse_module_state->__pyx_codeobj__25);
jpayne@69 5576 Py_VISIT(traverse_module_state->__pyx_codeobj__26);
jpayne@69 5577 Py_VISIT(traverse_module_state->__pyx_codeobj__27);
jpayne@69 5578 Py_VISIT(traverse_module_state->__pyx_codeobj__28);
jpayne@69 5579 Py_VISIT(traverse_module_state->__pyx_codeobj__29);
jpayne@69 5580 Py_VISIT(traverse_module_state->__pyx_codeobj__30);
jpayne@69 5581 Py_VISIT(traverse_module_state->__pyx_codeobj__31);
jpayne@69 5582 Py_VISIT(traverse_module_state->__pyx_codeobj__32);
jpayne@69 5583 Py_VISIT(traverse_module_state->__pyx_codeobj__33);
jpayne@69 5584 Py_VISIT(traverse_module_state->__pyx_codeobj__34);
jpayne@69 5585 Py_VISIT(traverse_module_state->__pyx_codeobj__35);
jpayne@69 5586 Py_VISIT(traverse_module_state->__pyx_codeobj__36);
jpayne@69 5587 Py_VISIT(traverse_module_state->__pyx_codeobj__37);
jpayne@69 5588 Py_VISIT(traverse_module_state->__pyx_codeobj__40);
jpayne@69 5589 Py_VISIT(traverse_module_state->__pyx_codeobj__46);
jpayne@69 5590 Py_VISIT(traverse_module_state->__pyx_codeobj__47);
jpayne@69 5591 Py_VISIT(traverse_module_state->__pyx_codeobj__48);
jpayne@69 5592 Py_VISIT(traverse_module_state->__pyx_codeobj__49);
jpayne@69 5593 Py_VISIT(traverse_module_state->__pyx_codeobj__50);
jpayne@69 5594 Py_VISIT(traverse_module_state->__pyx_codeobj__51);
jpayne@69 5595 Py_VISIT(traverse_module_state->__pyx_codeobj__52);
jpayne@69 5596 Py_VISIT(traverse_module_state->__pyx_codeobj__53);
jpayne@69 5597 Py_VISIT(traverse_module_state->__pyx_codeobj__54);
jpayne@69 5598 Py_VISIT(traverse_module_state->__pyx_codeobj__57);
jpayne@69 5599 Py_VISIT(traverse_module_state->__pyx_codeobj__58);
jpayne@69 5600 Py_VISIT(traverse_module_state->__pyx_codeobj__59);
jpayne@69 5601 Py_VISIT(traverse_module_state->__pyx_codeobj__60);
jpayne@69 5602 Py_VISIT(traverse_module_state->__pyx_codeobj__61);
jpayne@69 5603 return 0;
jpayne@69 5604 }
jpayne@69 5605 #endif
jpayne@69 5606 /* #### Code section: module_state_defines ### */
jpayne@69 5607 #define __pyx_d __pyx_mstate_global->__pyx_d
jpayne@69 5608 #define __pyx_b __pyx_mstate_global->__pyx_b
jpayne@69 5609 #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
jpayne@69 5610 #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
jpayne@69 5611 #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
jpayne@69 5612 #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
jpayne@69 5613 #ifdef __Pyx_CyFunction_USED
jpayne@69 5614 #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
jpayne@69 5615 #endif
jpayne@69 5616 #ifdef __Pyx_FusedFunction_USED
jpayne@69 5617 #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
jpayne@69 5618 #endif
jpayne@69 5619 #ifdef __Pyx_Generator_USED
jpayne@69 5620 #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
jpayne@69 5621 #endif
jpayne@69 5622 #ifdef __Pyx_IterableCoroutine_USED
jpayne@69 5623 #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
jpayne@69 5624 #endif
jpayne@69 5625 #ifdef __Pyx_Coroutine_USED
jpayne@69 5626 #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
jpayne@69 5627 #endif
jpayne@69 5628 #ifdef __Pyx_Coroutine_USED
jpayne@69 5629 #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
jpayne@69 5630 #endif
jpayne@69 5631 #if CYTHON_USE_MODULE_STATE
jpayne@69 5632 #endif
jpayne@69 5633 #if CYTHON_USE_MODULE_STATE
jpayne@69 5634 #endif
jpayne@69 5635 #if CYTHON_USE_MODULE_STATE
jpayne@69 5636 #endif
jpayne@69 5637 #if CYTHON_USE_MODULE_STATE
jpayne@69 5638 #endif
jpayne@69 5639 #if CYTHON_USE_MODULE_STATE
jpayne@69 5640 #endif
jpayne@69 5641 #if CYTHON_USE_MODULE_STATE
jpayne@69 5642 #endif
jpayne@69 5643 #define __pyx_ptype_5pysam_10libchtslib_HTSFile __pyx_mstate_global->__pyx_ptype_5pysam_10libchtslib_HTSFile
jpayne@69 5644 #if CYTHON_USE_MODULE_STATE
jpayne@69 5645 #endif
jpayne@69 5646 #if CYTHON_USE_MODULE_STATE
jpayne@69 5647 #endif
jpayne@69 5648 #if CYTHON_USE_MODULE_STATE
jpayne@69 5649 #endif
jpayne@69 5650 #if CYTHON_USE_MODULE_STATE
jpayne@69 5651 #endif
jpayne@69 5652 #if CYTHON_USE_MODULE_STATE
jpayne@69 5653 #endif
jpayne@69 5654 #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
jpayne@69 5655 #if CYTHON_USE_MODULE_STATE
jpayne@69 5656 #endif
jpayne@69 5657 #if CYTHON_USE_MODULE_STATE
jpayne@69 5658 #endif
jpayne@69 5659 #if CYTHON_USE_MODULE_STATE
jpayne@69 5660 #endif
jpayne@69 5661 #if CYTHON_USE_MODULE_STATE
jpayne@69 5662 #endif
jpayne@69 5663 #if CYTHON_USE_MODULE_STATE
jpayne@69 5664 #endif
jpayne@69 5665 #if CYTHON_USE_MODULE_STATE
jpayne@69 5666 #endif
jpayne@69 5667 #if CYTHON_USE_MODULE_STATE
jpayne@69 5668 #endif
jpayne@69 5669 #if CYTHON_USE_MODULE_STATE
jpayne@69 5670 #endif
jpayne@69 5671 #if CYTHON_USE_MODULE_STATE
jpayne@69 5672 #endif
jpayne@69 5673 #if CYTHON_USE_MODULE_STATE
jpayne@69 5674 #endif
jpayne@69 5675 #if CYTHON_USE_MODULE_STATE
jpayne@69 5676 #endif
jpayne@69 5677 #if CYTHON_USE_MODULE_STATE
jpayne@69 5678 #endif
jpayne@69 5679 #if CYTHON_USE_MODULE_STATE
jpayne@69 5680 #endif
jpayne@69 5681 #if CYTHON_USE_MODULE_STATE
jpayne@69 5682 #endif
jpayne@69 5683 #define __pyx_ptype_7cpython_4bool_bool __pyx_mstate_global->__pyx_ptype_7cpython_4bool_bool
jpayne@69 5684 #if CYTHON_USE_MODULE_STATE
jpayne@69 5685 #endif
jpayne@69 5686 #if CYTHON_USE_MODULE_STATE
jpayne@69 5687 #endif
jpayne@69 5688 #if CYTHON_USE_MODULE_STATE
jpayne@69 5689 #endif
jpayne@69 5690 #if CYTHON_USE_MODULE_STATE
jpayne@69 5691 #endif
jpayne@69 5692 #define __pyx_ptype_7cpython_7complex_complex __pyx_mstate_global->__pyx_ptype_7cpython_7complex_complex
jpayne@69 5693 #if CYTHON_USE_MODULE_STATE
jpayne@69 5694 #endif
jpayne@69 5695 #if CYTHON_USE_MODULE_STATE
jpayne@69 5696 #endif
jpayne@69 5697 #if CYTHON_USE_MODULE_STATE
jpayne@69 5698 #endif
jpayne@69 5699 #if CYTHON_USE_MODULE_STATE
jpayne@69 5700 #endif
jpayne@69 5701 #if CYTHON_USE_MODULE_STATE
jpayne@69 5702 #endif
jpayne@69 5703 #if CYTHON_USE_MODULE_STATE
jpayne@69 5704 #endif
jpayne@69 5705 #if CYTHON_USE_MODULE_STATE
jpayne@69 5706 #endif
jpayne@69 5707 #if CYTHON_USE_MODULE_STATE
jpayne@69 5708 #endif
jpayne@69 5709 #if CYTHON_USE_MODULE_STATE
jpayne@69 5710 #endif
jpayne@69 5711 #if CYTHON_USE_MODULE_STATE
jpayne@69 5712 #endif
jpayne@69 5713 #if CYTHON_USE_MODULE_STATE
jpayne@69 5714 #endif
jpayne@69 5715 #if CYTHON_USE_MODULE_STATE
jpayne@69 5716 #endif
jpayne@69 5717 #if CYTHON_USE_MODULE_STATE
jpayne@69 5718 #endif
jpayne@69 5719 #if CYTHON_USE_MODULE_STATE
jpayne@69 5720 #endif
jpayne@69 5721 #if CYTHON_USE_MODULE_STATE
jpayne@69 5722 #endif
jpayne@69 5723 #if CYTHON_USE_MODULE_STATE
jpayne@69 5724 #endif
jpayne@69 5725 #if CYTHON_USE_MODULE_STATE
jpayne@69 5726 #endif
jpayne@69 5727 #if CYTHON_USE_MODULE_STATE
jpayne@69 5728 #endif
jpayne@69 5729 #if CYTHON_USE_MODULE_STATE
jpayne@69 5730 #endif
jpayne@69 5731 #if CYTHON_USE_MODULE_STATE
jpayne@69 5732 #endif
jpayne@69 5733 #if CYTHON_USE_MODULE_STATE
jpayne@69 5734 #endif
jpayne@69 5735 #define __pyx_ptype_5pysam_16libctabixproxies_TupleProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy
jpayne@69 5736 #define __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator
jpayne@69 5737 #define __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy
jpayne@69 5738 #define __pyx_ptype_5pysam_16libctabixproxies_GTFProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy
jpayne@69 5739 #define __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy
jpayne@69 5740 #define __pyx_ptype_5pysam_16libctabixproxies_BedProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_BedProxy
jpayne@69 5741 #define __pyx_ptype_5pysam_16libctabixproxies_VCFProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy
jpayne@69 5742 #if CYTHON_USE_MODULE_STATE
jpayne@69 5743 #endif
jpayne@69 5744 #if CYTHON_USE_MODULE_STATE
jpayne@69 5745 #endif
jpayne@69 5746 #if CYTHON_USE_MODULE_STATE
jpayne@69 5747 #endif
jpayne@69 5748 #define __pyx_ptype_7cpython_5array_array __pyx_mstate_global->__pyx_ptype_7cpython_5array_array
jpayne@69 5749 #if CYTHON_USE_MODULE_STATE
jpayne@69 5750 #endif
jpayne@69 5751 #if CYTHON_USE_MODULE_STATE
jpayne@69 5752 #define __pyx_type_5pysam_9libctabix_tabix_file_iterator __pyx_mstate_global->__pyx_type_5pysam_9libctabix_tabix_file_iterator
jpayne@69 5753 #define __pyx_type_5pysam_9libctabix_TabixFile __pyx_mstate_global->__pyx_type_5pysam_9libctabix_TabixFile
jpayne@69 5754 #define __pyx_type_5pysam_9libctabix_Parser __pyx_mstate_global->__pyx_type_5pysam_9libctabix_Parser
jpayne@69 5755 #define __pyx_type_5pysam_9libctabix_asTuple __pyx_mstate_global->__pyx_type_5pysam_9libctabix_asTuple
jpayne@69 5756 #define __pyx_type_5pysam_9libctabix_asGTF __pyx_mstate_global->__pyx_type_5pysam_9libctabix_asGTF
jpayne@69 5757 #define __pyx_type_5pysam_9libctabix_asGFF3 __pyx_mstate_global->__pyx_type_5pysam_9libctabix_asGFF3
jpayne@69 5758 #define __pyx_type_5pysam_9libctabix_asBed __pyx_mstate_global->__pyx_type_5pysam_9libctabix_asBed
jpayne@69 5759 #define __pyx_type_5pysam_9libctabix_asVCF __pyx_mstate_global->__pyx_type_5pysam_9libctabix_asVCF
jpayne@69 5760 #define __pyx_type_5pysam_9libctabix_TabixIterator __pyx_mstate_global->__pyx_type_5pysam_9libctabix_TabixIterator
jpayne@69 5761 #define __pyx_type_5pysam_9libctabix_TabixIteratorParsed __pyx_mstate_global->__pyx_type_5pysam_9libctabix_TabixIteratorParsed
jpayne@69 5762 #define __pyx_type_5pysam_9libctabix_GZIterator __pyx_mstate_global->__pyx_type_5pysam_9libctabix_GZIterator
jpayne@69 5763 #define __pyx_type_5pysam_9libctabix_GZIteratorHead __pyx_mstate_global->__pyx_type_5pysam_9libctabix_GZIteratorHead
jpayne@69 5764 #define __pyx_type_5pysam_9libctabix_GZIteratorParsed __pyx_mstate_global->__pyx_type_5pysam_9libctabix_GZIteratorParsed
jpayne@69 5765 #define __pyx_type_5pysam_9libctabix_Tabixfile __pyx_mstate_global->__pyx_type_5pysam_9libctabix_Tabixfile
jpayne@69 5766 #endif
jpayne@69 5767 #define __pyx_ptype_5pysam_9libctabix_tabix_file_iterator __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_tabix_file_iterator
jpayne@69 5768 #define __pyx_ptype_5pysam_9libctabix_TabixFile __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_TabixFile
jpayne@69 5769 #define __pyx_ptype_5pysam_9libctabix_Parser __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_Parser
jpayne@69 5770 #define __pyx_ptype_5pysam_9libctabix_asTuple __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asTuple
jpayne@69 5771 #define __pyx_ptype_5pysam_9libctabix_asGTF __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asGTF
jpayne@69 5772 #define __pyx_ptype_5pysam_9libctabix_asGFF3 __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asGFF3
jpayne@69 5773 #define __pyx_ptype_5pysam_9libctabix_asBed __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asBed
jpayne@69 5774 #define __pyx_ptype_5pysam_9libctabix_asVCF __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asVCF
jpayne@69 5775 #define __pyx_ptype_5pysam_9libctabix_TabixIterator __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_TabixIterator
jpayne@69 5776 #define __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed
jpayne@69 5777 #define __pyx_ptype_5pysam_9libctabix_GZIterator __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_GZIterator
jpayne@69 5778 #define __pyx_ptype_5pysam_9libctabix_GZIteratorHead __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_GZIteratorHead
jpayne@69 5779 #define __pyx_ptype_5pysam_9libctabix_GZIteratorParsed __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_GZIteratorParsed
jpayne@69 5780 #define __pyx_ptype_5pysam_9libctabix_Tabixfile __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_Tabixfile
jpayne@69 5781 #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
jpayne@69 5782 #define __pyx_kp_u_Could_not_open_file __pyx_mstate_global->__pyx_kp_u_Could_not_open_file
jpayne@69 5783 #define __pyx_n_s_EmptyIterator __pyx_mstate_global->__pyx_n_s_EmptyIterator
jpayne@69 5784 #define __pyx_n_s_EmptyIterator___iter __pyx_mstate_global->__pyx_n_s_EmptyIterator___iter
jpayne@69 5785 #define __pyx_n_s_EmptyIterator___next __pyx_mstate_global->__pyx_n_s_EmptyIterator___next
jpayne@69 5786 #define __pyx_kp_u_Filename_s_already_exists_use_fo __pyx_mstate_global->__pyx_kp_u_Filename_s_already_exists_use_fo
jpayne@69 5787 #define __pyx_n_s_GZIterator __pyx_mstate_global->__pyx_n_s_GZIterator
jpayne@69 5788 #define __pyx_n_u_GZIterator __pyx_mstate_global->__pyx_n_u_GZIterator
jpayne@69 5789 #define __pyx_n_s_GZIteratorHead __pyx_mstate_global->__pyx_n_s_GZIteratorHead
jpayne@69 5790 #define __pyx_n_u_GZIteratorHead __pyx_mstate_global->__pyx_n_u_GZIteratorHead
jpayne@69 5791 #define __pyx_n_s_GZIteratorHead___reduce_cython __pyx_mstate_global->__pyx_n_s_GZIteratorHead___reduce_cython
jpayne@69 5792 #define __pyx_n_s_GZIteratorHead___setstate_cython __pyx_mstate_global->__pyx_n_s_GZIteratorHead___setstate_cython
jpayne@69 5793 #define __pyx_n_s_GZIteratorParsed __pyx_mstate_global->__pyx_n_s_GZIteratorParsed
jpayne@69 5794 #define __pyx_n_s_GZIteratorParsed___reduce_cython __pyx_mstate_global->__pyx_n_s_GZIteratorParsed___reduce_cython
jpayne@69 5795 #define __pyx_n_s_GZIteratorParsed___setstate_cyth __pyx_mstate_global->__pyx_n_s_GZIteratorParsed___setstate_cyth
jpayne@69 5796 #define __pyx_n_s_GZIterator___reduce_cython __pyx_mstate_global->__pyx_n_s_GZIterator___reduce_cython
jpayne@69 5797 #define __pyx_n_s_GZIterator___setstate_cython __pyx_mstate_global->__pyx_n_s_GZIterator___setstate_cython
jpayne@69 5798 #define __pyx_n_s_IOError __pyx_mstate_global->__pyx_n_s_IOError
jpayne@69 5799 #define __pyx_kp_u_I_O_operation_on_closed_file __pyx_mstate_global->__pyx_kp_u_I_O_operation_on_closed_file
jpayne@69 5800 #define __pyx_kp_u_I_O_operation_on_closed_file_2 __pyx_mstate_global->__pyx_kp_u_I_O_operation_on_closed_file_2
jpayne@69 5801 #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
jpayne@69 5802 #define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError
jpayne@69 5803 #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError
jpayne@69 5804 #define __pyx_kp_u_No_such_file_or_directory_s __pyx_mstate_global->__pyx_kp_u_No_such_file_or_directory_s
jpayne@69 5805 #define __pyx_n_s_NotImplementedError __pyx_mstate_global->__pyx_n_s_NotImplementedError
jpayne@69 5806 #define __pyx_n_s_OSError __pyx_mstate_global->__pyx_n_s_OSError
jpayne@69 5807 #define __pyx_n_s_O_RDONLY __pyx_mstate_global->__pyx_n_s_O_RDONLY
jpayne@69 5808 #define __pyx_n_s_Parser __pyx_mstate_global->__pyx_n_s_Parser
jpayne@69 5809 #define __pyx_n_s_Parser___reduce_cython __pyx_mstate_global->__pyx_n_s_Parser___reduce_cython
jpayne@69 5810 #define __pyx_n_s_Parser___setstate_cython __pyx_mstate_global->__pyx_n_s_Parser___setstate_cython
jpayne@69 5811 #define __pyx_n_s_Parser_get_encoding __pyx_mstate_global->__pyx_n_s_Parser_get_encoding
jpayne@69 5812 #define __pyx_n_s_Parser_set_encoding __pyx_mstate_global->__pyx_n_s_Parser_set_encoding
jpayne@69 5813 #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
jpayne@69 5814 #define __pyx_n_s_StopIteration __pyx_mstate_global->__pyx_n_s_StopIteration
jpayne@69 5815 #define __pyx_n_s_TabixFile __pyx_mstate_global->__pyx_n_s_TabixFile
jpayne@69 5816 #define __pyx_n_u_TabixFile __pyx_mstate_global->__pyx_n_u_TabixFile
jpayne@69 5817 #define __pyx_n_s_TabixFile___reduce_cython __pyx_mstate_global->__pyx_n_s_TabixFile___reduce_cython
jpayne@69 5818 #define __pyx_n_s_TabixFile___setstate_cython __pyx_mstate_global->__pyx_n_s_TabixFile___setstate_cython
jpayne@69 5819 #define __pyx_n_s_TabixFile__dup __pyx_mstate_global->__pyx_n_s_TabixFile__dup
jpayne@69 5820 #define __pyx_n_s_TabixFile__open __pyx_mstate_global->__pyx_n_s_TabixFile__open
jpayne@69 5821 #define __pyx_n_s_TabixFile_close __pyx_mstate_global->__pyx_n_s_TabixFile_close
jpayne@69 5822 #define __pyx_n_s_TabixFile_fetch __pyx_mstate_global->__pyx_n_s_TabixFile_fetch
jpayne@69 5823 #define __pyx_n_s_TabixIterator __pyx_mstate_global->__pyx_n_s_TabixIterator
jpayne@69 5824 #define __pyx_n_s_TabixIteratorParsed __pyx_mstate_global->__pyx_n_s_TabixIteratorParsed
jpayne@69 5825 #define __pyx_n_s_TabixIteratorParsed___reduce_cyt __pyx_mstate_global->__pyx_n_s_TabixIteratorParsed___reduce_cyt
jpayne@69 5826 #define __pyx_n_s_TabixIteratorParsed___setstate_c __pyx_mstate_global->__pyx_n_s_TabixIteratorParsed___setstate_c
jpayne@69 5827 #define __pyx_n_s_TabixIterator___reduce_cython __pyx_mstate_global->__pyx_n_s_TabixIterator___reduce_cython
jpayne@69 5828 #define __pyx_n_s_TabixIterator___setstate_cython __pyx_mstate_global->__pyx_n_s_TabixIterator___setstate_cython
jpayne@69 5829 #define __pyx_n_s_Tabixfile __pyx_mstate_global->__pyx_n_s_Tabixfile
jpayne@69 5830 #define __pyx_n_u_Tabixfile __pyx_mstate_global->__pyx_n_u_Tabixfile
jpayne@69 5831 #define __pyx_n_s_Tabixfile___reduce_cython __pyx_mstate_global->__pyx_n_s_Tabixfile___reduce_cython
jpayne@69 5832 #define __pyx_n_s_Tabixfile___setstate_cython __pyx_mstate_global->__pyx_n_s_Tabixfile___setstate_cython
jpayne@69 5833 #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
jpayne@69 5834 #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
jpayne@69 5835 #define __pyx_n_s_WINDOW_SIZE __pyx_mstate_global->__pyx_n_s_WINDOW_SIZE
jpayne@69 5836 #define __pyx_kp_b__16 __pyx_mstate_global->__pyx_kp_b__16
jpayne@69 5837 #define __pyx_kp_u__39 __pyx_mstate_global->__pyx_kp_u__39
jpayne@69 5838 #define __pyx_kp_u__42 __pyx_mstate_global->__pyx_kp_u__42
jpayne@69 5839 #define __pyx_kp_u__43 __pyx_mstate_global->__pyx_kp_u__43
jpayne@69 5840 #define __pyx_kp_u__44 __pyx_mstate_global->__pyx_kp_u__44
jpayne@69 5841 #define __pyx_kp_u__56 __pyx_mstate_global->__pyx_kp_u__56
jpayne@69 5842 #define __pyx_n_s__62 __pyx_mstate_global->__pyx_n_s__62
jpayne@69 5843 #define __pyx_n_s__78 __pyx_mstate_global->__pyx_n_s__78
jpayne@69 5844 #define __pyx_n_s_a __pyx_mstate_global->__pyx_n_s_a
jpayne@69 5845 #define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all
jpayne@69 5846 #define __pyx_n_s_asBed __pyx_mstate_global->__pyx_n_s_asBed
jpayne@69 5847 #define __pyx_n_u_asBed __pyx_mstate_global->__pyx_n_u_asBed
jpayne@69 5848 #define __pyx_n_s_asBed___reduce_cython __pyx_mstate_global->__pyx_n_s_asBed___reduce_cython
jpayne@69 5849 #define __pyx_n_s_asBed___setstate_cython __pyx_mstate_global->__pyx_n_s_asBed___setstate_cython
jpayne@69 5850 #define __pyx_n_s_asGFF3 __pyx_mstate_global->__pyx_n_s_asGFF3
jpayne@69 5851 #define __pyx_n_u_asGFF3 __pyx_mstate_global->__pyx_n_u_asGFF3
jpayne@69 5852 #define __pyx_n_s_asGFF3___reduce_cython __pyx_mstate_global->__pyx_n_s_asGFF3___reduce_cython
jpayne@69 5853 #define __pyx_n_s_asGFF3___setstate_cython __pyx_mstate_global->__pyx_n_s_asGFF3___setstate_cython
jpayne@69 5854 #define __pyx_n_s_asGTF __pyx_mstate_global->__pyx_n_s_asGTF
jpayne@69 5855 #define __pyx_n_u_asGTF __pyx_mstate_global->__pyx_n_u_asGTF
jpayne@69 5856 #define __pyx_n_s_asGTF___reduce_cython __pyx_mstate_global->__pyx_n_s_asGTF___reduce_cython
jpayne@69 5857 #define __pyx_n_s_asGTF___setstate_cython __pyx_mstate_global->__pyx_n_s_asGTF___setstate_cython
jpayne@69 5858 #define __pyx_n_s_asTuple __pyx_mstate_global->__pyx_n_s_asTuple
jpayne@69 5859 #define __pyx_n_u_asTuple __pyx_mstate_global->__pyx_n_u_asTuple
jpayne@69 5860 #define __pyx_n_s_asTuple___reduce_cython __pyx_mstate_global->__pyx_n_s_asTuple___reduce_cython
jpayne@69 5861 #define __pyx_n_s_asTuple___setstate_cython __pyx_mstate_global->__pyx_n_s_asTuple___setstate_cython
jpayne@69 5862 #define __pyx_n_s_asVCF __pyx_mstate_global->__pyx_n_s_asVCF
jpayne@69 5863 #define __pyx_n_u_asVCF __pyx_mstate_global->__pyx_n_u_asVCF
jpayne@69 5864 #define __pyx_n_s_asVCF___reduce_cython __pyx_mstate_global->__pyx_n_s_asVCF___reduce_cython
jpayne@69 5865 #define __pyx_n_s_asVCF___setstate_cython __pyx_mstate_global->__pyx_n_s_asVCF___setstate_cython
jpayne@69 5866 #define __pyx_n_u_ascii __pyx_mstate_global->__pyx_n_u_ascii
jpayne@69 5867 #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
jpayne@69 5868 #define __pyx_n_s_b __pyx_mstate_global->__pyx_n_s_b
jpayne@69 5869 #define __pyx_n_u_bcf __pyx_mstate_global->__pyx_n_u_bcf
jpayne@69 5870 #define __pyx_n_u_bed __pyx_mstate_global->__pyx_n_u_bed
jpayne@69 5871 #define __pyx_n_s_buffer __pyx_mstate_global->__pyx_n_s_buffer
jpayne@69 5872 #define __pyx_n_s_buffer_size __pyx_mstate_global->__pyx_n_s_buffer_size
jpayne@69 5873 #define __pyx_kp_u_building_of_index_for_failed __pyx_mstate_global->__pyx_kp_u_building_of_index_for_failed
jpayne@69 5874 #define __pyx_n_s_bytes_cpy __pyx_mstate_global->__pyx_n_s_bytes_cpy
jpayne@69 5875 #define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c
jpayne@69 5876 #define __pyx_n_s_cfilename __pyx_mstate_global->__pyx_n_s_cfilename
jpayne@69 5877 #define __pyx_n_s_cfilename_index __pyx_mstate_global->__pyx_n_s_cfilename_index
jpayne@69 5878 #define __pyx_n_s_cfn __pyx_mstate_global->__pyx_n_s_cfn
jpayne@69 5879 #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
jpayne@69 5880 #define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
jpayne@69 5881 #define __pyx_n_s_closed __pyx_mstate_global->__pyx_n_s_closed
jpayne@69 5882 #define __pyx_n_s_conf __pyx_mstate_global->__pyx_n_s_conf
jpayne@69 5883 #define __pyx_n_s_conf_data __pyx_mstate_global->__pyx_n_s_conf_data
jpayne@69 5884 #define __pyx_n_s_contigs __pyx_mstate_global->__pyx_n_s_contigs
jpayne@69 5885 #define __pyx_kp_u_could_not_create_iterator_for_re __pyx_mstate_global->__pyx_kp_u_could_not_create_iterator_for_re
jpayne@69 5886 #define __pyx_kp_u_could_not_create_iterator_possib __pyx_mstate_global->__pyx_kp_u_could_not_create_iterator_possib
jpayne@69 5887 #define __pyx_kp_u_could_not_load_tbi_csi_index_of __pyx_mstate_global->__pyx_kp_u_could_not_load_tbi_csi_index_of
jpayne@69 5888 #define __pyx_kp_u_could_not_open_file_s __pyx_mstate_global->__pyx_kp_u_could_not_open_file_s
jpayne@69 5889 #define __pyx_kp_u_could_not_open_for_reading_heade __pyx_mstate_global->__pyx_kp_u_could_not_open_for_reading_heade
jpayne@69 5890 #define __pyx_kp_u_could_not_open_index_for_s __pyx_mstate_global->__pyx_kp_u_could_not_open_index_for_s
jpayne@69 5891 #define __pyx_kp_u_could_not_open_s_for_reading __pyx_mstate_global->__pyx_kp_u_could_not_open_s_for_reading
jpayne@69 5892 #define __pyx_kp_u_could_not_open_s_for_writing __pyx_mstate_global->__pyx_kp_u_could_not_open_s_for_writing
jpayne@69 5893 #define __pyx_n_s_cpy __pyx_mstate_global->__pyx_n_s_cpy
jpayne@69 5894 #define __pyx_n_s_csi __pyx_mstate_global->__pyx_n_s_csi
jpayne@69 5895 #define __pyx_kp_u_csi_2 __pyx_mstate_global->__pyx_kp_u_csi_2
jpayne@69 5896 #define __pyx_n_s_cstr __pyx_mstate_global->__pyx_n_s_cstr
jpayne@69 5897 #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
jpayne@69 5898 #define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
jpayne@69 5899 #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
jpayne@69 5900 #define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
jpayne@69 5901 #define __pyx_n_s_dup __pyx_mstate_global->__pyx_n_s_dup
jpayne@69 5902 #define __pyx_kp_s_empty_iterator __pyx_mstate_global->__pyx_kp_s_empty_iterator
jpayne@69 5903 #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
jpayne@69 5904 #define __pyx_n_s_encoding __pyx_mstate_global->__pyx_n_s_encoding
jpayne@69 5905 #define __pyx_n_s_end __pyx_mstate_global->__pyx_n_s_end
jpayne@69 5906 #define __pyx_n_s_end_col __pyx_mstate_global->__pyx_n_s_end_col
jpayne@69 5907 #define __pyx_kp_u_end_out_of_range_i __pyx_mstate_global->__pyx_kp_u_end_out_of_range_i
jpayne@69 5908 #define __pyx_kp_u_error_i_when_closing_file_s __pyx_mstate_global->__pyx_kp_u_error_i_when_closing_file_s
jpayne@69 5909 #define __pyx_kp_u_error_i_when_writing_to_file_s __pyx_mstate_global->__pyx_kp_u_error_i_when_writing_to_file_s
jpayne@69 5910 #define __pyx_n_s_exists __pyx_mstate_global->__pyx_n_s_exists
jpayne@69 5911 #define __pyx_n_s_fd_src __pyx_mstate_global->__pyx_n_s_fd_src
jpayne@69 5912 #define __pyx_n_s_fetch __pyx_mstate_global->__pyx_n_s_fetch
jpayne@69 5913 #define __pyx_kp_u_file_s_not_found __pyx_mstate_global->__pyx_kp_u_file_s_not_found
jpayne@69 5914 #define __pyx_n_s_filename __pyx_mstate_global->__pyx_n_s_filename
jpayne@69 5915 #define __pyx_n_s_filename_in __pyx_mstate_global->__pyx_n_s_filename_in
jpayne@69 5916 #define __pyx_n_s_filename_index __pyx_mstate_global->__pyx_n_s_filename_index
jpayne@69 5917 #define __pyx_n_s_filename_out __pyx_mstate_global->__pyx_n_s_filename_out
jpayne@69 5918 #define __pyx_kp_u_filename_s_already_exists_use_fo __pyx_mstate_global->__pyx_kp_u_filename_s_already_exists_use_fo
jpayne@69 5919 #define __pyx_n_s_fileobj __pyx_mstate_global->__pyx_n_s_fileobj
jpayne@69 5920 #define __pyx_n_s_fmt __pyx_mstate_global->__pyx_n_s_fmt
jpayne@69 5921 #define __pyx_n_s_fn __pyx_mstate_global->__pyx_n_s_fn
jpayne@69 5922 #define __pyx_n_s_fn_index __pyx_mstate_global->__pyx_n_s_fn_index
jpayne@69 5923 #define __pyx_n_s_fnidx __pyx_mstate_global->__pyx_n_s_fnidx
jpayne@69 5924 #define __pyx_n_s_force __pyx_mstate_global->__pyx_n_s_force
jpayne@69 5925 #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
jpayne@69 5926 #define __pyx_n_s_fp __pyx_mstate_global->__pyx_n_s_fp
jpayne@69 5927 #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
jpayne@69 5928 #define __pyx_n_s_get_encoding __pyx_mstate_global->__pyx_n_s_get_encoding
jpayne@69 5929 #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
jpayne@69 5930 #define __pyx_n_u_gff __pyx_mstate_global->__pyx_n_u_gff
jpayne@69 5931 #define __pyx_kp_u_gz __pyx_mstate_global->__pyx_kp_u_gz
jpayne@69 5932 #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
jpayne@69 5933 #define __pyx_kp_u_incomplete_line_at_s __pyx_mstate_global->__pyx_kp_u_incomplete_line_at_s
jpayne@69 5934 #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
jpayne@69 5935 #define __pyx_kp_u_index_s_not_found __pyx_mstate_global->__pyx_kp_u_index_s_not_found
jpayne@69 5936 #define __pyx_n_s_infile __pyx_mstate_global->__pyx_n_s_infile
jpayne@69 5937 #define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
jpayne@69 5938 #define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
jpayne@69 5939 #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
jpayne@69 5940 #define __pyx_kp_u_invalid_file_opening_mode_s __pyx_mstate_global->__pyx_kp_u_invalid_file_opening_mode_s
jpayne@69 5941 #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
jpayne@69 5942 #define __pyx_n_s_is_empty __pyx_mstate_global->__pyx_n_s_is_empty
jpayne@69 5943 #define __pyx_n_s_is_open __pyx_mstate_global->__pyx_n_s_is_open
jpayne@69 5944 #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
jpayne@69 5945 #define __pyx_n_s_iter __pyx_mstate_global->__pyx_n_s_iter
jpayne@69 5946 #define __pyx_kp_s_iterate_over_infile_Permits_the __pyx_mstate_global->__pyx_kp_s_iterate_over_infile_Permits_the
jpayne@69 5947 #define __pyx_kp_u_iteration_on_closed_file __pyx_mstate_global->__pyx_kp_u_iteration_on_closed_file
jpayne@69 5948 #define __pyx_n_s_itr __pyx_mstate_global->__pyx_n_s_itr
jpayne@69 5949 #define __pyx_n_s_keep_original __pyx_mstate_global->__pyx_n_s_keep_original
jpayne@69 5950 #define __pyx_n_s_keys __pyx_mstate_global->__pyx_n_s_keys
jpayne@69 5951 #define __pyx_n_s_length __pyx_mstate_global->__pyx_n_s_length
jpayne@69 5952 #define __pyx_n_s_line __pyx_mstate_global->__pyx_n_s_line
jpayne@69 5953 #define __pyx_n_s_line_skip __pyx_mstate_global->__pyx_n_s_line_skip
jpayne@69 5954 #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
jpayne@69 5955 #define __pyx_n_s_meta_char __pyx_mstate_global->__pyx_n_s_meta_char
jpayne@69 5956 #define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
jpayne@69 5957 #define __pyx_n_s_min_shift __pyx_mstate_global->__pyx_n_s_min_shift
jpayne@69 5958 #define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
jpayne@69 5959 #define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
jpayne@69 5960 #define __pyx_n_s_multiple_iterators __pyx_mstate_global->__pyx_n_s_multiple_iterators
jpayne@69 5961 #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
jpayne@69 5962 #define __pyx_n_s_nbytes __pyx_mstate_global->__pyx_n_s_nbytes
jpayne@69 5963 #define __pyx_kp_u_neither_preset_nor_seq_col_start __pyx_mstate_global->__pyx_kp_u_neither_preset_nor_seq_col_start
jpayne@69 5964 #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
jpayne@69 5965 #define __pyx_n_s_next __pyx_mstate_global->__pyx_n_s_next
jpayne@69 5966 #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
jpayne@69 5967 #define __pyx_n_s_open __pyx_mstate_global->__pyx_n_s_open
jpayne@69 5968 #define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os
jpayne@69 5969 #define __pyx_kp_u_parse_method_of_s_not_implemente __pyx_mstate_global->__pyx_kp_u_parse_method_of_s_not_implemente
jpayne@69 5970 #define __pyx_n_s_parser __pyx_mstate_global->__pyx_n_s_parser
jpayne@69 5971 #define __pyx_n_s_path __pyx_mstate_global->__pyx_n_s_path
jpayne@69 5972 #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
jpayne@69 5973 #define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
jpayne@69 5974 #define __pyx_n_s_preset __pyx_mstate_global->__pyx_n_s_preset
jpayne@69 5975 #define __pyx_n_s_preset2conf __pyx_mstate_global->__pyx_n_s_preset2conf
jpayne@69 5976 #define __pyx_n_u_psltbl __pyx_mstate_global->__pyx_n_u_psltbl
jpayne@69 5977 #define __pyx_n_s_pysam_libctabix __pyx_mstate_global->__pyx_n_s_pysam_libctabix
jpayne@69 5978 #define __pyx_kp_s_pysam_libctabix_pyx __pyx_mstate_global->__pyx_kp_s_pysam_libctabix_pyx
jpayne@69 5979 #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
jpayne@69 5980 #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
jpayne@69 5981 #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
jpayne@69 5982 #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
jpayne@69 5983 #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
jpayne@69 5984 #define __pyx_n_s_pyx_unpickle_Parser __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Parser
jpayne@69 5985 #define __pyx_n_s_pyx_unpickle_asBed __pyx_mstate_global->__pyx_n_s_pyx_unpickle_asBed
jpayne@69 5986 #define __pyx_n_s_pyx_unpickle_asGFF3 __pyx_mstate_global->__pyx_n_s_pyx_unpickle_asGFF3
jpayne@69 5987 #define __pyx_n_s_pyx_unpickle_asGTF __pyx_mstate_global->__pyx_n_s_pyx_unpickle_asGTF
jpayne@69 5988 #define __pyx_n_s_pyx_unpickle_asTuple __pyx_mstate_global->__pyx_n_s_pyx_unpickle_asTuple
jpayne@69 5989 #define __pyx_n_s_pyx_unpickle_asVCF __pyx_mstate_global->__pyx_n_s_pyx_unpickle_asVCF
jpayne@69 5990 #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
jpayne@69 5991 #define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname
jpayne@69 5992 #define __pyx_n_s_r __pyx_mstate_global->__pyx_n_s_r
jpayne@69 5993 #define __pyx_n_u_r __pyx_mstate_global->__pyx_n_u_r
jpayne@69 5994 #define __pyx_n_s_readline __pyx_mstate_global->__pyx_n_s_readline
jpayne@69 5995 #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
jpayne@69 5996 #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
jpayne@69 5997 #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
jpayne@69 5998 #define __pyx_n_s_reference __pyx_mstate_global->__pyx_n_s_reference
jpayne@69 5999 #define __pyx_n_s_region __pyx_mstate_global->__pyx_n_s_region
jpayne@69 6000 #define __pyx_n_s_retval __pyx_mstate_global->__pyx_n_s_retval
jpayne@69 6001 #define __pyx_kp_u_s __pyx_mstate_global->__pyx_kp_u_s
jpayne@69 6002 #define __pyx_n_s_s_2 __pyx_mstate_global->__pyx_n_s_s_2
jpayne@69 6003 #define __pyx_kp_u_s_i __pyx_mstate_global->__pyx_kp_u_s_i
jpayne@69 6004 #define __pyx_kp_u_s_i_i __pyx_mstate_global->__pyx_kp_u_s_i_i
jpayne@69 6005 #define __pyx_n_u_sam __pyx_mstate_global->__pyx_n_u_sam
jpayne@69 6006 #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
jpayne@69 6007 #define __pyx_kp_s_self_gzipfile_self_kstream_canno __pyx_mstate_global->__pyx_kp_s_self_gzipfile_self_kstream_canno
jpayne@69 6008 #define __pyx_kp_s_self_iterator_cannot_be_converte __pyx_mstate_global->__pyx_kp_s_self_iterator_cannot_be_converte
jpayne@69 6009 #define __pyx_n_s_seq_col __pyx_mstate_global->__pyx_n_s_seq_col
jpayne@69 6010 #define __pyx_n_s_set_encoding __pyx_mstate_global->__pyx_n_s_set_encoding
jpayne@69 6011 #define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
jpayne@69 6012 #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
jpayne@69 6013 #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
jpayne@69 6014 #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
jpayne@69 6015 #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
jpayne@69 6016 #define __pyx_n_s_start_col __pyx_mstate_global->__pyx_n_s_start_col
jpayne@69 6017 #define __pyx_kp_u_start_i_end_i __pyx_mstate_global->__pyx_kp_u_start_i_end_i
jpayne@69 6018 #define __pyx_kp_u_start_out_of_range_i __pyx_mstate_global->__pyx_kp_u_start_out_of_range_i
jpayne@69 6019 #define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
jpayne@69 6020 #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
jpayne@69 6021 #define __pyx_n_s_suffix __pyx_mstate_global->__pyx_n_s_suffix
jpayne@69 6022 #define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
jpayne@69 6023 #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
jpayne@69 6024 #define __pyx_n_s_tabix_compress __pyx_mstate_global->__pyx_n_s_tabix_compress
jpayne@69 6025 #define __pyx_n_u_tabix_compress __pyx_mstate_global->__pyx_n_u_tabix_compress
jpayne@69 6026 #define __pyx_n_s_tabix_file_iterator __pyx_mstate_global->__pyx_n_s_tabix_file_iterator
jpayne@69 6027 #define __pyx_n_u_tabix_file_iterator __pyx_mstate_global->__pyx_n_u_tabix_file_iterator
jpayne@69 6028 #define __pyx_n_s_tabix_file_iterator___reduce_cyt __pyx_mstate_global->__pyx_n_s_tabix_file_iterator___reduce_cyt
jpayne@69 6029 #define __pyx_n_s_tabix_file_iterator___setstate_c __pyx_mstate_global->__pyx_n_s_tabix_file_iterator___setstate_c
jpayne@69 6030 #define __pyx_n_s_tabix_generic_iterator __pyx_mstate_global->__pyx_n_s_tabix_generic_iterator
jpayne@69 6031 #define __pyx_n_u_tabix_generic_iterator __pyx_mstate_global->__pyx_n_u_tabix_generic_iterator
jpayne@69 6032 #define __pyx_n_s_tabix_generic_iterator___init __pyx_mstate_global->__pyx_n_s_tabix_generic_iterator___init
jpayne@69 6033 #define __pyx_n_s_tabix_generic_iterator___iter __pyx_mstate_global->__pyx_n_s_tabix_generic_iterator___iter
jpayne@69 6034 #define __pyx_n_s_tabix_generic_iterator___next __pyx_mstate_global->__pyx_n_s_tabix_generic_iterator___next
jpayne@69 6035 #define __pyx_n_s_tabix_index __pyx_mstate_global->__pyx_n_s_tabix_index
jpayne@69 6036 #define __pyx_n_u_tabix_index __pyx_mstate_global->__pyx_n_u_tabix_index
jpayne@69 6037 #define __pyx_n_s_tabix_iterator __pyx_mstate_global->__pyx_n_s_tabix_iterator
jpayne@69 6038 #define __pyx_n_u_tabix_iterator __pyx_mstate_global->__pyx_n_u_tabix_iterator
jpayne@69 6039 #define __pyx_kp_u_tbi __pyx_mstate_global->__pyx_kp_u_tbi
jpayne@69 6040 #define __pyx_n_s_tell __pyx_mstate_global->__pyx_n_s_tell
jpayne@69 6041 #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
jpayne@69 6042 #define __pyx_n_s_threads __pyx_mstate_global->__pyx_n_s_threads
jpayne@69 6043 #define __pyx_kp_u_unknown_preset __pyx_mstate_global->__pyx_kp_u_unknown_preset
jpayne@69 6044 #define __pyx_n_s_unlink __pyx_mstate_global->__pyx_n_s_unlink
jpayne@69 6045 #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
jpayne@69 6046 #define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
jpayne@69 6047 #define __pyx_kp_u_valid_presets_are __pyx_mstate_global->__pyx_kp_u_valid_presets_are
jpayne@69 6048 #define __pyx_n_u_vcf __pyx_mstate_global->__pyx_n_u_vcf
jpayne@69 6049 #define __pyx_kp_u_writing_failed __pyx_mstate_global->__pyx_kp_u_writing_failed
jpayne@69 6050 #define __pyx_n_s_zerobased __pyx_mstate_global->__pyx_n_s_zerobased
jpayne@69 6051 #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
jpayne@69 6052 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
jpayne@69 6053 #define __pyx_int_2 __pyx_mstate_global->__pyx_int_2
jpayne@69 6054 #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
jpayne@69 6055 #define __pyx_int_4 __pyx_mstate_global->__pyx_int_4
jpayne@69 6056 #define __pyx_int_5 __pyx_mstate_global->__pyx_int_5
jpayne@69 6057 #define __pyx_int_15 __pyx_mstate_global->__pyx_int_15
jpayne@69 6058 #define __pyx_int_17 __pyx_mstate_global->__pyx_int_17
jpayne@69 6059 #define __pyx_int_18 __pyx_mstate_global->__pyx_int_18
jpayne@69 6060 #define __pyx_int_35 __pyx_mstate_global->__pyx_int_35
jpayne@69 6061 #define __pyx_int_64 __pyx_mstate_global->__pyx_int_64
jpayne@69 6062 #define __pyx_int_21667264 __pyx_mstate_global->__pyx_int_21667264
jpayne@69 6063 #define __pyx_int_139192863 __pyx_mstate_global->__pyx_int_139192863
jpayne@69 6064 #define __pyx_int_243541226 __pyx_mstate_global->__pyx_int_243541226
jpayne@69 6065 #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
jpayne@69 6066 #define __pyx_codeobj_ __pyx_mstate_global->__pyx_codeobj_
jpayne@69 6067 #define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19
jpayne@69 6068 #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
jpayne@69 6069 #define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
jpayne@69 6070 #define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38
jpayne@69 6071 #define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41
jpayne@69 6072 #define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45
jpayne@69 6073 #define __pyx_tuple__55 __pyx_mstate_global->__pyx_tuple__55
jpayne@69 6074 #define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
jpayne@69 6075 #define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64
jpayne@69 6076 #define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65
jpayne@69 6077 #define __pyx_tuple__66 __pyx_mstate_global->__pyx_tuple__66
jpayne@69 6078 #define __pyx_tuple__67 __pyx_mstate_global->__pyx_tuple__67
jpayne@69 6079 #define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68
jpayne@69 6080 #define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69
jpayne@69 6081 #define __pyx_tuple__70 __pyx_mstate_global->__pyx_tuple__70
jpayne@69 6082 #define __pyx_tuple__71 __pyx_mstate_global->__pyx_tuple__71
jpayne@69 6083 #define __pyx_tuple__72 __pyx_mstate_global->__pyx_tuple__72
jpayne@69 6084 #define __pyx_tuple__73 __pyx_mstate_global->__pyx_tuple__73
jpayne@69 6085 #define __pyx_tuple__74 __pyx_mstate_global->__pyx_tuple__74
jpayne@69 6086 #define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75
jpayne@69 6087 #define __pyx_tuple__76 __pyx_mstate_global->__pyx_tuple__76
jpayne@69 6088 #define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77
jpayne@69 6089 #define __pyx_codeobj__2 __pyx_mstate_global->__pyx_codeobj__2
jpayne@69 6090 #define __pyx_codeobj__3 __pyx_mstate_global->__pyx_codeobj__3
jpayne@69 6091 #define __pyx_codeobj__4 __pyx_mstate_global->__pyx_codeobj__4
jpayne@69 6092 #define __pyx_codeobj__5 __pyx_mstate_global->__pyx_codeobj__5
jpayne@69 6093 #define __pyx_codeobj__6 __pyx_mstate_global->__pyx_codeobj__6
jpayne@69 6094 #define __pyx_codeobj__7 __pyx_mstate_global->__pyx_codeobj__7
jpayne@69 6095 #define __pyx_codeobj__8 __pyx_mstate_global->__pyx_codeobj__8
jpayne@69 6096 #define __pyx_codeobj__9 __pyx_mstate_global->__pyx_codeobj__9
jpayne@69 6097 #define __pyx_codeobj__10 __pyx_mstate_global->__pyx_codeobj__10
jpayne@69 6098 #define __pyx_codeobj__11 __pyx_mstate_global->__pyx_codeobj__11
jpayne@69 6099 #define __pyx_codeobj__12 __pyx_mstate_global->__pyx_codeobj__12
jpayne@69 6100 #define __pyx_codeobj__13 __pyx_mstate_global->__pyx_codeobj__13
jpayne@69 6101 #define __pyx_codeobj__14 __pyx_mstate_global->__pyx_codeobj__14
jpayne@69 6102 #define __pyx_codeobj__15 __pyx_mstate_global->__pyx_codeobj__15
jpayne@69 6103 #define __pyx_codeobj__17 __pyx_mstate_global->__pyx_codeobj__17
jpayne@69 6104 #define __pyx_codeobj__18 __pyx_mstate_global->__pyx_codeobj__18
jpayne@69 6105 #define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21
jpayne@69 6106 #define __pyx_codeobj__22 __pyx_mstate_global->__pyx_codeobj__22
jpayne@69 6107 #define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23
jpayne@69 6108 #define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25
jpayne@69 6109 #define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26
jpayne@69 6110 #define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27
jpayne@69 6111 #define __pyx_codeobj__28 __pyx_mstate_global->__pyx_codeobj__28
jpayne@69 6112 #define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29
jpayne@69 6113 #define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30
jpayne@69 6114 #define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31
jpayne@69 6115 #define __pyx_codeobj__32 __pyx_mstate_global->__pyx_codeobj__32
jpayne@69 6116 #define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33
jpayne@69 6117 #define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34
jpayne@69 6118 #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35
jpayne@69 6119 #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36
jpayne@69 6120 #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37
jpayne@69 6121 #define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40
jpayne@69 6122 #define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46
jpayne@69 6123 #define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47
jpayne@69 6124 #define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48
jpayne@69 6125 #define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49
jpayne@69 6126 #define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50
jpayne@69 6127 #define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51
jpayne@69 6128 #define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52
jpayne@69 6129 #define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53
jpayne@69 6130 #define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54
jpayne@69 6131 #define __pyx_codeobj__57 __pyx_mstate_global->__pyx_codeobj__57
jpayne@69 6132 #define __pyx_codeobj__58 __pyx_mstate_global->__pyx_codeobj__58
jpayne@69 6133 #define __pyx_codeobj__59 __pyx_mstate_global->__pyx_codeobj__59
jpayne@69 6134 #define __pyx_codeobj__60 __pyx_mstate_global->__pyx_codeobj__60
jpayne@69 6135 #define __pyx_codeobj__61 __pyx_mstate_global->__pyx_codeobj__61
jpayne@69 6136 /* #### Code section: module_code ### */
jpayne@69 6137
jpayne@69 6138 /* "cpython/complex.pxd":19
jpayne@69 6139 *
jpayne@69 6140 * @property
jpayne@69 6141 * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 6142 * return self.cval.real
jpayne@69 6143 *
jpayne@69 6144 */
jpayne@69 6145
jpayne@69 6146 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) {
jpayne@69 6147 double __pyx_r;
jpayne@69 6148
jpayne@69 6149 /* "cpython/complex.pxd":20
jpayne@69 6150 * @property
jpayne@69 6151 * cdef inline double real(self) noexcept:
jpayne@69 6152 * return self.cval.real # <<<<<<<<<<<<<<
jpayne@69 6153 *
jpayne@69 6154 * @property
jpayne@69 6155 */
jpayne@69 6156 __pyx_r = __pyx_v_self->cval.real;
jpayne@69 6157 goto __pyx_L0;
jpayne@69 6158
jpayne@69 6159 /* "cpython/complex.pxd":19
jpayne@69 6160 *
jpayne@69 6161 * @property
jpayne@69 6162 * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 6163 * return self.cval.real
jpayne@69 6164 *
jpayne@69 6165 */
jpayne@69 6166
jpayne@69 6167 /* function exit code */
jpayne@69 6168 __pyx_L0:;
jpayne@69 6169 return __pyx_r;
jpayne@69 6170 }
jpayne@69 6171
jpayne@69 6172 /* "cpython/complex.pxd":23
jpayne@69 6173 *
jpayne@69 6174 * @property
jpayne@69 6175 * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 6176 * return self.cval.imag
jpayne@69 6177 *
jpayne@69 6178 */
jpayne@69 6179
jpayne@69 6180 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) {
jpayne@69 6181 double __pyx_r;
jpayne@69 6182
jpayne@69 6183 /* "cpython/complex.pxd":24
jpayne@69 6184 * @property
jpayne@69 6185 * cdef inline double imag(self) noexcept:
jpayne@69 6186 * return self.cval.imag # <<<<<<<<<<<<<<
jpayne@69 6187 *
jpayne@69 6188 * # PyTypeObject PyComplex_Type
jpayne@69 6189 */
jpayne@69 6190 __pyx_r = __pyx_v_self->cval.imag;
jpayne@69 6191 goto __pyx_L0;
jpayne@69 6192
jpayne@69 6193 /* "cpython/complex.pxd":23
jpayne@69 6194 *
jpayne@69 6195 * @property
jpayne@69 6196 * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 6197 * return self.cval.imag
jpayne@69 6198 *
jpayne@69 6199 */
jpayne@69 6200
jpayne@69 6201 /* function exit code */
jpayne@69 6202 __pyx_L0:;
jpayne@69 6203 return __pyx_r;
jpayne@69 6204 }
jpayne@69 6205
jpayne@69 6206 /* "cpython/contextvars.pxd":112
jpayne@69 6207 *
jpayne@69 6208 *
jpayne@69 6209 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 6210 * """Return a new reference to the value of the context variable,
jpayne@69 6211 * or the default value of the context variable,
jpayne@69 6212 */
jpayne@69 6213
jpayne@69 6214 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) {
jpayne@69 6215 PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
jpayne@69 6216 PyObject *__pyx_v_value;
jpayne@69 6217 PyObject *__pyx_v_pyvalue = NULL;
jpayne@69 6218 PyObject *__pyx_r = NULL;
jpayne@69 6219 __Pyx_RefNannyDeclarations
jpayne@69 6220 int __pyx_t_1;
jpayne@69 6221 int __pyx_t_2;
jpayne@69 6222 PyObject *__pyx_t_3 = NULL;
jpayne@69 6223 int __pyx_lineno = 0;
jpayne@69 6224 const char *__pyx_filename = NULL;
jpayne@69 6225 int __pyx_clineno = 0;
jpayne@69 6226 __Pyx_RefNannySetupContext("get_value", 1);
jpayne@69 6227 if (__pyx_optional_args) {
jpayne@69 6228 if (__pyx_optional_args->__pyx_n > 0) {
jpayne@69 6229 __pyx_v_default_value = __pyx_optional_args->default_value;
jpayne@69 6230 }
jpayne@69 6231 }
jpayne@69 6232
jpayne@69 6233 /* "cpython/contextvars.pxd":117
jpayne@69 6234 * or None if no such value or default was found.
jpayne@69 6235 * """
jpayne@69 6236 * cdef PyObject *value = NULL # <<<<<<<<<<<<<<
jpayne@69 6237 * PyContextVar_Get(var, NULL, &value)
jpayne@69 6238 * if value is NULL:
jpayne@69 6239 */
jpayne@69 6240 __pyx_v_value = NULL;
jpayne@69 6241
jpayne@69 6242 /* "cpython/contextvars.pxd":118
jpayne@69 6243 * """
jpayne@69 6244 * cdef PyObject *value = NULL
jpayne@69 6245 * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<<
jpayne@69 6246 * if value is NULL:
jpayne@69 6247 * # context variable does not have a default
jpayne@69 6248 */
jpayne@69 6249 __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)
jpayne@69 6250
jpayne@69 6251 /* "cpython/contextvars.pxd":119
jpayne@69 6252 * cdef PyObject *value = NULL
jpayne@69 6253 * PyContextVar_Get(var, NULL, &value)
jpayne@69 6254 * if value is NULL: # <<<<<<<<<<<<<<
jpayne@69 6255 * # context variable does not have a default
jpayne@69 6256 * pyvalue = default_value
jpayne@69 6257 */
jpayne@69 6258 __pyx_t_2 = (__pyx_v_value == NULL);
jpayne@69 6259 if (__pyx_t_2) {
jpayne@69 6260
jpayne@69 6261 /* "cpython/contextvars.pxd":121
jpayne@69 6262 * if value is NULL:
jpayne@69 6263 * # context variable does not have a default
jpayne@69 6264 * pyvalue = default_value # <<<<<<<<<<<<<<
jpayne@69 6265 * else:
jpayne@69 6266 * # value or default value of context variable
jpayne@69 6267 */
jpayne@69 6268 __Pyx_INCREF(__pyx_v_default_value);
jpayne@69 6269 __pyx_v_pyvalue = __pyx_v_default_value;
jpayne@69 6270
jpayne@69 6271 /* "cpython/contextvars.pxd":119
jpayne@69 6272 * cdef PyObject *value = NULL
jpayne@69 6273 * PyContextVar_Get(var, NULL, &value)
jpayne@69 6274 * if value is NULL: # <<<<<<<<<<<<<<
jpayne@69 6275 * # context variable does not have a default
jpayne@69 6276 * pyvalue = default_value
jpayne@69 6277 */
jpayne@69 6278 goto __pyx_L3;
jpayne@69 6279 }
jpayne@69 6280
jpayne@69 6281 /* "cpython/contextvars.pxd":124
jpayne@69 6282 * else:
jpayne@69 6283 * # value or default value of context variable
jpayne@69 6284 * pyvalue = <object>value # <<<<<<<<<<<<<<
jpayne@69 6285 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@69 6286 * return pyvalue
jpayne@69 6287 */
jpayne@69 6288 /*else*/ {
jpayne@69 6289 __pyx_t_3 = ((PyObject *)__pyx_v_value);
jpayne@69 6290 __Pyx_INCREF(__pyx_t_3);
jpayne@69 6291 __pyx_v_pyvalue = __pyx_t_3;
jpayne@69 6292 __pyx_t_3 = 0;
jpayne@69 6293
jpayne@69 6294 /* "cpython/contextvars.pxd":125
jpayne@69 6295 * # value or default value of context variable
jpayne@69 6296 * pyvalue = <object>value
jpayne@69 6297 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<<
jpayne@69 6298 * return pyvalue
jpayne@69 6299 *
jpayne@69 6300 */
jpayne@69 6301 Py_XDECREF(__pyx_v_value);
jpayne@69 6302 }
jpayne@69 6303 __pyx_L3:;
jpayne@69 6304
jpayne@69 6305 /* "cpython/contextvars.pxd":126
jpayne@69 6306 * pyvalue = <object>value
jpayne@69 6307 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@69 6308 * return pyvalue # <<<<<<<<<<<<<<
jpayne@69 6309 *
jpayne@69 6310 *
jpayne@69 6311 */
jpayne@69 6312 __Pyx_XDECREF(__pyx_r);
jpayne@69 6313 __Pyx_INCREF(__pyx_v_pyvalue);
jpayne@69 6314 __pyx_r = __pyx_v_pyvalue;
jpayne@69 6315 goto __pyx_L0;
jpayne@69 6316
jpayne@69 6317 /* "cpython/contextvars.pxd":112
jpayne@69 6318 *
jpayne@69 6319 *
jpayne@69 6320 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 6321 * """Return a new reference to the value of the context variable,
jpayne@69 6322 * or the default value of the context variable,
jpayne@69 6323 */
jpayne@69 6324
jpayne@69 6325 /* function exit code */
jpayne@69 6326 __pyx_L1_error:;
jpayne@69 6327 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 6328 __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 6329 __pyx_r = 0;
jpayne@69 6330 __pyx_L0:;
jpayne@69 6331 __Pyx_XDECREF(__pyx_v_pyvalue);
jpayne@69 6332 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 6333 __Pyx_RefNannyFinishContext();
jpayne@69 6334 return __pyx_r;
jpayne@69 6335 }
jpayne@69 6336
jpayne@69 6337 /* "cpython/contextvars.pxd":129
jpayne@69 6338 *
jpayne@69 6339 *
jpayne@69 6340 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 6341 * """Return a new reference to the value of the context variable,
jpayne@69 6342 * or the provided default value if no such value was found.
jpayne@69 6343 */
jpayne@69 6344
jpayne@69 6345 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) {
jpayne@69 6346 PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
jpayne@69 6347 PyObject *__pyx_v_value;
jpayne@69 6348 PyObject *__pyx_v_pyvalue = NULL;
jpayne@69 6349 PyObject *__pyx_r = NULL;
jpayne@69 6350 __Pyx_RefNannyDeclarations
jpayne@69 6351 int __pyx_t_1;
jpayne@69 6352 PyObject *__pyx_t_2 = NULL;
jpayne@69 6353 int __pyx_lineno = 0;
jpayne@69 6354 const char *__pyx_filename = NULL;
jpayne@69 6355 int __pyx_clineno = 0;
jpayne@69 6356 __Pyx_RefNannySetupContext("get_value_no_default", 1);
jpayne@69 6357 if (__pyx_optional_args) {
jpayne@69 6358 if (__pyx_optional_args->__pyx_n > 0) {
jpayne@69 6359 __pyx_v_default_value = __pyx_optional_args->default_value;
jpayne@69 6360 }
jpayne@69 6361 }
jpayne@69 6362
jpayne@69 6363 /* "cpython/contextvars.pxd":135
jpayne@69 6364 * Ignores the default value of the context variable, if any.
jpayne@69 6365 * """
jpayne@69 6366 * cdef PyObject *value = NULL # <<<<<<<<<<<<<<
jpayne@69 6367 * PyContextVar_Get(var, <PyObject*>default_value, &value)
jpayne@69 6368 * # value of context variable or 'default_value'
jpayne@69 6369 */
jpayne@69 6370 __pyx_v_value = NULL;
jpayne@69 6371
jpayne@69 6372 /* "cpython/contextvars.pxd":136
jpayne@69 6373 * """
jpayne@69 6374 * cdef PyObject *value = NULL
jpayne@69 6375 * PyContextVar_Get(var, <PyObject*>default_value, &value) # <<<<<<<<<<<<<<
jpayne@69 6376 * # value of context variable or 'default_value'
jpayne@69 6377 * pyvalue = <object>value
jpayne@69 6378 */
jpayne@69 6379 __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)
jpayne@69 6380
jpayne@69 6381 /* "cpython/contextvars.pxd":138
jpayne@69 6382 * PyContextVar_Get(var, <PyObject*>default_value, &value)
jpayne@69 6383 * # value of context variable or 'default_value'
jpayne@69 6384 * pyvalue = <object>value # <<<<<<<<<<<<<<
jpayne@69 6385 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@69 6386 * return pyvalue
jpayne@69 6387 */
jpayne@69 6388 __pyx_t_2 = ((PyObject *)__pyx_v_value);
jpayne@69 6389 __Pyx_INCREF(__pyx_t_2);
jpayne@69 6390 __pyx_v_pyvalue = __pyx_t_2;
jpayne@69 6391 __pyx_t_2 = 0;
jpayne@69 6392
jpayne@69 6393 /* "cpython/contextvars.pxd":139
jpayne@69 6394 * # value of context variable or 'default_value'
jpayne@69 6395 * pyvalue = <object>value
jpayne@69 6396 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<<
jpayne@69 6397 * return pyvalue
jpayne@69 6398 */
jpayne@69 6399 Py_XDECREF(__pyx_v_value);
jpayne@69 6400
jpayne@69 6401 /* "cpython/contextvars.pxd":140
jpayne@69 6402 * pyvalue = <object>value
jpayne@69 6403 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@69 6404 * return pyvalue # <<<<<<<<<<<<<<
jpayne@69 6405 */
jpayne@69 6406 __Pyx_XDECREF(__pyx_r);
jpayne@69 6407 __Pyx_INCREF(__pyx_v_pyvalue);
jpayne@69 6408 __pyx_r = __pyx_v_pyvalue;
jpayne@69 6409 goto __pyx_L0;
jpayne@69 6410
jpayne@69 6411 /* "cpython/contextvars.pxd":129
jpayne@69 6412 *
jpayne@69 6413 *
jpayne@69 6414 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 6415 * """Return a new reference to the value of the context variable,
jpayne@69 6416 * or the provided default value if no such value was found.
jpayne@69 6417 */
jpayne@69 6418
jpayne@69 6419 /* function exit code */
jpayne@69 6420 __pyx_L1_error:;
jpayne@69 6421 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 6422 __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 6423 __pyx_r = 0;
jpayne@69 6424 __pyx_L0:;
jpayne@69 6425 __Pyx_XDECREF(__pyx_v_pyvalue);
jpayne@69 6426 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 6427 __Pyx_RefNannyFinishContext();
jpayne@69 6428 return __pyx_r;
jpayne@69 6429 }
jpayne@69 6430
jpayne@69 6431 /* "array.pxd":104
jpayne@69 6432 * __data_union data
jpayne@69 6433 *
jpayne@69 6434 * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
jpayne@69 6435 * # This implementation of getbuffer is geared towards Cython
jpayne@69 6436 * # requirements, and does not yet fulfill the PEP.
jpayne@69 6437 */
jpayne@69 6438
jpayne@69 6439 /* Python wrapper */
jpayne@69 6440 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*/
jpayne@69 6441 CYTHON_UNUSED static int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
jpayne@69 6442 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 6443 int __pyx_r;
jpayne@69 6444 __Pyx_RefNannyDeclarations
jpayne@69 6445 __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
jpayne@69 6446 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 6447 __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
jpayne@69 6448
jpayne@69 6449 /* function exit code */
jpayne@69 6450 __Pyx_RefNannyFinishContext();
jpayne@69 6451 return __pyx_r;
jpayne@69 6452 }
jpayne@69 6453
jpayne@69 6454 static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags) {
jpayne@69 6455 PyObject *__pyx_v_item_count = NULL;
jpayne@69 6456 int __pyx_r;
jpayne@69 6457 __Pyx_RefNannyDeclarations
jpayne@69 6458 PyObject *__pyx_t_1 = NULL;
jpayne@69 6459 char *__pyx_t_2;
jpayne@69 6460 int __pyx_t_3;
jpayne@69 6461 PyObject *__pyx_t_4 = NULL;
jpayne@69 6462 Py_ssize_t __pyx_t_5;
jpayne@69 6463 int __pyx_t_6;
jpayne@69 6464 char __pyx_t_7;
jpayne@69 6465 int __pyx_lineno = 0;
jpayne@69 6466 const char *__pyx_filename = NULL;
jpayne@69 6467 int __pyx_clineno = 0;
jpayne@69 6468 if (unlikely(__pyx_v_info == NULL)) {
jpayne@69 6469 PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
jpayne@69 6470 return -1;
jpayne@69 6471 }
jpayne@69 6472 __Pyx_RefNannySetupContext("__getbuffer__", 0);
jpayne@69 6473 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 6474 __Pyx_GIVEREF(__pyx_v_info->obj);
jpayne@69 6475
jpayne@69 6476 /* "array.pxd":109
jpayne@69 6477 * # In particular strided access is always provided regardless
jpayne@69 6478 * # of flags
jpayne@69 6479 * item_count = Py_SIZE(self) # <<<<<<<<<<<<<<
jpayne@69 6480 *
jpayne@69 6481 * info.suboffsets = NULL
jpayne@69 6482 */
jpayne@69 6483 __pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 109, __pyx_L1_error)
jpayne@69 6484 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 6485 __pyx_v_item_count = __pyx_t_1;
jpayne@69 6486 __pyx_t_1 = 0;
jpayne@69 6487
jpayne@69 6488 /* "array.pxd":111
jpayne@69 6489 * item_count = Py_SIZE(self)
jpayne@69 6490 *
jpayne@69 6491 * info.suboffsets = NULL # <<<<<<<<<<<<<<
jpayne@69 6492 * info.buf = self.data.as_chars
jpayne@69 6493 * info.readonly = 0
jpayne@69 6494 */
jpayne@69 6495 __pyx_v_info->suboffsets = NULL;
jpayne@69 6496
jpayne@69 6497 /* "array.pxd":112
jpayne@69 6498 *
jpayne@69 6499 * info.suboffsets = NULL
jpayne@69 6500 * info.buf = self.data.as_chars # <<<<<<<<<<<<<<
jpayne@69 6501 * info.readonly = 0
jpayne@69 6502 * info.ndim = 1
jpayne@69 6503 */
jpayne@69 6504 __pyx_t_2 = __pyx_v_self->data.as_chars;
jpayne@69 6505 __pyx_v_info->buf = __pyx_t_2;
jpayne@69 6506
jpayne@69 6507 /* "array.pxd":113
jpayne@69 6508 * info.suboffsets = NULL
jpayne@69 6509 * info.buf = self.data.as_chars
jpayne@69 6510 * info.readonly = 0 # <<<<<<<<<<<<<<
jpayne@69 6511 * info.ndim = 1
jpayne@69 6512 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
jpayne@69 6513 */
jpayne@69 6514 __pyx_v_info->readonly = 0;
jpayne@69 6515
jpayne@69 6516 /* "array.pxd":114
jpayne@69 6517 * info.buf = self.data.as_chars
jpayne@69 6518 * info.readonly = 0
jpayne@69 6519 * info.ndim = 1 # <<<<<<<<<<<<<<
jpayne@69 6520 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
jpayne@69 6521 * info.len = info.itemsize * item_count
jpayne@69 6522 */
jpayne@69 6523 __pyx_v_info->ndim = 1;
jpayne@69 6524
jpayne@69 6525 /* "array.pxd":115
jpayne@69 6526 * info.readonly = 0
jpayne@69 6527 * info.ndim = 1
jpayne@69 6528 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) # <<<<<<<<<<<<<<
jpayne@69 6529 * info.len = info.itemsize * item_count
jpayne@69 6530 *
jpayne@69 6531 */
jpayne@69 6532 __pyx_t_3 = __pyx_v_self->ob_descr->itemsize;
jpayne@69 6533 __pyx_v_info->itemsize = __pyx_t_3;
jpayne@69 6534
jpayne@69 6535 /* "array.pxd":116
jpayne@69 6536 * info.ndim = 1
jpayne@69 6537 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
jpayne@69 6538 * info.len = info.itemsize * item_count # <<<<<<<<<<<<<<
jpayne@69 6539 *
jpayne@69 6540 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@69 6541 */
jpayne@69 6542 __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 116, __pyx_L1_error)
jpayne@69 6543 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 6544 __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 116, __pyx_L1_error)
jpayne@69 6545 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 6546 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 6547 __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)
jpayne@69 6548 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 6549 __pyx_v_info->len = __pyx_t_5;
jpayne@69 6550
jpayne@69 6551 /* "array.pxd":118
jpayne@69 6552 * info.len = info.itemsize * item_count
jpayne@69 6553 *
jpayne@69 6554 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2) # <<<<<<<<<<<<<<
jpayne@69 6555 * if not info.shape:
jpayne@69 6556 * raise MemoryError()
jpayne@69 6557 */
jpayne@69 6558 __pyx_v_info->shape = ((Py_ssize_t *)PyObject_Malloc(((sizeof(Py_ssize_t)) + 2)));
jpayne@69 6559
jpayne@69 6560 /* "array.pxd":119
jpayne@69 6561 *
jpayne@69 6562 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@69 6563 * if not info.shape: # <<<<<<<<<<<<<<
jpayne@69 6564 * raise MemoryError()
jpayne@69 6565 * info.shape[0] = item_count # constant regardless of resizing
jpayne@69 6566 */
jpayne@69 6567 __pyx_t_6 = (!(__pyx_v_info->shape != 0));
jpayne@69 6568 if (unlikely(__pyx_t_6)) {
jpayne@69 6569
jpayne@69 6570 /* "array.pxd":120
jpayne@69 6571 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@69 6572 * if not info.shape:
jpayne@69 6573 * raise MemoryError() # <<<<<<<<<<<<<<
jpayne@69 6574 * info.shape[0] = item_count # constant regardless of resizing
jpayne@69 6575 * info.strides = &info.itemsize
jpayne@69 6576 */
jpayne@69 6577 PyErr_NoMemory(); __PYX_ERR(3, 120, __pyx_L1_error)
jpayne@69 6578
jpayne@69 6579 /* "array.pxd":119
jpayne@69 6580 *
jpayne@69 6581 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@69 6582 * if not info.shape: # <<<<<<<<<<<<<<
jpayne@69 6583 * raise MemoryError()
jpayne@69 6584 * info.shape[0] = item_count # constant regardless of resizing
jpayne@69 6585 */
jpayne@69 6586 }
jpayne@69 6587
jpayne@69 6588 /* "array.pxd":121
jpayne@69 6589 * if not info.shape:
jpayne@69 6590 * raise MemoryError()
jpayne@69 6591 * info.shape[0] = item_count # constant regardless of resizing # <<<<<<<<<<<<<<
jpayne@69 6592 * info.strides = &info.itemsize
jpayne@69 6593 *
jpayne@69 6594 */
jpayne@69 6595 __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)
jpayne@69 6596 (__pyx_v_info->shape[0]) = __pyx_t_5;
jpayne@69 6597
jpayne@69 6598 /* "array.pxd":122
jpayne@69 6599 * raise MemoryError()
jpayne@69 6600 * info.shape[0] = item_count # constant regardless of resizing
jpayne@69 6601 * info.strides = &info.itemsize # <<<<<<<<<<<<<<
jpayne@69 6602 *
jpayne@69 6603 * info.format = <char*> (info.shape + 1)
jpayne@69 6604 */
jpayne@69 6605 __pyx_v_info->strides = (&__pyx_v_info->itemsize);
jpayne@69 6606
jpayne@69 6607 /* "array.pxd":124
jpayne@69 6608 * info.strides = &info.itemsize
jpayne@69 6609 *
jpayne@69 6610 * info.format = <char*> (info.shape + 1) # <<<<<<<<<<<<<<
jpayne@69 6611 * info.format[0] = self.ob_descr.typecode
jpayne@69 6612 * info.format[1] = 0
jpayne@69 6613 */
jpayne@69 6614 __pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1));
jpayne@69 6615
jpayne@69 6616 /* "array.pxd":125
jpayne@69 6617 *
jpayne@69 6618 * info.format = <char*> (info.shape + 1)
jpayne@69 6619 * info.format[0] = self.ob_descr.typecode # <<<<<<<<<<<<<<
jpayne@69 6620 * info.format[1] = 0
jpayne@69 6621 * info.obj = self
jpayne@69 6622 */
jpayne@69 6623 __pyx_t_7 = __pyx_v_self->ob_descr->typecode;
jpayne@69 6624 (__pyx_v_info->format[0]) = __pyx_t_7;
jpayne@69 6625
jpayne@69 6626 /* "array.pxd":126
jpayne@69 6627 * info.format = <char*> (info.shape + 1)
jpayne@69 6628 * info.format[0] = self.ob_descr.typecode
jpayne@69 6629 * info.format[1] = 0 # <<<<<<<<<<<<<<
jpayne@69 6630 * info.obj = self
jpayne@69 6631 *
jpayne@69 6632 */
jpayne@69 6633 (__pyx_v_info->format[1]) = 0;
jpayne@69 6634
jpayne@69 6635 /* "array.pxd":127
jpayne@69 6636 * info.format[0] = self.ob_descr.typecode
jpayne@69 6637 * info.format[1] = 0
jpayne@69 6638 * info.obj = self # <<<<<<<<<<<<<<
jpayne@69 6639 *
jpayne@69 6640 * def __releasebuffer__(self, Py_buffer* info):
jpayne@69 6641 */
jpayne@69 6642 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@69 6643 __Pyx_GIVEREF((PyObject *)__pyx_v_self);
jpayne@69 6644 __Pyx_GOTREF(__pyx_v_info->obj);
jpayne@69 6645 __Pyx_DECREF(__pyx_v_info->obj);
jpayne@69 6646 __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
jpayne@69 6647
jpayne@69 6648 /* "array.pxd":104
jpayne@69 6649 * __data_union data
jpayne@69 6650 *
jpayne@69 6651 * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
jpayne@69 6652 * # This implementation of getbuffer is geared towards Cython
jpayne@69 6653 * # requirements, and does not yet fulfill the PEP.
jpayne@69 6654 */
jpayne@69 6655
jpayne@69 6656 /* function exit code */
jpayne@69 6657 __pyx_r = 0;
jpayne@69 6658 goto __pyx_L0;
jpayne@69 6659 __pyx_L1_error:;
jpayne@69 6660 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 6661 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 6662 __Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 6663 __pyx_r = -1;
jpayne@69 6664 if (__pyx_v_info->obj != NULL) {
jpayne@69 6665 __Pyx_GOTREF(__pyx_v_info->obj);
jpayne@69 6666 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
jpayne@69 6667 }
jpayne@69 6668 goto __pyx_L2;
jpayne@69 6669 __pyx_L0:;
jpayne@69 6670 if (__pyx_v_info->obj == Py_None) {
jpayne@69 6671 __Pyx_GOTREF(__pyx_v_info->obj);
jpayne@69 6672 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
jpayne@69 6673 }
jpayne@69 6674 __pyx_L2:;
jpayne@69 6675 __Pyx_XDECREF(__pyx_v_item_count);
jpayne@69 6676 __Pyx_RefNannyFinishContext();
jpayne@69 6677 return __pyx_r;
jpayne@69 6678 }
jpayne@69 6679
jpayne@69 6680 /* "array.pxd":129
jpayne@69 6681 * info.obj = self
jpayne@69 6682 *
jpayne@69 6683 * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<<
jpayne@69 6684 * PyObject_Free(info.shape)
jpayne@69 6685 *
jpayne@69 6686 */
jpayne@69 6687
jpayne@69 6688 /* Python wrapper */
jpayne@69 6689 CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
jpayne@69 6690 CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
jpayne@69 6691 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 6692 __Pyx_RefNannyDeclarations
jpayne@69 6693 __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
jpayne@69 6694 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 6695 __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
jpayne@69 6696
jpayne@69 6697 /* function exit code */
jpayne@69 6698 __Pyx_RefNannyFinishContext();
jpayne@69 6699 }
jpayne@69 6700
jpayne@69 6701 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) {
jpayne@69 6702
jpayne@69 6703 /* "array.pxd":130
jpayne@69 6704 *
jpayne@69 6705 * def __releasebuffer__(self, Py_buffer* info):
jpayne@69 6706 * PyObject_Free(info.shape) # <<<<<<<<<<<<<<
jpayne@69 6707 *
jpayne@69 6708 * array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr)
jpayne@69 6709 */
jpayne@69 6710 PyObject_Free(__pyx_v_info->shape);
jpayne@69 6711
jpayne@69 6712 /* "array.pxd":129
jpayne@69 6713 * info.obj = self
jpayne@69 6714 *
jpayne@69 6715 * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<<
jpayne@69 6716 * PyObject_Free(info.shape)
jpayne@69 6717 *
jpayne@69 6718 */
jpayne@69 6719
jpayne@69 6720 /* function exit code */
jpayne@69 6721 }
jpayne@69 6722
jpayne@69 6723 /* "array.pxd":141
jpayne@69 6724 *
jpayne@69 6725 *
jpayne@69 6726 * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<<
jpayne@69 6727 * """ fast creation of a new array, given a template array.
jpayne@69 6728 * type will be same as template.
jpayne@69 6729 */
jpayne@69 6730
jpayne@69 6731 static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, int __pyx_v_zero) {
jpayne@69 6732 arrayobject *__pyx_v_op = 0;
jpayne@69 6733 arrayobject *__pyx_r = NULL;
jpayne@69 6734 __Pyx_RefNannyDeclarations
jpayne@69 6735 PyObject *__pyx_t_1 = NULL;
jpayne@69 6736 int __pyx_t_2;
jpayne@69 6737 int __pyx_t_3;
jpayne@69 6738 int __pyx_lineno = 0;
jpayne@69 6739 const char *__pyx_filename = NULL;
jpayne@69 6740 int __pyx_clineno = 0;
jpayne@69 6741 __Pyx_RefNannySetupContext("clone", 1);
jpayne@69 6742
jpayne@69 6743 /* "array.pxd":145
jpayne@69 6744 * type will be same as template.
jpayne@69 6745 * if zero is true, new array will be initialized with zeroes."""
jpayne@69 6746 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) # <<<<<<<<<<<<<<
jpayne@69 6747 * if zero and op is not None:
jpayne@69 6748 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@69 6749 */
jpayne@69 6750 __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)
jpayne@69 6751 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 6752 __pyx_v_op = ((arrayobject *)__pyx_t_1);
jpayne@69 6753 __pyx_t_1 = 0;
jpayne@69 6754
jpayne@69 6755 /* "array.pxd":146
jpayne@69 6756 * if zero is true, new array will be initialized with zeroes."""
jpayne@69 6757 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
jpayne@69 6758 * if zero and op is not None: # <<<<<<<<<<<<<<
jpayne@69 6759 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@69 6760 * return op
jpayne@69 6761 */
jpayne@69 6762 if (__pyx_v_zero) {
jpayne@69 6763 } else {
jpayne@69 6764 __pyx_t_2 = __pyx_v_zero;
jpayne@69 6765 goto __pyx_L4_bool_binop_done;
jpayne@69 6766 }
jpayne@69 6767 __pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None);
jpayne@69 6768 __pyx_t_2 = __pyx_t_3;
jpayne@69 6769 __pyx_L4_bool_binop_done:;
jpayne@69 6770 if (__pyx_t_2) {
jpayne@69 6771
jpayne@69 6772 /* "array.pxd":147
jpayne@69 6773 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
jpayne@69 6774 * if zero and op is not None:
jpayne@69 6775 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) # <<<<<<<<<<<<<<
jpayne@69 6776 * return op
jpayne@69 6777 *
jpayne@69 6778 */
jpayne@69 6779 (void)(memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize)));
jpayne@69 6780
jpayne@69 6781 /* "array.pxd":146
jpayne@69 6782 * if zero is true, new array will be initialized with zeroes."""
jpayne@69 6783 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
jpayne@69 6784 * if zero and op is not None: # <<<<<<<<<<<<<<
jpayne@69 6785 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@69 6786 * return op
jpayne@69 6787 */
jpayne@69 6788 }
jpayne@69 6789
jpayne@69 6790 /* "array.pxd":148
jpayne@69 6791 * if zero and op is not None:
jpayne@69 6792 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@69 6793 * return op # <<<<<<<<<<<<<<
jpayne@69 6794 *
jpayne@69 6795 * cdef inline array copy(array self):
jpayne@69 6796 */
jpayne@69 6797 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@69 6798 __Pyx_INCREF((PyObject *)__pyx_v_op);
jpayne@69 6799 __pyx_r = __pyx_v_op;
jpayne@69 6800 goto __pyx_L0;
jpayne@69 6801
jpayne@69 6802 /* "array.pxd":141
jpayne@69 6803 *
jpayne@69 6804 *
jpayne@69 6805 * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<<
jpayne@69 6806 * """ fast creation of a new array, given a template array.
jpayne@69 6807 * type will be same as template.
jpayne@69 6808 */
jpayne@69 6809
jpayne@69 6810 /* function exit code */
jpayne@69 6811 __pyx_L1_error:;
jpayne@69 6812 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 6813 __Pyx_AddTraceback("cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 6814 __pyx_r = 0;
jpayne@69 6815 __pyx_L0:;
jpayne@69 6816 __Pyx_XDECREF((PyObject *)__pyx_v_op);
jpayne@69 6817 __Pyx_XGIVEREF((PyObject *)__pyx_r);
jpayne@69 6818 __Pyx_RefNannyFinishContext();
jpayne@69 6819 return __pyx_r;
jpayne@69 6820 }
jpayne@69 6821
jpayne@69 6822 /* "array.pxd":150
jpayne@69 6823 * return op
jpayne@69 6824 *
jpayne@69 6825 * cdef inline array copy(array self): # <<<<<<<<<<<<<<
jpayne@69 6826 * """ make a copy of an array. """
jpayne@69 6827 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@69 6828 */
jpayne@69 6829
jpayne@69 6830 static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) {
jpayne@69 6831 arrayobject *__pyx_v_op = 0;
jpayne@69 6832 arrayobject *__pyx_r = NULL;
jpayne@69 6833 __Pyx_RefNannyDeclarations
jpayne@69 6834 PyObject *__pyx_t_1 = NULL;
jpayne@69 6835 int __pyx_lineno = 0;
jpayne@69 6836 const char *__pyx_filename = NULL;
jpayne@69 6837 int __pyx_clineno = 0;
jpayne@69 6838 __Pyx_RefNannySetupContext("copy", 1);
jpayne@69 6839
jpayne@69 6840 /* "array.pxd":152
jpayne@69 6841 * cdef inline array copy(array self):
jpayne@69 6842 * """ make a copy of an array. """
jpayne@69 6843 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) # <<<<<<<<<<<<<<
jpayne@69 6844 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
jpayne@69 6845 * return op
jpayne@69 6846 */
jpayne@69 6847 __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)
jpayne@69 6848 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 6849 __pyx_v_op = ((arrayobject *)__pyx_t_1);
jpayne@69 6850 __pyx_t_1 = 0;
jpayne@69 6851
jpayne@69 6852 /* "array.pxd":153
jpayne@69 6853 * """ make a copy of an array. """
jpayne@69 6854 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@69 6855 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) # <<<<<<<<<<<<<<
jpayne@69 6856 * return op
jpayne@69 6857 *
jpayne@69 6858 */
jpayne@69 6859 (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)));
jpayne@69 6860
jpayne@69 6861 /* "array.pxd":154
jpayne@69 6862 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@69 6863 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
jpayne@69 6864 * return op # <<<<<<<<<<<<<<
jpayne@69 6865 *
jpayne@69 6866 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:
jpayne@69 6867 */
jpayne@69 6868 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@69 6869 __Pyx_INCREF((PyObject *)__pyx_v_op);
jpayne@69 6870 __pyx_r = __pyx_v_op;
jpayne@69 6871 goto __pyx_L0;
jpayne@69 6872
jpayne@69 6873 /* "array.pxd":150
jpayne@69 6874 * return op
jpayne@69 6875 *
jpayne@69 6876 * cdef inline array copy(array self): # <<<<<<<<<<<<<<
jpayne@69 6877 * """ make a copy of an array. """
jpayne@69 6878 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@69 6879 */
jpayne@69 6880
jpayne@69 6881 /* function exit code */
jpayne@69 6882 __pyx_L1_error:;
jpayne@69 6883 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 6884 __Pyx_AddTraceback("cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 6885 __pyx_r = 0;
jpayne@69 6886 __pyx_L0:;
jpayne@69 6887 __Pyx_XDECREF((PyObject *)__pyx_v_op);
jpayne@69 6888 __Pyx_XGIVEREF((PyObject *)__pyx_r);
jpayne@69 6889 __Pyx_RefNannyFinishContext();
jpayne@69 6890 return __pyx_r;
jpayne@69 6891 }
jpayne@69 6892
jpayne@69 6893 /* "array.pxd":156
jpayne@69 6894 * return op
jpayne@69 6895 *
jpayne@69 6896 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<<
jpayne@69 6897 * """ efficient appending of new stuff of same type
jpayne@69 6898 * (e.g. of same array type)
jpayne@69 6899 */
jpayne@69 6900
jpayne@69 6901 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) {
jpayne@69 6902 Py_ssize_t __pyx_v_itemsize;
jpayne@69 6903 Py_ssize_t __pyx_v_origsize;
jpayne@69 6904 int __pyx_r;
jpayne@69 6905 int __pyx_t_1;
jpayne@69 6906 int __pyx_lineno = 0;
jpayne@69 6907 const char *__pyx_filename = NULL;
jpayne@69 6908 int __pyx_clineno = 0;
jpayne@69 6909
jpayne@69 6910 /* "array.pxd":160
jpayne@69 6911 * (e.g. of same array type)
jpayne@69 6912 * n: number of elements (not number of bytes!) """
jpayne@69 6913 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize # <<<<<<<<<<<<<<
jpayne@69 6914 * cdef Py_ssize_t origsize = Py_SIZE(self)
jpayne@69 6915 * resize_smart(self, origsize + n)
jpayne@69 6916 */
jpayne@69 6917 __pyx_t_1 = __pyx_v_self->ob_descr->itemsize;
jpayne@69 6918 __pyx_v_itemsize = __pyx_t_1;
jpayne@69 6919
jpayne@69 6920 /* "array.pxd":161
jpayne@69 6921 * n: number of elements (not number of bytes!) """
jpayne@69 6922 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize
jpayne@69 6923 * cdef Py_ssize_t origsize = Py_SIZE(self) # <<<<<<<<<<<<<<
jpayne@69 6924 * resize_smart(self, origsize + n)
jpayne@69 6925 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
jpayne@69 6926 */
jpayne@69 6927 __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self));
jpayne@69 6928
jpayne@69 6929 /* "array.pxd":162
jpayne@69 6930 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize
jpayne@69 6931 * cdef Py_ssize_t origsize = Py_SIZE(self)
jpayne@69 6932 * resize_smart(self, origsize + n) # <<<<<<<<<<<<<<
jpayne@69 6933 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
jpayne@69 6934 * return 0
jpayne@69 6935 */
jpayne@69 6936 __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)
jpayne@69 6937
jpayne@69 6938 /* "array.pxd":163
jpayne@69 6939 * cdef Py_ssize_t origsize = Py_SIZE(self)
jpayne@69 6940 * resize_smart(self, origsize + n)
jpayne@69 6941 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) # <<<<<<<<<<<<<<
jpayne@69 6942 * return 0
jpayne@69 6943 *
jpayne@69 6944 */
jpayne@69 6945 (void)(memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize)));
jpayne@69 6946
jpayne@69 6947 /* "array.pxd":164
jpayne@69 6948 * resize_smart(self, origsize + n)
jpayne@69 6949 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
jpayne@69 6950 * return 0 # <<<<<<<<<<<<<<
jpayne@69 6951 *
jpayne@69 6952 * cdef inline int extend(array self, array other) except -1:
jpayne@69 6953 */
jpayne@69 6954 __pyx_r = 0;
jpayne@69 6955 goto __pyx_L0;
jpayne@69 6956
jpayne@69 6957 /* "array.pxd":156
jpayne@69 6958 * return op
jpayne@69 6959 *
jpayne@69 6960 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<<
jpayne@69 6961 * """ efficient appending of new stuff of same type
jpayne@69 6962 * (e.g. of same array type)
jpayne@69 6963 */
jpayne@69 6964
jpayne@69 6965 /* function exit code */
jpayne@69 6966 __pyx_L1_error:;
jpayne@69 6967 __Pyx_AddTraceback("cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 6968 __pyx_r = -1;
jpayne@69 6969 __pyx_L0:;
jpayne@69 6970 return __pyx_r;
jpayne@69 6971 }
jpayne@69 6972
jpayne@69 6973 /* "array.pxd":166
jpayne@69 6974 * return 0
jpayne@69 6975 *
jpayne@69 6976 * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<<
jpayne@69 6977 * """ extend array with data from another array; types must match. """
jpayne@69 6978 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@69 6979 */
jpayne@69 6980
jpayne@69 6981 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) {
jpayne@69 6982 int __pyx_r;
jpayne@69 6983 int __pyx_t_1;
jpayne@69 6984 int __pyx_t_2;
jpayne@69 6985 int __pyx_lineno = 0;
jpayne@69 6986 const char *__pyx_filename = NULL;
jpayne@69 6987 int __pyx_clineno = 0;
jpayne@69 6988
jpayne@69 6989 /* "array.pxd":168
jpayne@69 6990 * cdef inline int extend(array self, array other) except -1:
jpayne@69 6991 * """ extend array with data from another array; types must match. """
jpayne@69 6992 * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<<
jpayne@69 6993 * PyErr_BadArgument()
jpayne@69 6994 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@69 6995 */
jpayne@69 6996 __pyx_t_1 = (__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode);
jpayne@69 6997 if (__pyx_t_1) {
jpayne@69 6998
jpayne@69 6999 /* "array.pxd":169
jpayne@69 7000 * """ extend array with data from another array; types must match. """
jpayne@69 7001 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@69 7002 * PyErr_BadArgument() # <<<<<<<<<<<<<<
jpayne@69 7003 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@69 7004 *
jpayne@69 7005 */
jpayne@69 7006 __pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(3, 169, __pyx_L1_error)
jpayne@69 7007
jpayne@69 7008 /* "array.pxd":168
jpayne@69 7009 * cdef inline int extend(array self, array other) except -1:
jpayne@69 7010 * """ extend array with data from another array; types must match. """
jpayne@69 7011 * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<<
jpayne@69 7012 * PyErr_BadArgument()
jpayne@69 7013 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@69 7014 */
jpayne@69 7015 }
jpayne@69 7016
jpayne@69 7017 /* "array.pxd":170
jpayne@69 7018 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@69 7019 * PyErr_BadArgument()
jpayne@69 7020 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) # <<<<<<<<<<<<<<
jpayne@69 7021 *
jpayne@69 7022 * cdef inline void zero(array self) noexcept:
jpayne@69 7023 */
jpayne@69 7024 __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)
jpayne@69 7025 __pyx_r = __pyx_t_2;
jpayne@69 7026 goto __pyx_L0;
jpayne@69 7027
jpayne@69 7028 /* "array.pxd":166
jpayne@69 7029 * return 0
jpayne@69 7030 *
jpayne@69 7031 * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<<
jpayne@69 7032 * """ extend array with data from another array; types must match. """
jpayne@69 7033 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@69 7034 */
jpayne@69 7035
jpayne@69 7036 /* function exit code */
jpayne@69 7037 __pyx_L1_error:;
jpayne@69 7038 __Pyx_AddTraceback("cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7039 __pyx_r = -1;
jpayne@69 7040 __pyx_L0:;
jpayne@69 7041 return __pyx_r;
jpayne@69 7042 }
jpayne@69 7043
jpayne@69 7044 /* "array.pxd":172
jpayne@69 7045 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@69 7046 *
jpayne@69 7047 * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 7048 * """ set all elements of array to zero. """
jpayne@69 7049 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
jpayne@69 7050 */
jpayne@69 7051
jpayne@69 7052 static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) {
jpayne@69 7053
jpayne@69 7054 /* "array.pxd":174
jpayne@69 7055 * cdef inline void zero(array self) noexcept:
jpayne@69 7056 * """ set all elements of array to zero. """
jpayne@69 7057 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) # <<<<<<<<<<<<<<
jpayne@69 7058 */
jpayne@69 7059 (void)(memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize)));
jpayne@69 7060
jpayne@69 7061 /* "array.pxd":172
jpayne@69 7062 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@69 7063 *
jpayne@69 7064 * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 7065 * """ set all elements of array to zero. """
jpayne@69 7066 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
jpayne@69 7067 */
jpayne@69 7068
jpayne@69 7069 /* function exit code */
jpayne@69 7070 }
jpayne@69 7071
jpayne@69 7072 /* "pysam/libctabix.pyx":84
jpayne@69 7073 * cdef class Parser:
jpayne@69 7074 *
jpayne@69 7075 * def __init__(self, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@69 7076 * self.encoding = encoding
jpayne@69 7077 *
jpayne@69 7078 */
jpayne@69 7079
jpayne@69 7080 /* Python wrapper */
jpayne@69 7081 static int __pyx_pw_5pysam_9libctabix_6Parser_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 7082 static int __pyx_pw_5pysam_9libctabix_6Parser_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 7083 PyObject *__pyx_v_encoding = 0;
jpayne@69 7084 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 7085 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7086 PyObject* values[1] = {0};
jpayne@69 7087 int __pyx_lineno = 0;
jpayne@69 7088 const char *__pyx_filename = NULL;
jpayne@69 7089 int __pyx_clineno = 0;
jpayne@69 7090 int __pyx_r;
jpayne@69 7091 __Pyx_RefNannyDeclarations
jpayne@69 7092 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@69 7093 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 7094 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 7095 #else
jpayne@69 7096 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@69 7097 #endif
jpayne@69 7098 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 7099 {
jpayne@69 7100 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_encoding,0};
jpayne@69 7101 values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_u_ascii));
jpayne@69 7102 if (__pyx_kwds) {
jpayne@69 7103 Py_ssize_t kw_args;
jpayne@69 7104 switch (__pyx_nargs) {
jpayne@69 7105 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 7106 CYTHON_FALLTHROUGH;
jpayne@69 7107 case 0: break;
jpayne@69 7108 default: goto __pyx_L5_argtuple_error;
jpayne@69 7109 }
jpayne@69 7110 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@69 7111 switch (__pyx_nargs) {
jpayne@69 7112 case 0:
jpayne@69 7113 if (kw_args > 0) {
jpayne@69 7114 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding);
jpayne@69 7115 if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 7116 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 84, __pyx_L3_error)
jpayne@69 7117 }
jpayne@69 7118 }
jpayne@69 7119 if (unlikely(kw_args > 0)) {
jpayne@69 7120 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 7121 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 84, __pyx_L3_error)
jpayne@69 7122 }
jpayne@69 7123 } else {
jpayne@69 7124 switch (__pyx_nargs) {
jpayne@69 7125 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 7126 CYTHON_FALLTHROUGH;
jpayne@69 7127 case 0: break;
jpayne@69 7128 default: goto __pyx_L5_argtuple_error;
jpayne@69 7129 }
jpayne@69 7130 }
jpayne@69 7131 __pyx_v_encoding = values[0];
jpayne@69 7132 }
jpayne@69 7133 goto __pyx_L6_skip;
jpayne@69 7134 __pyx_L5_argtuple_error:;
jpayne@69 7135 __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 84, __pyx_L3_error)
jpayne@69 7136 __pyx_L6_skip:;
jpayne@69 7137 goto __pyx_L4_argument_unpacking_done;
jpayne@69 7138 __pyx_L3_error:;
jpayne@69 7139 {
jpayne@69 7140 Py_ssize_t __pyx_temp;
jpayne@69 7141 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 7142 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 7143 }
jpayne@69 7144 }
jpayne@69 7145 __Pyx_AddTraceback("pysam.libctabix.Parser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7146 __Pyx_RefNannyFinishContext();
jpayne@69 7147 return -1;
jpayne@69 7148 __pyx_L4_argument_unpacking_done:;
jpayne@69 7149 __pyx_r = __pyx_pf_5pysam_9libctabix_6Parser___init__(((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_v_self), __pyx_v_encoding);
jpayne@69 7150
jpayne@69 7151 /* function exit code */
jpayne@69 7152 {
jpayne@69 7153 Py_ssize_t __pyx_temp;
jpayne@69 7154 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 7155 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 7156 }
jpayne@69 7157 }
jpayne@69 7158 __Pyx_RefNannyFinishContext();
jpayne@69 7159 return __pyx_r;
jpayne@69 7160 }
jpayne@69 7161
jpayne@69 7162 static int __pyx_pf_5pysam_9libctabix_6Parser___init__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, PyObject *__pyx_v_encoding) {
jpayne@69 7163 int __pyx_r;
jpayne@69 7164 __Pyx_TraceDeclarations
jpayne@69 7165 __Pyx_RefNannyDeclarations
jpayne@69 7166 int __pyx_lineno = 0;
jpayne@69 7167 const char *__pyx_filename = NULL;
jpayne@69 7168 int __pyx_clineno = 0;
jpayne@69 7169 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@69 7170 __Pyx_TraceCall("__init__", __pyx_f[0], 84, 0, __PYX_ERR(0, 84, __pyx_L1_error));
jpayne@69 7171
jpayne@69 7172 /* "pysam/libctabix.pyx":85
jpayne@69 7173 *
jpayne@69 7174 * def __init__(self, encoding="ascii"):
jpayne@69 7175 * self.encoding = encoding # <<<<<<<<<<<<<<
jpayne@69 7176 *
jpayne@69 7177 * def set_encoding(self, encoding):
jpayne@69 7178 */
jpayne@69 7179 __Pyx_INCREF(__pyx_v_encoding);
jpayne@69 7180 __Pyx_GIVEREF(__pyx_v_encoding);
jpayne@69 7181 __Pyx_GOTREF(__pyx_v_self->encoding);
jpayne@69 7182 __Pyx_DECREF(__pyx_v_self->encoding);
jpayne@69 7183 __pyx_v_self->encoding = __pyx_v_encoding;
jpayne@69 7184
jpayne@69 7185 /* "pysam/libctabix.pyx":84
jpayne@69 7186 * cdef class Parser:
jpayne@69 7187 *
jpayne@69 7188 * def __init__(self, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@69 7189 * self.encoding = encoding
jpayne@69 7190 *
jpayne@69 7191 */
jpayne@69 7192
jpayne@69 7193 /* function exit code */
jpayne@69 7194 __pyx_r = 0;
jpayne@69 7195 goto __pyx_L0;
jpayne@69 7196 __pyx_L1_error:;
jpayne@69 7197 __Pyx_AddTraceback("pysam.libctabix.Parser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7198 __pyx_r = -1;
jpayne@69 7199 __pyx_L0:;
jpayne@69 7200 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 7201 __Pyx_RefNannyFinishContext();
jpayne@69 7202 return __pyx_r;
jpayne@69 7203 }
jpayne@69 7204
jpayne@69 7205 /* "pysam/libctabix.pyx":87
jpayne@69 7206 * self.encoding = encoding
jpayne@69 7207 *
jpayne@69 7208 * def set_encoding(self, encoding): # <<<<<<<<<<<<<<
jpayne@69 7209 * self.encoding = encoding
jpayne@69 7210 *
jpayne@69 7211 */
jpayne@69 7212
jpayne@69 7213 /* Python wrapper */
jpayne@69 7214 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_3set_encoding(PyObject *__pyx_v_self,
jpayne@69 7215 #if CYTHON_METH_FASTCALL
jpayne@69 7216 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7217 #else
jpayne@69 7218 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7219 #endif
jpayne@69 7220 ); /*proto*/
jpayne@69 7221 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6Parser_2set_encoding, "Parser.set_encoding(self, encoding)");
jpayne@69 7222 static PyMethodDef __pyx_mdef_5pysam_9libctabix_6Parser_3set_encoding = {"set_encoding", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6Parser_3set_encoding, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6Parser_2set_encoding};
jpayne@69 7223 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_3set_encoding(PyObject *__pyx_v_self,
jpayne@69 7224 #if CYTHON_METH_FASTCALL
jpayne@69 7225 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7226 #else
jpayne@69 7227 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7228 #endif
jpayne@69 7229 ) {
jpayne@69 7230 PyObject *__pyx_v_encoding = 0;
jpayne@69 7231 #if !CYTHON_METH_FASTCALL
jpayne@69 7232 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 7233 #endif
jpayne@69 7234 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7235 PyObject* values[1] = {0};
jpayne@69 7236 int __pyx_lineno = 0;
jpayne@69 7237 const char *__pyx_filename = NULL;
jpayne@69 7238 int __pyx_clineno = 0;
jpayne@69 7239 PyObject *__pyx_r = 0;
jpayne@69 7240 __Pyx_RefNannyDeclarations
jpayne@69 7241 __Pyx_RefNannySetupContext("set_encoding (wrapper)", 0);
jpayne@69 7242 #if !CYTHON_METH_FASTCALL
jpayne@69 7243 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 7244 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 7245 #else
jpayne@69 7246 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 7247 #endif
jpayne@69 7248 #endif
jpayne@69 7249 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 7250 {
jpayne@69 7251 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_encoding,0};
jpayne@69 7252 if (__pyx_kwds) {
jpayne@69 7253 Py_ssize_t kw_args;
jpayne@69 7254 switch (__pyx_nargs) {
jpayne@69 7255 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 7256 CYTHON_FALLTHROUGH;
jpayne@69 7257 case 0: break;
jpayne@69 7258 default: goto __pyx_L5_argtuple_error;
jpayne@69 7259 }
jpayne@69 7260 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 7261 switch (__pyx_nargs) {
jpayne@69 7262 case 0:
jpayne@69 7263 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding)) != 0)) {
jpayne@69 7264 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 7265 kw_args--;
jpayne@69 7266 }
jpayne@69 7267 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 87, __pyx_L3_error)
jpayne@69 7268 else goto __pyx_L5_argtuple_error;
jpayne@69 7269 }
jpayne@69 7270 if (unlikely(kw_args > 0)) {
jpayne@69 7271 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 7272 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_encoding") < 0)) __PYX_ERR(0, 87, __pyx_L3_error)
jpayne@69 7273 }
jpayne@69 7274 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 7275 goto __pyx_L5_argtuple_error;
jpayne@69 7276 } else {
jpayne@69 7277 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 7278 }
jpayne@69 7279 __pyx_v_encoding = values[0];
jpayne@69 7280 }
jpayne@69 7281 goto __pyx_L6_skip;
jpayne@69 7282 __pyx_L5_argtuple_error:;
jpayne@69 7283 __Pyx_RaiseArgtupleInvalid("set_encoding", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 87, __pyx_L3_error)
jpayne@69 7284 __pyx_L6_skip:;
jpayne@69 7285 goto __pyx_L4_argument_unpacking_done;
jpayne@69 7286 __pyx_L3_error:;
jpayne@69 7287 {
jpayne@69 7288 Py_ssize_t __pyx_temp;
jpayne@69 7289 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 7290 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 7291 }
jpayne@69 7292 }
jpayne@69 7293 __Pyx_AddTraceback("pysam.libctabix.Parser.set_encoding", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7294 __Pyx_RefNannyFinishContext();
jpayne@69 7295 return NULL;
jpayne@69 7296 __pyx_L4_argument_unpacking_done:;
jpayne@69 7297 __pyx_r = __pyx_pf_5pysam_9libctabix_6Parser_2set_encoding(((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_v_self), __pyx_v_encoding);
jpayne@69 7298
jpayne@69 7299 /* function exit code */
jpayne@69 7300 {
jpayne@69 7301 Py_ssize_t __pyx_temp;
jpayne@69 7302 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 7303 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 7304 }
jpayne@69 7305 }
jpayne@69 7306 __Pyx_RefNannyFinishContext();
jpayne@69 7307 return __pyx_r;
jpayne@69 7308 }
jpayne@69 7309
jpayne@69 7310 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_2set_encoding(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, PyObject *__pyx_v_encoding) {
jpayne@69 7311 PyObject *__pyx_r = NULL;
jpayne@69 7312 __Pyx_TraceDeclarations
jpayne@69 7313 __Pyx_RefNannyDeclarations
jpayne@69 7314 int __pyx_lineno = 0;
jpayne@69 7315 const char *__pyx_filename = NULL;
jpayne@69 7316 int __pyx_clineno = 0;
jpayne@69 7317 __Pyx_TraceFrameInit(__pyx_codeobj_)
jpayne@69 7318 __Pyx_RefNannySetupContext("set_encoding", 1);
jpayne@69 7319 __Pyx_TraceCall("set_encoding", __pyx_f[0], 87, 0, __PYX_ERR(0, 87, __pyx_L1_error));
jpayne@69 7320
jpayne@69 7321 /* "pysam/libctabix.pyx":88
jpayne@69 7322 *
jpayne@69 7323 * def set_encoding(self, encoding):
jpayne@69 7324 * self.encoding = encoding # <<<<<<<<<<<<<<
jpayne@69 7325 *
jpayne@69 7326 * def get_encoding(self):
jpayne@69 7327 */
jpayne@69 7328 __Pyx_INCREF(__pyx_v_encoding);
jpayne@69 7329 __Pyx_GIVEREF(__pyx_v_encoding);
jpayne@69 7330 __Pyx_GOTREF(__pyx_v_self->encoding);
jpayne@69 7331 __Pyx_DECREF(__pyx_v_self->encoding);
jpayne@69 7332 __pyx_v_self->encoding = __pyx_v_encoding;
jpayne@69 7333
jpayne@69 7334 /* "pysam/libctabix.pyx":87
jpayne@69 7335 * self.encoding = encoding
jpayne@69 7336 *
jpayne@69 7337 * def set_encoding(self, encoding): # <<<<<<<<<<<<<<
jpayne@69 7338 * self.encoding = encoding
jpayne@69 7339 *
jpayne@69 7340 */
jpayne@69 7341
jpayne@69 7342 /* function exit code */
jpayne@69 7343 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 7344 goto __pyx_L0;
jpayne@69 7345 __pyx_L1_error:;
jpayne@69 7346 __Pyx_AddTraceback("pysam.libctabix.Parser.set_encoding", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7347 __pyx_r = NULL;
jpayne@69 7348 __pyx_L0:;
jpayne@69 7349 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7350 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7351 __Pyx_RefNannyFinishContext();
jpayne@69 7352 return __pyx_r;
jpayne@69 7353 }
jpayne@69 7354
jpayne@69 7355 /* "pysam/libctabix.pyx":90
jpayne@69 7356 * self.encoding = encoding
jpayne@69 7357 *
jpayne@69 7358 * def get_encoding(self): # <<<<<<<<<<<<<<
jpayne@69 7359 * return self.encoding
jpayne@69 7360 *
jpayne@69 7361 */
jpayne@69 7362
jpayne@69 7363 /* Python wrapper */
jpayne@69 7364 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_5get_encoding(PyObject *__pyx_v_self,
jpayne@69 7365 #if CYTHON_METH_FASTCALL
jpayne@69 7366 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7367 #else
jpayne@69 7368 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7369 #endif
jpayne@69 7370 ); /*proto*/
jpayne@69 7371 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6Parser_4get_encoding, "Parser.get_encoding(self)");
jpayne@69 7372 static PyMethodDef __pyx_mdef_5pysam_9libctabix_6Parser_5get_encoding = {"get_encoding", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6Parser_5get_encoding, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6Parser_4get_encoding};
jpayne@69 7373 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_5get_encoding(PyObject *__pyx_v_self,
jpayne@69 7374 #if CYTHON_METH_FASTCALL
jpayne@69 7375 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7376 #else
jpayne@69 7377 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7378 #endif
jpayne@69 7379 ) {
jpayne@69 7380 #if !CYTHON_METH_FASTCALL
jpayne@69 7381 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 7382 #endif
jpayne@69 7383 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7384 PyObject *__pyx_r = 0;
jpayne@69 7385 __Pyx_RefNannyDeclarations
jpayne@69 7386 __Pyx_RefNannySetupContext("get_encoding (wrapper)", 0);
jpayne@69 7387 #if !CYTHON_METH_FASTCALL
jpayne@69 7388 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 7389 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 7390 #else
jpayne@69 7391 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 7392 #endif
jpayne@69 7393 #endif
jpayne@69 7394 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 7395 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 7396 __Pyx_RaiseArgtupleInvalid("get_encoding", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 7397 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_encoding", 0))) return NULL;
jpayne@69 7398 __pyx_r = __pyx_pf_5pysam_9libctabix_6Parser_4get_encoding(((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_v_self));
jpayne@69 7399
jpayne@69 7400 /* function exit code */
jpayne@69 7401 __Pyx_RefNannyFinishContext();
jpayne@69 7402 return __pyx_r;
jpayne@69 7403 }
jpayne@69 7404
jpayne@69 7405 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_4get_encoding(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self) {
jpayne@69 7406 PyObject *__pyx_r = NULL;
jpayne@69 7407 __Pyx_TraceDeclarations
jpayne@69 7408 __Pyx_RefNannyDeclarations
jpayne@69 7409 int __pyx_lineno = 0;
jpayne@69 7410 const char *__pyx_filename = NULL;
jpayne@69 7411 int __pyx_clineno = 0;
jpayne@69 7412 __Pyx_TraceFrameInit(__pyx_codeobj__2)
jpayne@69 7413 __Pyx_RefNannySetupContext("get_encoding", 1);
jpayne@69 7414 __Pyx_TraceCall("get_encoding", __pyx_f[0], 90, 0, __PYX_ERR(0, 90, __pyx_L1_error));
jpayne@69 7415
jpayne@69 7416 /* "pysam/libctabix.pyx":91
jpayne@69 7417 *
jpayne@69 7418 * def get_encoding(self):
jpayne@69 7419 * return self.encoding # <<<<<<<<<<<<<<
jpayne@69 7420 *
jpayne@69 7421 * cdef parse(self, char * buffer, int length):
jpayne@69 7422 */
jpayne@69 7423 __Pyx_XDECREF(__pyx_r);
jpayne@69 7424 __Pyx_INCREF(__pyx_v_self->encoding);
jpayne@69 7425 __pyx_r = __pyx_v_self->encoding;
jpayne@69 7426 goto __pyx_L0;
jpayne@69 7427
jpayne@69 7428 /* "pysam/libctabix.pyx":90
jpayne@69 7429 * self.encoding = encoding
jpayne@69 7430 *
jpayne@69 7431 * def get_encoding(self): # <<<<<<<<<<<<<<
jpayne@69 7432 * return self.encoding
jpayne@69 7433 *
jpayne@69 7434 */
jpayne@69 7435
jpayne@69 7436 /* function exit code */
jpayne@69 7437 __pyx_L1_error:;
jpayne@69 7438 __Pyx_AddTraceback("pysam.libctabix.Parser.get_encoding", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7439 __pyx_r = NULL;
jpayne@69 7440 __pyx_L0:;
jpayne@69 7441 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7442 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7443 __Pyx_RefNannyFinishContext();
jpayne@69 7444 return __pyx_r;
jpayne@69 7445 }
jpayne@69 7446
jpayne@69 7447 /* "pysam/libctabix.pyx":93
jpayne@69 7448 * return self.encoding
jpayne@69 7449 *
jpayne@69 7450 * cdef parse(self, char * buffer, int length): # <<<<<<<<<<<<<<
jpayne@69 7451 * raise NotImplementedError(
jpayne@69 7452 * 'parse method of %s not implemented' % str(self))
jpayne@69 7453 */
jpayne@69 7454
jpayne@69 7455 static PyObject *__pyx_f_5pysam_9libctabix_6Parser_parse(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, CYTHON_UNUSED char *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_length) {
jpayne@69 7456 PyObject *__pyx_r = NULL;
jpayne@69 7457 __Pyx_TraceDeclarations
jpayne@69 7458 __Pyx_RefNannyDeclarations
jpayne@69 7459 PyObject *__pyx_t_1 = NULL;
jpayne@69 7460 PyObject *__pyx_t_2 = NULL;
jpayne@69 7461 int __pyx_lineno = 0;
jpayne@69 7462 const char *__pyx_filename = NULL;
jpayne@69 7463 int __pyx_clineno = 0;
jpayne@69 7464 __Pyx_RefNannySetupContext("parse", 1);
jpayne@69 7465 __Pyx_TraceCall("parse", __pyx_f[0], 93, 0, __PYX_ERR(0, 93, __pyx_L1_error));
jpayne@69 7466
jpayne@69 7467 /* "pysam/libctabix.pyx":95
jpayne@69 7468 * cdef parse(self, char * buffer, int length):
jpayne@69 7469 * raise NotImplementedError(
jpayne@69 7470 * 'parse method of %s not implemented' % str(self)) # <<<<<<<<<<<<<<
jpayne@69 7471 *
jpayne@69 7472 * def __call__(self, char * buffer, int length):
jpayne@69 7473 */
jpayne@69 7474 __pyx_t_1 = __Pyx_PyObject_Unicode(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
jpayne@69 7475 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 7476 __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_parse_method_of_s_not_implemente, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
jpayne@69 7477 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 7478 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 7479
jpayne@69 7480 /* "pysam/libctabix.pyx":94
jpayne@69 7481 *
jpayne@69 7482 * cdef parse(self, char * buffer, int length):
jpayne@69 7483 * raise NotImplementedError( # <<<<<<<<<<<<<<
jpayne@69 7484 * 'parse method of %s not implemented' % str(self))
jpayne@69 7485 *
jpayne@69 7486 */
jpayne@69 7487 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
jpayne@69 7488 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 7489 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 7490 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 7491 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 7492 __PYX_ERR(0, 94, __pyx_L1_error)
jpayne@69 7493
jpayne@69 7494 /* "pysam/libctabix.pyx":93
jpayne@69 7495 * return self.encoding
jpayne@69 7496 *
jpayne@69 7497 * cdef parse(self, char * buffer, int length): # <<<<<<<<<<<<<<
jpayne@69 7498 * raise NotImplementedError(
jpayne@69 7499 * 'parse method of %s not implemented' % str(self))
jpayne@69 7500 */
jpayne@69 7501
jpayne@69 7502 /* function exit code */
jpayne@69 7503 __pyx_L1_error:;
jpayne@69 7504 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 7505 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 7506 __Pyx_AddTraceback("pysam.libctabix.Parser.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7507 __pyx_r = 0;
jpayne@69 7508 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7509 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7510 __Pyx_RefNannyFinishContext();
jpayne@69 7511 return __pyx_r;
jpayne@69 7512 }
jpayne@69 7513
jpayne@69 7514 /* "pysam/libctabix.pyx":97
jpayne@69 7515 * 'parse method of %s not implemented' % str(self))
jpayne@69 7516 *
jpayne@69 7517 * def __call__(self, char * buffer, int length): # <<<<<<<<<<<<<<
jpayne@69 7518 * return self.parse(buffer, length)
jpayne@69 7519 *
jpayne@69 7520 */
jpayne@69 7521
jpayne@69 7522 /* Python wrapper */
jpayne@69 7523 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 7524 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 7525 char *__pyx_v_buffer;
jpayne@69 7526 int __pyx_v_length;
jpayne@69 7527 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 7528 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7529 PyObject* values[2] = {0,0};
jpayne@69 7530 int __pyx_lineno = 0;
jpayne@69 7531 const char *__pyx_filename = NULL;
jpayne@69 7532 int __pyx_clineno = 0;
jpayne@69 7533 PyObject *__pyx_r = 0;
jpayne@69 7534 __Pyx_RefNannyDeclarations
jpayne@69 7535 __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
jpayne@69 7536 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 7537 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 7538 #else
jpayne@69 7539 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 7540 #endif
jpayne@69 7541 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 7542 {
jpayne@69 7543 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buffer,&__pyx_n_s_length,0};
jpayne@69 7544 if (__pyx_kwds) {
jpayne@69 7545 Py_ssize_t kw_args;
jpayne@69 7546 switch (__pyx_nargs) {
jpayne@69 7547 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@69 7548 CYTHON_FALLTHROUGH;
jpayne@69 7549 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 7550 CYTHON_FALLTHROUGH;
jpayne@69 7551 case 0: break;
jpayne@69 7552 default: goto __pyx_L5_argtuple_error;
jpayne@69 7553 }
jpayne@69 7554 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@69 7555 switch (__pyx_nargs) {
jpayne@69 7556 case 0:
jpayne@69 7557 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffer)) != 0)) {
jpayne@69 7558 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@69 7559 kw_args--;
jpayne@69 7560 }
jpayne@69 7561 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@69 7562 else goto __pyx_L5_argtuple_error;
jpayne@69 7563 CYTHON_FALLTHROUGH;
jpayne@69 7564 case 1:
jpayne@69 7565 if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_length)) != 0)) {
jpayne@69 7566 (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
jpayne@69 7567 kw_args--;
jpayne@69 7568 }
jpayne@69 7569 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@69 7570 else {
jpayne@69 7571 __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@69 7572 }
jpayne@69 7573 }
jpayne@69 7574 if (unlikely(kw_args > 0)) {
jpayne@69 7575 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 7576 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@69 7577 }
jpayne@69 7578 } else if (unlikely(__pyx_nargs != 2)) {
jpayne@69 7579 goto __pyx_L5_argtuple_error;
jpayne@69 7580 } else {
jpayne@69 7581 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 7582 values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@69 7583 }
jpayne@69 7584 __pyx_v_buffer = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_buffer) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@69 7585 __pyx_v_length = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@69 7586 }
jpayne@69 7587 goto __pyx_L6_skip;
jpayne@69 7588 __pyx_L5_argtuple_error:;
jpayne@69 7589 __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@69 7590 __pyx_L6_skip:;
jpayne@69 7591 goto __pyx_L4_argument_unpacking_done;
jpayne@69 7592 __pyx_L3_error:;
jpayne@69 7593 {
jpayne@69 7594 Py_ssize_t __pyx_temp;
jpayne@69 7595 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 7596 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 7597 }
jpayne@69 7598 }
jpayne@69 7599 __Pyx_AddTraceback("pysam.libctabix.Parser.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7600 __Pyx_RefNannyFinishContext();
jpayne@69 7601 return NULL;
jpayne@69 7602 __pyx_L4_argument_unpacking_done:;
jpayne@69 7603 __pyx_r = __pyx_pf_5pysam_9libctabix_6Parser_6__call__(((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_v_self), __pyx_v_buffer, __pyx_v_length);
jpayne@69 7604
jpayne@69 7605 /* function exit code */
jpayne@69 7606 {
jpayne@69 7607 Py_ssize_t __pyx_temp;
jpayne@69 7608 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 7609 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 7610 }
jpayne@69 7611 }
jpayne@69 7612 __Pyx_RefNannyFinishContext();
jpayne@69 7613 return __pyx_r;
jpayne@69 7614 }
jpayne@69 7615
jpayne@69 7616 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_6__call__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_length) {
jpayne@69 7617 PyObject *__pyx_r = NULL;
jpayne@69 7618 __Pyx_TraceDeclarations
jpayne@69 7619 __Pyx_RefNannyDeclarations
jpayne@69 7620 PyObject *__pyx_t_1 = NULL;
jpayne@69 7621 int __pyx_lineno = 0;
jpayne@69 7622 const char *__pyx_filename = NULL;
jpayne@69 7623 int __pyx_clineno = 0;
jpayne@69 7624 __Pyx_RefNannySetupContext("__call__", 1);
jpayne@69 7625 __Pyx_TraceCall("__call__", __pyx_f[0], 97, 0, __PYX_ERR(0, 97, __pyx_L1_error));
jpayne@69 7626
jpayne@69 7627 /* "pysam/libctabix.pyx":98
jpayne@69 7628 *
jpayne@69 7629 * def __call__(self, char * buffer, int length):
jpayne@69 7630 * return self.parse(buffer, length) # <<<<<<<<<<<<<<
jpayne@69 7631 *
jpayne@69 7632 *
jpayne@69 7633 */
jpayne@69 7634 __Pyx_XDECREF(__pyx_r);
jpayne@69 7635 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9libctabix_Parser *)__pyx_v_self->__pyx_vtab)->parse(__pyx_v_self, __pyx_v_buffer, __pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
jpayne@69 7636 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 7637 __pyx_r = __pyx_t_1;
jpayne@69 7638 __pyx_t_1 = 0;
jpayne@69 7639 goto __pyx_L0;
jpayne@69 7640
jpayne@69 7641 /* "pysam/libctabix.pyx":97
jpayne@69 7642 * 'parse method of %s not implemented' % str(self))
jpayne@69 7643 *
jpayne@69 7644 * def __call__(self, char * buffer, int length): # <<<<<<<<<<<<<<
jpayne@69 7645 * return self.parse(buffer, length)
jpayne@69 7646 *
jpayne@69 7647 */
jpayne@69 7648
jpayne@69 7649 /* function exit code */
jpayne@69 7650 __pyx_L1_error:;
jpayne@69 7651 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 7652 __Pyx_AddTraceback("pysam.libctabix.Parser.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7653 __pyx_r = NULL;
jpayne@69 7654 __pyx_L0:;
jpayne@69 7655 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7656 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7657 __Pyx_RefNannyFinishContext();
jpayne@69 7658 return __pyx_r;
jpayne@69 7659 }
jpayne@69 7660
jpayne@69 7661 /* "(tree fragment)":1
jpayne@69 7662 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 7663 * cdef tuple state
jpayne@69 7664 * cdef object _dict
jpayne@69 7665 */
jpayne@69 7666
jpayne@69 7667 /* Python wrapper */
jpayne@69 7668 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 7669 #if CYTHON_METH_FASTCALL
jpayne@69 7670 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7671 #else
jpayne@69 7672 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7673 #endif
jpayne@69 7674 ); /*proto*/
jpayne@69 7675 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6Parser_8__reduce_cython__, "Parser.__reduce_cython__(self)");
jpayne@69 7676 static PyMethodDef __pyx_mdef_5pysam_9libctabix_6Parser_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6Parser_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6Parser_8__reduce_cython__};
jpayne@69 7677 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 7678 #if CYTHON_METH_FASTCALL
jpayne@69 7679 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7680 #else
jpayne@69 7681 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7682 #endif
jpayne@69 7683 ) {
jpayne@69 7684 #if !CYTHON_METH_FASTCALL
jpayne@69 7685 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 7686 #endif
jpayne@69 7687 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7688 PyObject *__pyx_r = 0;
jpayne@69 7689 __Pyx_RefNannyDeclarations
jpayne@69 7690 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 7691 #if !CYTHON_METH_FASTCALL
jpayne@69 7692 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 7693 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 7694 #else
jpayne@69 7695 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 7696 #endif
jpayne@69 7697 #endif
jpayne@69 7698 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 7699 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 7700 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 7701 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 7702 __pyx_r = __pyx_pf_5pysam_9libctabix_6Parser_8__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_v_self));
jpayne@69 7703
jpayne@69 7704 /* function exit code */
jpayne@69 7705 __Pyx_RefNannyFinishContext();
jpayne@69 7706 return __pyx_r;
jpayne@69 7707 }
jpayne@69 7708
jpayne@69 7709 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_8__reduce_cython__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self) {
jpayne@69 7710 PyObject *__pyx_v_state = 0;
jpayne@69 7711 PyObject *__pyx_v__dict = 0;
jpayne@69 7712 int __pyx_v_use_setstate;
jpayne@69 7713 PyObject *__pyx_r = NULL;
jpayne@69 7714 __Pyx_TraceDeclarations
jpayne@69 7715 __Pyx_RefNannyDeclarations
jpayne@69 7716 PyObject *__pyx_t_1 = NULL;
jpayne@69 7717 int __pyx_t_2;
jpayne@69 7718 PyObject *__pyx_t_3 = NULL;
jpayne@69 7719 PyObject *__pyx_t_4 = NULL;
jpayne@69 7720 int __pyx_lineno = 0;
jpayne@69 7721 const char *__pyx_filename = NULL;
jpayne@69 7722 int __pyx_clineno = 0;
jpayne@69 7723 __Pyx_TraceFrameInit(__pyx_codeobj__3)
jpayne@69 7724 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 7725 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 7726
jpayne@69 7727 /* "(tree fragment)":5
jpayne@69 7728 * cdef object _dict
jpayne@69 7729 * cdef bint use_setstate
jpayne@69 7730 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@69 7731 * _dict = getattr(self, '__dict__', None)
jpayne@69 7732 * if _dict is not None:
jpayne@69 7733 */
jpayne@69 7734 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 7735 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 7736 __Pyx_INCREF(__pyx_v_self->encoding);
jpayne@69 7737 __Pyx_GIVEREF(__pyx_v_self->encoding);
jpayne@69 7738 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 7739 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@69 7740 __pyx_t_1 = 0;
jpayne@69 7741
jpayne@69 7742 /* "(tree fragment)":6
jpayne@69 7743 * cdef bint use_setstate
jpayne@69 7744 * state = (self.encoding,)
jpayne@69 7745 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@69 7746 * if _dict is not None:
jpayne@69 7747 * state += (_dict,)
jpayne@69 7748 */
jpayne@69 7749 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 7750 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 7751 __pyx_v__dict = __pyx_t_1;
jpayne@69 7752 __pyx_t_1 = 0;
jpayne@69 7753
jpayne@69 7754 /* "(tree fragment)":7
jpayne@69 7755 * state = (self.encoding,)
jpayne@69 7756 * _dict = getattr(self, '__dict__', None)
jpayne@69 7757 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 7758 * state += (_dict,)
jpayne@69 7759 * use_setstate = True
jpayne@69 7760 */
jpayne@69 7761 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@69 7762 if (__pyx_t_2) {
jpayne@69 7763
jpayne@69 7764 /* "(tree fragment)":8
jpayne@69 7765 * _dict = getattr(self, '__dict__', None)
jpayne@69 7766 * if _dict is not None:
jpayne@69 7767 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@69 7768 * use_setstate = True
jpayne@69 7769 * else:
jpayne@69 7770 */
jpayne@69 7771 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 7772 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 7773 __Pyx_INCREF(__pyx_v__dict);
jpayne@69 7774 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@69 7775 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@69 7776 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 7777 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 7778 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 7779 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@69 7780 __pyx_t_3 = 0;
jpayne@69 7781
jpayne@69 7782 /* "(tree fragment)":9
jpayne@69 7783 * if _dict is not None:
jpayne@69 7784 * state += (_dict,)
jpayne@69 7785 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@69 7786 * else:
jpayne@69 7787 * use_setstate = self.encoding is not None
jpayne@69 7788 */
jpayne@69 7789 __pyx_v_use_setstate = 1;
jpayne@69 7790
jpayne@69 7791 /* "(tree fragment)":7
jpayne@69 7792 * state = (self.encoding,)
jpayne@69 7793 * _dict = getattr(self, '__dict__', None)
jpayne@69 7794 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 7795 * state += (_dict,)
jpayne@69 7796 * use_setstate = True
jpayne@69 7797 */
jpayne@69 7798 goto __pyx_L3;
jpayne@69 7799 }
jpayne@69 7800
jpayne@69 7801 /* "(tree fragment)":11
jpayne@69 7802 * use_setstate = True
jpayne@69 7803 * else:
jpayne@69 7804 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@69 7805 * if use_setstate:
jpayne@69 7806 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, None), state
jpayne@69 7807 */
jpayne@69 7808 /*else*/ {
jpayne@69 7809 __pyx_t_2 = (__pyx_v_self->encoding != Py_None);
jpayne@69 7810 __pyx_v_use_setstate = __pyx_t_2;
jpayne@69 7811 }
jpayne@69 7812 __pyx_L3:;
jpayne@69 7813
jpayne@69 7814 /* "(tree fragment)":12
jpayne@69 7815 * else:
jpayne@69 7816 * use_setstate = self.encoding is not None
jpayne@69 7817 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 7818 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, None), state
jpayne@69 7819 * else:
jpayne@69 7820 */
jpayne@69 7821 if (__pyx_v_use_setstate) {
jpayne@69 7822
jpayne@69 7823 /* "(tree fragment)":13
jpayne@69 7824 * use_setstate = self.encoding is not None
jpayne@69 7825 * if use_setstate:
jpayne@69 7826 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@69 7827 * else:
jpayne@69 7828 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@69 7829 */
jpayne@69 7830 __Pyx_XDECREF(__pyx_r);
jpayne@69 7831 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Parser); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 7832 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 7833 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 7834 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 7835 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 7836 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 7837 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 7838 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 7839 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 7840 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 7841 __Pyx_INCREF(Py_None);
jpayne@69 7842 __Pyx_GIVEREF(Py_None);
jpayne@69 7843 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 7844 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 7845 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 7846 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 7847 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 7848 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 7849 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 7850 __Pyx_INCREF(__pyx_v_state);
jpayne@69 7851 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 7852 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 7853 __pyx_t_3 = 0;
jpayne@69 7854 __pyx_t_1 = 0;
jpayne@69 7855 __pyx_r = __pyx_t_4;
jpayne@69 7856 __pyx_t_4 = 0;
jpayne@69 7857 goto __pyx_L0;
jpayne@69 7858
jpayne@69 7859 /* "(tree fragment)":12
jpayne@69 7860 * else:
jpayne@69 7861 * use_setstate = self.encoding is not None
jpayne@69 7862 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 7863 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, None), state
jpayne@69 7864 * else:
jpayne@69 7865 */
jpayne@69 7866 }
jpayne@69 7867
jpayne@69 7868 /* "(tree fragment)":15
jpayne@69 7869 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, None), state
jpayne@69 7870 * else:
jpayne@69 7871 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@69 7872 * def __setstate_cython__(self, __pyx_state):
jpayne@69 7873 * __pyx_unpickle_Parser__set_state(self, __pyx_state)
jpayne@69 7874 */
jpayne@69 7875 /*else*/ {
jpayne@69 7876 __Pyx_XDECREF(__pyx_r);
jpayne@69 7877 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Parser); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 7878 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 7879 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 7880 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 7881 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 7882 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 7883 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 7884 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 7885 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 7886 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 7887 __Pyx_INCREF(__pyx_v_state);
jpayne@69 7888 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 7889 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 7890 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 7891 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 7892 __Pyx_GIVEREF(__pyx_t_4);
jpayne@69 7893 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 7894 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 7895 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 7896 __pyx_t_4 = 0;
jpayne@69 7897 __pyx_t_1 = 0;
jpayne@69 7898 __pyx_r = __pyx_t_3;
jpayne@69 7899 __pyx_t_3 = 0;
jpayne@69 7900 goto __pyx_L0;
jpayne@69 7901 }
jpayne@69 7902
jpayne@69 7903 /* "(tree fragment)":1
jpayne@69 7904 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 7905 * cdef tuple state
jpayne@69 7906 * cdef object _dict
jpayne@69 7907 */
jpayne@69 7908
jpayne@69 7909 /* function exit code */
jpayne@69 7910 __pyx_L1_error:;
jpayne@69 7911 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 7912 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 7913 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 7914 __Pyx_AddTraceback("pysam.libctabix.Parser.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7915 __pyx_r = NULL;
jpayne@69 7916 __pyx_L0:;
jpayne@69 7917 __Pyx_XDECREF(__pyx_v_state);
jpayne@69 7918 __Pyx_XDECREF(__pyx_v__dict);
jpayne@69 7919 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7920 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7921 __Pyx_RefNannyFinishContext();
jpayne@69 7922 return __pyx_r;
jpayne@69 7923 }
jpayne@69 7924
jpayne@69 7925 /* "(tree fragment)":16
jpayne@69 7926 * else:
jpayne@69 7927 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@69 7928 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 7929 * __pyx_unpickle_Parser__set_state(self, __pyx_state)
jpayne@69 7930 */
jpayne@69 7931
jpayne@69 7932 /* Python wrapper */
jpayne@69 7933 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 7934 #if CYTHON_METH_FASTCALL
jpayne@69 7935 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7936 #else
jpayne@69 7937 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7938 #endif
jpayne@69 7939 ); /*proto*/
jpayne@69 7940 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6Parser_10__setstate_cython__, "Parser.__setstate_cython__(self, __pyx_state)");
jpayne@69 7941 static PyMethodDef __pyx_mdef_5pysam_9libctabix_6Parser_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6Parser_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6Parser_10__setstate_cython__};
jpayne@69 7942 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 7943 #if CYTHON_METH_FASTCALL
jpayne@69 7944 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7945 #else
jpayne@69 7946 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7947 #endif
jpayne@69 7948 ) {
jpayne@69 7949 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 7950 #if !CYTHON_METH_FASTCALL
jpayne@69 7951 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 7952 #endif
jpayne@69 7953 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7954 PyObject* values[1] = {0};
jpayne@69 7955 int __pyx_lineno = 0;
jpayne@69 7956 const char *__pyx_filename = NULL;
jpayne@69 7957 int __pyx_clineno = 0;
jpayne@69 7958 PyObject *__pyx_r = 0;
jpayne@69 7959 __Pyx_RefNannyDeclarations
jpayne@69 7960 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 7961 #if !CYTHON_METH_FASTCALL
jpayne@69 7962 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 7963 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 7964 #else
jpayne@69 7965 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 7966 #endif
jpayne@69 7967 #endif
jpayne@69 7968 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 7969 {
jpayne@69 7970 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 7971 if (__pyx_kwds) {
jpayne@69 7972 Py_ssize_t kw_args;
jpayne@69 7973 switch (__pyx_nargs) {
jpayne@69 7974 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 7975 CYTHON_FALLTHROUGH;
jpayne@69 7976 case 0: break;
jpayne@69 7977 default: goto __pyx_L5_argtuple_error;
jpayne@69 7978 }
jpayne@69 7979 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 7980 switch (__pyx_nargs) {
jpayne@69 7981 case 0:
jpayne@69 7982 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 7983 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 7984 kw_args--;
jpayne@69 7985 }
jpayne@69 7986 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 7987 else goto __pyx_L5_argtuple_error;
jpayne@69 7988 }
jpayne@69 7989 if (unlikely(kw_args > 0)) {
jpayne@69 7990 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 7991 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)
jpayne@69 7992 }
jpayne@69 7993 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 7994 goto __pyx_L5_argtuple_error;
jpayne@69 7995 } else {
jpayne@69 7996 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 7997 }
jpayne@69 7998 __pyx_v___pyx_state = values[0];
jpayne@69 7999 }
jpayne@69 8000 goto __pyx_L6_skip;
jpayne@69 8001 __pyx_L5_argtuple_error:;
jpayne@69 8002 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 8003 __pyx_L6_skip:;
jpayne@69 8004 goto __pyx_L4_argument_unpacking_done;
jpayne@69 8005 __pyx_L3_error:;
jpayne@69 8006 {
jpayne@69 8007 Py_ssize_t __pyx_temp;
jpayne@69 8008 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 8009 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 8010 }
jpayne@69 8011 }
jpayne@69 8012 __Pyx_AddTraceback("pysam.libctabix.Parser.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8013 __Pyx_RefNannyFinishContext();
jpayne@69 8014 return NULL;
jpayne@69 8015 __pyx_L4_argument_unpacking_done:;
jpayne@69 8016 __pyx_r = __pyx_pf_5pysam_9libctabix_6Parser_10__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 8017
jpayne@69 8018 /* function exit code */
jpayne@69 8019 {
jpayne@69 8020 Py_ssize_t __pyx_temp;
jpayne@69 8021 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 8022 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 8023 }
jpayne@69 8024 }
jpayne@69 8025 __Pyx_RefNannyFinishContext();
jpayne@69 8026 return __pyx_r;
jpayne@69 8027 }
jpayne@69 8028
jpayne@69 8029 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_10__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
jpayne@69 8030 PyObject *__pyx_r = NULL;
jpayne@69 8031 __Pyx_TraceDeclarations
jpayne@69 8032 __Pyx_RefNannyDeclarations
jpayne@69 8033 PyObject *__pyx_t_1 = NULL;
jpayne@69 8034 int __pyx_lineno = 0;
jpayne@69 8035 const char *__pyx_filename = NULL;
jpayne@69 8036 int __pyx_clineno = 0;
jpayne@69 8037 __Pyx_TraceFrameInit(__pyx_codeobj__4)
jpayne@69 8038 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 8039 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@69 8040
jpayne@69 8041 /* "(tree fragment)":17
jpayne@69 8042 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@69 8043 * def __setstate_cython__(self, __pyx_state):
jpayne@69 8044 * __pyx_unpickle_Parser__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 8045 */
jpayne@69 8046 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)
jpayne@69 8047 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_Parser__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
jpayne@69 8048 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8049 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8050
jpayne@69 8051 /* "(tree fragment)":16
jpayne@69 8052 * else:
jpayne@69 8053 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@69 8054 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 8055 * __pyx_unpickle_Parser__set_state(self, __pyx_state)
jpayne@69 8056 */
jpayne@69 8057
jpayne@69 8058 /* function exit code */
jpayne@69 8059 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 8060 goto __pyx_L0;
jpayne@69 8061 __pyx_L1_error:;
jpayne@69 8062 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 8063 __Pyx_AddTraceback("pysam.libctabix.Parser.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8064 __pyx_r = NULL;
jpayne@69 8065 __pyx_L0:;
jpayne@69 8066 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 8067 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 8068 __Pyx_RefNannyFinishContext();
jpayne@69 8069 return __pyx_r;
jpayne@69 8070 }
jpayne@69 8071
jpayne@69 8072 /* "pysam/libctabix.pyx":106
jpayne@69 8073 * A field in a row is accessed by numeric index.
jpayne@69 8074 * '''
jpayne@69 8075 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@69 8076 * cdef ctabixproxies.TupleProxy r
jpayne@69 8077 * r = ctabixproxies.TupleProxy(self.encoding)
jpayne@69 8078 */
jpayne@69 8079
jpayne@69 8080 static PyObject *__pyx_f_5pysam_9libctabix_7asTuple_parse(struct __pyx_obj_5pysam_9libctabix_asTuple *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
jpayne@69 8081 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_r = 0;
jpayne@69 8082 PyObject *__pyx_r = NULL;
jpayne@69 8083 __Pyx_TraceDeclarations
jpayne@69 8084 __Pyx_RefNannyDeclarations
jpayne@69 8085 PyObject *__pyx_t_1 = NULL;
jpayne@69 8086 int __pyx_lineno = 0;
jpayne@69 8087 const char *__pyx_filename = NULL;
jpayne@69 8088 int __pyx_clineno = 0;
jpayne@69 8089 __Pyx_RefNannySetupContext("parse", 1);
jpayne@69 8090 __Pyx_TraceCall("parse", __pyx_f[0], 106, 0, __PYX_ERR(0, 106, __pyx_L1_error));
jpayne@69 8091
jpayne@69 8092 /* "pysam/libctabix.pyx":108
jpayne@69 8093 * cdef parse(self, char * buffer, int len):
jpayne@69 8094 * cdef ctabixproxies.TupleProxy r
jpayne@69 8095 * r = ctabixproxies.TupleProxy(self.encoding) # <<<<<<<<<<<<<<
jpayne@69 8096 * # need to copy - there were some
jpayne@69 8097 * # persistence issues with "present"
jpayne@69 8098 */
jpayne@69 8099 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy), __pyx_v_self->__pyx_base.encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error)
jpayne@69 8100 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8101 __pyx_v_r = ((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_t_1);
jpayne@69 8102 __pyx_t_1 = 0;
jpayne@69 8103
jpayne@69 8104 /* "pysam/libctabix.pyx":111
jpayne@69 8105 * # need to copy - there were some
jpayne@69 8106 * # persistence issues with "present"
jpayne@69 8107 * r.copy(buffer, len) # <<<<<<<<<<<<<<
jpayne@69 8108 * return r
jpayne@69 8109 *
jpayne@69 8110 */
jpayne@69 8111 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_r->__pyx_vtab)->copy(__pyx_v_r, __pyx_v_buffer, __pyx_v_len, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
jpayne@69 8112 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8113 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8114
jpayne@69 8115 /* "pysam/libctabix.pyx":112
jpayne@69 8116 * # persistence issues with "present"
jpayne@69 8117 * r.copy(buffer, len)
jpayne@69 8118 * return r # <<<<<<<<<<<<<<
jpayne@69 8119 *
jpayne@69 8120 *
jpayne@69 8121 */
jpayne@69 8122 __Pyx_XDECREF(__pyx_r);
jpayne@69 8123 __Pyx_INCREF((PyObject *)__pyx_v_r);
jpayne@69 8124 __pyx_r = ((PyObject *)__pyx_v_r);
jpayne@69 8125 goto __pyx_L0;
jpayne@69 8126
jpayne@69 8127 /* "pysam/libctabix.pyx":106
jpayne@69 8128 * A field in a row is accessed by numeric index.
jpayne@69 8129 * '''
jpayne@69 8130 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@69 8131 * cdef ctabixproxies.TupleProxy r
jpayne@69 8132 * r = ctabixproxies.TupleProxy(self.encoding)
jpayne@69 8133 */
jpayne@69 8134
jpayne@69 8135 /* function exit code */
jpayne@69 8136 __pyx_L1_error:;
jpayne@69 8137 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 8138 __Pyx_AddTraceback("pysam.libctabix.asTuple.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8139 __pyx_r = 0;
jpayne@69 8140 __pyx_L0:;
jpayne@69 8141 __Pyx_XDECREF((PyObject *)__pyx_v_r);
jpayne@69 8142 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 8143 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 8144 __Pyx_RefNannyFinishContext();
jpayne@69 8145 return __pyx_r;
jpayne@69 8146 }
jpayne@69 8147
jpayne@69 8148 /* "(tree fragment)":1
jpayne@69 8149 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 8150 * cdef tuple state
jpayne@69 8151 * cdef object _dict
jpayne@69 8152 */
jpayne@69 8153
jpayne@69 8154 /* Python wrapper */
jpayne@69 8155 static PyObject *__pyx_pw_5pysam_9libctabix_7asTuple_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 8156 #if CYTHON_METH_FASTCALL
jpayne@69 8157 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 8158 #else
jpayne@69 8159 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 8160 #endif
jpayne@69 8161 ); /*proto*/
jpayne@69 8162 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_7asTuple___reduce_cython__, "asTuple.__reduce_cython__(self)");
jpayne@69 8163 static PyMethodDef __pyx_mdef_5pysam_9libctabix_7asTuple_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_7asTuple_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_7asTuple___reduce_cython__};
jpayne@69 8164 static PyObject *__pyx_pw_5pysam_9libctabix_7asTuple_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 8165 #if CYTHON_METH_FASTCALL
jpayne@69 8166 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 8167 #else
jpayne@69 8168 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 8169 #endif
jpayne@69 8170 ) {
jpayne@69 8171 #if !CYTHON_METH_FASTCALL
jpayne@69 8172 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 8173 #endif
jpayne@69 8174 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 8175 PyObject *__pyx_r = 0;
jpayne@69 8176 __Pyx_RefNannyDeclarations
jpayne@69 8177 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 8178 #if !CYTHON_METH_FASTCALL
jpayne@69 8179 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 8180 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 8181 #else
jpayne@69 8182 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 8183 #endif
jpayne@69 8184 #endif
jpayne@69 8185 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 8186 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 8187 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 8188 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 8189 __pyx_r = __pyx_pf_5pysam_9libctabix_7asTuple___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_asTuple *)__pyx_v_self));
jpayne@69 8190
jpayne@69 8191 /* function exit code */
jpayne@69 8192 __Pyx_RefNannyFinishContext();
jpayne@69 8193 return __pyx_r;
jpayne@69 8194 }
jpayne@69 8195
jpayne@69 8196 static PyObject *__pyx_pf_5pysam_9libctabix_7asTuple___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asTuple *__pyx_v_self) {
jpayne@69 8197 PyObject *__pyx_v_state = 0;
jpayne@69 8198 PyObject *__pyx_v__dict = 0;
jpayne@69 8199 int __pyx_v_use_setstate;
jpayne@69 8200 PyObject *__pyx_r = NULL;
jpayne@69 8201 __Pyx_TraceDeclarations
jpayne@69 8202 __Pyx_RefNannyDeclarations
jpayne@69 8203 PyObject *__pyx_t_1 = NULL;
jpayne@69 8204 int __pyx_t_2;
jpayne@69 8205 PyObject *__pyx_t_3 = NULL;
jpayne@69 8206 PyObject *__pyx_t_4 = NULL;
jpayne@69 8207 int __pyx_lineno = 0;
jpayne@69 8208 const char *__pyx_filename = NULL;
jpayne@69 8209 int __pyx_clineno = 0;
jpayne@69 8210 __Pyx_TraceFrameInit(__pyx_codeobj__5)
jpayne@69 8211 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 8212 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 8213
jpayne@69 8214 /* "(tree fragment)":5
jpayne@69 8215 * cdef object _dict
jpayne@69 8216 * cdef bint use_setstate
jpayne@69 8217 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@69 8218 * _dict = getattr(self, '__dict__', None)
jpayne@69 8219 * if _dict is not None:
jpayne@69 8220 */
jpayne@69 8221 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 8222 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8223 __Pyx_INCREF(__pyx_v_self->__pyx_base.encoding);
jpayne@69 8224 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.encoding);
jpayne@69 8225 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 8226 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@69 8227 __pyx_t_1 = 0;
jpayne@69 8228
jpayne@69 8229 /* "(tree fragment)":6
jpayne@69 8230 * cdef bint use_setstate
jpayne@69 8231 * state = (self.encoding,)
jpayne@69 8232 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@69 8233 * if _dict is not None:
jpayne@69 8234 * state += (_dict,)
jpayne@69 8235 */
jpayne@69 8236 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 8237 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8238 __pyx_v__dict = __pyx_t_1;
jpayne@69 8239 __pyx_t_1 = 0;
jpayne@69 8240
jpayne@69 8241 /* "(tree fragment)":7
jpayne@69 8242 * state = (self.encoding,)
jpayne@69 8243 * _dict = getattr(self, '__dict__', None)
jpayne@69 8244 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 8245 * state += (_dict,)
jpayne@69 8246 * use_setstate = True
jpayne@69 8247 */
jpayne@69 8248 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@69 8249 if (__pyx_t_2) {
jpayne@69 8250
jpayne@69 8251 /* "(tree fragment)":8
jpayne@69 8252 * _dict = getattr(self, '__dict__', None)
jpayne@69 8253 * if _dict is not None:
jpayne@69 8254 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@69 8255 * use_setstate = True
jpayne@69 8256 * else:
jpayne@69 8257 */
jpayne@69 8258 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 8259 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8260 __Pyx_INCREF(__pyx_v__dict);
jpayne@69 8261 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@69 8262 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@69 8263 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 8264 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 8265 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8266 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@69 8267 __pyx_t_3 = 0;
jpayne@69 8268
jpayne@69 8269 /* "(tree fragment)":9
jpayne@69 8270 * if _dict is not None:
jpayne@69 8271 * state += (_dict,)
jpayne@69 8272 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@69 8273 * else:
jpayne@69 8274 * use_setstate = self.encoding is not None
jpayne@69 8275 */
jpayne@69 8276 __pyx_v_use_setstate = 1;
jpayne@69 8277
jpayne@69 8278 /* "(tree fragment)":7
jpayne@69 8279 * state = (self.encoding,)
jpayne@69 8280 * _dict = getattr(self, '__dict__', None)
jpayne@69 8281 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 8282 * state += (_dict,)
jpayne@69 8283 * use_setstate = True
jpayne@69 8284 */
jpayne@69 8285 goto __pyx_L3;
jpayne@69 8286 }
jpayne@69 8287
jpayne@69 8288 /* "(tree fragment)":11
jpayne@69 8289 * use_setstate = True
jpayne@69 8290 * else:
jpayne@69 8291 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@69 8292 * if use_setstate:
jpayne@69 8293 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, None), state
jpayne@69 8294 */
jpayne@69 8295 /*else*/ {
jpayne@69 8296 __pyx_t_2 = (__pyx_v_self->__pyx_base.encoding != Py_None);
jpayne@69 8297 __pyx_v_use_setstate = __pyx_t_2;
jpayne@69 8298 }
jpayne@69 8299 __pyx_L3:;
jpayne@69 8300
jpayne@69 8301 /* "(tree fragment)":12
jpayne@69 8302 * else:
jpayne@69 8303 * use_setstate = self.encoding is not None
jpayne@69 8304 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 8305 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, None), state
jpayne@69 8306 * else:
jpayne@69 8307 */
jpayne@69 8308 if (__pyx_v_use_setstate) {
jpayne@69 8309
jpayne@69 8310 /* "(tree fragment)":13
jpayne@69 8311 * use_setstate = self.encoding is not None
jpayne@69 8312 * if use_setstate:
jpayne@69 8313 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@69 8314 * else:
jpayne@69 8315 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@69 8316 */
jpayne@69 8317 __Pyx_XDECREF(__pyx_r);
jpayne@69 8318 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_asTuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 8319 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 8320 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 8321 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8322 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 8323 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 8324 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8325 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 8326 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 8327 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8328 __Pyx_INCREF(Py_None);
jpayne@69 8329 __Pyx_GIVEREF(Py_None);
jpayne@69 8330 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8331 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 8332 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 8333 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 8334 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8335 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 8336 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8337 __Pyx_INCREF(__pyx_v_state);
jpayne@69 8338 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 8339 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8340 __pyx_t_3 = 0;
jpayne@69 8341 __pyx_t_1 = 0;
jpayne@69 8342 __pyx_r = __pyx_t_4;
jpayne@69 8343 __pyx_t_4 = 0;
jpayne@69 8344 goto __pyx_L0;
jpayne@69 8345
jpayne@69 8346 /* "(tree fragment)":12
jpayne@69 8347 * else:
jpayne@69 8348 * use_setstate = self.encoding is not None
jpayne@69 8349 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 8350 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, None), state
jpayne@69 8351 * else:
jpayne@69 8352 */
jpayne@69 8353 }
jpayne@69 8354
jpayne@69 8355 /* "(tree fragment)":15
jpayne@69 8356 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, None), state
jpayne@69 8357 * else:
jpayne@69 8358 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@69 8359 * def __setstate_cython__(self, __pyx_state):
jpayne@69 8360 * __pyx_unpickle_asTuple__set_state(self, __pyx_state)
jpayne@69 8361 */
jpayne@69 8362 /*else*/ {
jpayne@69 8363 __Pyx_XDECREF(__pyx_r);
jpayne@69 8364 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_asTuple); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 8365 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 8366 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 8367 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8368 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 8369 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 8370 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 8371 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 8372 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 8373 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 8374 __Pyx_INCREF(__pyx_v_state);
jpayne@69 8375 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 8376 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 8377 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 8378 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 8379 __Pyx_GIVEREF(__pyx_t_4);
jpayne@69 8380 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 8381 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 8382 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 8383 __pyx_t_4 = 0;
jpayne@69 8384 __pyx_t_1 = 0;
jpayne@69 8385 __pyx_r = __pyx_t_3;
jpayne@69 8386 __pyx_t_3 = 0;
jpayne@69 8387 goto __pyx_L0;
jpayne@69 8388 }
jpayne@69 8389
jpayne@69 8390 /* "(tree fragment)":1
jpayne@69 8391 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 8392 * cdef tuple state
jpayne@69 8393 * cdef object _dict
jpayne@69 8394 */
jpayne@69 8395
jpayne@69 8396 /* function exit code */
jpayne@69 8397 __pyx_L1_error:;
jpayne@69 8398 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 8399 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 8400 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 8401 __Pyx_AddTraceback("pysam.libctabix.asTuple.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8402 __pyx_r = NULL;
jpayne@69 8403 __pyx_L0:;
jpayne@69 8404 __Pyx_XDECREF(__pyx_v_state);
jpayne@69 8405 __Pyx_XDECREF(__pyx_v__dict);
jpayne@69 8406 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 8407 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 8408 __Pyx_RefNannyFinishContext();
jpayne@69 8409 return __pyx_r;
jpayne@69 8410 }
jpayne@69 8411
jpayne@69 8412 /* "(tree fragment)":16
jpayne@69 8413 * else:
jpayne@69 8414 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@69 8415 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 8416 * __pyx_unpickle_asTuple__set_state(self, __pyx_state)
jpayne@69 8417 */
jpayne@69 8418
jpayne@69 8419 /* Python wrapper */
jpayne@69 8420 static PyObject *__pyx_pw_5pysam_9libctabix_7asTuple_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 8421 #if CYTHON_METH_FASTCALL
jpayne@69 8422 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 8423 #else
jpayne@69 8424 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 8425 #endif
jpayne@69 8426 ); /*proto*/
jpayne@69 8427 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_7asTuple_2__setstate_cython__, "asTuple.__setstate_cython__(self, __pyx_state)");
jpayne@69 8428 static PyMethodDef __pyx_mdef_5pysam_9libctabix_7asTuple_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_7asTuple_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_7asTuple_2__setstate_cython__};
jpayne@69 8429 static PyObject *__pyx_pw_5pysam_9libctabix_7asTuple_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 8430 #if CYTHON_METH_FASTCALL
jpayne@69 8431 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 8432 #else
jpayne@69 8433 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 8434 #endif
jpayne@69 8435 ) {
jpayne@69 8436 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 8437 #if !CYTHON_METH_FASTCALL
jpayne@69 8438 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 8439 #endif
jpayne@69 8440 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 8441 PyObject* values[1] = {0};
jpayne@69 8442 int __pyx_lineno = 0;
jpayne@69 8443 const char *__pyx_filename = NULL;
jpayne@69 8444 int __pyx_clineno = 0;
jpayne@69 8445 PyObject *__pyx_r = 0;
jpayne@69 8446 __Pyx_RefNannyDeclarations
jpayne@69 8447 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 8448 #if !CYTHON_METH_FASTCALL
jpayne@69 8449 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 8450 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 8451 #else
jpayne@69 8452 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 8453 #endif
jpayne@69 8454 #endif
jpayne@69 8455 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 8456 {
jpayne@69 8457 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 8458 if (__pyx_kwds) {
jpayne@69 8459 Py_ssize_t kw_args;
jpayne@69 8460 switch (__pyx_nargs) {
jpayne@69 8461 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 8462 CYTHON_FALLTHROUGH;
jpayne@69 8463 case 0: break;
jpayne@69 8464 default: goto __pyx_L5_argtuple_error;
jpayne@69 8465 }
jpayne@69 8466 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 8467 switch (__pyx_nargs) {
jpayne@69 8468 case 0:
jpayne@69 8469 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 8470 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 8471 kw_args--;
jpayne@69 8472 }
jpayne@69 8473 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 8474 else goto __pyx_L5_argtuple_error;
jpayne@69 8475 }
jpayne@69 8476 if (unlikely(kw_args > 0)) {
jpayne@69 8477 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 8478 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)
jpayne@69 8479 }
jpayne@69 8480 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 8481 goto __pyx_L5_argtuple_error;
jpayne@69 8482 } else {
jpayne@69 8483 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 8484 }
jpayne@69 8485 __pyx_v___pyx_state = values[0];
jpayne@69 8486 }
jpayne@69 8487 goto __pyx_L6_skip;
jpayne@69 8488 __pyx_L5_argtuple_error:;
jpayne@69 8489 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 8490 __pyx_L6_skip:;
jpayne@69 8491 goto __pyx_L4_argument_unpacking_done;
jpayne@69 8492 __pyx_L3_error:;
jpayne@69 8493 {
jpayne@69 8494 Py_ssize_t __pyx_temp;
jpayne@69 8495 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 8496 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 8497 }
jpayne@69 8498 }
jpayne@69 8499 __Pyx_AddTraceback("pysam.libctabix.asTuple.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8500 __Pyx_RefNannyFinishContext();
jpayne@69 8501 return NULL;
jpayne@69 8502 __pyx_L4_argument_unpacking_done:;
jpayne@69 8503 __pyx_r = __pyx_pf_5pysam_9libctabix_7asTuple_2__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_asTuple *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 8504
jpayne@69 8505 /* function exit code */
jpayne@69 8506 {
jpayne@69 8507 Py_ssize_t __pyx_temp;
jpayne@69 8508 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 8509 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 8510 }
jpayne@69 8511 }
jpayne@69 8512 __Pyx_RefNannyFinishContext();
jpayne@69 8513 return __pyx_r;
jpayne@69 8514 }
jpayne@69 8515
jpayne@69 8516 static PyObject *__pyx_pf_5pysam_9libctabix_7asTuple_2__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_asTuple *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
jpayne@69 8517 PyObject *__pyx_r = NULL;
jpayne@69 8518 __Pyx_TraceDeclarations
jpayne@69 8519 __Pyx_RefNannyDeclarations
jpayne@69 8520 PyObject *__pyx_t_1 = NULL;
jpayne@69 8521 int __pyx_lineno = 0;
jpayne@69 8522 const char *__pyx_filename = NULL;
jpayne@69 8523 int __pyx_clineno = 0;
jpayne@69 8524 __Pyx_TraceFrameInit(__pyx_codeobj__6)
jpayne@69 8525 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 8526 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@69 8527
jpayne@69 8528 /* "(tree fragment)":17
jpayne@69 8529 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@69 8530 * def __setstate_cython__(self, __pyx_state):
jpayne@69 8531 * __pyx_unpickle_asTuple__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 8532 */
jpayne@69 8533 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)
jpayne@69 8534 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_asTuple__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
jpayne@69 8535 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8536 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8537
jpayne@69 8538 /* "(tree fragment)":16
jpayne@69 8539 * else:
jpayne@69 8540 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@69 8541 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 8542 * __pyx_unpickle_asTuple__set_state(self, __pyx_state)
jpayne@69 8543 */
jpayne@69 8544
jpayne@69 8545 /* function exit code */
jpayne@69 8546 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 8547 goto __pyx_L0;
jpayne@69 8548 __pyx_L1_error:;
jpayne@69 8549 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 8550 __Pyx_AddTraceback("pysam.libctabix.asTuple.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8551 __pyx_r = NULL;
jpayne@69 8552 __pyx_L0:;
jpayne@69 8553 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 8554 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 8555 __Pyx_RefNannyFinishContext();
jpayne@69 8556 return __pyx_r;
jpayne@69 8557 }
jpayne@69 8558
jpayne@69 8559 /* "pysam/libctabix.pyx":144
jpayne@69 8560 *
jpayne@69 8561 * '''
jpayne@69 8562 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@69 8563 * cdef ctabixproxies.GFF3Proxy r
jpayne@69 8564 * r = ctabixproxies.GFF3Proxy(self.encoding)
jpayne@69 8565 */
jpayne@69 8566
jpayne@69 8567 static PyObject *__pyx_f_5pysam_9libctabix_6asGFF3_parse(struct __pyx_obj_5pysam_9libctabix_asGFF3 *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
jpayne@69 8568 struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *__pyx_v_r = 0;
jpayne@69 8569 PyObject *__pyx_r = NULL;
jpayne@69 8570 __Pyx_TraceDeclarations
jpayne@69 8571 __Pyx_RefNannyDeclarations
jpayne@69 8572 PyObject *__pyx_t_1 = NULL;
jpayne@69 8573 int __pyx_lineno = 0;
jpayne@69 8574 const char *__pyx_filename = NULL;
jpayne@69 8575 int __pyx_clineno = 0;
jpayne@69 8576 __Pyx_RefNannySetupContext("parse", 1);
jpayne@69 8577 __Pyx_TraceCall("parse", __pyx_f[0], 144, 0, __PYX_ERR(0, 144, __pyx_L1_error));
jpayne@69 8578
jpayne@69 8579 /* "pysam/libctabix.pyx":146
jpayne@69 8580 * cdef parse(self, char * buffer, int len):
jpayne@69 8581 * cdef ctabixproxies.GFF3Proxy r
jpayne@69 8582 * r = ctabixproxies.GFF3Proxy(self.encoding) # <<<<<<<<<<<<<<
jpayne@69 8583 * r.copy(buffer, len)
jpayne@69 8584 * return r
jpayne@69 8585 */
jpayne@69 8586 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy), __pyx_v_self->__pyx_base.encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
jpayne@69 8587 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8588 __pyx_v_r = ((struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *)__pyx_t_1);
jpayne@69 8589 __pyx_t_1 = 0;
jpayne@69 8590
jpayne@69 8591 /* "pysam/libctabix.pyx":147
jpayne@69 8592 * cdef ctabixproxies.GFF3Proxy r
jpayne@69 8593 * r = ctabixproxies.GFF3Proxy(self.encoding)
jpayne@69 8594 * r.copy(buffer, len) # <<<<<<<<<<<<<<
jpayne@69 8595 * return r
jpayne@69 8596 *
jpayne@69 8597 */
jpayne@69 8598 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy *)__pyx_v_r->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.copy(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
jpayne@69 8599 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8600 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8601
jpayne@69 8602 /* "pysam/libctabix.pyx":148
jpayne@69 8603 * r = ctabixproxies.GFF3Proxy(self.encoding)
jpayne@69 8604 * r.copy(buffer, len)
jpayne@69 8605 * return r # <<<<<<<<<<<<<<
jpayne@69 8606 *
jpayne@69 8607 *
jpayne@69 8608 */
jpayne@69 8609 __Pyx_XDECREF(__pyx_r);
jpayne@69 8610 __Pyx_INCREF((PyObject *)__pyx_v_r);
jpayne@69 8611 __pyx_r = ((PyObject *)__pyx_v_r);
jpayne@69 8612 goto __pyx_L0;
jpayne@69 8613
jpayne@69 8614 /* "pysam/libctabix.pyx":144
jpayne@69 8615 *
jpayne@69 8616 * '''
jpayne@69 8617 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@69 8618 * cdef ctabixproxies.GFF3Proxy r
jpayne@69 8619 * r = ctabixproxies.GFF3Proxy(self.encoding)
jpayne@69 8620 */
jpayne@69 8621
jpayne@69 8622 /* function exit code */
jpayne@69 8623 __pyx_L1_error:;
jpayne@69 8624 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 8625 __Pyx_AddTraceback("pysam.libctabix.asGFF3.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8626 __pyx_r = 0;
jpayne@69 8627 __pyx_L0:;
jpayne@69 8628 __Pyx_XDECREF((PyObject *)__pyx_v_r);
jpayne@69 8629 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 8630 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 8631 __Pyx_RefNannyFinishContext();
jpayne@69 8632 return __pyx_r;
jpayne@69 8633 }
jpayne@69 8634
jpayne@69 8635 /* "(tree fragment)":1
jpayne@69 8636 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 8637 * cdef tuple state
jpayne@69 8638 * cdef object _dict
jpayne@69 8639 */
jpayne@69 8640
jpayne@69 8641 /* Python wrapper */
jpayne@69 8642 static PyObject *__pyx_pw_5pysam_9libctabix_6asGFF3_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 8643 #if CYTHON_METH_FASTCALL
jpayne@69 8644 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 8645 #else
jpayne@69 8646 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 8647 #endif
jpayne@69 8648 ); /*proto*/
jpayne@69 8649 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6asGFF3___reduce_cython__, "asGFF3.__reduce_cython__(self)");
jpayne@69 8650 static PyMethodDef __pyx_mdef_5pysam_9libctabix_6asGFF3_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6asGFF3_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6asGFF3___reduce_cython__};
jpayne@69 8651 static PyObject *__pyx_pw_5pysam_9libctabix_6asGFF3_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 8652 #if CYTHON_METH_FASTCALL
jpayne@69 8653 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 8654 #else
jpayne@69 8655 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 8656 #endif
jpayne@69 8657 ) {
jpayne@69 8658 #if !CYTHON_METH_FASTCALL
jpayne@69 8659 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 8660 #endif
jpayne@69 8661 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 8662 PyObject *__pyx_r = 0;
jpayne@69 8663 __Pyx_RefNannyDeclarations
jpayne@69 8664 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 8665 #if !CYTHON_METH_FASTCALL
jpayne@69 8666 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 8667 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 8668 #else
jpayne@69 8669 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 8670 #endif
jpayne@69 8671 #endif
jpayne@69 8672 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 8673 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 8674 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 8675 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 8676 __pyx_r = __pyx_pf_5pysam_9libctabix_6asGFF3___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_asGFF3 *)__pyx_v_self));
jpayne@69 8677
jpayne@69 8678 /* function exit code */
jpayne@69 8679 __Pyx_RefNannyFinishContext();
jpayne@69 8680 return __pyx_r;
jpayne@69 8681 }
jpayne@69 8682
jpayne@69 8683 static PyObject *__pyx_pf_5pysam_9libctabix_6asGFF3___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asGFF3 *__pyx_v_self) {
jpayne@69 8684 PyObject *__pyx_v_state = 0;
jpayne@69 8685 PyObject *__pyx_v__dict = 0;
jpayne@69 8686 int __pyx_v_use_setstate;
jpayne@69 8687 PyObject *__pyx_r = NULL;
jpayne@69 8688 __Pyx_TraceDeclarations
jpayne@69 8689 __Pyx_RefNannyDeclarations
jpayne@69 8690 PyObject *__pyx_t_1 = NULL;
jpayne@69 8691 int __pyx_t_2;
jpayne@69 8692 PyObject *__pyx_t_3 = NULL;
jpayne@69 8693 PyObject *__pyx_t_4 = NULL;
jpayne@69 8694 int __pyx_lineno = 0;
jpayne@69 8695 const char *__pyx_filename = NULL;
jpayne@69 8696 int __pyx_clineno = 0;
jpayne@69 8697 __Pyx_TraceFrameInit(__pyx_codeobj__7)
jpayne@69 8698 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 8699 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 8700
jpayne@69 8701 /* "(tree fragment)":5
jpayne@69 8702 * cdef object _dict
jpayne@69 8703 * cdef bint use_setstate
jpayne@69 8704 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@69 8705 * _dict = getattr(self, '__dict__', None)
jpayne@69 8706 * if _dict is not None:
jpayne@69 8707 */
jpayne@69 8708 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 8709 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8710 __Pyx_INCREF(__pyx_v_self->__pyx_base.encoding);
jpayne@69 8711 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.encoding);
jpayne@69 8712 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 8713 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@69 8714 __pyx_t_1 = 0;
jpayne@69 8715
jpayne@69 8716 /* "(tree fragment)":6
jpayne@69 8717 * cdef bint use_setstate
jpayne@69 8718 * state = (self.encoding,)
jpayne@69 8719 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@69 8720 * if _dict is not None:
jpayne@69 8721 * state += (_dict,)
jpayne@69 8722 */
jpayne@69 8723 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 8724 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8725 __pyx_v__dict = __pyx_t_1;
jpayne@69 8726 __pyx_t_1 = 0;
jpayne@69 8727
jpayne@69 8728 /* "(tree fragment)":7
jpayne@69 8729 * state = (self.encoding,)
jpayne@69 8730 * _dict = getattr(self, '__dict__', None)
jpayne@69 8731 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 8732 * state += (_dict,)
jpayne@69 8733 * use_setstate = True
jpayne@69 8734 */
jpayne@69 8735 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@69 8736 if (__pyx_t_2) {
jpayne@69 8737
jpayne@69 8738 /* "(tree fragment)":8
jpayne@69 8739 * _dict = getattr(self, '__dict__', None)
jpayne@69 8740 * if _dict is not None:
jpayne@69 8741 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@69 8742 * use_setstate = True
jpayne@69 8743 * else:
jpayne@69 8744 */
jpayne@69 8745 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 8746 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8747 __Pyx_INCREF(__pyx_v__dict);
jpayne@69 8748 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@69 8749 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@69 8750 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 8751 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 8752 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8753 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@69 8754 __pyx_t_3 = 0;
jpayne@69 8755
jpayne@69 8756 /* "(tree fragment)":9
jpayne@69 8757 * if _dict is not None:
jpayne@69 8758 * state += (_dict,)
jpayne@69 8759 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@69 8760 * else:
jpayne@69 8761 * use_setstate = self.encoding is not None
jpayne@69 8762 */
jpayne@69 8763 __pyx_v_use_setstate = 1;
jpayne@69 8764
jpayne@69 8765 /* "(tree fragment)":7
jpayne@69 8766 * state = (self.encoding,)
jpayne@69 8767 * _dict = getattr(self, '__dict__', None)
jpayne@69 8768 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 8769 * state += (_dict,)
jpayne@69 8770 * use_setstate = True
jpayne@69 8771 */
jpayne@69 8772 goto __pyx_L3;
jpayne@69 8773 }
jpayne@69 8774
jpayne@69 8775 /* "(tree fragment)":11
jpayne@69 8776 * use_setstate = True
jpayne@69 8777 * else:
jpayne@69 8778 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@69 8779 * if use_setstate:
jpayne@69 8780 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, None), state
jpayne@69 8781 */
jpayne@69 8782 /*else*/ {
jpayne@69 8783 __pyx_t_2 = (__pyx_v_self->__pyx_base.encoding != Py_None);
jpayne@69 8784 __pyx_v_use_setstate = __pyx_t_2;
jpayne@69 8785 }
jpayne@69 8786 __pyx_L3:;
jpayne@69 8787
jpayne@69 8788 /* "(tree fragment)":12
jpayne@69 8789 * else:
jpayne@69 8790 * use_setstate = self.encoding is not None
jpayne@69 8791 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 8792 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, None), state
jpayne@69 8793 * else:
jpayne@69 8794 */
jpayne@69 8795 if (__pyx_v_use_setstate) {
jpayne@69 8796
jpayne@69 8797 /* "(tree fragment)":13
jpayne@69 8798 * use_setstate = self.encoding is not None
jpayne@69 8799 * if use_setstate:
jpayne@69 8800 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@69 8801 * else:
jpayne@69 8802 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@69 8803 */
jpayne@69 8804 __Pyx_XDECREF(__pyx_r);
jpayne@69 8805 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_asGFF3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 8806 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 8807 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 8808 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8809 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 8810 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 8811 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8812 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 8813 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 8814 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8815 __Pyx_INCREF(Py_None);
jpayne@69 8816 __Pyx_GIVEREF(Py_None);
jpayne@69 8817 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8818 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 8819 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 8820 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 8821 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8822 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 8823 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8824 __Pyx_INCREF(__pyx_v_state);
jpayne@69 8825 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 8826 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 8827 __pyx_t_3 = 0;
jpayne@69 8828 __pyx_t_1 = 0;
jpayne@69 8829 __pyx_r = __pyx_t_4;
jpayne@69 8830 __pyx_t_4 = 0;
jpayne@69 8831 goto __pyx_L0;
jpayne@69 8832
jpayne@69 8833 /* "(tree fragment)":12
jpayne@69 8834 * else:
jpayne@69 8835 * use_setstate = self.encoding is not None
jpayne@69 8836 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 8837 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, None), state
jpayne@69 8838 * else:
jpayne@69 8839 */
jpayne@69 8840 }
jpayne@69 8841
jpayne@69 8842 /* "(tree fragment)":15
jpayne@69 8843 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, None), state
jpayne@69 8844 * else:
jpayne@69 8845 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@69 8846 * def __setstate_cython__(self, __pyx_state):
jpayne@69 8847 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state)
jpayne@69 8848 */
jpayne@69 8849 /*else*/ {
jpayne@69 8850 __Pyx_XDECREF(__pyx_r);
jpayne@69 8851 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_asGFF3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 8852 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 8853 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 8854 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8855 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 8856 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 8857 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 8858 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 8859 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 8860 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 8861 __Pyx_INCREF(__pyx_v_state);
jpayne@69 8862 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 8863 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 8864 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 8865 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 8866 __Pyx_GIVEREF(__pyx_t_4);
jpayne@69 8867 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 8868 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 8869 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 8870 __pyx_t_4 = 0;
jpayne@69 8871 __pyx_t_1 = 0;
jpayne@69 8872 __pyx_r = __pyx_t_3;
jpayne@69 8873 __pyx_t_3 = 0;
jpayne@69 8874 goto __pyx_L0;
jpayne@69 8875 }
jpayne@69 8876
jpayne@69 8877 /* "(tree fragment)":1
jpayne@69 8878 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 8879 * cdef tuple state
jpayne@69 8880 * cdef object _dict
jpayne@69 8881 */
jpayne@69 8882
jpayne@69 8883 /* function exit code */
jpayne@69 8884 __pyx_L1_error:;
jpayne@69 8885 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 8886 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 8887 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 8888 __Pyx_AddTraceback("pysam.libctabix.asGFF3.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8889 __pyx_r = NULL;
jpayne@69 8890 __pyx_L0:;
jpayne@69 8891 __Pyx_XDECREF(__pyx_v_state);
jpayne@69 8892 __Pyx_XDECREF(__pyx_v__dict);
jpayne@69 8893 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 8894 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 8895 __Pyx_RefNannyFinishContext();
jpayne@69 8896 return __pyx_r;
jpayne@69 8897 }
jpayne@69 8898
jpayne@69 8899 /* "(tree fragment)":16
jpayne@69 8900 * else:
jpayne@69 8901 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@69 8902 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 8903 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state)
jpayne@69 8904 */
jpayne@69 8905
jpayne@69 8906 /* Python wrapper */
jpayne@69 8907 static PyObject *__pyx_pw_5pysam_9libctabix_6asGFF3_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 8908 #if CYTHON_METH_FASTCALL
jpayne@69 8909 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 8910 #else
jpayne@69 8911 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 8912 #endif
jpayne@69 8913 ); /*proto*/
jpayne@69 8914 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6asGFF3_2__setstate_cython__, "asGFF3.__setstate_cython__(self, __pyx_state)");
jpayne@69 8915 static PyMethodDef __pyx_mdef_5pysam_9libctabix_6asGFF3_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6asGFF3_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6asGFF3_2__setstate_cython__};
jpayne@69 8916 static PyObject *__pyx_pw_5pysam_9libctabix_6asGFF3_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 8917 #if CYTHON_METH_FASTCALL
jpayne@69 8918 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 8919 #else
jpayne@69 8920 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 8921 #endif
jpayne@69 8922 ) {
jpayne@69 8923 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 8924 #if !CYTHON_METH_FASTCALL
jpayne@69 8925 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 8926 #endif
jpayne@69 8927 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 8928 PyObject* values[1] = {0};
jpayne@69 8929 int __pyx_lineno = 0;
jpayne@69 8930 const char *__pyx_filename = NULL;
jpayne@69 8931 int __pyx_clineno = 0;
jpayne@69 8932 PyObject *__pyx_r = 0;
jpayne@69 8933 __Pyx_RefNannyDeclarations
jpayne@69 8934 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 8935 #if !CYTHON_METH_FASTCALL
jpayne@69 8936 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 8937 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 8938 #else
jpayne@69 8939 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 8940 #endif
jpayne@69 8941 #endif
jpayne@69 8942 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 8943 {
jpayne@69 8944 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 8945 if (__pyx_kwds) {
jpayne@69 8946 Py_ssize_t kw_args;
jpayne@69 8947 switch (__pyx_nargs) {
jpayne@69 8948 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 8949 CYTHON_FALLTHROUGH;
jpayne@69 8950 case 0: break;
jpayne@69 8951 default: goto __pyx_L5_argtuple_error;
jpayne@69 8952 }
jpayne@69 8953 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 8954 switch (__pyx_nargs) {
jpayne@69 8955 case 0:
jpayne@69 8956 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 8957 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 8958 kw_args--;
jpayne@69 8959 }
jpayne@69 8960 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 8961 else goto __pyx_L5_argtuple_error;
jpayne@69 8962 }
jpayne@69 8963 if (unlikely(kw_args > 0)) {
jpayne@69 8964 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 8965 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)
jpayne@69 8966 }
jpayne@69 8967 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 8968 goto __pyx_L5_argtuple_error;
jpayne@69 8969 } else {
jpayne@69 8970 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 8971 }
jpayne@69 8972 __pyx_v___pyx_state = values[0];
jpayne@69 8973 }
jpayne@69 8974 goto __pyx_L6_skip;
jpayne@69 8975 __pyx_L5_argtuple_error:;
jpayne@69 8976 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 8977 __pyx_L6_skip:;
jpayne@69 8978 goto __pyx_L4_argument_unpacking_done;
jpayne@69 8979 __pyx_L3_error:;
jpayne@69 8980 {
jpayne@69 8981 Py_ssize_t __pyx_temp;
jpayne@69 8982 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 8983 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 8984 }
jpayne@69 8985 }
jpayne@69 8986 __Pyx_AddTraceback("pysam.libctabix.asGFF3.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8987 __Pyx_RefNannyFinishContext();
jpayne@69 8988 return NULL;
jpayne@69 8989 __pyx_L4_argument_unpacking_done:;
jpayne@69 8990 __pyx_r = __pyx_pf_5pysam_9libctabix_6asGFF3_2__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_asGFF3 *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 8991
jpayne@69 8992 /* function exit code */
jpayne@69 8993 {
jpayne@69 8994 Py_ssize_t __pyx_temp;
jpayne@69 8995 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 8996 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 8997 }
jpayne@69 8998 }
jpayne@69 8999 __Pyx_RefNannyFinishContext();
jpayne@69 9000 return __pyx_r;
jpayne@69 9001 }
jpayne@69 9002
jpayne@69 9003 static PyObject *__pyx_pf_5pysam_9libctabix_6asGFF3_2__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_asGFF3 *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
jpayne@69 9004 PyObject *__pyx_r = NULL;
jpayne@69 9005 __Pyx_TraceDeclarations
jpayne@69 9006 __Pyx_RefNannyDeclarations
jpayne@69 9007 PyObject *__pyx_t_1 = NULL;
jpayne@69 9008 int __pyx_lineno = 0;
jpayne@69 9009 const char *__pyx_filename = NULL;
jpayne@69 9010 int __pyx_clineno = 0;
jpayne@69 9011 __Pyx_TraceFrameInit(__pyx_codeobj__8)
jpayne@69 9012 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 9013 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@69 9014
jpayne@69 9015 /* "(tree fragment)":17
jpayne@69 9016 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@69 9017 * def __setstate_cython__(self, __pyx_state):
jpayne@69 9018 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 9019 */
jpayne@69 9020 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)
jpayne@69 9021 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_asGFF3__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
jpayne@69 9022 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9023 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 9024
jpayne@69 9025 /* "(tree fragment)":16
jpayne@69 9026 * else:
jpayne@69 9027 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@69 9028 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 9029 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state)
jpayne@69 9030 */
jpayne@69 9031
jpayne@69 9032 /* function exit code */
jpayne@69 9033 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 9034 goto __pyx_L0;
jpayne@69 9035 __pyx_L1_error:;
jpayne@69 9036 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 9037 __Pyx_AddTraceback("pysam.libctabix.asGFF3.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9038 __pyx_r = NULL;
jpayne@69 9039 __pyx_L0:;
jpayne@69 9040 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9041 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9042 __Pyx_RefNannyFinishContext();
jpayne@69 9043 return __pyx_r;
jpayne@69 9044 }
jpayne@69 9045
jpayne@69 9046 /* "pysam/libctabix.pyx":191
jpayne@69 9047 *
jpayne@69 9048 * '''
jpayne@69 9049 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@69 9050 * cdef ctabixproxies.GTFProxy r
jpayne@69 9051 * r = ctabixproxies.GTFProxy(self.encoding)
jpayne@69 9052 */
jpayne@69 9053
jpayne@69 9054 static PyObject *__pyx_f_5pysam_9libctabix_5asGTF_parse(struct __pyx_obj_5pysam_9libctabix_asGTF *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
jpayne@69 9055 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_r = 0;
jpayne@69 9056 PyObject *__pyx_r = NULL;
jpayne@69 9057 __Pyx_TraceDeclarations
jpayne@69 9058 __Pyx_RefNannyDeclarations
jpayne@69 9059 PyObject *__pyx_t_1 = NULL;
jpayne@69 9060 int __pyx_lineno = 0;
jpayne@69 9061 const char *__pyx_filename = NULL;
jpayne@69 9062 int __pyx_clineno = 0;
jpayne@69 9063 __Pyx_RefNannySetupContext("parse", 1);
jpayne@69 9064 __Pyx_TraceCall("parse", __pyx_f[0], 191, 0, __PYX_ERR(0, 191, __pyx_L1_error));
jpayne@69 9065
jpayne@69 9066 /* "pysam/libctabix.pyx":193
jpayne@69 9067 * cdef parse(self, char * buffer, int len):
jpayne@69 9068 * cdef ctabixproxies.GTFProxy r
jpayne@69 9069 * r = ctabixproxies.GTFProxy(self.encoding) # <<<<<<<<<<<<<<
jpayne@69 9070 * r.copy(buffer, len)
jpayne@69 9071 * return r
jpayne@69 9072 */
jpayne@69 9073 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_GTFProxy), __pyx_v_self->__pyx_base.encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
jpayne@69 9074 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9075 __pyx_v_r = ((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_t_1);
jpayne@69 9076 __pyx_t_1 = 0;
jpayne@69 9077
jpayne@69 9078 /* "pysam/libctabix.pyx":194
jpayne@69 9079 * cdef ctabixproxies.GTFProxy r
jpayne@69 9080 * r = ctabixproxies.GTFProxy(self.encoding)
jpayne@69 9081 * r.copy(buffer, len) # <<<<<<<<<<<<<<
jpayne@69 9082 * return r
jpayne@69 9083 *
jpayne@69 9084 */
jpayne@69 9085 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy *)__pyx_v_r->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
jpayne@69 9086 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9087 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 9088
jpayne@69 9089 /* "pysam/libctabix.pyx":195
jpayne@69 9090 * r = ctabixproxies.GTFProxy(self.encoding)
jpayne@69 9091 * r.copy(buffer, len)
jpayne@69 9092 * return r # <<<<<<<<<<<<<<
jpayne@69 9093 *
jpayne@69 9094 *
jpayne@69 9095 */
jpayne@69 9096 __Pyx_XDECREF(__pyx_r);
jpayne@69 9097 __Pyx_INCREF((PyObject *)__pyx_v_r);
jpayne@69 9098 __pyx_r = ((PyObject *)__pyx_v_r);
jpayne@69 9099 goto __pyx_L0;
jpayne@69 9100
jpayne@69 9101 /* "pysam/libctabix.pyx":191
jpayne@69 9102 *
jpayne@69 9103 * '''
jpayne@69 9104 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@69 9105 * cdef ctabixproxies.GTFProxy r
jpayne@69 9106 * r = ctabixproxies.GTFProxy(self.encoding)
jpayne@69 9107 */
jpayne@69 9108
jpayne@69 9109 /* function exit code */
jpayne@69 9110 __pyx_L1_error:;
jpayne@69 9111 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 9112 __Pyx_AddTraceback("pysam.libctabix.asGTF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9113 __pyx_r = 0;
jpayne@69 9114 __pyx_L0:;
jpayne@69 9115 __Pyx_XDECREF((PyObject *)__pyx_v_r);
jpayne@69 9116 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9117 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9118 __Pyx_RefNannyFinishContext();
jpayne@69 9119 return __pyx_r;
jpayne@69 9120 }
jpayne@69 9121
jpayne@69 9122 /* "(tree fragment)":1
jpayne@69 9123 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 9124 * cdef tuple state
jpayne@69 9125 * cdef object _dict
jpayne@69 9126 */
jpayne@69 9127
jpayne@69 9128 /* Python wrapper */
jpayne@69 9129 static PyObject *__pyx_pw_5pysam_9libctabix_5asGTF_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 9130 #if CYTHON_METH_FASTCALL
jpayne@69 9131 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9132 #else
jpayne@69 9133 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9134 #endif
jpayne@69 9135 ); /*proto*/
jpayne@69 9136 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asGTF___reduce_cython__, "asGTF.__reduce_cython__(self)");
jpayne@69 9137 static PyMethodDef __pyx_mdef_5pysam_9libctabix_5asGTF_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asGTF_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asGTF___reduce_cython__};
jpayne@69 9138 static PyObject *__pyx_pw_5pysam_9libctabix_5asGTF_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 9139 #if CYTHON_METH_FASTCALL
jpayne@69 9140 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9141 #else
jpayne@69 9142 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9143 #endif
jpayne@69 9144 ) {
jpayne@69 9145 #if !CYTHON_METH_FASTCALL
jpayne@69 9146 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 9147 #endif
jpayne@69 9148 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9149 PyObject *__pyx_r = 0;
jpayne@69 9150 __Pyx_RefNannyDeclarations
jpayne@69 9151 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 9152 #if !CYTHON_METH_FASTCALL
jpayne@69 9153 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 9154 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 9155 #else
jpayne@69 9156 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 9157 #endif
jpayne@69 9158 #endif
jpayne@69 9159 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 9160 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 9161 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 9162 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 9163 __pyx_r = __pyx_pf_5pysam_9libctabix_5asGTF___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_asGTF *)__pyx_v_self));
jpayne@69 9164
jpayne@69 9165 /* function exit code */
jpayne@69 9166 __Pyx_RefNannyFinishContext();
jpayne@69 9167 return __pyx_r;
jpayne@69 9168 }
jpayne@69 9169
jpayne@69 9170 static PyObject *__pyx_pf_5pysam_9libctabix_5asGTF___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asGTF *__pyx_v_self) {
jpayne@69 9171 PyObject *__pyx_v_state = 0;
jpayne@69 9172 PyObject *__pyx_v__dict = 0;
jpayne@69 9173 int __pyx_v_use_setstate;
jpayne@69 9174 PyObject *__pyx_r = NULL;
jpayne@69 9175 __Pyx_TraceDeclarations
jpayne@69 9176 __Pyx_RefNannyDeclarations
jpayne@69 9177 PyObject *__pyx_t_1 = NULL;
jpayne@69 9178 int __pyx_t_2;
jpayne@69 9179 PyObject *__pyx_t_3 = NULL;
jpayne@69 9180 PyObject *__pyx_t_4 = NULL;
jpayne@69 9181 int __pyx_lineno = 0;
jpayne@69 9182 const char *__pyx_filename = NULL;
jpayne@69 9183 int __pyx_clineno = 0;
jpayne@69 9184 __Pyx_TraceFrameInit(__pyx_codeobj__9)
jpayne@69 9185 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 9186 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 9187
jpayne@69 9188 /* "(tree fragment)":5
jpayne@69 9189 * cdef object _dict
jpayne@69 9190 * cdef bint use_setstate
jpayne@69 9191 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@69 9192 * _dict = getattr(self, '__dict__', None)
jpayne@69 9193 * if _dict is not None:
jpayne@69 9194 */
jpayne@69 9195 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 9196 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9197 __Pyx_INCREF(__pyx_v_self->__pyx_base.encoding);
jpayne@69 9198 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.encoding);
jpayne@69 9199 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 9200 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@69 9201 __pyx_t_1 = 0;
jpayne@69 9202
jpayne@69 9203 /* "(tree fragment)":6
jpayne@69 9204 * cdef bint use_setstate
jpayne@69 9205 * state = (self.encoding,)
jpayne@69 9206 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@69 9207 * if _dict is not None:
jpayne@69 9208 * state += (_dict,)
jpayne@69 9209 */
jpayne@69 9210 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 9211 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9212 __pyx_v__dict = __pyx_t_1;
jpayne@69 9213 __pyx_t_1 = 0;
jpayne@69 9214
jpayne@69 9215 /* "(tree fragment)":7
jpayne@69 9216 * state = (self.encoding,)
jpayne@69 9217 * _dict = getattr(self, '__dict__', None)
jpayne@69 9218 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 9219 * state += (_dict,)
jpayne@69 9220 * use_setstate = True
jpayne@69 9221 */
jpayne@69 9222 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@69 9223 if (__pyx_t_2) {
jpayne@69 9224
jpayne@69 9225 /* "(tree fragment)":8
jpayne@69 9226 * _dict = getattr(self, '__dict__', None)
jpayne@69 9227 * if _dict is not None:
jpayne@69 9228 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@69 9229 * use_setstate = True
jpayne@69 9230 * else:
jpayne@69 9231 */
jpayne@69 9232 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 9233 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9234 __Pyx_INCREF(__pyx_v__dict);
jpayne@69 9235 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@69 9236 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@69 9237 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 9238 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 9239 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 9240 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@69 9241 __pyx_t_3 = 0;
jpayne@69 9242
jpayne@69 9243 /* "(tree fragment)":9
jpayne@69 9244 * if _dict is not None:
jpayne@69 9245 * state += (_dict,)
jpayne@69 9246 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@69 9247 * else:
jpayne@69 9248 * use_setstate = self.encoding is not None
jpayne@69 9249 */
jpayne@69 9250 __pyx_v_use_setstate = 1;
jpayne@69 9251
jpayne@69 9252 /* "(tree fragment)":7
jpayne@69 9253 * state = (self.encoding,)
jpayne@69 9254 * _dict = getattr(self, '__dict__', None)
jpayne@69 9255 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 9256 * state += (_dict,)
jpayne@69 9257 * use_setstate = True
jpayne@69 9258 */
jpayne@69 9259 goto __pyx_L3;
jpayne@69 9260 }
jpayne@69 9261
jpayne@69 9262 /* "(tree fragment)":11
jpayne@69 9263 * use_setstate = True
jpayne@69 9264 * else:
jpayne@69 9265 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@69 9266 * if use_setstate:
jpayne@69 9267 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, None), state
jpayne@69 9268 */
jpayne@69 9269 /*else*/ {
jpayne@69 9270 __pyx_t_2 = (__pyx_v_self->__pyx_base.encoding != Py_None);
jpayne@69 9271 __pyx_v_use_setstate = __pyx_t_2;
jpayne@69 9272 }
jpayne@69 9273 __pyx_L3:;
jpayne@69 9274
jpayne@69 9275 /* "(tree fragment)":12
jpayne@69 9276 * else:
jpayne@69 9277 * use_setstate = self.encoding is not None
jpayne@69 9278 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 9279 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, None), state
jpayne@69 9280 * else:
jpayne@69 9281 */
jpayne@69 9282 if (__pyx_v_use_setstate) {
jpayne@69 9283
jpayne@69 9284 /* "(tree fragment)":13
jpayne@69 9285 * use_setstate = self.encoding is not None
jpayne@69 9286 * if use_setstate:
jpayne@69 9287 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@69 9288 * else:
jpayne@69 9289 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@69 9290 */
jpayne@69 9291 __Pyx_XDECREF(__pyx_r);
jpayne@69 9292 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_asGTF); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 9293 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 9294 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 9295 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9296 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 9297 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 9298 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9299 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 9300 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 9301 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9302 __Pyx_INCREF(Py_None);
jpayne@69 9303 __Pyx_GIVEREF(Py_None);
jpayne@69 9304 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9305 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 9306 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 9307 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 9308 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9309 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 9310 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9311 __Pyx_INCREF(__pyx_v_state);
jpayne@69 9312 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 9313 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9314 __pyx_t_3 = 0;
jpayne@69 9315 __pyx_t_1 = 0;
jpayne@69 9316 __pyx_r = __pyx_t_4;
jpayne@69 9317 __pyx_t_4 = 0;
jpayne@69 9318 goto __pyx_L0;
jpayne@69 9319
jpayne@69 9320 /* "(tree fragment)":12
jpayne@69 9321 * else:
jpayne@69 9322 * use_setstate = self.encoding is not None
jpayne@69 9323 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 9324 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, None), state
jpayne@69 9325 * else:
jpayne@69 9326 */
jpayne@69 9327 }
jpayne@69 9328
jpayne@69 9329 /* "(tree fragment)":15
jpayne@69 9330 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, None), state
jpayne@69 9331 * else:
jpayne@69 9332 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@69 9333 * def __setstate_cython__(self, __pyx_state):
jpayne@69 9334 * __pyx_unpickle_asGTF__set_state(self, __pyx_state)
jpayne@69 9335 */
jpayne@69 9336 /*else*/ {
jpayne@69 9337 __Pyx_XDECREF(__pyx_r);
jpayne@69 9338 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_asGTF); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 9339 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 9340 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 9341 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9342 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 9343 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 9344 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 9345 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 9346 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 9347 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 9348 __Pyx_INCREF(__pyx_v_state);
jpayne@69 9349 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 9350 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 9351 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 9352 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 9353 __Pyx_GIVEREF(__pyx_t_4);
jpayne@69 9354 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 9355 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 9356 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 9357 __pyx_t_4 = 0;
jpayne@69 9358 __pyx_t_1 = 0;
jpayne@69 9359 __pyx_r = __pyx_t_3;
jpayne@69 9360 __pyx_t_3 = 0;
jpayne@69 9361 goto __pyx_L0;
jpayne@69 9362 }
jpayne@69 9363
jpayne@69 9364 /* "(tree fragment)":1
jpayne@69 9365 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 9366 * cdef tuple state
jpayne@69 9367 * cdef object _dict
jpayne@69 9368 */
jpayne@69 9369
jpayne@69 9370 /* function exit code */
jpayne@69 9371 __pyx_L1_error:;
jpayne@69 9372 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 9373 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 9374 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 9375 __Pyx_AddTraceback("pysam.libctabix.asGTF.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9376 __pyx_r = NULL;
jpayne@69 9377 __pyx_L0:;
jpayne@69 9378 __Pyx_XDECREF(__pyx_v_state);
jpayne@69 9379 __Pyx_XDECREF(__pyx_v__dict);
jpayne@69 9380 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9381 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9382 __Pyx_RefNannyFinishContext();
jpayne@69 9383 return __pyx_r;
jpayne@69 9384 }
jpayne@69 9385
jpayne@69 9386 /* "(tree fragment)":16
jpayne@69 9387 * else:
jpayne@69 9388 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@69 9389 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 9390 * __pyx_unpickle_asGTF__set_state(self, __pyx_state)
jpayne@69 9391 */
jpayne@69 9392
jpayne@69 9393 /* Python wrapper */
jpayne@69 9394 static PyObject *__pyx_pw_5pysam_9libctabix_5asGTF_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 9395 #if CYTHON_METH_FASTCALL
jpayne@69 9396 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9397 #else
jpayne@69 9398 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9399 #endif
jpayne@69 9400 ); /*proto*/
jpayne@69 9401 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asGTF_2__setstate_cython__, "asGTF.__setstate_cython__(self, __pyx_state)");
jpayne@69 9402 static PyMethodDef __pyx_mdef_5pysam_9libctabix_5asGTF_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asGTF_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asGTF_2__setstate_cython__};
jpayne@69 9403 static PyObject *__pyx_pw_5pysam_9libctabix_5asGTF_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 9404 #if CYTHON_METH_FASTCALL
jpayne@69 9405 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9406 #else
jpayne@69 9407 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9408 #endif
jpayne@69 9409 ) {
jpayne@69 9410 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 9411 #if !CYTHON_METH_FASTCALL
jpayne@69 9412 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 9413 #endif
jpayne@69 9414 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9415 PyObject* values[1] = {0};
jpayne@69 9416 int __pyx_lineno = 0;
jpayne@69 9417 const char *__pyx_filename = NULL;
jpayne@69 9418 int __pyx_clineno = 0;
jpayne@69 9419 PyObject *__pyx_r = 0;
jpayne@69 9420 __Pyx_RefNannyDeclarations
jpayne@69 9421 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 9422 #if !CYTHON_METH_FASTCALL
jpayne@69 9423 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 9424 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 9425 #else
jpayne@69 9426 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 9427 #endif
jpayne@69 9428 #endif
jpayne@69 9429 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 9430 {
jpayne@69 9431 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 9432 if (__pyx_kwds) {
jpayne@69 9433 Py_ssize_t kw_args;
jpayne@69 9434 switch (__pyx_nargs) {
jpayne@69 9435 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 9436 CYTHON_FALLTHROUGH;
jpayne@69 9437 case 0: break;
jpayne@69 9438 default: goto __pyx_L5_argtuple_error;
jpayne@69 9439 }
jpayne@69 9440 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 9441 switch (__pyx_nargs) {
jpayne@69 9442 case 0:
jpayne@69 9443 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 9444 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 9445 kw_args--;
jpayne@69 9446 }
jpayne@69 9447 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 9448 else goto __pyx_L5_argtuple_error;
jpayne@69 9449 }
jpayne@69 9450 if (unlikely(kw_args > 0)) {
jpayne@69 9451 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 9452 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)
jpayne@69 9453 }
jpayne@69 9454 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 9455 goto __pyx_L5_argtuple_error;
jpayne@69 9456 } else {
jpayne@69 9457 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 9458 }
jpayne@69 9459 __pyx_v___pyx_state = values[0];
jpayne@69 9460 }
jpayne@69 9461 goto __pyx_L6_skip;
jpayne@69 9462 __pyx_L5_argtuple_error:;
jpayne@69 9463 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 9464 __pyx_L6_skip:;
jpayne@69 9465 goto __pyx_L4_argument_unpacking_done;
jpayne@69 9466 __pyx_L3_error:;
jpayne@69 9467 {
jpayne@69 9468 Py_ssize_t __pyx_temp;
jpayne@69 9469 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 9470 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 9471 }
jpayne@69 9472 }
jpayne@69 9473 __Pyx_AddTraceback("pysam.libctabix.asGTF.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9474 __Pyx_RefNannyFinishContext();
jpayne@69 9475 return NULL;
jpayne@69 9476 __pyx_L4_argument_unpacking_done:;
jpayne@69 9477 __pyx_r = __pyx_pf_5pysam_9libctabix_5asGTF_2__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_asGTF *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 9478
jpayne@69 9479 /* function exit code */
jpayne@69 9480 {
jpayne@69 9481 Py_ssize_t __pyx_temp;
jpayne@69 9482 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 9483 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 9484 }
jpayne@69 9485 }
jpayne@69 9486 __Pyx_RefNannyFinishContext();
jpayne@69 9487 return __pyx_r;
jpayne@69 9488 }
jpayne@69 9489
jpayne@69 9490 static PyObject *__pyx_pf_5pysam_9libctabix_5asGTF_2__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_asGTF *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
jpayne@69 9491 PyObject *__pyx_r = NULL;
jpayne@69 9492 __Pyx_TraceDeclarations
jpayne@69 9493 __Pyx_RefNannyDeclarations
jpayne@69 9494 PyObject *__pyx_t_1 = NULL;
jpayne@69 9495 int __pyx_lineno = 0;
jpayne@69 9496 const char *__pyx_filename = NULL;
jpayne@69 9497 int __pyx_clineno = 0;
jpayne@69 9498 __Pyx_TraceFrameInit(__pyx_codeobj__10)
jpayne@69 9499 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 9500 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@69 9501
jpayne@69 9502 /* "(tree fragment)":17
jpayne@69 9503 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@69 9504 * def __setstate_cython__(self, __pyx_state):
jpayne@69 9505 * __pyx_unpickle_asGTF__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 9506 */
jpayne@69 9507 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)
jpayne@69 9508 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_asGTF__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
jpayne@69 9509 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9510 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 9511
jpayne@69 9512 /* "(tree fragment)":16
jpayne@69 9513 * else:
jpayne@69 9514 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@69 9515 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 9516 * __pyx_unpickle_asGTF__set_state(self, __pyx_state)
jpayne@69 9517 */
jpayne@69 9518
jpayne@69 9519 /* function exit code */
jpayne@69 9520 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 9521 goto __pyx_L0;
jpayne@69 9522 __pyx_L1_error:;
jpayne@69 9523 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 9524 __Pyx_AddTraceback("pysam.libctabix.asGTF.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9525 __pyx_r = NULL;
jpayne@69 9526 __pyx_L0:;
jpayne@69 9527 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9528 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9529 __Pyx_RefNannyFinishContext();
jpayne@69 9530 return __pyx_r;
jpayne@69 9531 }
jpayne@69 9532
jpayne@69 9533 /* "pysam/libctabix.pyx":239
jpayne@69 9534 *
jpayne@69 9535 * '''
jpayne@69 9536 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@69 9537 * cdef ctabixproxies.BedProxy r
jpayne@69 9538 * r = ctabixproxies.BedProxy(self.encoding)
jpayne@69 9539 */
jpayne@69 9540
jpayne@69 9541 static PyObject *__pyx_f_5pysam_9libctabix_5asBed_parse(struct __pyx_obj_5pysam_9libctabix_asBed *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
jpayne@69 9542 struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_r = 0;
jpayne@69 9543 PyObject *__pyx_r = NULL;
jpayne@69 9544 __Pyx_TraceDeclarations
jpayne@69 9545 __Pyx_RefNannyDeclarations
jpayne@69 9546 PyObject *__pyx_t_1 = NULL;
jpayne@69 9547 int __pyx_lineno = 0;
jpayne@69 9548 const char *__pyx_filename = NULL;
jpayne@69 9549 int __pyx_clineno = 0;
jpayne@69 9550 __Pyx_RefNannySetupContext("parse", 1);
jpayne@69 9551 __Pyx_TraceCall("parse", __pyx_f[0], 239, 0, __PYX_ERR(0, 239, __pyx_L1_error));
jpayne@69 9552
jpayne@69 9553 /* "pysam/libctabix.pyx":241
jpayne@69 9554 * cdef parse(self, char * buffer, int len):
jpayne@69 9555 * cdef ctabixproxies.BedProxy r
jpayne@69 9556 * r = ctabixproxies.BedProxy(self.encoding) # <<<<<<<<<<<<<<
jpayne@69 9557 * r.copy(buffer, len)
jpayne@69 9558 * return r
jpayne@69 9559 */
jpayne@69 9560 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_BedProxy), __pyx_v_self->__pyx_base.encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
jpayne@69 9561 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9562 __pyx_v_r = ((struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *)__pyx_t_1);
jpayne@69 9563 __pyx_t_1 = 0;
jpayne@69 9564
jpayne@69 9565 /* "pysam/libctabix.pyx":242
jpayne@69 9566 * cdef ctabixproxies.BedProxy r
jpayne@69 9567 * r = ctabixproxies.BedProxy(self.encoding)
jpayne@69 9568 * r.copy(buffer, len) # <<<<<<<<<<<<<<
jpayne@69 9569 * return r
jpayne@69 9570 *
jpayne@69 9571 */
jpayne@69 9572 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy *)__pyx_v_r->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
jpayne@69 9573 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9574 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 9575
jpayne@69 9576 /* "pysam/libctabix.pyx":243
jpayne@69 9577 * r = ctabixproxies.BedProxy(self.encoding)
jpayne@69 9578 * r.copy(buffer, len)
jpayne@69 9579 * return r # <<<<<<<<<<<<<<
jpayne@69 9580 *
jpayne@69 9581 *
jpayne@69 9582 */
jpayne@69 9583 __Pyx_XDECREF(__pyx_r);
jpayne@69 9584 __Pyx_INCREF((PyObject *)__pyx_v_r);
jpayne@69 9585 __pyx_r = ((PyObject *)__pyx_v_r);
jpayne@69 9586 goto __pyx_L0;
jpayne@69 9587
jpayne@69 9588 /* "pysam/libctabix.pyx":239
jpayne@69 9589 *
jpayne@69 9590 * '''
jpayne@69 9591 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@69 9592 * cdef ctabixproxies.BedProxy r
jpayne@69 9593 * r = ctabixproxies.BedProxy(self.encoding)
jpayne@69 9594 */
jpayne@69 9595
jpayne@69 9596 /* function exit code */
jpayne@69 9597 __pyx_L1_error:;
jpayne@69 9598 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 9599 __Pyx_AddTraceback("pysam.libctabix.asBed.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9600 __pyx_r = 0;
jpayne@69 9601 __pyx_L0:;
jpayne@69 9602 __Pyx_XDECREF((PyObject *)__pyx_v_r);
jpayne@69 9603 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9604 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9605 __Pyx_RefNannyFinishContext();
jpayne@69 9606 return __pyx_r;
jpayne@69 9607 }
jpayne@69 9608
jpayne@69 9609 /* "(tree fragment)":1
jpayne@69 9610 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 9611 * cdef tuple state
jpayne@69 9612 * cdef object _dict
jpayne@69 9613 */
jpayne@69 9614
jpayne@69 9615 /* Python wrapper */
jpayne@69 9616 static PyObject *__pyx_pw_5pysam_9libctabix_5asBed_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 9617 #if CYTHON_METH_FASTCALL
jpayne@69 9618 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9619 #else
jpayne@69 9620 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9621 #endif
jpayne@69 9622 ); /*proto*/
jpayne@69 9623 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asBed___reduce_cython__, "asBed.__reduce_cython__(self)");
jpayne@69 9624 static PyMethodDef __pyx_mdef_5pysam_9libctabix_5asBed_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asBed_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asBed___reduce_cython__};
jpayne@69 9625 static PyObject *__pyx_pw_5pysam_9libctabix_5asBed_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 9626 #if CYTHON_METH_FASTCALL
jpayne@69 9627 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9628 #else
jpayne@69 9629 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9630 #endif
jpayne@69 9631 ) {
jpayne@69 9632 #if !CYTHON_METH_FASTCALL
jpayne@69 9633 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 9634 #endif
jpayne@69 9635 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9636 PyObject *__pyx_r = 0;
jpayne@69 9637 __Pyx_RefNannyDeclarations
jpayne@69 9638 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 9639 #if !CYTHON_METH_FASTCALL
jpayne@69 9640 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 9641 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 9642 #else
jpayne@69 9643 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 9644 #endif
jpayne@69 9645 #endif
jpayne@69 9646 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 9647 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 9648 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 9649 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 9650 __pyx_r = __pyx_pf_5pysam_9libctabix_5asBed___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_asBed *)__pyx_v_self));
jpayne@69 9651
jpayne@69 9652 /* function exit code */
jpayne@69 9653 __Pyx_RefNannyFinishContext();
jpayne@69 9654 return __pyx_r;
jpayne@69 9655 }
jpayne@69 9656
jpayne@69 9657 static PyObject *__pyx_pf_5pysam_9libctabix_5asBed___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asBed *__pyx_v_self) {
jpayne@69 9658 PyObject *__pyx_v_state = 0;
jpayne@69 9659 PyObject *__pyx_v__dict = 0;
jpayne@69 9660 int __pyx_v_use_setstate;
jpayne@69 9661 PyObject *__pyx_r = NULL;
jpayne@69 9662 __Pyx_TraceDeclarations
jpayne@69 9663 __Pyx_RefNannyDeclarations
jpayne@69 9664 PyObject *__pyx_t_1 = NULL;
jpayne@69 9665 int __pyx_t_2;
jpayne@69 9666 PyObject *__pyx_t_3 = NULL;
jpayne@69 9667 PyObject *__pyx_t_4 = NULL;
jpayne@69 9668 int __pyx_lineno = 0;
jpayne@69 9669 const char *__pyx_filename = NULL;
jpayne@69 9670 int __pyx_clineno = 0;
jpayne@69 9671 __Pyx_TraceFrameInit(__pyx_codeobj__11)
jpayne@69 9672 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 9673 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 9674
jpayne@69 9675 /* "(tree fragment)":5
jpayne@69 9676 * cdef object _dict
jpayne@69 9677 * cdef bint use_setstate
jpayne@69 9678 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@69 9679 * _dict = getattr(self, '__dict__', None)
jpayne@69 9680 * if _dict is not None:
jpayne@69 9681 */
jpayne@69 9682 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 9683 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9684 __Pyx_INCREF(__pyx_v_self->__pyx_base.encoding);
jpayne@69 9685 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.encoding);
jpayne@69 9686 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 9687 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@69 9688 __pyx_t_1 = 0;
jpayne@69 9689
jpayne@69 9690 /* "(tree fragment)":6
jpayne@69 9691 * cdef bint use_setstate
jpayne@69 9692 * state = (self.encoding,)
jpayne@69 9693 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@69 9694 * if _dict is not None:
jpayne@69 9695 * state += (_dict,)
jpayne@69 9696 */
jpayne@69 9697 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 9698 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9699 __pyx_v__dict = __pyx_t_1;
jpayne@69 9700 __pyx_t_1 = 0;
jpayne@69 9701
jpayne@69 9702 /* "(tree fragment)":7
jpayne@69 9703 * state = (self.encoding,)
jpayne@69 9704 * _dict = getattr(self, '__dict__', None)
jpayne@69 9705 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 9706 * state += (_dict,)
jpayne@69 9707 * use_setstate = True
jpayne@69 9708 */
jpayne@69 9709 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@69 9710 if (__pyx_t_2) {
jpayne@69 9711
jpayne@69 9712 /* "(tree fragment)":8
jpayne@69 9713 * _dict = getattr(self, '__dict__', None)
jpayne@69 9714 * if _dict is not None:
jpayne@69 9715 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@69 9716 * use_setstate = True
jpayne@69 9717 * else:
jpayne@69 9718 */
jpayne@69 9719 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 9720 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9721 __Pyx_INCREF(__pyx_v__dict);
jpayne@69 9722 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@69 9723 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@69 9724 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 9725 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 9726 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 9727 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@69 9728 __pyx_t_3 = 0;
jpayne@69 9729
jpayne@69 9730 /* "(tree fragment)":9
jpayne@69 9731 * if _dict is not None:
jpayne@69 9732 * state += (_dict,)
jpayne@69 9733 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@69 9734 * else:
jpayne@69 9735 * use_setstate = self.encoding is not None
jpayne@69 9736 */
jpayne@69 9737 __pyx_v_use_setstate = 1;
jpayne@69 9738
jpayne@69 9739 /* "(tree fragment)":7
jpayne@69 9740 * state = (self.encoding,)
jpayne@69 9741 * _dict = getattr(self, '__dict__', None)
jpayne@69 9742 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 9743 * state += (_dict,)
jpayne@69 9744 * use_setstate = True
jpayne@69 9745 */
jpayne@69 9746 goto __pyx_L3;
jpayne@69 9747 }
jpayne@69 9748
jpayne@69 9749 /* "(tree fragment)":11
jpayne@69 9750 * use_setstate = True
jpayne@69 9751 * else:
jpayne@69 9752 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@69 9753 * if use_setstate:
jpayne@69 9754 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, None), state
jpayne@69 9755 */
jpayne@69 9756 /*else*/ {
jpayne@69 9757 __pyx_t_2 = (__pyx_v_self->__pyx_base.encoding != Py_None);
jpayne@69 9758 __pyx_v_use_setstate = __pyx_t_2;
jpayne@69 9759 }
jpayne@69 9760 __pyx_L3:;
jpayne@69 9761
jpayne@69 9762 /* "(tree fragment)":12
jpayne@69 9763 * else:
jpayne@69 9764 * use_setstate = self.encoding is not None
jpayne@69 9765 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 9766 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, None), state
jpayne@69 9767 * else:
jpayne@69 9768 */
jpayne@69 9769 if (__pyx_v_use_setstate) {
jpayne@69 9770
jpayne@69 9771 /* "(tree fragment)":13
jpayne@69 9772 * use_setstate = self.encoding is not None
jpayne@69 9773 * if use_setstate:
jpayne@69 9774 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@69 9775 * else:
jpayne@69 9776 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@69 9777 */
jpayne@69 9778 __Pyx_XDECREF(__pyx_r);
jpayne@69 9779 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_asBed); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 9780 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 9781 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 9782 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9783 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 9784 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 9785 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9786 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 9787 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 9788 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9789 __Pyx_INCREF(Py_None);
jpayne@69 9790 __Pyx_GIVEREF(Py_None);
jpayne@69 9791 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9792 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 9793 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 9794 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 9795 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9796 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 9797 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9798 __Pyx_INCREF(__pyx_v_state);
jpayne@69 9799 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 9800 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 9801 __pyx_t_3 = 0;
jpayne@69 9802 __pyx_t_1 = 0;
jpayne@69 9803 __pyx_r = __pyx_t_4;
jpayne@69 9804 __pyx_t_4 = 0;
jpayne@69 9805 goto __pyx_L0;
jpayne@69 9806
jpayne@69 9807 /* "(tree fragment)":12
jpayne@69 9808 * else:
jpayne@69 9809 * use_setstate = self.encoding is not None
jpayne@69 9810 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 9811 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, None), state
jpayne@69 9812 * else:
jpayne@69 9813 */
jpayne@69 9814 }
jpayne@69 9815
jpayne@69 9816 /* "(tree fragment)":15
jpayne@69 9817 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, None), state
jpayne@69 9818 * else:
jpayne@69 9819 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@69 9820 * def __setstate_cython__(self, __pyx_state):
jpayne@69 9821 * __pyx_unpickle_asBed__set_state(self, __pyx_state)
jpayne@69 9822 */
jpayne@69 9823 /*else*/ {
jpayne@69 9824 __Pyx_XDECREF(__pyx_r);
jpayne@69 9825 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_asBed); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 9826 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 9827 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 9828 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9829 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 9830 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 9831 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 9832 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 9833 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 9834 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 9835 __Pyx_INCREF(__pyx_v_state);
jpayne@69 9836 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 9837 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 9838 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 9839 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 9840 __Pyx_GIVEREF(__pyx_t_4);
jpayne@69 9841 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 9842 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 9843 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 9844 __pyx_t_4 = 0;
jpayne@69 9845 __pyx_t_1 = 0;
jpayne@69 9846 __pyx_r = __pyx_t_3;
jpayne@69 9847 __pyx_t_3 = 0;
jpayne@69 9848 goto __pyx_L0;
jpayne@69 9849 }
jpayne@69 9850
jpayne@69 9851 /* "(tree fragment)":1
jpayne@69 9852 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 9853 * cdef tuple state
jpayne@69 9854 * cdef object _dict
jpayne@69 9855 */
jpayne@69 9856
jpayne@69 9857 /* function exit code */
jpayne@69 9858 __pyx_L1_error:;
jpayne@69 9859 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 9860 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 9861 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 9862 __Pyx_AddTraceback("pysam.libctabix.asBed.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9863 __pyx_r = NULL;
jpayne@69 9864 __pyx_L0:;
jpayne@69 9865 __Pyx_XDECREF(__pyx_v_state);
jpayne@69 9866 __Pyx_XDECREF(__pyx_v__dict);
jpayne@69 9867 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9868 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9869 __Pyx_RefNannyFinishContext();
jpayne@69 9870 return __pyx_r;
jpayne@69 9871 }
jpayne@69 9872
jpayne@69 9873 /* "(tree fragment)":16
jpayne@69 9874 * else:
jpayne@69 9875 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@69 9876 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 9877 * __pyx_unpickle_asBed__set_state(self, __pyx_state)
jpayne@69 9878 */
jpayne@69 9879
jpayne@69 9880 /* Python wrapper */
jpayne@69 9881 static PyObject *__pyx_pw_5pysam_9libctabix_5asBed_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 9882 #if CYTHON_METH_FASTCALL
jpayne@69 9883 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9884 #else
jpayne@69 9885 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9886 #endif
jpayne@69 9887 ); /*proto*/
jpayne@69 9888 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asBed_2__setstate_cython__, "asBed.__setstate_cython__(self, __pyx_state)");
jpayne@69 9889 static PyMethodDef __pyx_mdef_5pysam_9libctabix_5asBed_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asBed_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asBed_2__setstate_cython__};
jpayne@69 9890 static PyObject *__pyx_pw_5pysam_9libctabix_5asBed_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 9891 #if CYTHON_METH_FASTCALL
jpayne@69 9892 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9893 #else
jpayne@69 9894 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9895 #endif
jpayne@69 9896 ) {
jpayne@69 9897 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 9898 #if !CYTHON_METH_FASTCALL
jpayne@69 9899 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 9900 #endif
jpayne@69 9901 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9902 PyObject* values[1] = {0};
jpayne@69 9903 int __pyx_lineno = 0;
jpayne@69 9904 const char *__pyx_filename = NULL;
jpayne@69 9905 int __pyx_clineno = 0;
jpayne@69 9906 PyObject *__pyx_r = 0;
jpayne@69 9907 __Pyx_RefNannyDeclarations
jpayne@69 9908 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 9909 #if !CYTHON_METH_FASTCALL
jpayne@69 9910 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 9911 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 9912 #else
jpayne@69 9913 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 9914 #endif
jpayne@69 9915 #endif
jpayne@69 9916 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 9917 {
jpayne@69 9918 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 9919 if (__pyx_kwds) {
jpayne@69 9920 Py_ssize_t kw_args;
jpayne@69 9921 switch (__pyx_nargs) {
jpayne@69 9922 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 9923 CYTHON_FALLTHROUGH;
jpayne@69 9924 case 0: break;
jpayne@69 9925 default: goto __pyx_L5_argtuple_error;
jpayne@69 9926 }
jpayne@69 9927 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 9928 switch (__pyx_nargs) {
jpayne@69 9929 case 0:
jpayne@69 9930 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 9931 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 9932 kw_args--;
jpayne@69 9933 }
jpayne@69 9934 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 9935 else goto __pyx_L5_argtuple_error;
jpayne@69 9936 }
jpayne@69 9937 if (unlikely(kw_args > 0)) {
jpayne@69 9938 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 9939 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)
jpayne@69 9940 }
jpayne@69 9941 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 9942 goto __pyx_L5_argtuple_error;
jpayne@69 9943 } else {
jpayne@69 9944 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 9945 }
jpayne@69 9946 __pyx_v___pyx_state = values[0];
jpayne@69 9947 }
jpayne@69 9948 goto __pyx_L6_skip;
jpayne@69 9949 __pyx_L5_argtuple_error:;
jpayne@69 9950 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 9951 __pyx_L6_skip:;
jpayne@69 9952 goto __pyx_L4_argument_unpacking_done;
jpayne@69 9953 __pyx_L3_error:;
jpayne@69 9954 {
jpayne@69 9955 Py_ssize_t __pyx_temp;
jpayne@69 9956 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 9957 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 9958 }
jpayne@69 9959 }
jpayne@69 9960 __Pyx_AddTraceback("pysam.libctabix.asBed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9961 __Pyx_RefNannyFinishContext();
jpayne@69 9962 return NULL;
jpayne@69 9963 __pyx_L4_argument_unpacking_done:;
jpayne@69 9964 __pyx_r = __pyx_pf_5pysam_9libctabix_5asBed_2__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_asBed *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 9965
jpayne@69 9966 /* function exit code */
jpayne@69 9967 {
jpayne@69 9968 Py_ssize_t __pyx_temp;
jpayne@69 9969 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 9970 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 9971 }
jpayne@69 9972 }
jpayne@69 9973 __Pyx_RefNannyFinishContext();
jpayne@69 9974 return __pyx_r;
jpayne@69 9975 }
jpayne@69 9976
jpayne@69 9977 static PyObject *__pyx_pf_5pysam_9libctabix_5asBed_2__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_asBed *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
jpayne@69 9978 PyObject *__pyx_r = NULL;
jpayne@69 9979 __Pyx_TraceDeclarations
jpayne@69 9980 __Pyx_RefNannyDeclarations
jpayne@69 9981 PyObject *__pyx_t_1 = NULL;
jpayne@69 9982 int __pyx_lineno = 0;
jpayne@69 9983 const char *__pyx_filename = NULL;
jpayne@69 9984 int __pyx_clineno = 0;
jpayne@69 9985 __Pyx_TraceFrameInit(__pyx_codeobj__12)
jpayne@69 9986 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 9987 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@69 9988
jpayne@69 9989 /* "(tree fragment)":17
jpayne@69 9990 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@69 9991 * def __setstate_cython__(self, __pyx_state):
jpayne@69 9992 * __pyx_unpickle_asBed__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 9993 */
jpayne@69 9994 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)
jpayne@69 9995 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_asBed__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
jpayne@69 9996 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9997 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 9998
jpayne@69 9999 /* "(tree fragment)":16
jpayne@69 10000 * else:
jpayne@69 10001 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@69 10002 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 10003 * __pyx_unpickle_asBed__set_state(self, __pyx_state)
jpayne@69 10004 */
jpayne@69 10005
jpayne@69 10006 /* function exit code */
jpayne@69 10007 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 10008 goto __pyx_L0;
jpayne@69 10009 __pyx_L1_error:;
jpayne@69 10010 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 10011 __Pyx_AddTraceback("pysam.libctabix.asBed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10012 __pyx_r = NULL;
jpayne@69 10013 __pyx_L0:;
jpayne@69 10014 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 10015 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10016 __Pyx_RefNannyFinishContext();
jpayne@69 10017 return __pyx_r;
jpayne@69 10018 }
jpayne@69 10019
jpayne@69 10020 /* "pysam/libctabix.pyx":280
jpayne@69 10021 *
jpayne@69 10022 * '''
jpayne@69 10023 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@69 10024 * cdef ctabixproxies.VCFProxy r
jpayne@69 10025 * r = ctabixproxies.VCFProxy(self.encoding)
jpayne@69 10026 */
jpayne@69 10027
jpayne@69 10028 static PyObject *__pyx_f_5pysam_9libctabix_5asVCF_parse(struct __pyx_obj_5pysam_9libctabix_asVCF *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
jpayne@69 10029 struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_r = 0;
jpayne@69 10030 PyObject *__pyx_r = NULL;
jpayne@69 10031 __Pyx_TraceDeclarations
jpayne@69 10032 __Pyx_RefNannyDeclarations
jpayne@69 10033 PyObject *__pyx_t_1 = NULL;
jpayne@69 10034 int __pyx_lineno = 0;
jpayne@69 10035 const char *__pyx_filename = NULL;
jpayne@69 10036 int __pyx_clineno = 0;
jpayne@69 10037 __Pyx_RefNannySetupContext("parse", 1);
jpayne@69 10038 __Pyx_TraceCall("parse", __pyx_f[0], 280, 0, __PYX_ERR(0, 280, __pyx_L1_error));
jpayne@69 10039
jpayne@69 10040 /* "pysam/libctabix.pyx":282
jpayne@69 10041 * cdef parse(self, char * buffer, int len):
jpayne@69 10042 * cdef ctabixproxies.VCFProxy r
jpayne@69 10043 * r = ctabixproxies.VCFProxy(self.encoding) # <<<<<<<<<<<<<<
jpayne@69 10044 * r.copy(buffer, len)
jpayne@69 10045 * return r
jpayne@69 10046 */
jpayne@69 10047 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5pysam_16libctabixproxies_VCFProxy), __pyx_v_self->__pyx_base.encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
jpayne@69 10048 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10049 __pyx_v_r = ((struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *)__pyx_t_1);
jpayne@69 10050 __pyx_t_1 = 0;
jpayne@69 10051
jpayne@69 10052 /* "pysam/libctabix.pyx":283
jpayne@69 10053 * cdef ctabixproxies.VCFProxy r
jpayne@69 10054 * r = ctabixproxies.VCFProxy(self.encoding)
jpayne@69 10055 * r.copy(buffer, len) # <<<<<<<<<<<<<<
jpayne@69 10056 * return r
jpayne@69 10057 *
jpayne@69 10058 */
jpayne@69 10059 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy *)__pyx_v_r->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
jpayne@69 10060 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10061 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10062
jpayne@69 10063 /* "pysam/libctabix.pyx":284
jpayne@69 10064 * r = ctabixproxies.VCFProxy(self.encoding)
jpayne@69 10065 * r.copy(buffer, len)
jpayne@69 10066 * return r # <<<<<<<<<<<<<<
jpayne@69 10067 *
jpayne@69 10068 *
jpayne@69 10069 */
jpayne@69 10070 __Pyx_XDECREF(__pyx_r);
jpayne@69 10071 __Pyx_INCREF((PyObject *)__pyx_v_r);
jpayne@69 10072 __pyx_r = ((PyObject *)__pyx_v_r);
jpayne@69 10073 goto __pyx_L0;
jpayne@69 10074
jpayne@69 10075 /* "pysam/libctabix.pyx":280
jpayne@69 10076 *
jpayne@69 10077 * '''
jpayne@69 10078 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@69 10079 * cdef ctabixproxies.VCFProxy r
jpayne@69 10080 * r = ctabixproxies.VCFProxy(self.encoding)
jpayne@69 10081 */
jpayne@69 10082
jpayne@69 10083 /* function exit code */
jpayne@69 10084 __pyx_L1_error:;
jpayne@69 10085 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 10086 __Pyx_AddTraceback("pysam.libctabix.asVCF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10087 __pyx_r = 0;
jpayne@69 10088 __pyx_L0:;
jpayne@69 10089 __Pyx_XDECREF((PyObject *)__pyx_v_r);
jpayne@69 10090 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 10091 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10092 __Pyx_RefNannyFinishContext();
jpayne@69 10093 return __pyx_r;
jpayne@69 10094 }
jpayne@69 10095
jpayne@69 10096 /* "(tree fragment)":1
jpayne@69 10097 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 10098 * cdef tuple state
jpayne@69 10099 * cdef object _dict
jpayne@69 10100 */
jpayne@69 10101
jpayne@69 10102 /* Python wrapper */
jpayne@69 10103 static PyObject *__pyx_pw_5pysam_9libctabix_5asVCF_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 10104 #if CYTHON_METH_FASTCALL
jpayne@69 10105 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10106 #else
jpayne@69 10107 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10108 #endif
jpayne@69 10109 ); /*proto*/
jpayne@69 10110 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asVCF___reduce_cython__, "asVCF.__reduce_cython__(self)");
jpayne@69 10111 static PyMethodDef __pyx_mdef_5pysam_9libctabix_5asVCF_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asVCF_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asVCF___reduce_cython__};
jpayne@69 10112 static PyObject *__pyx_pw_5pysam_9libctabix_5asVCF_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 10113 #if CYTHON_METH_FASTCALL
jpayne@69 10114 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10115 #else
jpayne@69 10116 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10117 #endif
jpayne@69 10118 ) {
jpayne@69 10119 #if !CYTHON_METH_FASTCALL
jpayne@69 10120 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 10121 #endif
jpayne@69 10122 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 10123 PyObject *__pyx_r = 0;
jpayne@69 10124 __Pyx_RefNannyDeclarations
jpayne@69 10125 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 10126 #if !CYTHON_METH_FASTCALL
jpayne@69 10127 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 10128 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 10129 #else
jpayne@69 10130 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 10131 #endif
jpayne@69 10132 #endif
jpayne@69 10133 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 10134 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 10135 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 10136 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 10137 __pyx_r = __pyx_pf_5pysam_9libctabix_5asVCF___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_asVCF *)__pyx_v_self));
jpayne@69 10138
jpayne@69 10139 /* function exit code */
jpayne@69 10140 __Pyx_RefNannyFinishContext();
jpayne@69 10141 return __pyx_r;
jpayne@69 10142 }
jpayne@69 10143
jpayne@69 10144 static PyObject *__pyx_pf_5pysam_9libctabix_5asVCF___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asVCF *__pyx_v_self) {
jpayne@69 10145 PyObject *__pyx_v_state = 0;
jpayne@69 10146 PyObject *__pyx_v__dict = 0;
jpayne@69 10147 int __pyx_v_use_setstate;
jpayne@69 10148 PyObject *__pyx_r = NULL;
jpayne@69 10149 __Pyx_TraceDeclarations
jpayne@69 10150 __Pyx_RefNannyDeclarations
jpayne@69 10151 PyObject *__pyx_t_1 = NULL;
jpayne@69 10152 int __pyx_t_2;
jpayne@69 10153 PyObject *__pyx_t_3 = NULL;
jpayne@69 10154 PyObject *__pyx_t_4 = NULL;
jpayne@69 10155 int __pyx_lineno = 0;
jpayne@69 10156 const char *__pyx_filename = NULL;
jpayne@69 10157 int __pyx_clineno = 0;
jpayne@69 10158 __Pyx_TraceFrameInit(__pyx_codeobj__13)
jpayne@69 10159 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 10160 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 10161
jpayne@69 10162 /* "(tree fragment)":5
jpayne@69 10163 * cdef object _dict
jpayne@69 10164 * cdef bint use_setstate
jpayne@69 10165 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@69 10166 * _dict = getattr(self, '__dict__', None)
jpayne@69 10167 * if _dict is not None:
jpayne@69 10168 */
jpayne@69 10169 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 10170 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10171 __Pyx_INCREF(__pyx_v_self->__pyx_base.encoding);
jpayne@69 10172 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.encoding);
jpayne@69 10173 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 10174 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@69 10175 __pyx_t_1 = 0;
jpayne@69 10176
jpayne@69 10177 /* "(tree fragment)":6
jpayne@69 10178 * cdef bint use_setstate
jpayne@69 10179 * state = (self.encoding,)
jpayne@69 10180 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@69 10181 * if _dict is not None:
jpayne@69 10182 * state += (_dict,)
jpayne@69 10183 */
jpayne@69 10184 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 10185 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10186 __pyx_v__dict = __pyx_t_1;
jpayne@69 10187 __pyx_t_1 = 0;
jpayne@69 10188
jpayne@69 10189 /* "(tree fragment)":7
jpayne@69 10190 * state = (self.encoding,)
jpayne@69 10191 * _dict = getattr(self, '__dict__', None)
jpayne@69 10192 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 10193 * state += (_dict,)
jpayne@69 10194 * use_setstate = True
jpayne@69 10195 */
jpayne@69 10196 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@69 10197 if (__pyx_t_2) {
jpayne@69 10198
jpayne@69 10199 /* "(tree fragment)":8
jpayne@69 10200 * _dict = getattr(self, '__dict__', None)
jpayne@69 10201 * if _dict is not None:
jpayne@69 10202 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@69 10203 * use_setstate = True
jpayne@69 10204 * else:
jpayne@69 10205 */
jpayne@69 10206 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 10207 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10208 __Pyx_INCREF(__pyx_v__dict);
jpayne@69 10209 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@69 10210 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@69 10211 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 10212 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 10213 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10214 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@69 10215 __pyx_t_3 = 0;
jpayne@69 10216
jpayne@69 10217 /* "(tree fragment)":9
jpayne@69 10218 * if _dict is not None:
jpayne@69 10219 * state += (_dict,)
jpayne@69 10220 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@69 10221 * else:
jpayne@69 10222 * use_setstate = self.encoding is not None
jpayne@69 10223 */
jpayne@69 10224 __pyx_v_use_setstate = 1;
jpayne@69 10225
jpayne@69 10226 /* "(tree fragment)":7
jpayne@69 10227 * state = (self.encoding,)
jpayne@69 10228 * _dict = getattr(self, '__dict__', None)
jpayne@69 10229 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 10230 * state += (_dict,)
jpayne@69 10231 * use_setstate = True
jpayne@69 10232 */
jpayne@69 10233 goto __pyx_L3;
jpayne@69 10234 }
jpayne@69 10235
jpayne@69 10236 /* "(tree fragment)":11
jpayne@69 10237 * use_setstate = True
jpayne@69 10238 * else:
jpayne@69 10239 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@69 10240 * if use_setstate:
jpayne@69 10241 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, None), state
jpayne@69 10242 */
jpayne@69 10243 /*else*/ {
jpayne@69 10244 __pyx_t_2 = (__pyx_v_self->__pyx_base.encoding != Py_None);
jpayne@69 10245 __pyx_v_use_setstate = __pyx_t_2;
jpayne@69 10246 }
jpayne@69 10247 __pyx_L3:;
jpayne@69 10248
jpayne@69 10249 /* "(tree fragment)":12
jpayne@69 10250 * else:
jpayne@69 10251 * use_setstate = self.encoding is not None
jpayne@69 10252 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 10253 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, None), state
jpayne@69 10254 * else:
jpayne@69 10255 */
jpayne@69 10256 if (__pyx_v_use_setstate) {
jpayne@69 10257
jpayne@69 10258 /* "(tree fragment)":13
jpayne@69 10259 * use_setstate = self.encoding is not None
jpayne@69 10260 * if use_setstate:
jpayne@69 10261 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@69 10262 * else:
jpayne@69 10263 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@69 10264 */
jpayne@69 10265 __Pyx_XDECREF(__pyx_r);
jpayne@69 10266 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_asVCF); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 10267 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 10268 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 10269 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10270 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 10271 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 10272 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 10273 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 10274 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 10275 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 10276 __Pyx_INCREF(Py_None);
jpayne@69 10277 __Pyx_GIVEREF(Py_None);
jpayne@69 10278 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 10279 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 10280 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 10281 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 10282 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 10283 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 10284 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 10285 __Pyx_INCREF(__pyx_v_state);
jpayne@69 10286 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 10287 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 10288 __pyx_t_3 = 0;
jpayne@69 10289 __pyx_t_1 = 0;
jpayne@69 10290 __pyx_r = __pyx_t_4;
jpayne@69 10291 __pyx_t_4 = 0;
jpayne@69 10292 goto __pyx_L0;
jpayne@69 10293
jpayne@69 10294 /* "(tree fragment)":12
jpayne@69 10295 * else:
jpayne@69 10296 * use_setstate = self.encoding is not None
jpayne@69 10297 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 10298 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, None), state
jpayne@69 10299 * else:
jpayne@69 10300 */
jpayne@69 10301 }
jpayne@69 10302
jpayne@69 10303 /* "(tree fragment)":15
jpayne@69 10304 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, None), state
jpayne@69 10305 * else:
jpayne@69 10306 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@69 10307 * def __setstate_cython__(self, __pyx_state):
jpayne@69 10308 * __pyx_unpickle_asVCF__set_state(self, __pyx_state)
jpayne@69 10309 */
jpayne@69 10310 /*else*/ {
jpayne@69 10311 __Pyx_XDECREF(__pyx_r);
jpayne@69 10312 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_asVCF); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 10313 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 10314 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 10315 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10316 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 10317 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 10318 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 10319 __Pyx_INCREF(__pyx_int_243541226);
jpayne@69 10320 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@69 10321 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 10322 __Pyx_INCREF(__pyx_v_state);
jpayne@69 10323 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 10324 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 10325 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 10326 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 10327 __Pyx_GIVEREF(__pyx_t_4);
jpayne@69 10328 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 10329 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 10330 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 10331 __pyx_t_4 = 0;
jpayne@69 10332 __pyx_t_1 = 0;
jpayne@69 10333 __pyx_r = __pyx_t_3;
jpayne@69 10334 __pyx_t_3 = 0;
jpayne@69 10335 goto __pyx_L0;
jpayne@69 10336 }
jpayne@69 10337
jpayne@69 10338 /* "(tree fragment)":1
jpayne@69 10339 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 10340 * cdef tuple state
jpayne@69 10341 * cdef object _dict
jpayne@69 10342 */
jpayne@69 10343
jpayne@69 10344 /* function exit code */
jpayne@69 10345 __pyx_L1_error:;
jpayne@69 10346 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 10347 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 10348 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 10349 __Pyx_AddTraceback("pysam.libctabix.asVCF.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10350 __pyx_r = NULL;
jpayne@69 10351 __pyx_L0:;
jpayne@69 10352 __Pyx_XDECREF(__pyx_v_state);
jpayne@69 10353 __Pyx_XDECREF(__pyx_v__dict);
jpayne@69 10354 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 10355 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10356 __Pyx_RefNannyFinishContext();
jpayne@69 10357 return __pyx_r;
jpayne@69 10358 }
jpayne@69 10359
jpayne@69 10360 /* "(tree fragment)":16
jpayne@69 10361 * else:
jpayne@69 10362 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@69 10363 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 10364 * __pyx_unpickle_asVCF__set_state(self, __pyx_state)
jpayne@69 10365 */
jpayne@69 10366
jpayne@69 10367 /* Python wrapper */
jpayne@69 10368 static PyObject *__pyx_pw_5pysam_9libctabix_5asVCF_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 10369 #if CYTHON_METH_FASTCALL
jpayne@69 10370 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10371 #else
jpayne@69 10372 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10373 #endif
jpayne@69 10374 ); /*proto*/
jpayne@69 10375 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asVCF_2__setstate_cython__, "asVCF.__setstate_cython__(self, __pyx_state)");
jpayne@69 10376 static PyMethodDef __pyx_mdef_5pysam_9libctabix_5asVCF_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asVCF_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asVCF_2__setstate_cython__};
jpayne@69 10377 static PyObject *__pyx_pw_5pysam_9libctabix_5asVCF_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 10378 #if CYTHON_METH_FASTCALL
jpayne@69 10379 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10380 #else
jpayne@69 10381 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10382 #endif
jpayne@69 10383 ) {
jpayne@69 10384 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 10385 #if !CYTHON_METH_FASTCALL
jpayne@69 10386 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 10387 #endif
jpayne@69 10388 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 10389 PyObject* values[1] = {0};
jpayne@69 10390 int __pyx_lineno = 0;
jpayne@69 10391 const char *__pyx_filename = NULL;
jpayne@69 10392 int __pyx_clineno = 0;
jpayne@69 10393 PyObject *__pyx_r = 0;
jpayne@69 10394 __Pyx_RefNannyDeclarations
jpayne@69 10395 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 10396 #if !CYTHON_METH_FASTCALL
jpayne@69 10397 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 10398 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 10399 #else
jpayne@69 10400 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 10401 #endif
jpayne@69 10402 #endif
jpayne@69 10403 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 10404 {
jpayne@69 10405 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 10406 if (__pyx_kwds) {
jpayne@69 10407 Py_ssize_t kw_args;
jpayne@69 10408 switch (__pyx_nargs) {
jpayne@69 10409 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 10410 CYTHON_FALLTHROUGH;
jpayne@69 10411 case 0: break;
jpayne@69 10412 default: goto __pyx_L5_argtuple_error;
jpayne@69 10413 }
jpayne@69 10414 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 10415 switch (__pyx_nargs) {
jpayne@69 10416 case 0:
jpayne@69 10417 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 10418 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 10419 kw_args--;
jpayne@69 10420 }
jpayne@69 10421 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 10422 else goto __pyx_L5_argtuple_error;
jpayne@69 10423 }
jpayne@69 10424 if (unlikely(kw_args > 0)) {
jpayne@69 10425 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 10426 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)
jpayne@69 10427 }
jpayne@69 10428 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 10429 goto __pyx_L5_argtuple_error;
jpayne@69 10430 } else {
jpayne@69 10431 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 10432 }
jpayne@69 10433 __pyx_v___pyx_state = values[0];
jpayne@69 10434 }
jpayne@69 10435 goto __pyx_L6_skip;
jpayne@69 10436 __pyx_L5_argtuple_error:;
jpayne@69 10437 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 10438 __pyx_L6_skip:;
jpayne@69 10439 goto __pyx_L4_argument_unpacking_done;
jpayne@69 10440 __pyx_L3_error:;
jpayne@69 10441 {
jpayne@69 10442 Py_ssize_t __pyx_temp;
jpayne@69 10443 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 10444 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 10445 }
jpayne@69 10446 }
jpayne@69 10447 __Pyx_AddTraceback("pysam.libctabix.asVCF.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10448 __Pyx_RefNannyFinishContext();
jpayne@69 10449 return NULL;
jpayne@69 10450 __pyx_L4_argument_unpacking_done:;
jpayne@69 10451 __pyx_r = __pyx_pf_5pysam_9libctabix_5asVCF_2__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_asVCF *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 10452
jpayne@69 10453 /* function exit code */
jpayne@69 10454 {
jpayne@69 10455 Py_ssize_t __pyx_temp;
jpayne@69 10456 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 10457 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 10458 }
jpayne@69 10459 }
jpayne@69 10460 __Pyx_RefNannyFinishContext();
jpayne@69 10461 return __pyx_r;
jpayne@69 10462 }
jpayne@69 10463
jpayne@69 10464 static PyObject *__pyx_pf_5pysam_9libctabix_5asVCF_2__setstate_cython__(struct __pyx_obj_5pysam_9libctabix_asVCF *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
jpayne@69 10465 PyObject *__pyx_r = NULL;
jpayne@69 10466 __Pyx_TraceDeclarations
jpayne@69 10467 __Pyx_RefNannyDeclarations
jpayne@69 10468 PyObject *__pyx_t_1 = NULL;
jpayne@69 10469 int __pyx_lineno = 0;
jpayne@69 10470 const char *__pyx_filename = NULL;
jpayne@69 10471 int __pyx_clineno = 0;
jpayne@69 10472 __Pyx_TraceFrameInit(__pyx_codeobj__14)
jpayne@69 10473 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 10474 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@69 10475
jpayne@69 10476 /* "(tree fragment)":17
jpayne@69 10477 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@69 10478 * def __setstate_cython__(self, __pyx_state):
jpayne@69 10479 * __pyx_unpickle_asVCF__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 10480 */
jpayne@69 10481 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)
jpayne@69 10482 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_asVCF__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
jpayne@69 10483 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10484 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10485
jpayne@69 10486 /* "(tree fragment)":16
jpayne@69 10487 * else:
jpayne@69 10488 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@69 10489 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 10490 * __pyx_unpickle_asVCF__set_state(self, __pyx_state)
jpayne@69 10491 */
jpayne@69 10492
jpayne@69 10493 /* function exit code */
jpayne@69 10494 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 10495 goto __pyx_L0;
jpayne@69 10496 __pyx_L1_error:;
jpayne@69 10497 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 10498 __Pyx_AddTraceback("pysam.libctabix.asVCF.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10499 __pyx_r = NULL;
jpayne@69 10500 __pyx_L0:;
jpayne@69 10501 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 10502 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10503 __Pyx_RefNannyFinishContext();
jpayne@69 10504 return __pyx_r;
jpayne@69 10505 }
jpayne@69 10506
jpayne@69 10507 /* "pysam/libctabix.pyx":334
jpayne@69 10508 * if file could not be opened
jpayne@69 10509 * """
jpayne@69 10510 * def __cinit__(self, # <<<<<<<<<<<<<<
jpayne@69 10511 * filename,
jpayne@69 10512 * mode='r',
jpayne@69 10513 */
jpayne@69 10514
jpayne@69 10515 /* Python wrapper */
jpayne@69 10516 static int __pyx_pw_5pysam_9libctabix_9TabixFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 10517 static int __pyx_pw_5pysam_9libctabix_9TabixFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 10518 PyObject *__pyx_v_filename = 0;
jpayne@69 10519 PyObject *__pyx_v_mode = 0;
jpayne@69 10520 PyObject *__pyx_v_parser = 0;
jpayne@69 10521 PyObject *__pyx_v_index = 0;
jpayne@69 10522 PyObject *__pyx_v_encoding = 0;
jpayne@69 10523 PyObject *__pyx_v_threads = 0;
jpayne@69 10524 PyObject *__pyx_v_args = 0;
jpayne@69 10525 PyObject *__pyx_v_kwargs = 0;
jpayne@69 10526 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 10527 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 10528 PyObject* values[6] = {0,0,0,0,0,0};
jpayne@69 10529 int __pyx_lineno = 0;
jpayne@69 10530 const char *__pyx_filename = NULL;
jpayne@69 10531 int __pyx_clineno = 0;
jpayne@69 10532 int __pyx_r;
jpayne@69 10533 __Pyx_RefNannyDeclarations
jpayne@69 10534 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
jpayne@69 10535 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 10536 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 10537 #else
jpayne@69 10538 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@69 10539 #endif
jpayne@69 10540 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 10541 __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
jpayne@69 10542 __Pyx_GOTREF(__pyx_v_kwargs);
jpayne@69 10543 __pyx_v_args = __Pyx_ArgsSlice_VARARGS(__pyx_args, 6, __pyx_nargs);
jpayne@69 10544 if (unlikely(!__pyx_v_args)) {
jpayne@69 10545 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
jpayne@69 10546 __Pyx_RefNannyFinishContext();
jpayne@69 10547 return -1;
jpayne@69 10548 }
jpayne@69 10549 __Pyx_GOTREF(__pyx_v_args);
jpayne@69 10550 {
jpayne@69 10551 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_parser,&__pyx_n_s_index,&__pyx_n_s_encoding,&__pyx_n_s_threads,0};
jpayne@69 10552 values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_u_r));
jpayne@69 10553
jpayne@69 10554 /* "pysam/libctabix.pyx":337
jpayne@69 10555 * filename,
jpayne@69 10556 * mode='r',
jpayne@69 10557 * parser=None, # <<<<<<<<<<<<<<
jpayne@69 10558 * index=None,
jpayne@69 10559 * encoding="ascii",
jpayne@69 10560 */
jpayne@69 10561 values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
jpayne@69 10562
jpayne@69 10563 /* "pysam/libctabix.pyx":338
jpayne@69 10564 * mode='r',
jpayne@69 10565 * parser=None,
jpayne@69 10566 * index=None, # <<<<<<<<<<<<<<
jpayne@69 10567 * encoding="ascii",
jpayne@69 10568 * threads=1,
jpayne@69 10569 */
jpayne@69 10570 values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
jpayne@69 10571 values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_u_ascii));
jpayne@69 10572 values[5] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_int_1));
jpayne@69 10573 if (__pyx_kwds) {
jpayne@69 10574 Py_ssize_t kw_args;
jpayne@69 10575 switch (__pyx_nargs) {
jpayne@69 10576 default:
jpayne@69 10577 case 6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
jpayne@69 10578 CYTHON_FALLTHROUGH;
jpayne@69 10579 case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
jpayne@69 10580 CYTHON_FALLTHROUGH;
jpayne@69 10581 case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
jpayne@69 10582 CYTHON_FALLTHROUGH;
jpayne@69 10583 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@69 10584 CYTHON_FALLTHROUGH;
jpayne@69 10585 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@69 10586 CYTHON_FALLTHROUGH;
jpayne@69 10587 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 10588 CYTHON_FALLTHROUGH;
jpayne@69 10589 case 0: break;
jpayne@69 10590 }
jpayne@69 10591 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@69 10592 switch (__pyx_nargs) {
jpayne@69 10593 case 0:
jpayne@69 10594 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
jpayne@69 10595 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@69 10596 kw_args--;
jpayne@69 10597 }
jpayne@69 10598 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@69 10599 else goto __pyx_L5_argtuple_error;
jpayne@69 10600 CYTHON_FALLTHROUGH;
jpayne@69 10601 case 1:
jpayne@69 10602 if (kw_args > 0) {
jpayne@69 10603 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
jpayne@69 10604 if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 10605 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@69 10606 }
jpayne@69 10607 CYTHON_FALLTHROUGH;
jpayne@69 10608 case 2:
jpayne@69 10609 if (kw_args > 0) {
jpayne@69 10610 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser);
jpayne@69 10611 if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 10612 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@69 10613 }
jpayne@69 10614 CYTHON_FALLTHROUGH;
jpayne@69 10615 case 3:
jpayne@69 10616 if (kw_args > 0) {
jpayne@69 10617 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index);
jpayne@69 10618 if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 10619 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@69 10620 }
jpayne@69 10621 CYTHON_FALLTHROUGH;
jpayne@69 10622 case 4:
jpayne@69 10623 if (kw_args > 0) {
jpayne@69 10624 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding);
jpayne@69 10625 if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 10626 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@69 10627 }
jpayne@69 10628 CYTHON_FALLTHROUGH;
jpayne@69 10629 case 5:
jpayne@69 10630 if (kw_args > 0) {
jpayne@69 10631 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_threads);
jpayne@69 10632 if (value) { values[5] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 10633 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@69 10634 }
jpayne@69 10635 }
jpayne@69 10636 if (unlikely(kw_args > 0)) {
jpayne@69 10637 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 10638 const Py_ssize_t used_pos_args = (kwd_pos_args < 6) ? kwd_pos_args : 6;
jpayne@69 10639 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@69 10640 }
jpayne@69 10641 } else {
jpayne@69 10642 switch (__pyx_nargs) {
jpayne@69 10643 default:
jpayne@69 10644 case 6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
jpayne@69 10645 CYTHON_FALLTHROUGH;
jpayne@69 10646 case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
jpayne@69 10647 CYTHON_FALLTHROUGH;
jpayne@69 10648 case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
jpayne@69 10649 CYTHON_FALLTHROUGH;
jpayne@69 10650 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@69 10651 CYTHON_FALLTHROUGH;
jpayne@69 10652 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@69 10653 CYTHON_FALLTHROUGH;
jpayne@69 10654 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 10655 break;
jpayne@69 10656 case 0:
jpayne@69 10657 goto __pyx_L5_argtuple_error;
jpayne@69 10658 }
jpayne@69 10659 }
jpayne@69 10660 __pyx_v_filename = values[0];
jpayne@69 10661 __pyx_v_mode = values[1];
jpayne@69 10662 __pyx_v_parser = values[2];
jpayne@69 10663 __pyx_v_index = values[3];
jpayne@69 10664 __pyx_v_encoding = values[4];
jpayne@69 10665 __pyx_v_threads = values[5];
jpayne@69 10666 }
jpayne@69 10667 goto __pyx_L6_skip;
jpayne@69 10668 __pyx_L5_argtuple_error:;
jpayne@69 10669 __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@69 10670 __pyx_L6_skip:;
jpayne@69 10671 goto __pyx_L4_argument_unpacking_done;
jpayne@69 10672 __pyx_L3_error:;
jpayne@69 10673 {
jpayne@69 10674 Py_ssize_t __pyx_temp;
jpayne@69 10675 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 10676 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 10677 }
jpayne@69 10678 }
jpayne@69 10679 __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
jpayne@69 10680 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
jpayne@69 10681 __Pyx_AddTraceback("pysam.libctabix.TabixFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10682 __Pyx_RefNannyFinishContext();
jpayne@69 10683 return -1;
jpayne@69 10684 __pyx_L4_argument_unpacking_done:;
jpayne@69 10685 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile___cinit__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_parser, __pyx_v_index, __pyx_v_encoding, __pyx_v_threads, __pyx_v_args, __pyx_v_kwargs);
jpayne@69 10686
jpayne@69 10687 /* "pysam/libctabix.pyx":334
jpayne@69 10688 * if file could not be opened
jpayne@69 10689 * """
jpayne@69 10690 * def __cinit__(self, # <<<<<<<<<<<<<<
jpayne@69 10691 * filename,
jpayne@69 10692 * mode='r',
jpayne@69 10693 */
jpayne@69 10694
jpayne@69 10695 /* function exit code */
jpayne@69 10696 __Pyx_DECREF(__pyx_v_args);
jpayne@69 10697 __Pyx_DECREF(__pyx_v_kwargs);
jpayne@69 10698 {
jpayne@69 10699 Py_ssize_t __pyx_temp;
jpayne@69 10700 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 10701 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 10702 }
jpayne@69 10703 }
jpayne@69 10704 __Pyx_RefNannyFinishContext();
jpayne@69 10705 return __pyx_r;
jpayne@69 10706 }
jpayne@69 10707
jpayne@69 10708 static int __pyx_pf_5pysam_9libctabix_9TabixFile___cinit__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_parser, PyObject *__pyx_v_index, PyObject *__pyx_v_encoding, PyObject *__pyx_v_threads, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
jpayne@69 10709 int __pyx_r;
jpayne@69 10710 __Pyx_TraceDeclarations
jpayne@69 10711 __Pyx_RefNannyDeclarations
jpayne@69 10712 PyObject *__pyx_t_1 = NULL;
jpayne@69 10713 PyObject *__pyx_t_2 = NULL;
jpayne@69 10714 PyObject *__pyx_t_3 = NULL;
jpayne@69 10715 PyObject *__pyx_t_4 = NULL;
jpayne@69 10716 int __pyx_lineno = 0;
jpayne@69 10717 const char *__pyx_filename = NULL;
jpayne@69 10718 int __pyx_clineno = 0;
jpayne@69 10719 __Pyx_RefNannySetupContext("__cinit__", 1);
jpayne@69 10720 __Pyx_TraceCall("__cinit__", __pyx_f[0], 334, 0, __PYX_ERR(0, 334, __pyx_L1_error));
jpayne@69 10721
jpayne@69 10722 /* "pysam/libctabix.pyx":344
jpayne@69 10723 * **kwargs ):
jpayne@69 10724 *
jpayne@69 10725 * self.htsfile = NULL # <<<<<<<<<<<<<<
jpayne@69 10726 * self.is_remote = False
jpayne@69 10727 * self.is_stream = False
jpayne@69 10728 */
jpayne@69 10729 __pyx_v_self->__pyx_base.htsfile = NULL;
jpayne@69 10730
jpayne@69 10731 /* "pysam/libctabix.pyx":345
jpayne@69 10732 *
jpayne@69 10733 * self.htsfile = NULL
jpayne@69 10734 * self.is_remote = False # <<<<<<<<<<<<<<
jpayne@69 10735 * self.is_stream = False
jpayne@69 10736 * self.parser = parser
jpayne@69 10737 */
jpayne@69 10738 __pyx_v_self->__pyx_base.is_remote = 0;
jpayne@69 10739
jpayne@69 10740 /* "pysam/libctabix.pyx":346
jpayne@69 10741 * self.htsfile = NULL
jpayne@69 10742 * self.is_remote = False
jpayne@69 10743 * self.is_stream = False # <<<<<<<<<<<<<<
jpayne@69 10744 * self.parser = parser
jpayne@69 10745 * self.threads = threads
jpayne@69 10746 */
jpayne@69 10747 __pyx_v_self->__pyx_base.is_stream = 0;
jpayne@69 10748
jpayne@69 10749 /* "pysam/libctabix.pyx":347
jpayne@69 10750 * self.is_remote = False
jpayne@69 10751 * self.is_stream = False
jpayne@69 10752 * self.parser = parser # <<<<<<<<<<<<<<
jpayne@69 10753 * self.threads = threads
jpayne@69 10754 * self._open(filename, mode, index, *args, **kwargs)
jpayne@69 10755 */
jpayne@69 10756 if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_5pysam_9libctabix_Parser))))) __PYX_ERR(0, 347, __pyx_L1_error)
jpayne@69 10757 __pyx_t_1 = __pyx_v_parser;
jpayne@69 10758 __Pyx_INCREF(__pyx_t_1);
jpayne@69 10759 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 10760 __Pyx_GOTREF((PyObject *)__pyx_v_self->parser);
jpayne@69 10761 __Pyx_DECREF((PyObject *)__pyx_v_self->parser);
jpayne@69 10762 __pyx_v_self->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_t_1);
jpayne@69 10763 __pyx_t_1 = 0;
jpayne@69 10764
jpayne@69 10765 /* "pysam/libctabix.pyx":348
jpayne@69 10766 * self.is_stream = False
jpayne@69 10767 * self.parser = parser
jpayne@69 10768 * self.threads = threads # <<<<<<<<<<<<<<
jpayne@69 10769 * self._open(filename, mode, index, *args, **kwargs)
jpayne@69 10770 * self.encoding = encoding
jpayne@69 10771 */
jpayne@69 10772 __Pyx_INCREF(__pyx_v_threads);
jpayne@69 10773 __Pyx_GIVEREF(__pyx_v_threads);
jpayne@69 10774 __Pyx_GOTREF(__pyx_v_self->__pyx_base.threads);
jpayne@69 10775 __Pyx_DECREF(__pyx_v_self->__pyx_base.threads);
jpayne@69 10776 __pyx_v_self->__pyx_base.threads = __pyx_v_threads;
jpayne@69 10777
jpayne@69 10778 /* "pysam/libctabix.pyx":349
jpayne@69 10779 * self.parser = parser
jpayne@69 10780 * self.threads = threads
jpayne@69 10781 * self._open(filename, mode, index, *args, **kwargs) # <<<<<<<<<<<<<<
jpayne@69 10782 * self.encoding = encoding
jpayne@69 10783 *
jpayne@69 10784 */
jpayne@69 10785 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
jpayne@69 10786 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10787 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
jpayne@69 10788 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 10789 __Pyx_INCREF(__pyx_v_filename);
jpayne@69 10790 __Pyx_GIVEREF(__pyx_v_filename);
jpayne@69 10791 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename)) __PYX_ERR(0, 349, __pyx_L1_error);
jpayne@69 10792 __Pyx_INCREF(__pyx_v_mode);
jpayne@69 10793 __Pyx_GIVEREF(__pyx_v_mode);
jpayne@69 10794 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mode)) __PYX_ERR(0, 349, __pyx_L1_error);
jpayne@69 10795 __Pyx_INCREF(__pyx_v_index);
jpayne@69 10796 __Pyx_GIVEREF(__pyx_v_index);
jpayne@69 10797 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_index)) __PYX_ERR(0, 349, __pyx_L1_error);
jpayne@69 10798 __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error)
jpayne@69 10799 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 10800 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 10801 __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
jpayne@69 10802 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 10803 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error)
jpayne@69 10804 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 10805 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10806 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 10807 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 10808 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 10809
jpayne@69 10810 /* "pysam/libctabix.pyx":350
jpayne@69 10811 * self.threads = threads
jpayne@69 10812 * self._open(filename, mode, index, *args, **kwargs)
jpayne@69 10813 * self.encoding = encoding # <<<<<<<<<<<<<<
jpayne@69 10814 *
jpayne@69 10815 * def _open( self,
jpayne@69 10816 */
jpayne@69 10817 __Pyx_INCREF(__pyx_v_encoding);
jpayne@69 10818 __Pyx_GIVEREF(__pyx_v_encoding);
jpayne@69 10819 __Pyx_GOTREF(__pyx_v_self->encoding);
jpayne@69 10820 __Pyx_DECREF(__pyx_v_self->encoding);
jpayne@69 10821 __pyx_v_self->encoding = __pyx_v_encoding;
jpayne@69 10822
jpayne@69 10823 /* "pysam/libctabix.pyx":334
jpayne@69 10824 * if file could not be opened
jpayne@69 10825 * """
jpayne@69 10826 * def __cinit__(self, # <<<<<<<<<<<<<<
jpayne@69 10827 * filename,
jpayne@69 10828 * mode='r',
jpayne@69 10829 */
jpayne@69 10830
jpayne@69 10831 /* function exit code */
jpayne@69 10832 __pyx_r = 0;
jpayne@69 10833 goto __pyx_L0;
jpayne@69 10834 __pyx_L1_error:;
jpayne@69 10835 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 10836 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 10837 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 10838 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 10839 __Pyx_AddTraceback("pysam.libctabix.TabixFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10840 __pyx_r = -1;
jpayne@69 10841 __pyx_L0:;
jpayne@69 10842 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 10843 __Pyx_RefNannyFinishContext();
jpayne@69 10844 return __pyx_r;
jpayne@69 10845 }
jpayne@69 10846
jpayne@69 10847 /* "pysam/libctabix.pyx":352
jpayne@69 10848 * self.encoding = encoding
jpayne@69 10849 *
jpayne@69 10850 * def _open( self, # <<<<<<<<<<<<<<
jpayne@69 10851 * filename,
jpayne@69 10852 * mode='r',
jpayne@69 10853 */
jpayne@69 10854
jpayne@69 10855 /* Python wrapper */
jpayne@69 10856 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_3_open(PyObject *__pyx_v_self,
jpayne@69 10857 #if CYTHON_METH_FASTCALL
jpayne@69 10858 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10859 #else
jpayne@69 10860 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10861 #endif
jpayne@69 10862 ); /*proto*/
jpayne@69 10863 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9TabixFile_2_open, "TabixFile._open(self, filename, mode=u'r', index=None, threads=1)\nopen a :term:`tabix file` for reading.");
jpayne@69 10864 static PyMethodDef __pyx_mdef_5pysam_9libctabix_9TabixFile_3_open = {"_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_3_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_2_open};
jpayne@69 10865 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_3_open(PyObject *__pyx_v_self,
jpayne@69 10866 #if CYTHON_METH_FASTCALL
jpayne@69 10867 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10868 #else
jpayne@69 10869 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10870 #endif
jpayne@69 10871 ) {
jpayne@69 10872 PyObject *__pyx_v_filename = 0;
jpayne@69 10873 PyObject *__pyx_v_mode = 0;
jpayne@69 10874 PyObject *__pyx_v_index = 0;
jpayne@69 10875 PyObject *__pyx_v_threads = 0;
jpayne@69 10876 #if !CYTHON_METH_FASTCALL
jpayne@69 10877 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 10878 #endif
jpayne@69 10879 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 10880 PyObject* values[4] = {0,0,0,0};
jpayne@69 10881 int __pyx_lineno = 0;
jpayne@69 10882 const char *__pyx_filename = NULL;
jpayne@69 10883 int __pyx_clineno = 0;
jpayne@69 10884 PyObject *__pyx_r = 0;
jpayne@69 10885 __Pyx_RefNannyDeclarations
jpayne@69 10886 __Pyx_RefNannySetupContext("_open (wrapper)", 0);
jpayne@69 10887 #if !CYTHON_METH_FASTCALL
jpayne@69 10888 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 10889 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 10890 #else
jpayne@69 10891 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 10892 #endif
jpayne@69 10893 #endif
jpayne@69 10894 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 10895 {
jpayne@69 10896 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_index,&__pyx_n_s_threads,0};
jpayne@69 10897 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_r));
jpayne@69 10898
jpayne@69 10899 /* "pysam/libctabix.pyx":355
jpayne@69 10900 * filename,
jpayne@69 10901 * mode='r',
jpayne@69 10902 * index=None, # <<<<<<<<<<<<<<
jpayne@69 10903 * threads=1,
jpayne@69 10904 * ):
jpayne@69 10905 */
jpayne@69 10906 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 10907 values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_1));
jpayne@69 10908 if (__pyx_kwds) {
jpayne@69 10909 Py_ssize_t kw_args;
jpayne@69 10910 switch (__pyx_nargs) {
jpayne@69 10911 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@69 10912 CYTHON_FALLTHROUGH;
jpayne@69 10913 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 10914 CYTHON_FALLTHROUGH;
jpayne@69 10915 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 10916 CYTHON_FALLTHROUGH;
jpayne@69 10917 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 10918 CYTHON_FALLTHROUGH;
jpayne@69 10919 case 0: break;
jpayne@69 10920 default: goto __pyx_L5_argtuple_error;
jpayne@69 10921 }
jpayne@69 10922 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 10923 switch (__pyx_nargs) {
jpayne@69 10924 case 0:
jpayne@69 10925 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
jpayne@69 10926 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 10927 kw_args--;
jpayne@69 10928 }
jpayne@69 10929 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error)
jpayne@69 10930 else goto __pyx_L5_argtuple_error;
jpayne@69 10931 CYTHON_FALLTHROUGH;
jpayne@69 10932 case 1:
jpayne@69 10933 if (kw_args > 0) {
jpayne@69 10934 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
jpayne@69 10935 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 10936 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error)
jpayne@69 10937 }
jpayne@69 10938 CYTHON_FALLTHROUGH;
jpayne@69 10939 case 2:
jpayne@69 10940 if (kw_args > 0) {
jpayne@69 10941 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index);
jpayne@69 10942 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 10943 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error)
jpayne@69 10944 }
jpayne@69 10945 CYTHON_FALLTHROUGH;
jpayne@69 10946 case 3:
jpayne@69 10947 if (kw_args > 0) {
jpayne@69 10948 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_threads);
jpayne@69 10949 if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 10950 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error)
jpayne@69 10951 }
jpayne@69 10952 }
jpayne@69 10953 if (unlikely(kw_args > 0)) {
jpayne@69 10954 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 10955 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_open") < 0)) __PYX_ERR(0, 352, __pyx_L3_error)
jpayne@69 10956 }
jpayne@69 10957 } else {
jpayne@69 10958 switch (__pyx_nargs) {
jpayne@69 10959 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@69 10960 CYTHON_FALLTHROUGH;
jpayne@69 10961 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 10962 CYTHON_FALLTHROUGH;
jpayne@69 10963 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 10964 CYTHON_FALLTHROUGH;
jpayne@69 10965 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 10966 break;
jpayne@69 10967 default: goto __pyx_L5_argtuple_error;
jpayne@69 10968 }
jpayne@69 10969 }
jpayne@69 10970 __pyx_v_filename = values[0];
jpayne@69 10971 __pyx_v_mode = values[1];
jpayne@69 10972 __pyx_v_index = values[2];
jpayne@69 10973 __pyx_v_threads = values[3];
jpayne@69 10974 }
jpayne@69 10975 goto __pyx_L6_skip;
jpayne@69 10976 __pyx_L5_argtuple_error:;
jpayne@69 10977 __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 352, __pyx_L3_error)
jpayne@69 10978 __pyx_L6_skip:;
jpayne@69 10979 goto __pyx_L4_argument_unpacking_done;
jpayne@69 10980 __pyx_L3_error:;
jpayne@69 10981 {
jpayne@69 10982 Py_ssize_t __pyx_temp;
jpayne@69 10983 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 10984 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 10985 }
jpayne@69 10986 }
jpayne@69 10987 __Pyx_AddTraceback("pysam.libctabix.TabixFile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10988 __Pyx_RefNannyFinishContext();
jpayne@69 10989 return NULL;
jpayne@69 10990 __pyx_L4_argument_unpacking_done:;
jpayne@69 10991 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_2_open(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_index, __pyx_v_threads);
jpayne@69 10992
jpayne@69 10993 /* "pysam/libctabix.pyx":352
jpayne@69 10994 * self.encoding = encoding
jpayne@69 10995 *
jpayne@69 10996 * def _open( self, # <<<<<<<<<<<<<<
jpayne@69 10997 * filename,
jpayne@69 10998 * mode='r',
jpayne@69 10999 */
jpayne@69 11000
jpayne@69 11001 /* function exit code */
jpayne@69 11002 {
jpayne@69 11003 Py_ssize_t __pyx_temp;
jpayne@69 11004 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 11005 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 11006 }
jpayne@69 11007 }
jpayne@69 11008 __Pyx_RefNannyFinishContext();
jpayne@69 11009 return __pyx_r;
jpayne@69 11010 }
jpayne@69 11011
jpayne@69 11012 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_2_open(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_index, PyObject *__pyx_v_threads) {
jpayne@69 11013 PyObject *__pyx_v_filename_index = NULL;
jpayne@69 11014 char *__pyx_v_cfilename;
jpayne@69 11015 char *__pyx_v_cfilename_index;
jpayne@69 11016 PyObject *__pyx_r = NULL;
jpayne@69 11017 __Pyx_TraceDeclarations
jpayne@69 11018 __Pyx_RefNannyDeclarations
jpayne@69 11019 int __pyx_t_1;
jpayne@69 11020 PyObject *__pyx_t_2 = NULL;
jpayne@69 11021 PyObject *__pyx_t_3 = NULL;
jpayne@69 11022 PyObject *__pyx_t_4 = NULL;
jpayne@69 11023 unsigned int __pyx_t_5;
jpayne@69 11024 char const *__pyx_t_6;
jpayne@69 11025 int __pyx_t_7;
jpayne@69 11026 char *__pyx_t_8;
jpayne@69 11027 int64_t __pyx_t_9;
jpayne@69 11028 int __pyx_lineno = 0;
jpayne@69 11029 const char *__pyx_filename = NULL;
jpayne@69 11030 int __pyx_clineno = 0;
jpayne@69 11031 __Pyx_TraceFrameInit(__pyx_codeobj__15)
jpayne@69 11032 __Pyx_RefNannySetupContext("_open", 1);
jpayne@69 11033 __Pyx_TraceCall("_open", __pyx_f[0], 352, 0, __PYX_ERR(0, 352, __pyx_L1_error));
jpayne@69 11034
jpayne@69 11035 /* "pysam/libctabix.pyx":360
jpayne@69 11036 * '''open a :term:`tabix file` for reading.'''
jpayne@69 11037 *
jpayne@69 11038 * if mode != 'r': # <<<<<<<<<<<<<<
jpayne@69 11039 * raise ValueError("invalid file opening mode `%s`" % mode)
jpayne@69 11040 *
jpayne@69 11041 */
jpayne@69 11042 __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_n_u_r, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 360, __pyx_L1_error)
jpayne@69 11043 if (unlikely(__pyx_t_1)) {
jpayne@69 11044
jpayne@69 11045 /* "pysam/libctabix.pyx":361
jpayne@69 11046 *
jpayne@69 11047 * if mode != 'r':
jpayne@69 11048 * raise ValueError("invalid file opening mode `%s`" % mode) # <<<<<<<<<<<<<<
jpayne@69 11049 *
jpayne@69 11050 * if self.htsfile != NULL:
jpayne@69 11051 */
jpayne@69 11052 __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_invalid_file_opening_mode_s, __pyx_v_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
jpayne@69 11053 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11054 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error)
jpayne@69 11055 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11056 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11057 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 11058 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 11059 __PYX_ERR(0, 361, __pyx_L1_error)
jpayne@69 11060
jpayne@69 11061 /* "pysam/libctabix.pyx":360
jpayne@69 11062 * '''open a :term:`tabix file` for reading.'''
jpayne@69 11063 *
jpayne@69 11064 * if mode != 'r': # <<<<<<<<<<<<<<
jpayne@69 11065 * raise ValueError("invalid file opening mode `%s`" % mode)
jpayne@69 11066 *
jpayne@69 11067 */
jpayne@69 11068 }
jpayne@69 11069
jpayne@69 11070 /* "pysam/libctabix.pyx":363
jpayne@69 11071 * raise ValueError("invalid file opening mode `%s`" % mode)
jpayne@69 11072 *
jpayne@69 11073 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 11074 * self.close()
jpayne@69 11075 * self.htsfile = NULL
jpayne@69 11076 */
jpayne@69 11077 __pyx_t_1 = (__pyx_v_self->__pyx_base.htsfile != NULL);
jpayne@69 11078 if (__pyx_t_1) {
jpayne@69 11079
jpayne@69 11080 /* "pysam/libctabix.pyx":364
jpayne@69 11081 *
jpayne@69 11082 * if self.htsfile != NULL:
jpayne@69 11083 * self.close() # <<<<<<<<<<<<<<
jpayne@69 11084 * self.htsfile = NULL
jpayne@69 11085 * self.threads=threads
jpayne@69 11086 */
jpayne@69 11087 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
jpayne@69 11088 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11089 __pyx_t_4 = NULL;
jpayne@69 11090 __pyx_t_5 = 0;
jpayne@69 11091 #if CYTHON_UNPACK_METHODS
jpayne@69 11092 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 11093 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 11094 if (likely(__pyx_t_4)) {
jpayne@69 11095 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 11096 __Pyx_INCREF(__pyx_t_4);
jpayne@69 11097 __Pyx_INCREF(function);
jpayne@69 11098 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 11099 __pyx_t_5 = 1;
jpayne@69 11100 }
jpayne@69 11101 }
jpayne@69 11102 #endif
jpayne@69 11103 {
jpayne@69 11104 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
jpayne@69 11105 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
jpayne@69 11106 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 11107 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error)
jpayne@69 11108 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11109 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11110 }
jpayne@69 11111 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 11112
jpayne@69 11113 /* "pysam/libctabix.pyx":363
jpayne@69 11114 * raise ValueError("invalid file opening mode `%s`" % mode)
jpayne@69 11115 *
jpayne@69 11116 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 11117 * self.close()
jpayne@69 11118 * self.htsfile = NULL
jpayne@69 11119 */
jpayne@69 11120 }
jpayne@69 11121
jpayne@69 11122 /* "pysam/libctabix.pyx":365
jpayne@69 11123 * if self.htsfile != NULL:
jpayne@69 11124 * self.close()
jpayne@69 11125 * self.htsfile = NULL # <<<<<<<<<<<<<<
jpayne@69 11126 * self.threads=threads
jpayne@69 11127 *
jpayne@69 11128 */
jpayne@69 11129 __pyx_v_self->__pyx_base.htsfile = NULL;
jpayne@69 11130
jpayne@69 11131 /* "pysam/libctabix.pyx":366
jpayne@69 11132 * self.close()
jpayne@69 11133 * self.htsfile = NULL
jpayne@69 11134 * self.threads=threads # <<<<<<<<<<<<<<
jpayne@69 11135 *
jpayne@69 11136 * filename_index = index or (filename + ".tbi")
jpayne@69 11137 */
jpayne@69 11138 __Pyx_INCREF(__pyx_v_threads);
jpayne@69 11139 __Pyx_GIVEREF(__pyx_v_threads);
jpayne@69 11140 __Pyx_GOTREF(__pyx_v_self->__pyx_base.threads);
jpayne@69 11141 __Pyx_DECREF(__pyx_v_self->__pyx_base.threads);
jpayne@69 11142 __pyx_v_self->__pyx_base.threads = __pyx_v_threads;
jpayne@69 11143
jpayne@69 11144 /* "pysam/libctabix.pyx":368
jpayne@69 11145 * self.threads=threads
jpayne@69 11146 *
jpayne@69 11147 * filename_index = index or (filename + ".tbi") # <<<<<<<<<<<<<<
jpayne@69 11148 * # encode all the strings to pass to tabix
jpayne@69 11149 * self.filename = encode_filename(filename)
jpayne@69 11150 */
jpayne@69 11151 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 368, __pyx_L1_error)
jpayne@69 11152 if (!__pyx_t_1) {
jpayne@69 11153 } else {
jpayne@69 11154 __Pyx_INCREF(__pyx_v_index);
jpayne@69 11155 __pyx_t_3 = __pyx_v_index;
jpayne@69 11156 goto __pyx_L5_bool_binop_done;
jpayne@69 11157 }
jpayne@69 11158 __pyx_t_2 = PyNumber_Add(__pyx_v_filename, __pyx_kp_u_tbi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
jpayne@69 11159 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11160 __Pyx_INCREF(__pyx_t_2);
jpayne@69 11161 __pyx_t_3 = __pyx_t_2;
jpayne@69 11162 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11163 __pyx_L5_bool_binop_done:;
jpayne@69 11164 __pyx_v_filename_index = __pyx_t_3;
jpayne@69 11165 __pyx_t_3 = 0;
jpayne@69 11166
jpayne@69 11167 /* "pysam/libctabix.pyx":370
jpayne@69 11168 * filename_index = index or (filename + ".tbi")
jpayne@69 11169 * # encode all the strings to pass to tabix
jpayne@69 11170 * self.filename = encode_filename(filename) # <<<<<<<<<<<<<<
jpayne@69 11171 * self.filename_index = encode_filename(filename_index)
jpayne@69 11172 *
jpayne@69 11173 */
jpayne@69 11174 __pyx_t_3 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error)
jpayne@69 11175 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11176 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 11177 __Pyx_GOTREF(__pyx_v_self->__pyx_base.filename);
jpayne@69 11178 __Pyx_DECREF(__pyx_v_self->__pyx_base.filename);
jpayne@69 11179 __pyx_v_self->__pyx_base.filename = __pyx_t_3;
jpayne@69 11180 __pyx_t_3 = 0;
jpayne@69 11181
jpayne@69 11182 /* "pysam/libctabix.pyx":371
jpayne@69 11183 * # encode all the strings to pass to tabix
jpayne@69 11184 * self.filename = encode_filename(filename)
jpayne@69 11185 * self.filename_index = encode_filename(filename_index) # <<<<<<<<<<<<<<
jpayne@69 11186 *
jpayne@69 11187 * self.is_stream = self.filename == b'-'
jpayne@69 11188 */
jpayne@69 11189 __pyx_t_3 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filename_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
jpayne@69 11190 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11191 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 11192 __Pyx_GOTREF(__pyx_v_self->filename_index);
jpayne@69 11193 __Pyx_DECREF(__pyx_v_self->filename_index);
jpayne@69 11194 __pyx_v_self->filename_index = __pyx_t_3;
jpayne@69 11195 __pyx_t_3 = 0;
jpayne@69 11196
jpayne@69 11197 /* "pysam/libctabix.pyx":373
jpayne@69 11198 * self.filename_index = encode_filename(filename_index)
jpayne@69 11199 *
jpayne@69 11200 * self.is_stream = self.filename == b'-' # <<<<<<<<<<<<<<
jpayne@69 11201 * self.is_remote = hisremote(self.filename)
jpayne@69 11202 *
jpayne@69 11203 */
jpayne@69 11204 __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->__pyx_base.filename, __pyx_kp_b__16, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error)
jpayne@69 11205 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 373, __pyx_L1_error)
jpayne@69 11206 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 11207 __pyx_v_self->__pyx_base.is_stream = __pyx_t_1;
jpayne@69 11208
jpayne@69 11209 /* "pysam/libctabix.pyx":374
jpayne@69 11210 *
jpayne@69 11211 * self.is_stream = self.filename == b'-'
jpayne@69 11212 * self.is_remote = hisremote(self.filename) # <<<<<<<<<<<<<<
jpayne@69 11213 *
jpayne@69 11214 * if not self.is_remote:
jpayne@69 11215 */
jpayne@69 11216 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_self->__pyx_base.filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 374, __pyx_L1_error)
jpayne@69 11217 __pyx_v_self->__pyx_base.is_remote = hisremote(__pyx_t_6);
jpayne@69 11218
jpayne@69 11219 /* "pysam/libctabix.pyx":376
jpayne@69 11220 * self.is_remote = hisremote(self.filename)
jpayne@69 11221 *
jpayne@69 11222 * if not self.is_remote: # <<<<<<<<<<<<<<
jpayne@69 11223 * if not os.path.exists(filename):
jpayne@69 11224 * raise IOError("file `%s` not found" % filename)
jpayne@69 11225 */
jpayne@69 11226 __pyx_t_1 = (!__pyx_v_self->__pyx_base.is_remote);
jpayne@69 11227 if (__pyx_t_1) {
jpayne@69 11228
jpayne@69 11229 /* "pysam/libctabix.pyx":377
jpayne@69 11230 *
jpayne@69 11231 * if not self.is_remote:
jpayne@69 11232 * if not os.path.exists(filename): # <<<<<<<<<<<<<<
jpayne@69 11233 * raise IOError("file `%s` not found" % filename)
jpayne@69 11234 *
jpayne@69 11235 */
jpayne@69 11236 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
jpayne@69 11237 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11238 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error)
jpayne@69 11239 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 11240 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11241 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
jpayne@69 11242 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11243 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 11244 __pyx_t_4 = NULL;
jpayne@69 11245 __pyx_t_5 = 0;
jpayne@69 11246 #if CYTHON_UNPACK_METHODS
jpayne@69 11247 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 11248 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 11249 if (likely(__pyx_t_4)) {
jpayne@69 11250 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 11251 __Pyx_INCREF(__pyx_t_4);
jpayne@69 11252 __Pyx_INCREF(function);
jpayne@69 11253 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 11254 __pyx_t_5 = 1;
jpayne@69 11255 }
jpayne@69 11256 }
jpayne@69 11257 #endif
jpayne@69 11258 {
jpayne@69 11259 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filename};
jpayne@69 11260 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 11261 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 11262 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
jpayne@69 11263 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11264 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11265 }
jpayne@69 11266 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 377, __pyx_L1_error)
jpayne@69 11267 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 11268 __pyx_t_7 = (!__pyx_t_1);
jpayne@69 11269 if (unlikely(__pyx_t_7)) {
jpayne@69 11270
jpayne@69 11271 /* "pysam/libctabix.pyx":378
jpayne@69 11272 * if not self.is_remote:
jpayne@69 11273 * if not os.path.exists(filename):
jpayne@69 11274 * raise IOError("file `%s` not found" % filename) # <<<<<<<<<<<<<<
jpayne@69 11275 *
jpayne@69 11276 * if not os.path.exists(filename_index):
jpayne@69 11277 */
jpayne@69 11278 __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_file_s_not_found, __pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error)
jpayne@69 11279 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11280 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error)
jpayne@69 11281 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11282 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 11283 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 11284 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11285 __PYX_ERR(0, 378, __pyx_L1_error)
jpayne@69 11286
jpayne@69 11287 /* "pysam/libctabix.pyx":377
jpayne@69 11288 *
jpayne@69 11289 * if not self.is_remote:
jpayne@69 11290 * if not os.path.exists(filename): # <<<<<<<<<<<<<<
jpayne@69 11291 * raise IOError("file `%s` not found" % filename)
jpayne@69 11292 *
jpayne@69 11293 */
jpayne@69 11294 }
jpayne@69 11295
jpayne@69 11296 /* "pysam/libctabix.pyx":380
jpayne@69 11297 * raise IOError("file `%s` not found" % filename)
jpayne@69 11298 *
jpayne@69 11299 * if not os.path.exists(filename_index): # <<<<<<<<<<<<<<
jpayne@69 11300 * raise IOError("index `%s` not found" % filename_index)
jpayne@69 11301 *
jpayne@69 11302 */
jpayne@69 11303 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
jpayne@69 11304 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11305 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error)
jpayne@69 11306 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 11307 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 11308 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
jpayne@69 11309 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11310 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 11311 __pyx_t_4 = NULL;
jpayne@69 11312 __pyx_t_5 = 0;
jpayne@69 11313 #if CYTHON_UNPACK_METHODS
jpayne@69 11314 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 11315 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 11316 if (likely(__pyx_t_4)) {
jpayne@69 11317 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 11318 __Pyx_INCREF(__pyx_t_4);
jpayne@69 11319 __Pyx_INCREF(function);
jpayne@69 11320 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 11321 __pyx_t_5 = 1;
jpayne@69 11322 }
jpayne@69 11323 }
jpayne@69 11324 #endif
jpayne@69 11325 {
jpayne@69 11326 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filename_index};
jpayne@69 11327 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 11328 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 11329 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)
jpayne@69 11330 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11331 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 11332 }
jpayne@69 11333 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 380, __pyx_L1_error)
jpayne@69 11334 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11335 __pyx_t_1 = (!__pyx_t_7);
jpayne@69 11336 if (unlikely(__pyx_t_1)) {
jpayne@69 11337
jpayne@69 11338 /* "pysam/libctabix.pyx":381
jpayne@69 11339 *
jpayne@69 11340 * if not os.path.exists(filename_index):
jpayne@69 11341 * raise IOError("index `%s` not found" % filename_index) # <<<<<<<<<<<<<<
jpayne@69 11342 *
jpayne@69 11343 * # open file
jpayne@69 11344 */
jpayne@69 11345 __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_index_s_not_found, __pyx_v_filename_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
jpayne@69 11346 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11347 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error)
jpayne@69 11348 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11349 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11350 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 11351 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 11352 __PYX_ERR(0, 381, __pyx_L1_error)
jpayne@69 11353
jpayne@69 11354 /* "pysam/libctabix.pyx":380
jpayne@69 11355 * raise IOError("file `%s` not found" % filename)
jpayne@69 11356 *
jpayne@69 11357 * if not os.path.exists(filename_index): # <<<<<<<<<<<<<<
jpayne@69 11358 * raise IOError("index `%s` not found" % filename_index)
jpayne@69 11359 *
jpayne@69 11360 */
jpayne@69 11361 }
jpayne@69 11362
jpayne@69 11363 /* "pysam/libctabix.pyx":376
jpayne@69 11364 * self.is_remote = hisremote(self.filename)
jpayne@69 11365 *
jpayne@69 11366 * if not self.is_remote: # <<<<<<<<<<<<<<
jpayne@69 11367 * if not os.path.exists(filename):
jpayne@69 11368 * raise IOError("file `%s` not found" % filename)
jpayne@69 11369 */
jpayne@69 11370 }
jpayne@69 11371
jpayne@69 11372 /* "pysam/libctabix.pyx":384
jpayne@69 11373 *
jpayne@69 11374 * # open file
jpayne@69 11375 * cdef char *cfilename = self.filename # <<<<<<<<<<<<<<
jpayne@69 11376 * cdef char *cfilename_index = self.filename_index
jpayne@69 11377 * with nogil:
jpayne@69 11378 */
jpayne@69 11379 __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_self->__pyx_base.filename); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 384, __pyx_L1_error)
jpayne@69 11380 __pyx_v_cfilename = __pyx_t_8;
jpayne@69 11381
jpayne@69 11382 /* "pysam/libctabix.pyx":385
jpayne@69 11383 * # open file
jpayne@69 11384 * cdef char *cfilename = self.filename
jpayne@69 11385 * cdef char *cfilename_index = self.filename_index # <<<<<<<<<<<<<<
jpayne@69 11386 * with nogil:
jpayne@69 11387 * self.htsfile = hts_open(cfilename, 'r')
jpayne@69 11388 */
jpayne@69 11389 __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_self->filename_index); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 385, __pyx_L1_error)
jpayne@69 11390 __pyx_v_cfilename_index = __pyx_t_8;
jpayne@69 11391
jpayne@69 11392 /* "pysam/libctabix.pyx":386
jpayne@69 11393 * cdef char *cfilename = self.filename
jpayne@69 11394 * cdef char *cfilename_index = self.filename_index
jpayne@69 11395 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 11396 * self.htsfile = hts_open(cfilename, 'r')
jpayne@69 11397 *
jpayne@69 11398 */
jpayne@69 11399 {
jpayne@69 11400 #ifdef WITH_THREAD
jpayne@69 11401 PyThreadState *_save;
jpayne@69 11402 _save = NULL;
jpayne@69 11403 Py_UNBLOCK_THREADS
jpayne@69 11404 __Pyx_FastGIL_Remember();
jpayne@69 11405 #endif
jpayne@69 11406 /*try:*/ {
jpayne@69 11407
jpayne@69 11408 /* "pysam/libctabix.pyx":387
jpayne@69 11409 * cdef char *cfilename_index = self.filename_index
jpayne@69 11410 * with nogil:
jpayne@69 11411 * self.htsfile = hts_open(cfilename, 'r') # <<<<<<<<<<<<<<
jpayne@69 11412 *
jpayne@69 11413 * if self.htsfile == NULL:
jpayne@69 11414 */
jpayne@69 11415 __pyx_v_self->__pyx_base.htsfile = hts_open(__pyx_v_cfilename, ((char const *)"r"));
jpayne@69 11416 }
jpayne@69 11417
jpayne@69 11418 /* "pysam/libctabix.pyx":386
jpayne@69 11419 * cdef char *cfilename = self.filename
jpayne@69 11420 * cdef char *cfilename_index = self.filename_index
jpayne@69 11421 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 11422 * self.htsfile = hts_open(cfilename, 'r')
jpayne@69 11423 *
jpayne@69 11424 */
jpayne@69 11425 /*finally:*/ {
jpayne@69 11426 /*normal exit:*/{
jpayne@69 11427 #ifdef WITH_THREAD
jpayne@69 11428 __Pyx_FastGIL_Forget();
jpayne@69 11429 Py_BLOCK_THREADS
jpayne@69 11430 #endif
jpayne@69 11431 goto __pyx_L12;
jpayne@69 11432 }
jpayne@69 11433 __pyx_L12:;
jpayne@69 11434 }
jpayne@69 11435 }
jpayne@69 11436
jpayne@69 11437 /* "pysam/libctabix.pyx":389
jpayne@69 11438 * self.htsfile = hts_open(cfilename, 'r')
jpayne@69 11439 *
jpayne@69 11440 * if self.htsfile == NULL: # <<<<<<<<<<<<<<
jpayne@69 11441 * raise IOError("could not open file `%s`" % filename)
jpayne@69 11442 *
jpayne@69 11443 */
jpayne@69 11444 __pyx_t_1 = (__pyx_v_self->__pyx_base.htsfile == NULL);
jpayne@69 11445 if (unlikely(__pyx_t_1)) {
jpayne@69 11446
jpayne@69 11447 /* "pysam/libctabix.pyx":390
jpayne@69 11448 *
jpayne@69 11449 * if self.htsfile == NULL:
jpayne@69 11450 * raise IOError("could not open file `%s`" % filename) # <<<<<<<<<<<<<<
jpayne@69 11451 *
jpayne@69 11452 * #if self.htsfile.format.category != region_list:
jpayne@69 11453 */
jpayne@69 11454 __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_could_not_open_file_s, __pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error)
jpayne@69 11455 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11456 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)
jpayne@69 11457 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11458 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 11459 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 11460 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11461 __PYX_ERR(0, 390, __pyx_L1_error)
jpayne@69 11462
jpayne@69 11463 /* "pysam/libctabix.pyx":389
jpayne@69 11464 * self.htsfile = hts_open(cfilename, 'r')
jpayne@69 11465 *
jpayne@69 11466 * if self.htsfile == NULL: # <<<<<<<<<<<<<<
jpayne@69 11467 * raise IOError("could not open file `%s`" % filename)
jpayne@69 11468 *
jpayne@69 11469 */
jpayne@69 11470 }
jpayne@69 11471
jpayne@69 11472 /* "pysam/libctabix.pyx":395
jpayne@69 11473 * # raise ValueError("file does not contain region data")
jpayne@69 11474 *
jpayne@69 11475 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 11476 * self.index = tbx_index_load2(cfilename, cfilename_index)
jpayne@69 11477 *
jpayne@69 11478 */
jpayne@69 11479 {
jpayne@69 11480 #ifdef WITH_THREAD
jpayne@69 11481 PyThreadState *_save;
jpayne@69 11482 _save = NULL;
jpayne@69 11483 Py_UNBLOCK_THREADS
jpayne@69 11484 __Pyx_FastGIL_Remember();
jpayne@69 11485 #endif
jpayne@69 11486 /*try:*/ {
jpayne@69 11487
jpayne@69 11488 /* "pysam/libctabix.pyx":396
jpayne@69 11489 *
jpayne@69 11490 * with nogil:
jpayne@69 11491 * self.index = tbx_index_load2(cfilename, cfilename_index) # <<<<<<<<<<<<<<
jpayne@69 11492 *
jpayne@69 11493 * if self.index == NULL:
jpayne@69 11494 */
jpayne@69 11495 __pyx_v_self->index = tbx_index_load2(__pyx_v_cfilename, __pyx_v_cfilename_index);
jpayne@69 11496 }
jpayne@69 11497
jpayne@69 11498 /* "pysam/libctabix.pyx":395
jpayne@69 11499 * # raise ValueError("file does not contain region data")
jpayne@69 11500 *
jpayne@69 11501 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 11502 * self.index = tbx_index_load2(cfilename, cfilename_index)
jpayne@69 11503 *
jpayne@69 11504 */
jpayne@69 11505 /*finally:*/ {
jpayne@69 11506 /*normal exit:*/{
jpayne@69 11507 #ifdef WITH_THREAD
jpayne@69 11508 __Pyx_FastGIL_Forget();
jpayne@69 11509 Py_BLOCK_THREADS
jpayne@69 11510 #endif
jpayne@69 11511 goto __pyx_L16;
jpayne@69 11512 }
jpayne@69 11513 __pyx_L16:;
jpayne@69 11514 }
jpayne@69 11515 }
jpayne@69 11516
jpayne@69 11517 /* "pysam/libctabix.pyx":398
jpayne@69 11518 * self.index = tbx_index_load2(cfilename, cfilename_index)
jpayne@69 11519 *
jpayne@69 11520 * if self.index == NULL: # <<<<<<<<<<<<<<
jpayne@69 11521 * raise IOError("could not open index for `%s`" % filename)
jpayne@69 11522 *
jpayne@69 11523 */
jpayne@69 11524 __pyx_t_1 = (__pyx_v_self->index == NULL);
jpayne@69 11525 if (unlikely(__pyx_t_1)) {
jpayne@69 11526
jpayne@69 11527 /* "pysam/libctabix.pyx":399
jpayne@69 11528 *
jpayne@69 11529 * if self.index == NULL:
jpayne@69 11530 * raise IOError("could not open index for `%s`" % filename) # <<<<<<<<<<<<<<
jpayne@69 11531 *
jpayne@69 11532 * if not self.is_stream:
jpayne@69 11533 */
jpayne@69 11534 __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_could_not_open_index_for_s, __pyx_v_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error)
jpayne@69 11535 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11536 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error)
jpayne@69 11537 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11538 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11539 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 11540 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 11541 __PYX_ERR(0, 399, __pyx_L1_error)
jpayne@69 11542
jpayne@69 11543 /* "pysam/libctabix.pyx":398
jpayne@69 11544 * self.index = tbx_index_load2(cfilename, cfilename_index)
jpayne@69 11545 *
jpayne@69 11546 * if self.index == NULL: # <<<<<<<<<<<<<<
jpayne@69 11547 * raise IOError("could not open index for `%s`" % filename)
jpayne@69 11548 *
jpayne@69 11549 */
jpayne@69 11550 }
jpayne@69 11551
jpayne@69 11552 /* "pysam/libctabix.pyx":401
jpayne@69 11553 * raise IOError("could not open index for `%s`" % filename)
jpayne@69 11554 *
jpayne@69 11555 * if not self.is_stream: # <<<<<<<<<<<<<<
jpayne@69 11556 * self.start_offset = self.tell()
jpayne@69 11557 *
jpayne@69 11558 */
jpayne@69 11559 __pyx_t_1 = (!__pyx_v_self->__pyx_base.is_stream);
jpayne@69 11560 if (__pyx_t_1) {
jpayne@69 11561
jpayne@69 11562 /* "pysam/libctabix.pyx":402
jpayne@69 11563 *
jpayne@69 11564 * if not self.is_stream:
jpayne@69 11565 * self.start_offset = self.tell() # <<<<<<<<<<<<<<
jpayne@69 11566 *
jpayne@69 11567 * def _dup(self):
jpayne@69 11568 */
jpayne@69 11569 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tell); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error)
jpayne@69 11570 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11571 __pyx_t_4 = NULL;
jpayne@69 11572 __pyx_t_5 = 0;
jpayne@69 11573 #if CYTHON_UNPACK_METHODS
jpayne@69 11574 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 11575 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 11576 if (likely(__pyx_t_4)) {
jpayne@69 11577 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 11578 __Pyx_INCREF(__pyx_t_4);
jpayne@69 11579 __Pyx_INCREF(function);
jpayne@69 11580 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 11581 __pyx_t_5 = 1;
jpayne@69 11582 }
jpayne@69 11583 }
jpayne@69 11584 #endif
jpayne@69 11585 {
jpayne@69 11586 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
jpayne@69 11587 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
jpayne@69 11588 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 11589 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error)
jpayne@69 11590 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11591 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11592 }
jpayne@69 11593 __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 402, __pyx_L1_error)
jpayne@69 11594 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 11595 __pyx_v_self->__pyx_base.start_offset = __pyx_t_9;
jpayne@69 11596
jpayne@69 11597 /* "pysam/libctabix.pyx":401
jpayne@69 11598 * raise IOError("could not open index for `%s`" % filename)
jpayne@69 11599 *
jpayne@69 11600 * if not self.is_stream: # <<<<<<<<<<<<<<
jpayne@69 11601 * self.start_offset = self.tell()
jpayne@69 11602 *
jpayne@69 11603 */
jpayne@69 11604 }
jpayne@69 11605
jpayne@69 11606 /* "pysam/libctabix.pyx":352
jpayne@69 11607 * self.encoding = encoding
jpayne@69 11608 *
jpayne@69 11609 * def _open( self, # <<<<<<<<<<<<<<
jpayne@69 11610 * filename,
jpayne@69 11611 * mode='r',
jpayne@69 11612 */
jpayne@69 11613
jpayne@69 11614 /* function exit code */
jpayne@69 11615 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 11616 goto __pyx_L0;
jpayne@69 11617 __pyx_L1_error:;
jpayne@69 11618 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 11619 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 11620 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 11621 __Pyx_AddTraceback("pysam.libctabix.TabixFile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 11622 __pyx_r = NULL;
jpayne@69 11623 __pyx_L0:;
jpayne@69 11624 __Pyx_XDECREF(__pyx_v_filename_index);
jpayne@69 11625 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 11626 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 11627 __Pyx_RefNannyFinishContext();
jpayne@69 11628 return __pyx_r;
jpayne@69 11629 }
jpayne@69 11630
jpayne@69 11631 /* "pysam/libctabix.pyx":404
jpayne@69 11632 * self.start_offset = self.tell()
jpayne@69 11633 *
jpayne@69 11634 * def _dup(self): # <<<<<<<<<<<<<<
jpayne@69 11635 * '''return a copy of this tabix file.
jpayne@69 11636 *
jpayne@69 11637 */
jpayne@69 11638
jpayne@69 11639 /* Python wrapper */
jpayne@69 11640 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_5_dup(PyObject *__pyx_v_self,
jpayne@69 11641 #if CYTHON_METH_FASTCALL
jpayne@69 11642 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 11643 #else
jpayne@69 11644 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 11645 #endif
jpayne@69 11646 ); /*proto*/
jpayne@69 11647 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9TabixFile_4_dup, "TabixFile._dup(self)\nreturn a copy of this tabix file.\n \n The file is being re-opened.\n ");
jpayne@69 11648 static PyMethodDef __pyx_mdef_5pysam_9libctabix_9TabixFile_5_dup = {"_dup", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_5_dup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_4_dup};
jpayne@69 11649 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_5_dup(PyObject *__pyx_v_self,
jpayne@69 11650 #if CYTHON_METH_FASTCALL
jpayne@69 11651 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 11652 #else
jpayne@69 11653 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 11654 #endif
jpayne@69 11655 ) {
jpayne@69 11656 #if !CYTHON_METH_FASTCALL
jpayne@69 11657 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 11658 #endif
jpayne@69 11659 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 11660 PyObject *__pyx_r = 0;
jpayne@69 11661 __Pyx_RefNannyDeclarations
jpayne@69 11662 __Pyx_RefNannySetupContext("_dup (wrapper)", 0);
jpayne@69 11663 #if !CYTHON_METH_FASTCALL
jpayne@69 11664 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 11665 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 11666 #else
jpayne@69 11667 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 11668 #endif
jpayne@69 11669 #endif
jpayne@69 11670 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 11671 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 11672 __Pyx_RaiseArgtupleInvalid("_dup", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 11673 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_dup", 0))) return NULL;
jpayne@69 11674 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_4_dup(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@69 11675
jpayne@69 11676 /* function exit code */
jpayne@69 11677 __Pyx_RefNannyFinishContext();
jpayne@69 11678 return __pyx_r;
jpayne@69 11679 }
jpayne@69 11680
jpayne@69 11681 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_4_dup(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@69 11682 PyObject *__pyx_r = NULL;
jpayne@69 11683 __Pyx_TraceDeclarations
jpayne@69 11684 __Pyx_RefNannyDeclarations
jpayne@69 11685 PyObject *__pyx_t_1 = NULL;
jpayne@69 11686 PyObject *__pyx_t_2 = NULL;
jpayne@69 11687 PyObject *__pyx_t_3 = NULL;
jpayne@69 11688 int __pyx_lineno = 0;
jpayne@69 11689 const char *__pyx_filename = NULL;
jpayne@69 11690 int __pyx_clineno = 0;
jpayne@69 11691 __Pyx_TraceFrameInit(__pyx_codeobj__17)
jpayne@69 11692 __Pyx_RefNannySetupContext("_dup", 1);
jpayne@69 11693 __Pyx_TraceCall("_dup", __pyx_f[0], 404, 0, __PYX_ERR(0, 404, __pyx_L1_error));
jpayne@69 11694
jpayne@69 11695 /* "pysam/libctabix.pyx":409
jpayne@69 11696 * The file is being re-opened.
jpayne@69 11697 * '''
jpayne@69 11698 * return TabixFile(self.filename, # <<<<<<<<<<<<<<
jpayne@69 11699 * mode="r",
jpayne@69 11700 * threads=self.threads,
jpayne@69 11701 */
jpayne@69 11702 __Pyx_XDECREF(__pyx_r);
jpayne@69 11703 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
jpayne@69 11704 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 11705 __Pyx_INCREF(__pyx_v_self->__pyx_base.filename);
jpayne@69 11706 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.filename);
jpayne@69 11707 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.filename)) __PYX_ERR(0, 409, __pyx_L1_error);
jpayne@69 11708
jpayne@69 11709 /* "pysam/libctabix.pyx":410
jpayne@69 11710 * '''
jpayne@69 11711 * return TabixFile(self.filename,
jpayne@69 11712 * mode="r", # <<<<<<<<<<<<<<
jpayne@69 11713 * threads=self.threads,
jpayne@69 11714 * parser=self.parser,
jpayne@69 11715 */
jpayne@69 11716 __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error)
jpayne@69 11717 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11718 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mode, __pyx_n_u_r) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
jpayne@69 11719
jpayne@69 11720 /* "pysam/libctabix.pyx":411
jpayne@69 11721 * return TabixFile(self.filename,
jpayne@69 11722 * mode="r",
jpayne@69 11723 * threads=self.threads, # <<<<<<<<<<<<<<
jpayne@69 11724 * parser=self.parser,
jpayne@69 11725 * index=self.filename_index,
jpayne@69 11726 */
jpayne@69 11727 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_threads, __pyx_v_self->__pyx_base.threads) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
jpayne@69 11728
jpayne@69 11729 /* "pysam/libctabix.pyx":412
jpayne@69 11730 * mode="r",
jpayne@69 11731 * threads=self.threads,
jpayne@69 11732 * parser=self.parser, # <<<<<<<<<<<<<<
jpayne@69 11733 * index=self.filename_index,
jpayne@69 11734 * encoding=self.encoding)
jpayne@69 11735 */
jpayne@69 11736 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_parser, ((PyObject *)__pyx_v_self->parser)) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
jpayne@69 11737
jpayne@69 11738 /* "pysam/libctabix.pyx":413
jpayne@69 11739 * threads=self.threads,
jpayne@69 11740 * parser=self.parser,
jpayne@69 11741 * index=self.filename_index, # <<<<<<<<<<<<<<
jpayne@69 11742 * encoding=self.encoding)
jpayne@69 11743 *
jpayne@69 11744 */
jpayne@69 11745 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_index, __pyx_v_self->filename_index) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
jpayne@69 11746
jpayne@69 11747 /* "pysam/libctabix.pyx":414
jpayne@69 11748 * parser=self.parser,
jpayne@69 11749 * index=self.filename_index,
jpayne@69 11750 * encoding=self.encoding) # <<<<<<<<<<<<<<
jpayne@69 11751 *
jpayne@69 11752 * def fetch(self,
jpayne@69 11753 */
jpayne@69 11754 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_v_self->encoding) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
jpayne@69 11755
jpayne@69 11756 /* "pysam/libctabix.pyx":409
jpayne@69 11757 * The file is being re-opened.
jpayne@69 11758 * '''
jpayne@69 11759 * return TabixFile(self.filename, # <<<<<<<<<<<<<<
jpayne@69 11760 * mode="r",
jpayne@69 11761 * threads=self.threads,
jpayne@69 11762 */
jpayne@69 11763 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixFile), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error)
jpayne@69 11764 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 11765 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 11766 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11767 __pyx_r = __pyx_t_3;
jpayne@69 11768 __pyx_t_3 = 0;
jpayne@69 11769 goto __pyx_L0;
jpayne@69 11770
jpayne@69 11771 /* "pysam/libctabix.pyx":404
jpayne@69 11772 * self.start_offset = self.tell()
jpayne@69 11773 *
jpayne@69 11774 * def _dup(self): # <<<<<<<<<<<<<<
jpayne@69 11775 * '''return a copy of this tabix file.
jpayne@69 11776 *
jpayne@69 11777 */
jpayne@69 11778
jpayne@69 11779 /* function exit code */
jpayne@69 11780 __pyx_L1_error:;
jpayne@69 11781 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 11782 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 11783 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 11784 __Pyx_AddTraceback("pysam.libctabix.TabixFile._dup", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 11785 __pyx_r = NULL;
jpayne@69 11786 __pyx_L0:;
jpayne@69 11787 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 11788 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 11789 __Pyx_RefNannyFinishContext();
jpayne@69 11790 return __pyx_r;
jpayne@69 11791 }
jpayne@69 11792
jpayne@69 11793 /* "pysam/libctabix.pyx":416
jpayne@69 11794 * encoding=self.encoding)
jpayne@69 11795 *
jpayne@69 11796 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@69 11797 * reference=None,
jpayne@69 11798 * start=None,
jpayne@69 11799 */
jpayne@69 11800
jpayne@69 11801 /* Python wrapper */
jpayne@69 11802 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_7fetch(PyObject *__pyx_v_self,
jpayne@69 11803 #if CYTHON_METH_FASTCALL
jpayne@69 11804 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 11805 #else
jpayne@69 11806 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 11807 #endif
jpayne@69 11808 ); /*proto*/
jpayne@69 11809 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9TabixFile_6fetch, "TabixFile.fetch(self, reference=None, start=None, end=None, region=None, parser=None, multiple_iterators=False)\nfetch one or more rows in a :term:`region` using 0-based\n indexing. The region is specified by :term:`reference`,\n *start* and *end*. Alternatively, a samtools :term:`region`\n string can be supplied.\n\n Without *reference* or *region* all entries will be fetched. \n \n If only *reference* is set, all reads matching on *reference*\n will be fetched.\n\n If *parser* is None, the default parser will be used for\n parsing.\n \n Set *multiple_iterators* to true if you will be using multiple\n iterators on the same file at the same time. The iterator\n returned will receive its own copy of a filehandle to the file\n effectively re-opening the file. Re-opening a file creates\n some overhead, so beware.\n\n ");
jpayne@69 11810 static PyMethodDef __pyx_mdef_5pysam_9libctabix_9TabixFile_7fetch = {"fetch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_7fetch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_6fetch};
jpayne@69 11811 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_7fetch(PyObject *__pyx_v_self,
jpayne@69 11812 #if CYTHON_METH_FASTCALL
jpayne@69 11813 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 11814 #else
jpayne@69 11815 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 11816 #endif
jpayne@69 11817 ) {
jpayne@69 11818 PyObject *__pyx_v_reference = 0;
jpayne@69 11819 PyObject *__pyx_v_start = 0;
jpayne@69 11820 PyObject *__pyx_v_end = 0;
jpayne@69 11821 PyObject *__pyx_v_region = 0;
jpayne@69 11822 PyObject *__pyx_v_parser = 0;
jpayne@69 11823 PyObject *__pyx_v_multiple_iterators = 0;
jpayne@69 11824 #if !CYTHON_METH_FASTCALL
jpayne@69 11825 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 11826 #endif
jpayne@69 11827 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 11828 PyObject* values[6] = {0,0,0,0,0,0};
jpayne@69 11829 int __pyx_lineno = 0;
jpayne@69 11830 const char *__pyx_filename = NULL;
jpayne@69 11831 int __pyx_clineno = 0;
jpayne@69 11832 PyObject *__pyx_r = 0;
jpayne@69 11833 __Pyx_RefNannyDeclarations
jpayne@69 11834 __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
jpayne@69 11835 #if !CYTHON_METH_FASTCALL
jpayne@69 11836 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 11837 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 11838 #else
jpayne@69 11839 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 11840 #endif
jpayne@69 11841 #endif
jpayne@69 11842 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 11843 {
jpayne@69 11844 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_region,&__pyx_n_s_parser,&__pyx_n_s_multiple_iterators,0};
jpayne@69 11845
jpayne@69 11846 /* "pysam/libctabix.pyx":417
jpayne@69 11847 *
jpayne@69 11848 * def fetch(self,
jpayne@69 11849 * reference=None, # <<<<<<<<<<<<<<
jpayne@69 11850 * start=None,
jpayne@69 11851 * end=None,
jpayne@69 11852 */
jpayne@69 11853 values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 11854
jpayne@69 11855 /* "pysam/libctabix.pyx":418
jpayne@69 11856 * def fetch(self,
jpayne@69 11857 * reference=None,
jpayne@69 11858 * start=None, # <<<<<<<<<<<<<<
jpayne@69 11859 * end=None,
jpayne@69 11860 * region=None,
jpayne@69 11861 */
jpayne@69 11862 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 11863
jpayne@69 11864 /* "pysam/libctabix.pyx":419
jpayne@69 11865 * reference=None,
jpayne@69 11866 * start=None,
jpayne@69 11867 * end=None, # <<<<<<<<<<<<<<
jpayne@69 11868 * region=None,
jpayne@69 11869 * parser=None,
jpayne@69 11870 */
jpayne@69 11871 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 11872
jpayne@69 11873 /* "pysam/libctabix.pyx":420
jpayne@69 11874 * start=None,
jpayne@69 11875 * end=None,
jpayne@69 11876 * region=None, # <<<<<<<<<<<<<<
jpayne@69 11877 * parser=None,
jpayne@69 11878 * multiple_iterators=False):
jpayne@69 11879 */
jpayne@69 11880 values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 11881
jpayne@69 11882 /* "pysam/libctabix.pyx":421
jpayne@69 11883 * end=None,
jpayne@69 11884 * region=None,
jpayne@69 11885 * parser=None, # <<<<<<<<<<<<<<
jpayne@69 11886 * multiple_iterators=False):
jpayne@69 11887 * '''fetch one or more rows in a :term:`region` using 0-based
jpayne@69 11888 */
jpayne@69 11889 values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 11890
jpayne@69 11891 /* "pysam/libctabix.pyx":422
jpayne@69 11892 * region=None,
jpayne@69 11893 * parser=None,
jpayne@69 11894 * multiple_iterators=False): # <<<<<<<<<<<<<<
jpayne@69 11895 * '''fetch one or more rows in a :term:`region` using 0-based
jpayne@69 11896 * indexing. The region is specified by :term:`reference`,
jpayne@69 11897 */
jpayne@69 11898 values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
jpayne@69 11899 if (__pyx_kwds) {
jpayne@69 11900 Py_ssize_t kw_args;
jpayne@69 11901 switch (__pyx_nargs) {
jpayne@69 11902 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
jpayne@69 11903 CYTHON_FALLTHROUGH;
jpayne@69 11904 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
jpayne@69 11905 CYTHON_FALLTHROUGH;
jpayne@69 11906 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@69 11907 CYTHON_FALLTHROUGH;
jpayne@69 11908 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 11909 CYTHON_FALLTHROUGH;
jpayne@69 11910 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 11911 CYTHON_FALLTHROUGH;
jpayne@69 11912 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 11913 CYTHON_FALLTHROUGH;
jpayne@69 11914 case 0: break;
jpayne@69 11915 default: goto __pyx_L5_argtuple_error;
jpayne@69 11916 }
jpayne@69 11917 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 11918 switch (__pyx_nargs) {
jpayne@69 11919 case 0:
jpayne@69 11920 if (kw_args > 0) {
jpayne@69 11921 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reference);
jpayne@69 11922 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 11923 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@69 11924 }
jpayne@69 11925 CYTHON_FALLTHROUGH;
jpayne@69 11926 case 1:
jpayne@69 11927 if (kw_args > 0) {
jpayne@69 11928 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start);
jpayne@69 11929 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 11930 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@69 11931 }
jpayne@69 11932 CYTHON_FALLTHROUGH;
jpayne@69 11933 case 2:
jpayne@69 11934 if (kw_args > 0) {
jpayne@69 11935 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end);
jpayne@69 11936 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 11937 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@69 11938 }
jpayne@69 11939 CYTHON_FALLTHROUGH;
jpayne@69 11940 case 3:
jpayne@69 11941 if (kw_args > 0) {
jpayne@69 11942 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_region);
jpayne@69 11943 if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 11944 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@69 11945 }
jpayne@69 11946 CYTHON_FALLTHROUGH;
jpayne@69 11947 case 4:
jpayne@69 11948 if (kw_args > 0) {
jpayne@69 11949 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser);
jpayne@69 11950 if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 11951 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@69 11952 }
jpayne@69 11953 CYTHON_FALLTHROUGH;
jpayne@69 11954 case 5:
jpayne@69 11955 if (kw_args > 0) {
jpayne@69 11956 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multiple_iterators);
jpayne@69 11957 if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 11958 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@69 11959 }
jpayne@69 11960 }
jpayne@69 11961 if (unlikely(kw_args > 0)) {
jpayne@69 11962 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 11963 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fetch") < 0)) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@69 11964 }
jpayne@69 11965 } else {
jpayne@69 11966 switch (__pyx_nargs) {
jpayne@69 11967 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
jpayne@69 11968 CYTHON_FALLTHROUGH;
jpayne@69 11969 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
jpayne@69 11970 CYTHON_FALLTHROUGH;
jpayne@69 11971 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@69 11972 CYTHON_FALLTHROUGH;
jpayne@69 11973 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 11974 CYTHON_FALLTHROUGH;
jpayne@69 11975 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 11976 CYTHON_FALLTHROUGH;
jpayne@69 11977 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 11978 CYTHON_FALLTHROUGH;
jpayne@69 11979 case 0: break;
jpayne@69 11980 default: goto __pyx_L5_argtuple_error;
jpayne@69 11981 }
jpayne@69 11982 }
jpayne@69 11983 __pyx_v_reference = values[0];
jpayne@69 11984 __pyx_v_start = values[1];
jpayne@69 11985 __pyx_v_end = values[2];
jpayne@69 11986 __pyx_v_region = values[3];
jpayne@69 11987 __pyx_v_parser = values[4];
jpayne@69 11988 __pyx_v_multiple_iterators = values[5];
jpayne@69 11989 }
jpayne@69 11990 goto __pyx_L6_skip;
jpayne@69 11991 __pyx_L5_argtuple_error:;
jpayne@69 11992 __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 6, __pyx_nargs); __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@69 11993 __pyx_L6_skip:;
jpayne@69 11994 goto __pyx_L4_argument_unpacking_done;
jpayne@69 11995 __pyx_L3_error:;
jpayne@69 11996 {
jpayne@69 11997 Py_ssize_t __pyx_temp;
jpayne@69 11998 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 11999 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 12000 }
jpayne@69 12001 }
jpayne@69 12002 __Pyx_AddTraceback("pysam.libctabix.TabixFile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 12003 __Pyx_RefNannyFinishContext();
jpayne@69 12004 return NULL;
jpayne@69 12005 __pyx_L4_argument_unpacking_done:;
jpayne@69 12006 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_6fetch(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region, __pyx_v_parser, __pyx_v_multiple_iterators);
jpayne@69 12007
jpayne@69 12008 /* "pysam/libctabix.pyx":416
jpayne@69 12009 * encoding=self.encoding)
jpayne@69 12010 *
jpayne@69 12011 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@69 12012 * reference=None,
jpayne@69 12013 * start=None,
jpayne@69 12014 */
jpayne@69 12015
jpayne@69 12016 /* function exit code */
jpayne@69 12017 {
jpayne@69 12018 Py_ssize_t __pyx_temp;
jpayne@69 12019 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 12020 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 12021 }
jpayne@69 12022 }
jpayne@69 12023 __Pyx_RefNannyFinishContext();
jpayne@69 12024 return __pyx_r;
jpayne@69 12025 }
jpayne@69 12026
jpayne@69 12027 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_6fetch(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region, PyObject *__pyx_v_parser, PyObject *__pyx_v_multiple_iterators) {
jpayne@69 12028 hts_itr_t *__pyx_v_itr;
jpayne@69 12029 char *__pyx_v_cstr;
jpayne@69 12030 struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_fileobj = 0;
jpayne@69 12031 PyObject *__pyx_v_s = NULL;
jpayne@69 12032 struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_a = 0;
jpayne@69 12033 PyObject *__pyx_r = NULL;
jpayne@69 12034 __Pyx_TraceDeclarations
jpayne@69 12035 __Pyx_RefNannyDeclarations
jpayne@69 12036 PyObject *__pyx_t_1 = NULL;
jpayne@69 12037 PyObject *__pyx_t_2 = NULL;
jpayne@69 12038 PyObject *__pyx_t_3 = NULL;
jpayne@69 12039 unsigned int __pyx_t_4;
jpayne@69 12040 int __pyx_t_5;
jpayne@69 12041 int __pyx_t_6;
jpayne@69 12042 struct __pyx_opt_args_5pysam_9libcutils_force_bytes __pyx_t_7;
jpayne@69 12043 char *__pyx_t_8;
jpayne@69 12044 Py_ssize_t __pyx_t_9;
jpayne@69 12045 int __pyx_lineno = 0;
jpayne@69 12046 const char *__pyx_filename = NULL;
jpayne@69 12047 int __pyx_clineno = 0;
jpayne@69 12048 __Pyx_TraceFrameInit(__pyx_codeobj__18)
jpayne@69 12049 __Pyx_RefNannySetupContext("fetch", 0);
jpayne@69 12050 __Pyx_TraceCall("fetch", __pyx_f[0], 416, 0, __PYX_ERR(0, 416, __pyx_L1_error));
jpayne@69 12051 __Pyx_INCREF(__pyx_v_start);
jpayne@69 12052 __Pyx_INCREF(__pyx_v_region);
jpayne@69 12053 __Pyx_INCREF(__pyx_v_parser);
jpayne@69 12054
jpayne@69 12055 /* "pysam/libctabix.pyx":443
jpayne@69 12056 *
jpayne@69 12057 * '''
jpayne@69 12058 * if not self.is_open(): # <<<<<<<<<<<<<<
jpayne@69 12059 * raise ValueError("I/O operation on closed file")
jpayne@69 12060 *
jpayne@69 12061 */
jpayne@69 12062 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error)
jpayne@69 12063 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12064 __pyx_t_3 = NULL;
jpayne@69 12065 __pyx_t_4 = 0;
jpayne@69 12066 #if CYTHON_UNPACK_METHODS
jpayne@69 12067 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 12068 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 12069 if (likely(__pyx_t_3)) {
jpayne@69 12070 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 12071 __Pyx_INCREF(__pyx_t_3);
jpayne@69 12072 __Pyx_INCREF(function);
jpayne@69 12073 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 12074 __pyx_t_4 = 1;
jpayne@69 12075 }
jpayne@69 12076 }
jpayne@69 12077 #endif
jpayne@69 12078 {
jpayne@69 12079 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@69 12080 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 12081 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 12082 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
jpayne@69 12083 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12084 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12085 }
jpayne@69 12086 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 443, __pyx_L1_error)
jpayne@69 12087 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12088 __pyx_t_6 = (!__pyx_t_5);
jpayne@69 12089 if (unlikely(__pyx_t_6)) {
jpayne@69 12090
jpayne@69 12091 /* "pysam/libctabix.pyx":444
jpayne@69 12092 * '''
jpayne@69 12093 * if not self.is_open():
jpayne@69 12094 * raise ValueError("I/O operation on closed file") # <<<<<<<<<<<<<<
jpayne@69 12095 *
jpayne@69 12096 * # convert coordinates to region string, which is one-based
jpayne@69 12097 */
jpayne@69 12098 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
jpayne@69 12099 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12100 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 12101 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12102 __PYX_ERR(0, 444, __pyx_L1_error)
jpayne@69 12103
jpayne@69 12104 /* "pysam/libctabix.pyx":443
jpayne@69 12105 *
jpayne@69 12106 * '''
jpayne@69 12107 * if not self.is_open(): # <<<<<<<<<<<<<<
jpayne@69 12108 * raise ValueError("I/O operation on closed file")
jpayne@69 12109 *
jpayne@69 12110 */
jpayne@69 12111 }
jpayne@69 12112
jpayne@69 12113 /* "pysam/libctabix.pyx":447
jpayne@69 12114 *
jpayne@69 12115 * # convert coordinates to region string, which is one-based
jpayne@69 12116 * if reference: # <<<<<<<<<<<<<<
jpayne@69 12117 * if end is not None:
jpayne@69 12118 * if end < 0:
jpayne@69 12119 */
jpayne@69 12120 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 447, __pyx_L1_error)
jpayne@69 12121 if (__pyx_t_6) {
jpayne@69 12122
jpayne@69 12123 /* "pysam/libctabix.pyx":448
jpayne@69 12124 * # convert coordinates to region string, which is one-based
jpayne@69 12125 * if reference:
jpayne@69 12126 * if end is not None: # <<<<<<<<<<<<<<
jpayne@69 12127 * if end < 0:
jpayne@69 12128 * raise ValueError("end out of range (%i)" % end)
jpayne@69 12129 */
jpayne@69 12130 __pyx_t_6 = (__pyx_v_end != Py_None);
jpayne@69 12131 if (__pyx_t_6) {
jpayne@69 12132
jpayne@69 12133 /* "pysam/libctabix.pyx":449
jpayne@69 12134 * if reference:
jpayne@69 12135 * if end is not None:
jpayne@69 12136 * if end < 0: # <<<<<<<<<<<<<<
jpayne@69 12137 * raise ValueError("end out of range (%i)" % end)
jpayne@69 12138 * if start is None:
jpayne@69 12139 */
jpayne@69 12140 __pyx_t_1 = PyObject_RichCompare(__pyx_v_end, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
jpayne@69 12141 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 449, __pyx_L1_error)
jpayne@69 12142 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12143 if (unlikely(__pyx_t_6)) {
jpayne@69 12144
jpayne@69 12145 /* "pysam/libctabix.pyx":450
jpayne@69 12146 * if end is not None:
jpayne@69 12147 * if end < 0:
jpayne@69 12148 * raise ValueError("end out of range (%i)" % end) # <<<<<<<<<<<<<<
jpayne@69 12149 * if start is None:
jpayne@69 12150 * start = 0
jpayne@69 12151 */
jpayne@69 12152 __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_end_out_of_range_i, __pyx_v_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
jpayne@69 12153 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12154 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
jpayne@69 12155 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12156 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12157 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 12158 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12159 __PYX_ERR(0, 450, __pyx_L1_error)
jpayne@69 12160
jpayne@69 12161 /* "pysam/libctabix.pyx":449
jpayne@69 12162 * if reference:
jpayne@69 12163 * if end is not None:
jpayne@69 12164 * if end < 0: # <<<<<<<<<<<<<<
jpayne@69 12165 * raise ValueError("end out of range (%i)" % end)
jpayne@69 12166 * if start is None:
jpayne@69 12167 */
jpayne@69 12168 }
jpayne@69 12169
jpayne@69 12170 /* "pysam/libctabix.pyx":451
jpayne@69 12171 * if end < 0:
jpayne@69 12172 * raise ValueError("end out of range (%i)" % end)
jpayne@69 12173 * if start is None: # <<<<<<<<<<<<<<
jpayne@69 12174 * start = 0
jpayne@69 12175 *
jpayne@69 12176 */
jpayne@69 12177 __pyx_t_6 = (__pyx_v_start == Py_None);
jpayne@69 12178 if (__pyx_t_6) {
jpayne@69 12179
jpayne@69 12180 /* "pysam/libctabix.pyx":452
jpayne@69 12181 * raise ValueError("end out of range (%i)" % end)
jpayne@69 12182 * if start is None:
jpayne@69 12183 * start = 0 # <<<<<<<<<<<<<<
jpayne@69 12184 *
jpayne@69 12185 * if start < 0:
jpayne@69 12186 */
jpayne@69 12187 __Pyx_INCREF(__pyx_int_0);
jpayne@69 12188 __Pyx_DECREF_SET(__pyx_v_start, __pyx_int_0);
jpayne@69 12189
jpayne@69 12190 /* "pysam/libctabix.pyx":451
jpayne@69 12191 * if end < 0:
jpayne@69 12192 * raise ValueError("end out of range (%i)" % end)
jpayne@69 12193 * if start is None: # <<<<<<<<<<<<<<
jpayne@69 12194 * start = 0
jpayne@69 12195 *
jpayne@69 12196 */
jpayne@69 12197 }
jpayne@69 12198
jpayne@69 12199 /* "pysam/libctabix.pyx":454
jpayne@69 12200 * start = 0
jpayne@69 12201 *
jpayne@69 12202 * if start < 0: # <<<<<<<<<<<<<<
jpayne@69 12203 * raise ValueError("start out of range (%i)" % end)
jpayne@69 12204 * elif start > end:
jpayne@69 12205 */
jpayne@69 12206 __pyx_t_2 = PyObject_RichCompare(__pyx_v_start, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
jpayne@69 12207 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 454, __pyx_L1_error)
jpayne@69 12208 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12209 if (unlikely(__pyx_t_6)) {
jpayne@69 12210
jpayne@69 12211 /* "pysam/libctabix.pyx":455
jpayne@69 12212 *
jpayne@69 12213 * if start < 0:
jpayne@69 12214 * raise ValueError("start out of range (%i)" % end) # <<<<<<<<<<<<<<
jpayne@69 12215 * elif start > end:
jpayne@69 12216 * raise ValueError(
jpayne@69 12217 */
jpayne@69 12218 __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_start_out_of_range_i, __pyx_v_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error)
jpayne@69 12219 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12220 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
jpayne@69 12221 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12222 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12223 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 12224 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12225 __PYX_ERR(0, 455, __pyx_L1_error)
jpayne@69 12226
jpayne@69 12227 /* "pysam/libctabix.pyx":454
jpayne@69 12228 * start = 0
jpayne@69 12229 *
jpayne@69 12230 * if start < 0: # <<<<<<<<<<<<<<
jpayne@69 12231 * raise ValueError("start out of range (%i)" % end)
jpayne@69 12232 * elif start > end:
jpayne@69 12233 */
jpayne@69 12234 }
jpayne@69 12235
jpayne@69 12236 /* "pysam/libctabix.pyx":456
jpayne@69 12237 * if start < 0:
jpayne@69 12238 * raise ValueError("start out of range (%i)" % end)
jpayne@69 12239 * elif start > end: # <<<<<<<<<<<<<<
jpayne@69 12240 * raise ValueError(
jpayne@69 12241 * 'start (%i) >= end (%i)' % (start, end))
jpayne@69 12242 */
jpayne@69 12243 __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)
jpayne@69 12244 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 456, __pyx_L1_error)
jpayne@69 12245 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12246 if (unlikely(__pyx_t_6)) {
jpayne@69 12247
jpayne@69 12248 /* "pysam/libctabix.pyx":458
jpayne@69 12249 * elif start > end:
jpayne@69 12250 * raise ValueError(
jpayne@69 12251 * 'start (%i) >= end (%i)' % (start, end)) # <<<<<<<<<<<<<<
jpayne@69 12252 * elif start == end:
jpayne@69 12253 * return EmptyIterator()
jpayne@69 12254 */
jpayne@69 12255 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
jpayne@69 12256 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12257 __Pyx_INCREF(__pyx_v_start);
jpayne@69 12258 __Pyx_GIVEREF(__pyx_v_start);
jpayne@69 12259 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_start)) __PYX_ERR(0, 458, __pyx_L1_error);
jpayne@69 12260 __Pyx_INCREF(__pyx_v_end);
jpayne@69 12261 __Pyx_GIVEREF(__pyx_v_end);
jpayne@69 12262 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_end)) __PYX_ERR(0, 458, __pyx_L1_error);
jpayne@69 12263 __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_start_i_end_i, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error)
jpayne@69 12264 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12265 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12266
jpayne@69 12267 /* "pysam/libctabix.pyx":457
jpayne@69 12268 * raise ValueError("start out of range (%i)" % end)
jpayne@69 12269 * elif start > end:
jpayne@69 12270 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@69 12271 * 'start (%i) >= end (%i)' % (start, end))
jpayne@69 12272 * elif start == end:
jpayne@69 12273 */
jpayne@69 12274 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
jpayne@69 12275 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12276 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12277 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 12278 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12279 __PYX_ERR(0, 457, __pyx_L1_error)
jpayne@69 12280
jpayne@69 12281 /* "pysam/libctabix.pyx":456
jpayne@69 12282 * if start < 0:
jpayne@69 12283 * raise ValueError("start out of range (%i)" % end)
jpayne@69 12284 * elif start > end: # <<<<<<<<<<<<<<
jpayne@69 12285 * raise ValueError(
jpayne@69 12286 * 'start (%i) >= end (%i)' % (start, end))
jpayne@69 12287 */
jpayne@69 12288 }
jpayne@69 12289
jpayne@69 12290 /* "pysam/libctabix.pyx":459
jpayne@69 12291 * raise ValueError(
jpayne@69 12292 * 'start (%i) >= end (%i)' % (start, end))
jpayne@69 12293 * elif start == end: # <<<<<<<<<<<<<<
jpayne@69 12294 * return EmptyIterator()
jpayne@69 12295 * else:
jpayne@69 12296 */
jpayne@69 12297 __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
jpayne@69 12298 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 459, __pyx_L1_error)
jpayne@69 12299 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12300 if (__pyx_t_6) {
jpayne@69 12301
jpayne@69 12302 /* "pysam/libctabix.pyx":460
jpayne@69 12303 * 'start (%i) >= end (%i)' % (start, end))
jpayne@69 12304 * elif start == end:
jpayne@69 12305 * return EmptyIterator() # <<<<<<<<<<<<<<
jpayne@69 12306 * else:
jpayne@69 12307 * region = '%s:%i-%i' % (reference, start + 1, end)
jpayne@69 12308 */
jpayne@69 12309 __Pyx_XDECREF(__pyx_r);
jpayne@69 12310 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EmptyIterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error)
jpayne@69 12311 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12312 __pyx_t_3 = NULL;
jpayne@69 12313 __pyx_t_4 = 0;
jpayne@69 12314 #if CYTHON_UNPACK_METHODS
jpayne@69 12315 if (unlikely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 12316 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 12317 if (likely(__pyx_t_3)) {
jpayne@69 12318 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 12319 __Pyx_INCREF(__pyx_t_3);
jpayne@69 12320 __Pyx_INCREF(function);
jpayne@69 12321 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 12322 __pyx_t_4 = 1;
jpayne@69 12323 }
jpayne@69 12324 }
jpayne@69 12325 #endif
jpayne@69 12326 {
jpayne@69 12327 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@69 12328 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 12329 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 12330 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error)
jpayne@69 12331 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12332 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12333 }
jpayne@69 12334 __pyx_r = __pyx_t_1;
jpayne@69 12335 __pyx_t_1 = 0;
jpayne@69 12336 goto __pyx_L0;
jpayne@69 12337
jpayne@69 12338 /* "pysam/libctabix.pyx":459
jpayne@69 12339 * raise ValueError(
jpayne@69 12340 * 'start (%i) >= end (%i)' % (start, end))
jpayne@69 12341 * elif start == end: # <<<<<<<<<<<<<<
jpayne@69 12342 * return EmptyIterator()
jpayne@69 12343 * else:
jpayne@69 12344 */
jpayne@69 12345 }
jpayne@69 12346
jpayne@69 12347 /* "pysam/libctabix.pyx":462
jpayne@69 12348 * return EmptyIterator()
jpayne@69 12349 * else:
jpayne@69 12350 * region = '%s:%i-%i' % (reference, start + 1, end) # <<<<<<<<<<<<<<
jpayne@69 12351 * elif start is not None:
jpayne@69 12352 * if start < 0:
jpayne@69 12353 */
jpayne@69 12354 /*else*/ {
jpayne@69 12355 __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_start, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
jpayne@69 12356 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12357 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error)
jpayne@69 12358 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12359 __Pyx_INCREF(__pyx_v_reference);
jpayne@69 12360 __Pyx_GIVEREF(__pyx_v_reference);
jpayne@69 12361 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference)) __PYX_ERR(0, 462, __pyx_L1_error);
jpayne@69 12362 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 12363 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error);
jpayne@69 12364 __Pyx_INCREF(__pyx_v_end);
jpayne@69 12365 __Pyx_GIVEREF(__pyx_v_end);
jpayne@69 12366 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end)) __PYX_ERR(0, 462, __pyx_L1_error);
jpayne@69 12367 __pyx_t_1 = 0;
jpayne@69 12368 __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_s_i_i, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
jpayne@69 12369 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12370 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12371 __Pyx_DECREF_SET(__pyx_v_region, __pyx_t_1);
jpayne@69 12372 __pyx_t_1 = 0;
jpayne@69 12373 }
jpayne@69 12374
jpayne@69 12375 /* "pysam/libctabix.pyx":448
jpayne@69 12376 * # convert coordinates to region string, which is one-based
jpayne@69 12377 * if reference:
jpayne@69 12378 * if end is not None: # <<<<<<<<<<<<<<
jpayne@69 12379 * if end < 0:
jpayne@69 12380 * raise ValueError("end out of range (%i)" % end)
jpayne@69 12381 */
jpayne@69 12382 goto __pyx_L5;
jpayne@69 12383 }
jpayne@69 12384
jpayne@69 12385 /* "pysam/libctabix.pyx":463
jpayne@69 12386 * else:
jpayne@69 12387 * region = '%s:%i-%i' % (reference, start + 1, end)
jpayne@69 12388 * elif start is not None: # <<<<<<<<<<<<<<
jpayne@69 12389 * if start < 0:
jpayne@69 12390 * raise ValueError("start out of range (%i)" % end)
jpayne@69 12391 */
jpayne@69 12392 __pyx_t_6 = (__pyx_v_start != Py_None);
jpayne@69 12393 if (__pyx_t_6) {
jpayne@69 12394
jpayne@69 12395 /* "pysam/libctabix.pyx":464
jpayne@69 12396 * region = '%s:%i-%i' % (reference, start + 1, end)
jpayne@69 12397 * elif start is not None:
jpayne@69 12398 * if start < 0: # <<<<<<<<<<<<<<
jpayne@69 12399 * raise ValueError("start out of range (%i)" % end)
jpayne@69 12400 * region = '%s:%i' % (reference, start + 1)
jpayne@69 12401 */
jpayne@69 12402 __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
jpayne@69 12403 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 464, __pyx_L1_error)
jpayne@69 12404 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12405 if (unlikely(__pyx_t_6)) {
jpayne@69 12406
jpayne@69 12407 /* "pysam/libctabix.pyx":465
jpayne@69 12408 * elif start is not None:
jpayne@69 12409 * if start < 0:
jpayne@69 12410 * raise ValueError("start out of range (%i)" % end) # <<<<<<<<<<<<<<
jpayne@69 12411 * region = '%s:%i' % (reference, start + 1)
jpayne@69 12412 * else:
jpayne@69 12413 */
jpayne@69 12414 __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_start_out_of_range_i, __pyx_v_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)
jpayne@69 12415 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12416 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
jpayne@69 12417 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12418 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12419 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 12420 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12421 __PYX_ERR(0, 465, __pyx_L1_error)
jpayne@69 12422
jpayne@69 12423 /* "pysam/libctabix.pyx":464
jpayne@69 12424 * region = '%s:%i-%i' % (reference, start + 1, end)
jpayne@69 12425 * elif start is not None:
jpayne@69 12426 * if start < 0: # <<<<<<<<<<<<<<
jpayne@69 12427 * raise ValueError("start out of range (%i)" % end)
jpayne@69 12428 * region = '%s:%i' % (reference, start + 1)
jpayne@69 12429 */
jpayne@69 12430 }
jpayne@69 12431
jpayne@69 12432 /* "pysam/libctabix.pyx":466
jpayne@69 12433 * if start < 0:
jpayne@69 12434 * raise ValueError("start out of range (%i)" % end)
jpayne@69 12435 * region = '%s:%i' % (reference, start + 1) # <<<<<<<<<<<<<<
jpayne@69 12436 * else:
jpayne@69 12437 * region = reference
jpayne@69 12438 */
jpayne@69 12439 __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_start, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error)
jpayne@69 12440 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12441 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
jpayne@69 12442 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12443 __Pyx_INCREF(__pyx_v_reference);
jpayne@69 12444 __Pyx_GIVEREF(__pyx_v_reference);
jpayne@69 12445 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference)) __PYX_ERR(0, 466, __pyx_L1_error);
jpayne@69 12446 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 12447 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error);
jpayne@69 12448 __pyx_t_2 = 0;
jpayne@69 12449 __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_s_i, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error)
jpayne@69 12450 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12451 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12452 __Pyx_DECREF_SET(__pyx_v_region, __pyx_t_2);
jpayne@69 12453 __pyx_t_2 = 0;
jpayne@69 12454
jpayne@69 12455 /* "pysam/libctabix.pyx":463
jpayne@69 12456 * else:
jpayne@69 12457 * region = '%s:%i-%i' % (reference, start + 1, end)
jpayne@69 12458 * elif start is not None: # <<<<<<<<<<<<<<
jpayne@69 12459 * if start < 0:
jpayne@69 12460 * raise ValueError("start out of range (%i)" % end)
jpayne@69 12461 */
jpayne@69 12462 goto __pyx_L5;
jpayne@69 12463 }
jpayne@69 12464
jpayne@69 12465 /* "pysam/libctabix.pyx":468
jpayne@69 12466 * region = '%s:%i' % (reference, start + 1)
jpayne@69 12467 * else:
jpayne@69 12468 * region = reference # <<<<<<<<<<<<<<
jpayne@69 12469 *
jpayne@69 12470 * # get iterator
jpayne@69 12471 */
jpayne@69 12472 /*else*/ {
jpayne@69 12473 __Pyx_INCREF(__pyx_v_reference);
jpayne@69 12474 __Pyx_DECREF_SET(__pyx_v_region, __pyx_v_reference);
jpayne@69 12475 }
jpayne@69 12476 __pyx_L5:;
jpayne@69 12477
jpayne@69 12478 /* "pysam/libctabix.pyx":447
jpayne@69 12479 *
jpayne@69 12480 * # convert coordinates to region string, which is one-based
jpayne@69 12481 * if reference: # <<<<<<<<<<<<<<
jpayne@69 12482 * if end is not None:
jpayne@69 12483 * if end < 0:
jpayne@69 12484 */
jpayne@69 12485 }
jpayne@69 12486
jpayne@69 12487 /* "pysam/libctabix.pyx":476
jpayne@69 12488 *
jpayne@69 12489 * # reopen the same file if necessary
jpayne@69 12490 * if multiple_iterators: # <<<<<<<<<<<<<<
jpayne@69 12491 * fileobj = self._dup()
jpayne@69 12492 * else:
jpayne@69 12493 */
jpayne@69 12494 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_multiple_iterators); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 476, __pyx_L1_error)
jpayne@69 12495 if (__pyx_t_6) {
jpayne@69 12496
jpayne@69 12497 /* "pysam/libctabix.pyx":477
jpayne@69 12498 * # reopen the same file if necessary
jpayne@69 12499 * if multiple_iterators:
jpayne@69 12500 * fileobj = self._dup() # <<<<<<<<<<<<<<
jpayne@69 12501 * else:
jpayne@69 12502 * fileobj = self
jpayne@69 12503 */
jpayne@69 12504 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
jpayne@69 12505 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12506 __pyx_t_3 = NULL;
jpayne@69 12507 __pyx_t_4 = 0;
jpayne@69 12508 #if CYTHON_UNPACK_METHODS
jpayne@69 12509 if (likely(PyMethod_Check(__pyx_t_1))) {
jpayne@69 12510 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
jpayne@69 12511 if (likely(__pyx_t_3)) {
jpayne@69 12512 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
jpayne@69 12513 __Pyx_INCREF(__pyx_t_3);
jpayne@69 12514 __Pyx_INCREF(function);
jpayne@69 12515 __Pyx_DECREF_SET(__pyx_t_1, function);
jpayne@69 12516 __pyx_t_4 = 1;
jpayne@69 12517 }
jpayne@69 12518 }
jpayne@69 12519 #endif
jpayne@69 12520 {
jpayne@69 12521 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@69 12522 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 12523 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 12524 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
jpayne@69 12525 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12526 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12527 }
jpayne@69 12528 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5pysam_9libctabix_TabixFile))))) __PYX_ERR(0, 477, __pyx_L1_error)
jpayne@69 12529 __pyx_v_fileobj = ((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_t_2);
jpayne@69 12530 __pyx_t_2 = 0;
jpayne@69 12531
jpayne@69 12532 /* "pysam/libctabix.pyx":476
jpayne@69 12533 *
jpayne@69 12534 * # reopen the same file if necessary
jpayne@69 12535 * if multiple_iterators: # <<<<<<<<<<<<<<
jpayne@69 12536 * fileobj = self._dup()
jpayne@69 12537 * else:
jpayne@69 12538 */
jpayne@69 12539 goto __pyx_L10;
jpayne@69 12540 }
jpayne@69 12541
jpayne@69 12542 /* "pysam/libctabix.pyx":479
jpayne@69 12543 * fileobj = self._dup()
jpayne@69 12544 * else:
jpayne@69 12545 * fileobj = self # <<<<<<<<<<<<<<
jpayne@69 12546 *
jpayne@69 12547 * if region is None:
jpayne@69 12548 */
jpayne@69 12549 /*else*/ {
jpayne@69 12550 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@69 12551 __pyx_v_fileobj = __pyx_v_self;
jpayne@69 12552 }
jpayne@69 12553 __pyx_L10:;
jpayne@69 12554
jpayne@69 12555 /* "pysam/libctabix.pyx":481
jpayne@69 12556 * fileobj = self
jpayne@69 12557 *
jpayne@69 12558 * if region is None: # <<<<<<<<<<<<<<
jpayne@69 12559 * # without region or reference - iterate from start
jpayne@69 12560 * with nogil:
jpayne@69 12561 */
jpayne@69 12562 __pyx_t_6 = (__pyx_v_region == Py_None);
jpayne@69 12563 if (__pyx_t_6) {
jpayne@69 12564
jpayne@69 12565 /* "pysam/libctabix.pyx":483
jpayne@69 12566 * if region is None:
jpayne@69 12567 * # without region or reference - iterate from start
jpayne@69 12568 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 12569 * itr = tbx_itr_queryi(fileobj.index,
jpayne@69 12570 * HTS_IDX_START,
jpayne@69 12571 */
jpayne@69 12572 {
jpayne@69 12573 #ifdef WITH_THREAD
jpayne@69 12574 PyThreadState *_save;
jpayne@69 12575 _save = NULL;
jpayne@69 12576 Py_UNBLOCK_THREADS
jpayne@69 12577 __Pyx_FastGIL_Remember();
jpayne@69 12578 #endif
jpayne@69 12579 /*try:*/ {
jpayne@69 12580
jpayne@69 12581 /* "pysam/libctabix.pyx":484
jpayne@69 12582 * # without region or reference - iterate from start
jpayne@69 12583 * with nogil:
jpayne@69 12584 * itr = tbx_itr_queryi(fileobj.index, # <<<<<<<<<<<<<<
jpayne@69 12585 * HTS_IDX_START,
jpayne@69 12586 * 0,
jpayne@69 12587 */
jpayne@69 12588 __pyx_v_itr = tbx_itr_queryi(__pyx_v_fileobj->index, HTS_IDX_START, 0, 0);
jpayne@69 12589 }
jpayne@69 12590
jpayne@69 12591 /* "pysam/libctabix.pyx":483
jpayne@69 12592 * if region is None:
jpayne@69 12593 * # without region or reference - iterate from start
jpayne@69 12594 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 12595 * itr = tbx_itr_queryi(fileobj.index,
jpayne@69 12596 * HTS_IDX_START,
jpayne@69 12597 */
jpayne@69 12598 /*finally:*/ {
jpayne@69 12599 /*normal exit:*/{
jpayne@69 12600 #ifdef WITH_THREAD
jpayne@69 12601 __Pyx_FastGIL_Forget();
jpayne@69 12602 Py_BLOCK_THREADS
jpayne@69 12603 #endif
jpayne@69 12604 goto __pyx_L14;
jpayne@69 12605 }
jpayne@69 12606 __pyx_L14:;
jpayne@69 12607 }
jpayne@69 12608 }
jpayne@69 12609
jpayne@69 12610 /* "pysam/libctabix.pyx":481
jpayne@69 12611 * fileobj = self
jpayne@69 12612 *
jpayne@69 12613 * if region is None: # <<<<<<<<<<<<<<
jpayne@69 12614 * # without region or reference - iterate from start
jpayne@69 12615 * with nogil:
jpayne@69 12616 */
jpayne@69 12617 goto __pyx_L11;
jpayne@69 12618 }
jpayne@69 12619
jpayne@69 12620 /* "pysam/libctabix.pyx":489
jpayne@69 12621 * 0)
jpayne@69 12622 * else:
jpayne@69 12623 * s = force_bytes(region, encoding=fileobj.encoding) # <<<<<<<<<<<<<<
jpayne@69 12624 * cstr = s
jpayne@69 12625 * with nogil:
jpayne@69 12626 */
jpayne@69 12627 /*else*/ {
jpayne@69 12628 __pyx_t_2 = __pyx_v_fileobj->encoding;
jpayne@69 12629 __Pyx_INCREF(__pyx_t_2);
jpayne@69 12630 __pyx_t_7.__pyx_n = 1;
jpayne@69 12631 __pyx_t_7.encoding = __pyx_t_2;
jpayne@69 12632 __pyx_t_1 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_region, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
jpayne@69 12633 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12634 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12635 __pyx_v_s = ((PyObject*)__pyx_t_1);
jpayne@69 12636 __pyx_t_1 = 0;
jpayne@69 12637
jpayne@69 12638 /* "pysam/libctabix.pyx":490
jpayne@69 12639 * else:
jpayne@69 12640 * s = force_bytes(region, encoding=fileobj.encoding)
jpayne@69 12641 * cstr = s # <<<<<<<<<<<<<<
jpayne@69 12642 * with nogil:
jpayne@69 12643 * itr = tbx_itr_querys(fileobj.index, cstr)
jpayne@69 12644 */
jpayne@69 12645 if (unlikely(__pyx_v_s == Py_None)) {
jpayne@69 12646 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@69 12647 __PYX_ERR(0, 490, __pyx_L1_error)
jpayne@69 12648 }
jpayne@69 12649 __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_s); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 490, __pyx_L1_error)
jpayne@69 12650 __pyx_v_cstr = __pyx_t_8;
jpayne@69 12651
jpayne@69 12652 /* "pysam/libctabix.pyx":491
jpayne@69 12653 * s = force_bytes(region, encoding=fileobj.encoding)
jpayne@69 12654 * cstr = s
jpayne@69 12655 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 12656 * itr = tbx_itr_querys(fileobj.index, cstr)
jpayne@69 12657 *
jpayne@69 12658 */
jpayne@69 12659 {
jpayne@69 12660 #ifdef WITH_THREAD
jpayne@69 12661 PyThreadState *_save;
jpayne@69 12662 _save = NULL;
jpayne@69 12663 Py_UNBLOCK_THREADS
jpayne@69 12664 __Pyx_FastGIL_Remember();
jpayne@69 12665 #endif
jpayne@69 12666 /*try:*/ {
jpayne@69 12667
jpayne@69 12668 /* "pysam/libctabix.pyx":492
jpayne@69 12669 * cstr = s
jpayne@69 12670 * with nogil:
jpayne@69 12671 * itr = tbx_itr_querys(fileobj.index, cstr) # <<<<<<<<<<<<<<
jpayne@69 12672 *
jpayne@69 12673 * if itr == NULL:
jpayne@69 12674 */
jpayne@69 12675 __pyx_v_itr = tbx_itr_querys(__pyx_v_fileobj->index, __pyx_v_cstr);
jpayne@69 12676 }
jpayne@69 12677
jpayne@69 12678 /* "pysam/libctabix.pyx":491
jpayne@69 12679 * s = force_bytes(region, encoding=fileobj.encoding)
jpayne@69 12680 * cstr = s
jpayne@69 12681 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 12682 * itr = tbx_itr_querys(fileobj.index, cstr)
jpayne@69 12683 *
jpayne@69 12684 */
jpayne@69 12685 /*finally:*/ {
jpayne@69 12686 /*normal exit:*/{
jpayne@69 12687 #ifdef WITH_THREAD
jpayne@69 12688 __Pyx_FastGIL_Forget();
jpayne@69 12689 Py_BLOCK_THREADS
jpayne@69 12690 #endif
jpayne@69 12691 goto __pyx_L17;
jpayne@69 12692 }
jpayne@69 12693 __pyx_L17:;
jpayne@69 12694 }
jpayne@69 12695 }
jpayne@69 12696 }
jpayne@69 12697 __pyx_L11:;
jpayne@69 12698
jpayne@69 12699 /* "pysam/libctabix.pyx":494
jpayne@69 12700 * itr = tbx_itr_querys(fileobj.index, cstr)
jpayne@69 12701 *
jpayne@69 12702 * if itr == NULL: # <<<<<<<<<<<<<<
jpayne@69 12703 * if region is None:
jpayne@69 12704 * if len(self.contigs) > 0:
jpayne@69 12705 */
jpayne@69 12706 __pyx_t_6 = (__pyx_v_itr == NULL);
jpayne@69 12707 if (__pyx_t_6) {
jpayne@69 12708
jpayne@69 12709 /* "pysam/libctabix.pyx":495
jpayne@69 12710 *
jpayne@69 12711 * if itr == NULL:
jpayne@69 12712 * if region is None: # <<<<<<<<<<<<<<
jpayne@69 12713 * if len(self.contigs) > 0:
jpayne@69 12714 * # when accessing a tabix file created prior tabix 1.0
jpayne@69 12715 */
jpayne@69 12716 __pyx_t_6 = (__pyx_v_region == Py_None);
jpayne@69 12717 if (likely(__pyx_t_6)) {
jpayne@69 12718
jpayne@69 12719 /* "pysam/libctabix.pyx":496
jpayne@69 12720 * if itr == NULL:
jpayne@69 12721 * if region is None:
jpayne@69 12722 * if len(self.contigs) > 0: # <<<<<<<<<<<<<<
jpayne@69 12723 * # when accessing a tabix file created prior tabix 1.0
jpayne@69 12724 * # the full-file iterator is empty.
jpayne@69 12725 */
jpayne@69 12726 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_contigs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
jpayne@69 12727 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12728 __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 496, __pyx_L1_error)
jpayne@69 12729 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12730 __pyx_t_6 = (__pyx_t_9 > 0);
jpayne@69 12731 if (unlikely(__pyx_t_6)) {
jpayne@69 12732
jpayne@69 12733 /* "pysam/libctabix.pyx":499
jpayne@69 12734 * # when accessing a tabix file created prior tabix 1.0
jpayne@69 12735 * # the full-file iterator is empty.
jpayne@69 12736 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@69 12737 * "could not create iterator, possible "
jpayne@69 12738 * "tabix version mismatch")
jpayne@69 12739 */
jpayne@69 12740 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
jpayne@69 12741 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12742 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 12743 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12744 __PYX_ERR(0, 499, __pyx_L1_error)
jpayne@69 12745
jpayne@69 12746 /* "pysam/libctabix.pyx":496
jpayne@69 12747 * if itr == NULL:
jpayne@69 12748 * if region is None:
jpayne@69 12749 * if len(self.contigs) > 0: # <<<<<<<<<<<<<<
jpayne@69 12750 * # when accessing a tabix file created prior tabix 1.0
jpayne@69 12751 * # the full-file iterator is empty.
jpayne@69 12752 */
jpayne@69 12753 }
jpayne@69 12754
jpayne@69 12755 /* "pysam/libctabix.pyx":505
jpayne@69 12756 * # possible reason is that the file is empty -
jpayne@69 12757 * # return an empty iterator
jpayne@69 12758 * return EmptyIterator() # <<<<<<<<<<<<<<
jpayne@69 12759 * else:
jpayne@69 12760 * raise ValueError(
jpayne@69 12761 */
jpayne@69 12762 /*else*/ {
jpayne@69 12763 __Pyx_XDECREF(__pyx_r);
jpayne@69 12764 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EmptyIterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
jpayne@69 12765 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12766 __pyx_t_3 = NULL;
jpayne@69 12767 __pyx_t_4 = 0;
jpayne@69 12768 #if CYTHON_UNPACK_METHODS
jpayne@69 12769 if (unlikely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 12770 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 12771 if (likely(__pyx_t_3)) {
jpayne@69 12772 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 12773 __Pyx_INCREF(__pyx_t_3);
jpayne@69 12774 __Pyx_INCREF(function);
jpayne@69 12775 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 12776 __pyx_t_4 = 1;
jpayne@69 12777 }
jpayne@69 12778 }
jpayne@69 12779 #endif
jpayne@69 12780 {
jpayne@69 12781 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@69 12782 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 12783 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 12784 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
jpayne@69 12785 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12786 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12787 }
jpayne@69 12788 __pyx_r = __pyx_t_1;
jpayne@69 12789 __pyx_t_1 = 0;
jpayne@69 12790 goto __pyx_L0;
jpayne@69 12791 }
jpayne@69 12792
jpayne@69 12793 /* "pysam/libctabix.pyx":495
jpayne@69 12794 *
jpayne@69 12795 * if itr == NULL:
jpayne@69 12796 * if region is None: # <<<<<<<<<<<<<<
jpayne@69 12797 * if len(self.contigs) > 0:
jpayne@69 12798 * # when accessing a tabix file created prior tabix 1.0
jpayne@69 12799 */
jpayne@69 12800 }
jpayne@69 12801
jpayne@69 12802 /* "pysam/libctabix.pyx":507
jpayne@69 12803 * return EmptyIterator()
jpayne@69 12804 * else:
jpayne@69 12805 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@69 12806 * "could not create iterator for region '%s'" %
jpayne@69 12807 * region)
jpayne@69 12808 */
jpayne@69 12809 /*else*/ {
jpayne@69 12810
jpayne@69 12811 /* "pysam/libctabix.pyx":508
jpayne@69 12812 * else:
jpayne@69 12813 * raise ValueError(
jpayne@69 12814 * "could not create iterator for region '%s'" % # <<<<<<<<<<<<<<
jpayne@69 12815 * region)
jpayne@69 12816 *
jpayne@69 12817 */
jpayne@69 12818 __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_could_not_create_iterator_for_re, __pyx_v_region); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
jpayne@69 12819 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12820
jpayne@69 12821 /* "pysam/libctabix.pyx":507
jpayne@69 12822 * return EmptyIterator()
jpayne@69 12823 * else:
jpayne@69 12824 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@69 12825 * "could not create iterator for region '%s'" %
jpayne@69 12826 * region)
jpayne@69 12827 */
jpayne@69 12828 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
jpayne@69 12829 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12830 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12831 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 12832 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12833 __PYX_ERR(0, 507, __pyx_L1_error)
jpayne@69 12834 }
jpayne@69 12835
jpayne@69 12836 /* "pysam/libctabix.pyx":494
jpayne@69 12837 * itr = tbx_itr_querys(fileobj.index, cstr)
jpayne@69 12838 *
jpayne@69 12839 * if itr == NULL: # <<<<<<<<<<<<<<
jpayne@69 12840 * if region is None:
jpayne@69 12841 * if len(self.contigs) > 0:
jpayne@69 12842 */
jpayne@69 12843 }
jpayne@69 12844
jpayne@69 12845 /* "pysam/libctabix.pyx":512
jpayne@69 12846 *
jpayne@69 12847 * # use default parser if no parser is specified
jpayne@69 12848 * if parser is None: # <<<<<<<<<<<<<<
jpayne@69 12849 * parser = fileobj.parser
jpayne@69 12850 *
jpayne@69 12851 */
jpayne@69 12852 __pyx_t_6 = (__pyx_v_parser == Py_None);
jpayne@69 12853 if (__pyx_t_6) {
jpayne@69 12854
jpayne@69 12855 /* "pysam/libctabix.pyx":513
jpayne@69 12856 * # use default parser if no parser is specified
jpayne@69 12857 * if parser is None:
jpayne@69 12858 * parser = fileobj.parser # <<<<<<<<<<<<<<
jpayne@69 12859 *
jpayne@69 12860 * cdef TabixIterator a
jpayne@69 12861 */
jpayne@69 12862 __pyx_t_2 = ((PyObject *)__pyx_v_fileobj->parser);
jpayne@69 12863 __Pyx_INCREF(__pyx_t_2);
jpayne@69 12864 __Pyx_DECREF_SET(__pyx_v_parser, __pyx_t_2);
jpayne@69 12865 __pyx_t_2 = 0;
jpayne@69 12866
jpayne@69 12867 /* "pysam/libctabix.pyx":512
jpayne@69 12868 *
jpayne@69 12869 * # use default parser if no parser is specified
jpayne@69 12870 * if parser is None: # <<<<<<<<<<<<<<
jpayne@69 12871 * parser = fileobj.parser
jpayne@69 12872 *
jpayne@69 12873 */
jpayne@69 12874 }
jpayne@69 12875
jpayne@69 12876 /* "pysam/libctabix.pyx":516
jpayne@69 12877 *
jpayne@69 12878 * cdef TabixIterator a
jpayne@69 12879 * if parser is None: # <<<<<<<<<<<<<<
jpayne@69 12880 * a = TabixIterator(encoding=fileobj.encoding)
jpayne@69 12881 * else:
jpayne@69 12882 */
jpayne@69 12883 __pyx_t_6 = (__pyx_v_parser == Py_None);
jpayne@69 12884 if (__pyx_t_6) {
jpayne@69 12885
jpayne@69 12886 /* "pysam/libctabix.pyx":517
jpayne@69 12887 * cdef TabixIterator a
jpayne@69 12888 * if parser is None:
jpayne@69 12889 * a = TabixIterator(encoding=fileobj.encoding) # <<<<<<<<<<<<<<
jpayne@69 12890 * else:
jpayne@69 12891 * parser.set_encoding(fileobj.encoding)
jpayne@69 12892 */
jpayne@69 12893 __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error)
jpayne@69 12894 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12895 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_v_fileobj->encoding) < 0) __PYX_ERR(0, 517, __pyx_L1_error)
jpayne@69 12896 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIterator), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
jpayne@69 12897 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12898 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12899 __pyx_v_a = ((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_t_1);
jpayne@69 12900 __pyx_t_1 = 0;
jpayne@69 12901
jpayne@69 12902 /* "pysam/libctabix.pyx":516
jpayne@69 12903 *
jpayne@69 12904 * cdef TabixIterator a
jpayne@69 12905 * if parser is None: # <<<<<<<<<<<<<<
jpayne@69 12906 * a = TabixIterator(encoding=fileobj.encoding)
jpayne@69 12907 * else:
jpayne@69 12908 */
jpayne@69 12909 goto __pyx_L22;
jpayne@69 12910 }
jpayne@69 12911
jpayne@69 12912 /* "pysam/libctabix.pyx":519
jpayne@69 12913 * a = TabixIterator(encoding=fileobj.encoding)
jpayne@69 12914 * else:
jpayne@69 12915 * parser.set_encoding(fileobj.encoding) # <<<<<<<<<<<<<<
jpayne@69 12916 * a = TabixIteratorParsed(parser)
jpayne@69 12917 *
jpayne@69 12918 */
jpayne@69 12919 /*else*/ {
jpayne@69 12920 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_set_encoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
jpayne@69 12921 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12922 __pyx_t_3 = NULL;
jpayne@69 12923 __pyx_t_4 = 0;
jpayne@69 12924 #if CYTHON_UNPACK_METHODS
jpayne@69 12925 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 12926 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 12927 if (likely(__pyx_t_3)) {
jpayne@69 12928 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 12929 __Pyx_INCREF(__pyx_t_3);
jpayne@69 12930 __Pyx_INCREF(function);
jpayne@69 12931 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 12932 __pyx_t_4 = 1;
jpayne@69 12933 }
jpayne@69 12934 }
jpayne@69 12935 #endif
jpayne@69 12936 {
jpayne@69 12937 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_fileobj->encoding};
jpayne@69 12938 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
jpayne@69 12939 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 12940 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error)
jpayne@69 12941 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12942 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12943 }
jpayne@69 12944 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12945
jpayne@69 12946 /* "pysam/libctabix.pyx":520
jpayne@69 12947 * else:
jpayne@69 12948 * parser.set_encoding(fileobj.encoding)
jpayne@69 12949 * a = TabixIteratorParsed(parser) # <<<<<<<<<<<<<<
jpayne@69 12950 *
jpayne@69 12951 * a.tabixfile = fileobj
jpayne@69 12952 */
jpayne@69 12953 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed), __pyx_v_parser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
jpayne@69 12954 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12955 __pyx_v_a = ((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_t_1);
jpayne@69 12956 __pyx_t_1 = 0;
jpayne@69 12957 }
jpayne@69 12958 __pyx_L22:;
jpayne@69 12959
jpayne@69 12960 /* "pysam/libctabix.pyx":522
jpayne@69 12961 * a = TabixIteratorParsed(parser)
jpayne@69 12962 *
jpayne@69 12963 * a.tabixfile = fileobj # <<<<<<<<<<<<<<
jpayne@69 12964 * a.iterator = itr
jpayne@69 12965 *
jpayne@69 12966 */
jpayne@69 12967 __Pyx_INCREF((PyObject *)__pyx_v_fileobj);
jpayne@69 12968 __Pyx_GIVEREF((PyObject *)__pyx_v_fileobj);
jpayne@69 12969 __Pyx_GOTREF((PyObject *)__pyx_v_a->tabixfile);
jpayne@69 12970 __Pyx_DECREF((PyObject *)__pyx_v_a->tabixfile);
jpayne@69 12971 __pyx_v_a->tabixfile = __pyx_v_fileobj;
jpayne@69 12972
jpayne@69 12973 /* "pysam/libctabix.pyx":523
jpayne@69 12974 *
jpayne@69 12975 * a.tabixfile = fileobj
jpayne@69 12976 * a.iterator = itr # <<<<<<<<<<<<<<
jpayne@69 12977 *
jpayne@69 12978 * return a
jpayne@69 12979 */
jpayne@69 12980 __pyx_v_a->iterator = __pyx_v_itr;
jpayne@69 12981
jpayne@69 12982 /* "pysam/libctabix.pyx":525
jpayne@69 12983 * a.iterator = itr
jpayne@69 12984 *
jpayne@69 12985 * return a # <<<<<<<<<<<<<<
jpayne@69 12986 *
jpayne@69 12987 * ###############################################################
jpayne@69 12988 */
jpayne@69 12989 __Pyx_XDECREF(__pyx_r);
jpayne@69 12990 __Pyx_INCREF((PyObject *)__pyx_v_a);
jpayne@69 12991 __pyx_r = ((PyObject *)__pyx_v_a);
jpayne@69 12992 goto __pyx_L0;
jpayne@69 12993
jpayne@69 12994 /* "pysam/libctabix.pyx":416
jpayne@69 12995 * encoding=self.encoding)
jpayne@69 12996 *
jpayne@69 12997 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@69 12998 * reference=None,
jpayne@69 12999 * start=None,
jpayne@69 13000 */
jpayne@69 13001
jpayne@69 13002 /* function exit code */
jpayne@69 13003 __pyx_L1_error:;
jpayne@69 13004 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 13005 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 13006 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 13007 __Pyx_AddTraceback("pysam.libctabix.TabixFile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13008 __pyx_r = NULL;
jpayne@69 13009 __pyx_L0:;
jpayne@69 13010 __Pyx_XDECREF((PyObject *)__pyx_v_fileobj);
jpayne@69 13011 __Pyx_XDECREF(__pyx_v_s);
jpayne@69 13012 __Pyx_XDECREF((PyObject *)__pyx_v_a);
jpayne@69 13013 __Pyx_XDECREF(__pyx_v_start);
jpayne@69 13014 __Pyx_XDECREF(__pyx_v_region);
jpayne@69 13015 __Pyx_XDECREF(__pyx_v_parser);
jpayne@69 13016 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13017 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13018 __Pyx_RefNannyFinishContext();
jpayne@69 13019 return __pyx_r;
jpayne@69 13020 }
jpayne@69 13021
jpayne@69 13022 /* "pysam/libctabix.pyx":543
jpayne@69 13023 * '''
jpayne@69 13024 *
jpayne@69 13025 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 13026 *
jpayne@69 13027 * cdef char *cfilename = self.filename
jpayne@69 13028 */
jpayne@69 13029
jpayne@69 13030 /* Python wrapper */
jpayne@69 13031 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13032 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_6header_1__get__(PyObject *__pyx_v_self) {
jpayne@69 13033 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13034 PyObject *__pyx_r = 0;
jpayne@69 13035 __Pyx_RefNannyDeclarations
jpayne@69 13036 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 13037 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13038 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_6header___get__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@69 13039
jpayne@69 13040 /* function exit code */
jpayne@69 13041 __Pyx_RefNannyFinishContext();
jpayne@69 13042 return __pyx_r;
jpayne@69 13043 }
jpayne@69 13044
jpayne@69 13045 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_6header___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@69 13046 char *__pyx_v_cfilename;
jpayne@69 13047 char *__pyx_v_cfilename_index;
jpayne@69 13048 kstring_t __pyx_v_buffer;
jpayne@69 13049 htsFile *__pyx_v_fp;
jpayne@69 13050 int __pyx_v_KS_SEP_LINE;
jpayne@69 13051 tbx_t *__pyx_v_tbx;
jpayne@69 13052 PyObject *__pyx_v_lines = NULL;
jpayne@69 13053 PyObject *__pyx_r = NULL;
jpayne@69 13054 __Pyx_TraceDeclarations
jpayne@69 13055 __Pyx_RefNannyDeclarations
jpayne@69 13056 char *__pyx_t_1;
jpayne@69 13057 PyObject *__pyx_t_2 = NULL;
jpayne@69 13058 int __pyx_t_3;
jpayne@69 13059 PyObject *__pyx_t_4 = NULL;
jpayne@69 13060 PyObject *__pyx_t_5 = NULL;
jpayne@69 13061 unsigned int __pyx_t_6;
jpayne@69 13062 int __pyx_t_7;
jpayne@69 13063 struct __pyx_opt_args_5pysam_9libcutils_force_str __pyx_t_8;
jpayne@69 13064 int __pyx_t_9;
jpayne@69 13065 int __pyx_lineno = 0;
jpayne@69 13066 const char *__pyx_filename = NULL;
jpayne@69 13067 int __pyx_clineno = 0;
jpayne@69 13068 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 13069 __Pyx_TraceCall("__get__", __pyx_f[0], 543, 0, __PYX_ERR(0, 543, __pyx_L1_error));
jpayne@69 13070
jpayne@69 13071 /* "pysam/libctabix.pyx":545
jpayne@69 13072 * def __get__(self):
jpayne@69 13073 *
jpayne@69 13074 * cdef char *cfilename = self.filename # <<<<<<<<<<<<<<
jpayne@69 13075 * cdef char *cfilename_index = self.filename_index
jpayne@69 13076 *
jpayne@69 13077 */
jpayne@69 13078 __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_self->__pyx_base.filename); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 545, __pyx_L1_error)
jpayne@69 13079 __pyx_v_cfilename = __pyx_t_1;
jpayne@69 13080
jpayne@69 13081 /* "pysam/libctabix.pyx":546
jpayne@69 13082 *
jpayne@69 13083 * cdef char *cfilename = self.filename
jpayne@69 13084 * cdef char *cfilename_index = self.filename_index # <<<<<<<<<<<<<<
jpayne@69 13085 *
jpayne@69 13086 * cdef kstring_t buffer
jpayne@69 13087 */
jpayne@69 13088 __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_self->filename_index); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 546, __pyx_L1_error)
jpayne@69 13089 __pyx_v_cfilename_index = __pyx_t_1;
jpayne@69 13090
jpayne@69 13091 /* "pysam/libctabix.pyx":549
jpayne@69 13092 *
jpayne@69 13093 * cdef kstring_t buffer
jpayne@69 13094 * buffer.l = buffer.m = 0 # <<<<<<<<<<<<<<
jpayne@69 13095 * buffer.s = NULL
jpayne@69 13096 *
jpayne@69 13097 */
jpayne@69 13098 __pyx_v_buffer.l = 0;
jpayne@69 13099 __pyx_v_buffer.m = 0;
jpayne@69 13100
jpayne@69 13101 /* "pysam/libctabix.pyx":550
jpayne@69 13102 * cdef kstring_t buffer
jpayne@69 13103 * buffer.l = buffer.m = 0
jpayne@69 13104 * buffer.s = NULL # <<<<<<<<<<<<<<
jpayne@69 13105 *
jpayne@69 13106 * cdef htsFile * fp = NULL
jpayne@69 13107 */
jpayne@69 13108 __pyx_v_buffer.s = NULL;
jpayne@69 13109
jpayne@69 13110 /* "pysam/libctabix.pyx":552
jpayne@69 13111 * buffer.s = NULL
jpayne@69 13112 *
jpayne@69 13113 * cdef htsFile * fp = NULL # <<<<<<<<<<<<<<
jpayne@69 13114 * cdef int KS_SEP_LINE = 2
jpayne@69 13115 * cdef tbx_t * tbx = NULL
jpayne@69 13116 */
jpayne@69 13117 __pyx_v_fp = NULL;
jpayne@69 13118
jpayne@69 13119 /* "pysam/libctabix.pyx":553
jpayne@69 13120 *
jpayne@69 13121 * cdef htsFile * fp = NULL
jpayne@69 13122 * cdef int KS_SEP_LINE = 2 # <<<<<<<<<<<<<<
jpayne@69 13123 * cdef tbx_t * tbx = NULL
jpayne@69 13124 * lines = []
jpayne@69 13125 */
jpayne@69 13126 __pyx_v_KS_SEP_LINE = 2;
jpayne@69 13127
jpayne@69 13128 /* "pysam/libctabix.pyx":554
jpayne@69 13129 * cdef htsFile * fp = NULL
jpayne@69 13130 * cdef int KS_SEP_LINE = 2
jpayne@69 13131 * cdef tbx_t * tbx = NULL # <<<<<<<<<<<<<<
jpayne@69 13132 * lines = []
jpayne@69 13133 * with nogil:
jpayne@69 13134 */
jpayne@69 13135 __pyx_v_tbx = NULL;
jpayne@69 13136
jpayne@69 13137 /* "pysam/libctabix.pyx":555
jpayne@69 13138 * cdef int KS_SEP_LINE = 2
jpayne@69 13139 * cdef tbx_t * tbx = NULL
jpayne@69 13140 * lines = [] # <<<<<<<<<<<<<<
jpayne@69 13141 * with nogil:
jpayne@69 13142 * fp = hts_open(cfilename, 'r')
jpayne@69 13143 */
jpayne@69 13144 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error)
jpayne@69 13145 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 13146 __pyx_v_lines = ((PyObject*)__pyx_t_2);
jpayne@69 13147 __pyx_t_2 = 0;
jpayne@69 13148
jpayne@69 13149 /* "pysam/libctabix.pyx":556
jpayne@69 13150 * cdef tbx_t * tbx = NULL
jpayne@69 13151 * lines = []
jpayne@69 13152 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 13153 * fp = hts_open(cfilename, 'r')
jpayne@69 13154 *
jpayne@69 13155 */
jpayne@69 13156 {
jpayne@69 13157 #ifdef WITH_THREAD
jpayne@69 13158 PyThreadState *_save;
jpayne@69 13159 _save = NULL;
jpayne@69 13160 Py_UNBLOCK_THREADS
jpayne@69 13161 __Pyx_FastGIL_Remember();
jpayne@69 13162 #endif
jpayne@69 13163 /*try:*/ {
jpayne@69 13164
jpayne@69 13165 /* "pysam/libctabix.pyx":557
jpayne@69 13166 * lines = []
jpayne@69 13167 * with nogil:
jpayne@69 13168 * fp = hts_open(cfilename, 'r') # <<<<<<<<<<<<<<
jpayne@69 13169 *
jpayne@69 13170 * if fp == NULL:
jpayne@69 13171 */
jpayne@69 13172 __pyx_v_fp = hts_open(__pyx_v_cfilename, ((char const *)"r"));
jpayne@69 13173 }
jpayne@69 13174
jpayne@69 13175 /* "pysam/libctabix.pyx":556
jpayne@69 13176 * cdef tbx_t * tbx = NULL
jpayne@69 13177 * lines = []
jpayne@69 13178 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 13179 * fp = hts_open(cfilename, 'r')
jpayne@69 13180 *
jpayne@69 13181 */
jpayne@69 13182 /*finally:*/ {
jpayne@69 13183 /*normal exit:*/{
jpayne@69 13184 #ifdef WITH_THREAD
jpayne@69 13185 __Pyx_FastGIL_Forget();
jpayne@69 13186 Py_BLOCK_THREADS
jpayne@69 13187 #endif
jpayne@69 13188 goto __pyx_L5;
jpayne@69 13189 }
jpayne@69 13190 __pyx_L5:;
jpayne@69 13191 }
jpayne@69 13192 }
jpayne@69 13193
jpayne@69 13194 /* "pysam/libctabix.pyx":559
jpayne@69 13195 * fp = hts_open(cfilename, 'r')
jpayne@69 13196 *
jpayne@69 13197 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@69 13198 * raise OSError("could not open {} for reading header".format(self.filename))
jpayne@69 13199 *
jpayne@69 13200 */
jpayne@69 13201 __pyx_t_3 = (__pyx_v_fp == NULL);
jpayne@69 13202 if (unlikely(__pyx_t_3)) {
jpayne@69 13203
jpayne@69 13204 /* "pysam/libctabix.pyx":560
jpayne@69 13205 *
jpayne@69 13206 * if fp == NULL:
jpayne@69 13207 * raise OSError("could not open {} for reading header".format(self.filename)) # <<<<<<<<<<<<<<
jpayne@69 13208 *
jpayne@69 13209 * with nogil:
jpayne@69 13210 */
jpayne@69 13211 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_could_not_open_for_reading_heade, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error)
jpayne@69 13212 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 13213 __pyx_t_5 = NULL;
jpayne@69 13214 __pyx_t_6 = 0;
jpayne@69 13215 #if CYTHON_UNPACK_METHODS
jpayne@69 13216 if (likely(PyMethod_Check(__pyx_t_4))) {
jpayne@69 13217 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
jpayne@69 13218 if (likely(__pyx_t_5)) {
jpayne@69 13219 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
jpayne@69 13220 __Pyx_INCREF(__pyx_t_5);
jpayne@69 13221 __Pyx_INCREF(function);
jpayne@69 13222 __Pyx_DECREF_SET(__pyx_t_4, function);
jpayne@69 13223 __pyx_t_6 = 1;
jpayne@69 13224 }
jpayne@69 13225 }
jpayne@69 13226 #endif
jpayne@69 13227 {
jpayne@69 13228 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self->__pyx_base.filename};
jpayne@69 13229 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
jpayne@69 13230 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 13231 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
jpayne@69 13232 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 13233 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 13234 }
jpayne@69 13235 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_OSError, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error)
jpayne@69 13236 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 13237 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 13238 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
jpayne@69 13239 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 13240 __PYX_ERR(0, 560, __pyx_L1_error)
jpayne@69 13241
jpayne@69 13242 /* "pysam/libctabix.pyx":559
jpayne@69 13243 * fp = hts_open(cfilename, 'r')
jpayne@69 13244 *
jpayne@69 13245 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@69 13246 * raise OSError("could not open {} for reading header".format(self.filename))
jpayne@69 13247 *
jpayne@69 13248 */
jpayne@69 13249 }
jpayne@69 13250
jpayne@69 13251 /* "pysam/libctabix.pyx":562
jpayne@69 13252 * raise OSError("could not open {} for reading header".format(self.filename))
jpayne@69 13253 *
jpayne@69 13254 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 13255 * tbx = tbx_index_load2(cfilename, cfilename_index)
jpayne@69 13256 *
jpayne@69 13257 */
jpayne@69 13258 {
jpayne@69 13259 #ifdef WITH_THREAD
jpayne@69 13260 PyThreadState *_save;
jpayne@69 13261 _save = NULL;
jpayne@69 13262 Py_UNBLOCK_THREADS
jpayne@69 13263 __Pyx_FastGIL_Remember();
jpayne@69 13264 #endif
jpayne@69 13265 /*try:*/ {
jpayne@69 13266
jpayne@69 13267 /* "pysam/libctabix.pyx":563
jpayne@69 13268 *
jpayne@69 13269 * with nogil:
jpayne@69 13270 * tbx = tbx_index_load2(cfilename, cfilename_index) # <<<<<<<<<<<<<<
jpayne@69 13271 *
jpayne@69 13272 * if tbx == NULL:
jpayne@69 13273 */
jpayne@69 13274 __pyx_v_tbx = tbx_index_load2(__pyx_v_cfilename, __pyx_v_cfilename_index);
jpayne@69 13275 }
jpayne@69 13276
jpayne@69 13277 /* "pysam/libctabix.pyx":562
jpayne@69 13278 * raise OSError("could not open {} for reading header".format(self.filename))
jpayne@69 13279 *
jpayne@69 13280 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 13281 * tbx = tbx_index_load2(cfilename, cfilename_index)
jpayne@69 13282 *
jpayne@69 13283 */
jpayne@69 13284 /*finally:*/ {
jpayne@69 13285 /*normal exit:*/{
jpayne@69 13286 #ifdef WITH_THREAD
jpayne@69 13287 __Pyx_FastGIL_Forget();
jpayne@69 13288 Py_BLOCK_THREADS
jpayne@69 13289 #endif
jpayne@69 13290 goto __pyx_L9;
jpayne@69 13291 }
jpayne@69 13292 __pyx_L9:;
jpayne@69 13293 }
jpayne@69 13294 }
jpayne@69 13295
jpayne@69 13296 /* "pysam/libctabix.pyx":565
jpayne@69 13297 * tbx = tbx_index_load2(cfilename, cfilename_index)
jpayne@69 13298 *
jpayne@69 13299 * if tbx == NULL: # <<<<<<<<<<<<<<
jpayne@69 13300 * raise OSError("could not load .tbi/.csi index of {}".format(self.filename))
jpayne@69 13301 *
jpayne@69 13302 */
jpayne@69 13303 __pyx_t_3 = (__pyx_v_tbx == NULL);
jpayne@69 13304 if (unlikely(__pyx_t_3)) {
jpayne@69 13305
jpayne@69 13306 /* "pysam/libctabix.pyx":566
jpayne@69 13307 *
jpayne@69 13308 * if tbx == NULL:
jpayne@69 13309 * raise OSError("could not load .tbi/.csi index of {}".format(self.filename)) # <<<<<<<<<<<<<<
jpayne@69 13310 *
jpayne@69 13311 * while hts_getline(fp, KS_SEP_LINE, &buffer) >= 0:
jpayne@69 13312 */
jpayne@69 13313 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_could_not_load_tbi_csi_index_of, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error)
jpayne@69 13314 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 13315 __pyx_t_5 = NULL;
jpayne@69 13316 __pyx_t_6 = 0;
jpayne@69 13317 #if CYTHON_UNPACK_METHODS
jpayne@69 13318 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 13319 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 13320 if (likely(__pyx_t_5)) {
jpayne@69 13321 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 13322 __Pyx_INCREF(__pyx_t_5);
jpayne@69 13323 __Pyx_INCREF(function);
jpayne@69 13324 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 13325 __pyx_t_6 = 1;
jpayne@69 13326 }
jpayne@69 13327 }
jpayne@69 13328 #endif
jpayne@69 13329 {
jpayne@69 13330 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self->__pyx_base.filename};
jpayne@69 13331 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
jpayne@69 13332 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 13333 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error)
jpayne@69 13334 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 13335 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 13336 }
jpayne@69 13337 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_OSError, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error)
jpayne@69 13338 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 13339 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 13340 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 13341 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 13342 __PYX_ERR(0, 566, __pyx_L1_error)
jpayne@69 13343
jpayne@69 13344 /* "pysam/libctabix.pyx":565
jpayne@69 13345 * tbx = tbx_index_load2(cfilename, cfilename_index)
jpayne@69 13346 *
jpayne@69 13347 * if tbx == NULL: # <<<<<<<<<<<<<<
jpayne@69 13348 * raise OSError("could not load .tbi/.csi index of {}".format(self.filename))
jpayne@69 13349 *
jpayne@69 13350 */
jpayne@69 13351 }
jpayne@69 13352
jpayne@69 13353 /* "pysam/libctabix.pyx":568
jpayne@69 13354 * raise OSError("could not load .tbi/.csi index of {}".format(self.filename))
jpayne@69 13355 *
jpayne@69 13356 * while hts_getline(fp, KS_SEP_LINE, &buffer) >= 0: # <<<<<<<<<<<<<<
jpayne@69 13357 * if not buffer.l or buffer.s[0] != tbx.conf.meta_char:
jpayne@69 13358 * break
jpayne@69 13359 */
jpayne@69 13360 while (1) {
jpayne@69 13361 __pyx_t_3 = (hts_getline(__pyx_v_fp, __pyx_v_KS_SEP_LINE, (&__pyx_v_buffer)) >= 0);
jpayne@69 13362 if (!__pyx_t_3) break;
jpayne@69 13363
jpayne@69 13364 /* "pysam/libctabix.pyx":569
jpayne@69 13365 *
jpayne@69 13366 * while hts_getline(fp, KS_SEP_LINE, &buffer) >= 0:
jpayne@69 13367 * if not buffer.l or buffer.s[0] != tbx.conf.meta_char: # <<<<<<<<<<<<<<
jpayne@69 13368 * break
jpayne@69 13369 * lines.append(force_str(buffer.s, self.encoding))
jpayne@69 13370 */
jpayne@69 13371 __pyx_t_7 = (!(__pyx_v_buffer.l != 0));
jpayne@69 13372 if (!__pyx_t_7) {
jpayne@69 13373 } else {
jpayne@69 13374 __pyx_t_3 = __pyx_t_7;
jpayne@69 13375 goto __pyx_L14_bool_binop_done;
jpayne@69 13376 }
jpayne@69 13377 __pyx_t_7 = ((__pyx_v_buffer.s[0]) != __pyx_v_tbx->conf.meta_char);
jpayne@69 13378 __pyx_t_3 = __pyx_t_7;
jpayne@69 13379 __pyx_L14_bool_binop_done:;
jpayne@69 13380 if (__pyx_t_3) {
jpayne@69 13381
jpayne@69 13382 /* "pysam/libctabix.pyx":570
jpayne@69 13383 * while hts_getline(fp, KS_SEP_LINE, &buffer) >= 0:
jpayne@69 13384 * if not buffer.l or buffer.s[0] != tbx.conf.meta_char:
jpayne@69 13385 * break # <<<<<<<<<<<<<<
jpayne@69 13386 * lines.append(force_str(buffer.s, self.encoding))
jpayne@69 13387 *
jpayne@69 13388 */
jpayne@69 13389 goto __pyx_L12_break;
jpayne@69 13390
jpayne@69 13391 /* "pysam/libctabix.pyx":569
jpayne@69 13392 *
jpayne@69 13393 * while hts_getline(fp, KS_SEP_LINE, &buffer) >= 0:
jpayne@69 13394 * if not buffer.l or buffer.s[0] != tbx.conf.meta_char: # <<<<<<<<<<<<<<
jpayne@69 13395 * break
jpayne@69 13396 * lines.append(force_str(buffer.s, self.encoding))
jpayne@69 13397 */
jpayne@69 13398 }
jpayne@69 13399
jpayne@69 13400 /* "pysam/libctabix.pyx":571
jpayne@69 13401 * if not buffer.l or buffer.s[0] != tbx.conf.meta_char:
jpayne@69 13402 * break
jpayne@69 13403 * lines.append(force_str(buffer.s, self.encoding)) # <<<<<<<<<<<<<<
jpayne@69 13404 *
jpayne@69 13405 * with nogil:
jpayne@69 13406 */
jpayne@69 13407 __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_buffer.s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
jpayne@69 13408 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 13409 __pyx_t_4 = __pyx_v_self->encoding;
jpayne@69 13410 __Pyx_INCREF(__pyx_t_4);
jpayne@69 13411 __pyx_t_8.__pyx_n = 1;
jpayne@69 13412 __pyx_t_8.encoding = __pyx_t_4;
jpayne@69 13413 __pyx_t_5 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_2, &__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error)
jpayne@69 13414 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 13415 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 13416 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 13417 __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_lines, __pyx_t_5); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 571, __pyx_L1_error)
jpayne@69 13418 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 13419 }
jpayne@69 13420 __pyx_L12_break:;
jpayne@69 13421
jpayne@69 13422 /* "pysam/libctabix.pyx":573
jpayne@69 13423 * lines.append(force_str(buffer.s, self.encoding))
jpayne@69 13424 *
jpayne@69 13425 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 13426 * hts_close(fp)
jpayne@69 13427 * free(buffer.s)
jpayne@69 13428 */
jpayne@69 13429 {
jpayne@69 13430 #ifdef WITH_THREAD
jpayne@69 13431 PyThreadState *_save;
jpayne@69 13432 _save = NULL;
jpayne@69 13433 Py_UNBLOCK_THREADS
jpayne@69 13434 __Pyx_FastGIL_Remember();
jpayne@69 13435 #endif
jpayne@69 13436 /*try:*/ {
jpayne@69 13437
jpayne@69 13438 /* "pysam/libctabix.pyx":574
jpayne@69 13439 *
jpayne@69 13440 * with nogil:
jpayne@69 13441 * hts_close(fp) # <<<<<<<<<<<<<<
jpayne@69 13442 * free(buffer.s)
jpayne@69 13443 *
jpayne@69 13444 */
jpayne@69 13445 (void)(hts_close(__pyx_v_fp));
jpayne@69 13446
jpayne@69 13447 /* "pysam/libctabix.pyx":575
jpayne@69 13448 * with nogil:
jpayne@69 13449 * hts_close(fp)
jpayne@69 13450 * free(buffer.s) # <<<<<<<<<<<<<<
jpayne@69 13451 *
jpayne@69 13452 * return lines
jpayne@69 13453 */
jpayne@69 13454 free(__pyx_v_buffer.s);
jpayne@69 13455 }
jpayne@69 13456
jpayne@69 13457 /* "pysam/libctabix.pyx":573
jpayne@69 13458 * lines.append(force_str(buffer.s, self.encoding))
jpayne@69 13459 *
jpayne@69 13460 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 13461 * hts_close(fp)
jpayne@69 13462 * free(buffer.s)
jpayne@69 13463 */
jpayne@69 13464 /*finally:*/ {
jpayne@69 13465 /*normal exit:*/{
jpayne@69 13466 #ifdef WITH_THREAD
jpayne@69 13467 __Pyx_FastGIL_Forget();
jpayne@69 13468 Py_BLOCK_THREADS
jpayne@69 13469 #endif
jpayne@69 13470 goto __pyx_L18;
jpayne@69 13471 }
jpayne@69 13472 __pyx_L18:;
jpayne@69 13473 }
jpayne@69 13474 }
jpayne@69 13475
jpayne@69 13476 /* "pysam/libctabix.pyx":577
jpayne@69 13477 * free(buffer.s)
jpayne@69 13478 *
jpayne@69 13479 * return lines # <<<<<<<<<<<<<<
jpayne@69 13480 *
jpayne@69 13481 * property contigs:
jpayne@69 13482 */
jpayne@69 13483 __Pyx_XDECREF(__pyx_r);
jpayne@69 13484 __Pyx_INCREF(__pyx_v_lines);
jpayne@69 13485 __pyx_r = __pyx_v_lines;
jpayne@69 13486 goto __pyx_L0;
jpayne@69 13487
jpayne@69 13488 /* "pysam/libctabix.pyx":543
jpayne@69 13489 * '''
jpayne@69 13490 *
jpayne@69 13491 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 13492 *
jpayne@69 13493 * cdef char *cfilename = self.filename
jpayne@69 13494 */
jpayne@69 13495
jpayne@69 13496 /* function exit code */
jpayne@69 13497 __pyx_L1_error:;
jpayne@69 13498 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 13499 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 13500 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 13501 __Pyx_AddTraceback("pysam.libctabix.TabixFile.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13502 __pyx_r = NULL;
jpayne@69 13503 __pyx_L0:;
jpayne@69 13504 __Pyx_XDECREF(__pyx_v_lines);
jpayne@69 13505 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13506 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13507 __Pyx_RefNannyFinishContext();
jpayne@69 13508 return __pyx_r;
jpayne@69 13509 }
jpayne@69 13510
jpayne@69 13511 /* "pysam/libctabix.pyx":581
jpayne@69 13512 * property contigs:
jpayne@69 13513 * '''list of chromosome names'''
jpayne@69 13514 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 13515 * cdef const char ** sequences
jpayne@69 13516 * cdef int nsequences
jpayne@69 13517 */
jpayne@69 13518
jpayne@69 13519 /* Python wrapper */
jpayne@69 13520 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_7contigs_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13521 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_7contigs_1__get__(PyObject *__pyx_v_self) {
jpayne@69 13522 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13523 PyObject *__pyx_r = 0;
jpayne@69 13524 __Pyx_RefNannyDeclarations
jpayne@69 13525 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 13526 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13527 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_7contigs___get__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@69 13528
jpayne@69 13529 /* function exit code */
jpayne@69 13530 __Pyx_RefNannyFinishContext();
jpayne@69 13531 return __pyx_r;
jpayne@69 13532 }
jpayne@69 13533
jpayne@69 13534 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_7contigs___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@69 13535 char const **__pyx_v_sequences;
jpayne@69 13536 int __pyx_v_nsequences;
jpayne@69 13537 int __pyx_v_x;
jpayne@69 13538 PyObject *__pyx_v_result = NULL;
jpayne@69 13539 PyObject *__pyx_r = NULL;
jpayne@69 13540 __Pyx_TraceDeclarations
jpayne@69 13541 __Pyx_RefNannyDeclarations
jpayne@69 13542 PyObject *__pyx_t_1 = NULL;
jpayne@69 13543 int __pyx_t_2;
jpayne@69 13544 PyObject *__pyx_t_3 = NULL;
jpayne@69 13545 int __pyx_t_4;
jpayne@69 13546 int __pyx_lineno = 0;
jpayne@69 13547 const char *__pyx_filename = NULL;
jpayne@69 13548 int __pyx_clineno = 0;
jpayne@69 13549 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 13550 __Pyx_TraceCall("__get__", __pyx_f[0], 581, 0, __PYX_ERR(0, 581, __pyx_L1_error));
jpayne@69 13551
jpayne@69 13552 /* "pysam/libctabix.pyx":585
jpayne@69 13553 * cdef int nsequences
jpayne@69 13554 *
jpayne@69 13555 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 13556 * sequences = tbx_seqnames(self.index, &nsequences)
jpayne@69 13557 * cdef int x
jpayne@69 13558 */
jpayne@69 13559 {
jpayne@69 13560 #ifdef WITH_THREAD
jpayne@69 13561 PyThreadState *_save;
jpayne@69 13562 _save = NULL;
jpayne@69 13563 Py_UNBLOCK_THREADS
jpayne@69 13564 __Pyx_FastGIL_Remember();
jpayne@69 13565 #endif
jpayne@69 13566 /*try:*/ {
jpayne@69 13567
jpayne@69 13568 /* "pysam/libctabix.pyx":586
jpayne@69 13569 *
jpayne@69 13570 * with nogil:
jpayne@69 13571 * sequences = tbx_seqnames(self.index, &nsequences) # <<<<<<<<<<<<<<
jpayne@69 13572 * cdef int x
jpayne@69 13573 * result = []
jpayne@69 13574 */
jpayne@69 13575 __pyx_v_sequences = tbx_seqnames(__pyx_v_self->index, (&__pyx_v_nsequences));
jpayne@69 13576 }
jpayne@69 13577
jpayne@69 13578 /* "pysam/libctabix.pyx":585
jpayne@69 13579 * cdef int nsequences
jpayne@69 13580 *
jpayne@69 13581 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 13582 * sequences = tbx_seqnames(self.index, &nsequences)
jpayne@69 13583 * cdef int x
jpayne@69 13584 */
jpayne@69 13585 /*finally:*/ {
jpayne@69 13586 /*normal exit:*/{
jpayne@69 13587 #ifdef WITH_THREAD
jpayne@69 13588 __Pyx_FastGIL_Forget();
jpayne@69 13589 Py_BLOCK_THREADS
jpayne@69 13590 #endif
jpayne@69 13591 goto __pyx_L5;
jpayne@69 13592 }
jpayne@69 13593 __pyx_L5:;
jpayne@69 13594 }
jpayne@69 13595 }
jpayne@69 13596
jpayne@69 13597 /* "pysam/libctabix.pyx":588
jpayne@69 13598 * sequences = tbx_seqnames(self.index, &nsequences)
jpayne@69 13599 * cdef int x
jpayne@69 13600 * result = [] # <<<<<<<<<<<<<<
jpayne@69 13601 * for x from 0 <= x < nsequences:
jpayne@69 13602 * result.append(force_str(sequences[x]))
jpayne@69 13603 */
jpayne@69 13604 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
jpayne@69 13605 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 13606 __pyx_v_result = ((PyObject*)__pyx_t_1);
jpayne@69 13607 __pyx_t_1 = 0;
jpayne@69 13608
jpayne@69 13609 /* "pysam/libctabix.pyx":589
jpayne@69 13610 * cdef int x
jpayne@69 13611 * result = []
jpayne@69 13612 * for x from 0 <= x < nsequences: # <<<<<<<<<<<<<<
jpayne@69 13613 * result.append(force_str(sequences[x]))
jpayne@69 13614 *
jpayne@69 13615 */
jpayne@69 13616 __pyx_t_2 = __pyx_v_nsequences;
jpayne@69 13617 for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
jpayne@69 13618
jpayne@69 13619 /* "pysam/libctabix.pyx":590
jpayne@69 13620 * result = []
jpayne@69 13621 * for x from 0 <= x < nsequences:
jpayne@69 13622 * result.append(force_str(sequences[x])) # <<<<<<<<<<<<<<
jpayne@69 13623 *
jpayne@69 13624 * # htslib instructions:
jpayne@69 13625 */
jpayne@69 13626 __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_sequences[__pyx_v_x])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
jpayne@69 13627 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 13628 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 590, __pyx_L1_error)
jpayne@69 13629 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 13630 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 13631 __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 590, __pyx_L1_error)
jpayne@69 13632 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 13633 }
jpayne@69 13634
jpayne@69 13635 /* "pysam/libctabix.pyx":594
jpayne@69 13636 * # htslib instructions:
jpayne@69 13637 * # only free container, not the sequences themselves
jpayne@69 13638 * free(sequences) # <<<<<<<<<<<<<<
jpayne@69 13639 *
jpayne@69 13640 * return result
jpayne@69 13641 */
jpayne@69 13642 free(__pyx_v_sequences);
jpayne@69 13643
jpayne@69 13644 /* "pysam/libctabix.pyx":596
jpayne@69 13645 * free(sequences)
jpayne@69 13646 *
jpayne@69 13647 * return result # <<<<<<<<<<<<<<
jpayne@69 13648 *
jpayne@69 13649 * def close(self):
jpayne@69 13650 */
jpayne@69 13651 __Pyx_XDECREF(__pyx_r);
jpayne@69 13652 __Pyx_INCREF(__pyx_v_result);
jpayne@69 13653 __pyx_r = __pyx_v_result;
jpayne@69 13654 goto __pyx_L0;
jpayne@69 13655
jpayne@69 13656 /* "pysam/libctabix.pyx":581
jpayne@69 13657 * property contigs:
jpayne@69 13658 * '''list of chromosome names'''
jpayne@69 13659 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 13660 * cdef const char ** sequences
jpayne@69 13661 * cdef int nsequences
jpayne@69 13662 */
jpayne@69 13663
jpayne@69 13664 /* function exit code */
jpayne@69 13665 __pyx_L1_error:;
jpayne@69 13666 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 13667 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 13668 __Pyx_AddTraceback("pysam.libctabix.TabixFile.contigs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13669 __pyx_r = NULL;
jpayne@69 13670 __pyx_L0:;
jpayne@69 13671 __Pyx_XDECREF(__pyx_v_result);
jpayne@69 13672 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13673 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13674 __Pyx_RefNannyFinishContext();
jpayne@69 13675 return __pyx_r;
jpayne@69 13676 }
jpayne@69 13677
jpayne@69 13678 /* "pysam/libctabix.pyx":598
jpayne@69 13679 * return result
jpayne@69 13680 *
jpayne@69 13681 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 13682 * '''
jpayne@69 13683 * closes the :class:`pysam.TabixFile`.'''
jpayne@69 13684 */
jpayne@69 13685
jpayne@69 13686 /* Python wrapper */
jpayne@69 13687 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_9close(PyObject *__pyx_v_self,
jpayne@69 13688 #if CYTHON_METH_FASTCALL
jpayne@69 13689 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 13690 #else
jpayne@69 13691 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 13692 #endif
jpayne@69 13693 ); /*proto*/
jpayne@69 13694 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9TabixFile_8close, "TabixFile.close(self)\n\n closes the :class:`pysam.TabixFile`.");
jpayne@69 13695 static PyMethodDef __pyx_mdef_5pysam_9libctabix_9TabixFile_9close = {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_9close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_8close};
jpayne@69 13696 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_9close(PyObject *__pyx_v_self,
jpayne@69 13697 #if CYTHON_METH_FASTCALL
jpayne@69 13698 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 13699 #else
jpayne@69 13700 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 13701 #endif
jpayne@69 13702 ) {
jpayne@69 13703 #if !CYTHON_METH_FASTCALL
jpayne@69 13704 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 13705 #endif
jpayne@69 13706 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13707 PyObject *__pyx_r = 0;
jpayne@69 13708 __Pyx_RefNannyDeclarations
jpayne@69 13709 __Pyx_RefNannySetupContext("close (wrapper)", 0);
jpayne@69 13710 #if !CYTHON_METH_FASTCALL
jpayne@69 13711 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 13712 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 13713 #else
jpayne@69 13714 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 13715 #endif
jpayne@69 13716 #endif
jpayne@69 13717 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 13718 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 13719 __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 13720 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "close", 0))) return NULL;
jpayne@69 13721 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_8close(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@69 13722
jpayne@69 13723 /* function exit code */
jpayne@69 13724 __Pyx_RefNannyFinishContext();
jpayne@69 13725 return __pyx_r;
jpayne@69 13726 }
jpayne@69 13727
jpayne@69 13728 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_8close(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@69 13729 PyObject *__pyx_r = NULL;
jpayne@69 13730 __Pyx_TraceDeclarations
jpayne@69 13731 __Pyx_RefNannyDeclarations
jpayne@69 13732 int __pyx_t_1;
jpayne@69 13733 int __pyx_lineno = 0;
jpayne@69 13734 const char *__pyx_filename = NULL;
jpayne@69 13735 int __pyx_clineno = 0;
jpayne@69 13736 __Pyx_TraceFrameInit(__pyx_codeobj__21)
jpayne@69 13737 __Pyx_RefNannySetupContext("close", 1);
jpayne@69 13738 __Pyx_TraceCall("close", __pyx_f[0], 598, 0, __PYX_ERR(0, 598, __pyx_L1_error));
jpayne@69 13739
jpayne@69 13740 /* "pysam/libctabix.pyx":601
jpayne@69 13741 * '''
jpayne@69 13742 * closes the :class:`pysam.TabixFile`.'''
jpayne@69 13743 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 13744 * hts_close(self.htsfile)
jpayne@69 13745 * self.htsfile = NULL
jpayne@69 13746 */
jpayne@69 13747 __pyx_t_1 = (__pyx_v_self->__pyx_base.htsfile != NULL);
jpayne@69 13748 if (__pyx_t_1) {
jpayne@69 13749
jpayne@69 13750 /* "pysam/libctabix.pyx":602
jpayne@69 13751 * closes the :class:`pysam.TabixFile`.'''
jpayne@69 13752 * if self.htsfile != NULL:
jpayne@69 13753 * hts_close(self.htsfile) # <<<<<<<<<<<<<<
jpayne@69 13754 * self.htsfile = NULL
jpayne@69 13755 * if self.index != NULL:
jpayne@69 13756 */
jpayne@69 13757 (void)(hts_close(__pyx_v_self->__pyx_base.htsfile));
jpayne@69 13758
jpayne@69 13759 /* "pysam/libctabix.pyx":603
jpayne@69 13760 * if self.htsfile != NULL:
jpayne@69 13761 * hts_close(self.htsfile)
jpayne@69 13762 * self.htsfile = NULL # <<<<<<<<<<<<<<
jpayne@69 13763 * if self.index != NULL:
jpayne@69 13764 * tbx_destroy(self.index)
jpayne@69 13765 */
jpayne@69 13766 __pyx_v_self->__pyx_base.htsfile = NULL;
jpayne@69 13767
jpayne@69 13768 /* "pysam/libctabix.pyx":601
jpayne@69 13769 * '''
jpayne@69 13770 * closes the :class:`pysam.TabixFile`.'''
jpayne@69 13771 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 13772 * hts_close(self.htsfile)
jpayne@69 13773 * self.htsfile = NULL
jpayne@69 13774 */
jpayne@69 13775 }
jpayne@69 13776
jpayne@69 13777 /* "pysam/libctabix.pyx":604
jpayne@69 13778 * hts_close(self.htsfile)
jpayne@69 13779 * self.htsfile = NULL
jpayne@69 13780 * if self.index != NULL: # <<<<<<<<<<<<<<
jpayne@69 13781 * tbx_destroy(self.index)
jpayne@69 13782 * self.index = NULL
jpayne@69 13783 */
jpayne@69 13784 __pyx_t_1 = (__pyx_v_self->index != NULL);
jpayne@69 13785 if (__pyx_t_1) {
jpayne@69 13786
jpayne@69 13787 /* "pysam/libctabix.pyx":605
jpayne@69 13788 * self.htsfile = NULL
jpayne@69 13789 * if self.index != NULL:
jpayne@69 13790 * tbx_destroy(self.index) # <<<<<<<<<<<<<<
jpayne@69 13791 * self.index = NULL
jpayne@69 13792 *
jpayne@69 13793 */
jpayne@69 13794 tbx_destroy(__pyx_v_self->index);
jpayne@69 13795
jpayne@69 13796 /* "pysam/libctabix.pyx":606
jpayne@69 13797 * if self.index != NULL:
jpayne@69 13798 * tbx_destroy(self.index)
jpayne@69 13799 * self.index = NULL # <<<<<<<<<<<<<<
jpayne@69 13800 *
jpayne@69 13801 * def __dealloc__( self ):
jpayne@69 13802 */
jpayne@69 13803 __pyx_v_self->index = NULL;
jpayne@69 13804
jpayne@69 13805 /* "pysam/libctabix.pyx":604
jpayne@69 13806 * hts_close(self.htsfile)
jpayne@69 13807 * self.htsfile = NULL
jpayne@69 13808 * if self.index != NULL: # <<<<<<<<<<<<<<
jpayne@69 13809 * tbx_destroy(self.index)
jpayne@69 13810 * self.index = NULL
jpayne@69 13811 */
jpayne@69 13812 }
jpayne@69 13813
jpayne@69 13814 /* "pysam/libctabix.pyx":598
jpayne@69 13815 * return result
jpayne@69 13816 *
jpayne@69 13817 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 13818 * '''
jpayne@69 13819 * closes the :class:`pysam.TabixFile`.'''
jpayne@69 13820 */
jpayne@69 13821
jpayne@69 13822 /* function exit code */
jpayne@69 13823 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 13824 goto __pyx_L0;
jpayne@69 13825 __pyx_L1_error:;
jpayne@69 13826 __Pyx_AddTraceback("pysam.libctabix.TabixFile.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13827 __pyx_r = NULL;
jpayne@69 13828 __pyx_L0:;
jpayne@69 13829 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13830 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13831 __Pyx_RefNannyFinishContext();
jpayne@69 13832 return __pyx_r;
jpayne@69 13833 }
jpayne@69 13834
jpayne@69 13835 /* "pysam/libctabix.pyx":608
jpayne@69 13836 * self.index = NULL
jpayne@69 13837 *
jpayne@69 13838 * def __dealloc__( self ): # <<<<<<<<<<<<<<
jpayne@69 13839 * # remember: dealloc cannot call other python methods
jpayne@69 13840 * # note: no doc string
jpayne@69 13841 */
jpayne@69 13842
jpayne@69 13843 /* Python wrapper */
jpayne@69 13844 static void __pyx_pw_5pysam_9libctabix_9TabixFile_11__dealloc__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13845 static void __pyx_pw_5pysam_9libctabix_9TabixFile_11__dealloc__(PyObject *__pyx_v_self) {
jpayne@69 13846 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13847 __Pyx_RefNannyDeclarations
jpayne@69 13848 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
jpayne@69 13849 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13850 __pyx_pf_5pysam_9libctabix_9TabixFile_10__dealloc__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@69 13851
jpayne@69 13852 /* function exit code */
jpayne@69 13853 __Pyx_RefNannyFinishContext();
jpayne@69 13854 }
jpayne@69 13855
jpayne@69 13856 static void __pyx_pf_5pysam_9libctabix_9TabixFile_10__dealloc__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@69 13857 __Pyx_TraceDeclarations
jpayne@69 13858 int __pyx_t_1;
jpayne@69 13859 int __pyx_lineno = 0;
jpayne@69 13860 const char *__pyx_filename = NULL;
jpayne@69 13861 int __pyx_clineno = 0;
jpayne@69 13862 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error));
jpayne@69 13863
jpayne@69 13864 /* "pysam/libctabix.pyx":612
jpayne@69 13865 * # note: no doc string
jpayne@69 13866 * # note: __del__ is not called.
jpayne@69 13867 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 13868 * hts_close(self.htsfile)
jpayne@69 13869 * self.htsfile = NULL
jpayne@69 13870 */
jpayne@69 13871 __pyx_t_1 = (__pyx_v_self->__pyx_base.htsfile != NULL);
jpayne@69 13872 if (__pyx_t_1) {
jpayne@69 13873
jpayne@69 13874 /* "pysam/libctabix.pyx":613
jpayne@69 13875 * # note: __del__ is not called.
jpayne@69 13876 * if self.htsfile != NULL:
jpayne@69 13877 * hts_close(self.htsfile) # <<<<<<<<<<<<<<
jpayne@69 13878 * self.htsfile = NULL
jpayne@69 13879 * if self.index != NULL:
jpayne@69 13880 */
jpayne@69 13881 (void)(hts_close(__pyx_v_self->__pyx_base.htsfile));
jpayne@69 13882
jpayne@69 13883 /* "pysam/libctabix.pyx":614
jpayne@69 13884 * if self.htsfile != NULL:
jpayne@69 13885 * hts_close(self.htsfile)
jpayne@69 13886 * self.htsfile = NULL # <<<<<<<<<<<<<<
jpayne@69 13887 * if self.index != NULL:
jpayne@69 13888 * tbx_destroy(self.index)
jpayne@69 13889 */
jpayne@69 13890 __pyx_v_self->__pyx_base.htsfile = NULL;
jpayne@69 13891
jpayne@69 13892 /* "pysam/libctabix.pyx":612
jpayne@69 13893 * # note: no doc string
jpayne@69 13894 * # note: __del__ is not called.
jpayne@69 13895 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 13896 * hts_close(self.htsfile)
jpayne@69 13897 * self.htsfile = NULL
jpayne@69 13898 */
jpayne@69 13899 }
jpayne@69 13900
jpayne@69 13901 /* "pysam/libctabix.pyx":615
jpayne@69 13902 * hts_close(self.htsfile)
jpayne@69 13903 * self.htsfile = NULL
jpayne@69 13904 * if self.index != NULL: # <<<<<<<<<<<<<<
jpayne@69 13905 * tbx_destroy(self.index)
jpayne@69 13906 *
jpayne@69 13907 */
jpayne@69 13908 __pyx_t_1 = (__pyx_v_self->index != NULL);
jpayne@69 13909 if (__pyx_t_1) {
jpayne@69 13910
jpayne@69 13911 /* "pysam/libctabix.pyx":616
jpayne@69 13912 * self.htsfile = NULL
jpayne@69 13913 * if self.index != NULL:
jpayne@69 13914 * tbx_destroy(self.index) # <<<<<<<<<<<<<<
jpayne@69 13915 *
jpayne@69 13916 *
jpayne@69 13917 */
jpayne@69 13918 tbx_destroy(__pyx_v_self->index);
jpayne@69 13919
jpayne@69 13920 /* "pysam/libctabix.pyx":615
jpayne@69 13921 * hts_close(self.htsfile)
jpayne@69 13922 * self.htsfile = NULL
jpayne@69 13923 * if self.index != NULL: # <<<<<<<<<<<<<<
jpayne@69 13924 * tbx_destroy(self.index)
jpayne@69 13925 *
jpayne@69 13926 */
jpayne@69 13927 }
jpayne@69 13928
jpayne@69 13929 /* "pysam/libctabix.pyx":608
jpayne@69 13930 * self.index = NULL
jpayne@69 13931 *
jpayne@69 13932 * def __dealloc__( self ): # <<<<<<<<<<<<<<
jpayne@69 13933 * # remember: dealloc cannot call other python methods
jpayne@69 13934 * # note: no doc string
jpayne@69 13935 */
jpayne@69 13936
jpayne@69 13937 /* function exit code */
jpayne@69 13938 goto __pyx_L0;
jpayne@69 13939 __pyx_L1_error:;
jpayne@69 13940 __Pyx_WriteUnraisable("pysam.libctabix.TabixFile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
jpayne@69 13941 __pyx_L0:;
jpayne@69 13942 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 13943 }
jpayne@69 13944
jpayne@69 13945 /* "pysam/libctabix.pxd":65
jpayne@69 13946 * cdef tbx_t * index
jpayne@69 13947 *
jpayne@69 13948 * cdef readonly object filename_index # <<<<<<<<<<<<<<
jpayne@69 13949 *
jpayne@69 13950 * cdef Parser parser
jpayne@69 13951 */
jpayne@69 13952
jpayne@69 13953 /* Python wrapper */
jpayne@69 13954 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_14filename_index_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13955 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_14filename_index_1__get__(PyObject *__pyx_v_self) {
jpayne@69 13956 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13957 PyObject *__pyx_r = 0;
jpayne@69 13958 __Pyx_RefNannyDeclarations
jpayne@69 13959 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 13960 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13961 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_14filename_index___get__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@69 13962
jpayne@69 13963 /* function exit code */
jpayne@69 13964 __Pyx_RefNannyFinishContext();
jpayne@69 13965 return __pyx_r;
jpayne@69 13966 }
jpayne@69 13967
jpayne@69 13968 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_14filename_index___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@69 13969 PyObject *__pyx_r = NULL;
jpayne@69 13970 __Pyx_TraceDeclarations
jpayne@69 13971 __Pyx_RefNannyDeclarations
jpayne@69 13972 int __pyx_lineno = 0;
jpayne@69 13973 const char *__pyx_filename = NULL;
jpayne@69 13974 int __pyx_clineno = 0;
jpayne@69 13975 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 13976 __Pyx_TraceCall("__get__", __pyx_f[4], 65, 0, __PYX_ERR(4, 65, __pyx_L1_error));
jpayne@69 13977 __Pyx_XDECREF(__pyx_r);
jpayne@69 13978 __Pyx_INCREF(__pyx_v_self->filename_index);
jpayne@69 13979 __pyx_r = __pyx_v_self->filename_index;
jpayne@69 13980 goto __pyx_L0;
jpayne@69 13981
jpayne@69 13982 /* function exit code */
jpayne@69 13983 __pyx_L1_error:;
jpayne@69 13984 __Pyx_AddTraceback("pysam.libctabix.TabixFile.filename_index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13985 __pyx_r = NULL;
jpayne@69 13986 __pyx_L0:;
jpayne@69 13987 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13988 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13989 __Pyx_RefNannyFinishContext();
jpayne@69 13990 return __pyx_r;
jpayne@69 13991 }
jpayne@69 13992
jpayne@69 13993 /* "(tree fragment)":1
jpayne@69 13994 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 13995 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 13996 * def __setstate_cython__(self, __pyx_state):
jpayne@69 13997 */
jpayne@69 13998
jpayne@69 13999 /* Python wrapper */
jpayne@69 14000 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_13__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 14001 #if CYTHON_METH_FASTCALL
jpayne@69 14002 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14003 #else
jpayne@69 14004 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14005 #endif
jpayne@69 14006 ); /*proto*/
jpayne@69 14007 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9TabixFile_12__reduce_cython__, "TabixFile.__reduce_cython__(self)");
jpayne@69 14008 static PyMethodDef __pyx_mdef_5pysam_9libctabix_9TabixFile_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_12__reduce_cython__};
jpayne@69 14009 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_13__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 14010 #if CYTHON_METH_FASTCALL
jpayne@69 14011 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14012 #else
jpayne@69 14013 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14014 #endif
jpayne@69 14015 ) {
jpayne@69 14016 #if !CYTHON_METH_FASTCALL
jpayne@69 14017 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 14018 #endif
jpayne@69 14019 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14020 PyObject *__pyx_r = 0;
jpayne@69 14021 __Pyx_RefNannyDeclarations
jpayne@69 14022 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 14023 #if !CYTHON_METH_FASTCALL
jpayne@69 14024 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 14025 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 14026 #else
jpayne@69 14027 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 14028 #endif
jpayne@69 14029 #endif
jpayne@69 14030 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 14031 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 14032 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 14033 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 14034 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_12__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@69 14035
jpayne@69 14036 /* function exit code */
jpayne@69 14037 __Pyx_RefNannyFinishContext();
jpayne@69 14038 return __pyx_r;
jpayne@69 14039 }
jpayne@69 14040
jpayne@69 14041 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@69 14042 PyObject *__pyx_r = NULL;
jpayne@69 14043 __Pyx_TraceDeclarations
jpayne@69 14044 __Pyx_RefNannyDeclarations
jpayne@69 14045 int __pyx_lineno = 0;
jpayne@69 14046 const char *__pyx_filename = NULL;
jpayne@69 14047 int __pyx_clineno = 0;
jpayne@69 14048 __Pyx_TraceFrameInit(__pyx_codeobj__22)
jpayne@69 14049 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 14050 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 14051
jpayne@69 14052 /* "(tree fragment)":2
jpayne@69 14053 * def __reduce_cython__(self):
jpayne@69 14054 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 14055 * def __setstate_cython__(self, __pyx_state):
jpayne@69 14056 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 14057 */
jpayne@69 14058 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 14059 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 14060
jpayne@69 14061 /* "(tree fragment)":1
jpayne@69 14062 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 14063 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 14064 * def __setstate_cython__(self, __pyx_state):
jpayne@69 14065 */
jpayne@69 14066
jpayne@69 14067 /* function exit code */
jpayne@69 14068 __pyx_L1_error:;
jpayne@69 14069 __Pyx_AddTraceback("pysam.libctabix.TabixFile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14070 __pyx_r = NULL;
jpayne@69 14071 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 14072 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 14073 __Pyx_RefNannyFinishContext();
jpayne@69 14074 return __pyx_r;
jpayne@69 14075 }
jpayne@69 14076
jpayne@69 14077 /* "(tree fragment)":3
jpayne@69 14078 * def __reduce_cython__(self):
jpayne@69 14079 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 14080 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 14081 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 14082 */
jpayne@69 14083
jpayne@69 14084 /* Python wrapper */
jpayne@69 14085 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_15__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 14086 #if CYTHON_METH_FASTCALL
jpayne@69 14087 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14088 #else
jpayne@69 14089 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14090 #endif
jpayne@69 14091 ); /*proto*/
jpayne@69 14092 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9TabixFile_14__setstate_cython__, "TabixFile.__setstate_cython__(self, __pyx_state)");
jpayne@69 14093 static PyMethodDef __pyx_mdef_5pysam_9libctabix_9TabixFile_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_14__setstate_cython__};
jpayne@69 14094 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_15__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 14095 #if CYTHON_METH_FASTCALL
jpayne@69 14096 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14097 #else
jpayne@69 14098 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14099 #endif
jpayne@69 14100 ) {
jpayne@69 14101 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 14102 #if !CYTHON_METH_FASTCALL
jpayne@69 14103 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 14104 #endif
jpayne@69 14105 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14106 PyObject* values[1] = {0};
jpayne@69 14107 int __pyx_lineno = 0;
jpayne@69 14108 const char *__pyx_filename = NULL;
jpayne@69 14109 int __pyx_clineno = 0;
jpayne@69 14110 PyObject *__pyx_r = 0;
jpayne@69 14111 __Pyx_RefNannyDeclarations
jpayne@69 14112 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 14113 #if !CYTHON_METH_FASTCALL
jpayne@69 14114 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 14115 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 14116 #else
jpayne@69 14117 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 14118 #endif
jpayne@69 14119 #endif
jpayne@69 14120 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 14121 {
jpayne@69 14122 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 14123 if (__pyx_kwds) {
jpayne@69 14124 Py_ssize_t kw_args;
jpayne@69 14125 switch (__pyx_nargs) {
jpayne@69 14126 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 14127 CYTHON_FALLTHROUGH;
jpayne@69 14128 case 0: break;
jpayne@69 14129 default: goto __pyx_L5_argtuple_error;
jpayne@69 14130 }
jpayne@69 14131 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 14132 switch (__pyx_nargs) {
jpayne@69 14133 case 0:
jpayne@69 14134 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 14135 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 14136 kw_args--;
jpayne@69 14137 }
jpayne@69 14138 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 14139 else goto __pyx_L5_argtuple_error;
jpayne@69 14140 }
jpayne@69 14141 if (unlikely(kw_args > 0)) {
jpayne@69 14142 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 14143 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)
jpayne@69 14144 }
jpayne@69 14145 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 14146 goto __pyx_L5_argtuple_error;
jpayne@69 14147 } else {
jpayne@69 14148 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 14149 }
jpayne@69 14150 __pyx_v___pyx_state = values[0];
jpayne@69 14151 }
jpayne@69 14152 goto __pyx_L6_skip;
jpayne@69 14153 __pyx_L5_argtuple_error:;
jpayne@69 14154 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 14155 __pyx_L6_skip:;
jpayne@69 14156 goto __pyx_L4_argument_unpacking_done;
jpayne@69 14157 __pyx_L3_error:;
jpayne@69 14158 {
jpayne@69 14159 Py_ssize_t __pyx_temp;
jpayne@69 14160 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 14161 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 14162 }
jpayne@69 14163 }
jpayne@69 14164 __Pyx_AddTraceback("pysam.libctabix.TabixFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14165 __Pyx_RefNannyFinishContext();
jpayne@69 14166 return NULL;
jpayne@69 14167 __pyx_L4_argument_unpacking_done:;
jpayne@69 14168 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_14__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 14169
jpayne@69 14170 /* function exit code */
jpayne@69 14171 {
jpayne@69 14172 Py_ssize_t __pyx_temp;
jpayne@69 14173 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 14174 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 14175 }
jpayne@69 14176 }
jpayne@69 14177 __Pyx_RefNannyFinishContext();
jpayne@69 14178 return __pyx_r;
jpayne@69 14179 }
jpayne@69 14180
jpayne@69 14181 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 14182 PyObject *__pyx_r = NULL;
jpayne@69 14183 __Pyx_TraceDeclarations
jpayne@69 14184 __Pyx_RefNannyDeclarations
jpayne@69 14185 int __pyx_lineno = 0;
jpayne@69 14186 const char *__pyx_filename = NULL;
jpayne@69 14187 int __pyx_clineno = 0;
jpayne@69 14188 __Pyx_TraceFrameInit(__pyx_codeobj__23)
jpayne@69 14189 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 14190 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 14191
jpayne@69 14192 /* "(tree fragment)":4
jpayne@69 14193 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 14194 * def __setstate_cython__(self, __pyx_state):
jpayne@69 14195 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 14196 */
jpayne@69 14197 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 14198 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 14199
jpayne@69 14200 /* "(tree fragment)":3
jpayne@69 14201 * def __reduce_cython__(self):
jpayne@69 14202 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 14203 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 14204 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 14205 */
jpayne@69 14206
jpayne@69 14207 /* function exit code */
jpayne@69 14208 __pyx_L1_error:;
jpayne@69 14209 __Pyx_AddTraceback("pysam.libctabix.TabixFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14210 __pyx_r = NULL;
jpayne@69 14211 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 14212 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 14213 __Pyx_RefNannyFinishContext();
jpayne@69 14214 return __pyx_r;
jpayne@69 14215 }
jpayne@69 14216
jpayne@69 14217 /* "pysam/libctabix.pyx":624
jpayne@69 14218 * """
jpayne@69 14219 *
jpayne@69 14220 * def __init__(self, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@69 14221 * self.encoding = encoding
jpayne@69 14222 *
jpayne@69 14223 */
jpayne@69 14224
jpayne@69 14225 /* Python wrapper */
jpayne@69 14226 static int __pyx_pw_5pysam_9libctabix_13TabixIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 14227 static int __pyx_pw_5pysam_9libctabix_13TabixIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 14228 PyObject *__pyx_v_encoding = 0;
jpayne@69 14229 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 14230 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14231 PyObject* values[1] = {0};
jpayne@69 14232 int __pyx_lineno = 0;
jpayne@69 14233 const char *__pyx_filename = NULL;
jpayne@69 14234 int __pyx_clineno = 0;
jpayne@69 14235 int __pyx_r;
jpayne@69 14236 __Pyx_RefNannyDeclarations
jpayne@69 14237 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@69 14238 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 14239 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 14240 #else
jpayne@69 14241 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@69 14242 #endif
jpayne@69 14243 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 14244 {
jpayne@69 14245 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_encoding,0};
jpayne@69 14246 values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_u_ascii));
jpayne@69 14247 if (__pyx_kwds) {
jpayne@69 14248 Py_ssize_t kw_args;
jpayne@69 14249 switch (__pyx_nargs) {
jpayne@69 14250 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 14251 CYTHON_FALLTHROUGH;
jpayne@69 14252 case 0: break;
jpayne@69 14253 default: goto __pyx_L5_argtuple_error;
jpayne@69 14254 }
jpayne@69 14255 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@69 14256 switch (__pyx_nargs) {
jpayne@69 14257 case 0:
jpayne@69 14258 if (kw_args > 0) {
jpayne@69 14259 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding);
jpayne@69 14260 if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 14261 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 624, __pyx_L3_error)
jpayne@69 14262 }
jpayne@69 14263 }
jpayne@69 14264 if (unlikely(kw_args > 0)) {
jpayne@69 14265 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 14266 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 624, __pyx_L3_error)
jpayne@69 14267 }
jpayne@69 14268 } else {
jpayne@69 14269 switch (__pyx_nargs) {
jpayne@69 14270 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 14271 CYTHON_FALLTHROUGH;
jpayne@69 14272 case 0: break;
jpayne@69 14273 default: goto __pyx_L5_argtuple_error;
jpayne@69 14274 }
jpayne@69 14275 }
jpayne@69 14276 __pyx_v_encoding = values[0];
jpayne@69 14277 }
jpayne@69 14278 goto __pyx_L6_skip;
jpayne@69 14279 __pyx_L5_argtuple_error:;
jpayne@69 14280 __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 624, __pyx_L3_error)
jpayne@69 14281 __pyx_L6_skip:;
jpayne@69 14282 goto __pyx_L4_argument_unpacking_done;
jpayne@69 14283 __pyx_L3_error:;
jpayne@69 14284 {
jpayne@69 14285 Py_ssize_t __pyx_temp;
jpayne@69 14286 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 14287 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 14288 }
jpayne@69 14289 }
jpayne@69 14290 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14291 __Pyx_RefNannyFinishContext();
jpayne@69 14292 return -1;
jpayne@69 14293 __pyx_L4_argument_unpacking_done:;
jpayne@69 14294 __pyx_r = __pyx_pf_5pysam_9libctabix_13TabixIterator___init__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self), __pyx_v_encoding);
jpayne@69 14295
jpayne@69 14296 /* function exit code */
jpayne@69 14297 {
jpayne@69 14298 Py_ssize_t __pyx_temp;
jpayne@69 14299 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 14300 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 14301 }
jpayne@69 14302 }
jpayne@69 14303 __Pyx_RefNannyFinishContext();
jpayne@69 14304 return __pyx_r;
jpayne@69 14305 }
jpayne@69 14306
jpayne@69 14307 static int __pyx_pf_5pysam_9libctabix_13TabixIterator___init__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self, PyObject *__pyx_v_encoding) {
jpayne@69 14308 int __pyx_r;
jpayne@69 14309 __Pyx_TraceDeclarations
jpayne@69 14310 __Pyx_RefNannyDeclarations
jpayne@69 14311 int __pyx_lineno = 0;
jpayne@69 14312 const char *__pyx_filename = NULL;
jpayne@69 14313 int __pyx_clineno = 0;
jpayne@69 14314 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@69 14315 __Pyx_TraceCall("__init__", __pyx_f[0], 624, 0, __PYX_ERR(0, 624, __pyx_L1_error));
jpayne@69 14316
jpayne@69 14317 /* "pysam/libctabix.pyx":625
jpayne@69 14318 *
jpayne@69 14319 * def __init__(self, encoding="ascii"):
jpayne@69 14320 * self.encoding = encoding # <<<<<<<<<<<<<<
jpayne@69 14321 *
jpayne@69 14322 * def __iter__(self):
jpayne@69 14323 */
jpayne@69 14324 __Pyx_INCREF(__pyx_v_encoding);
jpayne@69 14325 __Pyx_GIVEREF(__pyx_v_encoding);
jpayne@69 14326 __Pyx_GOTREF(__pyx_v_self->encoding);
jpayne@69 14327 __Pyx_DECREF(__pyx_v_self->encoding);
jpayne@69 14328 __pyx_v_self->encoding = __pyx_v_encoding;
jpayne@69 14329
jpayne@69 14330 /* "pysam/libctabix.pyx":624
jpayne@69 14331 * """
jpayne@69 14332 *
jpayne@69 14333 * def __init__(self, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@69 14334 * self.encoding = encoding
jpayne@69 14335 *
jpayne@69 14336 */
jpayne@69 14337
jpayne@69 14338 /* function exit code */
jpayne@69 14339 __pyx_r = 0;
jpayne@69 14340 goto __pyx_L0;
jpayne@69 14341 __pyx_L1_error:;
jpayne@69 14342 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14343 __pyx_r = -1;
jpayne@69 14344 __pyx_L0:;
jpayne@69 14345 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 14346 __Pyx_RefNannyFinishContext();
jpayne@69 14347 return __pyx_r;
jpayne@69 14348 }
jpayne@69 14349
jpayne@69 14350 /* "pysam/libctabix.pyx":627
jpayne@69 14351 * self.encoding = encoding
jpayne@69 14352 *
jpayne@69 14353 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 14354 * self.buffer.s = NULL
jpayne@69 14355 * self.buffer.l = 0
jpayne@69 14356 */
jpayne@69 14357
jpayne@69 14358 /* Python wrapper */
jpayne@69 14359 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 14360 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_3__iter__(PyObject *__pyx_v_self) {
jpayne@69 14361 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14362 PyObject *__pyx_r = 0;
jpayne@69 14363 __Pyx_RefNannyDeclarations
jpayne@69 14364 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
jpayne@69 14365 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 14366 __pyx_r = __pyx_pf_5pysam_9libctabix_13TabixIterator_2__iter__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self));
jpayne@69 14367
jpayne@69 14368 /* function exit code */
jpayne@69 14369 __Pyx_RefNannyFinishContext();
jpayne@69 14370 return __pyx_r;
jpayne@69 14371 }
jpayne@69 14372
jpayne@69 14373 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_2__iter__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self) {
jpayne@69 14374 PyObject *__pyx_r = NULL;
jpayne@69 14375 __Pyx_TraceDeclarations
jpayne@69 14376 __Pyx_RefNannyDeclarations
jpayne@69 14377 int __pyx_lineno = 0;
jpayne@69 14378 const char *__pyx_filename = NULL;
jpayne@69 14379 int __pyx_clineno = 0;
jpayne@69 14380 __Pyx_RefNannySetupContext("__iter__", 1);
jpayne@69 14381 __Pyx_TraceCall("__iter__", __pyx_f[0], 627, 0, __PYX_ERR(0, 627, __pyx_L1_error));
jpayne@69 14382
jpayne@69 14383 /* "pysam/libctabix.pyx":628
jpayne@69 14384 *
jpayne@69 14385 * def __iter__(self):
jpayne@69 14386 * self.buffer.s = NULL # <<<<<<<<<<<<<<
jpayne@69 14387 * self.buffer.l = 0
jpayne@69 14388 * self.buffer.m = 0
jpayne@69 14389 */
jpayne@69 14390 __pyx_v_self->buffer.s = NULL;
jpayne@69 14391
jpayne@69 14392 /* "pysam/libctabix.pyx":629
jpayne@69 14393 * def __iter__(self):
jpayne@69 14394 * self.buffer.s = NULL
jpayne@69 14395 * self.buffer.l = 0 # <<<<<<<<<<<<<<
jpayne@69 14396 * self.buffer.m = 0
jpayne@69 14397 *
jpayne@69 14398 */
jpayne@69 14399 __pyx_v_self->buffer.l = 0;
jpayne@69 14400
jpayne@69 14401 /* "pysam/libctabix.pyx":630
jpayne@69 14402 * self.buffer.s = NULL
jpayne@69 14403 * self.buffer.l = 0
jpayne@69 14404 * self.buffer.m = 0 # <<<<<<<<<<<<<<
jpayne@69 14405 *
jpayne@69 14406 * return self
jpayne@69 14407 */
jpayne@69 14408 __pyx_v_self->buffer.m = 0;
jpayne@69 14409
jpayne@69 14410 /* "pysam/libctabix.pyx":632
jpayne@69 14411 * self.buffer.m = 0
jpayne@69 14412 *
jpayne@69 14413 * return self # <<<<<<<<<<<<<<
jpayne@69 14414 *
jpayne@69 14415 * cdef int __cnext__(self):
jpayne@69 14416 */
jpayne@69 14417 __Pyx_XDECREF(__pyx_r);
jpayne@69 14418 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@69 14419 __pyx_r = ((PyObject *)__pyx_v_self);
jpayne@69 14420 goto __pyx_L0;
jpayne@69 14421
jpayne@69 14422 /* "pysam/libctabix.pyx":627
jpayne@69 14423 * self.encoding = encoding
jpayne@69 14424 *
jpayne@69 14425 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 14426 * self.buffer.s = NULL
jpayne@69 14427 * self.buffer.l = 0
jpayne@69 14428 */
jpayne@69 14429
jpayne@69 14430 /* function exit code */
jpayne@69 14431 __pyx_L1_error:;
jpayne@69 14432 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14433 __pyx_r = NULL;
jpayne@69 14434 __pyx_L0:;
jpayne@69 14435 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 14436 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 14437 __Pyx_RefNannyFinishContext();
jpayne@69 14438 return __pyx_r;
jpayne@69 14439 }
jpayne@69 14440
jpayne@69 14441 /* "pysam/libctabix.pyx":634
jpayne@69 14442 * return self
jpayne@69 14443 *
jpayne@69 14444 * cdef int __cnext__(self): # <<<<<<<<<<<<<<
jpayne@69 14445 * '''iterate to next element.
jpayne@69 14446 *
jpayne@69 14447 */
jpayne@69 14448
jpayne@69 14449 static int __pyx_f_5pysam_9libctabix_13TabixIterator___cnext__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self) {
jpayne@69 14450 int __pyx_v_retval;
jpayne@69 14451 int __pyx_r;
jpayne@69 14452 __Pyx_TraceDeclarations
jpayne@69 14453 int __pyx_t_1;
jpayne@69 14454 int __pyx_lineno = 0;
jpayne@69 14455 const char *__pyx_filename = NULL;
jpayne@69 14456 int __pyx_clineno = 0;
jpayne@69 14457 __Pyx_TraceCall("__cnext__", __pyx_f[0], 634, 0, __PYX_ERR(0, 634, __pyx_L1_error));
jpayne@69 14458
jpayne@69 14459 /* "pysam/libctabix.pyx":640
jpayne@69 14460 * was called.
jpayne@69 14461 * '''
jpayne@69 14462 * if self.tabixfile.htsfile == NULL: # <<<<<<<<<<<<<<
jpayne@69 14463 * return -5
jpayne@69 14464 *
jpayne@69 14465 */
jpayne@69 14466 __pyx_t_1 = (__pyx_v_self->tabixfile->__pyx_base.htsfile == NULL);
jpayne@69 14467 if (__pyx_t_1) {
jpayne@69 14468
jpayne@69 14469 /* "pysam/libctabix.pyx":641
jpayne@69 14470 * '''
jpayne@69 14471 * if self.tabixfile.htsfile == NULL:
jpayne@69 14472 * return -5 # <<<<<<<<<<<<<<
jpayne@69 14473 *
jpayne@69 14474 * cdef int retval
jpayne@69 14475 */
jpayne@69 14476 __pyx_r = -5;
jpayne@69 14477 goto __pyx_L0;
jpayne@69 14478
jpayne@69 14479 /* "pysam/libctabix.pyx":640
jpayne@69 14480 * was called.
jpayne@69 14481 * '''
jpayne@69 14482 * if self.tabixfile.htsfile == NULL: # <<<<<<<<<<<<<<
jpayne@69 14483 * return -5
jpayne@69 14484 *
jpayne@69 14485 */
jpayne@69 14486 }
jpayne@69 14487
jpayne@69 14488 /* "pysam/libctabix.pyx":645
jpayne@69 14489 * cdef int retval
jpayne@69 14490 *
jpayne@69 14491 * while 1: # <<<<<<<<<<<<<<
jpayne@69 14492 * with nogil:
jpayne@69 14493 * retval = tbx_itr_next(
jpayne@69 14494 */
jpayne@69 14495 while (1) {
jpayne@69 14496
jpayne@69 14497 /* "pysam/libctabix.pyx":646
jpayne@69 14498 *
jpayne@69 14499 * while 1:
jpayne@69 14500 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 14501 * retval = tbx_itr_next(
jpayne@69 14502 * self.tabixfile.htsfile,
jpayne@69 14503 */
jpayne@69 14504 {
jpayne@69 14505 #ifdef WITH_THREAD
jpayne@69 14506 PyThreadState *_save;
jpayne@69 14507 _save = NULL;
jpayne@69 14508 Py_UNBLOCK_THREADS
jpayne@69 14509 __Pyx_FastGIL_Remember();
jpayne@69 14510 #endif
jpayne@69 14511 /*try:*/ {
jpayne@69 14512
jpayne@69 14513 /* "pysam/libctabix.pyx":647
jpayne@69 14514 * while 1:
jpayne@69 14515 * with nogil:
jpayne@69 14516 * retval = tbx_itr_next( # <<<<<<<<<<<<<<
jpayne@69 14517 * self.tabixfile.htsfile,
jpayne@69 14518 * self.tabixfile.index,
jpayne@69 14519 */
jpayne@69 14520 __pyx_v_retval = tbx_itr_next(__pyx_v_self->tabixfile->__pyx_base.htsfile, __pyx_v_self->tabixfile->index, __pyx_v_self->iterator, (&__pyx_v_self->buffer));
jpayne@69 14521 }
jpayne@69 14522
jpayne@69 14523 /* "pysam/libctabix.pyx":646
jpayne@69 14524 *
jpayne@69 14525 * while 1:
jpayne@69 14526 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 14527 * retval = tbx_itr_next(
jpayne@69 14528 * self.tabixfile.htsfile,
jpayne@69 14529 */
jpayne@69 14530 /*finally:*/ {
jpayne@69 14531 /*normal exit:*/{
jpayne@69 14532 #ifdef WITH_THREAD
jpayne@69 14533 __Pyx_FastGIL_Forget();
jpayne@69 14534 Py_BLOCK_THREADS
jpayne@69 14535 #endif
jpayne@69 14536 goto __pyx_L10;
jpayne@69 14537 }
jpayne@69 14538 __pyx_L10:;
jpayne@69 14539 }
jpayne@69 14540 }
jpayne@69 14541
jpayne@69 14542 /* "pysam/libctabix.pyx":653
jpayne@69 14543 * &self.buffer)
jpayne@69 14544 *
jpayne@69 14545 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 14546 * break
jpayne@69 14547 *
jpayne@69 14548 */
jpayne@69 14549 __pyx_t_1 = (__pyx_v_retval < 0);
jpayne@69 14550 if (__pyx_t_1) {
jpayne@69 14551
jpayne@69 14552 /* "pysam/libctabix.pyx":654
jpayne@69 14553 *
jpayne@69 14554 * if retval < 0:
jpayne@69 14555 * break # <<<<<<<<<<<<<<
jpayne@69 14556 *
jpayne@69 14557 * if self.buffer.s[0] != b'#':
jpayne@69 14558 */
jpayne@69 14559 goto __pyx_L5_break;
jpayne@69 14560
jpayne@69 14561 /* "pysam/libctabix.pyx":653
jpayne@69 14562 * &self.buffer)
jpayne@69 14563 *
jpayne@69 14564 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 14565 * break
jpayne@69 14566 *
jpayne@69 14567 */
jpayne@69 14568 }
jpayne@69 14569
jpayne@69 14570 /* "pysam/libctabix.pyx":656
jpayne@69 14571 * break
jpayne@69 14572 *
jpayne@69 14573 * if self.buffer.s[0] != b'#': # <<<<<<<<<<<<<<
jpayne@69 14574 * break
jpayne@69 14575 *
jpayne@69 14576 */
jpayne@69 14577 __pyx_t_1 = ((__pyx_v_self->buffer.s[0]) != '#');
jpayne@69 14578 if (__pyx_t_1) {
jpayne@69 14579
jpayne@69 14580 /* "pysam/libctabix.pyx":657
jpayne@69 14581 *
jpayne@69 14582 * if self.buffer.s[0] != b'#':
jpayne@69 14583 * break # <<<<<<<<<<<<<<
jpayne@69 14584 *
jpayne@69 14585 * return retval
jpayne@69 14586 */
jpayne@69 14587 goto __pyx_L5_break;
jpayne@69 14588
jpayne@69 14589 /* "pysam/libctabix.pyx":656
jpayne@69 14590 * break
jpayne@69 14591 *
jpayne@69 14592 * if self.buffer.s[0] != b'#': # <<<<<<<<<<<<<<
jpayne@69 14593 * break
jpayne@69 14594 *
jpayne@69 14595 */
jpayne@69 14596 }
jpayne@69 14597 }
jpayne@69 14598 __pyx_L5_break:;
jpayne@69 14599
jpayne@69 14600 /* "pysam/libctabix.pyx":659
jpayne@69 14601 * break
jpayne@69 14602 *
jpayne@69 14603 * return retval # <<<<<<<<<<<<<<
jpayne@69 14604 *
jpayne@69 14605 * def __next__(self):
jpayne@69 14606 */
jpayne@69 14607 __pyx_r = __pyx_v_retval;
jpayne@69 14608 goto __pyx_L0;
jpayne@69 14609
jpayne@69 14610 /* "pysam/libctabix.pyx":634
jpayne@69 14611 * return self
jpayne@69 14612 *
jpayne@69 14613 * cdef int __cnext__(self): # <<<<<<<<<<<<<<
jpayne@69 14614 * '''iterate to next element.
jpayne@69 14615 *
jpayne@69 14616 */
jpayne@69 14617
jpayne@69 14618 /* function exit code */
jpayne@69 14619 __pyx_L1_error:;
jpayne@69 14620 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__cnext__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14621 __pyx_r = 0;
jpayne@69 14622 __pyx_L0:;
jpayne@69 14623 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 14624 return __pyx_r;
jpayne@69 14625 }
jpayne@69 14626
jpayne@69 14627 /* "pysam/libctabix.pyx":661
jpayne@69 14628 * return retval
jpayne@69 14629 *
jpayne@69 14630 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 14631 * """python version of next().
jpayne@69 14632 *
jpayne@69 14633 */
jpayne@69 14634
jpayne@69 14635 /* Python wrapper */
jpayne@69 14636 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 14637 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_13TabixIterator_4__next__, "python version of next().\n\n pyrex uses this non-standard name instead of next()\n ");
jpayne@69 14638 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 14639 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_13TabixIterator_4__next__;
jpayne@69 14640 #endif
jpayne@69 14641 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__(PyObject *__pyx_v_self) {
jpayne@69 14642 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14643 PyObject *__pyx_r = 0;
jpayne@69 14644 __Pyx_RefNannyDeclarations
jpayne@69 14645 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@69 14646 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 14647 __pyx_r = __pyx_pf_5pysam_9libctabix_13TabixIterator_4__next__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self));
jpayne@69 14648
jpayne@69 14649 /* function exit code */
jpayne@69 14650 __Pyx_RefNannyFinishContext();
jpayne@69 14651 return __pyx_r;
jpayne@69 14652 }
jpayne@69 14653
jpayne@69 14654 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_4__next__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self) {
jpayne@69 14655 int __pyx_v_retval;
jpayne@69 14656 PyObject *__pyx_r = NULL;
jpayne@69 14657 __Pyx_TraceDeclarations
jpayne@69 14658 __Pyx_RefNannyDeclarations
jpayne@69 14659 int __pyx_error_without_exception = 0; /* StopIteration */
jpayne@69 14660 int __pyx_t_1;
jpayne@69 14661 int __pyx_t_2;
jpayne@69 14662 PyObject *__pyx_t_3 = NULL;
jpayne@69 14663 PyObject *__pyx_t_4 = NULL;
jpayne@69 14664 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str __pyx_t_5;
jpayne@69 14665 int __pyx_lineno = 0;
jpayne@69 14666 const char *__pyx_filename = NULL;
jpayne@69 14667 int __pyx_clineno = 0;
jpayne@69 14668 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@69 14669 __Pyx_TraceCall("__next__", __pyx_f[0], 661, 0, __PYX_ERR(0, 661, __pyx_L1_error));
jpayne@69 14670
jpayne@69 14671 /* "pysam/libctabix.pyx":667
jpayne@69 14672 * """
jpayne@69 14673 *
jpayne@69 14674 * cdef int retval = self.__cnext__() # <<<<<<<<<<<<<<
jpayne@69 14675 * if retval == -5:
jpayne@69 14676 * raise IOError("iteration on closed file")
jpayne@69 14677 */
jpayne@69 14678 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator *)__pyx_v_self->__pyx_vtab)->__pyx___cnext__(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 667, __pyx_L1_error)
jpayne@69 14679 __pyx_v_retval = __pyx_t_1;
jpayne@69 14680
jpayne@69 14681 /* "pysam/libctabix.pyx":668
jpayne@69 14682 *
jpayne@69 14683 * cdef int retval = self.__cnext__()
jpayne@69 14684 * if retval == -5: # <<<<<<<<<<<<<<
jpayne@69 14685 * raise IOError("iteration on closed file")
jpayne@69 14686 * elif retval < 0:
jpayne@69 14687 */
jpayne@69 14688 __pyx_t_2 = (__pyx_v_retval == -5L);
jpayne@69 14689 if (unlikely(__pyx_t_2)) {
jpayne@69 14690
jpayne@69 14691 /* "pysam/libctabix.pyx":669
jpayne@69 14692 * cdef int retval = self.__cnext__()
jpayne@69 14693 * if retval == -5:
jpayne@69 14694 * raise IOError("iteration on closed file") # <<<<<<<<<<<<<<
jpayne@69 14695 * elif retval < 0:
jpayne@69 14696 * raise StopIteration
jpayne@69 14697 */
jpayne@69 14698 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L1_error)
jpayne@69 14699 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 14700 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 14701 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 14702 __PYX_ERR(0, 669, __pyx_L1_error)
jpayne@69 14703
jpayne@69 14704 /* "pysam/libctabix.pyx":668
jpayne@69 14705 *
jpayne@69 14706 * cdef int retval = self.__cnext__()
jpayne@69 14707 * if retval == -5: # <<<<<<<<<<<<<<
jpayne@69 14708 * raise IOError("iteration on closed file")
jpayne@69 14709 * elif retval < 0:
jpayne@69 14710 */
jpayne@69 14711 }
jpayne@69 14712
jpayne@69 14713 /* "pysam/libctabix.pyx":670
jpayne@69 14714 * if retval == -5:
jpayne@69 14715 * raise IOError("iteration on closed file")
jpayne@69 14716 * elif retval < 0: # <<<<<<<<<<<<<<
jpayne@69 14717 * raise StopIteration
jpayne@69 14718 *
jpayne@69 14719 */
jpayne@69 14720 __pyx_t_2 = (__pyx_v_retval < 0);
jpayne@69 14721 if (unlikely(__pyx_t_2)) {
jpayne@69 14722
jpayne@69 14723 /* "pysam/libctabix.pyx":671
jpayne@69 14724 * raise IOError("iteration on closed file")
jpayne@69 14725 * elif retval < 0:
jpayne@69 14726 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@69 14727 *
jpayne@69 14728 * return charptr_to_str(self.buffer.s, self.encoding)
jpayne@69 14729 */
jpayne@69 14730 __pyx_error_without_exception = 1;
jpayne@69 14731 goto __pyx_L1_error;;
jpayne@69 14732
jpayne@69 14733 /* "pysam/libctabix.pyx":670
jpayne@69 14734 * if retval == -5:
jpayne@69 14735 * raise IOError("iteration on closed file")
jpayne@69 14736 * elif retval < 0: # <<<<<<<<<<<<<<
jpayne@69 14737 * raise StopIteration
jpayne@69 14738 *
jpayne@69 14739 */
jpayne@69 14740 }
jpayne@69 14741
jpayne@69 14742 /* "pysam/libctabix.pyx":673
jpayne@69 14743 * raise StopIteration
jpayne@69 14744 *
jpayne@69 14745 * return charptr_to_str(self.buffer.s, self.encoding) # <<<<<<<<<<<<<<
jpayne@69 14746 *
jpayne@69 14747 * def __dealloc__(self):
jpayne@69 14748 */
jpayne@69 14749 __Pyx_XDECREF(__pyx_r);
jpayne@69 14750 __pyx_t_3 = __pyx_v_self->encoding;
jpayne@69 14751 __Pyx_INCREF(__pyx_t_3);
jpayne@69 14752 __pyx_t_5.__pyx_n = 1;
jpayne@69 14753 __pyx_t_5.encoding = __pyx_t_3;
jpayne@69 14754 __pyx_t_4 = __pyx_f_5pysam_9libcutils_charptr_to_str(__pyx_v_self->buffer.s, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
jpayne@69 14755 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 14756 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 14757 __pyx_r = __pyx_t_4;
jpayne@69 14758 __pyx_t_4 = 0;
jpayne@69 14759 goto __pyx_L0;
jpayne@69 14760
jpayne@69 14761 /* "pysam/libctabix.pyx":661
jpayne@69 14762 * return retval
jpayne@69 14763 *
jpayne@69 14764 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 14765 * """python version of next().
jpayne@69 14766 *
jpayne@69 14767 */
jpayne@69 14768
jpayne@69 14769 /* function exit code */
jpayne@69 14770 __pyx_L1_error:;
jpayne@69 14771 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 14772 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 14773 if (!__pyx_error_without_exception) {
jpayne@69 14774 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14775 }
jpayne@69 14776 __pyx_r = NULL;
jpayne@69 14777 __pyx_L0:;
jpayne@69 14778 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 14779 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 14780 __Pyx_RefNannyFinishContext();
jpayne@69 14781 return __pyx_r;
jpayne@69 14782 }
jpayne@69 14783
jpayne@69 14784 /* "pysam/libctabix.pyx":675
jpayne@69 14785 * return charptr_to_str(self.buffer.s, self.encoding)
jpayne@69 14786 *
jpayne@69 14787 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@69 14788 * if <void*>self.iterator != NULL:
jpayne@69 14789 * tbx_itr_destroy(self.iterator)
jpayne@69 14790 */
jpayne@69 14791
jpayne@69 14792 /* Python wrapper */
jpayne@69 14793 static void __pyx_pw_5pysam_9libctabix_13TabixIterator_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 14794 static void __pyx_pw_5pysam_9libctabix_13TabixIterator_7__dealloc__(PyObject *__pyx_v_self) {
jpayne@69 14795 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14796 __Pyx_RefNannyDeclarations
jpayne@69 14797 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
jpayne@69 14798 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 14799 __pyx_pf_5pysam_9libctabix_13TabixIterator_6__dealloc__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self));
jpayne@69 14800
jpayne@69 14801 /* function exit code */
jpayne@69 14802 __Pyx_RefNannyFinishContext();
jpayne@69 14803 }
jpayne@69 14804
jpayne@69 14805 static void __pyx_pf_5pysam_9libctabix_13TabixIterator_6__dealloc__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self) {
jpayne@69 14806 __Pyx_TraceDeclarations
jpayne@69 14807 int __pyx_t_1;
jpayne@69 14808 int __pyx_lineno = 0;
jpayne@69 14809 const char *__pyx_filename = NULL;
jpayne@69 14810 int __pyx_clineno = 0;
jpayne@69 14811 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 675, 0, __PYX_ERR(0, 675, __pyx_L1_error));
jpayne@69 14812
jpayne@69 14813 /* "pysam/libctabix.pyx":676
jpayne@69 14814 *
jpayne@69 14815 * def __dealloc__(self):
jpayne@69 14816 * if <void*>self.iterator != NULL: # <<<<<<<<<<<<<<
jpayne@69 14817 * tbx_itr_destroy(self.iterator)
jpayne@69 14818 * if self.buffer.s != NULL:
jpayne@69 14819 */
jpayne@69 14820 __pyx_t_1 = (((void *)__pyx_v_self->iterator) != NULL);
jpayne@69 14821 if (__pyx_t_1) {
jpayne@69 14822
jpayne@69 14823 /* "pysam/libctabix.pyx":677
jpayne@69 14824 * def __dealloc__(self):
jpayne@69 14825 * if <void*>self.iterator != NULL:
jpayne@69 14826 * tbx_itr_destroy(self.iterator) # <<<<<<<<<<<<<<
jpayne@69 14827 * if self.buffer.s != NULL:
jpayne@69 14828 * free(self.buffer.s)
jpayne@69 14829 */
jpayne@69 14830 tbx_itr_destroy(__pyx_v_self->iterator);
jpayne@69 14831
jpayne@69 14832 /* "pysam/libctabix.pyx":676
jpayne@69 14833 *
jpayne@69 14834 * def __dealloc__(self):
jpayne@69 14835 * if <void*>self.iterator != NULL: # <<<<<<<<<<<<<<
jpayne@69 14836 * tbx_itr_destroy(self.iterator)
jpayne@69 14837 * if self.buffer.s != NULL:
jpayne@69 14838 */
jpayne@69 14839 }
jpayne@69 14840
jpayne@69 14841 /* "pysam/libctabix.pyx":678
jpayne@69 14842 * if <void*>self.iterator != NULL:
jpayne@69 14843 * tbx_itr_destroy(self.iterator)
jpayne@69 14844 * if self.buffer.s != NULL: # <<<<<<<<<<<<<<
jpayne@69 14845 * free(self.buffer.s)
jpayne@69 14846 *
jpayne@69 14847 */
jpayne@69 14848 __pyx_t_1 = (__pyx_v_self->buffer.s != NULL);
jpayne@69 14849 if (__pyx_t_1) {
jpayne@69 14850
jpayne@69 14851 /* "pysam/libctabix.pyx":679
jpayne@69 14852 * tbx_itr_destroy(self.iterator)
jpayne@69 14853 * if self.buffer.s != NULL:
jpayne@69 14854 * free(self.buffer.s) # <<<<<<<<<<<<<<
jpayne@69 14855 *
jpayne@69 14856 *
jpayne@69 14857 */
jpayne@69 14858 free(__pyx_v_self->buffer.s);
jpayne@69 14859
jpayne@69 14860 /* "pysam/libctabix.pyx":678
jpayne@69 14861 * if <void*>self.iterator != NULL:
jpayne@69 14862 * tbx_itr_destroy(self.iterator)
jpayne@69 14863 * if self.buffer.s != NULL: # <<<<<<<<<<<<<<
jpayne@69 14864 * free(self.buffer.s)
jpayne@69 14865 *
jpayne@69 14866 */
jpayne@69 14867 }
jpayne@69 14868
jpayne@69 14869 /* "pysam/libctabix.pyx":675
jpayne@69 14870 * return charptr_to_str(self.buffer.s, self.encoding)
jpayne@69 14871 *
jpayne@69 14872 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@69 14873 * if <void*>self.iterator != NULL:
jpayne@69 14874 * tbx_itr_destroy(self.iterator)
jpayne@69 14875 */
jpayne@69 14876
jpayne@69 14877 /* function exit code */
jpayne@69 14878 goto __pyx_L0;
jpayne@69 14879 __pyx_L1_error:;
jpayne@69 14880 __Pyx_WriteUnraisable("pysam.libctabix.TabixIterator.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
jpayne@69 14881 __pyx_L0:;
jpayne@69 14882 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 14883 }
jpayne@69 14884
jpayne@69 14885 /* "(tree fragment)":1
jpayne@69 14886 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 14887 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 14888 * def __setstate_cython__(self, __pyx_state):
jpayne@69 14889 */
jpayne@69 14890
jpayne@69 14891 /* Python wrapper */
jpayne@69 14892 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 14893 #if CYTHON_METH_FASTCALL
jpayne@69 14894 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14895 #else
jpayne@69 14896 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14897 #endif
jpayne@69 14898 ); /*proto*/
jpayne@69 14899 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_13TabixIterator_8__reduce_cython__, "TabixIterator.__reduce_cython__(self)");
jpayne@69 14900 static PyMethodDef __pyx_mdef_5pysam_9libctabix_13TabixIterator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_13TabixIterator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_13TabixIterator_8__reduce_cython__};
jpayne@69 14901 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 14902 #if CYTHON_METH_FASTCALL
jpayne@69 14903 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14904 #else
jpayne@69 14905 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14906 #endif
jpayne@69 14907 ) {
jpayne@69 14908 #if !CYTHON_METH_FASTCALL
jpayne@69 14909 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 14910 #endif
jpayne@69 14911 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14912 PyObject *__pyx_r = 0;
jpayne@69 14913 __Pyx_RefNannyDeclarations
jpayne@69 14914 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 14915 #if !CYTHON_METH_FASTCALL
jpayne@69 14916 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 14917 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 14918 #else
jpayne@69 14919 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 14920 #endif
jpayne@69 14921 #endif
jpayne@69 14922 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 14923 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 14924 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 14925 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 14926 __pyx_r = __pyx_pf_5pysam_9libctabix_13TabixIterator_8__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self));
jpayne@69 14927
jpayne@69 14928 /* function exit code */
jpayne@69 14929 __Pyx_RefNannyFinishContext();
jpayne@69 14930 return __pyx_r;
jpayne@69 14931 }
jpayne@69 14932
jpayne@69 14933 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self) {
jpayne@69 14934 PyObject *__pyx_r = NULL;
jpayne@69 14935 __Pyx_TraceDeclarations
jpayne@69 14936 __Pyx_RefNannyDeclarations
jpayne@69 14937 int __pyx_lineno = 0;
jpayne@69 14938 const char *__pyx_filename = NULL;
jpayne@69 14939 int __pyx_clineno = 0;
jpayne@69 14940 __Pyx_TraceFrameInit(__pyx_codeobj__25)
jpayne@69 14941 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 14942 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 14943
jpayne@69 14944 /* "(tree fragment)":2
jpayne@69 14945 * def __reduce_cython__(self):
jpayne@69 14946 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 14947 * def __setstate_cython__(self, __pyx_state):
jpayne@69 14948 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 14949 */
jpayne@69 14950 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iterator_cannot_be_converte, 0, 0);
jpayne@69 14951 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 14952
jpayne@69 14953 /* "(tree fragment)":1
jpayne@69 14954 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 14955 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 14956 * def __setstate_cython__(self, __pyx_state):
jpayne@69 14957 */
jpayne@69 14958
jpayne@69 14959 /* function exit code */
jpayne@69 14960 __pyx_L1_error:;
jpayne@69 14961 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14962 __pyx_r = NULL;
jpayne@69 14963 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 14964 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 14965 __Pyx_RefNannyFinishContext();
jpayne@69 14966 return __pyx_r;
jpayne@69 14967 }
jpayne@69 14968
jpayne@69 14969 /* "(tree fragment)":3
jpayne@69 14970 * def __reduce_cython__(self):
jpayne@69 14971 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 14972 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 14973 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 14974 */
jpayne@69 14975
jpayne@69 14976 /* Python wrapper */
jpayne@69 14977 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 14978 #if CYTHON_METH_FASTCALL
jpayne@69 14979 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14980 #else
jpayne@69 14981 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14982 #endif
jpayne@69 14983 ); /*proto*/
jpayne@69 14984 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_13TabixIterator_10__setstate_cython__, "TabixIterator.__setstate_cython__(self, __pyx_state)");
jpayne@69 14985 static PyMethodDef __pyx_mdef_5pysam_9libctabix_13TabixIterator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_13TabixIterator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_13TabixIterator_10__setstate_cython__};
jpayne@69 14986 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 14987 #if CYTHON_METH_FASTCALL
jpayne@69 14988 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14989 #else
jpayne@69 14990 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14991 #endif
jpayne@69 14992 ) {
jpayne@69 14993 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 14994 #if !CYTHON_METH_FASTCALL
jpayne@69 14995 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 14996 #endif
jpayne@69 14997 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14998 PyObject* values[1] = {0};
jpayne@69 14999 int __pyx_lineno = 0;
jpayne@69 15000 const char *__pyx_filename = NULL;
jpayne@69 15001 int __pyx_clineno = 0;
jpayne@69 15002 PyObject *__pyx_r = 0;
jpayne@69 15003 __Pyx_RefNannyDeclarations
jpayne@69 15004 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 15005 #if !CYTHON_METH_FASTCALL
jpayne@69 15006 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 15007 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 15008 #else
jpayne@69 15009 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 15010 #endif
jpayne@69 15011 #endif
jpayne@69 15012 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 15013 {
jpayne@69 15014 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 15015 if (__pyx_kwds) {
jpayne@69 15016 Py_ssize_t kw_args;
jpayne@69 15017 switch (__pyx_nargs) {
jpayne@69 15018 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 15019 CYTHON_FALLTHROUGH;
jpayne@69 15020 case 0: break;
jpayne@69 15021 default: goto __pyx_L5_argtuple_error;
jpayne@69 15022 }
jpayne@69 15023 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 15024 switch (__pyx_nargs) {
jpayne@69 15025 case 0:
jpayne@69 15026 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 15027 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 15028 kw_args--;
jpayne@69 15029 }
jpayne@69 15030 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 15031 else goto __pyx_L5_argtuple_error;
jpayne@69 15032 }
jpayne@69 15033 if (unlikely(kw_args > 0)) {
jpayne@69 15034 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 15035 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)
jpayne@69 15036 }
jpayne@69 15037 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 15038 goto __pyx_L5_argtuple_error;
jpayne@69 15039 } else {
jpayne@69 15040 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 15041 }
jpayne@69 15042 __pyx_v___pyx_state = values[0];
jpayne@69 15043 }
jpayne@69 15044 goto __pyx_L6_skip;
jpayne@69 15045 __pyx_L5_argtuple_error:;
jpayne@69 15046 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 15047 __pyx_L6_skip:;
jpayne@69 15048 goto __pyx_L4_argument_unpacking_done;
jpayne@69 15049 __pyx_L3_error:;
jpayne@69 15050 {
jpayne@69 15051 Py_ssize_t __pyx_temp;
jpayne@69 15052 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15053 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 15054 }
jpayne@69 15055 }
jpayne@69 15056 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15057 __Pyx_RefNannyFinishContext();
jpayne@69 15058 return NULL;
jpayne@69 15059 __pyx_L4_argument_unpacking_done:;
jpayne@69 15060 __pyx_r = __pyx_pf_5pysam_9libctabix_13TabixIterator_10__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 15061
jpayne@69 15062 /* function exit code */
jpayne@69 15063 {
jpayne@69 15064 Py_ssize_t __pyx_temp;
jpayne@69 15065 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15066 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 15067 }
jpayne@69 15068 }
jpayne@69 15069 __Pyx_RefNannyFinishContext();
jpayne@69 15070 return __pyx_r;
jpayne@69 15071 }
jpayne@69 15072
jpayne@69 15073 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 15074 PyObject *__pyx_r = NULL;
jpayne@69 15075 __Pyx_TraceDeclarations
jpayne@69 15076 __Pyx_RefNannyDeclarations
jpayne@69 15077 int __pyx_lineno = 0;
jpayne@69 15078 const char *__pyx_filename = NULL;
jpayne@69 15079 int __pyx_clineno = 0;
jpayne@69 15080 __Pyx_TraceFrameInit(__pyx_codeobj__26)
jpayne@69 15081 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 15082 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 15083
jpayne@69 15084 /* "(tree fragment)":4
jpayne@69 15085 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 15086 * def __setstate_cython__(self, __pyx_state):
jpayne@69 15087 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 15088 */
jpayne@69 15089 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iterator_cannot_be_converte, 0, 0);
jpayne@69 15090 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 15091
jpayne@69 15092 /* "(tree fragment)":3
jpayne@69 15093 * def __reduce_cython__(self):
jpayne@69 15094 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 15095 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 15096 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 15097 */
jpayne@69 15098
jpayne@69 15099 /* function exit code */
jpayne@69 15100 __pyx_L1_error:;
jpayne@69 15101 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15102 __pyx_r = NULL;
jpayne@69 15103 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 15104 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 15105 __Pyx_RefNannyFinishContext();
jpayne@69 15106 return __pyx_r;
jpayne@69 15107 }
jpayne@69 15108
jpayne@69 15109 /* "pysam/libctabix.pyx":685
jpayne@69 15110 * '''empty iterator'''
jpayne@69 15111 *
jpayne@69 15112 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 15113 * return self
jpayne@69 15114 *
jpayne@69 15115 */
jpayne@69 15116
jpayne@69 15117 /* Python wrapper */
jpayne@69 15118 static PyObject *__pyx_pw_5pysam_9libctabix_13EmptyIterator_1__iter__(PyObject *__pyx_self,
jpayne@69 15119 #if CYTHON_METH_FASTCALL
jpayne@69 15120 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15121 #else
jpayne@69 15122 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15123 #endif
jpayne@69 15124 ); /*proto*/
jpayne@69 15125 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_13EmptyIterator___iter__, "EmptyIterator.__iter__(self)");
jpayne@69 15126 static PyMethodDef __pyx_mdef_5pysam_9libctabix_13EmptyIterator_1__iter__ = {"__iter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_13EmptyIterator_1__iter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_13EmptyIterator___iter__};
jpayne@69 15127 static PyObject *__pyx_pw_5pysam_9libctabix_13EmptyIterator_1__iter__(PyObject *__pyx_self,
jpayne@69 15128 #if CYTHON_METH_FASTCALL
jpayne@69 15129 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15130 #else
jpayne@69 15131 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15132 #endif
jpayne@69 15133 ) {
jpayne@69 15134 PyObject *__pyx_v_self = 0;
jpayne@69 15135 #if !CYTHON_METH_FASTCALL
jpayne@69 15136 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 15137 #endif
jpayne@69 15138 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15139 PyObject* values[1] = {0};
jpayne@69 15140 int __pyx_lineno = 0;
jpayne@69 15141 const char *__pyx_filename = NULL;
jpayne@69 15142 int __pyx_clineno = 0;
jpayne@69 15143 PyObject *__pyx_r = 0;
jpayne@69 15144 __Pyx_RefNannyDeclarations
jpayne@69 15145 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
jpayne@69 15146 #if !CYTHON_METH_FASTCALL
jpayne@69 15147 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 15148 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 15149 #else
jpayne@69 15150 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 15151 #endif
jpayne@69 15152 #endif
jpayne@69 15153 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 15154 {
jpayne@69 15155 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
jpayne@69 15156 if (__pyx_kwds) {
jpayne@69 15157 Py_ssize_t kw_args;
jpayne@69 15158 switch (__pyx_nargs) {
jpayne@69 15159 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 15160 CYTHON_FALLTHROUGH;
jpayne@69 15161 case 0: break;
jpayne@69 15162 default: goto __pyx_L5_argtuple_error;
jpayne@69 15163 }
jpayne@69 15164 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 15165 switch (__pyx_nargs) {
jpayne@69 15166 case 0:
jpayne@69 15167 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
jpayne@69 15168 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 15169 kw_args--;
jpayne@69 15170 }
jpayne@69 15171 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 685, __pyx_L3_error)
jpayne@69 15172 else goto __pyx_L5_argtuple_error;
jpayne@69 15173 }
jpayne@69 15174 if (unlikely(kw_args > 0)) {
jpayne@69 15175 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 15176 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__iter__") < 0)) __PYX_ERR(0, 685, __pyx_L3_error)
jpayne@69 15177 }
jpayne@69 15178 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 15179 goto __pyx_L5_argtuple_error;
jpayne@69 15180 } else {
jpayne@69 15181 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 15182 }
jpayne@69 15183 __pyx_v_self = values[0];
jpayne@69 15184 }
jpayne@69 15185 goto __pyx_L6_skip;
jpayne@69 15186 __pyx_L5_argtuple_error:;
jpayne@69 15187 __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 685, __pyx_L3_error)
jpayne@69 15188 __pyx_L6_skip:;
jpayne@69 15189 goto __pyx_L4_argument_unpacking_done;
jpayne@69 15190 __pyx_L3_error:;
jpayne@69 15191 {
jpayne@69 15192 Py_ssize_t __pyx_temp;
jpayne@69 15193 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15194 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 15195 }
jpayne@69 15196 }
jpayne@69 15197 __Pyx_AddTraceback("pysam.libctabix.EmptyIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15198 __Pyx_RefNannyFinishContext();
jpayne@69 15199 return NULL;
jpayne@69 15200 __pyx_L4_argument_unpacking_done:;
jpayne@69 15201 __pyx_r = __pyx_pf_5pysam_9libctabix_13EmptyIterator___iter__(__pyx_self, __pyx_v_self);
jpayne@69 15202
jpayne@69 15203 /* function exit code */
jpayne@69 15204 {
jpayne@69 15205 Py_ssize_t __pyx_temp;
jpayne@69 15206 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15207 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 15208 }
jpayne@69 15209 }
jpayne@69 15210 __Pyx_RefNannyFinishContext();
jpayne@69 15211 return __pyx_r;
jpayne@69 15212 }
jpayne@69 15213
jpayne@69 15214 static PyObject *__pyx_pf_5pysam_9libctabix_13EmptyIterator___iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
jpayne@69 15215 PyObject *__pyx_r = NULL;
jpayne@69 15216 __Pyx_TraceDeclarations
jpayne@69 15217 __Pyx_RefNannyDeclarations
jpayne@69 15218 int __pyx_lineno = 0;
jpayne@69 15219 const char *__pyx_filename = NULL;
jpayne@69 15220 int __pyx_clineno = 0;
jpayne@69 15221 __Pyx_TraceFrameInit(__pyx_codeobj__27)
jpayne@69 15222 __Pyx_RefNannySetupContext("__iter__", 1);
jpayne@69 15223 __Pyx_TraceCall("__iter__", __pyx_f[0], 685, 0, __PYX_ERR(0, 685, __pyx_L1_error));
jpayne@69 15224
jpayne@69 15225 /* "pysam/libctabix.pyx":686
jpayne@69 15226 *
jpayne@69 15227 * def __iter__(self):
jpayne@69 15228 * return self # <<<<<<<<<<<<<<
jpayne@69 15229 *
jpayne@69 15230 * def __next__(self):
jpayne@69 15231 */
jpayne@69 15232 __Pyx_XDECREF(__pyx_r);
jpayne@69 15233 __Pyx_INCREF(__pyx_v_self);
jpayne@69 15234 __pyx_r = __pyx_v_self;
jpayne@69 15235 goto __pyx_L0;
jpayne@69 15236
jpayne@69 15237 /* "pysam/libctabix.pyx":685
jpayne@69 15238 * '''empty iterator'''
jpayne@69 15239 *
jpayne@69 15240 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 15241 * return self
jpayne@69 15242 *
jpayne@69 15243 */
jpayne@69 15244
jpayne@69 15245 /* function exit code */
jpayne@69 15246 __pyx_L1_error:;
jpayne@69 15247 __Pyx_AddTraceback("pysam.libctabix.EmptyIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15248 __pyx_r = NULL;
jpayne@69 15249 __pyx_L0:;
jpayne@69 15250 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 15251 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 15252 __Pyx_RefNannyFinishContext();
jpayne@69 15253 return __pyx_r;
jpayne@69 15254 }
jpayne@69 15255
jpayne@69 15256 /* "pysam/libctabix.pyx":688
jpayne@69 15257 * return self
jpayne@69 15258 *
jpayne@69 15259 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 15260 * raise StopIteration()
jpayne@69 15261 *
jpayne@69 15262 */
jpayne@69 15263
jpayne@69 15264 /* Python wrapper */
jpayne@69 15265 static PyObject *__pyx_pw_5pysam_9libctabix_13EmptyIterator_3__next__(PyObject *__pyx_self,
jpayne@69 15266 #if CYTHON_METH_FASTCALL
jpayne@69 15267 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15268 #else
jpayne@69 15269 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15270 #endif
jpayne@69 15271 ); /*proto*/
jpayne@69 15272 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_13EmptyIterator_2__next__, "EmptyIterator.__next__(self)");
jpayne@69 15273 static PyMethodDef __pyx_mdef_5pysam_9libctabix_13EmptyIterator_3__next__ = {"__next__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_13EmptyIterator_3__next__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_13EmptyIterator_2__next__};
jpayne@69 15274 static PyObject *__pyx_pw_5pysam_9libctabix_13EmptyIterator_3__next__(PyObject *__pyx_self,
jpayne@69 15275 #if CYTHON_METH_FASTCALL
jpayne@69 15276 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15277 #else
jpayne@69 15278 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15279 #endif
jpayne@69 15280 ) {
jpayne@69 15281 CYTHON_UNUSED PyObject *__pyx_v_self = 0;
jpayne@69 15282 #if !CYTHON_METH_FASTCALL
jpayne@69 15283 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 15284 #endif
jpayne@69 15285 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15286 PyObject* values[1] = {0};
jpayne@69 15287 int __pyx_lineno = 0;
jpayne@69 15288 const char *__pyx_filename = NULL;
jpayne@69 15289 int __pyx_clineno = 0;
jpayne@69 15290 PyObject *__pyx_r = 0;
jpayne@69 15291 __Pyx_RefNannyDeclarations
jpayne@69 15292 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@69 15293 #if !CYTHON_METH_FASTCALL
jpayne@69 15294 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 15295 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 15296 #else
jpayne@69 15297 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 15298 #endif
jpayne@69 15299 #endif
jpayne@69 15300 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 15301 {
jpayne@69 15302 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
jpayne@69 15303 if (__pyx_kwds) {
jpayne@69 15304 Py_ssize_t kw_args;
jpayne@69 15305 switch (__pyx_nargs) {
jpayne@69 15306 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 15307 CYTHON_FALLTHROUGH;
jpayne@69 15308 case 0: break;
jpayne@69 15309 default: goto __pyx_L5_argtuple_error;
jpayne@69 15310 }
jpayne@69 15311 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 15312 switch (__pyx_nargs) {
jpayne@69 15313 case 0:
jpayne@69 15314 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
jpayne@69 15315 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 15316 kw_args--;
jpayne@69 15317 }
jpayne@69 15318 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 688, __pyx_L3_error)
jpayne@69 15319 else goto __pyx_L5_argtuple_error;
jpayne@69 15320 }
jpayne@69 15321 if (unlikely(kw_args > 0)) {
jpayne@69 15322 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 15323 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__next__") < 0)) __PYX_ERR(0, 688, __pyx_L3_error)
jpayne@69 15324 }
jpayne@69 15325 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 15326 goto __pyx_L5_argtuple_error;
jpayne@69 15327 } else {
jpayne@69 15328 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 15329 }
jpayne@69 15330 __pyx_v_self = values[0];
jpayne@69 15331 }
jpayne@69 15332 goto __pyx_L6_skip;
jpayne@69 15333 __pyx_L5_argtuple_error:;
jpayne@69 15334 __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 688, __pyx_L3_error)
jpayne@69 15335 __pyx_L6_skip:;
jpayne@69 15336 goto __pyx_L4_argument_unpacking_done;
jpayne@69 15337 __pyx_L3_error:;
jpayne@69 15338 {
jpayne@69 15339 Py_ssize_t __pyx_temp;
jpayne@69 15340 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15341 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 15342 }
jpayne@69 15343 }
jpayne@69 15344 __Pyx_AddTraceback("pysam.libctabix.EmptyIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15345 __Pyx_RefNannyFinishContext();
jpayne@69 15346 return NULL;
jpayne@69 15347 __pyx_L4_argument_unpacking_done:;
jpayne@69 15348 __pyx_r = __pyx_pf_5pysam_9libctabix_13EmptyIterator_2__next__(__pyx_self, __pyx_v_self);
jpayne@69 15349
jpayne@69 15350 /* function exit code */
jpayne@69 15351 {
jpayne@69 15352 Py_ssize_t __pyx_temp;
jpayne@69 15353 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15354 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 15355 }
jpayne@69 15356 }
jpayne@69 15357 __Pyx_RefNannyFinishContext();
jpayne@69 15358 return __pyx_r;
jpayne@69 15359 }
jpayne@69 15360
jpayne@69 15361 static PyObject *__pyx_pf_5pysam_9libctabix_13EmptyIterator_2__next__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
jpayne@69 15362 PyObject *__pyx_r = NULL;
jpayne@69 15363 __Pyx_TraceDeclarations
jpayne@69 15364 __Pyx_RefNannyDeclarations
jpayne@69 15365 PyObject *__pyx_t_1 = NULL;
jpayne@69 15366 int __pyx_lineno = 0;
jpayne@69 15367 const char *__pyx_filename = NULL;
jpayne@69 15368 int __pyx_clineno = 0;
jpayne@69 15369 __Pyx_TraceFrameInit(__pyx_codeobj__28)
jpayne@69 15370 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@69 15371 __Pyx_TraceCall("__next__", __pyx_f[0], 688, 0, __PYX_ERR(0, 688, __pyx_L1_error));
jpayne@69 15372
jpayne@69 15373 /* "pysam/libctabix.pyx":689
jpayne@69 15374 *
jpayne@69 15375 * def __next__(self):
jpayne@69 15376 * raise StopIteration() # <<<<<<<<<<<<<<
jpayne@69 15377 *
jpayne@69 15378 *
jpayne@69 15379 */
jpayne@69 15380 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_StopIteration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
jpayne@69 15381 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 15382 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 15383 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 15384 __PYX_ERR(0, 689, __pyx_L1_error)
jpayne@69 15385
jpayne@69 15386 /* "pysam/libctabix.pyx":688
jpayne@69 15387 * return self
jpayne@69 15388 *
jpayne@69 15389 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 15390 * raise StopIteration()
jpayne@69 15391 *
jpayne@69 15392 */
jpayne@69 15393
jpayne@69 15394 /* function exit code */
jpayne@69 15395 __pyx_L1_error:;
jpayne@69 15396 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 15397 __Pyx_AddTraceback("pysam.libctabix.EmptyIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15398 __pyx_r = NULL;
jpayne@69 15399 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 15400 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 15401 __Pyx_RefNannyFinishContext();
jpayne@69 15402 return __pyx_r;
jpayne@69 15403 }
jpayne@69 15404
jpayne@69 15405 /* "pysam/libctabix.pyx":700
jpayne@69 15406 * """
jpayne@69 15407 *
jpayne@69 15408 * def __init__(self, Parser parser): # <<<<<<<<<<<<<<
jpayne@69 15409 * super().__init__()
jpayne@69 15410 * self.parser = parser
jpayne@69 15411 */
jpayne@69 15412
jpayne@69 15413 /* Python wrapper */
jpayne@69 15414 static int __pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 15415 static int __pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 15416 struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_parser = 0;
jpayne@69 15417 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 15418 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15419 PyObject* values[1] = {0};
jpayne@69 15420 int __pyx_lineno = 0;
jpayne@69 15421 const char *__pyx_filename = NULL;
jpayne@69 15422 int __pyx_clineno = 0;
jpayne@69 15423 int __pyx_r;
jpayne@69 15424 __Pyx_RefNannyDeclarations
jpayne@69 15425 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@69 15426 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 15427 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 15428 #else
jpayne@69 15429 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@69 15430 #endif
jpayne@69 15431 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 15432 {
jpayne@69 15433 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parser,0};
jpayne@69 15434 if (__pyx_kwds) {
jpayne@69 15435 Py_ssize_t kw_args;
jpayne@69 15436 switch (__pyx_nargs) {
jpayne@69 15437 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 15438 CYTHON_FALLTHROUGH;
jpayne@69 15439 case 0: break;
jpayne@69 15440 default: goto __pyx_L5_argtuple_error;
jpayne@69 15441 }
jpayne@69 15442 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@69 15443 switch (__pyx_nargs) {
jpayne@69 15444 case 0:
jpayne@69 15445 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser)) != 0)) {
jpayne@69 15446 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@69 15447 kw_args--;
jpayne@69 15448 }
jpayne@69 15449 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L3_error)
jpayne@69 15450 else goto __pyx_L5_argtuple_error;
jpayne@69 15451 }
jpayne@69 15452 if (unlikely(kw_args > 0)) {
jpayne@69 15453 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 15454 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 700, __pyx_L3_error)
jpayne@69 15455 }
jpayne@69 15456 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 15457 goto __pyx_L5_argtuple_error;
jpayne@69 15458 } else {
jpayne@69 15459 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 15460 }
jpayne@69 15461 __pyx_v_parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)values[0]);
jpayne@69 15462 }
jpayne@69 15463 goto __pyx_L6_skip;
jpayne@69 15464 __pyx_L5_argtuple_error:;
jpayne@69 15465 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 700, __pyx_L3_error)
jpayne@69 15466 __pyx_L6_skip:;
jpayne@69 15467 goto __pyx_L4_argument_unpacking_done;
jpayne@69 15468 __pyx_L3_error:;
jpayne@69 15469 {
jpayne@69 15470 Py_ssize_t __pyx_temp;
jpayne@69 15471 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15472 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 15473 }
jpayne@69 15474 }
jpayne@69 15475 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15476 __Pyx_RefNannyFinishContext();
jpayne@69 15477 return -1;
jpayne@69 15478 __pyx_L4_argument_unpacking_done:;
jpayne@69 15479 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_5pysam_9libctabix_Parser, 1, "parser", 0))) __PYX_ERR(0, 700, __pyx_L1_error)
jpayne@69 15480 __pyx_r = __pyx_pf_5pysam_9libctabix_19TabixIteratorParsed___init__(((struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)__pyx_v_self), __pyx_v_parser);
jpayne@69 15481
jpayne@69 15482 /* function exit code */
jpayne@69 15483 goto __pyx_L0;
jpayne@69 15484 __pyx_L1_error:;
jpayne@69 15485 __pyx_r = -1;
jpayne@69 15486 __pyx_L0:;
jpayne@69 15487 {
jpayne@69 15488 Py_ssize_t __pyx_temp;
jpayne@69 15489 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15490 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 15491 }
jpayne@69 15492 }
jpayne@69 15493 __Pyx_RefNannyFinishContext();
jpayne@69 15494 return __pyx_r;
jpayne@69 15495 }
jpayne@69 15496
jpayne@69 15497 static int __pyx_pf_5pysam_9libctabix_19TabixIteratorParsed___init__(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self, struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_parser) {
jpayne@69 15498 int __pyx_r;
jpayne@69 15499 __Pyx_TraceDeclarations
jpayne@69 15500 __Pyx_RefNannyDeclarations
jpayne@69 15501 PyObject *__pyx_t_1 = NULL;
jpayne@69 15502 PyObject *__pyx_t_2 = NULL;
jpayne@69 15503 PyObject *__pyx_t_3 = NULL;
jpayne@69 15504 unsigned int __pyx_t_4;
jpayne@69 15505 int __pyx_lineno = 0;
jpayne@69 15506 const char *__pyx_filename = NULL;
jpayne@69 15507 int __pyx_clineno = 0;
jpayne@69 15508 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@69 15509 __Pyx_TraceCall("__init__", __pyx_f[0], 700, 0, __PYX_ERR(0, 700, __pyx_L1_error));
jpayne@69 15510
jpayne@69 15511 /* "pysam/libctabix.pyx":701
jpayne@69 15512 *
jpayne@69 15513 * def __init__(self, Parser parser):
jpayne@69 15514 * super().__init__() # <<<<<<<<<<<<<<
jpayne@69 15515 * self.parser = parser
jpayne@69 15516 *
jpayne@69 15517 */
jpayne@69 15518 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
jpayne@69 15519 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 15520 __Pyx_INCREF((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed);
jpayne@69 15521 __Pyx_GIVEREF((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed);
jpayne@69 15522 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed))) __PYX_ERR(0, 701, __pyx_L1_error);
jpayne@69 15523 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@69 15524 __Pyx_GIVEREF((PyObject *)__pyx_v_self);
jpayne@69 15525 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 701, __pyx_L1_error);
jpayne@69 15526 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error)
jpayne@69 15527 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 15528 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 15529 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
jpayne@69 15530 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 15531 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 15532 __pyx_t_3 = NULL;
jpayne@69 15533 __pyx_t_4 = 0;
jpayne@69 15534 #if CYTHON_UNPACK_METHODS
jpayne@69 15535 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 15536 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 15537 if (likely(__pyx_t_3)) {
jpayne@69 15538 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 15539 __Pyx_INCREF(__pyx_t_3);
jpayne@69 15540 __Pyx_INCREF(function);
jpayne@69 15541 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 15542 __pyx_t_4 = 1;
jpayne@69 15543 }
jpayne@69 15544 }
jpayne@69 15545 #endif
jpayne@69 15546 {
jpayne@69 15547 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@69 15548 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 15549 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 15550 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
jpayne@69 15551 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 15552 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 15553 }
jpayne@69 15554 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 15555
jpayne@69 15556 /* "pysam/libctabix.pyx":702
jpayne@69 15557 * def __init__(self, Parser parser):
jpayne@69 15558 * super().__init__()
jpayne@69 15559 * self.parser = parser # <<<<<<<<<<<<<<
jpayne@69 15560 *
jpayne@69 15561 * def __next__(self):
jpayne@69 15562 */
jpayne@69 15563 __Pyx_INCREF((PyObject *)__pyx_v_parser);
jpayne@69 15564 __Pyx_GIVEREF((PyObject *)__pyx_v_parser);
jpayne@69 15565 __Pyx_GOTREF((PyObject *)__pyx_v_self->parser);
jpayne@69 15566 __Pyx_DECREF((PyObject *)__pyx_v_self->parser);
jpayne@69 15567 __pyx_v_self->parser = __pyx_v_parser;
jpayne@69 15568
jpayne@69 15569 /* "pysam/libctabix.pyx":700
jpayne@69 15570 * """
jpayne@69 15571 *
jpayne@69 15572 * def __init__(self, Parser parser): # <<<<<<<<<<<<<<
jpayne@69 15573 * super().__init__()
jpayne@69 15574 * self.parser = parser
jpayne@69 15575 */
jpayne@69 15576
jpayne@69 15577 /* function exit code */
jpayne@69 15578 __pyx_r = 0;
jpayne@69 15579 goto __pyx_L0;
jpayne@69 15580 __pyx_L1_error:;
jpayne@69 15581 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 15582 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 15583 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 15584 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15585 __pyx_r = -1;
jpayne@69 15586 __pyx_L0:;
jpayne@69 15587 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 15588 __Pyx_RefNannyFinishContext();
jpayne@69 15589 return __pyx_r;
jpayne@69 15590 }
jpayne@69 15591
jpayne@69 15592 /* "pysam/libctabix.pyx":704
jpayne@69 15593 * self.parser = parser
jpayne@69 15594 *
jpayne@69 15595 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 15596 * """python version of next().
jpayne@69 15597 *
jpayne@69 15598 */
jpayne@69 15599
jpayne@69 15600 /* Python wrapper */
jpayne@69 15601 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 15602 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_2__next__, "python version of next().\n\n pyrex uses this non-standard name instead of next()\n ");
jpayne@69 15603 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 15604 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_19TabixIteratorParsed_2__next__;
jpayne@69 15605 #endif
jpayne@69 15606 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__(PyObject *__pyx_v_self) {
jpayne@69 15607 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15608 PyObject *__pyx_r = 0;
jpayne@69 15609 __Pyx_RefNannyDeclarations
jpayne@69 15610 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@69 15611 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 15612 __pyx_r = __pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_2__next__(((struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)__pyx_v_self));
jpayne@69 15613
jpayne@69 15614 /* function exit code */
jpayne@69 15615 __Pyx_RefNannyFinishContext();
jpayne@69 15616 return __pyx_r;
jpayne@69 15617 }
jpayne@69 15618
jpayne@69 15619 static PyObject *__pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_2__next__(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self) {
jpayne@69 15620 int __pyx_v_retval;
jpayne@69 15621 PyObject *__pyx_r = NULL;
jpayne@69 15622 __Pyx_TraceDeclarations
jpayne@69 15623 __Pyx_RefNannyDeclarations
jpayne@69 15624 int __pyx_error_without_exception = 0; /* StopIteration */
jpayne@69 15625 int __pyx_t_1;
jpayne@69 15626 int __pyx_t_2;
jpayne@69 15627 PyObject *__pyx_t_3 = NULL;
jpayne@69 15628 int __pyx_lineno = 0;
jpayne@69 15629 const char *__pyx_filename = NULL;
jpayne@69 15630 int __pyx_clineno = 0;
jpayne@69 15631 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@69 15632 __Pyx_TraceCall("__next__", __pyx_f[0], 704, 0, __PYX_ERR(0, 704, __pyx_L1_error));
jpayne@69 15633
jpayne@69 15634 /* "pysam/libctabix.pyx":710
jpayne@69 15635 * """
jpayne@69 15636 *
jpayne@69 15637 * cdef int retval = self.__cnext__() # <<<<<<<<<<<<<<
jpayne@69 15638 * if retval == -5:
jpayne@69 15639 * raise IOError("iteration on closed file")
jpayne@69 15640 */
jpayne@69 15641 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9libctabix_TabixIteratorParsed *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.__pyx___cnext__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L1_error)
jpayne@69 15642 __pyx_v_retval = __pyx_t_1;
jpayne@69 15643
jpayne@69 15644 /* "pysam/libctabix.pyx":711
jpayne@69 15645 *
jpayne@69 15646 * cdef int retval = self.__cnext__()
jpayne@69 15647 * if retval == -5: # <<<<<<<<<<<<<<
jpayne@69 15648 * raise IOError("iteration on closed file")
jpayne@69 15649 * elif retval < 0:
jpayne@69 15650 */
jpayne@69 15651 __pyx_t_2 = (__pyx_v_retval == -5L);
jpayne@69 15652 if (unlikely(__pyx_t_2)) {
jpayne@69 15653
jpayne@69 15654 /* "pysam/libctabix.pyx":712
jpayne@69 15655 * cdef int retval = self.__cnext__()
jpayne@69 15656 * if retval == -5:
jpayne@69 15657 * raise IOError("iteration on closed file") # <<<<<<<<<<<<<<
jpayne@69 15658 * elif retval < 0:
jpayne@69 15659 * raise StopIteration
jpayne@69 15660 */
jpayne@69 15661 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __pyx_L1_error)
jpayne@69 15662 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 15663 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 15664 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 15665 __PYX_ERR(0, 712, __pyx_L1_error)
jpayne@69 15666
jpayne@69 15667 /* "pysam/libctabix.pyx":711
jpayne@69 15668 *
jpayne@69 15669 * cdef int retval = self.__cnext__()
jpayne@69 15670 * if retval == -5: # <<<<<<<<<<<<<<
jpayne@69 15671 * raise IOError("iteration on closed file")
jpayne@69 15672 * elif retval < 0:
jpayne@69 15673 */
jpayne@69 15674 }
jpayne@69 15675
jpayne@69 15676 /* "pysam/libctabix.pyx":713
jpayne@69 15677 * if retval == -5:
jpayne@69 15678 * raise IOError("iteration on closed file")
jpayne@69 15679 * elif retval < 0: # <<<<<<<<<<<<<<
jpayne@69 15680 * raise StopIteration
jpayne@69 15681 *
jpayne@69 15682 */
jpayne@69 15683 __pyx_t_2 = (__pyx_v_retval < 0);
jpayne@69 15684 if (unlikely(__pyx_t_2)) {
jpayne@69 15685
jpayne@69 15686 /* "pysam/libctabix.pyx":714
jpayne@69 15687 * raise IOError("iteration on closed file")
jpayne@69 15688 * elif retval < 0:
jpayne@69 15689 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@69 15690 *
jpayne@69 15691 * return self.parser.parse(self.buffer.s,
jpayne@69 15692 */
jpayne@69 15693 __pyx_error_without_exception = 1;
jpayne@69 15694 goto __pyx_L1_error;;
jpayne@69 15695
jpayne@69 15696 /* "pysam/libctabix.pyx":713
jpayne@69 15697 * if retval == -5:
jpayne@69 15698 * raise IOError("iteration on closed file")
jpayne@69 15699 * elif retval < 0: # <<<<<<<<<<<<<<
jpayne@69 15700 * raise StopIteration
jpayne@69 15701 *
jpayne@69 15702 */
jpayne@69 15703 }
jpayne@69 15704
jpayne@69 15705 /* "pysam/libctabix.pyx":716
jpayne@69 15706 * raise StopIteration
jpayne@69 15707 *
jpayne@69 15708 * return self.parser.parse(self.buffer.s, # <<<<<<<<<<<<<<
jpayne@69 15709 * self.buffer.l)
jpayne@69 15710 *
jpayne@69 15711 */
jpayne@69 15712 __Pyx_XDECREF(__pyx_r);
jpayne@69 15713
jpayne@69 15714 /* "pysam/libctabix.pyx":717
jpayne@69 15715 *
jpayne@69 15716 * return self.parser.parse(self.buffer.s,
jpayne@69 15717 * self.buffer.l) # <<<<<<<<<<<<<<
jpayne@69 15718 *
jpayne@69 15719 *
jpayne@69 15720 */
jpayne@69 15721 __pyx_t_3 = ((struct __pyx_vtabstruct_5pysam_9libctabix_Parser *)__pyx_v_self->parser->__pyx_vtab)->parse(__pyx_v_self->parser, __pyx_v_self->__pyx_base.buffer.s, __pyx_v_self->__pyx_base.buffer.l); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
jpayne@69 15722 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 15723 __pyx_r = __pyx_t_3;
jpayne@69 15724 __pyx_t_3 = 0;
jpayne@69 15725 goto __pyx_L0;
jpayne@69 15726
jpayne@69 15727 /* "pysam/libctabix.pyx":704
jpayne@69 15728 * self.parser = parser
jpayne@69 15729 *
jpayne@69 15730 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 15731 * """python version of next().
jpayne@69 15732 *
jpayne@69 15733 */
jpayne@69 15734
jpayne@69 15735 /* function exit code */
jpayne@69 15736 __pyx_L1_error:;
jpayne@69 15737 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 15738 if (!__pyx_error_without_exception) {
jpayne@69 15739 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15740 }
jpayne@69 15741 __pyx_r = NULL;
jpayne@69 15742 __pyx_L0:;
jpayne@69 15743 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 15744 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 15745 __Pyx_RefNannyFinishContext();
jpayne@69 15746 return __pyx_r;
jpayne@69 15747 }
jpayne@69 15748
jpayne@69 15749 /* "(tree fragment)":1
jpayne@69 15750 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 15751 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 15752 * def __setstate_cython__(self, __pyx_state):
jpayne@69 15753 */
jpayne@69 15754
jpayne@69 15755 /* Python wrapper */
jpayne@69 15756 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_5__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 15757 #if CYTHON_METH_FASTCALL
jpayne@69 15758 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15759 #else
jpayne@69 15760 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15761 #endif
jpayne@69 15762 ); /*proto*/
jpayne@69 15763 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_4__reduce_cython__, "TabixIteratorParsed.__reduce_cython__(self)");
jpayne@69 15764 static PyMethodDef __pyx_mdef_5pysam_9libctabix_19TabixIteratorParsed_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_4__reduce_cython__};
jpayne@69 15765 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_5__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 15766 #if CYTHON_METH_FASTCALL
jpayne@69 15767 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15768 #else
jpayne@69 15769 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15770 #endif
jpayne@69 15771 ) {
jpayne@69 15772 #if !CYTHON_METH_FASTCALL
jpayne@69 15773 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 15774 #endif
jpayne@69 15775 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15776 PyObject *__pyx_r = 0;
jpayne@69 15777 __Pyx_RefNannyDeclarations
jpayne@69 15778 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 15779 #if !CYTHON_METH_FASTCALL
jpayne@69 15780 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 15781 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 15782 #else
jpayne@69 15783 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 15784 #endif
jpayne@69 15785 #endif
jpayne@69 15786 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 15787 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 15788 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 15789 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 15790 __pyx_r = __pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_4__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)__pyx_v_self));
jpayne@69 15791
jpayne@69 15792 /* function exit code */
jpayne@69 15793 __Pyx_RefNannyFinishContext();
jpayne@69 15794 return __pyx_r;
jpayne@69 15795 }
jpayne@69 15796
jpayne@69 15797 static PyObject *__pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self) {
jpayne@69 15798 PyObject *__pyx_r = NULL;
jpayne@69 15799 __Pyx_TraceDeclarations
jpayne@69 15800 __Pyx_RefNannyDeclarations
jpayne@69 15801 int __pyx_lineno = 0;
jpayne@69 15802 const char *__pyx_filename = NULL;
jpayne@69 15803 int __pyx_clineno = 0;
jpayne@69 15804 __Pyx_TraceFrameInit(__pyx_codeobj__29)
jpayne@69 15805 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 15806 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 15807
jpayne@69 15808 /* "(tree fragment)":2
jpayne@69 15809 * def __reduce_cython__(self):
jpayne@69 15810 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 15811 * def __setstate_cython__(self, __pyx_state):
jpayne@69 15812 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 15813 */
jpayne@69 15814 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iterator_cannot_be_converte, 0, 0);
jpayne@69 15815 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 15816
jpayne@69 15817 /* "(tree fragment)":1
jpayne@69 15818 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 15819 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 15820 * def __setstate_cython__(self, __pyx_state):
jpayne@69 15821 */
jpayne@69 15822
jpayne@69 15823 /* function exit code */
jpayne@69 15824 __pyx_L1_error:;
jpayne@69 15825 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15826 __pyx_r = NULL;
jpayne@69 15827 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 15828 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 15829 __Pyx_RefNannyFinishContext();
jpayne@69 15830 return __pyx_r;
jpayne@69 15831 }
jpayne@69 15832
jpayne@69 15833 /* "(tree fragment)":3
jpayne@69 15834 * def __reduce_cython__(self):
jpayne@69 15835 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 15836 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 15837 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 15838 */
jpayne@69 15839
jpayne@69 15840 /* Python wrapper */
jpayne@69 15841 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_7__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 15842 #if CYTHON_METH_FASTCALL
jpayne@69 15843 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15844 #else
jpayne@69 15845 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15846 #endif
jpayne@69 15847 ); /*proto*/
jpayne@69 15848 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_6__setstate_cython__, "TabixIteratorParsed.__setstate_cython__(self, __pyx_state)");
jpayne@69 15849 static PyMethodDef __pyx_mdef_5pysam_9libctabix_19TabixIteratorParsed_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_6__setstate_cython__};
jpayne@69 15850 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_7__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 15851 #if CYTHON_METH_FASTCALL
jpayne@69 15852 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15853 #else
jpayne@69 15854 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15855 #endif
jpayne@69 15856 ) {
jpayne@69 15857 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 15858 #if !CYTHON_METH_FASTCALL
jpayne@69 15859 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 15860 #endif
jpayne@69 15861 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15862 PyObject* values[1] = {0};
jpayne@69 15863 int __pyx_lineno = 0;
jpayne@69 15864 const char *__pyx_filename = NULL;
jpayne@69 15865 int __pyx_clineno = 0;
jpayne@69 15866 PyObject *__pyx_r = 0;
jpayne@69 15867 __Pyx_RefNannyDeclarations
jpayne@69 15868 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 15869 #if !CYTHON_METH_FASTCALL
jpayne@69 15870 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 15871 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 15872 #else
jpayne@69 15873 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 15874 #endif
jpayne@69 15875 #endif
jpayne@69 15876 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 15877 {
jpayne@69 15878 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 15879 if (__pyx_kwds) {
jpayne@69 15880 Py_ssize_t kw_args;
jpayne@69 15881 switch (__pyx_nargs) {
jpayne@69 15882 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 15883 CYTHON_FALLTHROUGH;
jpayne@69 15884 case 0: break;
jpayne@69 15885 default: goto __pyx_L5_argtuple_error;
jpayne@69 15886 }
jpayne@69 15887 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 15888 switch (__pyx_nargs) {
jpayne@69 15889 case 0:
jpayne@69 15890 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 15891 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 15892 kw_args--;
jpayne@69 15893 }
jpayne@69 15894 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 15895 else goto __pyx_L5_argtuple_error;
jpayne@69 15896 }
jpayne@69 15897 if (unlikely(kw_args > 0)) {
jpayne@69 15898 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 15899 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)
jpayne@69 15900 }
jpayne@69 15901 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 15902 goto __pyx_L5_argtuple_error;
jpayne@69 15903 } else {
jpayne@69 15904 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 15905 }
jpayne@69 15906 __pyx_v___pyx_state = values[0];
jpayne@69 15907 }
jpayne@69 15908 goto __pyx_L6_skip;
jpayne@69 15909 __pyx_L5_argtuple_error:;
jpayne@69 15910 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 15911 __pyx_L6_skip:;
jpayne@69 15912 goto __pyx_L4_argument_unpacking_done;
jpayne@69 15913 __pyx_L3_error:;
jpayne@69 15914 {
jpayne@69 15915 Py_ssize_t __pyx_temp;
jpayne@69 15916 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15917 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 15918 }
jpayne@69 15919 }
jpayne@69 15920 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15921 __Pyx_RefNannyFinishContext();
jpayne@69 15922 return NULL;
jpayne@69 15923 __pyx_L4_argument_unpacking_done:;
jpayne@69 15924 __pyx_r = __pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_6__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 15925
jpayne@69 15926 /* function exit code */
jpayne@69 15927 {
jpayne@69 15928 Py_ssize_t __pyx_temp;
jpayne@69 15929 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15930 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 15931 }
jpayne@69 15932 }
jpayne@69 15933 __Pyx_RefNannyFinishContext();
jpayne@69 15934 return __pyx_r;
jpayne@69 15935 }
jpayne@69 15936
jpayne@69 15937 static PyObject *__pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 15938 PyObject *__pyx_r = NULL;
jpayne@69 15939 __Pyx_TraceDeclarations
jpayne@69 15940 __Pyx_RefNannyDeclarations
jpayne@69 15941 int __pyx_lineno = 0;
jpayne@69 15942 const char *__pyx_filename = NULL;
jpayne@69 15943 int __pyx_clineno = 0;
jpayne@69 15944 __Pyx_TraceFrameInit(__pyx_codeobj__30)
jpayne@69 15945 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 15946 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 15947
jpayne@69 15948 /* "(tree fragment)":4
jpayne@69 15949 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 15950 * def __setstate_cython__(self, __pyx_state):
jpayne@69 15951 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 15952 */
jpayne@69 15953 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iterator_cannot_be_converte, 0, 0);
jpayne@69 15954 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 15955
jpayne@69 15956 /* "(tree fragment)":3
jpayne@69 15957 * def __reduce_cython__(self):
jpayne@69 15958 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 15959 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 15960 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 15961 */
jpayne@69 15962
jpayne@69 15963 /* function exit code */
jpayne@69 15964 __pyx_L1_error:;
jpayne@69 15965 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15966 __pyx_r = NULL;
jpayne@69 15967 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 15968 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 15969 __Pyx_RefNannyFinishContext();
jpayne@69 15970 return __pyx_r;
jpayne@69 15971 }
jpayne@69 15972
jpayne@69 15973 /* "pysam/libctabix.pyx":721
jpayne@69 15974 *
jpayne@69 15975 * cdef class GZIterator:
jpayne@69 15976 * def __init__(self, filename, int buffer_size=65536, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@69 15977 * '''iterate line-by-line through gzip (or bgzip)
jpayne@69 15978 * compressed file.
jpayne@69 15979 */
jpayne@69 15980
jpayne@69 15981 /* Python wrapper */
jpayne@69 15982 static int __pyx_pw_5pysam_9libctabix_10GZIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 15983 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_10GZIterator___init__, "iterate line-by-line through gzip (or bgzip)\n compressed file.\n ");
jpayne@69 15984 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 15985 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_10GZIterator___init__;
jpayne@69 15986 #endif
jpayne@69 15987 static int __pyx_pw_5pysam_9libctabix_10GZIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 15988 PyObject *__pyx_v_filename = 0;
jpayne@69 15989 int __pyx_v_buffer_size;
jpayne@69 15990 PyObject *__pyx_v_encoding = 0;
jpayne@69 15991 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 15992 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15993 PyObject* values[3] = {0,0,0};
jpayne@69 15994 int __pyx_lineno = 0;
jpayne@69 15995 const char *__pyx_filename = NULL;
jpayne@69 15996 int __pyx_clineno = 0;
jpayne@69 15997 int __pyx_r;
jpayne@69 15998 __Pyx_RefNannyDeclarations
jpayne@69 15999 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@69 16000 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 16001 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 16002 #else
jpayne@69 16003 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@69 16004 #endif
jpayne@69 16005 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 16006 {
jpayne@69 16007 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_buffer_size,&__pyx_n_s_encoding,0};
jpayne@69 16008 values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_u_ascii));
jpayne@69 16009 if (__pyx_kwds) {
jpayne@69 16010 Py_ssize_t kw_args;
jpayne@69 16011 switch (__pyx_nargs) {
jpayne@69 16012 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@69 16013 CYTHON_FALLTHROUGH;
jpayne@69 16014 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@69 16015 CYTHON_FALLTHROUGH;
jpayne@69 16016 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 16017 CYTHON_FALLTHROUGH;
jpayne@69 16018 case 0: break;
jpayne@69 16019 default: goto __pyx_L5_argtuple_error;
jpayne@69 16020 }
jpayne@69 16021 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@69 16022 switch (__pyx_nargs) {
jpayne@69 16023 case 0:
jpayne@69 16024 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
jpayne@69 16025 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@69 16026 kw_args--;
jpayne@69 16027 }
jpayne@69 16028 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 721, __pyx_L3_error)
jpayne@69 16029 else goto __pyx_L5_argtuple_error;
jpayne@69 16030 CYTHON_FALLTHROUGH;
jpayne@69 16031 case 1:
jpayne@69 16032 if (kw_args > 0) {
jpayne@69 16033 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffer_size);
jpayne@69 16034 if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 16035 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 721, __pyx_L3_error)
jpayne@69 16036 }
jpayne@69 16037 CYTHON_FALLTHROUGH;
jpayne@69 16038 case 2:
jpayne@69 16039 if (kw_args > 0) {
jpayne@69 16040 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding);
jpayne@69 16041 if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 16042 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 721, __pyx_L3_error)
jpayne@69 16043 }
jpayne@69 16044 }
jpayne@69 16045 if (unlikely(kw_args > 0)) {
jpayne@69 16046 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 16047 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 721, __pyx_L3_error)
jpayne@69 16048 }
jpayne@69 16049 } else {
jpayne@69 16050 switch (__pyx_nargs) {
jpayne@69 16051 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@69 16052 CYTHON_FALLTHROUGH;
jpayne@69 16053 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@69 16054 CYTHON_FALLTHROUGH;
jpayne@69 16055 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 16056 break;
jpayne@69 16057 default: goto __pyx_L5_argtuple_error;
jpayne@69 16058 }
jpayne@69 16059 }
jpayne@69 16060 __pyx_v_filename = values[0];
jpayne@69 16061 if (values[1]) {
jpayne@69 16062 __pyx_v_buffer_size = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_buffer_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 721, __pyx_L3_error)
jpayne@69 16063 } else {
jpayne@69 16064 __pyx_v_buffer_size = ((int)0x10000);
jpayne@69 16065 }
jpayne@69 16066 __pyx_v_encoding = values[2];
jpayne@69 16067 }
jpayne@69 16068 goto __pyx_L6_skip;
jpayne@69 16069 __pyx_L5_argtuple_error:;
jpayne@69 16070 __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 721, __pyx_L3_error)
jpayne@69 16071 __pyx_L6_skip:;
jpayne@69 16072 goto __pyx_L4_argument_unpacking_done;
jpayne@69 16073 __pyx_L3_error:;
jpayne@69 16074 {
jpayne@69 16075 Py_ssize_t __pyx_temp;
jpayne@69 16076 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 16077 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 16078 }
jpayne@69 16079 }
jpayne@69 16080 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16081 __Pyx_RefNannyFinishContext();
jpayne@69 16082 return -1;
jpayne@69 16083 __pyx_L4_argument_unpacking_done:;
jpayne@69 16084 __pyx_r = __pyx_pf_5pysam_9libctabix_10GZIterator___init__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self), __pyx_v_filename, __pyx_v_buffer_size, __pyx_v_encoding);
jpayne@69 16085
jpayne@69 16086 /* function exit code */
jpayne@69 16087 {
jpayne@69 16088 Py_ssize_t __pyx_temp;
jpayne@69 16089 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 16090 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 16091 }
jpayne@69 16092 }
jpayne@69 16093 __Pyx_RefNannyFinishContext();
jpayne@69 16094 return __pyx_r;
jpayne@69 16095 }
jpayne@69 16096
jpayne@69 16097 static int __pyx_pf_5pysam_9libctabix_10GZIterator___init__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self, PyObject *__pyx_v_filename, int __pyx_v_buffer_size, PyObject *__pyx_v_encoding) {
jpayne@69 16098 char *__pyx_v_cfilename;
jpayne@69 16099 int __pyx_r;
jpayne@69 16100 __Pyx_TraceDeclarations
jpayne@69 16101 __Pyx_RefNannyDeclarations
jpayne@69 16102 PyObject *__pyx_t_1 = NULL;
jpayne@69 16103 PyObject *__pyx_t_2 = NULL;
jpayne@69 16104 PyObject *__pyx_t_3 = NULL;
jpayne@69 16105 unsigned int __pyx_t_4;
jpayne@69 16106 int __pyx_t_5;
jpayne@69 16107 int __pyx_t_6;
jpayne@69 16108 char *__pyx_t_7;
jpayne@69 16109 int __pyx_lineno = 0;
jpayne@69 16110 const char *__pyx_filename = NULL;
jpayne@69 16111 int __pyx_clineno = 0;
jpayne@69 16112 __Pyx_RefNannySetupContext("__init__", 0);
jpayne@69 16113 __Pyx_TraceCall("__init__", __pyx_f[0], 721, 0, __PYX_ERR(0, 721, __pyx_L1_error));
jpayne@69 16114 __Pyx_INCREF(__pyx_v_filename);
jpayne@69 16115
jpayne@69 16116 /* "pysam/libctabix.pyx":725
jpayne@69 16117 * compressed file.
jpayne@69 16118 * '''
jpayne@69 16119 * if not os.path.exists(filename): # <<<<<<<<<<<<<<
jpayne@69 16120 * raise IOError("No such file or directory: %s" % filename)
jpayne@69 16121 *
jpayne@69 16122 */
jpayne@69 16123 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error)
jpayne@69 16124 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 16125 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error)
jpayne@69 16126 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 16127 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 16128 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exists); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error)
jpayne@69 16129 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 16130 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 16131 __pyx_t_3 = NULL;
jpayne@69 16132 __pyx_t_4 = 0;
jpayne@69 16133 #if CYTHON_UNPACK_METHODS
jpayne@69 16134 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 16135 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 16136 if (likely(__pyx_t_3)) {
jpayne@69 16137 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 16138 __Pyx_INCREF(__pyx_t_3);
jpayne@69 16139 __Pyx_INCREF(function);
jpayne@69 16140 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 16141 __pyx_t_4 = 1;
jpayne@69 16142 }
jpayne@69 16143 }
jpayne@69 16144 #endif
jpayne@69 16145 {
jpayne@69 16146 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_filename};
jpayne@69 16147 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
jpayne@69 16148 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 16149 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error)
jpayne@69 16150 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 16151 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 16152 }
jpayne@69 16153 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 725, __pyx_L1_error)
jpayne@69 16154 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 16155 __pyx_t_6 = (!__pyx_t_5);
jpayne@69 16156 if (unlikely(__pyx_t_6)) {
jpayne@69 16157
jpayne@69 16158 /* "pysam/libctabix.pyx":726
jpayne@69 16159 * '''
jpayne@69 16160 * if not os.path.exists(filename):
jpayne@69 16161 * raise IOError("No such file or directory: %s" % filename) # <<<<<<<<<<<<<<
jpayne@69 16162 *
jpayne@69 16163 * filename = encode_filename(filename)
jpayne@69 16164 */
jpayne@69 16165 __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_No_such_file_or_directory_s, __pyx_v_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
jpayne@69 16166 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 16167 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error)
jpayne@69 16168 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 16169 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 16170 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 16171 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 16172 __PYX_ERR(0, 726, __pyx_L1_error)
jpayne@69 16173
jpayne@69 16174 /* "pysam/libctabix.pyx":725
jpayne@69 16175 * compressed file.
jpayne@69 16176 * '''
jpayne@69 16177 * if not os.path.exists(filename): # <<<<<<<<<<<<<<
jpayne@69 16178 * raise IOError("No such file or directory: %s" % filename)
jpayne@69 16179 *
jpayne@69 16180 */
jpayne@69 16181 }
jpayne@69 16182
jpayne@69 16183 /* "pysam/libctabix.pyx":728
jpayne@69 16184 * raise IOError("No such file or directory: %s" % filename)
jpayne@69 16185 *
jpayne@69 16186 * filename = encode_filename(filename) # <<<<<<<<<<<<<<
jpayne@69 16187 * cdef char *cfilename = filename
jpayne@69 16188 * with nogil:
jpayne@69 16189 */
jpayne@69 16190 __pyx_t_2 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error)
jpayne@69 16191 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 16192 __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_2);
jpayne@69 16193 __pyx_t_2 = 0;
jpayne@69 16194
jpayne@69 16195 /* "pysam/libctabix.pyx":729
jpayne@69 16196 *
jpayne@69 16197 * filename = encode_filename(filename)
jpayne@69 16198 * cdef char *cfilename = filename # <<<<<<<<<<<<<<
jpayne@69 16199 * with nogil:
jpayne@69 16200 * self.gzipfile = bgzf_open(cfilename, "r")
jpayne@69 16201 */
jpayne@69 16202 __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_filename); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 729, __pyx_L1_error)
jpayne@69 16203 __pyx_v_cfilename = __pyx_t_7;
jpayne@69 16204
jpayne@69 16205 /* "pysam/libctabix.pyx":730
jpayne@69 16206 * filename = encode_filename(filename)
jpayne@69 16207 * cdef char *cfilename = filename
jpayne@69 16208 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 16209 * self.gzipfile = bgzf_open(cfilename, "r")
jpayne@69 16210 * self._filename = filename
jpayne@69 16211 */
jpayne@69 16212 {
jpayne@69 16213 #ifdef WITH_THREAD
jpayne@69 16214 PyThreadState *_save;
jpayne@69 16215 _save = NULL;
jpayne@69 16216 Py_UNBLOCK_THREADS
jpayne@69 16217 __Pyx_FastGIL_Remember();
jpayne@69 16218 #endif
jpayne@69 16219 /*try:*/ {
jpayne@69 16220
jpayne@69 16221 /* "pysam/libctabix.pyx":731
jpayne@69 16222 * cdef char *cfilename = filename
jpayne@69 16223 * with nogil:
jpayne@69 16224 * self.gzipfile = bgzf_open(cfilename, "r") # <<<<<<<<<<<<<<
jpayne@69 16225 * self._filename = filename
jpayne@69 16226 * self.kstream = ks_init(self.gzipfile)
jpayne@69 16227 */
jpayne@69 16228 __pyx_v_self->gzipfile = bgzf_open(__pyx_v_cfilename, ((char const *)"r"));
jpayne@69 16229 }
jpayne@69 16230
jpayne@69 16231 /* "pysam/libctabix.pyx":730
jpayne@69 16232 * filename = encode_filename(filename)
jpayne@69 16233 * cdef char *cfilename = filename
jpayne@69 16234 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 16235 * self.gzipfile = bgzf_open(cfilename, "r")
jpayne@69 16236 * self._filename = filename
jpayne@69 16237 */
jpayne@69 16238 /*finally:*/ {
jpayne@69 16239 /*normal exit:*/{
jpayne@69 16240 #ifdef WITH_THREAD
jpayne@69 16241 __Pyx_FastGIL_Forget();
jpayne@69 16242 Py_BLOCK_THREADS
jpayne@69 16243 #endif
jpayne@69 16244 goto __pyx_L6;
jpayne@69 16245 }
jpayne@69 16246 __pyx_L6:;
jpayne@69 16247 }
jpayne@69 16248 }
jpayne@69 16249
jpayne@69 16250 /* "pysam/libctabix.pyx":732
jpayne@69 16251 * with nogil:
jpayne@69 16252 * self.gzipfile = bgzf_open(cfilename, "r")
jpayne@69 16253 * self._filename = filename # <<<<<<<<<<<<<<
jpayne@69 16254 * self.kstream = ks_init(self.gzipfile)
jpayne@69 16255 * self.encoding = encoding
jpayne@69 16256 */
jpayne@69 16257 __Pyx_INCREF(__pyx_v_filename);
jpayne@69 16258 __Pyx_GIVEREF(__pyx_v_filename);
jpayne@69 16259 __Pyx_GOTREF(__pyx_v_self->_filename);
jpayne@69 16260 __Pyx_DECREF(__pyx_v_self->_filename);
jpayne@69 16261 __pyx_v_self->_filename = __pyx_v_filename;
jpayne@69 16262
jpayne@69 16263 /* "pysam/libctabix.pyx":733
jpayne@69 16264 * self.gzipfile = bgzf_open(cfilename, "r")
jpayne@69 16265 * self._filename = filename
jpayne@69 16266 * self.kstream = ks_init(self.gzipfile) # <<<<<<<<<<<<<<
jpayne@69 16267 * self.encoding = encoding
jpayne@69 16268 *
jpayne@69 16269 */
jpayne@69 16270 __pyx_v_self->kstream = ks_init(__pyx_v_self->gzipfile);
jpayne@69 16271
jpayne@69 16272 /* "pysam/libctabix.pyx":734
jpayne@69 16273 * self._filename = filename
jpayne@69 16274 * self.kstream = ks_init(self.gzipfile)
jpayne@69 16275 * self.encoding = encoding # <<<<<<<<<<<<<<
jpayne@69 16276 *
jpayne@69 16277 * self.buffer.l = 0
jpayne@69 16278 */
jpayne@69 16279 __Pyx_INCREF(__pyx_v_encoding);
jpayne@69 16280 __Pyx_GIVEREF(__pyx_v_encoding);
jpayne@69 16281 __Pyx_GOTREF(__pyx_v_self->encoding);
jpayne@69 16282 __Pyx_DECREF(__pyx_v_self->encoding);
jpayne@69 16283 __pyx_v_self->encoding = __pyx_v_encoding;
jpayne@69 16284
jpayne@69 16285 /* "pysam/libctabix.pyx":736
jpayne@69 16286 * self.encoding = encoding
jpayne@69 16287 *
jpayne@69 16288 * self.buffer.l = 0 # <<<<<<<<<<<<<<
jpayne@69 16289 * self.buffer.m = 0
jpayne@69 16290 * self.buffer.s = <char*>malloc(buffer_size)
jpayne@69 16291 */
jpayne@69 16292 __pyx_v_self->buffer.l = 0;
jpayne@69 16293
jpayne@69 16294 /* "pysam/libctabix.pyx":737
jpayne@69 16295 *
jpayne@69 16296 * self.buffer.l = 0
jpayne@69 16297 * self.buffer.m = 0 # <<<<<<<<<<<<<<
jpayne@69 16298 * self.buffer.s = <char*>malloc(buffer_size)
jpayne@69 16299 *
jpayne@69 16300 */
jpayne@69 16301 __pyx_v_self->buffer.m = 0;
jpayne@69 16302
jpayne@69 16303 /* "pysam/libctabix.pyx":738
jpayne@69 16304 * self.buffer.l = 0
jpayne@69 16305 * self.buffer.m = 0
jpayne@69 16306 * self.buffer.s = <char*>malloc(buffer_size) # <<<<<<<<<<<<<<
jpayne@69 16307 *
jpayne@69 16308 * def __dealloc__(self):
jpayne@69 16309 */
jpayne@69 16310 __pyx_v_self->buffer.s = ((char *)malloc(__pyx_v_buffer_size));
jpayne@69 16311
jpayne@69 16312 /* "pysam/libctabix.pyx":721
jpayne@69 16313 *
jpayne@69 16314 * cdef class GZIterator:
jpayne@69 16315 * def __init__(self, filename, int buffer_size=65536, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@69 16316 * '''iterate line-by-line through gzip (or bgzip)
jpayne@69 16317 * compressed file.
jpayne@69 16318 */
jpayne@69 16319
jpayne@69 16320 /* function exit code */
jpayne@69 16321 __pyx_r = 0;
jpayne@69 16322 goto __pyx_L0;
jpayne@69 16323 __pyx_L1_error:;
jpayne@69 16324 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 16325 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 16326 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 16327 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16328 __pyx_r = -1;
jpayne@69 16329 __pyx_L0:;
jpayne@69 16330 __Pyx_XDECREF(__pyx_v_filename);
jpayne@69 16331 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 16332 __Pyx_RefNannyFinishContext();
jpayne@69 16333 return __pyx_r;
jpayne@69 16334 }
jpayne@69 16335
jpayne@69 16336 /* "pysam/libctabix.pyx":740
jpayne@69 16337 * self.buffer.s = <char*>malloc(buffer_size)
jpayne@69 16338 *
jpayne@69 16339 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@69 16340 * '''close file.'''
jpayne@69 16341 * if self.gzipfile != NULL:
jpayne@69 16342 */
jpayne@69 16343
jpayne@69 16344 /* Python wrapper */
jpayne@69 16345 static void __pyx_pw_5pysam_9libctabix_10GZIterator_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 16346 static void __pyx_pw_5pysam_9libctabix_10GZIterator_3__dealloc__(PyObject *__pyx_v_self) {
jpayne@69 16347 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 16348 __Pyx_RefNannyDeclarations
jpayne@69 16349 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
jpayne@69 16350 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 16351 __pyx_pf_5pysam_9libctabix_10GZIterator_2__dealloc__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self));
jpayne@69 16352
jpayne@69 16353 /* function exit code */
jpayne@69 16354 __Pyx_RefNannyFinishContext();
jpayne@69 16355 }
jpayne@69 16356
jpayne@69 16357 static void __pyx_pf_5pysam_9libctabix_10GZIterator_2__dealloc__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self) {
jpayne@69 16358 __Pyx_TraceDeclarations
jpayne@69 16359 int __pyx_t_1;
jpayne@69 16360 int __pyx_lineno = 0;
jpayne@69 16361 const char *__pyx_filename = NULL;
jpayne@69 16362 int __pyx_clineno = 0;
jpayne@69 16363 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 740, 0, __PYX_ERR(0, 740, __pyx_L1_error));
jpayne@69 16364
jpayne@69 16365 /* "pysam/libctabix.pyx":742
jpayne@69 16366 * def __dealloc__(self):
jpayne@69 16367 * '''close file.'''
jpayne@69 16368 * if self.gzipfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 16369 * bgzf_close(self.gzipfile)
jpayne@69 16370 * self.gzipfile = NULL
jpayne@69 16371 */
jpayne@69 16372 __pyx_t_1 = (__pyx_v_self->gzipfile != NULL);
jpayne@69 16373 if (__pyx_t_1) {
jpayne@69 16374
jpayne@69 16375 /* "pysam/libctabix.pyx":743
jpayne@69 16376 * '''close file.'''
jpayne@69 16377 * if self.gzipfile != NULL:
jpayne@69 16378 * bgzf_close(self.gzipfile) # <<<<<<<<<<<<<<
jpayne@69 16379 * self.gzipfile = NULL
jpayne@69 16380 * if self.buffer.s != NULL:
jpayne@69 16381 */
jpayne@69 16382 (void)(bgzf_close(__pyx_v_self->gzipfile));
jpayne@69 16383
jpayne@69 16384 /* "pysam/libctabix.pyx":744
jpayne@69 16385 * if self.gzipfile != NULL:
jpayne@69 16386 * bgzf_close(self.gzipfile)
jpayne@69 16387 * self.gzipfile = NULL # <<<<<<<<<<<<<<
jpayne@69 16388 * if self.buffer.s != NULL:
jpayne@69 16389 * free(self.buffer.s)
jpayne@69 16390 */
jpayne@69 16391 __pyx_v_self->gzipfile = NULL;
jpayne@69 16392
jpayne@69 16393 /* "pysam/libctabix.pyx":742
jpayne@69 16394 * def __dealloc__(self):
jpayne@69 16395 * '''close file.'''
jpayne@69 16396 * if self.gzipfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 16397 * bgzf_close(self.gzipfile)
jpayne@69 16398 * self.gzipfile = NULL
jpayne@69 16399 */
jpayne@69 16400 }
jpayne@69 16401
jpayne@69 16402 /* "pysam/libctabix.pyx":745
jpayne@69 16403 * bgzf_close(self.gzipfile)
jpayne@69 16404 * self.gzipfile = NULL
jpayne@69 16405 * if self.buffer.s != NULL: # <<<<<<<<<<<<<<
jpayne@69 16406 * free(self.buffer.s)
jpayne@69 16407 * if self.kstream != NULL:
jpayne@69 16408 */
jpayne@69 16409 __pyx_t_1 = (__pyx_v_self->buffer.s != NULL);
jpayne@69 16410 if (__pyx_t_1) {
jpayne@69 16411
jpayne@69 16412 /* "pysam/libctabix.pyx":746
jpayne@69 16413 * self.gzipfile = NULL
jpayne@69 16414 * if self.buffer.s != NULL:
jpayne@69 16415 * free(self.buffer.s) # <<<<<<<<<<<<<<
jpayne@69 16416 * if self.kstream != NULL:
jpayne@69 16417 * ks_destroy(self.kstream)
jpayne@69 16418 */
jpayne@69 16419 free(__pyx_v_self->buffer.s);
jpayne@69 16420
jpayne@69 16421 /* "pysam/libctabix.pyx":745
jpayne@69 16422 * bgzf_close(self.gzipfile)
jpayne@69 16423 * self.gzipfile = NULL
jpayne@69 16424 * if self.buffer.s != NULL: # <<<<<<<<<<<<<<
jpayne@69 16425 * free(self.buffer.s)
jpayne@69 16426 * if self.kstream != NULL:
jpayne@69 16427 */
jpayne@69 16428 }
jpayne@69 16429
jpayne@69 16430 /* "pysam/libctabix.pyx":747
jpayne@69 16431 * if self.buffer.s != NULL:
jpayne@69 16432 * free(self.buffer.s)
jpayne@69 16433 * if self.kstream != NULL: # <<<<<<<<<<<<<<
jpayne@69 16434 * ks_destroy(self.kstream)
jpayne@69 16435 *
jpayne@69 16436 */
jpayne@69 16437 __pyx_t_1 = (__pyx_v_self->kstream != NULL);
jpayne@69 16438 if (__pyx_t_1) {
jpayne@69 16439
jpayne@69 16440 /* "pysam/libctabix.pyx":748
jpayne@69 16441 * free(self.buffer.s)
jpayne@69 16442 * if self.kstream != NULL:
jpayne@69 16443 * ks_destroy(self.kstream) # <<<<<<<<<<<<<<
jpayne@69 16444 *
jpayne@69 16445 * def __iter__(self):
jpayne@69 16446 */
jpayne@69 16447 ks_destroy(__pyx_v_self->kstream);
jpayne@69 16448
jpayne@69 16449 /* "pysam/libctabix.pyx":747
jpayne@69 16450 * if self.buffer.s != NULL:
jpayne@69 16451 * free(self.buffer.s)
jpayne@69 16452 * if self.kstream != NULL: # <<<<<<<<<<<<<<
jpayne@69 16453 * ks_destroy(self.kstream)
jpayne@69 16454 *
jpayne@69 16455 */
jpayne@69 16456 }
jpayne@69 16457
jpayne@69 16458 /* "pysam/libctabix.pyx":740
jpayne@69 16459 * self.buffer.s = <char*>malloc(buffer_size)
jpayne@69 16460 *
jpayne@69 16461 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@69 16462 * '''close file.'''
jpayne@69 16463 * if self.gzipfile != NULL:
jpayne@69 16464 */
jpayne@69 16465
jpayne@69 16466 /* function exit code */
jpayne@69 16467 goto __pyx_L0;
jpayne@69 16468 __pyx_L1_error:;
jpayne@69 16469 __Pyx_WriteUnraisable("pysam.libctabix.GZIterator.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
jpayne@69 16470 __pyx_L0:;
jpayne@69 16471 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 16472 }
jpayne@69 16473
jpayne@69 16474 /* "pysam/libctabix.pyx":750
jpayne@69 16475 * ks_destroy(self.kstream)
jpayne@69 16476 *
jpayne@69 16477 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 16478 * return self
jpayne@69 16479 *
jpayne@69 16480 */
jpayne@69 16481
jpayne@69 16482 /* Python wrapper */
jpayne@69 16483 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 16484 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__(PyObject *__pyx_v_self) {
jpayne@69 16485 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 16486 PyObject *__pyx_r = 0;
jpayne@69 16487 __Pyx_RefNannyDeclarations
jpayne@69 16488 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
jpayne@69 16489 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 16490 __pyx_r = __pyx_pf_5pysam_9libctabix_10GZIterator_4__iter__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self));
jpayne@69 16491
jpayne@69 16492 /* function exit code */
jpayne@69 16493 __Pyx_RefNannyFinishContext();
jpayne@69 16494 return __pyx_r;
jpayne@69 16495 }
jpayne@69 16496
jpayne@69 16497 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_4__iter__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self) {
jpayne@69 16498 PyObject *__pyx_r = NULL;
jpayne@69 16499 __Pyx_TraceDeclarations
jpayne@69 16500 __Pyx_RefNannyDeclarations
jpayne@69 16501 int __pyx_lineno = 0;
jpayne@69 16502 const char *__pyx_filename = NULL;
jpayne@69 16503 int __pyx_clineno = 0;
jpayne@69 16504 __Pyx_RefNannySetupContext("__iter__", 1);
jpayne@69 16505 __Pyx_TraceCall("__iter__", __pyx_f[0], 750, 0, __PYX_ERR(0, 750, __pyx_L1_error));
jpayne@69 16506
jpayne@69 16507 /* "pysam/libctabix.pyx":751
jpayne@69 16508 *
jpayne@69 16509 * def __iter__(self):
jpayne@69 16510 * return self # <<<<<<<<<<<<<<
jpayne@69 16511 *
jpayne@69 16512 * cdef int __cnext__(self):
jpayne@69 16513 */
jpayne@69 16514 __Pyx_XDECREF(__pyx_r);
jpayne@69 16515 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@69 16516 __pyx_r = ((PyObject *)__pyx_v_self);
jpayne@69 16517 goto __pyx_L0;
jpayne@69 16518
jpayne@69 16519 /* "pysam/libctabix.pyx":750
jpayne@69 16520 * ks_destroy(self.kstream)
jpayne@69 16521 *
jpayne@69 16522 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 16523 * return self
jpayne@69 16524 *
jpayne@69 16525 */
jpayne@69 16526
jpayne@69 16527 /* function exit code */
jpayne@69 16528 __pyx_L1_error:;
jpayne@69 16529 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16530 __pyx_r = NULL;
jpayne@69 16531 __pyx_L0:;
jpayne@69 16532 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 16533 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 16534 __Pyx_RefNannyFinishContext();
jpayne@69 16535 return __pyx_r;
jpayne@69 16536 }
jpayne@69 16537
jpayne@69 16538 /* "pysam/libctabix.pyx":753
jpayne@69 16539 * return self
jpayne@69 16540 *
jpayne@69 16541 * cdef int __cnext__(self): # <<<<<<<<<<<<<<
jpayne@69 16542 * cdef int dret = 0
jpayne@69 16543 * cdef int retval = 0
jpayne@69 16544 */
jpayne@69 16545
jpayne@69 16546 static int __pyx_f_5pysam_9libctabix_10GZIterator___cnext__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self) {
jpayne@69 16547 int __pyx_v_dret;
jpayne@69 16548 int __pyx_v_retval;
jpayne@69 16549 int __pyx_r;
jpayne@69 16550 __Pyx_TraceDeclarations
jpayne@69 16551 int __pyx_t_1;
jpayne@69 16552 int __pyx_lineno = 0;
jpayne@69 16553 const char *__pyx_filename = NULL;
jpayne@69 16554 int __pyx_clineno = 0;
jpayne@69 16555 __Pyx_TraceCall("__cnext__", __pyx_f[0], 753, 0, __PYX_ERR(0, 753, __pyx_L1_error));
jpayne@69 16556
jpayne@69 16557 /* "pysam/libctabix.pyx":754
jpayne@69 16558 *
jpayne@69 16559 * cdef int __cnext__(self):
jpayne@69 16560 * cdef int dret = 0 # <<<<<<<<<<<<<<
jpayne@69 16561 * cdef int retval = 0
jpayne@69 16562 * while 1:
jpayne@69 16563 */
jpayne@69 16564 __pyx_v_dret = 0;
jpayne@69 16565
jpayne@69 16566 /* "pysam/libctabix.pyx":755
jpayne@69 16567 * cdef int __cnext__(self):
jpayne@69 16568 * cdef int dret = 0
jpayne@69 16569 * cdef int retval = 0 # <<<<<<<<<<<<<<
jpayne@69 16570 * while 1:
jpayne@69 16571 * with nogil:
jpayne@69 16572 */
jpayne@69 16573 __pyx_v_retval = 0;
jpayne@69 16574
jpayne@69 16575 /* "pysam/libctabix.pyx":756
jpayne@69 16576 * cdef int dret = 0
jpayne@69 16577 * cdef int retval = 0
jpayne@69 16578 * while 1: # <<<<<<<<<<<<<<
jpayne@69 16579 * with nogil:
jpayne@69 16580 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@69 16581 */
jpayne@69 16582 while (1) {
jpayne@69 16583
jpayne@69 16584 /* "pysam/libctabix.pyx":757
jpayne@69 16585 * cdef int retval = 0
jpayne@69 16586 * while 1:
jpayne@69 16587 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 16588 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@69 16589 *
jpayne@69 16590 */
jpayne@69 16591 {
jpayne@69 16592 #ifdef WITH_THREAD
jpayne@69 16593 PyThreadState *_save;
jpayne@69 16594 _save = NULL;
jpayne@69 16595 Py_UNBLOCK_THREADS
jpayne@69 16596 __Pyx_FastGIL_Remember();
jpayne@69 16597 #endif
jpayne@69 16598 /*try:*/ {
jpayne@69 16599
jpayne@69 16600 /* "pysam/libctabix.pyx":758
jpayne@69 16601 * while 1:
jpayne@69 16602 * with nogil:
jpayne@69 16603 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret) # <<<<<<<<<<<<<<
jpayne@69 16604 *
jpayne@69 16605 * if retval < 0:
jpayne@69 16606 */
jpayne@69 16607 __pyx_v_retval = ks_getuntil(__pyx_v_self->kstream, '\n', (&__pyx_v_self->buffer), (&__pyx_v_dret));
jpayne@69 16608 }
jpayne@69 16609
jpayne@69 16610 /* "pysam/libctabix.pyx":757
jpayne@69 16611 * cdef int retval = 0
jpayne@69 16612 * while 1:
jpayne@69 16613 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 16614 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@69 16615 *
jpayne@69 16616 */
jpayne@69 16617 /*finally:*/ {
jpayne@69 16618 /*normal exit:*/{
jpayne@69 16619 #ifdef WITH_THREAD
jpayne@69 16620 __Pyx_FastGIL_Forget();
jpayne@69 16621 Py_BLOCK_THREADS
jpayne@69 16622 #endif
jpayne@69 16623 goto __pyx_L9;
jpayne@69 16624 }
jpayne@69 16625 __pyx_L9:;
jpayne@69 16626 }
jpayne@69 16627 }
jpayne@69 16628
jpayne@69 16629 /* "pysam/libctabix.pyx":760
jpayne@69 16630 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@69 16631 *
jpayne@69 16632 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 16633 * break
jpayne@69 16634 *
jpayne@69 16635 */
jpayne@69 16636 __pyx_t_1 = (__pyx_v_retval < 0);
jpayne@69 16637 if (__pyx_t_1) {
jpayne@69 16638
jpayne@69 16639 /* "pysam/libctabix.pyx":761
jpayne@69 16640 *
jpayne@69 16641 * if retval < 0:
jpayne@69 16642 * break # <<<<<<<<<<<<<<
jpayne@69 16643 *
jpayne@69 16644 * return dret
jpayne@69 16645 */
jpayne@69 16646 goto __pyx_L4_break;
jpayne@69 16647
jpayne@69 16648 /* "pysam/libctabix.pyx":760
jpayne@69 16649 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@69 16650 *
jpayne@69 16651 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 16652 * break
jpayne@69 16653 *
jpayne@69 16654 */
jpayne@69 16655 }
jpayne@69 16656
jpayne@69 16657 /* "pysam/libctabix.pyx":763
jpayne@69 16658 * break
jpayne@69 16659 *
jpayne@69 16660 * return dret # <<<<<<<<<<<<<<
jpayne@69 16661 * return -1
jpayne@69 16662 *
jpayne@69 16663 */
jpayne@69 16664 __pyx_r = __pyx_v_dret;
jpayne@69 16665 goto __pyx_L0;
jpayne@69 16666 }
jpayne@69 16667 __pyx_L4_break:;
jpayne@69 16668
jpayne@69 16669 /* "pysam/libctabix.pyx":764
jpayne@69 16670 *
jpayne@69 16671 * return dret
jpayne@69 16672 * return -1 # <<<<<<<<<<<<<<
jpayne@69 16673 *
jpayne@69 16674 * def __next__(self):
jpayne@69 16675 */
jpayne@69 16676 __pyx_r = -1;
jpayne@69 16677 goto __pyx_L0;
jpayne@69 16678
jpayne@69 16679 /* "pysam/libctabix.pyx":753
jpayne@69 16680 * return self
jpayne@69 16681 *
jpayne@69 16682 * cdef int __cnext__(self): # <<<<<<<<<<<<<<
jpayne@69 16683 * cdef int dret = 0
jpayne@69 16684 * cdef int retval = 0
jpayne@69 16685 */
jpayne@69 16686
jpayne@69 16687 /* function exit code */
jpayne@69 16688 __pyx_L1_error:;
jpayne@69 16689 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__cnext__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16690 __pyx_r = 0;
jpayne@69 16691 __pyx_L0:;
jpayne@69 16692 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 16693 return __pyx_r;
jpayne@69 16694 }
jpayne@69 16695
jpayne@69 16696 /* "pysam/libctabix.pyx":766
jpayne@69 16697 * return -1
jpayne@69 16698 *
jpayne@69 16699 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 16700 * """python version of next().
jpayne@69 16701 * """
jpayne@69 16702 */
jpayne@69 16703
jpayne@69 16704 /* Python wrapper */
jpayne@69 16705 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_7__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 16706 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_10GZIterator_6__next__, "python version of next().\n ");
jpayne@69 16707 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 16708 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_10GZIterator_6__next__;
jpayne@69 16709 #endif
jpayne@69 16710 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_7__next__(PyObject *__pyx_v_self) {
jpayne@69 16711 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 16712 PyObject *__pyx_r = 0;
jpayne@69 16713 __Pyx_RefNannyDeclarations
jpayne@69 16714 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@69 16715 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 16716 __pyx_r = __pyx_pf_5pysam_9libctabix_10GZIterator_6__next__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self));
jpayne@69 16717
jpayne@69 16718 /* function exit code */
jpayne@69 16719 __Pyx_RefNannyFinishContext();
jpayne@69 16720 return __pyx_r;
jpayne@69 16721 }
jpayne@69 16722
jpayne@69 16723 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_6__next__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self) {
jpayne@69 16724 int __pyx_v_retval;
jpayne@69 16725 PyObject *__pyx_r = NULL;
jpayne@69 16726 __Pyx_TraceDeclarations
jpayne@69 16727 __Pyx_RefNannyDeclarations
jpayne@69 16728 int __pyx_error_without_exception = 0; /* StopIteration */
jpayne@69 16729 int __pyx_t_1;
jpayne@69 16730 int __pyx_t_2;
jpayne@69 16731 PyObject *__pyx_t_3 = NULL;
jpayne@69 16732 PyObject *__pyx_t_4 = NULL;
jpayne@69 16733 PyObject *__pyx_t_5 = NULL;
jpayne@69 16734 struct __pyx_opt_args_5pysam_9libcutils_force_str __pyx_t_6;
jpayne@69 16735 int __pyx_lineno = 0;
jpayne@69 16736 const char *__pyx_filename = NULL;
jpayne@69 16737 int __pyx_clineno = 0;
jpayne@69 16738 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@69 16739 __Pyx_TraceCall("__next__", __pyx_f[0], 766, 0, __PYX_ERR(0, 766, __pyx_L1_error));
jpayne@69 16740
jpayne@69 16741 /* "pysam/libctabix.pyx":769
jpayne@69 16742 * """python version of next().
jpayne@69 16743 * """
jpayne@69 16744 * cdef int retval = self.__cnext__() # <<<<<<<<<<<<<<
jpayne@69 16745 * if retval < 0:
jpayne@69 16746 * raise StopIteration
jpayne@69 16747 */
jpayne@69 16748 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator *)__pyx_v_self->__pyx_vtab)->__pyx___cnext__(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 769, __pyx_L1_error)
jpayne@69 16749 __pyx_v_retval = __pyx_t_1;
jpayne@69 16750
jpayne@69 16751 /* "pysam/libctabix.pyx":770
jpayne@69 16752 * """
jpayne@69 16753 * cdef int retval = self.__cnext__()
jpayne@69 16754 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 16755 * raise StopIteration
jpayne@69 16756 * return force_str(self.buffer.s, self.encoding)
jpayne@69 16757 */
jpayne@69 16758 __pyx_t_2 = (__pyx_v_retval < 0);
jpayne@69 16759 if (unlikely(__pyx_t_2)) {
jpayne@69 16760
jpayne@69 16761 /* "pysam/libctabix.pyx":771
jpayne@69 16762 * cdef int retval = self.__cnext__()
jpayne@69 16763 * if retval < 0:
jpayne@69 16764 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@69 16765 * return force_str(self.buffer.s, self.encoding)
jpayne@69 16766 *
jpayne@69 16767 */
jpayne@69 16768 __pyx_error_without_exception = 1;
jpayne@69 16769 goto __pyx_L1_error;;
jpayne@69 16770
jpayne@69 16771 /* "pysam/libctabix.pyx":770
jpayne@69 16772 * """
jpayne@69 16773 * cdef int retval = self.__cnext__()
jpayne@69 16774 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 16775 * raise StopIteration
jpayne@69 16776 * return force_str(self.buffer.s, self.encoding)
jpayne@69 16777 */
jpayne@69 16778 }
jpayne@69 16779
jpayne@69 16780 /* "pysam/libctabix.pyx":772
jpayne@69 16781 * if retval < 0:
jpayne@69 16782 * raise StopIteration
jpayne@69 16783 * return force_str(self.buffer.s, self.encoding) # <<<<<<<<<<<<<<
jpayne@69 16784 *
jpayne@69 16785 *
jpayne@69 16786 */
jpayne@69 16787 __Pyx_XDECREF(__pyx_r);
jpayne@69 16788 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_self->buffer.s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error)
jpayne@69 16789 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 16790 __pyx_t_4 = __pyx_v_self->encoding;
jpayne@69 16791 __Pyx_INCREF(__pyx_t_4);
jpayne@69 16792 __pyx_t_6.__pyx_n = 1;
jpayne@69 16793 __pyx_t_6.encoding = __pyx_t_4;
jpayne@69 16794 __pyx_t_5 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_3, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 772, __pyx_L1_error)
jpayne@69 16795 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 16796 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 16797 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 16798 __pyx_r = __pyx_t_5;
jpayne@69 16799 __pyx_t_5 = 0;
jpayne@69 16800 goto __pyx_L0;
jpayne@69 16801
jpayne@69 16802 /* "pysam/libctabix.pyx":766
jpayne@69 16803 * return -1
jpayne@69 16804 *
jpayne@69 16805 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 16806 * """python version of next().
jpayne@69 16807 * """
jpayne@69 16808 */
jpayne@69 16809
jpayne@69 16810 /* function exit code */
jpayne@69 16811 __pyx_L1_error:;
jpayne@69 16812 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 16813 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 16814 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 16815 if (!__pyx_error_without_exception) {
jpayne@69 16816 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16817 }
jpayne@69 16818 __pyx_r = NULL;
jpayne@69 16819 __pyx_L0:;
jpayne@69 16820 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 16821 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 16822 __Pyx_RefNannyFinishContext();
jpayne@69 16823 return __pyx_r;
jpayne@69 16824 }
jpayne@69 16825
jpayne@69 16826 /* "(tree fragment)":1
jpayne@69 16827 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 16828 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 16829 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16830 */
jpayne@69 16831
jpayne@69 16832 /* Python wrapper */
jpayne@69 16833 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 16834 #if CYTHON_METH_FASTCALL
jpayne@69 16835 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16836 #else
jpayne@69 16837 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16838 #endif
jpayne@69 16839 ); /*proto*/
jpayne@69 16840 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_10GZIterator_8__reduce_cython__, "GZIterator.__reduce_cython__(self)");
jpayne@69 16841 static PyMethodDef __pyx_mdef_5pysam_9libctabix_10GZIterator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_10GZIterator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_10GZIterator_8__reduce_cython__};
jpayne@69 16842 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 16843 #if CYTHON_METH_FASTCALL
jpayne@69 16844 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16845 #else
jpayne@69 16846 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16847 #endif
jpayne@69 16848 ) {
jpayne@69 16849 #if !CYTHON_METH_FASTCALL
jpayne@69 16850 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 16851 #endif
jpayne@69 16852 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 16853 PyObject *__pyx_r = 0;
jpayne@69 16854 __Pyx_RefNannyDeclarations
jpayne@69 16855 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 16856 #if !CYTHON_METH_FASTCALL
jpayne@69 16857 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 16858 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 16859 #else
jpayne@69 16860 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 16861 #endif
jpayne@69 16862 #endif
jpayne@69 16863 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 16864 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 16865 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 16866 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 16867 __pyx_r = __pyx_pf_5pysam_9libctabix_10GZIterator_8__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self));
jpayne@69 16868
jpayne@69 16869 /* function exit code */
jpayne@69 16870 __Pyx_RefNannyFinishContext();
jpayne@69 16871 return __pyx_r;
jpayne@69 16872 }
jpayne@69 16873
jpayne@69 16874 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self) {
jpayne@69 16875 PyObject *__pyx_r = NULL;
jpayne@69 16876 __Pyx_TraceDeclarations
jpayne@69 16877 __Pyx_RefNannyDeclarations
jpayne@69 16878 int __pyx_lineno = 0;
jpayne@69 16879 const char *__pyx_filename = NULL;
jpayne@69 16880 int __pyx_clineno = 0;
jpayne@69 16881 __Pyx_TraceFrameInit(__pyx_codeobj__31)
jpayne@69 16882 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 16883 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 16884
jpayne@69 16885 /* "(tree fragment)":2
jpayne@69 16886 * def __reduce_cython__(self):
jpayne@69 16887 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 16888 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16889 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 16890 */
jpayne@69 16891 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@69 16892 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 16893
jpayne@69 16894 /* "(tree fragment)":1
jpayne@69 16895 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 16896 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 16897 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16898 */
jpayne@69 16899
jpayne@69 16900 /* function exit code */
jpayne@69 16901 __pyx_L1_error:;
jpayne@69 16902 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16903 __pyx_r = NULL;
jpayne@69 16904 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 16905 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 16906 __Pyx_RefNannyFinishContext();
jpayne@69 16907 return __pyx_r;
jpayne@69 16908 }
jpayne@69 16909
jpayne@69 16910 /* "(tree fragment)":3
jpayne@69 16911 * def __reduce_cython__(self):
jpayne@69 16912 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 16913 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 16914 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 16915 */
jpayne@69 16916
jpayne@69 16917 /* Python wrapper */
jpayne@69 16918 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 16919 #if CYTHON_METH_FASTCALL
jpayne@69 16920 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16921 #else
jpayne@69 16922 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16923 #endif
jpayne@69 16924 ); /*proto*/
jpayne@69 16925 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_10GZIterator_10__setstate_cython__, "GZIterator.__setstate_cython__(self, __pyx_state)");
jpayne@69 16926 static PyMethodDef __pyx_mdef_5pysam_9libctabix_10GZIterator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_10GZIterator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_10GZIterator_10__setstate_cython__};
jpayne@69 16927 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 16928 #if CYTHON_METH_FASTCALL
jpayne@69 16929 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16930 #else
jpayne@69 16931 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16932 #endif
jpayne@69 16933 ) {
jpayne@69 16934 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 16935 #if !CYTHON_METH_FASTCALL
jpayne@69 16936 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 16937 #endif
jpayne@69 16938 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 16939 PyObject* values[1] = {0};
jpayne@69 16940 int __pyx_lineno = 0;
jpayne@69 16941 const char *__pyx_filename = NULL;
jpayne@69 16942 int __pyx_clineno = 0;
jpayne@69 16943 PyObject *__pyx_r = 0;
jpayne@69 16944 __Pyx_RefNannyDeclarations
jpayne@69 16945 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 16946 #if !CYTHON_METH_FASTCALL
jpayne@69 16947 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 16948 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 16949 #else
jpayne@69 16950 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 16951 #endif
jpayne@69 16952 #endif
jpayne@69 16953 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 16954 {
jpayne@69 16955 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 16956 if (__pyx_kwds) {
jpayne@69 16957 Py_ssize_t kw_args;
jpayne@69 16958 switch (__pyx_nargs) {
jpayne@69 16959 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 16960 CYTHON_FALLTHROUGH;
jpayne@69 16961 case 0: break;
jpayne@69 16962 default: goto __pyx_L5_argtuple_error;
jpayne@69 16963 }
jpayne@69 16964 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 16965 switch (__pyx_nargs) {
jpayne@69 16966 case 0:
jpayne@69 16967 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 16968 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 16969 kw_args--;
jpayne@69 16970 }
jpayne@69 16971 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 16972 else goto __pyx_L5_argtuple_error;
jpayne@69 16973 }
jpayne@69 16974 if (unlikely(kw_args > 0)) {
jpayne@69 16975 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 16976 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)
jpayne@69 16977 }
jpayne@69 16978 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 16979 goto __pyx_L5_argtuple_error;
jpayne@69 16980 } else {
jpayne@69 16981 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 16982 }
jpayne@69 16983 __pyx_v___pyx_state = values[0];
jpayne@69 16984 }
jpayne@69 16985 goto __pyx_L6_skip;
jpayne@69 16986 __pyx_L5_argtuple_error:;
jpayne@69 16987 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 16988 __pyx_L6_skip:;
jpayne@69 16989 goto __pyx_L4_argument_unpacking_done;
jpayne@69 16990 __pyx_L3_error:;
jpayne@69 16991 {
jpayne@69 16992 Py_ssize_t __pyx_temp;
jpayne@69 16993 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 16994 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 16995 }
jpayne@69 16996 }
jpayne@69 16997 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16998 __Pyx_RefNannyFinishContext();
jpayne@69 16999 return NULL;
jpayne@69 17000 __pyx_L4_argument_unpacking_done:;
jpayne@69 17001 __pyx_r = __pyx_pf_5pysam_9libctabix_10GZIterator_10__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 17002
jpayne@69 17003 /* function exit code */
jpayne@69 17004 {
jpayne@69 17005 Py_ssize_t __pyx_temp;
jpayne@69 17006 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 17007 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 17008 }
jpayne@69 17009 }
jpayne@69 17010 __Pyx_RefNannyFinishContext();
jpayne@69 17011 return __pyx_r;
jpayne@69 17012 }
jpayne@69 17013
jpayne@69 17014 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 17015 PyObject *__pyx_r = NULL;
jpayne@69 17016 __Pyx_TraceDeclarations
jpayne@69 17017 __Pyx_RefNannyDeclarations
jpayne@69 17018 int __pyx_lineno = 0;
jpayne@69 17019 const char *__pyx_filename = NULL;
jpayne@69 17020 int __pyx_clineno = 0;
jpayne@69 17021 __Pyx_TraceFrameInit(__pyx_codeobj__32)
jpayne@69 17022 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 17023 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 17024
jpayne@69 17025 /* "(tree fragment)":4
jpayne@69 17026 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17027 * def __setstate_cython__(self, __pyx_state):
jpayne@69 17028 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 17029 */
jpayne@69 17030 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@69 17031 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 17032
jpayne@69 17033 /* "(tree fragment)":3
jpayne@69 17034 * def __reduce_cython__(self):
jpayne@69 17035 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17036 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 17037 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17038 */
jpayne@69 17039
jpayne@69 17040 /* function exit code */
jpayne@69 17041 __pyx_L1_error:;
jpayne@69 17042 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17043 __pyx_r = NULL;
jpayne@69 17044 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 17045 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 17046 __Pyx_RefNannyFinishContext();
jpayne@69 17047 return __pyx_r;
jpayne@69 17048 }
jpayne@69 17049
jpayne@69 17050 /* "pysam/libctabix.pyx":780
jpayne@69 17051 * '''
jpayne@69 17052 *
jpayne@69 17053 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 17054 * """python version of next().
jpayne@69 17055 * """
jpayne@69 17056 */
jpayne@69 17057
jpayne@69 17058 /* Python wrapper */
jpayne@69 17059 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 17060 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_14GZIteratorHead___next__, "python version of next().\n ");
jpayne@69 17061 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 17062 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_14GZIteratorHead___next__;
jpayne@69 17063 #endif
jpayne@69 17064 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__(PyObject *__pyx_v_self) {
jpayne@69 17065 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 17066 PyObject *__pyx_r = 0;
jpayne@69 17067 __Pyx_RefNannyDeclarations
jpayne@69 17068 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@69 17069 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 17070 __pyx_r = __pyx_pf_5pysam_9libctabix_14GZIteratorHead___next__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *)__pyx_v_self));
jpayne@69 17071
jpayne@69 17072 /* function exit code */
jpayne@69 17073 __Pyx_RefNannyFinishContext();
jpayne@69 17074 return __pyx_r;
jpayne@69 17075 }
jpayne@69 17076
jpayne@69 17077 static PyObject *__pyx_pf_5pysam_9libctabix_14GZIteratorHead___next__(struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *__pyx_v_self) {
jpayne@69 17078 int __pyx_v_retval;
jpayne@69 17079 PyObject *__pyx_r = NULL;
jpayne@69 17080 __Pyx_TraceDeclarations
jpayne@69 17081 __Pyx_RefNannyDeclarations
jpayne@69 17082 int __pyx_error_without_exception = 0; /* StopIteration */
jpayne@69 17083 int __pyx_t_1;
jpayne@69 17084 int __pyx_t_2;
jpayne@69 17085 PyObject *__pyx_t_3 = NULL;
jpayne@69 17086 int __pyx_lineno = 0;
jpayne@69 17087 const char *__pyx_filename = NULL;
jpayne@69 17088 int __pyx_clineno = 0;
jpayne@69 17089 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@69 17090 __Pyx_TraceCall("__next__", __pyx_f[0], 780, 0, __PYX_ERR(0, 780, __pyx_L1_error));
jpayne@69 17091
jpayne@69 17092 /* "pysam/libctabix.pyx":783
jpayne@69 17093 * """python version of next().
jpayne@69 17094 * """
jpayne@69 17095 * cdef int retval = self.__cnext__() # <<<<<<<<<<<<<<
jpayne@69 17096 * if retval < 0:
jpayne@69 17097 * raise StopIteration
jpayne@69 17098 */
jpayne@69 17099 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorHead *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.__pyx___cnext__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L1_error)
jpayne@69 17100 __pyx_v_retval = __pyx_t_1;
jpayne@69 17101
jpayne@69 17102 /* "pysam/libctabix.pyx":784
jpayne@69 17103 * """
jpayne@69 17104 * cdef int retval = self.__cnext__()
jpayne@69 17105 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 17106 * raise StopIteration
jpayne@69 17107 * if self.buffer.s[0] == b'#':
jpayne@69 17108 */
jpayne@69 17109 __pyx_t_2 = (__pyx_v_retval < 0);
jpayne@69 17110 if (unlikely(__pyx_t_2)) {
jpayne@69 17111
jpayne@69 17112 /* "pysam/libctabix.pyx":785
jpayne@69 17113 * cdef int retval = self.__cnext__()
jpayne@69 17114 * if retval < 0:
jpayne@69 17115 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@69 17116 * if self.buffer.s[0] == b'#':
jpayne@69 17117 * return self.buffer.s
jpayne@69 17118 */
jpayne@69 17119 __pyx_error_without_exception = 1;
jpayne@69 17120 goto __pyx_L1_error;;
jpayne@69 17121
jpayne@69 17122 /* "pysam/libctabix.pyx":784
jpayne@69 17123 * """
jpayne@69 17124 * cdef int retval = self.__cnext__()
jpayne@69 17125 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 17126 * raise StopIteration
jpayne@69 17127 * if self.buffer.s[0] == b'#':
jpayne@69 17128 */
jpayne@69 17129 }
jpayne@69 17130
jpayne@69 17131 /* "pysam/libctabix.pyx":786
jpayne@69 17132 * if retval < 0:
jpayne@69 17133 * raise StopIteration
jpayne@69 17134 * if self.buffer.s[0] == b'#': # <<<<<<<<<<<<<<
jpayne@69 17135 * return self.buffer.s
jpayne@69 17136 * else:
jpayne@69 17137 */
jpayne@69 17138 __pyx_t_2 = ((__pyx_v_self->__pyx_base.buffer.s[0]) == '#');
jpayne@69 17139 if (likely(__pyx_t_2)) {
jpayne@69 17140
jpayne@69 17141 /* "pysam/libctabix.pyx":787
jpayne@69 17142 * raise StopIteration
jpayne@69 17143 * if self.buffer.s[0] == b'#':
jpayne@69 17144 * return self.buffer.s # <<<<<<<<<<<<<<
jpayne@69 17145 * else:
jpayne@69 17146 * raise StopIteration
jpayne@69 17147 */
jpayne@69 17148 __Pyx_XDECREF(__pyx_r);
jpayne@69 17149 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.buffer.s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 787, __pyx_L1_error)
jpayne@69 17150 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 17151 __pyx_r = __pyx_t_3;
jpayne@69 17152 __pyx_t_3 = 0;
jpayne@69 17153 goto __pyx_L0;
jpayne@69 17154
jpayne@69 17155 /* "pysam/libctabix.pyx":786
jpayne@69 17156 * if retval < 0:
jpayne@69 17157 * raise StopIteration
jpayne@69 17158 * if self.buffer.s[0] == b'#': # <<<<<<<<<<<<<<
jpayne@69 17159 * return self.buffer.s
jpayne@69 17160 * else:
jpayne@69 17161 */
jpayne@69 17162 }
jpayne@69 17163
jpayne@69 17164 /* "pysam/libctabix.pyx":789
jpayne@69 17165 * return self.buffer.s
jpayne@69 17166 * else:
jpayne@69 17167 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@69 17168 *
jpayne@69 17169 *
jpayne@69 17170 */
jpayne@69 17171 /*else*/ {
jpayne@69 17172 __pyx_error_without_exception = 1;
jpayne@69 17173 goto __pyx_L1_error;;
jpayne@69 17174 }
jpayne@69 17175
jpayne@69 17176 /* "pysam/libctabix.pyx":780
jpayne@69 17177 * '''
jpayne@69 17178 *
jpayne@69 17179 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 17180 * """python version of next().
jpayne@69 17181 * """
jpayne@69 17182 */
jpayne@69 17183
jpayne@69 17184 /* function exit code */
jpayne@69 17185 __pyx_L1_error:;
jpayne@69 17186 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 17187 if (!__pyx_error_without_exception) {
jpayne@69 17188 __Pyx_AddTraceback("pysam.libctabix.GZIteratorHead.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17189 }
jpayne@69 17190 __pyx_r = NULL;
jpayne@69 17191 __pyx_L0:;
jpayne@69 17192 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 17193 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 17194 __Pyx_RefNannyFinishContext();
jpayne@69 17195 return __pyx_r;
jpayne@69 17196 }
jpayne@69 17197
jpayne@69 17198 /* "(tree fragment)":1
jpayne@69 17199 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 17200 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17201 * def __setstate_cython__(self, __pyx_state):
jpayne@69 17202 */
jpayne@69 17203
jpayne@69 17204 /* Python wrapper */
jpayne@69 17205 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_3__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 17206 #if CYTHON_METH_FASTCALL
jpayne@69 17207 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 17208 #else
jpayne@69 17209 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 17210 #endif
jpayne@69 17211 ); /*proto*/
jpayne@69 17212 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_14GZIteratorHead_2__reduce_cython__, "GZIteratorHead.__reduce_cython__(self)");
jpayne@69 17213 static PyMethodDef __pyx_mdef_5pysam_9libctabix_14GZIteratorHead_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_14GZIteratorHead_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_14GZIteratorHead_2__reduce_cython__};
jpayne@69 17214 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_3__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 17215 #if CYTHON_METH_FASTCALL
jpayne@69 17216 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 17217 #else
jpayne@69 17218 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 17219 #endif
jpayne@69 17220 ) {
jpayne@69 17221 #if !CYTHON_METH_FASTCALL
jpayne@69 17222 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 17223 #endif
jpayne@69 17224 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 17225 PyObject *__pyx_r = 0;
jpayne@69 17226 __Pyx_RefNannyDeclarations
jpayne@69 17227 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 17228 #if !CYTHON_METH_FASTCALL
jpayne@69 17229 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 17230 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 17231 #else
jpayne@69 17232 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 17233 #endif
jpayne@69 17234 #endif
jpayne@69 17235 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 17236 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 17237 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 17238 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 17239 __pyx_r = __pyx_pf_5pysam_9libctabix_14GZIteratorHead_2__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *)__pyx_v_self));
jpayne@69 17240
jpayne@69 17241 /* function exit code */
jpayne@69 17242 __Pyx_RefNannyFinishContext();
jpayne@69 17243 return __pyx_r;
jpayne@69 17244 }
jpayne@69 17245
jpayne@69 17246 static PyObject *__pyx_pf_5pysam_9libctabix_14GZIteratorHead_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *__pyx_v_self) {
jpayne@69 17247 PyObject *__pyx_r = NULL;
jpayne@69 17248 __Pyx_TraceDeclarations
jpayne@69 17249 __Pyx_RefNannyDeclarations
jpayne@69 17250 int __pyx_lineno = 0;
jpayne@69 17251 const char *__pyx_filename = NULL;
jpayne@69 17252 int __pyx_clineno = 0;
jpayne@69 17253 __Pyx_TraceFrameInit(__pyx_codeobj__33)
jpayne@69 17254 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 17255 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 17256
jpayne@69 17257 /* "(tree fragment)":2
jpayne@69 17258 * def __reduce_cython__(self):
jpayne@69 17259 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 17260 * def __setstate_cython__(self, __pyx_state):
jpayne@69 17261 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17262 */
jpayne@69 17263 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@69 17264 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 17265
jpayne@69 17266 /* "(tree fragment)":1
jpayne@69 17267 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 17268 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17269 * def __setstate_cython__(self, __pyx_state):
jpayne@69 17270 */
jpayne@69 17271
jpayne@69 17272 /* function exit code */
jpayne@69 17273 __pyx_L1_error:;
jpayne@69 17274 __Pyx_AddTraceback("pysam.libctabix.GZIteratorHead.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17275 __pyx_r = NULL;
jpayne@69 17276 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 17277 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 17278 __Pyx_RefNannyFinishContext();
jpayne@69 17279 return __pyx_r;
jpayne@69 17280 }
jpayne@69 17281
jpayne@69 17282 /* "(tree fragment)":3
jpayne@69 17283 * def __reduce_cython__(self):
jpayne@69 17284 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17285 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 17286 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17287 */
jpayne@69 17288
jpayne@69 17289 /* Python wrapper */
jpayne@69 17290 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_5__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 17291 #if CYTHON_METH_FASTCALL
jpayne@69 17292 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 17293 #else
jpayne@69 17294 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 17295 #endif
jpayne@69 17296 ); /*proto*/
jpayne@69 17297 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_14GZIteratorHead_4__setstate_cython__, "GZIteratorHead.__setstate_cython__(self, __pyx_state)");
jpayne@69 17298 static PyMethodDef __pyx_mdef_5pysam_9libctabix_14GZIteratorHead_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_14GZIteratorHead_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_14GZIteratorHead_4__setstate_cython__};
jpayne@69 17299 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_5__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 17300 #if CYTHON_METH_FASTCALL
jpayne@69 17301 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 17302 #else
jpayne@69 17303 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 17304 #endif
jpayne@69 17305 ) {
jpayne@69 17306 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 17307 #if !CYTHON_METH_FASTCALL
jpayne@69 17308 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 17309 #endif
jpayne@69 17310 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 17311 PyObject* values[1] = {0};
jpayne@69 17312 int __pyx_lineno = 0;
jpayne@69 17313 const char *__pyx_filename = NULL;
jpayne@69 17314 int __pyx_clineno = 0;
jpayne@69 17315 PyObject *__pyx_r = 0;
jpayne@69 17316 __Pyx_RefNannyDeclarations
jpayne@69 17317 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 17318 #if !CYTHON_METH_FASTCALL
jpayne@69 17319 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 17320 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 17321 #else
jpayne@69 17322 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 17323 #endif
jpayne@69 17324 #endif
jpayne@69 17325 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 17326 {
jpayne@69 17327 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 17328 if (__pyx_kwds) {
jpayne@69 17329 Py_ssize_t kw_args;
jpayne@69 17330 switch (__pyx_nargs) {
jpayne@69 17331 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 17332 CYTHON_FALLTHROUGH;
jpayne@69 17333 case 0: break;
jpayne@69 17334 default: goto __pyx_L5_argtuple_error;
jpayne@69 17335 }
jpayne@69 17336 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 17337 switch (__pyx_nargs) {
jpayne@69 17338 case 0:
jpayne@69 17339 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 17340 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 17341 kw_args--;
jpayne@69 17342 }
jpayne@69 17343 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 17344 else goto __pyx_L5_argtuple_error;
jpayne@69 17345 }
jpayne@69 17346 if (unlikely(kw_args > 0)) {
jpayne@69 17347 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 17348 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)
jpayne@69 17349 }
jpayne@69 17350 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 17351 goto __pyx_L5_argtuple_error;
jpayne@69 17352 } else {
jpayne@69 17353 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 17354 }
jpayne@69 17355 __pyx_v___pyx_state = values[0];
jpayne@69 17356 }
jpayne@69 17357 goto __pyx_L6_skip;
jpayne@69 17358 __pyx_L5_argtuple_error:;
jpayne@69 17359 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 17360 __pyx_L6_skip:;
jpayne@69 17361 goto __pyx_L4_argument_unpacking_done;
jpayne@69 17362 __pyx_L3_error:;
jpayne@69 17363 {
jpayne@69 17364 Py_ssize_t __pyx_temp;
jpayne@69 17365 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 17366 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 17367 }
jpayne@69 17368 }
jpayne@69 17369 __Pyx_AddTraceback("pysam.libctabix.GZIteratorHead.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17370 __Pyx_RefNannyFinishContext();
jpayne@69 17371 return NULL;
jpayne@69 17372 __pyx_L4_argument_unpacking_done:;
jpayne@69 17373 __pyx_r = __pyx_pf_5pysam_9libctabix_14GZIteratorHead_4__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 17374
jpayne@69 17375 /* function exit code */
jpayne@69 17376 {
jpayne@69 17377 Py_ssize_t __pyx_temp;
jpayne@69 17378 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 17379 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 17380 }
jpayne@69 17381 }
jpayne@69 17382 __Pyx_RefNannyFinishContext();
jpayne@69 17383 return __pyx_r;
jpayne@69 17384 }
jpayne@69 17385
jpayne@69 17386 static PyObject *__pyx_pf_5pysam_9libctabix_14GZIteratorHead_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 17387 PyObject *__pyx_r = NULL;
jpayne@69 17388 __Pyx_TraceDeclarations
jpayne@69 17389 __Pyx_RefNannyDeclarations
jpayne@69 17390 int __pyx_lineno = 0;
jpayne@69 17391 const char *__pyx_filename = NULL;
jpayne@69 17392 int __pyx_clineno = 0;
jpayne@69 17393 __Pyx_TraceFrameInit(__pyx_codeobj__34)
jpayne@69 17394 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 17395 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 17396
jpayne@69 17397 /* "(tree fragment)":4
jpayne@69 17398 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17399 * def __setstate_cython__(self, __pyx_state):
jpayne@69 17400 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 17401 */
jpayne@69 17402 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@69 17403 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 17404
jpayne@69 17405 /* "(tree fragment)":3
jpayne@69 17406 * def __reduce_cython__(self):
jpayne@69 17407 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17408 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 17409 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17410 */
jpayne@69 17411
jpayne@69 17412 /* function exit code */
jpayne@69 17413 __pyx_L1_error:;
jpayne@69 17414 __Pyx_AddTraceback("pysam.libctabix.GZIteratorHead.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17415 __pyx_r = NULL;
jpayne@69 17416 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 17417 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 17418 __Pyx_RefNannyFinishContext();
jpayne@69 17419 return __pyx_r;
jpayne@69 17420 }
jpayne@69 17421
jpayne@69 17422 /* "pysam/libctabix.pyx":797
jpayne@69 17423 * '''
jpayne@69 17424 *
jpayne@69 17425 * def __init__(self, parser): # <<<<<<<<<<<<<<
jpayne@69 17426 * self.parser = parser
jpayne@69 17427 *
jpayne@69 17428 */
jpayne@69 17429
jpayne@69 17430 /* Python wrapper */
jpayne@69 17431 static int __pyx_pw_5pysam_9libctabix_16GZIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 17432 static int __pyx_pw_5pysam_9libctabix_16GZIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 17433 PyObject *__pyx_v_parser = 0;
jpayne@69 17434 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 17435 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 17436 PyObject* values[1] = {0};
jpayne@69 17437 int __pyx_lineno = 0;
jpayne@69 17438 const char *__pyx_filename = NULL;
jpayne@69 17439 int __pyx_clineno = 0;
jpayne@69 17440 int __pyx_r;
jpayne@69 17441 __Pyx_RefNannyDeclarations
jpayne@69 17442 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@69 17443 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 17444 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 17445 #else
jpayne@69 17446 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@69 17447 #endif
jpayne@69 17448 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 17449 {
jpayne@69 17450 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parser,0};
jpayne@69 17451 if (__pyx_kwds) {
jpayne@69 17452 Py_ssize_t kw_args;
jpayne@69 17453 switch (__pyx_nargs) {
jpayne@69 17454 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 17455 CYTHON_FALLTHROUGH;
jpayne@69 17456 case 0: break;
jpayne@69 17457 default: goto __pyx_L5_argtuple_error;
jpayne@69 17458 }
jpayne@69 17459 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@69 17460 switch (__pyx_nargs) {
jpayne@69 17461 case 0:
jpayne@69 17462 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser)) != 0)) {
jpayne@69 17463 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@69 17464 kw_args--;
jpayne@69 17465 }
jpayne@69 17466 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 797, __pyx_L3_error)
jpayne@69 17467 else goto __pyx_L5_argtuple_error;
jpayne@69 17468 }
jpayne@69 17469 if (unlikely(kw_args > 0)) {
jpayne@69 17470 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 17471 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 797, __pyx_L3_error)
jpayne@69 17472 }
jpayne@69 17473 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 17474 goto __pyx_L5_argtuple_error;
jpayne@69 17475 } else {
jpayne@69 17476 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 17477 }
jpayne@69 17478 __pyx_v_parser = values[0];
jpayne@69 17479 }
jpayne@69 17480 goto __pyx_L6_skip;
jpayne@69 17481 __pyx_L5_argtuple_error:;
jpayne@69 17482 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 797, __pyx_L3_error)
jpayne@69 17483 __pyx_L6_skip:;
jpayne@69 17484 goto __pyx_L4_argument_unpacking_done;
jpayne@69 17485 __pyx_L3_error:;
jpayne@69 17486 {
jpayne@69 17487 Py_ssize_t __pyx_temp;
jpayne@69 17488 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 17489 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 17490 }
jpayne@69 17491 }
jpayne@69 17492 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17493 __Pyx_RefNannyFinishContext();
jpayne@69 17494 return -1;
jpayne@69 17495 __pyx_L4_argument_unpacking_done:;
jpayne@69 17496 __pyx_r = __pyx_pf_5pysam_9libctabix_16GZIteratorParsed___init__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)__pyx_v_self), __pyx_v_parser);
jpayne@69 17497
jpayne@69 17498 /* function exit code */
jpayne@69 17499 {
jpayne@69 17500 Py_ssize_t __pyx_temp;
jpayne@69 17501 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 17502 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 17503 }
jpayne@69 17504 }
jpayne@69 17505 __Pyx_RefNannyFinishContext();
jpayne@69 17506 return __pyx_r;
jpayne@69 17507 }
jpayne@69 17508
jpayne@69 17509 static int __pyx_pf_5pysam_9libctabix_16GZIteratorParsed___init__(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self, PyObject *__pyx_v_parser) {
jpayne@69 17510 int __pyx_r;
jpayne@69 17511 __Pyx_TraceDeclarations
jpayne@69 17512 __Pyx_RefNannyDeclarations
jpayne@69 17513 PyObject *__pyx_t_1 = NULL;
jpayne@69 17514 int __pyx_lineno = 0;
jpayne@69 17515 const char *__pyx_filename = NULL;
jpayne@69 17516 int __pyx_clineno = 0;
jpayne@69 17517 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@69 17518 __Pyx_TraceCall("__init__", __pyx_f[0], 797, 0, __PYX_ERR(0, 797, __pyx_L1_error));
jpayne@69 17519
jpayne@69 17520 /* "pysam/libctabix.pyx":798
jpayne@69 17521 *
jpayne@69 17522 * def __init__(self, parser):
jpayne@69 17523 * self.parser = parser # <<<<<<<<<<<<<<
jpayne@69 17524 *
jpayne@69 17525 * def __next__(self):
jpayne@69 17526 */
jpayne@69 17527 if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_5pysam_9libctabix_Parser))))) __PYX_ERR(0, 798, __pyx_L1_error)
jpayne@69 17528 __pyx_t_1 = __pyx_v_parser;
jpayne@69 17529 __Pyx_INCREF(__pyx_t_1);
jpayne@69 17530 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 17531 __Pyx_GOTREF((PyObject *)__pyx_v_self->parser);
jpayne@69 17532 __Pyx_DECREF((PyObject *)__pyx_v_self->parser);
jpayne@69 17533 __pyx_v_self->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_t_1);
jpayne@69 17534 __pyx_t_1 = 0;
jpayne@69 17535
jpayne@69 17536 /* "pysam/libctabix.pyx":797
jpayne@69 17537 * '''
jpayne@69 17538 *
jpayne@69 17539 * def __init__(self, parser): # <<<<<<<<<<<<<<
jpayne@69 17540 * self.parser = parser
jpayne@69 17541 *
jpayne@69 17542 */
jpayne@69 17543
jpayne@69 17544 /* function exit code */
jpayne@69 17545 __pyx_r = 0;
jpayne@69 17546 goto __pyx_L0;
jpayne@69 17547 __pyx_L1_error:;
jpayne@69 17548 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 17549 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17550 __pyx_r = -1;
jpayne@69 17551 __pyx_L0:;
jpayne@69 17552 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 17553 __Pyx_RefNannyFinishContext();
jpayne@69 17554 return __pyx_r;
jpayne@69 17555 }
jpayne@69 17556
jpayne@69 17557 /* "pysam/libctabix.pyx":800
jpayne@69 17558 * self.parser = parser
jpayne@69 17559 *
jpayne@69 17560 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 17561 * """python version of next().
jpayne@69 17562 * """
jpayne@69 17563 */
jpayne@69 17564
jpayne@69 17565 /* Python wrapper */
jpayne@69 17566 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 17567 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_16GZIteratorParsed_2__next__, "python version of next().\n ");
jpayne@69 17568 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 17569 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_16GZIteratorParsed_2__next__;
jpayne@69 17570 #endif
jpayne@69 17571 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__(PyObject *__pyx_v_self) {
jpayne@69 17572 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 17573 PyObject *__pyx_r = 0;
jpayne@69 17574 __Pyx_RefNannyDeclarations
jpayne@69 17575 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@69 17576 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 17577 __pyx_r = __pyx_pf_5pysam_9libctabix_16GZIteratorParsed_2__next__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)__pyx_v_self));
jpayne@69 17578
jpayne@69 17579 /* function exit code */
jpayne@69 17580 __Pyx_RefNannyFinishContext();
jpayne@69 17581 return __pyx_r;
jpayne@69 17582 }
jpayne@69 17583
jpayne@69 17584 static PyObject *__pyx_pf_5pysam_9libctabix_16GZIteratorParsed_2__next__(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self) {
jpayne@69 17585 int __pyx_v_retval;
jpayne@69 17586 PyObject *__pyx_r = NULL;
jpayne@69 17587 __Pyx_TraceDeclarations
jpayne@69 17588 __Pyx_RefNannyDeclarations
jpayne@69 17589 int __pyx_error_without_exception = 0; /* StopIteration */
jpayne@69 17590 int __pyx_t_1;
jpayne@69 17591 int __pyx_t_2;
jpayne@69 17592 PyObject *__pyx_t_3 = NULL;
jpayne@69 17593 int __pyx_lineno = 0;
jpayne@69 17594 const char *__pyx_filename = NULL;
jpayne@69 17595 int __pyx_clineno = 0;
jpayne@69 17596 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@69 17597 __Pyx_TraceCall("__next__", __pyx_f[0], 800, 0, __PYX_ERR(0, 800, __pyx_L1_error));
jpayne@69 17598
jpayne@69 17599 /* "pysam/libctabix.pyx":803
jpayne@69 17600 * """python version of next().
jpayne@69 17601 * """
jpayne@69 17602 * cdef int retval = self.__cnext__() # <<<<<<<<<<<<<<
jpayne@69 17603 * if retval < 0:
jpayne@69 17604 * raise StopIteration
jpayne@69 17605 */
jpayne@69 17606 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorParsed *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.__pyx___cnext__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 803, __pyx_L1_error)
jpayne@69 17607 __pyx_v_retval = __pyx_t_1;
jpayne@69 17608
jpayne@69 17609 /* "pysam/libctabix.pyx":804
jpayne@69 17610 * """
jpayne@69 17611 * cdef int retval = self.__cnext__()
jpayne@69 17612 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 17613 * raise StopIteration
jpayne@69 17614 *
jpayne@69 17615 */
jpayne@69 17616 __pyx_t_2 = (__pyx_v_retval < 0);
jpayne@69 17617 if (unlikely(__pyx_t_2)) {
jpayne@69 17618
jpayne@69 17619 /* "pysam/libctabix.pyx":805
jpayne@69 17620 * cdef int retval = self.__cnext__()
jpayne@69 17621 * if retval < 0:
jpayne@69 17622 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@69 17623 *
jpayne@69 17624 * return self.parser.parse(self.buffer.s,
jpayne@69 17625 */
jpayne@69 17626 __pyx_error_without_exception = 1;
jpayne@69 17627 goto __pyx_L1_error;;
jpayne@69 17628
jpayne@69 17629 /* "pysam/libctabix.pyx":804
jpayne@69 17630 * """
jpayne@69 17631 * cdef int retval = self.__cnext__()
jpayne@69 17632 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 17633 * raise StopIteration
jpayne@69 17634 *
jpayne@69 17635 */
jpayne@69 17636 }
jpayne@69 17637
jpayne@69 17638 /* "pysam/libctabix.pyx":807
jpayne@69 17639 * raise StopIteration
jpayne@69 17640 *
jpayne@69 17641 * return self.parser.parse(self.buffer.s, # <<<<<<<<<<<<<<
jpayne@69 17642 * self.buffer.l)
jpayne@69 17643 *
jpayne@69 17644 */
jpayne@69 17645 __Pyx_XDECREF(__pyx_r);
jpayne@69 17646
jpayne@69 17647 /* "pysam/libctabix.pyx":808
jpayne@69 17648 *
jpayne@69 17649 * return self.parser.parse(self.buffer.s,
jpayne@69 17650 * self.buffer.l) # <<<<<<<<<<<<<<
jpayne@69 17651 *
jpayne@69 17652 *
jpayne@69 17653 */
jpayne@69 17654 __pyx_t_3 = ((struct __pyx_vtabstruct_5pysam_9libctabix_Parser *)__pyx_v_self->parser->__pyx_vtab)->parse(__pyx_v_self->parser, __pyx_v_self->__pyx_base.buffer.s, __pyx_v_self->__pyx_base.buffer.l); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 807, __pyx_L1_error)
jpayne@69 17655 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 17656 __pyx_r = __pyx_t_3;
jpayne@69 17657 __pyx_t_3 = 0;
jpayne@69 17658 goto __pyx_L0;
jpayne@69 17659
jpayne@69 17660 /* "pysam/libctabix.pyx":800
jpayne@69 17661 * self.parser = parser
jpayne@69 17662 *
jpayne@69 17663 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 17664 * """python version of next().
jpayne@69 17665 * """
jpayne@69 17666 */
jpayne@69 17667
jpayne@69 17668 /* function exit code */
jpayne@69 17669 __pyx_L1_error:;
jpayne@69 17670 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 17671 if (!__pyx_error_without_exception) {
jpayne@69 17672 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17673 }
jpayne@69 17674 __pyx_r = NULL;
jpayne@69 17675 __pyx_L0:;
jpayne@69 17676 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 17677 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 17678 __Pyx_RefNannyFinishContext();
jpayne@69 17679 return __pyx_r;
jpayne@69 17680 }
jpayne@69 17681
jpayne@69 17682 /* "(tree fragment)":1
jpayne@69 17683 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 17684 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17685 * def __setstate_cython__(self, __pyx_state):
jpayne@69 17686 */
jpayne@69 17687
jpayne@69 17688 /* Python wrapper */
jpayne@69 17689 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_5__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 17690 #if CYTHON_METH_FASTCALL
jpayne@69 17691 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 17692 #else
jpayne@69 17693 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 17694 #endif
jpayne@69 17695 ); /*proto*/
jpayne@69 17696 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_16GZIteratorParsed_4__reduce_cython__, "GZIteratorParsed.__reduce_cython__(self)");
jpayne@69 17697 static PyMethodDef __pyx_mdef_5pysam_9libctabix_16GZIteratorParsed_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_16GZIteratorParsed_4__reduce_cython__};
jpayne@69 17698 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_5__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 17699 #if CYTHON_METH_FASTCALL
jpayne@69 17700 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 17701 #else
jpayne@69 17702 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 17703 #endif
jpayne@69 17704 ) {
jpayne@69 17705 #if !CYTHON_METH_FASTCALL
jpayne@69 17706 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 17707 #endif
jpayne@69 17708 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 17709 PyObject *__pyx_r = 0;
jpayne@69 17710 __Pyx_RefNannyDeclarations
jpayne@69 17711 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 17712 #if !CYTHON_METH_FASTCALL
jpayne@69 17713 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 17714 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 17715 #else
jpayne@69 17716 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 17717 #endif
jpayne@69 17718 #endif
jpayne@69 17719 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 17720 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 17721 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 17722 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 17723 __pyx_r = __pyx_pf_5pysam_9libctabix_16GZIteratorParsed_4__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)__pyx_v_self));
jpayne@69 17724
jpayne@69 17725 /* function exit code */
jpayne@69 17726 __Pyx_RefNannyFinishContext();
jpayne@69 17727 return __pyx_r;
jpayne@69 17728 }
jpayne@69 17729
jpayne@69 17730 static PyObject *__pyx_pf_5pysam_9libctabix_16GZIteratorParsed_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self) {
jpayne@69 17731 PyObject *__pyx_r = NULL;
jpayne@69 17732 __Pyx_TraceDeclarations
jpayne@69 17733 __Pyx_RefNannyDeclarations
jpayne@69 17734 int __pyx_lineno = 0;
jpayne@69 17735 const char *__pyx_filename = NULL;
jpayne@69 17736 int __pyx_clineno = 0;
jpayne@69 17737 __Pyx_TraceFrameInit(__pyx_codeobj__35)
jpayne@69 17738 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 17739 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 17740
jpayne@69 17741 /* "(tree fragment)":2
jpayne@69 17742 * def __reduce_cython__(self):
jpayne@69 17743 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 17744 * def __setstate_cython__(self, __pyx_state):
jpayne@69 17745 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17746 */
jpayne@69 17747 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@69 17748 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 17749
jpayne@69 17750 /* "(tree fragment)":1
jpayne@69 17751 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 17752 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17753 * def __setstate_cython__(self, __pyx_state):
jpayne@69 17754 */
jpayne@69 17755
jpayne@69 17756 /* function exit code */
jpayne@69 17757 __pyx_L1_error:;
jpayne@69 17758 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17759 __pyx_r = NULL;
jpayne@69 17760 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 17761 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 17762 __Pyx_RefNannyFinishContext();
jpayne@69 17763 return __pyx_r;
jpayne@69 17764 }
jpayne@69 17765
jpayne@69 17766 /* "(tree fragment)":3
jpayne@69 17767 * def __reduce_cython__(self):
jpayne@69 17768 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17769 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 17770 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17771 */
jpayne@69 17772
jpayne@69 17773 /* Python wrapper */
jpayne@69 17774 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_7__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 17775 #if CYTHON_METH_FASTCALL
jpayne@69 17776 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 17777 #else
jpayne@69 17778 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 17779 #endif
jpayne@69 17780 ); /*proto*/
jpayne@69 17781 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_16GZIteratorParsed_6__setstate_cython__, "GZIteratorParsed.__setstate_cython__(self, __pyx_state)");
jpayne@69 17782 static PyMethodDef __pyx_mdef_5pysam_9libctabix_16GZIteratorParsed_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_16GZIteratorParsed_6__setstate_cython__};
jpayne@69 17783 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_7__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 17784 #if CYTHON_METH_FASTCALL
jpayne@69 17785 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 17786 #else
jpayne@69 17787 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 17788 #endif
jpayne@69 17789 ) {
jpayne@69 17790 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 17791 #if !CYTHON_METH_FASTCALL
jpayne@69 17792 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 17793 #endif
jpayne@69 17794 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 17795 PyObject* values[1] = {0};
jpayne@69 17796 int __pyx_lineno = 0;
jpayne@69 17797 const char *__pyx_filename = NULL;
jpayne@69 17798 int __pyx_clineno = 0;
jpayne@69 17799 PyObject *__pyx_r = 0;
jpayne@69 17800 __Pyx_RefNannyDeclarations
jpayne@69 17801 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 17802 #if !CYTHON_METH_FASTCALL
jpayne@69 17803 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 17804 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 17805 #else
jpayne@69 17806 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 17807 #endif
jpayne@69 17808 #endif
jpayne@69 17809 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 17810 {
jpayne@69 17811 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 17812 if (__pyx_kwds) {
jpayne@69 17813 Py_ssize_t kw_args;
jpayne@69 17814 switch (__pyx_nargs) {
jpayne@69 17815 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 17816 CYTHON_FALLTHROUGH;
jpayne@69 17817 case 0: break;
jpayne@69 17818 default: goto __pyx_L5_argtuple_error;
jpayne@69 17819 }
jpayne@69 17820 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 17821 switch (__pyx_nargs) {
jpayne@69 17822 case 0:
jpayne@69 17823 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 17824 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 17825 kw_args--;
jpayne@69 17826 }
jpayne@69 17827 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 17828 else goto __pyx_L5_argtuple_error;
jpayne@69 17829 }
jpayne@69 17830 if (unlikely(kw_args > 0)) {
jpayne@69 17831 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 17832 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)
jpayne@69 17833 }
jpayne@69 17834 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 17835 goto __pyx_L5_argtuple_error;
jpayne@69 17836 } else {
jpayne@69 17837 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 17838 }
jpayne@69 17839 __pyx_v___pyx_state = values[0];
jpayne@69 17840 }
jpayne@69 17841 goto __pyx_L6_skip;
jpayne@69 17842 __pyx_L5_argtuple_error:;
jpayne@69 17843 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 17844 __pyx_L6_skip:;
jpayne@69 17845 goto __pyx_L4_argument_unpacking_done;
jpayne@69 17846 __pyx_L3_error:;
jpayne@69 17847 {
jpayne@69 17848 Py_ssize_t __pyx_temp;
jpayne@69 17849 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 17850 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 17851 }
jpayne@69 17852 }
jpayne@69 17853 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17854 __Pyx_RefNannyFinishContext();
jpayne@69 17855 return NULL;
jpayne@69 17856 __pyx_L4_argument_unpacking_done:;
jpayne@69 17857 __pyx_r = __pyx_pf_5pysam_9libctabix_16GZIteratorParsed_6__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 17858
jpayne@69 17859 /* function exit code */
jpayne@69 17860 {
jpayne@69 17861 Py_ssize_t __pyx_temp;
jpayne@69 17862 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 17863 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 17864 }
jpayne@69 17865 }
jpayne@69 17866 __Pyx_RefNannyFinishContext();
jpayne@69 17867 return __pyx_r;
jpayne@69 17868 }
jpayne@69 17869
jpayne@69 17870 static PyObject *__pyx_pf_5pysam_9libctabix_16GZIteratorParsed_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 17871 PyObject *__pyx_r = NULL;
jpayne@69 17872 __Pyx_TraceDeclarations
jpayne@69 17873 __Pyx_RefNannyDeclarations
jpayne@69 17874 int __pyx_lineno = 0;
jpayne@69 17875 const char *__pyx_filename = NULL;
jpayne@69 17876 int __pyx_clineno = 0;
jpayne@69 17877 __Pyx_TraceFrameInit(__pyx_codeobj__36)
jpayne@69 17878 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 17879 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 17880
jpayne@69 17881 /* "(tree fragment)":4
jpayne@69 17882 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17883 * def __setstate_cython__(self, __pyx_state):
jpayne@69 17884 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 17885 */
jpayne@69 17886 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@69 17887 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 17888
jpayne@69 17889 /* "(tree fragment)":3
jpayne@69 17890 * def __reduce_cython__(self):
jpayne@69 17891 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17892 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 17893 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 17894 */
jpayne@69 17895
jpayne@69 17896 /* function exit code */
jpayne@69 17897 __pyx_L1_error:;
jpayne@69 17898 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17899 __pyx_r = NULL;
jpayne@69 17900 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 17901 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 17902 __Pyx_RefNannyFinishContext();
jpayne@69 17903 return __pyx_r;
jpayne@69 17904 }
jpayne@69 17905
jpayne@69 17906 /* "pysam/libctabix.pyx":811
jpayne@69 17907 *
jpayne@69 17908 *
jpayne@69 17909 * def tabix_compress(filename_in, # <<<<<<<<<<<<<<
jpayne@69 17910 * filename_out,
jpayne@69 17911 * force=False):
jpayne@69 17912 */
jpayne@69 17913
jpayne@69 17914 /* Python wrapper */
jpayne@69 17915 static PyObject *__pyx_pw_5pysam_9libctabix_1tabix_compress(PyObject *__pyx_self,
jpayne@69 17916 #if CYTHON_METH_FASTCALL
jpayne@69 17917 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 17918 #else
jpayne@69 17919 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 17920 #endif
jpayne@69 17921 ); /*proto*/
jpayne@69 17922 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_tabix_compress, "tabix_compress(filename_in, filename_out, force=False)\ncompress *filename_in* writing the output to *filename_out*.\n \n Raise an IOError if *filename_out* already exists, unless *force*\n is set.\n ");
jpayne@69 17923 static PyMethodDef __pyx_mdef_5pysam_9libctabix_1tabix_compress = {"tabix_compress", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_1tabix_compress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_tabix_compress};
jpayne@69 17924 static PyObject *__pyx_pw_5pysam_9libctabix_1tabix_compress(PyObject *__pyx_self,
jpayne@69 17925 #if CYTHON_METH_FASTCALL
jpayne@69 17926 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 17927 #else
jpayne@69 17928 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 17929 #endif
jpayne@69 17930 ) {
jpayne@69 17931 PyObject *__pyx_v_filename_in = 0;
jpayne@69 17932 PyObject *__pyx_v_filename_out = 0;
jpayne@69 17933 PyObject *__pyx_v_force = 0;
jpayne@69 17934 #if !CYTHON_METH_FASTCALL
jpayne@69 17935 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 17936 #endif
jpayne@69 17937 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 17938 PyObject* values[3] = {0,0,0};
jpayne@69 17939 int __pyx_lineno = 0;
jpayne@69 17940 const char *__pyx_filename = NULL;
jpayne@69 17941 int __pyx_clineno = 0;
jpayne@69 17942 PyObject *__pyx_r = 0;
jpayne@69 17943 __Pyx_RefNannyDeclarations
jpayne@69 17944 __Pyx_RefNannySetupContext("tabix_compress (wrapper)", 0);
jpayne@69 17945 #if !CYTHON_METH_FASTCALL
jpayne@69 17946 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 17947 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 17948 #else
jpayne@69 17949 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 17950 #endif
jpayne@69 17951 #endif
jpayne@69 17952 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 17953 {
jpayne@69 17954 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename_in,&__pyx_n_s_filename_out,&__pyx_n_s_force,0};
jpayne@69 17955
jpayne@69 17956 /* "pysam/libctabix.pyx":813
jpayne@69 17957 * def tabix_compress(filename_in,
jpayne@69 17958 * filename_out,
jpayne@69 17959 * force=False): # <<<<<<<<<<<<<<
jpayne@69 17960 * '''compress *filename_in* writing the output to *filename_out*.
jpayne@69 17961 *
jpayne@69 17962 */
jpayne@69 17963 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
jpayne@69 17964 if (__pyx_kwds) {
jpayne@69 17965 Py_ssize_t kw_args;
jpayne@69 17966 switch (__pyx_nargs) {
jpayne@69 17967 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 17968 CYTHON_FALLTHROUGH;
jpayne@69 17969 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 17970 CYTHON_FALLTHROUGH;
jpayne@69 17971 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 17972 CYTHON_FALLTHROUGH;
jpayne@69 17973 case 0: break;
jpayne@69 17974 default: goto __pyx_L5_argtuple_error;
jpayne@69 17975 }
jpayne@69 17976 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 17977 switch (__pyx_nargs) {
jpayne@69 17978 case 0:
jpayne@69 17979 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename_in)) != 0)) {
jpayne@69 17980 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 17981 kw_args--;
jpayne@69 17982 }
jpayne@69 17983 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L3_error)
jpayne@69 17984 else goto __pyx_L5_argtuple_error;
jpayne@69 17985 CYTHON_FALLTHROUGH;
jpayne@69 17986 case 1:
jpayne@69 17987 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename_out)) != 0)) {
jpayne@69 17988 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 17989 kw_args--;
jpayne@69 17990 }
jpayne@69 17991 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L3_error)
jpayne@69 17992 else {
jpayne@69 17993 __Pyx_RaiseArgtupleInvalid("tabix_compress", 0, 2, 3, 1); __PYX_ERR(0, 811, __pyx_L3_error)
jpayne@69 17994 }
jpayne@69 17995 CYTHON_FALLTHROUGH;
jpayne@69 17996 case 2:
jpayne@69 17997 if (kw_args > 0) {
jpayne@69 17998 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_force);
jpayne@69 17999 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18000 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L3_error)
jpayne@69 18001 }
jpayne@69 18002 }
jpayne@69 18003 if (unlikely(kw_args > 0)) {
jpayne@69 18004 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 18005 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "tabix_compress") < 0)) __PYX_ERR(0, 811, __pyx_L3_error)
jpayne@69 18006 }
jpayne@69 18007 } else {
jpayne@69 18008 switch (__pyx_nargs) {
jpayne@69 18009 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 18010 CYTHON_FALLTHROUGH;
jpayne@69 18011 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 18012 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 18013 break;
jpayne@69 18014 default: goto __pyx_L5_argtuple_error;
jpayne@69 18015 }
jpayne@69 18016 }
jpayne@69 18017 __pyx_v_filename_in = values[0];
jpayne@69 18018 __pyx_v_filename_out = values[1];
jpayne@69 18019 __pyx_v_force = values[2];
jpayne@69 18020 }
jpayne@69 18021 goto __pyx_L6_skip;
jpayne@69 18022 __pyx_L5_argtuple_error:;
jpayne@69 18023 __Pyx_RaiseArgtupleInvalid("tabix_compress", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 811, __pyx_L3_error)
jpayne@69 18024 __pyx_L6_skip:;
jpayne@69 18025 goto __pyx_L4_argument_unpacking_done;
jpayne@69 18026 __pyx_L3_error:;
jpayne@69 18027 {
jpayne@69 18028 Py_ssize_t __pyx_temp;
jpayne@69 18029 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 18030 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 18031 }
jpayne@69 18032 }
jpayne@69 18033 __Pyx_AddTraceback("pysam.libctabix.tabix_compress", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 18034 __Pyx_RefNannyFinishContext();
jpayne@69 18035 return NULL;
jpayne@69 18036 __pyx_L4_argument_unpacking_done:;
jpayne@69 18037 __pyx_r = __pyx_pf_5pysam_9libctabix_tabix_compress(__pyx_self, __pyx_v_filename_in, __pyx_v_filename_out, __pyx_v_force);
jpayne@69 18038
jpayne@69 18039 /* "pysam/libctabix.pyx":811
jpayne@69 18040 *
jpayne@69 18041 *
jpayne@69 18042 * def tabix_compress(filename_in, # <<<<<<<<<<<<<<
jpayne@69 18043 * filename_out,
jpayne@69 18044 * force=False):
jpayne@69 18045 */
jpayne@69 18046
jpayne@69 18047 /* function exit code */
jpayne@69 18048 {
jpayne@69 18049 Py_ssize_t __pyx_temp;
jpayne@69 18050 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 18051 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 18052 }
jpayne@69 18053 }
jpayne@69 18054 __Pyx_RefNannyFinishContext();
jpayne@69 18055 return __pyx_r;
jpayne@69 18056 }
jpayne@69 18057
jpayne@69 18058 static PyObject *__pyx_pf_5pysam_9libctabix_tabix_compress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename_in, PyObject *__pyx_v_filename_out, PyObject *__pyx_v_force) {
jpayne@69 18059 int __pyx_v_WINDOW_SIZE;
jpayne@69 18060 int __pyx_v_c;
jpayne@69 18061 int __pyx_v_r;
jpayne@69 18062 void *__pyx_v_buffer;
jpayne@69 18063 BGZF *__pyx_v_fp;
jpayne@69 18064 int __pyx_v_fd_src;
jpayne@69 18065 int __pyx_v_is_empty;
jpayne@69 18066 int __pyx_v_O_RDONLY;
jpayne@69 18067 PyObject *__pyx_v_fn = NULL;
jpayne@69 18068 char *__pyx_v_cfn;
jpayne@69 18069 PyObject *__pyx_r = NULL;
jpayne@69 18070 __Pyx_TraceDeclarations
jpayne@69 18071 __Pyx_RefNannyDeclarations
jpayne@69 18072 int __pyx_t_1;
jpayne@69 18073 int __pyx_t_2;
jpayne@69 18074 int __pyx_t_3;
jpayne@69 18075 PyObject *__pyx_t_4 = NULL;
jpayne@69 18076 PyObject *__pyx_t_5 = NULL;
jpayne@69 18077 PyObject *__pyx_t_6 = NULL;
jpayne@69 18078 unsigned int __pyx_t_7;
jpayne@69 18079 int __pyx_t_8;
jpayne@69 18080 char *__pyx_t_9;
jpayne@69 18081 int __pyx_lineno = 0;
jpayne@69 18082 const char *__pyx_filename = NULL;
jpayne@69 18083 int __pyx_clineno = 0;
jpayne@69 18084 __Pyx_TraceFrameInit(__pyx_codeobj__37)
jpayne@69 18085 __Pyx_RefNannySetupContext("tabix_compress", 1);
jpayne@69 18086 __Pyx_TraceCall("tabix_compress", __pyx_f[0], 811, 0, __PYX_ERR(0, 811, __pyx_L1_error));
jpayne@69 18087
jpayne@69 18088 /* "pysam/libctabix.pyx":820
jpayne@69 18089 * '''
jpayne@69 18090 *
jpayne@69 18091 * if not force and os.path.exists(filename_out): # <<<<<<<<<<<<<<
jpayne@69 18092 * raise IOError(
jpayne@69 18093 * "Filename '%s' already exists, use *force* to "
jpayne@69 18094 */
jpayne@69 18095 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 820, __pyx_L1_error)
jpayne@69 18096 __pyx_t_3 = (!__pyx_t_2);
jpayne@69 18097 if (__pyx_t_3) {
jpayne@69 18098 } else {
jpayne@69 18099 __pyx_t_1 = __pyx_t_3;
jpayne@69 18100 goto __pyx_L4_bool_binop_done;
jpayne@69 18101 }
jpayne@69 18102 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 820, __pyx_L1_error)
jpayne@69 18103 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 18104 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 820, __pyx_L1_error)
jpayne@69 18105 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 18106 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 18107 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exists); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 820, __pyx_L1_error)
jpayne@69 18108 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 18109 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 18110 __pyx_t_6 = NULL;
jpayne@69 18111 __pyx_t_7 = 0;
jpayne@69 18112 #if CYTHON_UNPACK_METHODS
jpayne@69 18113 if (likely(PyMethod_Check(__pyx_t_5))) {
jpayne@69 18114 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
jpayne@69 18115 if (likely(__pyx_t_6)) {
jpayne@69 18116 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
jpayne@69 18117 __Pyx_INCREF(__pyx_t_6);
jpayne@69 18118 __Pyx_INCREF(function);
jpayne@69 18119 __Pyx_DECREF_SET(__pyx_t_5, function);
jpayne@69 18120 __pyx_t_7 = 1;
jpayne@69 18121 }
jpayne@69 18122 }
jpayne@69 18123 #endif
jpayne@69 18124 {
jpayne@69 18125 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_filename_out};
jpayne@69 18126 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
jpayne@69 18127 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 18128 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 820, __pyx_L1_error)
jpayne@69 18129 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 18130 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 18131 }
jpayne@69 18132 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 820, __pyx_L1_error)
jpayne@69 18133 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 18134 __pyx_t_1 = __pyx_t_3;
jpayne@69 18135 __pyx_L4_bool_binop_done:;
jpayne@69 18136 if (unlikely(__pyx_t_1)) {
jpayne@69 18137
jpayne@69 18138 /* "pysam/libctabix.pyx":823
jpayne@69 18139 * raise IOError(
jpayne@69 18140 * "Filename '%s' already exists, use *force* to "
jpayne@69 18141 * "overwrite" % filename_out) # <<<<<<<<<<<<<<
jpayne@69 18142 *
jpayne@69 18143 * cdef int WINDOW_SIZE
jpayne@69 18144 */
jpayne@69 18145 __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Filename_s_already_exists_use_fo, __pyx_v_filename_out); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error)
jpayne@69 18146 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 18147
jpayne@69 18148 /* "pysam/libctabix.pyx":821
jpayne@69 18149 *
jpayne@69 18150 * if not force and os.path.exists(filename_out):
jpayne@69 18151 * raise IOError( # <<<<<<<<<<<<<<
jpayne@69 18152 * "Filename '%s' already exists, use *force* to "
jpayne@69 18153 * "overwrite" % filename_out)
jpayne@69 18154 */
jpayne@69 18155 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 821, __pyx_L1_error)
jpayne@69 18156 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 18157 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 18158 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
jpayne@69 18159 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 18160 __PYX_ERR(0, 821, __pyx_L1_error)
jpayne@69 18161
jpayne@69 18162 /* "pysam/libctabix.pyx":820
jpayne@69 18163 * '''
jpayne@69 18164 *
jpayne@69 18165 * if not force and os.path.exists(filename_out): # <<<<<<<<<<<<<<
jpayne@69 18166 * raise IOError(
jpayne@69 18167 * "Filename '%s' already exists, use *force* to "
jpayne@69 18168 */
jpayne@69 18169 }
jpayne@69 18170
jpayne@69 18171 /* "pysam/libctabix.pyx":830
jpayne@69 18172 * cdef BGZF * fp
jpayne@69 18173 * cdef int fd_src
jpayne@69 18174 * cdef bint is_empty = True # <<<<<<<<<<<<<<
jpayne@69 18175 * cdef int O_RDONLY
jpayne@69 18176 * O_RDONLY = os.O_RDONLY
jpayne@69 18177 */
jpayne@69 18178 __pyx_v_is_empty = 1;
jpayne@69 18179
jpayne@69 18180 /* "pysam/libctabix.pyx":832
jpayne@69 18181 * cdef bint is_empty = True
jpayne@69 18182 * cdef int O_RDONLY
jpayne@69 18183 * O_RDONLY = os.O_RDONLY # <<<<<<<<<<<<<<
jpayne@69 18184 *
jpayne@69 18185 * WINDOW_SIZE = 64 * 1024
jpayne@69 18186 */
jpayne@69 18187 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 832, __pyx_L1_error)
jpayne@69 18188 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 18189 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_O_RDONLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
jpayne@69 18190 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 18191 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 18192 __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 832, __pyx_L1_error)
jpayne@69 18193 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 18194 __pyx_v_O_RDONLY = __pyx_t_8;
jpayne@69 18195
jpayne@69 18196 /* "pysam/libctabix.pyx":834
jpayne@69 18197 * O_RDONLY = os.O_RDONLY
jpayne@69 18198 *
jpayne@69 18199 * WINDOW_SIZE = 64 * 1024 # <<<<<<<<<<<<<<
jpayne@69 18200 *
jpayne@69 18201 * fn = encode_filename(filename_out)
jpayne@69 18202 */
jpayne@69 18203 __pyx_v_WINDOW_SIZE = 0x10000;
jpayne@69 18204
jpayne@69 18205 /* "pysam/libctabix.pyx":836
jpayne@69 18206 * WINDOW_SIZE = 64 * 1024
jpayne@69 18207 *
jpayne@69 18208 * fn = encode_filename(filename_out) # <<<<<<<<<<<<<<
jpayne@69 18209 * cdef char *cfn = fn
jpayne@69 18210 * with nogil:
jpayne@69 18211 */
jpayne@69 18212 __pyx_t_4 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filename_out); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error)
jpayne@69 18213 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 18214 __pyx_v_fn = ((PyObject*)__pyx_t_4);
jpayne@69 18215 __pyx_t_4 = 0;
jpayne@69 18216
jpayne@69 18217 /* "pysam/libctabix.pyx":837
jpayne@69 18218 *
jpayne@69 18219 * fn = encode_filename(filename_out)
jpayne@69 18220 * cdef char *cfn = fn # <<<<<<<<<<<<<<
jpayne@69 18221 * with nogil:
jpayne@69 18222 * fp = bgzf_open(cfn, "w")
jpayne@69 18223 */
jpayne@69 18224 if (unlikely(__pyx_v_fn == Py_None)) {
jpayne@69 18225 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@69 18226 __PYX_ERR(0, 837, __pyx_L1_error)
jpayne@69 18227 }
jpayne@69 18228 __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_fn); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 837, __pyx_L1_error)
jpayne@69 18229 __pyx_v_cfn = __pyx_t_9;
jpayne@69 18230
jpayne@69 18231 /* "pysam/libctabix.pyx":838
jpayne@69 18232 * fn = encode_filename(filename_out)
jpayne@69 18233 * cdef char *cfn = fn
jpayne@69 18234 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 18235 * fp = bgzf_open(cfn, "w")
jpayne@69 18236 * if fp == NULL:
jpayne@69 18237 */
jpayne@69 18238 {
jpayne@69 18239 #ifdef WITH_THREAD
jpayne@69 18240 PyThreadState *_save;
jpayne@69 18241 _save = NULL;
jpayne@69 18242 Py_UNBLOCK_THREADS
jpayne@69 18243 __Pyx_FastGIL_Remember();
jpayne@69 18244 #endif
jpayne@69 18245 /*try:*/ {
jpayne@69 18246
jpayne@69 18247 /* "pysam/libctabix.pyx":839
jpayne@69 18248 * cdef char *cfn = fn
jpayne@69 18249 * with nogil:
jpayne@69 18250 * fp = bgzf_open(cfn, "w") # <<<<<<<<<<<<<<
jpayne@69 18251 * if fp == NULL:
jpayne@69 18252 * raise IOError("could not open '%s' for writing" % filename_out)
jpayne@69 18253 */
jpayne@69 18254 __pyx_v_fp = bgzf_open(__pyx_v_cfn, ((char const *)"w"));
jpayne@69 18255 }
jpayne@69 18256
jpayne@69 18257 /* "pysam/libctabix.pyx":838
jpayne@69 18258 * fn = encode_filename(filename_out)
jpayne@69 18259 * cdef char *cfn = fn
jpayne@69 18260 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 18261 * fp = bgzf_open(cfn, "w")
jpayne@69 18262 * if fp == NULL:
jpayne@69 18263 */
jpayne@69 18264 /*finally:*/ {
jpayne@69 18265 /*normal exit:*/{
jpayne@69 18266 #ifdef WITH_THREAD
jpayne@69 18267 __Pyx_FastGIL_Forget();
jpayne@69 18268 Py_BLOCK_THREADS
jpayne@69 18269 #endif
jpayne@69 18270 goto __pyx_L8;
jpayne@69 18271 }
jpayne@69 18272 __pyx_L8:;
jpayne@69 18273 }
jpayne@69 18274 }
jpayne@69 18275
jpayne@69 18276 /* "pysam/libctabix.pyx":840
jpayne@69 18277 * with nogil:
jpayne@69 18278 * fp = bgzf_open(cfn, "w")
jpayne@69 18279 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@69 18280 * raise IOError("could not open '%s' for writing" % filename_out)
jpayne@69 18281 *
jpayne@69 18282 */
jpayne@69 18283 __pyx_t_1 = (__pyx_v_fp == NULL);
jpayne@69 18284 if (unlikely(__pyx_t_1)) {
jpayne@69 18285
jpayne@69 18286 /* "pysam/libctabix.pyx":841
jpayne@69 18287 * fp = bgzf_open(cfn, "w")
jpayne@69 18288 * if fp == NULL:
jpayne@69 18289 * raise IOError("could not open '%s' for writing" % filename_out) # <<<<<<<<<<<<<<
jpayne@69 18290 *
jpayne@69 18291 * fn = encode_filename(filename_in)
jpayne@69 18292 */
jpayne@69 18293 __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_could_not_open_s_for_writing, __pyx_v_filename_out); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
jpayne@69 18294 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 18295 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 841, __pyx_L1_error)
jpayne@69 18296 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 18297 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 18298 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
jpayne@69 18299 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 18300 __PYX_ERR(0, 841, __pyx_L1_error)
jpayne@69 18301
jpayne@69 18302 /* "pysam/libctabix.pyx":840
jpayne@69 18303 * with nogil:
jpayne@69 18304 * fp = bgzf_open(cfn, "w")
jpayne@69 18305 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@69 18306 * raise IOError("could not open '%s' for writing" % filename_out)
jpayne@69 18307 *
jpayne@69 18308 */
jpayne@69 18309 }
jpayne@69 18310
jpayne@69 18311 /* "pysam/libctabix.pyx":843
jpayne@69 18312 * raise IOError("could not open '%s' for writing" % filename_out)
jpayne@69 18313 *
jpayne@69 18314 * fn = encode_filename(filename_in) # <<<<<<<<<<<<<<
jpayne@69 18315 * fd_src = open(fn, O_RDONLY)
jpayne@69 18316 * if fd_src == 0:
jpayne@69 18317 */
jpayne@69 18318 __pyx_t_5 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filename_in); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L1_error)
jpayne@69 18319 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 18320 __Pyx_DECREF_SET(__pyx_v_fn, ((PyObject*)__pyx_t_5));
jpayne@69 18321 __pyx_t_5 = 0;
jpayne@69 18322
jpayne@69 18323 /* "pysam/libctabix.pyx":844
jpayne@69 18324 *
jpayne@69 18325 * fn = encode_filename(filename_in)
jpayne@69 18326 * fd_src = open(fn, O_RDONLY) # <<<<<<<<<<<<<<
jpayne@69 18327 * if fd_src == 0:
jpayne@69 18328 * raise IOError("could not open '%s' for reading" % filename_in)
jpayne@69 18329 */
jpayne@69 18330 if (unlikely(__pyx_v_fn == Py_None)) {
jpayne@69 18331 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@69 18332 __PYX_ERR(0, 844, __pyx_L1_error)
jpayne@69 18333 }
jpayne@69 18334 __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_fn); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 844, __pyx_L1_error)
jpayne@69 18335 __pyx_v_fd_src = open(__pyx_t_9, __pyx_v_O_RDONLY);
jpayne@69 18336
jpayne@69 18337 /* "pysam/libctabix.pyx":845
jpayne@69 18338 * fn = encode_filename(filename_in)
jpayne@69 18339 * fd_src = open(fn, O_RDONLY)
jpayne@69 18340 * if fd_src == 0: # <<<<<<<<<<<<<<
jpayne@69 18341 * raise IOError("could not open '%s' for reading" % filename_in)
jpayne@69 18342 *
jpayne@69 18343 */
jpayne@69 18344 __pyx_t_1 = (__pyx_v_fd_src == 0);
jpayne@69 18345 if (unlikely(__pyx_t_1)) {
jpayne@69 18346
jpayne@69 18347 /* "pysam/libctabix.pyx":846
jpayne@69 18348 * fd_src = open(fn, O_RDONLY)
jpayne@69 18349 * if fd_src == 0:
jpayne@69 18350 * raise IOError("could not open '%s' for reading" % filename_in) # <<<<<<<<<<<<<<
jpayne@69 18351 *
jpayne@69 18352 * buffer = malloc(WINDOW_SIZE)
jpayne@69 18353 */
jpayne@69 18354 __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_could_not_open_s_for_reading, __pyx_v_filename_in); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 846, __pyx_L1_error)
jpayne@69 18355 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 18356 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error)
jpayne@69 18357 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 18358 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 18359 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
jpayne@69 18360 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 18361 __PYX_ERR(0, 846, __pyx_L1_error)
jpayne@69 18362
jpayne@69 18363 /* "pysam/libctabix.pyx":845
jpayne@69 18364 * fn = encode_filename(filename_in)
jpayne@69 18365 * fd_src = open(fn, O_RDONLY)
jpayne@69 18366 * if fd_src == 0: # <<<<<<<<<<<<<<
jpayne@69 18367 * raise IOError("could not open '%s' for reading" % filename_in)
jpayne@69 18368 *
jpayne@69 18369 */
jpayne@69 18370 }
jpayne@69 18371
jpayne@69 18372 /* "pysam/libctabix.pyx":848
jpayne@69 18373 * raise IOError("could not open '%s' for reading" % filename_in)
jpayne@69 18374 *
jpayne@69 18375 * buffer = malloc(WINDOW_SIZE) # <<<<<<<<<<<<<<
jpayne@69 18376 * c = 1
jpayne@69 18377 *
jpayne@69 18378 */
jpayne@69 18379 __pyx_v_buffer = malloc(__pyx_v_WINDOW_SIZE);
jpayne@69 18380
jpayne@69 18381 /* "pysam/libctabix.pyx":849
jpayne@69 18382 *
jpayne@69 18383 * buffer = malloc(WINDOW_SIZE)
jpayne@69 18384 * c = 1 # <<<<<<<<<<<<<<
jpayne@69 18385 *
jpayne@69 18386 * while c > 0:
jpayne@69 18387 */
jpayne@69 18388 __pyx_v_c = 1;
jpayne@69 18389
jpayne@69 18390 /* "pysam/libctabix.pyx":851
jpayne@69 18391 * c = 1
jpayne@69 18392 *
jpayne@69 18393 * while c > 0: # <<<<<<<<<<<<<<
jpayne@69 18394 * with nogil:
jpayne@69 18395 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@69 18396 */
jpayne@69 18397 while (1) {
jpayne@69 18398 __pyx_t_1 = (__pyx_v_c > 0);
jpayne@69 18399 if (!__pyx_t_1) break;
jpayne@69 18400
jpayne@69 18401 /* "pysam/libctabix.pyx":852
jpayne@69 18402 *
jpayne@69 18403 * while c > 0:
jpayne@69 18404 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 18405 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@69 18406 * if c > 0:
jpayne@69 18407 */
jpayne@69 18408 {
jpayne@69 18409 #ifdef WITH_THREAD
jpayne@69 18410 PyThreadState *_save;
jpayne@69 18411 _save = NULL;
jpayne@69 18412 Py_UNBLOCK_THREADS
jpayne@69 18413 __Pyx_FastGIL_Remember();
jpayne@69 18414 #endif
jpayne@69 18415 /*try:*/ {
jpayne@69 18416
jpayne@69 18417 /* "pysam/libctabix.pyx":853
jpayne@69 18418 * while c > 0:
jpayne@69 18419 * with nogil:
jpayne@69 18420 * c = read(fd_src, buffer, WINDOW_SIZE) # <<<<<<<<<<<<<<
jpayne@69 18421 * if c > 0:
jpayne@69 18422 * is_empty = False
jpayne@69 18423 */
jpayne@69 18424 __pyx_v_c = read(__pyx_v_fd_src, __pyx_v_buffer, __pyx_v_WINDOW_SIZE);
jpayne@69 18425
jpayne@69 18426 /* "pysam/libctabix.pyx":854
jpayne@69 18427 * with nogil:
jpayne@69 18428 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@69 18429 * if c > 0: # <<<<<<<<<<<<<<
jpayne@69 18430 * is_empty = False
jpayne@69 18431 * r = bgzf_write(fp, buffer, c)
jpayne@69 18432 */
jpayne@69 18433 __pyx_t_1 = (__pyx_v_c > 0);
jpayne@69 18434 if (__pyx_t_1) {
jpayne@69 18435
jpayne@69 18436 /* "pysam/libctabix.pyx":855
jpayne@69 18437 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@69 18438 * if c > 0:
jpayne@69 18439 * is_empty = False # <<<<<<<<<<<<<<
jpayne@69 18440 * r = bgzf_write(fp, buffer, c)
jpayne@69 18441 * if r < 0:
jpayne@69 18442 */
jpayne@69 18443 __pyx_v_is_empty = 0;
jpayne@69 18444
jpayne@69 18445 /* "pysam/libctabix.pyx":854
jpayne@69 18446 * with nogil:
jpayne@69 18447 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@69 18448 * if c > 0: # <<<<<<<<<<<<<<
jpayne@69 18449 * is_empty = False
jpayne@69 18450 * r = bgzf_write(fp, buffer, c)
jpayne@69 18451 */
jpayne@69 18452 }
jpayne@69 18453
jpayne@69 18454 /* "pysam/libctabix.pyx":856
jpayne@69 18455 * if c > 0:
jpayne@69 18456 * is_empty = False
jpayne@69 18457 * r = bgzf_write(fp, buffer, c) # <<<<<<<<<<<<<<
jpayne@69 18458 * if r < 0:
jpayne@69 18459 * free(buffer)
jpayne@69 18460 */
jpayne@69 18461 __pyx_v_r = bgzf_write(__pyx_v_fp, __pyx_v_buffer, __pyx_v_c);
jpayne@69 18462 }
jpayne@69 18463
jpayne@69 18464 /* "pysam/libctabix.pyx":852
jpayne@69 18465 *
jpayne@69 18466 * while c > 0:
jpayne@69 18467 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 18468 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@69 18469 * if c > 0:
jpayne@69 18470 */
jpayne@69 18471 /*finally:*/ {
jpayne@69 18472 /*normal exit:*/{
jpayne@69 18473 #ifdef WITH_THREAD
jpayne@69 18474 __Pyx_FastGIL_Forget();
jpayne@69 18475 Py_BLOCK_THREADS
jpayne@69 18476 #endif
jpayne@69 18477 goto __pyx_L17;
jpayne@69 18478 }
jpayne@69 18479 __pyx_L17:;
jpayne@69 18480 }
jpayne@69 18481 }
jpayne@69 18482
jpayne@69 18483 /* "pysam/libctabix.pyx":857
jpayne@69 18484 * is_empty = False
jpayne@69 18485 * r = bgzf_write(fp, buffer, c)
jpayne@69 18486 * if r < 0: # <<<<<<<<<<<<<<
jpayne@69 18487 * free(buffer)
jpayne@69 18488 * raise IOError("writing failed")
jpayne@69 18489 */
jpayne@69 18490 __pyx_t_1 = (__pyx_v_r < 0);
jpayne@69 18491 if (unlikely(__pyx_t_1)) {
jpayne@69 18492
jpayne@69 18493 /* "pysam/libctabix.pyx":858
jpayne@69 18494 * r = bgzf_write(fp, buffer, c)
jpayne@69 18495 * if r < 0:
jpayne@69 18496 * free(buffer) # <<<<<<<<<<<<<<
jpayne@69 18497 * raise IOError("writing failed")
jpayne@69 18498 *
jpayne@69 18499 */
jpayne@69 18500 free(__pyx_v_buffer);
jpayne@69 18501
jpayne@69 18502 /* "pysam/libctabix.pyx":859
jpayne@69 18503 * if r < 0:
jpayne@69 18504 * free(buffer)
jpayne@69 18505 * raise IOError("writing failed") # <<<<<<<<<<<<<<
jpayne@69 18506 *
jpayne@69 18507 * free(buffer)
jpayne@69 18508 */
jpayne@69 18509 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error)
jpayne@69 18510 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 18511 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
jpayne@69 18512 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 18513 __PYX_ERR(0, 859, __pyx_L1_error)
jpayne@69 18514
jpayne@69 18515 /* "pysam/libctabix.pyx":857
jpayne@69 18516 * is_empty = False
jpayne@69 18517 * r = bgzf_write(fp, buffer, c)
jpayne@69 18518 * if r < 0: # <<<<<<<<<<<<<<
jpayne@69 18519 * free(buffer)
jpayne@69 18520 * raise IOError("writing failed")
jpayne@69 18521 */
jpayne@69 18522 }
jpayne@69 18523 }
jpayne@69 18524
jpayne@69 18525 /* "pysam/libctabix.pyx":861
jpayne@69 18526 * raise IOError("writing failed")
jpayne@69 18527 *
jpayne@69 18528 * free(buffer) # <<<<<<<<<<<<<<
jpayne@69 18529 * r = bgzf_close(fp)
jpayne@69 18530 * if r < 0:
jpayne@69 18531 */
jpayne@69 18532 free(__pyx_v_buffer);
jpayne@69 18533
jpayne@69 18534 /* "pysam/libctabix.pyx":862
jpayne@69 18535 *
jpayne@69 18536 * free(buffer)
jpayne@69 18537 * r = bgzf_close(fp) # <<<<<<<<<<<<<<
jpayne@69 18538 * if r < 0:
jpayne@69 18539 * raise IOError("error %i when writing to file %s" % (r, filename_out))
jpayne@69 18540 */
jpayne@69 18541 __pyx_v_r = bgzf_close(__pyx_v_fp);
jpayne@69 18542
jpayne@69 18543 /* "pysam/libctabix.pyx":863
jpayne@69 18544 * free(buffer)
jpayne@69 18545 * r = bgzf_close(fp)
jpayne@69 18546 * if r < 0: # <<<<<<<<<<<<<<
jpayne@69 18547 * raise IOError("error %i when writing to file %s" % (r, filename_out))
jpayne@69 18548 *
jpayne@69 18549 */
jpayne@69 18550 __pyx_t_1 = (__pyx_v_r < 0);
jpayne@69 18551 if (unlikely(__pyx_t_1)) {
jpayne@69 18552
jpayne@69 18553 /* "pysam/libctabix.pyx":864
jpayne@69 18554 * r = bgzf_close(fp)
jpayne@69 18555 * if r < 0:
jpayne@69 18556 * raise IOError("error %i when writing to file %s" % (r, filename_out)) # <<<<<<<<<<<<<<
jpayne@69 18557 *
jpayne@69 18558 * r = close(fd_src)
jpayne@69 18559 */
jpayne@69 18560 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 864, __pyx_L1_error)
jpayne@69 18561 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 18562 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 864, __pyx_L1_error)
jpayne@69 18563 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 18564 __Pyx_GIVEREF(__pyx_t_4);
jpayne@69 18565 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 864, __pyx_L1_error);
jpayne@69 18566 __Pyx_INCREF(__pyx_v_filename_out);
jpayne@69 18567 __Pyx_GIVEREF(__pyx_v_filename_out);
jpayne@69 18568 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_filename_out)) __PYX_ERR(0, 864, __pyx_L1_error);
jpayne@69 18569 __pyx_t_4 = 0;
jpayne@69 18570 __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_error_i_when_writing_to_file_s, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 864, __pyx_L1_error)
jpayne@69 18571 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 18572 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 18573 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 864, __pyx_L1_error)
jpayne@69 18574 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 18575 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 18576 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
jpayne@69 18577 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 18578 __PYX_ERR(0, 864, __pyx_L1_error)
jpayne@69 18579
jpayne@69 18580 /* "pysam/libctabix.pyx":863
jpayne@69 18581 * free(buffer)
jpayne@69 18582 * r = bgzf_close(fp)
jpayne@69 18583 * if r < 0: # <<<<<<<<<<<<<<
jpayne@69 18584 * raise IOError("error %i when writing to file %s" % (r, filename_out))
jpayne@69 18585 *
jpayne@69 18586 */
jpayne@69 18587 }
jpayne@69 18588
jpayne@69 18589 /* "pysam/libctabix.pyx":866
jpayne@69 18590 * raise IOError("error %i when writing to file %s" % (r, filename_out))
jpayne@69 18591 *
jpayne@69 18592 * r = close(fd_src) # <<<<<<<<<<<<<<
jpayne@69 18593 * # an empty file will return with -1, thus ignore this.
jpayne@69 18594 * if r < 0:
jpayne@69 18595 */
jpayne@69 18596 __pyx_v_r = close(__pyx_v_fd_src);
jpayne@69 18597
jpayne@69 18598 /* "pysam/libctabix.pyx":868
jpayne@69 18599 * r = close(fd_src)
jpayne@69 18600 * # an empty file will return with -1, thus ignore this.
jpayne@69 18601 * if r < 0: # <<<<<<<<<<<<<<
jpayne@69 18602 * if not (r == -1 and is_empty):
jpayne@69 18603 * raise IOError("error %i when closing file %s" % (r, filename_in))
jpayne@69 18604 */
jpayne@69 18605 __pyx_t_1 = (__pyx_v_r < 0);
jpayne@69 18606 if (__pyx_t_1) {
jpayne@69 18607
jpayne@69 18608 /* "pysam/libctabix.pyx":869
jpayne@69 18609 * # an empty file will return with -1, thus ignore this.
jpayne@69 18610 * if r < 0:
jpayne@69 18611 * if not (r == -1 and is_empty): # <<<<<<<<<<<<<<
jpayne@69 18612 * raise IOError("error %i when closing file %s" % (r, filename_in))
jpayne@69 18613 *
jpayne@69 18614 */
jpayne@69 18615 __pyx_t_3 = (__pyx_v_r == -1L);
jpayne@69 18616 if (__pyx_t_3) {
jpayne@69 18617 } else {
jpayne@69 18618 __pyx_t_1 = __pyx_t_3;
jpayne@69 18619 goto __pyx_L23_bool_binop_done;
jpayne@69 18620 }
jpayne@69 18621 __pyx_t_1 = __pyx_v_is_empty;
jpayne@69 18622 __pyx_L23_bool_binop_done:;
jpayne@69 18623 __pyx_t_3 = (!__pyx_t_1);
jpayne@69 18624 if (unlikely(__pyx_t_3)) {
jpayne@69 18625
jpayne@69 18626 /* "pysam/libctabix.pyx":870
jpayne@69 18627 * if r < 0:
jpayne@69 18628 * if not (r == -1 and is_empty):
jpayne@69 18629 * raise IOError("error %i when closing file %s" % (r, filename_in)) # <<<<<<<<<<<<<<
jpayne@69 18630 *
jpayne@69 18631 *
jpayne@69 18632 */
jpayne@69 18633 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 870, __pyx_L1_error)
jpayne@69 18634 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 18635 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L1_error)
jpayne@69 18636 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 18637 __Pyx_GIVEREF(__pyx_t_5);
jpayne@69 18638 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 870, __pyx_L1_error);
jpayne@69 18639 __Pyx_INCREF(__pyx_v_filename_in);
jpayne@69 18640 __Pyx_GIVEREF(__pyx_v_filename_in);
jpayne@69 18641 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_filename_in)) __PYX_ERR(0, 870, __pyx_L1_error);
jpayne@69 18642 __pyx_t_5 = 0;
jpayne@69 18643 __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_error_i_when_closing_file_s, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 870, __pyx_L1_error)
jpayne@69 18644 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 18645 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 18646 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L1_error)
jpayne@69 18647 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 18648 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 18649 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
jpayne@69 18650 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 18651 __PYX_ERR(0, 870, __pyx_L1_error)
jpayne@69 18652
jpayne@69 18653 /* "pysam/libctabix.pyx":869
jpayne@69 18654 * # an empty file will return with -1, thus ignore this.
jpayne@69 18655 * if r < 0:
jpayne@69 18656 * if not (r == -1 and is_empty): # <<<<<<<<<<<<<<
jpayne@69 18657 * raise IOError("error %i when closing file %s" % (r, filename_in))
jpayne@69 18658 *
jpayne@69 18659 */
jpayne@69 18660 }
jpayne@69 18661
jpayne@69 18662 /* "pysam/libctabix.pyx":868
jpayne@69 18663 * r = close(fd_src)
jpayne@69 18664 * # an empty file will return with -1, thus ignore this.
jpayne@69 18665 * if r < 0: # <<<<<<<<<<<<<<
jpayne@69 18666 * if not (r == -1 and is_empty):
jpayne@69 18667 * raise IOError("error %i when closing file %s" % (r, filename_in))
jpayne@69 18668 */
jpayne@69 18669 }
jpayne@69 18670
jpayne@69 18671 /* "pysam/libctabix.pyx":811
jpayne@69 18672 *
jpayne@69 18673 *
jpayne@69 18674 * def tabix_compress(filename_in, # <<<<<<<<<<<<<<
jpayne@69 18675 * filename_out,
jpayne@69 18676 * force=False):
jpayne@69 18677 */
jpayne@69 18678
jpayne@69 18679 /* function exit code */
jpayne@69 18680 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 18681 goto __pyx_L0;
jpayne@69 18682 __pyx_L1_error:;
jpayne@69 18683 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 18684 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 18685 __Pyx_XDECREF(__pyx_t_6);
jpayne@69 18686 __Pyx_AddTraceback("pysam.libctabix.tabix_compress", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 18687 __pyx_r = NULL;
jpayne@69 18688 __pyx_L0:;
jpayne@69 18689 __Pyx_XDECREF(__pyx_v_fn);
jpayne@69 18690 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 18691 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 18692 __Pyx_RefNannyFinishContext();
jpayne@69 18693 return __pyx_r;
jpayne@69 18694 }
jpayne@69 18695
jpayne@69 18696 /* "pysam/libctabix.pyx":873
jpayne@69 18697 *
jpayne@69 18698 *
jpayne@69 18699 * def tabix_index(filename, # <<<<<<<<<<<<<<
jpayne@69 18700 * force=False,
jpayne@69 18701 * seq_col=None,
jpayne@69 18702 */
jpayne@69 18703
jpayne@69 18704 /* Python wrapper */
jpayne@69 18705 static PyObject *__pyx_pw_5pysam_9libctabix_3tabix_index(PyObject *__pyx_self,
jpayne@69 18706 #if CYTHON_METH_FASTCALL
jpayne@69 18707 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 18708 #else
jpayne@69 18709 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 18710 #endif
jpayne@69 18711 ); /*proto*/
jpayne@69 18712 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_2tabix_index, "tabix_index(filename, force=False, seq_col=None, start_col=None, end_col=None, preset=None, meta_char=u'#', int line_skip=0, zerobased=False, int min_shift=-1, index=None, keep_original=False, csi=False)\nindex tab-separated *filename* using tabix.\n\n An existing index will not be overwritten unless *force* is set.\n\n The index will be built from coordinates in columns *seq_col*,\n *start_col* and *end_col*.\n\n The contents of *filename* have to be sorted by contig and\n position - the method does not check if the file is sorted.\n\n Column indices are 0-based. Note that this is different from the\n tabix command line utility where column indices start at 1.\n \n Coordinates in the file are assumed to be 1-based unless\n *zerobased* is set.\n\n If *preset* is provided, the column coordinates are taken from a\n preset. Valid values for preset are \"gff\", \"bed\", \"sam\", \"vcf\",\n psltbl\", \"pileup\".\n \n Lines beginning with *meta_char* and the first *line_skip* lines\n will be skipped.\n\n If *filename* is not detected as a gzip file it will be automatically\n compressed. The original file will be removed and only the compressed\n file will be retained.\n\n By default or when *min_shift* is 0, creates a TBI index. If *min_shift*\n is greater than zero and/or *csi* is True, creates a CSI index with a\n minimal interval size of 1<<*min_shift* (1<<14 if only *csi* is set).\n\n *index* controls the filename which should be used for creating the index.\n If not set, the default is to append ``.tbi`` to *filename*.\n\n When automatically compressing files, if *keep_original* is set the\n uncompressed file will not be deleted.\n\n returns the filename of the compressed data\n\n ");
jpayne@69 18713 static PyMethodDef __pyx_mdef_5pysam_9libctabix_3tabix_index = {"tabix_index", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_3tabix_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_2tabix_index};
jpayne@69 18714 static PyObject *__pyx_pw_5pysam_9libctabix_3tabix_index(PyObject *__pyx_self,
jpayne@69 18715 #if CYTHON_METH_FASTCALL
jpayne@69 18716 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 18717 #else
jpayne@69 18718 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 18719 #endif
jpayne@69 18720 ) {
jpayne@69 18721 PyObject *__pyx_v_filename = 0;
jpayne@69 18722 PyObject *__pyx_v_force = 0;
jpayne@69 18723 PyObject *__pyx_v_seq_col = 0;
jpayne@69 18724 PyObject *__pyx_v_start_col = 0;
jpayne@69 18725 PyObject *__pyx_v_end_col = 0;
jpayne@69 18726 PyObject *__pyx_v_preset = 0;
jpayne@69 18727 PyObject *__pyx_v_meta_char = 0;
jpayne@69 18728 int __pyx_v_line_skip;
jpayne@69 18729 PyObject *__pyx_v_zerobased = 0;
jpayne@69 18730 int __pyx_v_min_shift;
jpayne@69 18731 PyObject *__pyx_v_index = 0;
jpayne@69 18732 PyObject *__pyx_v_keep_original = 0;
jpayne@69 18733 PyObject *__pyx_v_csi = 0;
jpayne@69 18734 #if !CYTHON_METH_FASTCALL
jpayne@69 18735 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 18736 #endif
jpayne@69 18737 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 18738 PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
jpayne@69 18739 int __pyx_lineno = 0;
jpayne@69 18740 const char *__pyx_filename = NULL;
jpayne@69 18741 int __pyx_clineno = 0;
jpayne@69 18742 PyObject *__pyx_r = 0;
jpayne@69 18743 __Pyx_RefNannyDeclarations
jpayne@69 18744 __Pyx_RefNannySetupContext("tabix_index (wrapper)", 0);
jpayne@69 18745 #if !CYTHON_METH_FASTCALL
jpayne@69 18746 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 18747 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 18748 #else
jpayne@69 18749 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 18750 #endif
jpayne@69 18751 #endif
jpayne@69 18752 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 18753 {
jpayne@69 18754 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_force,&__pyx_n_s_seq_col,&__pyx_n_s_start_col,&__pyx_n_s_end_col,&__pyx_n_s_preset,&__pyx_n_s_meta_char,&__pyx_n_s_line_skip,&__pyx_n_s_zerobased,&__pyx_n_s_min_shift,&__pyx_n_s_index,&__pyx_n_s_keep_original,&__pyx_n_s_csi,0};
jpayne@69 18755
jpayne@69 18756 /* "pysam/libctabix.pyx":874
jpayne@69 18757 *
jpayne@69 18758 * def tabix_index(filename,
jpayne@69 18759 * force=False, # <<<<<<<<<<<<<<
jpayne@69 18760 * seq_col=None,
jpayne@69 18761 * start_col=None,
jpayne@69 18762 */
jpayne@69 18763 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
jpayne@69 18764
jpayne@69 18765 /* "pysam/libctabix.pyx":875
jpayne@69 18766 * def tabix_index(filename,
jpayne@69 18767 * force=False,
jpayne@69 18768 * seq_col=None, # <<<<<<<<<<<<<<
jpayne@69 18769 * start_col=None,
jpayne@69 18770 * end_col=None,
jpayne@69 18771 */
jpayne@69 18772 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 18773
jpayne@69 18774 /* "pysam/libctabix.pyx":876
jpayne@69 18775 * force=False,
jpayne@69 18776 * seq_col=None,
jpayne@69 18777 * start_col=None, # <<<<<<<<<<<<<<
jpayne@69 18778 * end_col=None,
jpayne@69 18779 * preset=None,
jpayne@69 18780 */
jpayne@69 18781 values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 18782
jpayne@69 18783 /* "pysam/libctabix.pyx":877
jpayne@69 18784 * seq_col=None,
jpayne@69 18785 * start_col=None,
jpayne@69 18786 * end_col=None, # <<<<<<<<<<<<<<
jpayne@69 18787 * preset=None,
jpayne@69 18788 * meta_char="#",
jpayne@69 18789 */
jpayne@69 18790 values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 18791
jpayne@69 18792 /* "pysam/libctabix.pyx":878
jpayne@69 18793 * start_col=None,
jpayne@69 18794 * end_col=None,
jpayne@69 18795 * preset=None, # <<<<<<<<<<<<<<
jpayne@69 18796 * meta_char="#",
jpayne@69 18797 * int line_skip=0,
jpayne@69 18798 */
jpayne@69 18799 values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 18800 values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_u__39)));
jpayne@69 18801
jpayne@69 18802 /* "pysam/libctabix.pyx":881
jpayne@69 18803 * meta_char="#",
jpayne@69 18804 * int line_skip=0,
jpayne@69 18805 * zerobased=False, # <<<<<<<<<<<<<<
jpayne@69 18806 * int min_shift=-1,
jpayne@69 18807 * index=None,
jpayne@69 18808 */
jpayne@69 18809 values[8] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
jpayne@69 18810
jpayne@69 18811 /* "pysam/libctabix.pyx":883
jpayne@69 18812 * zerobased=False,
jpayne@69 18813 * int min_shift=-1,
jpayne@69 18814 * index=None, # <<<<<<<<<<<<<<
jpayne@69 18815 * keep_original=False,
jpayne@69 18816 * csi=False,
jpayne@69 18817 */
jpayne@69 18818 values[10] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 18819
jpayne@69 18820 /* "pysam/libctabix.pyx":884
jpayne@69 18821 * int min_shift=-1,
jpayne@69 18822 * index=None,
jpayne@69 18823 * keep_original=False, # <<<<<<<<<<<<<<
jpayne@69 18824 * csi=False,
jpayne@69 18825 * ):
jpayne@69 18826 */
jpayne@69 18827 values[11] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
jpayne@69 18828
jpayne@69 18829 /* "pysam/libctabix.pyx":885
jpayne@69 18830 * index=None,
jpayne@69 18831 * keep_original=False,
jpayne@69 18832 * csi=False, # <<<<<<<<<<<<<<
jpayne@69 18833 * ):
jpayne@69 18834 * '''index tab-separated *filename* using tabix.
jpayne@69 18835 */
jpayne@69 18836 values[12] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
jpayne@69 18837 if (__pyx_kwds) {
jpayne@69 18838 Py_ssize_t kw_args;
jpayne@69 18839 switch (__pyx_nargs) {
jpayne@69 18840 case 13: values[12] = __Pyx_Arg_FASTCALL(__pyx_args, 12);
jpayne@69 18841 CYTHON_FALLTHROUGH;
jpayne@69 18842 case 12: values[11] = __Pyx_Arg_FASTCALL(__pyx_args, 11);
jpayne@69 18843 CYTHON_FALLTHROUGH;
jpayne@69 18844 case 11: values[10] = __Pyx_Arg_FASTCALL(__pyx_args, 10);
jpayne@69 18845 CYTHON_FALLTHROUGH;
jpayne@69 18846 case 10: values[9] = __Pyx_Arg_FASTCALL(__pyx_args, 9);
jpayne@69 18847 CYTHON_FALLTHROUGH;
jpayne@69 18848 case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
jpayne@69 18849 CYTHON_FALLTHROUGH;
jpayne@69 18850 case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
jpayne@69 18851 CYTHON_FALLTHROUGH;
jpayne@69 18852 case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
jpayne@69 18853 CYTHON_FALLTHROUGH;
jpayne@69 18854 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
jpayne@69 18855 CYTHON_FALLTHROUGH;
jpayne@69 18856 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
jpayne@69 18857 CYTHON_FALLTHROUGH;
jpayne@69 18858 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@69 18859 CYTHON_FALLTHROUGH;
jpayne@69 18860 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 18861 CYTHON_FALLTHROUGH;
jpayne@69 18862 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 18863 CYTHON_FALLTHROUGH;
jpayne@69 18864 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 18865 CYTHON_FALLTHROUGH;
jpayne@69 18866 case 0: break;
jpayne@69 18867 default: goto __pyx_L5_argtuple_error;
jpayne@69 18868 }
jpayne@69 18869 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 18870 switch (__pyx_nargs) {
jpayne@69 18871 case 0:
jpayne@69 18872 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
jpayne@69 18873 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 18874 kw_args--;
jpayne@69 18875 }
jpayne@69 18876 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18877 else goto __pyx_L5_argtuple_error;
jpayne@69 18878 CYTHON_FALLTHROUGH;
jpayne@69 18879 case 1:
jpayne@69 18880 if (kw_args > 0) {
jpayne@69 18881 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_force);
jpayne@69 18882 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18883 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18884 }
jpayne@69 18885 CYTHON_FALLTHROUGH;
jpayne@69 18886 case 2:
jpayne@69 18887 if (kw_args > 0) {
jpayne@69 18888 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_seq_col);
jpayne@69 18889 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18890 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18891 }
jpayne@69 18892 CYTHON_FALLTHROUGH;
jpayne@69 18893 case 3:
jpayne@69 18894 if (kw_args > 0) {
jpayne@69 18895 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_col);
jpayne@69 18896 if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18897 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18898 }
jpayne@69 18899 CYTHON_FALLTHROUGH;
jpayne@69 18900 case 4:
jpayne@69 18901 if (kw_args > 0) {
jpayne@69 18902 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_col);
jpayne@69 18903 if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18904 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18905 }
jpayne@69 18906 CYTHON_FALLTHROUGH;
jpayne@69 18907 case 5:
jpayne@69 18908 if (kw_args > 0) {
jpayne@69 18909 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_preset);
jpayne@69 18910 if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18911 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18912 }
jpayne@69 18913 CYTHON_FALLTHROUGH;
jpayne@69 18914 case 6:
jpayne@69 18915 if (kw_args > 0) {
jpayne@69 18916 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_meta_char);
jpayne@69 18917 if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18918 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18919 }
jpayne@69 18920 CYTHON_FALLTHROUGH;
jpayne@69 18921 case 7:
jpayne@69 18922 if (kw_args > 0) {
jpayne@69 18923 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line_skip);
jpayne@69 18924 if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18925 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18926 }
jpayne@69 18927 CYTHON_FALLTHROUGH;
jpayne@69 18928 case 8:
jpayne@69 18929 if (kw_args > 0) {
jpayne@69 18930 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_zerobased);
jpayne@69 18931 if (value) { values[8] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18932 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18933 }
jpayne@69 18934 CYTHON_FALLTHROUGH;
jpayne@69 18935 case 9:
jpayne@69 18936 if (kw_args > 0) {
jpayne@69 18937 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min_shift);
jpayne@69 18938 if (value) { values[9] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18939 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18940 }
jpayne@69 18941 CYTHON_FALLTHROUGH;
jpayne@69 18942 case 10:
jpayne@69 18943 if (kw_args > 0) {
jpayne@69 18944 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index);
jpayne@69 18945 if (value) { values[10] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18946 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18947 }
jpayne@69 18948 CYTHON_FALLTHROUGH;
jpayne@69 18949 case 11:
jpayne@69 18950 if (kw_args > 0) {
jpayne@69 18951 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_keep_original);
jpayne@69 18952 if (value) { values[11] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18953 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18954 }
jpayne@69 18955 CYTHON_FALLTHROUGH;
jpayne@69 18956 case 12:
jpayne@69 18957 if (kw_args > 0) {
jpayne@69 18958 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_csi);
jpayne@69 18959 if (value) { values[12] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 18960 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18961 }
jpayne@69 18962 }
jpayne@69 18963 if (unlikely(kw_args > 0)) {
jpayne@69 18964 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 18965 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "tabix_index") < 0)) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 18966 }
jpayne@69 18967 } else {
jpayne@69 18968 switch (__pyx_nargs) {
jpayne@69 18969 case 13: values[12] = __Pyx_Arg_FASTCALL(__pyx_args, 12);
jpayne@69 18970 CYTHON_FALLTHROUGH;
jpayne@69 18971 case 12: values[11] = __Pyx_Arg_FASTCALL(__pyx_args, 11);
jpayne@69 18972 CYTHON_FALLTHROUGH;
jpayne@69 18973 case 11: values[10] = __Pyx_Arg_FASTCALL(__pyx_args, 10);
jpayne@69 18974 CYTHON_FALLTHROUGH;
jpayne@69 18975 case 10: values[9] = __Pyx_Arg_FASTCALL(__pyx_args, 9);
jpayne@69 18976 CYTHON_FALLTHROUGH;
jpayne@69 18977 case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
jpayne@69 18978 CYTHON_FALLTHROUGH;
jpayne@69 18979 case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
jpayne@69 18980 CYTHON_FALLTHROUGH;
jpayne@69 18981 case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
jpayne@69 18982 CYTHON_FALLTHROUGH;
jpayne@69 18983 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
jpayne@69 18984 CYTHON_FALLTHROUGH;
jpayne@69 18985 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
jpayne@69 18986 CYTHON_FALLTHROUGH;
jpayne@69 18987 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@69 18988 CYTHON_FALLTHROUGH;
jpayne@69 18989 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 18990 CYTHON_FALLTHROUGH;
jpayne@69 18991 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 18992 CYTHON_FALLTHROUGH;
jpayne@69 18993 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 18994 break;
jpayne@69 18995 default: goto __pyx_L5_argtuple_error;
jpayne@69 18996 }
jpayne@69 18997 }
jpayne@69 18998 __pyx_v_filename = values[0];
jpayne@69 18999 __pyx_v_force = values[1];
jpayne@69 19000 __pyx_v_seq_col = values[2];
jpayne@69 19001 __pyx_v_start_col = values[3];
jpayne@69 19002 __pyx_v_end_col = values[4];
jpayne@69 19003 __pyx_v_preset = values[5];
jpayne@69 19004 __pyx_v_meta_char = values[6];
jpayne@69 19005 if (values[7]) {
jpayne@69 19006 __pyx_v_line_skip = __Pyx_PyInt_As_int(values[7]); if (unlikely((__pyx_v_line_skip == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L3_error)
jpayne@69 19007 } else {
jpayne@69 19008 __pyx_v_line_skip = ((int)((int)0));
jpayne@69 19009 }
jpayne@69 19010 __pyx_v_zerobased = values[8];
jpayne@69 19011 if (values[9]) {
jpayne@69 19012 __pyx_v_min_shift = __Pyx_PyInt_As_int(values[9]); if (unlikely((__pyx_v_min_shift == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 882, __pyx_L3_error)
jpayne@69 19013 } else {
jpayne@69 19014 __pyx_v_min_shift = ((int)((int)-1));
jpayne@69 19015 }
jpayne@69 19016 __pyx_v_index = values[10];
jpayne@69 19017 __pyx_v_keep_original = values[11];
jpayne@69 19018 __pyx_v_csi = values[12];
jpayne@69 19019 }
jpayne@69 19020 goto __pyx_L6_skip;
jpayne@69 19021 __pyx_L5_argtuple_error:;
jpayne@69 19022 __Pyx_RaiseArgtupleInvalid("tabix_index", 0, 1, 13, __pyx_nargs); __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@69 19023 __pyx_L6_skip:;
jpayne@69 19024 goto __pyx_L4_argument_unpacking_done;
jpayne@69 19025 __pyx_L3_error:;
jpayne@69 19026 {
jpayne@69 19027 Py_ssize_t __pyx_temp;
jpayne@69 19028 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 19029 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 19030 }
jpayne@69 19031 }
jpayne@69 19032 __Pyx_AddTraceback("pysam.libctabix.tabix_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 19033 __Pyx_RefNannyFinishContext();
jpayne@69 19034 return NULL;
jpayne@69 19035 __pyx_L4_argument_unpacking_done:;
jpayne@69 19036 __pyx_r = __pyx_pf_5pysam_9libctabix_2tabix_index(__pyx_self, __pyx_v_filename, __pyx_v_force, __pyx_v_seq_col, __pyx_v_start_col, __pyx_v_end_col, __pyx_v_preset, __pyx_v_meta_char, __pyx_v_line_skip, __pyx_v_zerobased, __pyx_v_min_shift, __pyx_v_index, __pyx_v_keep_original, __pyx_v_csi);
jpayne@69 19037
jpayne@69 19038 /* "pysam/libctabix.pyx":873
jpayne@69 19039 *
jpayne@69 19040 *
jpayne@69 19041 * def tabix_index(filename, # <<<<<<<<<<<<<<
jpayne@69 19042 * force=False,
jpayne@69 19043 * seq_col=None,
jpayne@69 19044 */
jpayne@69 19045
jpayne@69 19046 /* function exit code */
jpayne@69 19047 {
jpayne@69 19048 Py_ssize_t __pyx_temp;
jpayne@69 19049 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 19050 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 19051 }
jpayne@69 19052 }
jpayne@69 19053 __Pyx_RefNannyFinishContext();
jpayne@69 19054 return __pyx_r;
jpayne@69 19055 }
jpayne@69 19056
jpayne@69 19057 static PyObject *__pyx_pf_5pysam_9libctabix_2tabix_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_force, PyObject *__pyx_v_seq_col, PyObject *__pyx_v_start_col, PyObject *__pyx_v_end_col, PyObject *__pyx_v_preset, PyObject *__pyx_v_meta_char, int __pyx_v_line_skip, PyObject *__pyx_v_zerobased, int __pyx_v_min_shift, PyObject *__pyx_v_index, PyObject *__pyx_v_keep_original, PyObject *__pyx_v_csi) {
jpayne@69 19058 PyObject *__pyx_v_fn = NULL;
jpayne@69 19059 char *__pyx_v_cfn;
jpayne@69 19060 htsFile *__pyx_v_fp;
jpayne@69 19061 htsFormat __pyx_v_fmt;
jpayne@69 19062 PyObject *__pyx_v_preset2conf = NULL;
jpayne@69 19063 PyObject *__pyx_v_conf_data = NULL;
jpayne@69 19064 tbx_conf_t __pyx_v_conf;
jpayne@69 19065 PyObject *__pyx_v_suffix = NULL;
jpayne@69 19066 PyObject *__pyx_v_fn_index = NULL;
jpayne@69 19067 char *__pyx_v_fnidx;
jpayne@69 19068 int __pyx_v_retval;
jpayne@69 19069 PyObject *__pyx_r = NULL;
jpayne@69 19070 __Pyx_TraceDeclarations
jpayne@69 19071 __Pyx_RefNannyDeclarations
jpayne@69 19072 int __pyx_t_1;
jpayne@69 19073 int __pyx_t_2;
jpayne@69 19074 PyObject *__pyx_t_3 = NULL;
jpayne@69 19075 char *__pyx_t_4;
jpayne@69 19076 Py_ssize_t __pyx_t_5;
jpayne@69 19077 Py_UCS4 __pyx_t_6;
jpayne@69 19078 PyObject *__pyx_t_7 = NULL;
jpayne@69 19079 PyObject *__pyx_t_8 = NULL;
jpayne@69 19080 PyObject *__pyx_t_9 = NULL;
jpayne@69 19081 unsigned int __pyx_t_10;
jpayne@69 19082 PyObject *__pyx_t_11 = NULL;
jpayne@69 19083 PyObject *__pyx_t_12 = NULL;
jpayne@69 19084 PyObject *__pyx_t_13 = NULL;
jpayne@69 19085 int __pyx_t_14;
jpayne@69 19086 PyObject *__pyx_t_15 = NULL;
jpayne@69 19087 PyObject *__pyx_t_16 = NULL;
jpayne@69 19088 long __pyx_t_17;
jpayne@69 19089 PyObject *__pyx_t_18 = NULL;
jpayne@69 19090 PyObject *(*__pyx_t_19)(PyObject *);
jpayne@69 19091 int32_t __pyx_t_20;
jpayne@69 19092 int32_t __pyx_t_21;
jpayne@69 19093 int32_t __pyx_t_22;
jpayne@69 19094 int32_t __pyx_t_23;
jpayne@69 19095 int32_t __pyx_t_24;
jpayne@69 19096 int32_t __pyx_t_25;
jpayne@69 19097 int __pyx_t_26;
jpayne@69 19098 int __pyx_lineno = 0;
jpayne@69 19099 const char *__pyx_filename = NULL;
jpayne@69 19100 int __pyx_clineno = 0;
jpayne@69 19101 __Pyx_TraceFrameInit(__pyx_codeobj__40)
jpayne@69 19102 __Pyx_RefNannySetupContext("tabix_index", 0);
jpayne@69 19103 __Pyx_TraceCall("tabix_index", __pyx_f[0], 873, 0, __PYX_ERR(0, 873, __pyx_L1_error));
jpayne@69 19104 __Pyx_INCREF(__pyx_v_filename);
jpayne@69 19105 __Pyx_INCREF(__pyx_v_end_col);
jpayne@69 19106 __Pyx_INCREF(__pyx_v_preset);
jpayne@69 19107 __Pyx_INCREF(__pyx_v_index);
jpayne@69 19108 __Pyx_INCREF(__pyx_v_csi);
jpayne@69 19109
jpayne@69 19110 /* "pysam/libctabix.pyx":928
jpayne@69 19111 * '''
jpayne@69 19112 *
jpayne@69 19113 * if preset is None and \ # <<<<<<<<<<<<<<
jpayne@69 19114 * (seq_col is None or start_col is None or end_col is None):
jpayne@69 19115 * raise ValueError(
jpayne@69 19116 */
jpayne@69 19117 __pyx_t_2 = (__pyx_v_preset == Py_None);
jpayne@69 19118 if (__pyx_t_2) {
jpayne@69 19119 } else {
jpayne@69 19120 __pyx_t_1 = __pyx_t_2;
jpayne@69 19121 goto __pyx_L4_bool_binop_done;
jpayne@69 19122 }
jpayne@69 19123
jpayne@69 19124 /* "pysam/libctabix.pyx":929
jpayne@69 19125 *
jpayne@69 19126 * if preset is None and \
jpayne@69 19127 * (seq_col is None or start_col is None or end_col is None): # <<<<<<<<<<<<<<
jpayne@69 19128 * raise ValueError(
jpayne@69 19129 * "neither preset nor seq_col,start_col and end_col given")
jpayne@69 19130 */
jpayne@69 19131 __pyx_t_2 = (__pyx_v_seq_col == Py_None);
jpayne@69 19132 if (!__pyx_t_2) {
jpayne@69 19133 } else {
jpayne@69 19134 __pyx_t_1 = __pyx_t_2;
jpayne@69 19135 goto __pyx_L4_bool_binop_done;
jpayne@69 19136 }
jpayne@69 19137 __pyx_t_2 = (__pyx_v_start_col == Py_None);
jpayne@69 19138 if (!__pyx_t_2) {
jpayne@69 19139 } else {
jpayne@69 19140 __pyx_t_1 = __pyx_t_2;
jpayne@69 19141 goto __pyx_L4_bool_binop_done;
jpayne@69 19142 }
jpayne@69 19143 __pyx_t_2 = (__pyx_v_end_col == Py_None);
jpayne@69 19144 __pyx_t_1 = __pyx_t_2;
jpayne@69 19145 __pyx_L4_bool_binop_done:;
jpayne@69 19146
jpayne@69 19147 /* "pysam/libctabix.pyx":928
jpayne@69 19148 * '''
jpayne@69 19149 *
jpayne@69 19150 * if preset is None and \ # <<<<<<<<<<<<<<
jpayne@69 19151 * (seq_col is None or start_col is None or end_col is None):
jpayne@69 19152 * raise ValueError(
jpayne@69 19153 */
jpayne@69 19154 if (unlikely(__pyx_t_1)) {
jpayne@69 19155
jpayne@69 19156 /* "pysam/libctabix.pyx":930
jpayne@69 19157 * if preset is None and \
jpayne@69 19158 * (seq_col is None or start_col is None or end_col is None):
jpayne@69 19159 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@69 19160 * "neither preset nor seq_col,start_col and end_col given")
jpayne@69 19161 *
jpayne@69 19162 */
jpayne@69 19163 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 930, __pyx_L1_error)
jpayne@69 19164 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 19165 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 19166 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 19167 __PYX_ERR(0, 930, __pyx_L1_error)
jpayne@69 19168
jpayne@69 19169 /* "pysam/libctabix.pyx":928
jpayne@69 19170 * '''
jpayne@69 19171 *
jpayne@69 19172 * if preset is None and \ # <<<<<<<<<<<<<<
jpayne@69 19173 * (seq_col is None or start_col is None or end_col is None):
jpayne@69 19174 * raise ValueError(
jpayne@69 19175 */
jpayne@69 19176 }
jpayne@69 19177
jpayne@69 19178 /* "pysam/libctabix.pyx":933
jpayne@69 19179 * "neither preset nor seq_col,start_col and end_col given")
jpayne@69 19180 *
jpayne@69 19181 * fn = encode_filename(filename) # <<<<<<<<<<<<<<
jpayne@69 19182 * cdef char *cfn = fn
jpayne@69 19183 *
jpayne@69 19184 */
jpayne@69 19185 __pyx_t_3 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 933, __pyx_L1_error)
jpayne@69 19186 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 19187 __pyx_v_fn = ((PyObject*)__pyx_t_3);
jpayne@69 19188 __pyx_t_3 = 0;
jpayne@69 19189
jpayne@69 19190 /* "pysam/libctabix.pyx":934
jpayne@69 19191 *
jpayne@69 19192 * fn = encode_filename(filename)
jpayne@69 19193 * cdef char *cfn = fn # <<<<<<<<<<<<<<
jpayne@69 19194 *
jpayne@69 19195 * cdef htsFile *fp = hts_open(cfn, "r")
jpayne@69 19196 */
jpayne@69 19197 if (unlikely(__pyx_v_fn == Py_None)) {
jpayne@69 19198 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@69 19199 __PYX_ERR(0, 934, __pyx_L1_error)
jpayne@69 19200 }
jpayne@69 19201 __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_fn); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L1_error)
jpayne@69 19202 __pyx_v_cfn = __pyx_t_4;
jpayne@69 19203
jpayne@69 19204 /* "pysam/libctabix.pyx":936
jpayne@69 19205 * cdef char *cfn = fn
jpayne@69 19206 *
jpayne@69 19207 * cdef htsFile *fp = hts_open(cfn, "r") # <<<<<<<<<<<<<<
jpayne@69 19208 * if fp == NULL:
jpayne@69 19209 * raise IOError("Could not open file '%s': %s" % (filename, force_str(strerror(errno))))
jpayne@69 19210 */
jpayne@69 19211 __pyx_v_fp = hts_open(__pyx_v_cfn, ((char const *)"r"));
jpayne@69 19212
jpayne@69 19213 /* "pysam/libctabix.pyx":937
jpayne@69 19214 *
jpayne@69 19215 * cdef htsFile *fp = hts_open(cfn, "r")
jpayne@69 19216 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@69 19217 * raise IOError("Could not open file '%s': %s" % (filename, force_str(strerror(errno))))
jpayne@69 19218 *
jpayne@69 19219 */
jpayne@69 19220 __pyx_t_1 = (__pyx_v_fp == NULL);
jpayne@69 19221 if (unlikely(__pyx_t_1)) {
jpayne@69 19222
jpayne@69 19223 /* "pysam/libctabix.pyx":938
jpayne@69 19224 * cdef htsFile *fp = hts_open(cfn, "r")
jpayne@69 19225 * if fp == NULL:
jpayne@69 19226 * raise IOError("Could not open file '%s': %s" % (filename, force_str(strerror(errno)))) # <<<<<<<<<<<<<<
jpayne@69 19227 *
jpayne@69 19228 * cdef htsFormat fmt = hts_get_format(fp)[0]
jpayne@69 19229 */
jpayne@69 19230 __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L1_error)
jpayne@69 19231 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 19232 __pyx_t_5 = 0;
jpayne@69 19233 __pyx_t_6 = 127;
jpayne@69 19234 __Pyx_INCREF(__pyx_kp_u_Could_not_open_file);
jpayne@69 19235 __pyx_t_5 += 21;
jpayne@69 19236 __Pyx_GIVEREF(__pyx_kp_u_Could_not_open_file);
jpayne@69 19237 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Could_not_open_file);
jpayne@69 19238 __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_filename), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L1_error)
jpayne@69 19239 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19240 __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
jpayne@69 19241 __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
jpayne@69 19242 __Pyx_GIVEREF(__pyx_t_7);
jpayne@69 19243 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
jpayne@69 19244 __pyx_t_7 = 0;
jpayne@69 19245 __Pyx_INCREF(__pyx_kp_u__42);
jpayne@69 19246 __pyx_t_5 += 3;
jpayne@69 19247 __Pyx_GIVEREF(__pyx_kp_u__42);
jpayne@69 19248 PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__42);
jpayne@69 19249 __pyx_t_7 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L1_error)
jpayne@69 19250 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19251 __pyx_t_8 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 938, __pyx_L1_error)
jpayne@69 19252 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 19253 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 19254 __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_8), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L1_error)
jpayne@69 19255 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19256 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 19257 __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
jpayne@69 19258 __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
jpayne@69 19259 __Pyx_GIVEREF(__pyx_t_7);
jpayne@69 19260 PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_7);
jpayne@69 19261 __pyx_t_7 = 0;
jpayne@69 19262 __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L1_error)
jpayne@69 19263 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19264 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 19265 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L1_error)
jpayne@69 19266 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 19267 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 19268 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 19269 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 19270 __PYX_ERR(0, 938, __pyx_L1_error)
jpayne@69 19271
jpayne@69 19272 /* "pysam/libctabix.pyx":937
jpayne@69 19273 *
jpayne@69 19274 * cdef htsFile *fp = hts_open(cfn, "r")
jpayne@69 19275 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@69 19276 * raise IOError("Could not open file '%s': %s" % (filename, force_str(strerror(errno))))
jpayne@69 19277 *
jpayne@69 19278 */
jpayne@69 19279 }
jpayne@69 19280
jpayne@69 19281 /* "pysam/libctabix.pyx":940
jpayne@69 19282 * raise IOError("Could not open file '%s': %s" % (filename, force_str(strerror(errno))))
jpayne@69 19283 *
jpayne@69 19284 * cdef htsFormat fmt = hts_get_format(fp)[0] # <<<<<<<<<<<<<<
jpayne@69 19285 * hts_close(fp)
jpayne@69 19286 *
jpayne@69 19287 */
jpayne@69 19288 __pyx_v_fmt = (hts_get_format(__pyx_v_fp)[0]);
jpayne@69 19289
jpayne@69 19290 /* "pysam/libctabix.pyx":941
jpayne@69 19291 *
jpayne@69 19292 * cdef htsFormat fmt = hts_get_format(fp)[0]
jpayne@69 19293 * hts_close(fp) # <<<<<<<<<<<<<<
jpayne@69 19294 *
jpayne@69 19295 * if fmt.compression == no_compression:
jpayne@69 19296 */
jpayne@69 19297 (void)(hts_close(__pyx_v_fp));
jpayne@69 19298
jpayne@69 19299 /* "pysam/libctabix.pyx":943
jpayne@69 19300 * hts_close(fp)
jpayne@69 19301 *
jpayne@69 19302 * if fmt.compression == no_compression: # <<<<<<<<<<<<<<
jpayne@69 19303 * tabix_compress(filename, filename + ".gz", force=force)
jpayne@69 19304 * if not keep_original:
jpayne@69 19305 */
jpayne@69 19306 __pyx_t_1 = (__pyx_v_fmt.compression == no_compression);
jpayne@69 19307 if (__pyx_t_1) {
jpayne@69 19308
jpayne@69 19309 /* "pysam/libctabix.pyx":944
jpayne@69 19310 *
jpayne@69 19311 * if fmt.compression == no_compression:
jpayne@69 19312 * tabix_compress(filename, filename + ".gz", force=force) # <<<<<<<<<<<<<<
jpayne@69 19313 * if not keep_original:
jpayne@69 19314 * os.unlink(filename)
jpayne@69 19315 */
jpayne@69 19316 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tabix_compress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 944, __pyx_L1_error)
jpayne@69 19317 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 19318 __pyx_t_7 = PyNumber_Add(__pyx_v_filename, __pyx_kp_u_gz); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 944, __pyx_L1_error)
jpayne@69 19319 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19320 __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 944, __pyx_L1_error)
jpayne@69 19321 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 19322 __Pyx_INCREF(__pyx_v_filename);
jpayne@69 19323 __Pyx_GIVEREF(__pyx_v_filename);
jpayne@69 19324 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_filename)) __PYX_ERR(0, 944, __pyx_L1_error);
jpayne@69 19325 __Pyx_GIVEREF(__pyx_t_7);
jpayne@69 19326 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7)) __PYX_ERR(0, 944, __pyx_L1_error);
jpayne@69 19327 __pyx_t_7 = 0;
jpayne@69 19328 __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 944, __pyx_L1_error)
jpayne@69 19329 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19330 if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_force, __pyx_v_force) < 0) __PYX_ERR(0, 944, __pyx_L1_error)
jpayne@69 19331 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 944, __pyx_L1_error)
jpayne@69 19332 __Pyx_GOTREF(__pyx_t_9);
jpayne@69 19333 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 19334 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 19335 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 19336 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@69 19337
jpayne@69 19338 /* "pysam/libctabix.pyx":945
jpayne@69 19339 * if fmt.compression == no_compression:
jpayne@69 19340 * tabix_compress(filename, filename + ".gz", force=force)
jpayne@69 19341 * if not keep_original: # <<<<<<<<<<<<<<
jpayne@69 19342 * os.unlink(filename)
jpayne@69 19343 * filename += ".gz"
jpayne@69 19344 */
jpayne@69 19345 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_keep_original); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 945, __pyx_L1_error)
jpayne@69 19346 __pyx_t_2 = (!__pyx_t_1);
jpayne@69 19347 if (__pyx_t_2) {
jpayne@69 19348
jpayne@69 19349 /* "pysam/libctabix.pyx":946
jpayne@69 19350 * tabix_compress(filename, filename + ".gz", force=force)
jpayne@69 19351 * if not keep_original:
jpayne@69 19352 * os.unlink(filename) # <<<<<<<<<<<<<<
jpayne@69 19353 * filename += ".gz"
jpayne@69 19354 * fn = encode_filename(filename)
jpayne@69 19355 */
jpayne@69 19356 __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_os); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 946, __pyx_L1_error)
jpayne@69 19357 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19358 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_unlink); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 946, __pyx_L1_error)
jpayne@69 19359 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 19360 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 19361 __pyx_t_7 = NULL;
jpayne@69 19362 __pyx_t_10 = 0;
jpayne@69 19363 #if CYTHON_UNPACK_METHODS
jpayne@69 19364 if (unlikely(PyMethod_Check(__pyx_t_8))) {
jpayne@69 19365 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
jpayne@69 19366 if (likely(__pyx_t_7)) {
jpayne@69 19367 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
jpayne@69 19368 __Pyx_INCREF(__pyx_t_7);
jpayne@69 19369 __Pyx_INCREF(function);
jpayne@69 19370 __Pyx_DECREF_SET(__pyx_t_8, function);
jpayne@69 19371 __pyx_t_10 = 1;
jpayne@69 19372 }
jpayne@69 19373 }
jpayne@69 19374 #endif
jpayne@69 19375 {
jpayne@69 19376 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_filename};
jpayne@69 19377 __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
jpayne@69 19378 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 19379 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 946, __pyx_L1_error)
jpayne@69 19380 __Pyx_GOTREF(__pyx_t_9);
jpayne@69 19381 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 19382 }
jpayne@69 19383 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@69 19384
jpayne@69 19385 /* "pysam/libctabix.pyx":945
jpayne@69 19386 * if fmt.compression == no_compression:
jpayne@69 19387 * tabix_compress(filename, filename + ".gz", force=force)
jpayne@69 19388 * if not keep_original: # <<<<<<<<<<<<<<
jpayne@69 19389 * os.unlink(filename)
jpayne@69 19390 * filename += ".gz"
jpayne@69 19391 */
jpayne@69 19392 }
jpayne@69 19393
jpayne@69 19394 /* "pysam/libctabix.pyx":947
jpayne@69 19395 * if not keep_original:
jpayne@69 19396 * os.unlink(filename)
jpayne@69 19397 * filename += ".gz" # <<<<<<<<<<<<<<
jpayne@69 19398 * fn = encode_filename(filename)
jpayne@69 19399 * cfn = fn
jpayne@69 19400 */
jpayne@69 19401 __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_filename, __pyx_kp_u_gz); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 947, __pyx_L1_error)
jpayne@69 19402 __Pyx_GOTREF(__pyx_t_9);
jpayne@69 19403 __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_9);
jpayne@69 19404 __pyx_t_9 = 0;
jpayne@69 19405
jpayne@69 19406 /* "pysam/libctabix.pyx":948
jpayne@69 19407 * os.unlink(filename)
jpayne@69 19408 * filename += ".gz"
jpayne@69 19409 * fn = encode_filename(filename) # <<<<<<<<<<<<<<
jpayne@69 19410 * cfn = fn
jpayne@69 19411 *
jpayne@69 19412 */
jpayne@69 19413 __pyx_t_9 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filename); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 948, __pyx_L1_error)
jpayne@69 19414 __Pyx_GOTREF(__pyx_t_9);
jpayne@69 19415 __Pyx_DECREF_SET(__pyx_v_fn, ((PyObject*)__pyx_t_9));
jpayne@69 19416 __pyx_t_9 = 0;
jpayne@69 19417
jpayne@69 19418 /* "pysam/libctabix.pyx":949
jpayne@69 19419 * filename += ".gz"
jpayne@69 19420 * fn = encode_filename(filename)
jpayne@69 19421 * cfn = fn # <<<<<<<<<<<<<<
jpayne@69 19422 *
jpayne@69 19423 * # columns (1-based):
jpayne@69 19424 */
jpayne@69 19425 if (unlikely(__pyx_v_fn == Py_None)) {
jpayne@69 19426 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@69 19427 __PYX_ERR(0, 949, __pyx_L1_error)
jpayne@69 19428 }
jpayne@69 19429 __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_fn); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L1_error)
jpayne@69 19430 __pyx_v_cfn = __pyx_t_4;
jpayne@69 19431
jpayne@69 19432 /* "pysam/libctabix.pyx":943
jpayne@69 19433 * hts_close(fp)
jpayne@69 19434 *
jpayne@69 19435 * if fmt.compression == no_compression: # <<<<<<<<<<<<<<
jpayne@69 19436 * tabix_compress(filename, filename + ".gz", force=force)
jpayne@69 19437 * if not keep_original:
jpayne@69 19438 */
jpayne@69 19439 }
jpayne@69 19440
jpayne@69 19441 /* "pysam/libctabix.pyx":956
jpayne@69 19442 * # 0 is a missing column
jpayne@69 19443 * preset2conf = {
jpayne@69 19444 * 'gff' : (TBX_GENERIC, 1, 4, 5, ord('#'), 0), # <<<<<<<<<<<<<<
jpayne@69 19445 * 'bed' : (TBX_UCSC, 1, 2, 3, ord('#'), 0),
jpayne@69 19446 * 'psltbl' : (TBX_UCSC, 15, 17, 18, ord('#'), 0),
jpayne@69 19447 */
jpayne@69 19448 __pyx_t_9 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@69 19449 __Pyx_GOTREF(__pyx_t_9);
jpayne@69 19450 __pyx_t_8 = __Pyx_PyInt_From_int32_t(TBX_GENERIC); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@69 19451 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 19452 __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@69 19453 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19454 __Pyx_GIVEREF(__pyx_t_8);
jpayne@69 19455 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@69 19456 __Pyx_INCREF(__pyx_int_1);
jpayne@69 19457 __Pyx_GIVEREF(__pyx_int_1);
jpayne@69 19458 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_1)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@69 19459 __Pyx_INCREF(__pyx_int_4);
jpayne@69 19460 __Pyx_GIVEREF(__pyx_int_4);
jpayne@69 19461 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_4)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@69 19462 __Pyx_INCREF(__pyx_int_5);
jpayne@69 19463 __Pyx_GIVEREF(__pyx_int_5);
jpayne@69 19464 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_5)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@69 19465 __Pyx_INCREF(__pyx_int_35);
jpayne@69 19466 __Pyx_GIVEREF(__pyx_int_35);
jpayne@69 19467 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_int_35)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@69 19468 __Pyx_INCREF(__pyx_int_0);
jpayne@69 19469 __Pyx_GIVEREF(__pyx_int_0);
jpayne@69 19470 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_int_0)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@69 19471 __pyx_t_8 = 0;
jpayne@69 19472 if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_gff, __pyx_t_7) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@69 19473 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 19474
jpayne@69 19475 /* "pysam/libctabix.pyx":957
jpayne@69 19476 * preset2conf = {
jpayne@69 19477 * 'gff' : (TBX_GENERIC, 1, 4, 5, ord('#'), 0),
jpayne@69 19478 * 'bed' : (TBX_UCSC, 1, 2, 3, ord('#'), 0), # <<<<<<<<<<<<<<
jpayne@69 19479 * 'psltbl' : (TBX_UCSC, 15, 17, 18, ord('#'), 0),
jpayne@69 19480 * 'sam' : (TBX_SAM, 3, 4, 0, ord('@'), 0),
jpayne@69 19481 */
jpayne@69 19482 __pyx_t_7 = __Pyx_PyInt_From_int32_t(TBX_UCSC); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 957, __pyx_L1_error)
jpayne@69 19483 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19484 __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 957, __pyx_L1_error)
jpayne@69 19485 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 19486 __Pyx_GIVEREF(__pyx_t_7);
jpayne@69 19487 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@69 19488 __Pyx_INCREF(__pyx_int_1);
jpayne@69 19489 __Pyx_GIVEREF(__pyx_int_1);
jpayne@69 19490 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_1)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@69 19491 __Pyx_INCREF(__pyx_int_2);
jpayne@69 19492 __Pyx_GIVEREF(__pyx_int_2);
jpayne@69 19493 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_int_2)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@69 19494 __Pyx_INCREF(__pyx_int_3);
jpayne@69 19495 __Pyx_GIVEREF(__pyx_int_3);
jpayne@69 19496 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_int_3)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@69 19497 __Pyx_INCREF(__pyx_int_35);
jpayne@69 19498 __Pyx_GIVEREF(__pyx_int_35);
jpayne@69 19499 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_int_35)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@69 19500 __Pyx_INCREF(__pyx_int_0);
jpayne@69 19501 __Pyx_GIVEREF(__pyx_int_0);
jpayne@69 19502 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_int_0)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@69 19503 __pyx_t_7 = 0;
jpayne@69 19504 if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_bed, __pyx_t_8) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@69 19505 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 19506
jpayne@69 19507 /* "pysam/libctabix.pyx":958
jpayne@69 19508 * 'gff' : (TBX_GENERIC, 1, 4, 5, ord('#'), 0),
jpayne@69 19509 * 'bed' : (TBX_UCSC, 1, 2, 3, ord('#'), 0),
jpayne@69 19510 * 'psltbl' : (TBX_UCSC, 15, 17, 18, ord('#'), 0), # <<<<<<<<<<<<<<
jpayne@69 19511 * 'sam' : (TBX_SAM, 3, 4, 0, ord('@'), 0),
jpayne@69 19512 * 'vcf' : (TBX_VCF, 1, 2, 0, ord('#'), 0),
jpayne@69 19513 */
jpayne@69 19514 __pyx_t_8 = __Pyx_PyInt_From_int32_t(TBX_UCSC); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 958, __pyx_L1_error)
jpayne@69 19515 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 19516 __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 958, __pyx_L1_error)
jpayne@69 19517 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19518 __Pyx_GIVEREF(__pyx_t_8);
jpayne@69 19519 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@69 19520 __Pyx_INCREF(__pyx_int_15);
jpayne@69 19521 __Pyx_GIVEREF(__pyx_int_15);
jpayne@69 19522 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_15)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@69 19523 __Pyx_INCREF(__pyx_int_17);
jpayne@69 19524 __Pyx_GIVEREF(__pyx_int_17);
jpayne@69 19525 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_17)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@69 19526 __Pyx_INCREF(__pyx_int_18);
jpayne@69 19527 __Pyx_GIVEREF(__pyx_int_18);
jpayne@69 19528 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_18)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@69 19529 __Pyx_INCREF(__pyx_int_35);
jpayne@69 19530 __Pyx_GIVEREF(__pyx_int_35);
jpayne@69 19531 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_int_35)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@69 19532 __Pyx_INCREF(__pyx_int_0);
jpayne@69 19533 __Pyx_GIVEREF(__pyx_int_0);
jpayne@69 19534 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_int_0)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@69 19535 __pyx_t_8 = 0;
jpayne@69 19536 if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_psltbl, __pyx_t_7) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@69 19537 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 19538
jpayne@69 19539 /* "pysam/libctabix.pyx":959
jpayne@69 19540 * 'bed' : (TBX_UCSC, 1, 2, 3, ord('#'), 0),
jpayne@69 19541 * 'psltbl' : (TBX_UCSC, 15, 17, 18, ord('#'), 0),
jpayne@69 19542 * 'sam' : (TBX_SAM, 3, 4, 0, ord('@'), 0), # <<<<<<<<<<<<<<
jpayne@69 19543 * 'vcf' : (TBX_VCF, 1, 2, 0, ord('#'), 0),
jpayne@69 19544 * }
jpayne@69 19545 */
jpayne@69 19546 __pyx_t_7 = __Pyx_PyInt_From_int32_t(TBX_SAM); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 959, __pyx_L1_error)
jpayne@69 19547 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19548 __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 959, __pyx_L1_error)
jpayne@69 19549 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 19550 __Pyx_GIVEREF(__pyx_t_7);
jpayne@69 19551 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@69 19552 __Pyx_INCREF(__pyx_int_3);
jpayne@69 19553 __Pyx_GIVEREF(__pyx_int_3);
jpayne@69 19554 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_3)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@69 19555 __Pyx_INCREF(__pyx_int_4);
jpayne@69 19556 __Pyx_GIVEREF(__pyx_int_4);
jpayne@69 19557 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_int_4)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@69 19558 __Pyx_INCREF(__pyx_int_0);
jpayne@69 19559 __Pyx_GIVEREF(__pyx_int_0);
jpayne@69 19560 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_int_0)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@69 19561 __Pyx_INCREF(__pyx_int_64);
jpayne@69 19562 __Pyx_GIVEREF(__pyx_int_64);
jpayne@69 19563 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_int_64)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@69 19564 __Pyx_INCREF(__pyx_int_0);
jpayne@69 19565 __Pyx_GIVEREF(__pyx_int_0);
jpayne@69 19566 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_int_0)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@69 19567 __pyx_t_7 = 0;
jpayne@69 19568 if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_sam, __pyx_t_8) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@69 19569 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 19570
jpayne@69 19571 /* "pysam/libctabix.pyx":960
jpayne@69 19572 * 'psltbl' : (TBX_UCSC, 15, 17, 18, ord('#'), 0),
jpayne@69 19573 * 'sam' : (TBX_SAM, 3, 4, 0, ord('@'), 0),
jpayne@69 19574 * 'vcf' : (TBX_VCF, 1, 2, 0, ord('#'), 0), # <<<<<<<<<<<<<<
jpayne@69 19575 * }
jpayne@69 19576 *
jpayne@69 19577 */
jpayne@69 19578 __pyx_t_8 = __Pyx_PyInt_From_int32_t(TBX_VCF); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 960, __pyx_L1_error)
jpayne@69 19579 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 19580 __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 960, __pyx_L1_error)
jpayne@69 19581 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19582 __Pyx_GIVEREF(__pyx_t_8);
jpayne@69 19583 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@69 19584 __Pyx_INCREF(__pyx_int_1);
jpayne@69 19585 __Pyx_GIVEREF(__pyx_int_1);
jpayne@69 19586 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_1)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@69 19587 __Pyx_INCREF(__pyx_int_2);
jpayne@69 19588 __Pyx_GIVEREF(__pyx_int_2);
jpayne@69 19589 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_2)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@69 19590 __Pyx_INCREF(__pyx_int_0);
jpayne@69 19591 __Pyx_GIVEREF(__pyx_int_0);
jpayne@69 19592 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_0)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@69 19593 __Pyx_INCREF(__pyx_int_35);
jpayne@69 19594 __Pyx_GIVEREF(__pyx_int_35);
jpayne@69 19595 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_int_35)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@69 19596 __Pyx_INCREF(__pyx_int_0);
jpayne@69 19597 __Pyx_GIVEREF(__pyx_int_0);
jpayne@69 19598 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_int_0)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@69 19599 __pyx_t_8 = 0;
jpayne@69 19600 if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_vcf, __pyx_t_7) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@69 19601 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 19602 __pyx_v_preset2conf = ((PyObject*)__pyx_t_9);
jpayne@69 19603 __pyx_t_9 = 0;
jpayne@69 19604
jpayne@69 19605 /* "pysam/libctabix.pyx":963
jpayne@69 19606 * }
jpayne@69 19607 *
jpayne@69 19608 * conf_data = None # <<<<<<<<<<<<<<
jpayne@69 19609 * if preset == "bcf" or fmt.format == bcf:
jpayne@69 19610 * csi = True
jpayne@69 19611 */
jpayne@69 19612 __Pyx_INCREF(Py_None);
jpayne@69 19613 __pyx_v_conf_data = Py_None;
jpayne@69 19614
jpayne@69 19615 /* "pysam/libctabix.pyx":964
jpayne@69 19616 *
jpayne@69 19617 * conf_data = None
jpayne@69 19618 * if preset == "bcf" or fmt.format == bcf: # <<<<<<<<<<<<<<
jpayne@69 19619 * csi = True
jpayne@69 19620 * elif preset:
jpayne@69 19621 */
jpayne@69 19622 __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_preset, __pyx_n_u_bcf, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 964, __pyx_L1_error)
jpayne@69 19623 if (!__pyx_t_1) {
jpayne@69 19624 } else {
jpayne@69 19625 __pyx_t_2 = __pyx_t_1;
jpayne@69 19626 goto __pyx_L12_bool_binop_done;
jpayne@69 19627 }
jpayne@69 19628 __pyx_t_1 = (__pyx_v_fmt.format == bcf);
jpayne@69 19629 __pyx_t_2 = __pyx_t_1;
jpayne@69 19630 __pyx_L12_bool_binop_done:;
jpayne@69 19631 if (__pyx_t_2) {
jpayne@69 19632
jpayne@69 19633 /* "pysam/libctabix.pyx":965
jpayne@69 19634 * conf_data = None
jpayne@69 19635 * if preset == "bcf" or fmt.format == bcf:
jpayne@69 19636 * csi = True # <<<<<<<<<<<<<<
jpayne@69 19637 * elif preset:
jpayne@69 19638 * try:
jpayne@69 19639 */
jpayne@69 19640 __Pyx_INCREF(Py_True);
jpayne@69 19641 __Pyx_DECREF_SET(__pyx_v_csi, Py_True);
jpayne@69 19642
jpayne@69 19643 /* "pysam/libctabix.pyx":964
jpayne@69 19644 *
jpayne@69 19645 * conf_data = None
jpayne@69 19646 * if preset == "bcf" or fmt.format == bcf: # <<<<<<<<<<<<<<
jpayne@69 19647 * csi = True
jpayne@69 19648 * elif preset:
jpayne@69 19649 */
jpayne@69 19650 goto __pyx_L11;
jpayne@69 19651 }
jpayne@69 19652
jpayne@69 19653 /* "pysam/libctabix.pyx":966
jpayne@69 19654 * if preset == "bcf" or fmt.format == bcf:
jpayne@69 19655 * csi = True
jpayne@69 19656 * elif preset: # <<<<<<<<<<<<<<
jpayne@69 19657 * try:
jpayne@69 19658 * conf_data = preset2conf[preset]
jpayne@69 19659 */
jpayne@69 19660 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_preset); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 966, __pyx_L1_error)
jpayne@69 19661 if (__pyx_t_2) {
jpayne@69 19662
jpayne@69 19663 /* "pysam/libctabix.pyx":967
jpayne@69 19664 * csi = True
jpayne@69 19665 * elif preset:
jpayne@69 19666 * try: # <<<<<<<<<<<<<<
jpayne@69 19667 * conf_data = preset2conf[preset]
jpayne@69 19668 * except KeyError:
jpayne@69 19669 */
jpayne@69 19670 {
jpayne@69 19671 __Pyx_PyThreadState_declare
jpayne@69 19672 __Pyx_PyThreadState_assign
jpayne@69 19673 __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
jpayne@69 19674 __Pyx_XGOTREF(__pyx_t_11);
jpayne@69 19675 __Pyx_XGOTREF(__pyx_t_12);
jpayne@69 19676 __Pyx_XGOTREF(__pyx_t_13);
jpayne@69 19677 /*try:*/ {
jpayne@69 19678
jpayne@69 19679 /* "pysam/libctabix.pyx":968
jpayne@69 19680 * elif preset:
jpayne@69 19681 * try:
jpayne@69 19682 * conf_data = preset2conf[preset] # <<<<<<<<<<<<<<
jpayne@69 19683 * except KeyError:
jpayne@69 19684 * raise KeyError(
jpayne@69 19685 */
jpayne@69 19686 __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_preset2conf, __pyx_v_preset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 968, __pyx_L14_error)
jpayne@69 19687 __Pyx_GOTREF(__pyx_t_9);
jpayne@69 19688 __Pyx_DECREF_SET(__pyx_v_conf_data, __pyx_t_9);
jpayne@69 19689 __pyx_t_9 = 0;
jpayne@69 19690
jpayne@69 19691 /* "pysam/libctabix.pyx":967
jpayne@69 19692 * csi = True
jpayne@69 19693 * elif preset:
jpayne@69 19694 * try: # <<<<<<<<<<<<<<
jpayne@69 19695 * conf_data = preset2conf[preset]
jpayne@69 19696 * except KeyError:
jpayne@69 19697 */
jpayne@69 19698 }
jpayne@69 19699 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
jpayne@69 19700 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
jpayne@69 19701 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
jpayne@69 19702 goto __pyx_L19_try_end;
jpayne@69 19703 __pyx_L14_error:;
jpayne@69 19704 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 19705 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 19706 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 19707 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@69 19708
jpayne@69 19709 /* "pysam/libctabix.pyx":969
jpayne@69 19710 * try:
jpayne@69 19711 * conf_data = preset2conf[preset]
jpayne@69 19712 * except KeyError: # <<<<<<<<<<<<<<
jpayne@69 19713 * raise KeyError(
jpayne@69 19714 * "unknown preset '%s', valid presets are '%s'" %
jpayne@69 19715 */
jpayne@69 19716 __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
jpayne@69 19717 if (__pyx_t_14) {
jpayne@69 19718 __Pyx_AddTraceback("pysam.libctabix.tabix_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 19719 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 969, __pyx_L16_except_error)
jpayne@69 19720 __Pyx_XGOTREF(__pyx_t_9);
jpayne@69 19721 __Pyx_XGOTREF(__pyx_t_7);
jpayne@69 19722 __Pyx_XGOTREF(__pyx_t_8);
jpayne@69 19723
jpayne@69 19724 /* "pysam/libctabix.pyx":971
jpayne@69 19725 * except KeyError:
jpayne@69 19726 * raise KeyError(
jpayne@69 19727 * "unknown preset '%s', valid presets are '%s'" % # <<<<<<<<<<<<<<
jpayne@69 19728 * (preset, ",".join(preset2conf.keys())))
jpayne@69 19729 * else:
jpayne@69 19730 */
jpayne@69 19731 __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 971, __pyx_L16_except_error)
jpayne@69 19732 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 19733 __pyx_t_5 = 0;
jpayne@69 19734 __pyx_t_6 = 127;
jpayne@69 19735 __Pyx_INCREF(__pyx_kp_u_unknown_preset);
jpayne@69 19736 __pyx_t_5 += 16;
jpayne@69 19737 __Pyx_GIVEREF(__pyx_kp_u_unknown_preset);
jpayne@69 19738 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_unknown_preset);
jpayne@69 19739
jpayne@69 19740 /* "pysam/libctabix.pyx":972
jpayne@69 19741 * raise KeyError(
jpayne@69 19742 * "unknown preset '%s', valid presets are '%s'" %
jpayne@69 19743 * (preset, ",".join(preset2conf.keys()))) # <<<<<<<<<<<<<<
jpayne@69 19744 * else:
jpayne@69 19745 * if end_col is None:
jpayne@69 19746 */
jpayne@69 19747 __pyx_t_15 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_preset), __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 972, __pyx_L16_except_error)
jpayne@69 19748 __Pyx_GOTREF(__pyx_t_15);
jpayne@69 19749 __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_6;
jpayne@69 19750 __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
jpayne@69 19751 __Pyx_GIVEREF(__pyx_t_15);
jpayne@69 19752 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_15);
jpayne@69 19753 __pyx_t_15 = 0;
jpayne@69 19754 __Pyx_INCREF(__pyx_kp_u_valid_presets_are);
jpayne@69 19755 __pyx_t_5 += 22;
jpayne@69 19756 __Pyx_GIVEREF(__pyx_kp_u_valid_presets_are);
jpayne@69 19757 PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_valid_presets_are);
jpayne@69 19758 __pyx_t_15 = __Pyx_PyDict_Keys(__pyx_v_preset2conf); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 972, __pyx_L16_except_error)
jpayne@69 19759 __Pyx_GOTREF(__pyx_t_15);
jpayne@69 19760 __pyx_t_16 = PyUnicode_Join(__pyx_kp_u__43, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 972, __pyx_L16_except_error)
jpayne@69 19761 __Pyx_GOTREF(__pyx_t_16);
jpayne@69 19762 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
jpayne@69 19763 __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_6;
jpayne@69 19764 __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
jpayne@69 19765 __Pyx_GIVEREF(__pyx_t_16);
jpayne@69 19766 PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_16);
jpayne@69 19767 __pyx_t_16 = 0;
jpayne@69 19768 __Pyx_INCREF(__pyx_kp_u__44);
jpayne@69 19769 __pyx_t_5 += 1;
jpayne@69 19770 __Pyx_GIVEREF(__pyx_kp_u__44);
jpayne@69 19771 PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__44);
jpayne@69 19772
jpayne@69 19773 /* "pysam/libctabix.pyx":971
jpayne@69 19774 * except KeyError:
jpayne@69 19775 * raise KeyError(
jpayne@69 19776 * "unknown preset '%s', valid presets are '%s'" % # <<<<<<<<<<<<<<
jpayne@69 19777 * (preset, ",".join(preset2conf.keys())))
jpayne@69 19778 * else:
jpayne@69 19779 */
jpayne@69 19780 __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 971, __pyx_L16_except_error)
jpayne@69 19781 __Pyx_GOTREF(__pyx_t_16);
jpayne@69 19782 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 19783
jpayne@69 19784 /* "pysam/libctabix.pyx":970
jpayne@69 19785 * conf_data = preset2conf[preset]
jpayne@69 19786 * except KeyError:
jpayne@69 19787 * raise KeyError( # <<<<<<<<<<<<<<
jpayne@69 19788 * "unknown preset '%s', valid presets are '%s'" %
jpayne@69 19789 * (preset, ",".join(preset2conf.keys())))
jpayne@69 19790 */
jpayne@69 19791 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 970, __pyx_L16_except_error)
jpayne@69 19792 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 19793 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
jpayne@69 19794 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 19795 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 19796 __PYX_ERR(0, 970, __pyx_L16_except_error)
jpayne@69 19797 }
jpayne@69 19798 goto __pyx_L16_except_error;
jpayne@69 19799
jpayne@69 19800 /* "pysam/libctabix.pyx":967
jpayne@69 19801 * csi = True
jpayne@69 19802 * elif preset:
jpayne@69 19803 * try: # <<<<<<<<<<<<<<
jpayne@69 19804 * conf_data = preset2conf[preset]
jpayne@69 19805 * except KeyError:
jpayne@69 19806 */
jpayne@69 19807 __pyx_L16_except_error:;
jpayne@69 19808 __Pyx_XGIVEREF(__pyx_t_11);
jpayne@69 19809 __Pyx_XGIVEREF(__pyx_t_12);
jpayne@69 19810 __Pyx_XGIVEREF(__pyx_t_13);
jpayne@69 19811 __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
jpayne@69 19812 goto __pyx_L1_error;
jpayne@69 19813 __pyx_L19_try_end:;
jpayne@69 19814 }
jpayne@69 19815
jpayne@69 19816 /* "pysam/libctabix.pyx":966
jpayne@69 19817 * if preset == "bcf" or fmt.format == bcf:
jpayne@69 19818 * csi = True
jpayne@69 19819 * elif preset: # <<<<<<<<<<<<<<
jpayne@69 19820 * try:
jpayne@69 19821 * conf_data = preset2conf[preset]
jpayne@69 19822 */
jpayne@69 19823 goto __pyx_L11;
jpayne@69 19824 }
jpayne@69 19825
jpayne@69 19826 /* "pysam/libctabix.pyx":974
jpayne@69 19827 * (preset, ",".join(preset2conf.keys())))
jpayne@69 19828 * else:
jpayne@69 19829 * if end_col is None: # <<<<<<<<<<<<<<
jpayne@69 19830 * end_col = -1
jpayne@69 19831 *
jpayne@69 19832 */
jpayne@69 19833 /*else*/ {
jpayne@69 19834 __pyx_t_2 = (__pyx_v_end_col == Py_None);
jpayne@69 19835 if (__pyx_t_2) {
jpayne@69 19836
jpayne@69 19837 /* "pysam/libctabix.pyx":975
jpayne@69 19838 * else:
jpayne@69 19839 * if end_col is None:
jpayne@69 19840 * end_col = -1 # <<<<<<<<<<<<<<
jpayne@69 19841 *
jpayne@69 19842 * preset = 0
jpayne@69 19843 */
jpayne@69 19844 __Pyx_INCREF(__pyx_int_neg_1);
jpayne@69 19845 __Pyx_DECREF_SET(__pyx_v_end_col, __pyx_int_neg_1);
jpayne@69 19846
jpayne@69 19847 /* "pysam/libctabix.pyx":974
jpayne@69 19848 * (preset, ",".join(preset2conf.keys())))
jpayne@69 19849 * else:
jpayne@69 19850 * if end_col is None: # <<<<<<<<<<<<<<
jpayne@69 19851 * end_col = -1
jpayne@69 19852 *
jpayne@69 19853 */
jpayne@69 19854 }
jpayne@69 19855
jpayne@69 19856 /* "pysam/libctabix.pyx":977
jpayne@69 19857 * end_col = -1
jpayne@69 19858 *
jpayne@69 19859 * preset = 0 # <<<<<<<<<<<<<<
jpayne@69 19860 * # tabix internally works with 0-based coordinates and
jpayne@69 19861 * # open/closed intervals. When using a preset, conversion is
jpayne@69 19862 */
jpayne@69 19863 __Pyx_INCREF(__pyx_int_0);
jpayne@69 19864 __Pyx_DECREF_SET(__pyx_v_preset, __pyx_int_0);
jpayne@69 19865
jpayne@69 19866 /* "pysam/libctabix.pyx":984
jpayne@69 19867 * # from the start coordinate. To avoid doing this, set the
jpayne@69 19868 * # TI_FLAG_UCSC=0x10000 flag:
jpayne@69 19869 * if zerobased: # <<<<<<<<<<<<<<
jpayne@69 19870 * preset = preset | TBX_UCSC
jpayne@69 19871 *
jpayne@69 19872 */
jpayne@69 19873 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_zerobased); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 984, __pyx_L1_error)
jpayne@69 19874 if (__pyx_t_2) {
jpayne@69 19875
jpayne@69 19876 /* "pysam/libctabix.pyx":985
jpayne@69 19877 * # TI_FLAG_UCSC=0x10000 flag:
jpayne@69 19878 * if zerobased:
jpayne@69 19879 * preset = preset | TBX_UCSC # <<<<<<<<<<<<<<
jpayne@69 19880 *
jpayne@69 19881 * conf_data = (preset, seq_col + 1, start_col + 1, end_col + 1, ord(meta_char), line_skip)
jpayne@69 19882 */
jpayne@69 19883 __pyx_t_8 = __Pyx_PyInt_From_int32_t(TBX_UCSC); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 985, __pyx_L1_error)
jpayne@69 19884 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 19885 __pyx_t_7 = PyNumber_Or(__pyx_v_preset, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L1_error)
jpayne@69 19886 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19887 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 19888 __Pyx_DECREF_SET(__pyx_v_preset, __pyx_t_7);
jpayne@69 19889 __pyx_t_7 = 0;
jpayne@69 19890
jpayne@69 19891 /* "pysam/libctabix.pyx":984
jpayne@69 19892 * # from the start coordinate. To avoid doing this, set the
jpayne@69 19893 * # TI_FLAG_UCSC=0x10000 flag:
jpayne@69 19894 * if zerobased: # <<<<<<<<<<<<<<
jpayne@69 19895 * preset = preset | TBX_UCSC
jpayne@69 19896 *
jpayne@69 19897 */
jpayne@69 19898 }
jpayne@69 19899
jpayne@69 19900 /* "pysam/libctabix.pyx":987
jpayne@69 19901 * preset = preset | TBX_UCSC
jpayne@69 19902 *
jpayne@69 19903 * conf_data = (preset, seq_col + 1, start_col + 1, end_col + 1, ord(meta_char), line_skip) # <<<<<<<<<<<<<<
jpayne@69 19904 *
jpayne@69 19905 * cdef tbx_conf_t conf
jpayne@69 19906 */
jpayne@69 19907 __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_seq_col, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 987, __pyx_L1_error)
jpayne@69 19908 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 19909 __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_start_col, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 987, __pyx_L1_error)
jpayne@69 19910 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 19911 __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_end_col, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 987, __pyx_L1_error)
jpayne@69 19912 __Pyx_GOTREF(__pyx_t_9);
jpayne@69 19913 __pyx_t_17 = __Pyx_PyObject_Ord(__pyx_v_meta_char); if (unlikely(__pyx_t_17 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 987, __pyx_L1_error)
jpayne@69 19914 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error)
jpayne@69 19915 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 19916 __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_line_skip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 987, __pyx_L1_error)
jpayne@69 19917 __Pyx_GOTREF(__pyx_t_16);
jpayne@69 19918 __pyx_t_15 = PyTuple_New(6); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 987, __pyx_L1_error)
jpayne@69 19919 __Pyx_GOTREF(__pyx_t_15);
jpayne@69 19920 __Pyx_INCREF(__pyx_v_preset);
jpayne@69 19921 __Pyx_GIVEREF(__pyx_v_preset);
jpayne@69 19922 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_preset)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@69 19923 __Pyx_GIVEREF(__pyx_t_7);
jpayne@69 19924 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_7)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@69 19925 __Pyx_GIVEREF(__pyx_t_8);
jpayne@69 19926 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_8)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@69 19927 __Pyx_GIVEREF(__pyx_t_9);
jpayne@69 19928 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_t_9)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@69 19929 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 19930 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 4, __pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@69 19931 __Pyx_GIVEREF(__pyx_t_16);
jpayne@69 19932 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 5, __pyx_t_16)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@69 19933 __pyx_t_7 = 0;
jpayne@69 19934 __pyx_t_8 = 0;
jpayne@69 19935 __pyx_t_9 = 0;
jpayne@69 19936 __pyx_t_3 = 0;
jpayne@69 19937 __pyx_t_16 = 0;
jpayne@69 19938 __Pyx_DECREF_SET(__pyx_v_conf_data, __pyx_t_15);
jpayne@69 19939 __pyx_t_15 = 0;
jpayne@69 19940 }
jpayne@69 19941 __pyx_L11:;
jpayne@69 19942
jpayne@69 19943 /* "pysam/libctabix.pyx":990
jpayne@69 19944 *
jpayne@69 19945 * cdef tbx_conf_t conf
jpayne@69 19946 * if conf_data: # <<<<<<<<<<<<<<
jpayne@69 19947 * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data
jpayne@69 19948 *
jpayne@69 19949 */
jpayne@69 19950 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_conf_data); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 990, __pyx_L1_error)
jpayne@69 19951 if (__pyx_t_2) {
jpayne@69 19952
jpayne@69 19953 /* "pysam/libctabix.pyx":991
jpayne@69 19954 * cdef tbx_conf_t conf
jpayne@69 19955 * if conf_data:
jpayne@69 19956 * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data # <<<<<<<<<<<<<<
jpayne@69 19957 *
jpayne@69 19958 * if csi or min_shift > 0:
jpayne@69 19959 */
jpayne@69 19960 if ((likely(PyTuple_CheckExact(__pyx_v_conf_data))) || (PyList_CheckExact(__pyx_v_conf_data))) {
jpayne@69 19961 PyObject* sequence = __pyx_v_conf_data;
jpayne@69 19962 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
jpayne@69 19963 if (unlikely(size != 6)) {
jpayne@69 19964 if (size > 6) __Pyx_RaiseTooManyValuesError(6);
jpayne@69 19965 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
jpayne@69 19966 __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@69 19967 }
jpayne@69 19968 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 19969 if (likely(PyTuple_CheckExact(sequence))) {
jpayne@69 19970 __pyx_t_15 = PyTuple_GET_ITEM(sequence, 0);
jpayne@69 19971 __pyx_t_16 = PyTuple_GET_ITEM(sequence, 1);
jpayne@69 19972 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2);
jpayne@69 19973 __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3);
jpayne@69 19974 __pyx_t_8 = PyTuple_GET_ITEM(sequence, 4);
jpayne@69 19975 __pyx_t_7 = PyTuple_GET_ITEM(sequence, 5);
jpayne@69 19976 } else {
jpayne@69 19977 __pyx_t_15 = PyList_GET_ITEM(sequence, 0);
jpayne@69 19978 __pyx_t_16 = PyList_GET_ITEM(sequence, 1);
jpayne@69 19979 __pyx_t_3 = PyList_GET_ITEM(sequence, 2);
jpayne@69 19980 __pyx_t_9 = PyList_GET_ITEM(sequence, 3);
jpayne@69 19981 __pyx_t_8 = PyList_GET_ITEM(sequence, 4);
jpayne@69 19982 __pyx_t_7 = PyList_GET_ITEM(sequence, 5);
jpayne@69 19983 }
jpayne@69 19984 __Pyx_INCREF(__pyx_t_15);
jpayne@69 19985 __Pyx_INCREF(__pyx_t_16);
jpayne@69 19986 __Pyx_INCREF(__pyx_t_3);
jpayne@69 19987 __Pyx_INCREF(__pyx_t_9);
jpayne@69 19988 __Pyx_INCREF(__pyx_t_8);
jpayne@69 19989 __Pyx_INCREF(__pyx_t_7);
jpayne@69 19990 #else
jpayne@69 19991 {
jpayne@69 19992 Py_ssize_t i;
jpayne@69 19993 PyObject** temps[6] = {&__pyx_t_15,&__pyx_t_16,&__pyx_t_3,&__pyx_t_9,&__pyx_t_8,&__pyx_t_7};
jpayne@69 19994 for (i=0; i < 6; i++) {
jpayne@69 19995 PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@69 19996 __Pyx_GOTREF(item);
jpayne@69 19997 *(temps[i]) = item;
jpayne@69 19998 }
jpayne@69 19999 }
jpayne@69 20000 #endif
jpayne@69 20001 } else {
jpayne@69 20002 Py_ssize_t index = -1;
jpayne@69 20003 PyObject** temps[6] = {&__pyx_t_15,&__pyx_t_16,&__pyx_t_3,&__pyx_t_9,&__pyx_t_8,&__pyx_t_7};
jpayne@69 20004 __pyx_t_18 = PyObject_GetIter(__pyx_v_conf_data); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@69 20005 __Pyx_GOTREF(__pyx_t_18);
jpayne@69 20006 __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_18);
jpayne@69 20007 for (index=0; index < 6; index++) {
jpayne@69 20008 PyObject* item = __pyx_t_19(__pyx_t_18); if (unlikely(!item)) goto __pyx_L25_unpacking_failed;
jpayne@69 20009 __Pyx_GOTREF(item);
jpayne@69 20010 *(temps[index]) = item;
jpayne@69 20011 }
jpayne@69 20012 if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_18), 6) < 0) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@69 20013 __pyx_t_19 = NULL;
jpayne@69 20014 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
jpayne@69 20015 goto __pyx_L26_unpacking_done;
jpayne@69 20016 __pyx_L25_unpacking_failed:;
jpayne@69 20017 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
jpayne@69 20018 __pyx_t_19 = NULL;
jpayne@69 20019 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
jpayne@69 20020 __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@69 20021 __pyx_L26_unpacking_done:;
jpayne@69 20022 }
jpayne@69 20023 __pyx_t_20 = __Pyx_PyInt_As_int32_t(__pyx_t_15); if (unlikely((__pyx_t_20 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@69 20024 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
jpayne@69 20025 __pyx_t_21 = __Pyx_PyInt_As_int32_t(__pyx_t_16); if (unlikely((__pyx_t_21 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@69 20026 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
jpayne@69 20027 __pyx_t_22 = __Pyx_PyInt_As_int32_t(__pyx_t_3); if (unlikely((__pyx_t_22 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@69 20028 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 20029 __pyx_t_23 = __Pyx_PyInt_As_int32_t(__pyx_t_9); if (unlikely((__pyx_t_23 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@69 20030 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@69 20031 __pyx_t_24 = __Pyx_PyInt_As_int32_t(__pyx_t_8); if (unlikely((__pyx_t_24 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@69 20032 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 20033 __pyx_t_25 = __Pyx_PyInt_As_int32_t(__pyx_t_7); if (unlikely((__pyx_t_25 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@69 20034 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 20035 __pyx_v_conf.preset = __pyx_t_20;
jpayne@69 20036 __pyx_v_conf.sc = __pyx_t_21;
jpayne@69 20037 __pyx_v_conf.bc = __pyx_t_22;
jpayne@69 20038 __pyx_v_conf.ec = __pyx_t_23;
jpayne@69 20039 __pyx_v_conf.meta_char = __pyx_t_24;
jpayne@69 20040 __pyx_v_conf.line_skip = __pyx_t_25;
jpayne@69 20041
jpayne@69 20042 /* "pysam/libctabix.pyx":990
jpayne@69 20043 *
jpayne@69 20044 * cdef tbx_conf_t conf
jpayne@69 20045 * if conf_data: # <<<<<<<<<<<<<<
jpayne@69 20046 * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data
jpayne@69 20047 *
jpayne@69 20048 */
jpayne@69 20049 }
jpayne@69 20050
jpayne@69 20051 /* "pysam/libctabix.pyx":993
jpayne@69 20052 * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data
jpayne@69 20053 *
jpayne@69 20054 * if csi or min_shift > 0: # <<<<<<<<<<<<<<
jpayne@69 20055 * suffix = ".csi"
jpayne@69 20056 * if min_shift <= 0: min_shift = 14
jpayne@69 20057 */
jpayne@69 20058 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_csi); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 993, __pyx_L1_error)
jpayne@69 20059 if (!__pyx_t_1) {
jpayne@69 20060 } else {
jpayne@69 20061 __pyx_t_2 = __pyx_t_1;
jpayne@69 20062 goto __pyx_L28_bool_binop_done;
jpayne@69 20063 }
jpayne@69 20064 __pyx_t_1 = (__pyx_v_min_shift > 0);
jpayne@69 20065 __pyx_t_2 = __pyx_t_1;
jpayne@69 20066 __pyx_L28_bool_binop_done:;
jpayne@69 20067 if (__pyx_t_2) {
jpayne@69 20068
jpayne@69 20069 /* "pysam/libctabix.pyx":994
jpayne@69 20070 *
jpayne@69 20071 * if csi or min_shift > 0:
jpayne@69 20072 * suffix = ".csi" # <<<<<<<<<<<<<<
jpayne@69 20073 * if min_shift <= 0: min_shift = 14
jpayne@69 20074 * else:
jpayne@69 20075 */
jpayne@69 20076 __Pyx_INCREF(__pyx_kp_u_csi_2);
jpayne@69 20077 __pyx_v_suffix = __pyx_kp_u_csi_2;
jpayne@69 20078
jpayne@69 20079 /* "pysam/libctabix.pyx":995
jpayne@69 20080 * if csi or min_shift > 0:
jpayne@69 20081 * suffix = ".csi"
jpayne@69 20082 * if min_shift <= 0: min_shift = 14 # <<<<<<<<<<<<<<
jpayne@69 20083 * else:
jpayne@69 20084 * suffix = ".tbi"
jpayne@69 20085 */
jpayne@69 20086 __pyx_t_2 = (__pyx_v_min_shift <= 0);
jpayne@69 20087 if (__pyx_t_2) {
jpayne@69 20088 __pyx_v_min_shift = 14;
jpayne@69 20089 }
jpayne@69 20090
jpayne@69 20091 /* "pysam/libctabix.pyx":993
jpayne@69 20092 * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data
jpayne@69 20093 *
jpayne@69 20094 * if csi or min_shift > 0: # <<<<<<<<<<<<<<
jpayne@69 20095 * suffix = ".csi"
jpayne@69 20096 * if min_shift <= 0: min_shift = 14
jpayne@69 20097 */
jpayne@69 20098 goto __pyx_L27;
jpayne@69 20099 }
jpayne@69 20100
jpayne@69 20101 /* "pysam/libctabix.pyx":997
jpayne@69 20102 * if min_shift <= 0: min_shift = 14
jpayne@69 20103 * else:
jpayne@69 20104 * suffix = ".tbi" # <<<<<<<<<<<<<<
jpayne@69 20105 * min_shift = 0
jpayne@69 20106 *
jpayne@69 20107 */
jpayne@69 20108 /*else*/ {
jpayne@69 20109 __Pyx_INCREF(__pyx_kp_u_tbi);
jpayne@69 20110 __pyx_v_suffix = __pyx_kp_u_tbi;
jpayne@69 20111
jpayne@69 20112 /* "pysam/libctabix.pyx":998
jpayne@69 20113 * else:
jpayne@69 20114 * suffix = ".tbi"
jpayne@69 20115 * min_shift = 0 # <<<<<<<<<<<<<<
jpayne@69 20116 *
jpayne@69 20117 * index = index or filename + suffix
jpayne@69 20118 */
jpayne@69 20119 __pyx_v_min_shift = 0;
jpayne@69 20120 }
jpayne@69 20121 __pyx_L27:;
jpayne@69 20122
jpayne@69 20123 /* "pysam/libctabix.pyx":1000
jpayne@69 20124 * min_shift = 0
jpayne@69 20125 *
jpayne@69 20126 * index = index or filename + suffix # <<<<<<<<<<<<<<
jpayne@69 20127 * fn_index = encode_filename(index)
jpayne@69 20128 *
jpayne@69 20129 */
jpayne@69 20130 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1000, __pyx_L1_error)
jpayne@69 20131 if (!__pyx_t_2) {
jpayne@69 20132 } else {
jpayne@69 20133 __Pyx_INCREF(__pyx_v_index);
jpayne@69 20134 __pyx_t_7 = __pyx_v_index;
jpayne@69 20135 goto __pyx_L31_bool_binop_done;
jpayne@69 20136 }
jpayne@69 20137 __pyx_t_8 = PyNumber_Add(__pyx_v_filename, __pyx_v_suffix); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1000, __pyx_L1_error)
jpayne@69 20138 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 20139 __Pyx_INCREF(__pyx_t_8);
jpayne@69 20140 __pyx_t_7 = __pyx_t_8;
jpayne@69 20141 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 20142 __pyx_L31_bool_binop_done:;
jpayne@69 20143 __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_7);
jpayne@69 20144 __pyx_t_7 = 0;
jpayne@69 20145
jpayne@69 20146 /* "pysam/libctabix.pyx":1001
jpayne@69 20147 *
jpayne@69 20148 * index = index or filename + suffix
jpayne@69 20149 * fn_index = encode_filename(index) # <<<<<<<<<<<<<<
jpayne@69 20150 *
jpayne@69 20151 * if not force and os.path.exists(index):
jpayne@69 20152 */
jpayne@69 20153 __pyx_t_7 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1001, __pyx_L1_error)
jpayne@69 20154 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 20155 __pyx_v_fn_index = ((PyObject*)__pyx_t_7);
jpayne@69 20156 __pyx_t_7 = 0;
jpayne@69 20157
jpayne@69 20158 /* "pysam/libctabix.pyx":1003
jpayne@69 20159 * fn_index = encode_filename(index)
jpayne@69 20160 *
jpayne@69 20161 * if not force and os.path.exists(index): # <<<<<<<<<<<<<<
jpayne@69 20162 * raise IOError(
jpayne@69 20163 * "filename '%s' already exists, use *force* to overwrite" % index)
jpayne@69 20164 */
jpayne@69 20165 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1003, __pyx_L1_error)
jpayne@69 20166 __pyx_t_26 = (!__pyx_t_1);
jpayne@69 20167 if (__pyx_t_26) {
jpayne@69 20168 } else {
jpayne@69 20169 __pyx_t_2 = __pyx_t_26;
jpayne@69 20170 goto __pyx_L34_bool_binop_done;
jpayne@69 20171 }
jpayne@69 20172 __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1003, __pyx_L1_error)
jpayne@69 20173 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 20174 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1003, __pyx_L1_error)
jpayne@69 20175 __Pyx_GOTREF(__pyx_t_9);
jpayne@69 20176 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 20177 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_exists); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1003, __pyx_L1_error)
jpayne@69 20178 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 20179 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@69 20180 __pyx_t_9 = NULL;
jpayne@69 20181 __pyx_t_10 = 0;
jpayne@69 20182 #if CYTHON_UNPACK_METHODS
jpayne@69 20183 if (likely(PyMethod_Check(__pyx_t_8))) {
jpayne@69 20184 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
jpayne@69 20185 if (likely(__pyx_t_9)) {
jpayne@69 20186 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
jpayne@69 20187 __Pyx_INCREF(__pyx_t_9);
jpayne@69 20188 __Pyx_INCREF(function);
jpayne@69 20189 __Pyx_DECREF_SET(__pyx_t_8, function);
jpayne@69 20190 __pyx_t_10 = 1;
jpayne@69 20191 }
jpayne@69 20192 }
jpayne@69 20193 #endif
jpayne@69 20194 {
jpayne@69 20195 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_index};
jpayne@69 20196 __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
jpayne@69 20197 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@69 20198 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1003, __pyx_L1_error)
jpayne@69 20199 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 20200 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 20201 }
jpayne@69 20202 __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_26 < 0))) __PYX_ERR(0, 1003, __pyx_L1_error)
jpayne@69 20203 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 20204 __pyx_t_2 = __pyx_t_26;
jpayne@69 20205 __pyx_L34_bool_binop_done:;
jpayne@69 20206 if (unlikely(__pyx_t_2)) {
jpayne@69 20207
jpayne@69 20208 /* "pysam/libctabix.pyx":1005
jpayne@69 20209 * if not force and os.path.exists(index):
jpayne@69 20210 * raise IOError(
jpayne@69 20211 * "filename '%s' already exists, use *force* to overwrite" % index) # <<<<<<<<<<<<<<
jpayne@69 20212 *
jpayne@69 20213 * cdef char *fnidx = fn_index
jpayne@69 20214 */
jpayne@69 20215 __pyx_t_7 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_filename_s_already_exists_use_fo, __pyx_v_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1005, __pyx_L1_error)
jpayne@69 20216 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 20217
jpayne@69 20218 /* "pysam/libctabix.pyx":1004
jpayne@69 20219 *
jpayne@69 20220 * if not force and os.path.exists(index):
jpayne@69 20221 * raise IOError( # <<<<<<<<<<<<<<
jpayne@69 20222 * "filename '%s' already exists, use *force* to overwrite" % index)
jpayne@69 20223 *
jpayne@69 20224 */
jpayne@69 20225 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1004, __pyx_L1_error)
jpayne@69 20226 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 20227 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 20228 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
jpayne@69 20229 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 20230 __PYX_ERR(0, 1004, __pyx_L1_error)
jpayne@69 20231
jpayne@69 20232 /* "pysam/libctabix.pyx":1003
jpayne@69 20233 * fn_index = encode_filename(index)
jpayne@69 20234 *
jpayne@69 20235 * if not force and os.path.exists(index): # <<<<<<<<<<<<<<
jpayne@69 20236 * raise IOError(
jpayne@69 20237 * "filename '%s' already exists, use *force* to overwrite" % index)
jpayne@69 20238 */
jpayne@69 20239 }
jpayne@69 20240
jpayne@69 20241 /* "pysam/libctabix.pyx":1007
jpayne@69 20242 * "filename '%s' already exists, use *force* to overwrite" % index)
jpayne@69 20243 *
jpayne@69 20244 * cdef char *fnidx = fn_index # <<<<<<<<<<<<<<
jpayne@69 20245 * cdef int retval = 0
jpayne@69 20246 *
jpayne@69 20247 */
jpayne@69 20248 if (unlikely(__pyx_v_fn_index == Py_None)) {
jpayne@69 20249 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@69 20250 __PYX_ERR(0, 1007, __pyx_L1_error)
jpayne@69 20251 }
jpayne@69 20252 __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_fn_index); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 1007, __pyx_L1_error)
jpayne@69 20253 __pyx_v_fnidx = __pyx_t_4;
jpayne@69 20254
jpayne@69 20255 /* "pysam/libctabix.pyx":1008
jpayne@69 20256 *
jpayne@69 20257 * cdef char *fnidx = fn_index
jpayne@69 20258 * cdef int retval = 0 # <<<<<<<<<<<<<<
jpayne@69 20259 *
jpayne@69 20260 * if csi and fmt.format == bcf:
jpayne@69 20261 */
jpayne@69 20262 __pyx_v_retval = 0;
jpayne@69 20263
jpayne@69 20264 /* "pysam/libctabix.pyx":1010
jpayne@69 20265 * cdef int retval = 0
jpayne@69 20266 *
jpayne@69 20267 * if csi and fmt.format == bcf: # <<<<<<<<<<<<<<
jpayne@69 20268 * with nogil:
jpayne@69 20269 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@69 20270 */
jpayne@69 20271 __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_v_csi); if (unlikely((__pyx_t_26 < 0))) __PYX_ERR(0, 1010, __pyx_L1_error)
jpayne@69 20272 if (__pyx_t_26) {
jpayne@69 20273 } else {
jpayne@69 20274 __pyx_t_2 = __pyx_t_26;
jpayne@69 20275 goto __pyx_L37_bool_binop_done;
jpayne@69 20276 }
jpayne@69 20277 __pyx_t_26 = (__pyx_v_fmt.format == bcf);
jpayne@69 20278 __pyx_t_2 = __pyx_t_26;
jpayne@69 20279 __pyx_L37_bool_binop_done:;
jpayne@69 20280 if (__pyx_t_2) {
jpayne@69 20281
jpayne@69 20282 /* "pysam/libctabix.pyx":1011
jpayne@69 20283 *
jpayne@69 20284 * if csi and fmt.format == bcf:
jpayne@69 20285 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 20286 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@69 20287 * else:
jpayne@69 20288 */
jpayne@69 20289 {
jpayne@69 20290 #ifdef WITH_THREAD
jpayne@69 20291 PyThreadState *_save;
jpayne@69 20292 _save = NULL;
jpayne@69 20293 Py_UNBLOCK_THREADS
jpayne@69 20294 __Pyx_FastGIL_Remember();
jpayne@69 20295 #endif
jpayne@69 20296 /*try:*/ {
jpayne@69 20297
jpayne@69 20298 /* "pysam/libctabix.pyx":1012
jpayne@69 20299 * if csi and fmt.format == bcf:
jpayne@69 20300 * with nogil:
jpayne@69 20301 * retval = bcf_index_build2(cfn, fnidx, min_shift) # <<<<<<<<<<<<<<
jpayne@69 20302 * else:
jpayne@69 20303 * with nogil:
jpayne@69 20304 */
jpayne@69 20305 __pyx_v_retval = bcf_index_build2(__pyx_v_cfn, __pyx_v_fnidx, __pyx_v_min_shift);
jpayne@69 20306 }
jpayne@69 20307
jpayne@69 20308 /* "pysam/libctabix.pyx":1011
jpayne@69 20309 *
jpayne@69 20310 * if csi and fmt.format == bcf:
jpayne@69 20311 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 20312 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@69 20313 * else:
jpayne@69 20314 */
jpayne@69 20315 /*finally:*/ {
jpayne@69 20316 /*normal exit:*/{
jpayne@69 20317 #ifdef WITH_THREAD
jpayne@69 20318 __Pyx_FastGIL_Forget();
jpayne@69 20319 Py_BLOCK_THREADS
jpayne@69 20320 #endif
jpayne@69 20321 goto __pyx_L41;
jpayne@69 20322 }
jpayne@69 20323 __pyx_L41:;
jpayne@69 20324 }
jpayne@69 20325 }
jpayne@69 20326
jpayne@69 20327 /* "pysam/libctabix.pyx":1010
jpayne@69 20328 * cdef int retval = 0
jpayne@69 20329 *
jpayne@69 20330 * if csi and fmt.format == bcf: # <<<<<<<<<<<<<<
jpayne@69 20331 * with nogil:
jpayne@69 20332 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@69 20333 */
jpayne@69 20334 goto __pyx_L36;
jpayne@69 20335 }
jpayne@69 20336
jpayne@69 20337 /* "pysam/libctabix.pyx":1014
jpayne@69 20338 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@69 20339 * else:
jpayne@69 20340 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 20341 * retval = tbx_index_build2(cfn, fnidx, min_shift, &conf)
jpayne@69 20342 *
jpayne@69 20343 */
jpayne@69 20344 /*else*/ {
jpayne@69 20345 {
jpayne@69 20346 #ifdef WITH_THREAD
jpayne@69 20347 PyThreadState *_save;
jpayne@69 20348 _save = NULL;
jpayne@69 20349 Py_UNBLOCK_THREADS
jpayne@69 20350 __Pyx_FastGIL_Remember();
jpayne@69 20351 #endif
jpayne@69 20352 /*try:*/ {
jpayne@69 20353
jpayne@69 20354 /* "pysam/libctabix.pyx":1015
jpayne@69 20355 * else:
jpayne@69 20356 * with nogil:
jpayne@69 20357 * retval = tbx_index_build2(cfn, fnidx, min_shift, &conf) # <<<<<<<<<<<<<<
jpayne@69 20358 *
jpayne@69 20359 * if retval != 0:
jpayne@69 20360 */
jpayne@69 20361 __pyx_v_retval = tbx_index_build2(__pyx_v_cfn, __pyx_v_fnidx, __pyx_v_min_shift, (&__pyx_v_conf));
jpayne@69 20362 }
jpayne@69 20363
jpayne@69 20364 /* "pysam/libctabix.pyx":1014
jpayne@69 20365 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@69 20366 * else:
jpayne@69 20367 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 20368 * retval = tbx_index_build2(cfn, fnidx, min_shift, &conf)
jpayne@69 20369 *
jpayne@69 20370 */
jpayne@69 20371 /*finally:*/ {
jpayne@69 20372 /*normal exit:*/{
jpayne@69 20373 #ifdef WITH_THREAD
jpayne@69 20374 __Pyx_FastGIL_Forget();
jpayne@69 20375 Py_BLOCK_THREADS
jpayne@69 20376 #endif
jpayne@69 20377 goto __pyx_L44;
jpayne@69 20378 }
jpayne@69 20379 __pyx_L44:;
jpayne@69 20380 }
jpayne@69 20381 }
jpayne@69 20382 }
jpayne@69 20383 __pyx_L36:;
jpayne@69 20384
jpayne@69 20385 /* "pysam/libctabix.pyx":1017
jpayne@69 20386 * retval = tbx_index_build2(cfn, fnidx, min_shift, &conf)
jpayne@69 20387 *
jpayne@69 20388 * if retval != 0: # <<<<<<<<<<<<<<
jpayne@69 20389 * raise OSError("building of index for {} failed".format(filename))
jpayne@69 20390 *
jpayne@69 20391 */
jpayne@69 20392 __pyx_t_2 = (__pyx_v_retval != 0);
jpayne@69 20393 if (unlikely(__pyx_t_2)) {
jpayne@69 20394
jpayne@69 20395 /* "pysam/libctabix.pyx":1018
jpayne@69 20396 *
jpayne@69 20397 * if retval != 0:
jpayne@69 20398 * raise OSError("building of index for {} failed".format(filename)) # <<<<<<<<<<<<<<
jpayne@69 20399 *
jpayne@69 20400 * return filename
jpayne@69 20401 */
jpayne@69 20402 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_building_of_index_for_failed, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1018, __pyx_L1_error)
jpayne@69 20403 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 20404 __pyx_t_9 = NULL;
jpayne@69 20405 __pyx_t_10 = 0;
jpayne@69 20406 #if CYTHON_UNPACK_METHODS
jpayne@69 20407 if (likely(PyMethod_Check(__pyx_t_7))) {
jpayne@69 20408 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
jpayne@69 20409 if (likely(__pyx_t_9)) {
jpayne@69 20410 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
jpayne@69 20411 __Pyx_INCREF(__pyx_t_9);
jpayne@69 20412 __Pyx_INCREF(function);
jpayne@69 20413 __Pyx_DECREF_SET(__pyx_t_7, function);
jpayne@69 20414 __pyx_t_10 = 1;
jpayne@69 20415 }
jpayne@69 20416 }
jpayne@69 20417 #endif
jpayne@69 20418 {
jpayne@69 20419 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_filename};
jpayne@69 20420 __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
jpayne@69 20421 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@69 20422 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1018, __pyx_L1_error)
jpayne@69 20423 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 20424 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 20425 }
jpayne@69 20426 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_OSError, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1018, __pyx_L1_error)
jpayne@69 20427 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 20428 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 20429 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
jpayne@69 20430 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 20431 __PYX_ERR(0, 1018, __pyx_L1_error)
jpayne@69 20432
jpayne@69 20433 /* "pysam/libctabix.pyx":1017
jpayne@69 20434 * retval = tbx_index_build2(cfn, fnidx, min_shift, &conf)
jpayne@69 20435 *
jpayne@69 20436 * if retval != 0: # <<<<<<<<<<<<<<
jpayne@69 20437 * raise OSError("building of index for {} failed".format(filename))
jpayne@69 20438 *
jpayne@69 20439 */
jpayne@69 20440 }
jpayne@69 20441
jpayne@69 20442 /* "pysam/libctabix.pyx":1020
jpayne@69 20443 * raise OSError("building of index for {} failed".format(filename))
jpayne@69 20444 *
jpayne@69 20445 * return filename # <<<<<<<<<<<<<<
jpayne@69 20446 *
jpayne@69 20447 * # #########################################################
jpayne@69 20448 */
jpayne@69 20449 __Pyx_XDECREF(__pyx_r);
jpayne@69 20450 __Pyx_INCREF(__pyx_v_filename);
jpayne@69 20451 __pyx_r = __pyx_v_filename;
jpayne@69 20452 goto __pyx_L0;
jpayne@69 20453
jpayne@69 20454 /* "pysam/libctabix.pyx":873
jpayne@69 20455 *
jpayne@69 20456 *
jpayne@69 20457 * def tabix_index(filename, # <<<<<<<<<<<<<<
jpayne@69 20458 * force=False,
jpayne@69 20459 * seq_col=None,
jpayne@69 20460 */
jpayne@69 20461
jpayne@69 20462 /* function exit code */
jpayne@69 20463 __pyx_L1_error:;
jpayne@69 20464 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 20465 __Pyx_XDECREF(__pyx_t_7);
jpayne@69 20466 __Pyx_XDECREF(__pyx_t_8);
jpayne@69 20467 __Pyx_XDECREF(__pyx_t_9);
jpayne@69 20468 __Pyx_XDECREF(__pyx_t_15);
jpayne@69 20469 __Pyx_XDECREF(__pyx_t_16);
jpayne@69 20470 __Pyx_XDECREF(__pyx_t_18);
jpayne@69 20471 __Pyx_AddTraceback("pysam.libctabix.tabix_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 20472 __pyx_r = NULL;
jpayne@69 20473 __pyx_L0:;
jpayne@69 20474 __Pyx_XDECREF(__pyx_v_fn);
jpayne@69 20475 __Pyx_XDECREF(__pyx_v_preset2conf);
jpayne@69 20476 __Pyx_XDECREF(__pyx_v_conf_data);
jpayne@69 20477 __Pyx_XDECREF(__pyx_v_suffix);
jpayne@69 20478 __Pyx_XDECREF(__pyx_v_fn_index);
jpayne@69 20479 __Pyx_XDECREF(__pyx_v_filename);
jpayne@69 20480 __Pyx_XDECREF(__pyx_v_end_col);
jpayne@69 20481 __Pyx_XDECREF(__pyx_v_preset);
jpayne@69 20482 __Pyx_XDECREF(__pyx_v_index);
jpayne@69 20483 __Pyx_XDECREF(__pyx_v_csi);
jpayne@69 20484 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 20485 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 20486 __Pyx_RefNannyFinishContext();
jpayne@69 20487 return __pyx_r;
jpayne@69 20488 }
jpayne@69 20489
jpayne@69 20490 /* "pysam/libctabix.pyx":1102
jpayne@69 20491 * '''
jpayne@69 20492 *
jpayne@69 20493 * def __cinit__(self, # <<<<<<<<<<<<<<
jpayne@69 20494 * infile,
jpayne@69 20495 * Parser parser,
jpayne@69 20496 */
jpayne@69 20497
jpayne@69 20498 /* Python wrapper */
jpayne@69 20499 static int __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 20500 static int __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 20501 PyObject *__pyx_v_infile = 0;
jpayne@69 20502 struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_parser = 0;
jpayne@69 20503 int __pyx_v_buffer_size;
jpayne@69 20504 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 20505 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 20506 PyObject* values[3] = {0,0,0};
jpayne@69 20507 int __pyx_lineno = 0;
jpayne@69 20508 const char *__pyx_filename = NULL;
jpayne@69 20509 int __pyx_clineno = 0;
jpayne@69 20510 int __pyx_r;
jpayne@69 20511 __Pyx_RefNannyDeclarations
jpayne@69 20512 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
jpayne@69 20513 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 20514 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 20515 #else
jpayne@69 20516 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@69 20517 #endif
jpayne@69 20518 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 20519 {
jpayne@69 20520 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_infile,&__pyx_n_s_parser,&__pyx_n_s_buffer_size,0};
jpayne@69 20521 if (__pyx_kwds) {
jpayne@69 20522 Py_ssize_t kw_args;
jpayne@69 20523 switch (__pyx_nargs) {
jpayne@69 20524 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@69 20525 CYTHON_FALLTHROUGH;
jpayne@69 20526 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@69 20527 CYTHON_FALLTHROUGH;
jpayne@69 20528 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 20529 CYTHON_FALLTHROUGH;
jpayne@69 20530 case 0: break;
jpayne@69 20531 default: goto __pyx_L5_argtuple_error;
jpayne@69 20532 }
jpayne@69 20533 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@69 20534 switch (__pyx_nargs) {
jpayne@69 20535 case 0:
jpayne@69 20536 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_infile)) != 0)) {
jpayne@69 20537 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@69 20538 kw_args--;
jpayne@69 20539 }
jpayne@69 20540 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L3_error)
jpayne@69 20541 else goto __pyx_L5_argtuple_error;
jpayne@69 20542 CYTHON_FALLTHROUGH;
jpayne@69 20543 case 1:
jpayne@69 20544 if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser)) != 0)) {
jpayne@69 20545 (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
jpayne@69 20546 kw_args--;
jpayne@69 20547 }
jpayne@69 20548 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L3_error)
jpayne@69 20549 else {
jpayne@69 20550 __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 1102, __pyx_L3_error)
jpayne@69 20551 }
jpayne@69 20552 CYTHON_FALLTHROUGH;
jpayne@69 20553 case 2:
jpayne@69 20554 if (kw_args > 0) {
jpayne@69 20555 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffer_size);
jpayne@69 20556 if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 20557 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L3_error)
jpayne@69 20558 }
jpayne@69 20559 }
jpayne@69 20560 if (unlikely(kw_args > 0)) {
jpayne@69 20561 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 20562 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1102, __pyx_L3_error)
jpayne@69 20563 }
jpayne@69 20564 } else {
jpayne@69 20565 switch (__pyx_nargs) {
jpayne@69 20566 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@69 20567 CYTHON_FALLTHROUGH;
jpayne@69 20568 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@69 20569 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 20570 break;
jpayne@69 20571 default: goto __pyx_L5_argtuple_error;
jpayne@69 20572 }
jpayne@69 20573 }
jpayne@69 20574 __pyx_v_infile = values[0];
jpayne@69 20575 __pyx_v_parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)values[1]);
jpayne@69 20576 if (values[2]) {
jpayne@69 20577 __pyx_v_buffer_size = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_buffer_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L3_error)
jpayne@69 20578 } else {
jpayne@69 20579 __pyx_v_buffer_size = ((int)0x10000);
jpayne@69 20580 }
jpayne@69 20581 }
jpayne@69 20582 goto __pyx_L6_skip;
jpayne@69 20583 __pyx_L5_argtuple_error:;
jpayne@69 20584 __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1102, __pyx_L3_error)
jpayne@69 20585 __pyx_L6_skip:;
jpayne@69 20586 goto __pyx_L4_argument_unpacking_done;
jpayne@69 20587 __pyx_L3_error:;
jpayne@69 20588 {
jpayne@69 20589 Py_ssize_t __pyx_temp;
jpayne@69 20590 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 20591 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 20592 }
jpayne@69 20593 }
jpayne@69 20594 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 20595 __Pyx_RefNannyFinishContext();
jpayne@69 20596 return -1;
jpayne@69 20597 __pyx_L4_argument_unpacking_done:;
jpayne@69 20598 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_5pysam_9libctabix_Parser, 1, "parser", 0))) __PYX_ERR(0, 1104, __pyx_L1_error)
jpayne@69 20599 __pyx_r = __pyx_pf_5pysam_9libctabix_19tabix_file_iterator___cinit__(((struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)__pyx_v_self), __pyx_v_infile, __pyx_v_parser, __pyx_v_buffer_size);
jpayne@69 20600
jpayne@69 20601 /* function exit code */
jpayne@69 20602 goto __pyx_L0;
jpayne@69 20603 __pyx_L1_error:;
jpayne@69 20604 __pyx_r = -1;
jpayne@69 20605 __pyx_L0:;
jpayne@69 20606 {
jpayne@69 20607 Py_ssize_t __pyx_temp;
jpayne@69 20608 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 20609 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 20610 }
jpayne@69 20611 }
jpayne@69 20612 __Pyx_RefNannyFinishContext();
jpayne@69 20613 return __pyx_r;
jpayne@69 20614 }
jpayne@69 20615
jpayne@69 20616 static int __pyx_pf_5pysam_9libctabix_19tabix_file_iterator___cinit__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self, PyObject *__pyx_v_infile, struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_parser, int __pyx_v_buffer_size) {
jpayne@69 20617 int __pyx_v_fd;
jpayne@69 20618 int __pyx_r;
jpayne@69 20619 __Pyx_TraceDeclarations
jpayne@69 20620 __Pyx_RefNannyDeclarations
jpayne@69 20621 PyObject *__pyx_t_1 = NULL;
jpayne@69 20622 int __pyx_t_2;
jpayne@69 20623 int __pyx_t_3;
jpayne@69 20624 PyObject *__pyx_t_4 = NULL;
jpayne@69 20625 int __pyx_lineno = 0;
jpayne@69 20626 const char *__pyx_filename = NULL;
jpayne@69 20627 int __pyx_clineno = 0;
jpayne@69 20628 __Pyx_RefNannySetupContext("__cinit__", 1);
jpayne@69 20629 __Pyx_TraceCall("__cinit__", __pyx_f[0], 1102, 0, __PYX_ERR(0, 1102, __pyx_L1_error));
jpayne@69 20630
jpayne@69 20631 /* "pysam/libctabix.pyx":1107
jpayne@69 20632 * int buffer_size=65536):
jpayne@69 20633 *
jpayne@69 20634 * if infile.closed: # <<<<<<<<<<<<<<
jpayne@69 20635 * raise ValueError("I/O operation on closed file.")
jpayne@69 20636 *
jpayne@69 20637 */
jpayne@69 20638 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_infile, __pyx_n_s_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error)
jpayne@69 20639 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 20640 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1107, __pyx_L1_error)
jpayne@69 20641 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 20642 if (unlikely(__pyx_t_2)) {
jpayne@69 20643
jpayne@69 20644 /* "pysam/libctabix.pyx":1108
jpayne@69 20645 *
jpayne@69 20646 * if infile.closed:
jpayne@69 20647 * raise ValueError("I/O operation on closed file.") # <<<<<<<<<<<<<<
jpayne@69 20648 *
jpayne@69 20649 * self.infile = infile
jpayne@69 20650 */
jpayne@69 20651 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
jpayne@69 20652 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 20653 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 20654 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 20655 __PYX_ERR(0, 1108, __pyx_L1_error)
jpayne@69 20656
jpayne@69 20657 /* "pysam/libctabix.pyx":1107
jpayne@69 20658 * int buffer_size=65536):
jpayne@69 20659 *
jpayne@69 20660 * if infile.closed: # <<<<<<<<<<<<<<
jpayne@69 20661 * raise ValueError("I/O operation on closed file.")
jpayne@69 20662 *
jpayne@69 20663 */
jpayne@69 20664 }
jpayne@69 20665
jpayne@69 20666 /* "pysam/libctabix.pyx":1110
jpayne@69 20667 * raise ValueError("I/O operation on closed file.")
jpayne@69 20668 *
jpayne@69 20669 * self.infile = infile # <<<<<<<<<<<<<<
jpayne@69 20670 *
jpayne@69 20671 * cdef int fd = PyObject_AsFileDescriptor(infile)
jpayne@69 20672 */
jpayne@69 20673 __Pyx_INCREF(__pyx_v_infile);
jpayne@69 20674 __Pyx_GIVEREF(__pyx_v_infile);
jpayne@69 20675 __Pyx_GOTREF(__pyx_v_self->infile);
jpayne@69 20676 __Pyx_DECREF(__pyx_v_self->infile);
jpayne@69 20677 __pyx_v_self->infile = __pyx_v_infile;
jpayne@69 20678
jpayne@69 20679 /* "pysam/libctabix.pyx":1112
jpayne@69 20680 * self.infile = infile
jpayne@69 20681 *
jpayne@69 20682 * cdef int fd = PyObject_AsFileDescriptor(infile) # <<<<<<<<<<<<<<
jpayne@69 20683 * if fd == -1:
jpayne@69 20684 * raise ValueError("I/O operation on closed file.")
jpayne@69 20685 */
jpayne@69 20686 __pyx_t_3 = PyObject_AsFileDescriptor(__pyx_v_infile); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1112, __pyx_L1_error)
jpayne@69 20687 __pyx_v_fd = __pyx_t_3;
jpayne@69 20688
jpayne@69 20689 /* "pysam/libctabix.pyx":1113
jpayne@69 20690 *
jpayne@69 20691 * cdef int fd = PyObject_AsFileDescriptor(infile)
jpayne@69 20692 * if fd == -1: # <<<<<<<<<<<<<<
jpayne@69 20693 * raise ValueError("I/O operation on closed file.")
jpayne@69 20694 *
jpayne@69 20695 */
jpayne@69 20696 __pyx_t_2 = (__pyx_v_fd == -1L);
jpayne@69 20697 if (unlikely(__pyx_t_2)) {
jpayne@69 20698
jpayne@69 20699 /* "pysam/libctabix.pyx":1114
jpayne@69 20700 * cdef int fd = PyObject_AsFileDescriptor(infile)
jpayne@69 20701 * if fd == -1:
jpayne@69 20702 * raise ValueError("I/O operation on closed file.") # <<<<<<<<<<<<<<
jpayne@69 20703 *
jpayne@69 20704 * self.duplicated_fd = dup(fd)
jpayne@69 20705 */
jpayne@69 20706 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error)
jpayne@69 20707 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 20708 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 20709 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 20710 __PYX_ERR(0, 1114, __pyx_L1_error)
jpayne@69 20711
jpayne@69 20712 /* "pysam/libctabix.pyx":1113
jpayne@69 20713 *
jpayne@69 20714 * cdef int fd = PyObject_AsFileDescriptor(infile)
jpayne@69 20715 * if fd == -1: # <<<<<<<<<<<<<<
jpayne@69 20716 * raise ValueError("I/O operation on closed file.")
jpayne@69 20717 *
jpayne@69 20718 */
jpayne@69 20719 }
jpayne@69 20720
jpayne@69 20721 /* "pysam/libctabix.pyx":1116
jpayne@69 20722 * raise ValueError("I/O operation on closed file.")
jpayne@69 20723 *
jpayne@69 20724 * self.duplicated_fd = dup(fd) # <<<<<<<<<<<<<<
jpayne@69 20725 *
jpayne@69 20726 * # From the manual:
jpayne@69 20727 */
jpayne@69 20728 __pyx_v_self->duplicated_fd = dup(__pyx_v_fd);
jpayne@69 20729
jpayne@69 20730 /* "pysam/libctabix.pyx":1123
jpayne@69 20731 * # When reading, this will be detected automatically by looking
jpayne@69 20732 * # for the magic two-byte gzip header.
jpayne@69 20733 * self.fh = bgzf_dopen(self.duplicated_fd, 'r') # <<<<<<<<<<<<<<
jpayne@69 20734 *
jpayne@69 20735 * if self.fh == NULL:
jpayne@69 20736 */
jpayne@69 20737 __pyx_v_self->fh = bgzf_dopen(__pyx_v_self->duplicated_fd, ((char const *)"r"));
jpayne@69 20738
jpayne@69 20739 /* "pysam/libctabix.pyx":1125
jpayne@69 20740 * self.fh = bgzf_dopen(self.duplicated_fd, 'r')
jpayne@69 20741 *
jpayne@69 20742 * if self.fh == NULL: # <<<<<<<<<<<<<<
jpayne@69 20743 * raise IOError('%s' % strerror(errno))
jpayne@69 20744 *
jpayne@69 20745 */
jpayne@69 20746 __pyx_t_2 = (__pyx_v_self->fh == NULL);
jpayne@69 20747 if (unlikely(__pyx_t_2)) {
jpayne@69 20748
jpayne@69 20749 /* "pysam/libctabix.pyx":1126
jpayne@69 20750 *
jpayne@69 20751 * if self.fh == NULL:
jpayne@69 20752 * raise IOError('%s' % strerror(errno)) # <<<<<<<<<<<<<<
jpayne@69 20753 *
jpayne@69 20754 * self.kstream = ks_init(self.fh)
jpayne@69 20755 */
jpayne@69 20756 __pyx_t_1 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
jpayne@69 20757 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 20758 __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1126, __pyx_L1_error)
jpayne@69 20759 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 20760 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 20761 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
jpayne@69 20762 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 20763 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 20764 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 20765 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 20766 __PYX_ERR(0, 1126, __pyx_L1_error)
jpayne@69 20767
jpayne@69 20768 /* "pysam/libctabix.pyx":1125
jpayne@69 20769 * self.fh = bgzf_dopen(self.duplicated_fd, 'r')
jpayne@69 20770 *
jpayne@69 20771 * if self.fh == NULL: # <<<<<<<<<<<<<<
jpayne@69 20772 * raise IOError('%s' % strerror(errno))
jpayne@69 20773 *
jpayne@69 20774 */
jpayne@69 20775 }
jpayne@69 20776
jpayne@69 20777 /* "pysam/libctabix.pyx":1128
jpayne@69 20778 * raise IOError('%s' % strerror(errno))
jpayne@69 20779 *
jpayne@69 20780 * self.kstream = ks_init(self.fh) # <<<<<<<<<<<<<<
jpayne@69 20781 *
jpayne@69 20782 * self.buffer.s = <char*>malloc(buffer_size)
jpayne@69 20783 */
jpayne@69 20784 __pyx_v_self->kstream = ks_init(__pyx_v_self->fh);
jpayne@69 20785
jpayne@69 20786 /* "pysam/libctabix.pyx":1130
jpayne@69 20787 * self.kstream = ks_init(self.fh)
jpayne@69 20788 *
jpayne@69 20789 * self.buffer.s = <char*>malloc(buffer_size) # <<<<<<<<<<<<<<
jpayne@69 20790 * #if self.buffer == NULL:
jpayne@69 20791 * # raise MemoryError( "tabix_file_iterator: could not allocate %i bytes" % buffer_size)
jpayne@69 20792 */
jpayne@69 20793 __pyx_v_self->buffer.s = ((char *)malloc(__pyx_v_buffer_size));
jpayne@69 20794
jpayne@69 20795 /* "pysam/libctabix.pyx":1134
jpayne@69 20796 * # raise MemoryError( "tabix_file_iterator: could not allocate %i bytes" % buffer_size)
jpayne@69 20797 * #self.size = buffer_size
jpayne@69 20798 * self.parser = parser # <<<<<<<<<<<<<<
jpayne@69 20799 *
jpayne@69 20800 * def __iter__(self):
jpayne@69 20801 */
jpayne@69 20802 __Pyx_INCREF((PyObject *)__pyx_v_parser);
jpayne@69 20803 __Pyx_GIVEREF((PyObject *)__pyx_v_parser);
jpayne@69 20804 __Pyx_GOTREF((PyObject *)__pyx_v_self->parser);
jpayne@69 20805 __Pyx_DECREF((PyObject *)__pyx_v_self->parser);
jpayne@69 20806 __pyx_v_self->parser = __pyx_v_parser;
jpayne@69 20807
jpayne@69 20808 /* "pysam/libctabix.pyx":1102
jpayne@69 20809 * '''
jpayne@69 20810 *
jpayne@69 20811 * def __cinit__(self, # <<<<<<<<<<<<<<
jpayne@69 20812 * infile,
jpayne@69 20813 * Parser parser,
jpayne@69 20814 */
jpayne@69 20815
jpayne@69 20816 /* function exit code */
jpayne@69 20817 __pyx_r = 0;
jpayne@69 20818 goto __pyx_L0;
jpayne@69 20819 __pyx_L1_error:;
jpayne@69 20820 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 20821 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 20822 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 20823 __pyx_r = -1;
jpayne@69 20824 __pyx_L0:;
jpayne@69 20825 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 20826 __Pyx_RefNannyFinishContext();
jpayne@69 20827 return __pyx_r;
jpayne@69 20828 }
jpayne@69 20829
jpayne@69 20830 /* "pysam/libctabix.pyx":1136
jpayne@69 20831 * self.parser = parser
jpayne@69 20832 *
jpayne@69 20833 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 20834 * return self
jpayne@69 20835 *
jpayne@69 20836 */
jpayne@69 20837
jpayne@69 20838 /* Python wrapper */
jpayne@69 20839 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 20840 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_3__iter__(PyObject *__pyx_v_self) {
jpayne@69 20841 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 20842 PyObject *__pyx_r = 0;
jpayne@69 20843 __Pyx_RefNannyDeclarations
jpayne@69 20844 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
jpayne@69 20845 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 20846 __pyx_r = __pyx_pf_5pysam_9libctabix_19tabix_file_iterator_2__iter__(((struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)__pyx_v_self));
jpayne@69 20847
jpayne@69 20848 /* function exit code */
jpayne@69 20849 __Pyx_RefNannyFinishContext();
jpayne@69 20850 return __pyx_r;
jpayne@69 20851 }
jpayne@69 20852
jpayne@69 20853 static PyObject *__pyx_pf_5pysam_9libctabix_19tabix_file_iterator_2__iter__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self) {
jpayne@69 20854 PyObject *__pyx_r = NULL;
jpayne@69 20855 __Pyx_TraceDeclarations
jpayne@69 20856 __Pyx_RefNannyDeclarations
jpayne@69 20857 int __pyx_lineno = 0;
jpayne@69 20858 const char *__pyx_filename = NULL;
jpayne@69 20859 int __pyx_clineno = 0;
jpayne@69 20860 __Pyx_RefNannySetupContext("__iter__", 1);
jpayne@69 20861 __Pyx_TraceCall("__iter__", __pyx_f[0], 1136, 0, __PYX_ERR(0, 1136, __pyx_L1_error));
jpayne@69 20862
jpayne@69 20863 /* "pysam/libctabix.pyx":1137
jpayne@69 20864 *
jpayne@69 20865 * def __iter__(self):
jpayne@69 20866 * return self # <<<<<<<<<<<<<<
jpayne@69 20867 *
jpayne@69 20868 * cdef __cnext__(self):
jpayne@69 20869 */
jpayne@69 20870 __Pyx_XDECREF(__pyx_r);
jpayne@69 20871 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@69 20872 __pyx_r = ((PyObject *)__pyx_v_self);
jpayne@69 20873 goto __pyx_L0;
jpayne@69 20874
jpayne@69 20875 /* "pysam/libctabix.pyx":1136
jpayne@69 20876 * self.parser = parser
jpayne@69 20877 *
jpayne@69 20878 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 20879 * return self
jpayne@69 20880 *
jpayne@69 20881 */
jpayne@69 20882
jpayne@69 20883 /* function exit code */
jpayne@69 20884 __pyx_L1_error:;
jpayne@69 20885 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 20886 __pyx_r = NULL;
jpayne@69 20887 __pyx_L0:;
jpayne@69 20888 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 20889 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 20890 __Pyx_RefNannyFinishContext();
jpayne@69 20891 return __pyx_r;
jpayne@69 20892 }
jpayne@69 20893
jpayne@69 20894 /* "pysam/libctabix.pyx":1139
jpayne@69 20895 * return self
jpayne@69 20896 *
jpayne@69 20897 * cdef __cnext__(self): # <<<<<<<<<<<<<<
jpayne@69 20898 *
jpayne@69 20899 * cdef char * b
jpayne@69 20900 */
jpayne@69 20901
jpayne@69 20902 static PyObject *__pyx_f_5pysam_9libctabix_19tabix_file_iterator___cnext__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self) {
jpayne@69 20903 char *__pyx_v_b;
jpayne@69 20904 int __pyx_v_dret;
jpayne@69 20905 int __pyx_v_retval;
jpayne@69 20906 PyObject *__pyx_r = NULL;
jpayne@69 20907 __Pyx_TraceDeclarations
jpayne@69 20908 __Pyx_RefNannyDeclarations
jpayne@69 20909 int __pyx_t_1;
jpayne@69 20910 char *__pyx_t_2;
jpayne@69 20911 int __pyx_t_3;
jpayne@69 20912 PyObject *__pyx_t_4 = NULL;
jpayne@69 20913 int __pyx_lineno = 0;
jpayne@69 20914 const char *__pyx_filename = NULL;
jpayne@69 20915 int __pyx_clineno = 0;
jpayne@69 20916 __Pyx_RefNannySetupContext("__cnext__", 1);
jpayne@69 20917 __Pyx_TraceCall("__cnext__", __pyx_f[0], 1139, 0, __PYX_ERR(0, 1139, __pyx_L1_error));
jpayne@69 20918
jpayne@69 20919 /* "pysam/libctabix.pyx":1142
jpayne@69 20920 *
jpayne@69 20921 * cdef char * b
jpayne@69 20922 * cdef int dret = 0 # <<<<<<<<<<<<<<
jpayne@69 20923 * cdef int retval = 0
jpayne@69 20924 * while 1:
jpayne@69 20925 */
jpayne@69 20926 __pyx_v_dret = 0;
jpayne@69 20927
jpayne@69 20928 /* "pysam/libctabix.pyx":1143
jpayne@69 20929 * cdef char * b
jpayne@69 20930 * cdef int dret = 0
jpayne@69 20931 * cdef int retval = 0 # <<<<<<<<<<<<<<
jpayne@69 20932 * while 1:
jpayne@69 20933 * with nogil:
jpayne@69 20934 */
jpayne@69 20935 __pyx_v_retval = 0;
jpayne@69 20936
jpayne@69 20937 /* "pysam/libctabix.pyx":1144
jpayne@69 20938 * cdef int dret = 0
jpayne@69 20939 * cdef int retval = 0
jpayne@69 20940 * while 1: # <<<<<<<<<<<<<<
jpayne@69 20941 * with nogil:
jpayne@69 20942 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@69 20943 */
jpayne@69 20944 while (1) {
jpayne@69 20945
jpayne@69 20946 /* "pysam/libctabix.pyx":1145
jpayne@69 20947 * cdef int retval = 0
jpayne@69 20948 * while 1:
jpayne@69 20949 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 20950 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@69 20951 *
jpayne@69 20952 */
jpayne@69 20953 {
jpayne@69 20954 #ifdef WITH_THREAD
jpayne@69 20955 PyThreadState *_save;
jpayne@69 20956 _save = NULL;
jpayne@69 20957 Py_UNBLOCK_THREADS
jpayne@69 20958 __Pyx_FastGIL_Remember();
jpayne@69 20959 #endif
jpayne@69 20960 /*try:*/ {
jpayne@69 20961
jpayne@69 20962 /* "pysam/libctabix.pyx":1146
jpayne@69 20963 * while 1:
jpayne@69 20964 * with nogil:
jpayne@69 20965 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret) # <<<<<<<<<<<<<<
jpayne@69 20966 *
jpayne@69 20967 * if retval < 0:
jpayne@69 20968 */
jpayne@69 20969 __pyx_v_retval = ks_getuntil(__pyx_v_self->kstream, '\n', (&__pyx_v_self->buffer), (&__pyx_v_dret));
jpayne@69 20970 }
jpayne@69 20971
jpayne@69 20972 /* "pysam/libctabix.pyx":1145
jpayne@69 20973 * cdef int retval = 0
jpayne@69 20974 * while 1:
jpayne@69 20975 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 20976 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@69 20977 *
jpayne@69 20978 */
jpayne@69 20979 /*finally:*/ {
jpayne@69 20980 /*normal exit:*/{
jpayne@69 20981 #ifdef WITH_THREAD
jpayne@69 20982 __Pyx_FastGIL_Forget();
jpayne@69 20983 Py_BLOCK_THREADS
jpayne@69 20984 #endif
jpayne@69 20985 goto __pyx_L9;
jpayne@69 20986 }
jpayne@69 20987 __pyx_L9:;
jpayne@69 20988 }
jpayne@69 20989 }
jpayne@69 20990
jpayne@69 20991 /* "pysam/libctabix.pyx":1148
jpayne@69 20992 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@69 20993 *
jpayne@69 20994 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 20995 * break
jpayne@69 20996 * #raise IOError('gzip error: %s' % buildGzipError( self.fh ))
jpayne@69 20997 */
jpayne@69 20998 __pyx_t_1 = (__pyx_v_retval < 0);
jpayne@69 20999 if (__pyx_t_1) {
jpayne@69 21000
jpayne@69 21001 /* "pysam/libctabix.pyx":1149
jpayne@69 21002 *
jpayne@69 21003 * if retval < 0:
jpayne@69 21004 * break # <<<<<<<<<<<<<<
jpayne@69 21005 * #raise IOError('gzip error: %s' % buildGzipError( self.fh ))
jpayne@69 21006 *
jpayne@69 21007 */
jpayne@69 21008 goto __pyx_L4_break;
jpayne@69 21009
jpayne@69 21010 /* "pysam/libctabix.pyx":1148
jpayne@69 21011 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@69 21012 *
jpayne@69 21013 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@69 21014 * break
jpayne@69 21015 * #raise IOError('gzip error: %s' % buildGzipError( self.fh ))
jpayne@69 21016 */
jpayne@69 21017 }
jpayne@69 21018
jpayne@69 21019 /* "pysam/libctabix.pyx":1152
jpayne@69 21020 * #raise IOError('gzip error: %s' % buildGzipError( self.fh ))
jpayne@69 21021 *
jpayne@69 21022 * b = self.buffer.s # <<<<<<<<<<<<<<
jpayne@69 21023 *
jpayne@69 21024 * # skip comments
jpayne@69 21025 */
jpayne@69 21026 __pyx_t_2 = __pyx_v_self->buffer.s;
jpayne@69 21027 __pyx_v_b = __pyx_t_2;
jpayne@69 21028
jpayne@69 21029 /* "pysam/libctabix.pyx":1155
jpayne@69 21030 *
jpayne@69 21031 * # skip comments
jpayne@69 21032 * if (b[0] == b'#'): # <<<<<<<<<<<<<<
jpayne@69 21033 * continue
jpayne@69 21034 *
jpayne@69 21035 */
jpayne@69 21036 __pyx_t_1 = ((__pyx_v_b[0]) == '#');
jpayne@69 21037 if (__pyx_t_1) {
jpayne@69 21038
jpayne@69 21039 /* "pysam/libctabix.pyx":1156
jpayne@69 21040 * # skip comments
jpayne@69 21041 * if (b[0] == b'#'):
jpayne@69 21042 * continue # <<<<<<<<<<<<<<
jpayne@69 21043 *
jpayne@69 21044 * # skip empty lines
jpayne@69 21045 */
jpayne@69 21046 goto __pyx_L3_continue;
jpayne@69 21047
jpayne@69 21048 /* "pysam/libctabix.pyx":1155
jpayne@69 21049 *
jpayne@69 21050 * # skip comments
jpayne@69 21051 * if (b[0] == b'#'): # <<<<<<<<<<<<<<
jpayne@69 21052 * continue
jpayne@69 21053 *
jpayne@69 21054 */
jpayne@69 21055 }
jpayne@69 21056
jpayne@69 21057 /* "pysam/libctabix.pyx":1159
jpayne@69 21058 *
jpayne@69 21059 * # skip empty lines
jpayne@69 21060 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r': # <<<<<<<<<<<<<<
jpayne@69 21061 * continue
jpayne@69 21062 *
jpayne@69 21063 */
jpayne@69 21064 __pyx_t_3 = ((__pyx_v_b[0]) == '\x00');
jpayne@69 21065 if (!__pyx_t_3) {
jpayne@69 21066 } else {
jpayne@69 21067 __pyx_t_1 = __pyx_t_3;
jpayne@69 21068 goto __pyx_L13_bool_binop_done;
jpayne@69 21069 }
jpayne@69 21070 __pyx_t_3 = ((__pyx_v_b[0]) == '\n');
jpayne@69 21071 if (!__pyx_t_3) {
jpayne@69 21072 } else {
jpayne@69 21073 __pyx_t_1 = __pyx_t_3;
jpayne@69 21074 goto __pyx_L13_bool_binop_done;
jpayne@69 21075 }
jpayne@69 21076 __pyx_t_3 = ((__pyx_v_b[0]) == '\r');
jpayne@69 21077 __pyx_t_1 = __pyx_t_3;
jpayne@69 21078 __pyx_L13_bool_binop_done:;
jpayne@69 21079 if (__pyx_t_1) {
jpayne@69 21080
jpayne@69 21081 /* "pysam/libctabix.pyx":1160
jpayne@69 21082 * # skip empty lines
jpayne@69 21083 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r':
jpayne@69 21084 * continue # <<<<<<<<<<<<<<
jpayne@69 21085 *
jpayne@69 21086 * # gzgets terminates at \n, no need to test
jpayne@69 21087 */
jpayne@69 21088 goto __pyx_L3_continue;
jpayne@69 21089
jpayne@69 21090 /* "pysam/libctabix.pyx":1159
jpayne@69 21091 *
jpayne@69 21092 * # skip empty lines
jpayne@69 21093 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r': # <<<<<<<<<<<<<<
jpayne@69 21094 * continue
jpayne@69 21095 *
jpayne@69 21096 */
jpayne@69 21097 }
jpayne@69 21098
jpayne@69 21099 /* "pysam/libctabix.pyx":1165
jpayne@69 21100 *
jpayne@69 21101 * # parser creates a copy
jpayne@69 21102 * return self.parser.parse(b, self.buffer.l) # <<<<<<<<<<<<<<
jpayne@69 21103 *
jpayne@69 21104 * raise StopIteration
jpayne@69 21105 */
jpayne@69 21106 __Pyx_XDECREF(__pyx_r);
jpayne@69 21107 __pyx_t_4 = ((struct __pyx_vtabstruct_5pysam_9libctabix_Parser *)__pyx_v_self->parser->__pyx_vtab)->parse(__pyx_v_self->parser, __pyx_v_b, __pyx_v_self->buffer.l); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1165, __pyx_L1_error)
jpayne@69 21108 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 21109 __pyx_r = __pyx_t_4;
jpayne@69 21110 __pyx_t_4 = 0;
jpayne@69 21111 goto __pyx_L0;
jpayne@69 21112 __pyx_L3_continue:;
jpayne@69 21113 }
jpayne@69 21114 __pyx_L4_break:;
jpayne@69 21115
jpayne@69 21116 /* "pysam/libctabix.pyx":1167
jpayne@69 21117 * return self.parser.parse(b, self.buffer.l)
jpayne@69 21118 *
jpayne@69 21119 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@69 21120 *
jpayne@69 21121 * def __dealloc__(self):
jpayne@69 21122 */
jpayne@69 21123 __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
jpayne@69 21124 __PYX_ERR(0, 1167, __pyx_L1_error)
jpayne@69 21125
jpayne@69 21126 /* "pysam/libctabix.pyx":1139
jpayne@69 21127 * return self
jpayne@69 21128 *
jpayne@69 21129 * cdef __cnext__(self): # <<<<<<<<<<<<<<
jpayne@69 21130 *
jpayne@69 21131 * cdef char * b
jpayne@69 21132 */
jpayne@69 21133
jpayne@69 21134 /* function exit code */
jpayne@69 21135 __pyx_L1_error:;
jpayne@69 21136 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 21137 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__cnext__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 21138 __pyx_r = 0;
jpayne@69 21139 __pyx_L0:;
jpayne@69 21140 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 21141 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 21142 __Pyx_RefNannyFinishContext();
jpayne@69 21143 return __pyx_r;
jpayne@69 21144 }
jpayne@69 21145
jpayne@69 21146 /* "pysam/libctabix.pyx":1169
jpayne@69 21147 * raise StopIteration
jpayne@69 21148 *
jpayne@69 21149 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@69 21150 * free(self.buffer.s)
jpayne@69 21151 * ks_destroy(self.kstream)
jpayne@69 21152 */
jpayne@69 21153
jpayne@69 21154 /* Python wrapper */
jpayne@69 21155 static void __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 21156 static void __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_5__dealloc__(PyObject *__pyx_v_self) {
jpayne@69 21157 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 21158 __Pyx_RefNannyDeclarations
jpayne@69 21159 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
jpayne@69 21160 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 21161 __pyx_pf_5pysam_9libctabix_19tabix_file_iterator_4__dealloc__(((struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)__pyx_v_self));
jpayne@69 21162
jpayne@69 21163 /* function exit code */
jpayne@69 21164 __Pyx_RefNannyFinishContext();
jpayne@69 21165 }
jpayne@69 21166
jpayne@69 21167 static void __pyx_pf_5pysam_9libctabix_19tabix_file_iterator_4__dealloc__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self) {
jpayne@69 21168 __Pyx_TraceDeclarations
jpayne@69 21169 int __pyx_lineno = 0;
jpayne@69 21170 const char *__pyx_filename = NULL;
jpayne@69 21171 int __pyx_clineno = 0;
jpayne@69 21172 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1169, 0, __PYX_ERR(0, 1169, __pyx_L1_error));
jpayne@69 21173
jpayne@69 21174 /* "pysam/libctabix.pyx":1170
jpayne@69 21175 *
jpayne@69 21176 * def __dealloc__(self):
jpayne@69 21177 * free(self.buffer.s) # <<<<<<<<<<<<<<
jpayne@69 21178 * ks_destroy(self.kstream)
jpayne@69 21179 * bgzf_close(self.fh)
jpayne@69 21180 */
jpayne@69 21181 free(__pyx_v_self->buffer.s);
jpayne@69 21182
jpayne@69 21183 /* "pysam/libctabix.pyx":1171
jpayne@69 21184 * def __dealloc__(self):
jpayne@69 21185 * free(self.buffer.s)
jpayne@69 21186 * ks_destroy(self.kstream) # <<<<<<<<<<<<<<
jpayne@69 21187 * bgzf_close(self.fh)
jpayne@69 21188 *
jpayne@69 21189 */
jpayne@69 21190 ks_destroy(__pyx_v_self->kstream);
jpayne@69 21191
jpayne@69 21192 /* "pysam/libctabix.pyx":1172
jpayne@69 21193 * free(self.buffer.s)
jpayne@69 21194 * ks_destroy(self.kstream)
jpayne@69 21195 * bgzf_close(self.fh) # <<<<<<<<<<<<<<
jpayne@69 21196 *
jpayne@69 21197 * def __next__(self):
jpayne@69 21198 */
jpayne@69 21199 (void)(bgzf_close(__pyx_v_self->fh));
jpayne@69 21200
jpayne@69 21201 /* "pysam/libctabix.pyx":1169
jpayne@69 21202 * raise StopIteration
jpayne@69 21203 *
jpayne@69 21204 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@69 21205 * free(self.buffer.s)
jpayne@69 21206 * ks_destroy(self.kstream)
jpayne@69 21207 */
jpayne@69 21208
jpayne@69 21209 /* function exit code */
jpayne@69 21210 goto __pyx_L0;
jpayne@69 21211 __pyx_L1_error:;
jpayne@69 21212 __Pyx_WriteUnraisable("pysam.libctabix.tabix_file_iterator.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
jpayne@69 21213 __pyx_L0:;
jpayne@69 21214 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 21215 }
jpayne@69 21216
jpayne@69 21217 /* "pysam/libctabix.pyx":1174
jpayne@69 21218 * bgzf_close(self.fh)
jpayne@69 21219 *
jpayne@69 21220 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 21221 * return self.__cnext__()
jpayne@69 21222 *
jpayne@69 21223 */
jpayne@69 21224
jpayne@69 21225 /* Python wrapper */
jpayne@69 21226 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 21227 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__(PyObject *__pyx_v_self) {
jpayne@69 21228 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 21229 PyObject *__pyx_r = 0;
jpayne@69 21230 __Pyx_RefNannyDeclarations
jpayne@69 21231 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@69 21232 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 21233 __pyx_r = __pyx_pf_5pysam_9libctabix_19tabix_file_iterator_6__next__(((struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)__pyx_v_self));
jpayne@69 21234
jpayne@69 21235 /* function exit code */
jpayne@69 21236 __Pyx_RefNannyFinishContext();
jpayne@69 21237 return __pyx_r;
jpayne@69 21238 }
jpayne@69 21239
jpayne@69 21240 static PyObject *__pyx_pf_5pysam_9libctabix_19tabix_file_iterator_6__next__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self) {
jpayne@69 21241 PyObject *__pyx_r = NULL;
jpayne@69 21242 __Pyx_TraceDeclarations
jpayne@69 21243 __Pyx_RefNannyDeclarations
jpayne@69 21244 PyObject *__pyx_t_1 = NULL;
jpayne@69 21245 int __pyx_lineno = 0;
jpayne@69 21246 const char *__pyx_filename = NULL;
jpayne@69 21247 int __pyx_clineno = 0;
jpayne@69 21248 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@69 21249 __Pyx_TraceCall("__next__", __pyx_f[0], 1174, 0, __PYX_ERR(0, 1174, __pyx_L1_error));
jpayne@69 21250
jpayne@69 21251 /* "pysam/libctabix.pyx":1175
jpayne@69 21252 *
jpayne@69 21253 * def __next__(self):
jpayne@69 21254 * return self.__cnext__() # <<<<<<<<<<<<<<
jpayne@69 21255 *
jpayne@69 21256 *
jpayne@69 21257 */
jpayne@69 21258 __Pyx_XDECREF(__pyx_r);
jpayne@69 21259 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator *)__pyx_v_self->__pyx_vtab)->__pyx___cnext__(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)
jpayne@69 21260 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 21261 __pyx_r = __pyx_t_1;
jpayne@69 21262 __pyx_t_1 = 0;
jpayne@69 21263 goto __pyx_L0;
jpayne@69 21264
jpayne@69 21265 /* "pysam/libctabix.pyx":1174
jpayne@69 21266 * bgzf_close(self.fh)
jpayne@69 21267 *
jpayne@69 21268 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 21269 * return self.__cnext__()
jpayne@69 21270 *
jpayne@69 21271 */
jpayne@69 21272
jpayne@69 21273 /* function exit code */
jpayne@69 21274 __pyx_L1_error:;
jpayne@69 21275 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 21276 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 21277 __pyx_r = NULL;
jpayne@69 21278 __pyx_L0:;
jpayne@69 21279 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 21280 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 21281 __Pyx_RefNannyFinishContext();
jpayne@69 21282 return __pyx_r;
jpayne@69 21283 }
jpayne@69 21284
jpayne@69 21285 /* "(tree fragment)":1
jpayne@69 21286 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 21287 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 21288 * def __setstate_cython__(self, __pyx_state):
jpayne@69 21289 */
jpayne@69 21290
jpayne@69 21291 /* Python wrapper */
jpayne@69 21292 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 21293 #if CYTHON_METH_FASTCALL
jpayne@69 21294 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 21295 #else
jpayne@69 21296 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 21297 #endif
jpayne@69 21298 ); /*proto*/
jpayne@69 21299 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_19tabix_file_iterator_8__reduce_cython__, "tabix_file_iterator.__reduce_cython__(self)");
jpayne@69 21300 static PyMethodDef __pyx_mdef_5pysam_9libctabix_19tabix_file_iterator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_19tabix_file_iterator_8__reduce_cython__};
jpayne@69 21301 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 21302 #if CYTHON_METH_FASTCALL
jpayne@69 21303 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 21304 #else
jpayne@69 21305 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 21306 #endif
jpayne@69 21307 ) {
jpayne@69 21308 #if !CYTHON_METH_FASTCALL
jpayne@69 21309 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 21310 #endif
jpayne@69 21311 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 21312 PyObject *__pyx_r = 0;
jpayne@69 21313 __Pyx_RefNannyDeclarations
jpayne@69 21314 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 21315 #if !CYTHON_METH_FASTCALL
jpayne@69 21316 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 21317 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 21318 #else
jpayne@69 21319 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 21320 #endif
jpayne@69 21321 #endif
jpayne@69 21322 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 21323 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 21324 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 21325 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 21326 __pyx_r = __pyx_pf_5pysam_9libctabix_19tabix_file_iterator_8__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)__pyx_v_self));
jpayne@69 21327
jpayne@69 21328 /* function exit code */
jpayne@69 21329 __Pyx_RefNannyFinishContext();
jpayne@69 21330 return __pyx_r;
jpayne@69 21331 }
jpayne@69 21332
jpayne@69 21333 static PyObject *__pyx_pf_5pysam_9libctabix_19tabix_file_iterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self) {
jpayne@69 21334 PyObject *__pyx_r = NULL;
jpayne@69 21335 __Pyx_TraceDeclarations
jpayne@69 21336 __Pyx_RefNannyDeclarations
jpayne@69 21337 int __pyx_lineno = 0;
jpayne@69 21338 const char *__pyx_filename = NULL;
jpayne@69 21339 int __pyx_clineno = 0;
jpayne@69 21340 __Pyx_TraceFrameInit(__pyx_codeobj__46)
jpayne@69 21341 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 21342 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 21343
jpayne@69 21344 /* "(tree fragment)":2
jpayne@69 21345 * def __reduce_cython__(self):
jpayne@69 21346 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 21347 * def __setstate_cython__(self, __pyx_state):
jpayne@69 21348 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 21349 */
jpayne@69 21350 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 21351 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 21352
jpayne@69 21353 /* "(tree fragment)":1
jpayne@69 21354 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 21355 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 21356 * def __setstate_cython__(self, __pyx_state):
jpayne@69 21357 */
jpayne@69 21358
jpayne@69 21359 /* function exit code */
jpayne@69 21360 __pyx_L1_error:;
jpayne@69 21361 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 21362 __pyx_r = NULL;
jpayne@69 21363 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 21364 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 21365 __Pyx_RefNannyFinishContext();
jpayne@69 21366 return __pyx_r;
jpayne@69 21367 }
jpayne@69 21368
jpayne@69 21369 /* "(tree fragment)":3
jpayne@69 21370 * def __reduce_cython__(self):
jpayne@69 21371 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 21372 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 21373 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 21374 */
jpayne@69 21375
jpayne@69 21376 /* Python wrapper */
jpayne@69 21377 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 21378 #if CYTHON_METH_FASTCALL
jpayne@69 21379 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 21380 #else
jpayne@69 21381 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 21382 #endif
jpayne@69 21383 ); /*proto*/
jpayne@69 21384 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_19tabix_file_iterator_10__setstate_cython__, "tabix_file_iterator.__setstate_cython__(self, __pyx_state)");
jpayne@69 21385 static PyMethodDef __pyx_mdef_5pysam_9libctabix_19tabix_file_iterator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_19tabix_file_iterator_10__setstate_cython__};
jpayne@69 21386 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 21387 #if CYTHON_METH_FASTCALL
jpayne@69 21388 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 21389 #else
jpayne@69 21390 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 21391 #endif
jpayne@69 21392 ) {
jpayne@69 21393 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 21394 #if !CYTHON_METH_FASTCALL
jpayne@69 21395 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 21396 #endif
jpayne@69 21397 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 21398 PyObject* values[1] = {0};
jpayne@69 21399 int __pyx_lineno = 0;
jpayne@69 21400 const char *__pyx_filename = NULL;
jpayne@69 21401 int __pyx_clineno = 0;
jpayne@69 21402 PyObject *__pyx_r = 0;
jpayne@69 21403 __Pyx_RefNannyDeclarations
jpayne@69 21404 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 21405 #if !CYTHON_METH_FASTCALL
jpayne@69 21406 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 21407 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 21408 #else
jpayne@69 21409 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 21410 #endif
jpayne@69 21411 #endif
jpayne@69 21412 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 21413 {
jpayne@69 21414 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 21415 if (__pyx_kwds) {
jpayne@69 21416 Py_ssize_t kw_args;
jpayne@69 21417 switch (__pyx_nargs) {
jpayne@69 21418 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 21419 CYTHON_FALLTHROUGH;
jpayne@69 21420 case 0: break;
jpayne@69 21421 default: goto __pyx_L5_argtuple_error;
jpayne@69 21422 }
jpayne@69 21423 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 21424 switch (__pyx_nargs) {
jpayne@69 21425 case 0:
jpayne@69 21426 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 21427 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 21428 kw_args--;
jpayne@69 21429 }
jpayne@69 21430 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 21431 else goto __pyx_L5_argtuple_error;
jpayne@69 21432 }
jpayne@69 21433 if (unlikely(kw_args > 0)) {
jpayne@69 21434 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 21435 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)
jpayne@69 21436 }
jpayne@69 21437 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 21438 goto __pyx_L5_argtuple_error;
jpayne@69 21439 } else {
jpayne@69 21440 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 21441 }
jpayne@69 21442 __pyx_v___pyx_state = values[0];
jpayne@69 21443 }
jpayne@69 21444 goto __pyx_L6_skip;
jpayne@69 21445 __pyx_L5_argtuple_error:;
jpayne@69 21446 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 21447 __pyx_L6_skip:;
jpayne@69 21448 goto __pyx_L4_argument_unpacking_done;
jpayne@69 21449 __pyx_L3_error:;
jpayne@69 21450 {
jpayne@69 21451 Py_ssize_t __pyx_temp;
jpayne@69 21452 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 21453 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 21454 }
jpayne@69 21455 }
jpayne@69 21456 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 21457 __Pyx_RefNannyFinishContext();
jpayne@69 21458 return NULL;
jpayne@69 21459 __pyx_L4_argument_unpacking_done:;
jpayne@69 21460 __pyx_r = __pyx_pf_5pysam_9libctabix_19tabix_file_iterator_10__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 21461
jpayne@69 21462 /* function exit code */
jpayne@69 21463 {
jpayne@69 21464 Py_ssize_t __pyx_temp;
jpayne@69 21465 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 21466 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 21467 }
jpayne@69 21468 }
jpayne@69 21469 __Pyx_RefNannyFinishContext();
jpayne@69 21470 return __pyx_r;
jpayne@69 21471 }
jpayne@69 21472
jpayne@69 21473 static PyObject *__pyx_pf_5pysam_9libctabix_19tabix_file_iterator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 21474 PyObject *__pyx_r = NULL;
jpayne@69 21475 __Pyx_TraceDeclarations
jpayne@69 21476 __Pyx_RefNannyDeclarations
jpayne@69 21477 int __pyx_lineno = 0;
jpayne@69 21478 const char *__pyx_filename = NULL;
jpayne@69 21479 int __pyx_clineno = 0;
jpayne@69 21480 __Pyx_TraceFrameInit(__pyx_codeobj__47)
jpayne@69 21481 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 21482 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 21483
jpayne@69 21484 /* "(tree fragment)":4
jpayne@69 21485 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 21486 * def __setstate_cython__(self, __pyx_state):
jpayne@69 21487 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 21488 */
jpayne@69 21489 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 21490 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 21491
jpayne@69 21492 /* "(tree fragment)":3
jpayne@69 21493 * def __reduce_cython__(self):
jpayne@69 21494 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 21495 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 21496 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 21497 */
jpayne@69 21498
jpayne@69 21499 /* function exit code */
jpayne@69 21500 __pyx_L1_error:;
jpayne@69 21501 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 21502 __pyx_r = NULL;
jpayne@69 21503 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 21504 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 21505 __Pyx_RefNannyFinishContext();
jpayne@69 21506 return __pyx_r;
jpayne@69 21507 }
jpayne@69 21508
jpayne@69 21509 /* "pysam/libctabix.pyx":1183
jpayne@69 21510 * Permits the use of file-like objects for example from the gzip module.
jpayne@69 21511 * '''
jpayne@69 21512 * def __init__(self, infile, parser): # <<<<<<<<<<<<<<
jpayne@69 21513 *
jpayne@69 21514 * self.infile = infile
jpayne@69 21515 */
jpayne@69 21516
jpayne@69 21517 /* Python wrapper */
jpayne@69 21518 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_1__init__(PyObject *__pyx_self,
jpayne@69 21519 #if CYTHON_METH_FASTCALL
jpayne@69 21520 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 21521 #else
jpayne@69 21522 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 21523 #endif
jpayne@69 21524 ); /*proto*/
jpayne@69 21525 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_22tabix_generic_iterator___init__, "tabix_generic_iterator.__init__(self, infile, parser)");
jpayne@69 21526 static PyMethodDef __pyx_mdef_5pysam_9libctabix_22tabix_generic_iterator_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_22tabix_generic_iterator___init__};
jpayne@69 21527 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_1__init__(PyObject *__pyx_self,
jpayne@69 21528 #if CYTHON_METH_FASTCALL
jpayne@69 21529 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 21530 #else
jpayne@69 21531 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 21532 #endif
jpayne@69 21533 ) {
jpayne@69 21534 PyObject *__pyx_v_self = 0;
jpayne@69 21535 PyObject *__pyx_v_infile = 0;
jpayne@69 21536 PyObject *__pyx_v_parser = 0;
jpayne@69 21537 #if !CYTHON_METH_FASTCALL
jpayne@69 21538 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 21539 #endif
jpayne@69 21540 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 21541 PyObject* values[3] = {0,0,0};
jpayne@69 21542 int __pyx_lineno = 0;
jpayne@69 21543 const char *__pyx_filename = NULL;
jpayne@69 21544 int __pyx_clineno = 0;
jpayne@69 21545 PyObject *__pyx_r = 0;
jpayne@69 21546 __Pyx_RefNannyDeclarations
jpayne@69 21547 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@69 21548 #if !CYTHON_METH_FASTCALL
jpayne@69 21549 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 21550 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 21551 #else
jpayne@69 21552 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 21553 #endif
jpayne@69 21554 #endif
jpayne@69 21555 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 21556 {
jpayne@69 21557 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_infile,&__pyx_n_s_parser,0};
jpayne@69 21558 if (__pyx_kwds) {
jpayne@69 21559 Py_ssize_t kw_args;
jpayne@69 21560 switch (__pyx_nargs) {
jpayne@69 21561 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 21562 CYTHON_FALLTHROUGH;
jpayne@69 21563 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 21564 CYTHON_FALLTHROUGH;
jpayne@69 21565 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 21566 CYTHON_FALLTHROUGH;
jpayne@69 21567 case 0: break;
jpayne@69 21568 default: goto __pyx_L5_argtuple_error;
jpayne@69 21569 }
jpayne@69 21570 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 21571 switch (__pyx_nargs) {
jpayne@69 21572 case 0:
jpayne@69 21573 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
jpayne@69 21574 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 21575 kw_args--;
jpayne@69 21576 }
jpayne@69 21577 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@69 21578 else goto __pyx_L5_argtuple_error;
jpayne@69 21579 CYTHON_FALLTHROUGH;
jpayne@69 21580 case 1:
jpayne@69 21581 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_infile)) != 0)) {
jpayne@69 21582 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 21583 kw_args--;
jpayne@69 21584 }
jpayne@69 21585 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@69 21586 else {
jpayne@69 21587 __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@69 21588 }
jpayne@69 21589 CYTHON_FALLTHROUGH;
jpayne@69 21590 case 2:
jpayne@69 21591 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser)) != 0)) {
jpayne@69 21592 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@69 21593 kw_args--;
jpayne@69 21594 }
jpayne@69 21595 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@69 21596 else {
jpayne@69 21597 __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@69 21598 }
jpayne@69 21599 }
jpayne@69 21600 if (unlikely(kw_args > 0)) {
jpayne@69 21601 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 21602 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@69 21603 }
jpayne@69 21604 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@69 21605 goto __pyx_L5_argtuple_error;
jpayne@69 21606 } else {
jpayne@69 21607 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 21608 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 21609 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 21610 }
jpayne@69 21611 __pyx_v_self = values[0];
jpayne@69 21612 __pyx_v_infile = values[1];
jpayne@69 21613 __pyx_v_parser = values[2];
jpayne@69 21614 }
jpayne@69 21615 goto __pyx_L6_skip;
jpayne@69 21616 __pyx_L5_argtuple_error:;
jpayne@69 21617 __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@69 21618 __pyx_L6_skip:;
jpayne@69 21619 goto __pyx_L4_argument_unpacking_done;
jpayne@69 21620 __pyx_L3_error:;
jpayne@69 21621 {
jpayne@69 21622 Py_ssize_t __pyx_temp;
jpayne@69 21623 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 21624 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 21625 }
jpayne@69 21626 }
jpayne@69 21627 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 21628 __Pyx_RefNannyFinishContext();
jpayne@69 21629 return NULL;
jpayne@69 21630 __pyx_L4_argument_unpacking_done:;
jpayne@69 21631 __pyx_r = __pyx_pf_5pysam_9libctabix_22tabix_generic_iterator___init__(__pyx_self, __pyx_v_self, __pyx_v_infile, __pyx_v_parser);
jpayne@69 21632
jpayne@69 21633 /* function exit code */
jpayne@69 21634 {
jpayne@69 21635 Py_ssize_t __pyx_temp;
jpayne@69 21636 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 21637 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 21638 }
jpayne@69 21639 }
jpayne@69 21640 __Pyx_RefNannyFinishContext();
jpayne@69 21641 return __pyx_r;
jpayne@69 21642 }
jpayne@69 21643
jpayne@69 21644 static PyObject *__pyx_pf_5pysam_9libctabix_22tabix_generic_iterator___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_infile, PyObject *__pyx_v_parser) {
jpayne@69 21645 PyObject *__pyx_r = NULL;
jpayne@69 21646 __Pyx_TraceDeclarations
jpayne@69 21647 __Pyx_RefNannyDeclarations
jpayne@69 21648 PyObject *__pyx_t_1 = NULL;
jpayne@69 21649 PyObject *__pyx_t_2 = NULL;
jpayne@69 21650 int __pyx_t_3;
jpayne@69 21651 int __pyx_lineno = 0;
jpayne@69 21652 const char *__pyx_filename = NULL;
jpayne@69 21653 int __pyx_clineno = 0;
jpayne@69 21654 __Pyx_TraceFrameInit(__pyx_codeobj__48)
jpayne@69 21655 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@69 21656 __Pyx_TraceCall("__init__", __pyx_f[0], 1183, 0, __PYX_ERR(0, 1183, __pyx_L1_error));
jpayne@69 21657
jpayne@69 21658 /* "pysam/libctabix.pyx":1185
jpayne@69 21659 * def __init__(self, infile, parser):
jpayne@69 21660 *
jpayne@69 21661 * self.infile = infile # <<<<<<<<<<<<<<
jpayne@69 21662 * if self.infile.closed:
jpayne@69 21663 * raise ValueError("I/O operation on closed file.")
jpayne@69 21664 */
jpayne@69 21665 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_infile, __pyx_v_infile) < 0) __PYX_ERR(0, 1185, __pyx_L1_error)
jpayne@69 21666
jpayne@69 21667 /* "pysam/libctabix.pyx":1186
jpayne@69 21668 *
jpayne@69 21669 * self.infile = infile
jpayne@69 21670 * if self.infile.closed: # <<<<<<<<<<<<<<
jpayne@69 21671 * raise ValueError("I/O operation on closed file.")
jpayne@69 21672 * self.parser = parser
jpayne@69 21673 */
jpayne@69 21674 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_infile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error)
jpayne@69 21675 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 21676 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_closed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error)
jpayne@69 21677 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 21678 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 21679 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1186, __pyx_L1_error)
jpayne@69 21680 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 21681 if (unlikely(__pyx_t_3)) {
jpayne@69 21682
jpayne@69 21683 /* "pysam/libctabix.pyx":1187
jpayne@69 21684 * self.infile = infile
jpayne@69 21685 * if self.infile.closed:
jpayne@69 21686 * raise ValueError("I/O operation on closed file.") # <<<<<<<<<<<<<<
jpayne@69 21687 * self.parser = parser
jpayne@69 21688 *
jpayne@69 21689 */
jpayne@69 21690 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error)
jpayne@69 21691 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 21692 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 21693 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 21694 __PYX_ERR(0, 1187, __pyx_L1_error)
jpayne@69 21695
jpayne@69 21696 /* "pysam/libctabix.pyx":1186
jpayne@69 21697 *
jpayne@69 21698 * self.infile = infile
jpayne@69 21699 * if self.infile.closed: # <<<<<<<<<<<<<<
jpayne@69 21700 * raise ValueError("I/O operation on closed file.")
jpayne@69 21701 * self.parser = parser
jpayne@69 21702 */
jpayne@69 21703 }
jpayne@69 21704
jpayne@69 21705 /* "pysam/libctabix.pyx":1188
jpayne@69 21706 * if self.infile.closed:
jpayne@69 21707 * raise ValueError("I/O operation on closed file.")
jpayne@69 21708 * self.parser = parser # <<<<<<<<<<<<<<
jpayne@69 21709 *
jpayne@69 21710 * def __iter__(self):
jpayne@69 21711 */
jpayne@69 21712 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parser, __pyx_v_parser) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
jpayne@69 21713
jpayne@69 21714 /* "pysam/libctabix.pyx":1183
jpayne@69 21715 * Permits the use of file-like objects for example from the gzip module.
jpayne@69 21716 * '''
jpayne@69 21717 * def __init__(self, infile, parser): # <<<<<<<<<<<<<<
jpayne@69 21718 *
jpayne@69 21719 * self.infile = infile
jpayne@69 21720 */
jpayne@69 21721
jpayne@69 21722 /* function exit code */
jpayne@69 21723 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 21724 goto __pyx_L0;
jpayne@69 21725 __pyx_L1_error:;
jpayne@69 21726 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 21727 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 21728 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 21729 __pyx_r = NULL;
jpayne@69 21730 __pyx_L0:;
jpayne@69 21731 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 21732 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 21733 __Pyx_RefNannyFinishContext();
jpayne@69 21734 return __pyx_r;
jpayne@69 21735 }
jpayne@69 21736
jpayne@69 21737 /* "pysam/libctabix.pyx":1190
jpayne@69 21738 * self.parser = parser
jpayne@69 21739 *
jpayne@69 21740 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 21741 * return self
jpayne@69 21742 *
jpayne@69 21743 */
jpayne@69 21744
jpayne@69 21745 /* Python wrapper */
jpayne@69 21746 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_3__iter__(PyObject *__pyx_self,
jpayne@69 21747 #if CYTHON_METH_FASTCALL
jpayne@69 21748 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 21749 #else
jpayne@69 21750 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 21751 #endif
jpayne@69 21752 ); /*proto*/
jpayne@69 21753 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_22tabix_generic_iterator_2__iter__, "tabix_generic_iterator.__iter__(self)");
jpayne@69 21754 static PyMethodDef __pyx_mdef_5pysam_9libctabix_22tabix_generic_iterator_3__iter__ = {"__iter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_3__iter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_22tabix_generic_iterator_2__iter__};
jpayne@69 21755 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_3__iter__(PyObject *__pyx_self,
jpayne@69 21756 #if CYTHON_METH_FASTCALL
jpayne@69 21757 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 21758 #else
jpayne@69 21759 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 21760 #endif
jpayne@69 21761 ) {
jpayne@69 21762 PyObject *__pyx_v_self = 0;
jpayne@69 21763 #if !CYTHON_METH_FASTCALL
jpayne@69 21764 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 21765 #endif
jpayne@69 21766 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 21767 PyObject* values[1] = {0};
jpayne@69 21768 int __pyx_lineno = 0;
jpayne@69 21769 const char *__pyx_filename = NULL;
jpayne@69 21770 int __pyx_clineno = 0;
jpayne@69 21771 PyObject *__pyx_r = 0;
jpayne@69 21772 __Pyx_RefNannyDeclarations
jpayne@69 21773 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
jpayne@69 21774 #if !CYTHON_METH_FASTCALL
jpayne@69 21775 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 21776 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 21777 #else
jpayne@69 21778 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 21779 #endif
jpayne@69 21780 #endif
jpayne@69 21781 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 21782 {
jpayne@69 21783 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
jpayne@69 21784 if (__pyx_kwds) {
jpayne@69 21785 Py_ssize_t kw_args;
jpayne@69 21786 switch (__pyx_nargs) {
jpayne@69 21787 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 21788 CYTHON_FALLTHROUGH;
jpayne@69 21789 case 0: break;
jpayne@69 21790 default: goto __pyx_L5_argtuple_error;
jpayne@69 21791 }
jpayne@69 21792 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 21793 switch (__pyx_nargs) {
jpayne@69 21794 case 0:
jpayne@69 21795 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
jpayne@69 21796 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 21797 kw_args--;
jpayne@69 21798 }
jpayne@69 21799 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1190, __pyx_L3_error)
jpayne@69 21800 else goto __pyx_L5_argtuple_error;
jpayne@69 21801 }
jpayne@69 21802 if (unlikely(kw_args > 0)) {
jpayne@69 21803 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 21804 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__iter__") < 0)) __PYX_ERR(0, 1190, __pyx_L3_error)
jpayne@69 21805 }
jpayne@69 21806 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 21807 goto __pyx_L5_argtuple_error;
jpayne@69 21808 } else {
jpayne@69 21809 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 21810 }
jpayne@69 21811 __pyx_v_self = values[0];
jpayne@69 21812 }
jpayne@69 21813 goto __pyx_L6_skip;
jpayne@69 21814 __pyx_L5_argtuple_error:;
jpayne@69 21815 __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1190, __pyx_L3_error)
jpayne@69 21816 __pyx_L6_skip:;
jpayne@69 21817 goto __pyx_L4_argument_unpacking_done;
jpayne@69 21818 __pyx_L3_error:;
jpayne@69 21819 {
jpayne@69 21820 Py_ssize_t __pyx_temp;
jpayne@69 21821 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 21822 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 21823 }
jpayne@69 21824 }
jpayne@69 21825 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 21826 __Pyx_RefNannyFinishContext();
jpayne@69 21827 return NULL;
jpayne@69 21828 __pyx_L4_argument_unpacking_done:;
jpayne@69 21829 __pyx_r = __pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_2__iter__(__pyx_self, __pyx_v_self);
jpayne@69 21830
jpayne@69 21831 /* function exit code */
jpayne@69 21832 {
jpayne@69 21833 Py_ssize_t __pyx_temp;
jpayne@69 21834 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 21835 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 21836 }
jpayne@69 21837 }
jpayne@69 21838 __Pyx_RefNannyFinishContext();
jpayne@69 21839 return __pyx_r;
jpayne@69 21840 }
jpayne@69 21841
jpayne@69 21842 static PyObject *__pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
jpayne@69 21843 PyObject *__pyx_r = NULL;
jpayne@69 21844 __Pyx_TraceDeclarations
jpayne@69 21845 __Pyx_RefNannyDeclarations
jpayne@69 21846 int __pyx_lineno = 0;
jpayne@69 21847 const char *__pyx_filename = NULL;
jpayne@69 21848 int __pyx_clineno = 0;
jpayne@69 21849 __Pyx_TraceFrameInit(__pyx_codeobj__49)
jpayne@69 21850 __Pyx_RefNannySetupContext("__iter__", 1);
jpayne@69 21851 __Pyx_TraceCall("__iter__", __pyx_f[0], 1190, 0, __PYX_ERR(0, 1190, __pyx_L1_error));
jpayne@69 21852
jpayne@69 21853 /* "pysam/libctabix.pyx":1191
jpayne@69 21854 *
jpayne@69 21855 * def __iter__(self):
jpayne@69 21856 * return self # <<<<<<<<<<<<<<
jpayne@69 21857 *
jpayne@69 21858 * # cython version - required for python 3
jpayne@69 21859 */
jpayne@69 21860 __Pyx_XDECREF(__pyx_r);
jpayne@69 21861 __Pyx_INCREF(__pyx_v_self);
jpayne@69 21862 __pyx_r = __pyx_v_self;
jpayne@69 21863 goto __pyx_L0;
jpayne@69 21864
jpayne@69 21865 /* "pysam/libctabix.pyx":1190
jpayne@69 21866 * self.parser = parser
jpayne@69 21867 *
jpayne@69 21868 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 21869 * return self
jpayne@69 21870 *
jpayne@69 21871 */
jpayne@69 21872
jpayne@69 21873 /* function exit code */
jpayne@69 21874 __pyx_L1_error:;
jpayne@69 21875 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 21876 __pyx_r = NULL;
jpayne@69 21877 __pyx_L0:;
jpayne@69 21878 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 21879 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 21880 __Pyx_RefNannyFinishContext();
jpayne@69 21881 return __pyx_r;
jpayne@69 21882 }
jpayne@69 21883
jpayne@69 21884 /* "pysam/libctabix.pyx":1194
jpayne@69 21885 *
jpayne@69 21886 * # cython version - required for python 3
jpayne@69 21887 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 21888 *
jpayne@69 21889 * cdef char * b
jpayne@69 21890 */
jpayne@69 21891
jpayne@69 21892 /* Python wrapper */
jpayne@69 21893 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_5__next__(PyObject *__pyx_self,
jpayne@69 21894 #if CYTHON_METH_FASTCALL
jpayne@69 21895 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 21896 #else
jpayne@69 21897 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 21898 #endif
jpayne@69 21899 ); /*proto*/
jpayne@69 21900 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_22tabix_generic_iterator_4__next__, "tabix_generic_iterator.__next__(self)");
jpayne@69 21901 static PyMethodDef __pyx_mdef_5pysam_9libctabix_22tabix_generic_iterator_5__next__ = {"__next__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_5__next__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_22tabix_generic_iterator_4__next__};
jpayne@69 21902 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_5__next__(PyObject *__pyx_self,
jpayne@69 21903 #if CYTHON_METH_FASTCALL
jpayne@69 21904 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 21905 #else
jpayne@69 21906 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 21907 #endif
jpayne@69 21908 ) {
jpayne@69 21909 PyObject *__pyx_v_self = 0;
jpayne@69 21910 #if !CYTHON_METH_FASTCALL
jpayne@69 21911 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 21912 #endif
jpayne@69 21913 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 21914 PyObject* values[1] = {0};
jpayne@69 21915 int __pyx_lineno = 0;
jpayne@69 21916 const char *__pyx_filename = NULL;
jpayne@69 21917 int __pyx_clineno = 0;
jpayne@69 21918 PyObject *__pyx_r = 0;
jpayne@69 21919 __Pyx_RefNannyDeclarations
jpayne@69 21920 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@69 21921 #if !CYTHON_METH_FASTCALL
jpayne@69 21922 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 21923 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 21924 #else
jpayne@69 21925 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 21926 #endif
jpayne@69 21927 #endif
jpayne@69 21928 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 21929 {
jpayne@69 21930 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
jpayne@69 21931 if (__pyx_kwds) {
jpayne@69 21932 Py_ssize_t kw_args;
jpayne@69 21933 switch (__pyx_nargs) {
jpayne@69 21934 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 21935 CYTHON_FALLTHROUGH;
jpayne@69 21936 case 0: break;
jpayne@69 21937 default: goto __pyx_L5_argtuple_error;
jpayne@69 21938 }
jpayne@69 21939 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 21940 switch (__pyx_nargs) {
jpayne@69 21941 case 0:
jpayne@69 21942 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
jpayne@69 21943 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 21944 kw_args--;
jpayne@69 21945 }
jpayne@69 21946 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1194, __pyx_L3_error)
jpayne@69 21947 else goto __pyx_L5_argtuple_error;
jpayne@69 21948 }
jpayne@69 21949 if (unlikely(kw_args > 0)) {
jpayne@69 21950 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 21951 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__next__") < 0)) __PYX_ERR(0, 1194, __pyx_L3_error)
jpayne@69 21952 }
jpayne@69 21953 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 21954 goto __pyx_L5_argtuple_error;
jpayne@69 21955 } else {
jpayne@69 21956 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 21957 }
jpayne@69 21958 __pyx_v_self = values[0];
jpayne@69 21959 }
jpayne@69 21960 goto __pyx_L6_skip;
jpayne@69 21961 __pyx_L5_argtuple_error:;
jpayne@69 21962 __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1194, __pyx_L3_error)
jpayne@69 21963 __pyx_L6_skip:;
jpayne@69 21964 goto __pyx_L4_argument_unpacking_done;
jpayne@69 21965 __pyx_L3_error:;
jpayne@69 21966 {
jpayne@69 21967 Py_ssize_t __pyx_temp;
jpayne@69 21968 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 21969 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 21970 }
jpayne@69 21971 }
jpayne@69 21972 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 21973 __Pyx_RefNannyFinishContext();
jpayne@69 21974 return NULL;
jpayne@69 21975 __pyx_L4_argument_unpacking_done:;
jpayne@69 21976 __pyx_r = __pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_4__next__(__pyx_self, __pyx_v_self);
jpayne@69 21977
jpayne@69 21978 /* function exit code */
jpayne@69 21979 {
jpayne@69 21980 Py_ssize_t __pyx_temp;
jpayne@69 21981 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 21982 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 21983 }
jpayne@69 21984 }
jpayne@69 21985 __Pyx_RefNannyFinishContext();
jpayne@69 21986 return __pyx_r;
jpayne@69 21987 }
jpayne@69 21988
jpayne@69 21989 static PyObject *__pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_4__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
jpayne@69 21990 char *__pyx_v_b;
jpayne@69 21991 char *__pyx_v_cpy;
jpayne@69 21992 size_t __pyx_v_nbytes;
jpayne@69 21993 PyObject *__pyx_v_encoding = NULL;
jpayne@69 21994 PyObject *__pyx_v_line = NULL;
jpayne@69 21995 PyObject *__pyx_v_s = NULL;
jpayne@69 21996 PyObject *__pyx_v_bytes_cpy = NULL;
jpayne@69 21997 PyObject *__pyx_r = NULL;
jpayne@69 21998 __Pyx_TraceDeclarations
jpayne@69 21999 __Pyx_RefNannyDeclarations
jpayne@69 22000 PyObject *__pyx_t_1 = NULL;
jpayne@69 22001 PyObject *__pyx_t_2 = NULL;
jpayne@69 22002 PyObject *__pyx_t_3 = NULL;
jpayne@69 22003 unsigned int __pyx_t_4;
jpayne@69 22004 int __pyx_t_5;
jpayne@69 22005 int __pyx_t_6;
jpayne@69 22006 struct __pyx_opt_args_5pysam_9libcutils_force_bytes __pyx_t_7;
jpayne@69 22007 char *__pyx_t_8;
jpayne@69 22008 Py_ssize_t __pyx_t_9;
jpayne@69 22009 PyObject *__pyx_t_10 = NULL;
jpayne@69 22010 PyObject *__pyx_t_11 = NULL;
jpayne@69 22011 int __pyx_lineno = 0;
jpayne@69 22012 const char *__pyx_filename = NULL;
jpayne@69 22013 int __pyx_clineno = 0;
jpayne@69 22014 __Pyx_TraceFrameInit(__pyx_codeobj__50)
jpayne@69 22015 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@69 22016 __Pyx_TraceCall("__next__", __pyx_f[0], 1194, 0, __PYX_ERR(0, 1194, __pyx_L1_error));
jpayne@69 22017
jpayne@69 22018 /* "pysam/libctabix.pyx":1200
jpayne@69 22019 * cdef size_t nbytes
jpayne@69 22020 *
jpayne@69 22021 * encoding = self.parser.get_encoding() # <<<<<<<<<<<<<<
jpayne@69 22022 *
jpayne@69 22023 * # note that GzipFile.close() does not close the file
jpayne@69 22024 */
jpayne@69 22025 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1200, __pyx_L1_error)
jpayne@69 22026 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 22027 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error)
jpayne@69 22028 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 22029 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 22030 __pyx_t_2 = NULL;
jpayne@69 22031 __pyx_t_4 = 0;
jpayne@69 22032 #if CYTHON_UNPACK_METHODS
jpayne@69 22033 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 22034 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 22035 if (likely(__pyx_t_2)) {
jpayne@69 22036 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 22037 __Pyx_INCREF(__pyx_t_2);
jpayne@69 22038 __Pyx_INCREF(function);
jpayne@69 22039 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 22040 __pyx_t_4 = 1;
jpayne@69 22041 }
jpayne@69 22042 }
jpayne@69 22043 #endif
jpayne@69 22044 {
jpayne@69 22045 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
jpayne@69 22046 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 22047 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 22048 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error)
jpayne@69 22049 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 22050 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 22051 }
jpayne@69 22052 __pyx_v_encoding = __pyx_t_1;
jpayne@69 22053 __pyx_t_1 = 0;
jpayne@69 22054
jpayne@69 22055 /* "pysam/libctabix.pyx":1204
jpayne@69 22056 * # note that GzipFile.close() does not close the file
jpayne@69 22057 * # reading is still possible.
jpayne@69 22058 * if self.infile.closed: # <<<<<<<<<<<<<<
jpayne@69 22059 * raise ValueError("I/O operation on closed file.")
jpayne@69 22060 *
jpayne@69 22061 */
jpayne@69 22062 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_infile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
jpayne@69 22063 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 22064 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_closed); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
jpayne@69 22065 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 22066 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 22067 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1204, __pyx_L1_error)
jpayne@69 22068 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 22069 if (unlikely(__pyx_t_5)) {
jpayne@69 22070
jpayne@69 22071 /* "pysam/libctabix.pyx":1205
jpayne@69 22072 * # reading is still possible.
jpayne@69 22073 * if self.infile.closed:
jpayne@69 22074 * raise ValueError("I/O operation on closed file.") # <<<<<<<<<<<<<<
jpayne@69 22075 *
jpayne@69 22076 * while 1:
jpayne@69 22077 */
jpayne@69 22078 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1205, __pyx_L1_error)
jpayne@69 22079 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 22080 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 22081 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 22082 __PYX_ERR(0, 1205, __pyx_L1_error)
jpayne@69 22083
jpayne@69 22084 /* "pysam/libctabix.pyx":1204
jpayne@69 22085 * # note that GzipFile.close() does not close the file
jpayne@69 22086 * # reading is still possible.
jpayne@69 22087 * if self.infile.closed: # <<<<<<<<<<<<<<
jpayne@69 22088 * raise ValueError("I/O operation on closed file.")
jpayne@69 22089 *
jpayne@69 22090 */
jpayne@69 22091 }
jpayne@69 22092
jpayne@69 22093 /* "pysam/libctabix.pyx":1207
jpayne@69 22094 * raise ValueError("I/O operation on closed file.")
jpayne@69 22095 *
jpayne@69 22096 * while 1: # <<<<<<<<<<<<<<
jpayne@69 22097 *
jpayne@69 22098 * line = self.infile.readline()
jpayne@69 22099 */
jpayne@69 22100 while (1) {
jpayne@69 22101
jpayne@69 22102 /* "pysam/libctabix.pyx":1209
jpayne@69 22103 * while 1:
jpayne@69 22104 *
jpayne@69 22105 * line = self.infile.readline() # <<<<<<<<<<<<<<
jpayne@69 22106 * if not line:
jpayne@69 22107 * break
jpayne@69 22108 */
jpayne@69 22109 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_infile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1209, __pyx_L1_error)
jpayne@69 22110 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 22111 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_readline); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1209, __pyx_L1_error)
jpayne@69 22112 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 22113 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 22114 __pyx_t_1 = NULL;
jpayne@69 22115 __pyx_t_4 = 0;
jpayne@69 22116 #if CYTHON_UNPACK_METHODS
jpayne@69 22117 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 22118 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 22119 if (likely(__pyx_t_1)) {
jpayne@69 22120 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 22121 __Pyx_INCREF(__pyx_t_1);
jpayne@69 22122 __Pyx_INCREF(function);
jpayne@69 22123 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 22124 __pyx_t_4 = 1;
jpayne@69 22125 }
jpayne@69 22126 }
jpayne@69 22127 #endif
jpayne@69 22128 {
jpayne@69 22129 PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
jpayne@69 22130 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 22131 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 22132 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1209, __pyx_L1_error)
jpayne@69 22133 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 22134 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 22135 }
jpayne@69 22136 __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3);
jpayne@69 22137 __pyx_t_3 = 0;
jpayne@69 22138
jpayne@69 22139 /* "pysam/libctabix.pyx":1210
jpayne@69 22140 *
jpayne@69 22141 * line = self.infile.readline()
jpayne@69 22142 * if not line: # <<<<<<<<<<<<<<
jpayne@69 22143 * break
jpayne@69 22144 *
jpayne@69 22145 */
jpayne@69 22146 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_line); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1210, __pyx_L1_error)
jpayne@69 22147 __pyx_t_6 = (!__pyx_t_5);
jpayne@69 22148 if (__pyx_t_6) {
jpayne@69 22149
jpayne@69 22150 /* "pysam/libctabix.pyx":1211
jpayne@69 22151 * line = self.infile.readline()
jpayne@69 22152 * if not line:
jpayne@69 22153 * break # <<<<<<<<<<<<<<
jpayne@69 22154 *
jpayne@69 22155 * s = force_bytes(line, encoding)
jpayne@69 22156 */
jpayne@69 22157 goto __pyx_L5_break;
jpayne@69 22158
jpayne@69 22159 /* "pysam/libctabix.pyx":1210
jpayne@69 22160 *
jpayne@69 22161 * line = self.infile.readline()
jpayne@69 22162 * if not line: # <<<<<<<<<<<<<<
jpayne@69 22163 * break
jpayne@69 22164 *
jpayne@69 22165 */
jpayne@69 22166 }
jpayne@69 22167
jpayne@69 22168 /* "pysam/libctabix.pyx":1213
jpayne@69 22169 * break
jpayne@69 22170 *
jpayne@69 22171 * s = force_bytes(line, encoding) # <<<<<<<<<<<<<<
jpayne@69 22172 * b = s
jpayne@69 22173 * nbytes = len(line)
jpayne@69 22174 */
jpayne@69 22175 __pyx_t_7.__pyx_n = 1;
jpayne@69 22176 __pyx_t_7.encoding = __pyx_v_encoding;
jpayne@69 22177 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_line, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1213, __pyx_L1_error)
jpayne@69 22178 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 22179 __Pyx_XDECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_3));
jpayne@69 22180 __pyx_t_3 = 0;
jpayne@69 22181
jpayne@69 22182 /* "pysam/libctabix.pyx":1214
jpayne@69 22183 *
jpayne@69 22184 * s = force_bytes(line, encoding)
jpayne@69 22185 * b = s # <<<<<<<<<<<<<<
jpayne@69 22186 * nbytes = len(line)
jpayne@69 22187 * assert b[nbytes] == b'\0'
jpayne@69 22188 */
jpayne@69 22189 if (unlikely(__pyx_v_s == Py_None)) {
jpayne@69 22190 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@69 22191 __PYX_ERR(0, 1214, __pyx_L1_error)
jpayne@69 22192 }
jpayne@69 22193 __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_s); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 1214, __pyx_L1_error)
jpayne@69 22194 __pyx_v_b = __pyx_t_8;
jpayne@69 22195
jpayne@69 22196 /* "pysam/libctabix.pyx":1215
jpayne@69 22197 * s = force_bytes(line, encoding)
jpayne@69 22198 * b = s
jpayne@69 22199 * nbytes = len(line) # <<<<<<<<<<<<<<
jpayne@69 22200 * assert b[nbytes] == b'\0'
jpayne@69 22201 *
jpayne@69 22202 */
jpayne@69 22203 __pyx_t_9 = PyObject_Length(__pyx_v_line); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1215, __pyx_L1_error)
jpayne@69 22204 __pyx_v_nbytes = __pyx_t_9;
jpayne@69 22205
jpayne@69 22206 /* "pysam/libctabix.pyx":1216
jpayne@69 22207 * b = s
jpayne@69 22208 * nbytes = len(line)
jpayne@69 22209 * assert b[nbytes] == b'\0' # <<<<<<<<<<<<<<
jpayne@69 22210 *
jpayne@69 22211 * # skip comments
jpayne@69 22212 */
jpayne@69 22213 #ifndef CYTHON_WITHOUT_ASSERTIONS
jpayne@69 22214 if (unlikely(__pyx_assertions_enabled())) {
jpayne@69 22215 __pyx_t_6 = ((__pyx_v_b[__pyx_v_nbytes]) == '\x00');
jpayne@69 22216 if (unlikely(!__pyx_t_6)) {
jpayne@69 22217 __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
jpayne@69 22218 __PYX_ERR(0, 1216, __pyx_L1_error)
jpayne@69 22219 }
jpayne@69 22220 }
jpayne@69 22221 #else
jpayne@69 22222 if ((1)); else __PYX_ERR(0, 1216, __pyx_L1_error)
jpayne@69 22223 #endif
jpayne@69 22224
jpayne@69 22225 /* "pysam/libctabix.pyx":1219
jpayne@69 22226 *
jpayne@69 22227 * # skip comments
jpayne@69 22228 * if b[0] == b'#': # <<<<<<<<<<<<<<
jpayne@69 22229 * continue
jpayne@69 22230 *
jpayne@69 22231 */
jpayne@69 22232 __pyx_t_6 = ((__pyx_v_b[0]) == '#');
jpayne@69 22233 if (__pyx_t_6) {
jpayne@69 22234
jpayne@69 22235 /* "pysam/libctabix.pyx":1220
jpayne@69 22236 * # skip comments
jpayne@69 22237 * if b[0] == b'#':
jpayne@69 22238 * continue # <<<<<<<<<<<<<<
jpayne@69 22239 *
jpayne@69 22240 * # skip empty lines
jpayne@69 22241 */
jpayne@69 22242 goto __pyx_L4_continue;
jpayne@69 22243
jpayne@69 22244 /* "pysam/libctabix.pyx":1219
jpayne@69 22245 *
jpayne@69 22246 * # skip comments
jpayne@69 22247 * if b[0] == b'#': # <<<<<<<<<<<<<<
jpayne@69 22248 * continue
jpayne@69 22249 *
jpayne@69 22250 */
jpayne@69 22251 }
jpayne@69 22252
jpayne@69 22253 /* "pysam/libctabix.pyx":1223
jpayne@69 22254 *
jpayne@69 22255 * # skip empty lines
jpayne@69 22256 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r': # <<<<<<<<<<<<<<
jpayne@69 22257 * continue
jpayne@69 22258 *
jpayne@69 22259 */
jpayne@69 22260 __pyx_t_5 = ((__pyx_v_b[0]) == '\x00');
jpayne@69 22261 if (!__pyx_t_5) {
jpayne@69 22262 } else {
jpayne@69 22263 __pyx_t_6 = __pyx_t_5;
jpayne@69 22264 goto __pyx_L9_bool_binop_done;
jpayne@69 22265 }
jpayne@69 22266 __pyx_t_5 = ((__pyx_v_b[0]) == '\n');
jpayne@69 22267 if (!__pyx_t_5) {
jpayne@69 22268 } else {
jpayne@69 22269 __pyx_t_6 = __pyx_t_5;
jpayne@69 22270 goto __pyx_L9_bool_binop_done;
jpayne@69 22271 }
jpayne@69 22272 __pyx_t_5 = ((__pyx_v_b[0]) == '\r');
jpayne@69 22273 __pyx_t_6 = __pyx_t_5;
jpayne@69 22274 __pyx_L9_bool_binop_done:;
jpayne@69 22275 if (__pyx_t_6) {
jpayne@69 22276
jpayne@69 22277 /* "pysam/libctabix.pyx":1224
jpayne@69 22278 * # skip empty lines
jpayne@69 22279 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r':
jpayne@69 22280 * continue # <<<<<<<<<<<<<<
jpayne@69 22281 *
jpayne@69 22282 * # make sure that entry is complete
jpayne@69 22283 */
jpayne@69 22284 goto __pyx_L4_continue;
jpayne@69 22285
jpayne@69 22286 /* "pysam/libctabix.pyx":1223
jpayne@69 22287 *
jpayne@69 22288 * # skip empty lines
jpayne@69 22289 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r': # <<<<<<<<<<<<<<
jpayne@69 22290 * continue
jpayne@69 22291 *
jpayne@69 22292 */
jpayne@69 22293 }
jpayne@69 22294
jpayne@69 22295 /* "pysam/libctabix.pyx":1227
jpayne@69 22296 *
jpayne@69 22297 * # make sure that entry is complete
jpayne@69 22298 * if b[nbytes-1] != b'\n' and b[nbytes-1] != b'\r': # <<<<<<<<<<<<<<
jpayne@69 22299 * raise ValueError("incomplete line at %s" % line)
jpayne@69 22300 *
jpayne@69 22301 */
jpayne@69 22302 __pyx_t_5 = ((__pyx_v_b[(__pyx_v_nbytes - 1)]) != '\n');
jpayne@69 22303 if (__pyx_t_5) {
jpayne@69 22304 } else {
jpayne@69 22305 __pyx_t_6 = __pyx_t_5;
jpayne@69 22306 goto __pyx_L13_bool_binop_done;
jpayne@69 22307 }
jpayne@69 22308 __pyx_t_5 = ((__pyx_v_b[(__pyx_v_nbytes - 1)]) != '\r');
jpayne@69 22309 __pyx_t_6 = __pyx_t_5;
jpayne@69 22310 __pyx_L13_bool_binop_done:;
jpayne@69 22311 if (unlikely(__pyx_t_6)) {
jpayne@69 22312
jpayne@69 22313 /* "pysam/libctabix.pyx":1228
jpayne@69 22314 * # make sure that entry is complete
jpayne@69 22315 * if b[nbytes-1] != b'\n' and b[nbytes-1] != b'\r':
jpayne@69 22316 * raise ValueError("incomplete line at %s" % line) # <<<<<<<<<<<<<<
jpayne@69 22317 *
jpayne@69 22318 * bytes_cpy = <bytes> b
jpayne@69 22319 */
jpayne@69 22320 __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_incomplete_line_at_s, __pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1228, __pyx_L1_error)
jpayne@69 22321 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 22322 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L1_error)
jpayne@69 22323 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 22324 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 22325 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 22326 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 22327 __PYX_ERR(0, 1228, __pyx_L1_error)
jpayne@69 22328
jpayne@69 22329 /* "pysam/libctabix.pyx":1227
jpayne@69 22330 *
jpayne@69 22331 * # make sure that entry is complete
jpayne@69 22332 * if b[nbytes-1] != b'\n' and b[nbytes-1] != b'\r': # <<<<<<<<<<<<<<
jpayne@69 22333 * raise ValueError("incomplete line at %s" % line)
jpayne@69 22334 *
jpayne@69 22335 */
jpayne@69 22336 }
jpayne@69 22337
jpayne@69 22338 /* "pysam/libctabix.pyx":1230
jpayne@69 22339 * raise ValueError("incomplete line at %s" % line)
jpayne@69 22340 *
jpayne@69 22341 * bytes_cpy = <bytes> b # <<<<<<<<<<<<<<
jpayne@69 22342 * cpy = <char *> bytes_cpy
jpayne@69 22343 *
jpayne@69 22344 */
jpayne@69 22345 __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1230, __pyx_L1_error)
jpayne@69 22346 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 22347 __pyx_t_3 = __pyx_t_2;
jpayne@69 22348 __Pyx_INCREF(__pyx_t_3);
jpayne@69 22349 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 22350 __pyx_v_bytes_cpy = ((PyObject*)__pyx_t_3);
jpayne@69 22351 __pyx_t_3 = 0;
jpayne@69 22352
jpayne@69 22353 /* "pysam/libctabix.pyx":1231
jpayne@69 22354 *
jpayne@69 22355 * bytes_cpy = <bytes> b
jpayne@69 22356 * cpy = <char *> bytes_cpy # <<<<<<<<<<<<<<
jpayne@69 22357 *
jpayne@69 22358 * return self.parser(cpy, nbytes)
jpayne@69 22359 */
jpayne@69 22360 if (unlikely(__pyx_v_bytes_cpy == Py_None)) {
jpayne@69 22361 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@69 22362 __PYX_ERR(0, 1231, __pyx_L1_error)
jpayne@69 22363 }
jpayne@69 22364 __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_bytes_cpy); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L1_error)
jpayne@69 22365 __pyx_v_cpy = ((char *)__pyx_t_8);
jpayne@69 22366
jpayne@69 22367 /* "pysam/libctabix.pyx":1233
jpayne@69 22368 * cpy = <char *> bytes_cpy
jpayne@69 22369 *
jpayne@69 22370 * return self.parser(cpy, nbytes) # <<<<<<<<<<<<<<
jpayne@69 22371 *
jpayne@69 22372 * raise StopIteration
jpayne@69 22373 */
jpayne@69 22374 __Pyx_XDECREF(__pyx_r);
jpayne@69 22375 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L1_error)
jpayne@69 22376 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 22377 __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_cpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L1_error)
jpayne@69 22378 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 22379 __pyx_t_10 = __Pyx_PyInt_FromSize_t(__pyx_v_nbytes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1233, __pyx_L1_error)
jpayne@69 22380 __Pyx_GOTREF(__pyx_t_10);
jpayne@69 22381 __pyx_t_11 = NULL;
jpayne@69 22382 __pyx_t_4 = 0;
jpayne@69 22383 #if CYTHON_UNPACK_METHODS
jpayne@69 22384 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 22385 __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 22386 if (likely(__pyx_t_11)) {
jpayne@69 22387 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 22388 __Pyx_INCREF(__pyx_t_11);
jpayne@69 22389 __Pyx_INCREF(function);
jpayne@69 22390 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 22391 __pyx_t_4 = 1;
jpayne@69 22392 }
jpayne@69 22393 }
jpayne@69 22394 #endif
jpayne@69 22395 {
jpayne@69 22396 PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_1, __pyx_t_10};
jpayne@69 22397 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
jpayne@69 22398 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
jpayne@69 22399 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 22400 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
jpayne@69 22401 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
jpayne@69 22402 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 22403 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 22404 }
jpayne@69 22405 __pyx_r = __pyx_t_3;
jpayne@69 22406 __pyx_t_3 = 0;
jpayne@69 22407 goto __pyx_L0;
jpayne@69 22408 __pyx_L4_continue:;
jpayne@69 22409 }
jpayne@69 22410 __pyx_L5_break:;
jpayne@69 22411
jpayne@69 22412 /* "pysam/libctabix.pyx":1235
jpayne@69 22413 * return self.parser(cpy, nbytes)
jpayne@69 22414 *
jpayne@69 22415 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@69 22416 *
jpayne@69 22417 *
jpayne@69 22418 */
jpayne@69 22419 __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
jpayne@69 22420 __PYX_ERR(0, 1235, __pyx_L1_error)
jpayne@69 22421
jpayne@69 22422 /* "pysam/libctabix.pyx":1194
jpayne@69 22423 *
jpayne@69 22424 * # cython version - required for python 3
jpayne@69 22425 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 22426 *
jpayne@69 22427 * cdef char * b
jpayne@69 22428 */
jpayne@69 22429
jpayne@69 22430 /* function exit code */
jpayne@69 22431 __pyx_L1_error:;
jpayne@69 22432 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 22433 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 22434 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 22435 __Pyx_XDECREF(__pyx_t_10);
jpayne@69 22436 __Pyx_XDECREF(__pyx_t_11);
jpayne@69 22437 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 22438 __pyx_r = NULL;
jpayne@69 22439 __pyx_L0:;
jpayne@69 22440 __Pyx_XDECREF(__pyx_v_encoding);
jpayne@69 22441 __Pyx_XDECREF(__pyx_v_line);
jpayne@69 22442 __Pyx_XDECREF(__pyx_v_s);
jpayne@69 22443 __Pyx_XDECREF(__pyx_v_bytes_cpy);
jpayne@69 22444 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 22445 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 22446 __Pyx_RefNannyFinishContext();
jpayne@69 22447 return __pyx_r;
jpayne@69 22448 }
jpayne@69 22449
jpayne@69 22450 /* "pysam/libctabix.pyx":1238
jpayne@69 22451 *
jpayne@69 22452 *
jpayne@69 22453 * def tabix_iterator(infile, parser): # <<<<<<<<<<<<<<
jpayne@69 22454 * """return an iterator over all entries in a file.
jpayne@69 22455 *
jpayne@69 22456 */
jpayne@69 22457
jpayne@69 22458 /* Python wrapper */
jpayne@69 22459 static PyObject *__pyx_pw_5pysam_9libctabix_5tabix_iterator(PyObject *__pyx_self,
jpayne@69 22460 #if CYTHON_METH_FASTCALL
jpayne@69 22461 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 22462 #else
jpayne@69 22463 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 22464 #endif
jpayne@69 22465 ); /*proto*/
jpayne@69 22466 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_4tabix_iterator, "tabix_iterator(infile, parser)\nreturn an iterator over all entries in a file.\n \n Results are returned parsed as specified by the *parser*. If\n *parser* is None, the results are returned as an unparsed string.\n Otherwise, *parser* is assumed to be a functor that will return\n parsed data (see for example :class:`~pysam.asTuple` and\n :class:`~pysam.asGTF`).\n\n ");
jpayne@69 22467 static PyMethodDef __pyx_mdef_5pysam_9libctabix_5tabix_iterator = {"tabix_iterator", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5tabix_iterator, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_4tabix_iterator};
jpayne@69 22468 static PyObject *__pyx_pw_5pysam_9libctabix_5tabix_iterator(PyObject *__pyx_self,
jpayne@69 22469 #if CYTHON_METH_FASTCALL
jpayne@69 22470 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 22471 #else
jpayne@69 22472 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 22473 #endif
jpayne@69 22474 ) {
jpayne@69 22475 PyObject *__pyx_v_infile = 0;
jpayne@69 22476 PyObject *__pyx_v_parser = 0;
jpayne@69 22477 #if !CYTHON_METH_FASTCALL
jpayne@69 22478 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 22479 #endif
jpayne@69 22480 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 22481 PyObject* values[2] = {0,0};
jpayne@69 22482 int __pyx_lineno = 0;
jpayne@69 22483 const char *__pyx_filename = NULL;
jpayne@69 22484 int __pyx_clineno = 0;
jpayne@69 22485 PyObject *__pyx_r = 0;
jpayne@69 22486 __Pyx_RefNannyDeclarations
jpayne@69 22487 __Pyx_RefNannySetupContext("tabix_iterator (wrapper)", 0);
jpayne@69 22488 #if !CYTHON_METH_FASTCALL
jpayne@69 22489 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 22490 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 22491 #else
jpayne@69 22492 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 22493 #endif
jpayne@69 22494 #endif
jpayne@69 22495 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 22496 {
jpayne@69 22497 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_infile,&__pyx_n_s_parser,0};
jpayne@69 22498 if (__pyx_kwds) {
jpayne@69 22499 Py_ssize_t kw_args;
jpayne@69 22500 switch (__pyx_nargs) {
jpayne@69 22501 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 22502 CYTHON_FALLTHROUGH;
jpayne@69 22503 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 22504 CYTHON_FALLTHROUGH;
jpayne@69 22505 case 0: break;
jpayne@69 22506 default: goto __pyx_L5_argtuple_error;
jpayne@69 22507 }
jpayne@69 22508 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 22509 switch (__pyx_nargs) {
jpayne@69 22510 case 0:
jpayne@69 22511 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_infile)) != 0)) {
jpayne@69 22512 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 22513 kw_args--;
jpayne@69 22514 }
jpayne@69 22515 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1238, __pyx_L3_error)
jpayne@69 22516 else goto __pyx_L5_argtuple_error;
jpayne@69 22517 CYTHON_FALLTHROUGH;
jpayne@69 22518 case 1:
jpayne@69 22519 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser)) != 0)) {
jpayne@69 22520 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 22521 kw_args--;
jpayne@69 22522 }
jpayne@69 22523 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1238, __pyx_L3_error)
jpayne@69 22524 else {
jpayne@69 22525 __Pyx_RaiseArgtupleInvalid("tabix_iterator", 1, 2, 2, 1); __PYX_ERR(0, 1238, __pyx_L3_error)
jpayne@69 22526 }
jpayne@69 22527 }
jpayne@69 22528 if (unlikely(kw_args > 0)) {
jpayne@69 22529 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 22530 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "tabix_iterator") < 0)) __PYX_ERR(0, 1238, __pyx_L3_error)
jpayne@69 22531 }
jpayne@69 22532 } else if (unlikely(__pyx_nargs != 2)) {
jpayne@69 22533 goto __pyx_L5_argtuple_error;
jpayne@69 22534 } else {
jpayne@69 22535 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 22536 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 22537 }
jpayne@69 22538 __pyx_v_infile = values[0];
jpayne@69 22539 __pyx_v_parser = values[1];
jpayne@69 22540 }
jpayne@69 22541 goto __pyx_L6_skip;
jpayne@69 22542 __pyx_L5_argtuple_error:;
jpayne@69 22543 __Pyx_RaiseArgtupleInvalid("tabix_iterator", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1238, __pyx_L3_error)
jpayne@69 22544 __pyx_L6_skip:;
jpayne@69 22545 goto __pyx_L4_argument_unpacking_done;
jpayne@69 22546 __pyx_L3_error:;
jpayne@69 22547 {
jpayne@69 22548 Py_ssize_t __pyx_temp;
jpayne@69 22549 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 22550 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 22551 }
jpayne@69 22552 }
jpayne@69 22553 __Pyx_AddTraceback("pysam.libctabix.tabix_iterator", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 22554 __Pyx_RefNannyFinishContext();
jpayne@69 22555 return NULL;
jpayne@69 22556 __pyx_L4_argument_unpacking_done:;
jpayne@69 22557 __pyx_r = __pyx_pf_5pysam_9libctabix_4tabix_iterator(__pyx_self, __pyx_v_infile, __pyx_v_parser);
jpayne@69 22558
jpayne@69 22559 /* function exit code */
jpayne@69 22560 {
jpayne@69 22561 Py_ssize_t __pyx_temp;
jpayne@69 22562 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 22563 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 22564 }
jpayne@69 22565 }
jpayne@69 22566 __Pyx_RefNannyFinishContext();
jpayne@69 22567 return __pyx_r;
jpayne@69 22568 }
jpayne@69 22569
jpayne@69 22570 static PyObject *__pyx_pf_5pysam_9libctabix_4tabix_iterator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_infile, PyObject *__pyx_v_parser) {
jpayne@69 22571 PyObject *__pyx_r = NULL;
jpayne@69 22572 __Pyx_TraceDeclarations
jpayne@69 22573 __Pyx_RefNannyDeclarations
jpayne@69 22574 PyObject *__pyx_t_1 = NULL;
jpayne@69 22575 PyObject *__pyx_t_2 = NULL;
jpayne@69 22576 PyObject *__pyx_t_3 = NULL;
jpayne@69 22577 unsigned int __pyx_t_4;
jpayne@69 22578 int __pyx_lineno = 0;
jpayne@69 22579 const char *__pyx_filename = NULL;
jpayne@69 22580 int __pyx_clineno = 0;
jpayne@69 22581 __Pyx_TraceFrameInit(__pyx_codeobj__51)
jpayne@69 22582 __Pyx_RefNannySetupContext("tabix_iterator", 1);
jpayne@69 22583 __Pyx_TraceCall("tabix_iterator", __pyx_f[0], 1238, 0, __PYX_ERR(0, 1238, __pyx_L1_error));
jpayne@69 22584
jpayne@69 22585 /* "pysam/libctabix.pyx":1248
jpayne@69 22586 *
jpayne@69 22587 * """
jpayne@69 22588 * return tabix_generic_iterator(infile, parser) # <<<<<<<<<<<<<<
jpayne@69 22589 *
jpayne@69 22590 *
jpayne@69 22591 */
jpayne@69 22592 __Pyx_XDECREF(__pyx_r);
jpayne@69 22593 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_tabix_generic_iterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1248, __pyx_L1_error)
jpayne@69 22594 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 22595 __pyx_t_3 = NULL;
jpayne@69 22596 __pyx_t_4 = 0;
jpayne@69 22597 #if CYTHON_UNPACK_METHODS
jpayne@69 22598 if (unlikely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 22599 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 22600 if (likely(__pyx_t_3)) {
jpayne@69 22601 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 22602 __Pyx_INCREF(__pyx_t_3);
jpayne@69 22603 __Pyx_INCREF(function);
jpayne@69 22604 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 22605 __pyx_t_4 = 1;
jpayne@69 22606 }
jpayne@69 22607 }
jpayne@69 22608 #endif
jpayne@69 22609 {
jpayne@69 22610 PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_infile, __pyx_v_parser};
jpayne@69 22611 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
jpayne@69 22612 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 22613 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error)
jpayne@69 22614 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 22615 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 22616 }
jpayne@69 22617 __pyx_r = __pyx_t_1;
jpayne@69 22618 __pyx_t_1 = 0;
jpayne@69 22619 goto __pyx_L0;
jpayne@69 22620
jpayne@69 22621 /* "pysam/libctabix.pyx":1238
jpayne@69 22622 *
jpayne@69 22623 *
jpayne@69 22624 * def tabix_iterator(infile, parser): # <<<<<<<<<<<<<<
jpayne@69 22625 * """return an iterator over all entries in a file.
jpayne@69 22626 *
jpayne@69 22627 */
jpayne@69 22628
jpayne@69 22629 /* function exit code */
jpayne@69 22630 __pyx_L1_error:;
jpayne@69 22631 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 22632 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 22633 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 22634 __Pyx_AddTraceback("pysam.libctabix.tabix_iterator", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 22635 __pyx_r = NULL;
jpayne@69 22636 __pyx_L0:;
jpayne@69 22637 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 22638 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 22639 __Pyx_RefNannyFinishContext();
jpayne@69 22640 return __pyx_r;
jpayne@69 22641 }
jpayne@69 22642
jpayne@69 22643 /* "(tree fragment)":1
jpayne@69 22644 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 22645 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 22646 * def __setstate_cython__(self, __pyx_state):
jpayne@69 22647 */
jpayne@69 22648
jpayne@69 22649 /* Python wrapper */
jpayne@69 22650 static PyObject *__pyx_pw_5pysam_9libctabix_9Tabixfile_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 22651 #if CYTHON_METH_FASTCALL
jpayne@69 22652 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 22653 #else
jpayne@69 22654 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 22655 #endif
jpayne@69 22656 ); /*proto*/
jpayne@69 22657 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9Tabixfile___reduce_cython__, "Tabixfile.__reduce_cython__(self)");
jpayne@69 22658 static PyMethodDef __pyx_mdef_5pysam_9libctabix_9Tabixfile_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9Tabixfile_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9Tabixfile___reduce_cython__};
jpayne@69 22659 static PyObject *__pyx_pw_5pysam_9libctabix_9Tabixfile_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 22660 #if CYTHON_METH_FASTCALL
jpayne@69 22661 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 22662 #else
jpayne@69 22663 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 22664 #endif
jpayne@69 22665 ) {
jpayne@69 22666 #if !CYTHON_METH_FASTCALL
jpayne@69 22667 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 22668 #endif
jpayne@69 22669 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 22670 PyObject *__pyx_r = 0;
jpayne@69 22671 __Pyx_RefNannyDeclarations
jpayne@69 22672 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 22673 #if !CYTHON_METH_FASTCALL
jpayne@69 22674 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 22675 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 22676 #else
jpayne@69 22677 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 22678 #endif
jpayne@69 22679 #endif
jpayne@69 22680 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 22681 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 22682 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 22683 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 22684 __pyx_r = __pyx_pf_5pysam_9libctabix_9Tabixfile___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_Tabixfile *)__pyx_v_self));
jpayne@69 22685
jpayne@69 22686 /* function exit code */
jpayne@69 22687 __Pyx_RefNannyFinishContext();
jpayne@69 22688 return __pyx_r;
jpayne@69 22689 }
jpayne@69 22690
jpayne@69 22691 static PyObject *__pyx_pf_5pysam_9libctabix_9Tabixfile___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_Tabixfile *__pyx_v_self) {
jpayne@69 22692 PyObject *__pyx_r = NULL;
jpayne@69 22693 __Pyx_TraceDeclarations
jpayne@69 22694 __Pyx_RefNannyDeclarations
jpayne@69 22695 int __pyx_lineno = 0;
jpayne@69 22696 const char *__pyx_filename = NULL;
jpayne@69 22697 int __pyx_clineno = 0;
jpayne@69 22698 __Pyx_TraceFrameInit(__pyx_codeobj__52)
jpayne@69 22699 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 22700 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 22701
jpayne@69 22702 /* "(tree fragment)":2
jpayne@69 22703 * def __reduce_cython__(self):
jpayne@69 22704 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 22705 * def __setstate_cython__(self, __pyx_state):
jpayne@69 22706 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 22707 */
jpayne@69 22708 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 22709 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 22710
jpayne@69 22711 /* "(tree fragment)":1
jpayne@69 22712 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 22713 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 22714 * def __setstate_cython__(self, __pyx_state):
jpayne@69 22715 */
jpayne@69 22716
jpayne@69 22717 /* function exit code */
jpayne@69 22718 __pyx_L1_error:;
jpayne@69 22719 __Pyx_AddTraceback("pysam.libctabix.Tabixfile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 22720 __pyx_r = NULL;
jpayne@69 22721 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 22722 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 22723 __Pyx_RefNannyFinishContext();
jpayne@69 22724 return __pyx_r;
jpayne@69 22725 }
jpayne@69 22726
jpayne@69 22727 /* "(tree fragment)":3
jpayne@69 22728 * def __reduce_cython__(self):
jpayne@69 22729 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 22730 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 22731 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 22732 */
jpayne@69 22733
jpayne@69 22734 /* Python wrapper */
jpayne@69 22735 static PyObject *__pyx_pw_5pysam_9libctabix_9Tabixfile_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 22736 #if CYTHON_METH_FASTCALL
jpayne@69 22737 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 22738 #else
jpayne@69 22739 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 22740 #endif
jpayne@69 22741 ); /*proto*/
jpayne@69 22742 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9Tabixfile_2__setstate_cython__, "Tabixfile.__setstate_cython__(self, __pyx_state)");
jpayne@69 22743 static PyMethodDef __pyx_mdef_5pysam_9libctabix_9Tabixfile_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9Tabixfile_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9Tabixfile_2__setstate_cython__};
jpayne@69 22744 static PyObject *__pyx_pw_5pysam_9libctabix_9Tabixfile_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 22745 #if CYTHON_METH_FASTCALL
jpayne@69 22746 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 22747 #else
jpayne@69 22748 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 22749 #endif
jpayne@69 22750 ) {
jpayne@69 22751 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 22752 #if !CYTHON_METH_FASTCALL
jpayne@69 22753 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 22754 #endif
jpayne@69 22755 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 22756 PyObject* values[1] = {0};
jpayne@69 22757 int __pyx_lineno = 0;
jpayne@69 22758 const char *__pyx_filename = NULL;
jpayne@69 22759 int __pyx_clineno = 0;
jpayne@69 22760 PyObject *__pyx_r = 0;
jpayne@69 22761 __Pyx_RefNannyDeclarations
jpayne@69 22762 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 22763 #if !CYTHON_METH_FASTCALL
jpayne@69 22764 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 22765 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 22766 #else
jpayne@69 22767 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 22768 #endif
jpayne@69 22769 #endif
jpayne@69 22770 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 22771 {
jpayne@69 22772 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 22773 if (__pyx_kwds) {
jpayne@69 22774 Py_ssize_t kw_args;
jpayne@69 22775 switch (__pyx_nargs) {
jpayne@69 22776 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 22777 CYTHON_FALLTHROUGH;
jpayne@69 22778 case 0: break;
jpayne@69 22779 default: goto __pyx_L5_argtuple_error;
jpayne@69 22780 }
jpayne@69 22781 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 22782 switch (__pyx_nargs) {
jpayne@69 22783 case 0:
jpayne@69 22784 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 22785 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 22786 kw_args--;
jpayne@69 22787 }
jpayne@69 22788 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 22789 else goto __pyx_L5_argtuple_error;
jpayne@69 22790 }
jpayne@69 22791 if (unlikely(kw_args > 0)) {
jpayne@69 22792 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 22793 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)
jpayne@69 22794 }
jpayne@69 22795 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 22796 goto __pyx_L5_argtuple_error;
jpayne@69 22797 } else {
jpayne@69 22798 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 22799 }
jpayne@69 22800 __pyx_v___pyx_state = values[0];
jpayne@69 22801 }
jpayne@69 22802 goto __pyx_L6_skip;
jpayne@69 22803 __pyx_L5_argtuple_error:;
jpayne@69 22804 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 22805 __pyx_L6_skip:;
jpayne@69 22806 goto __pyx_L4_argument_unpacking_done;
jpayne@69 22807 __pyx_L3_error:;
jpayne@69 22808 {
jpayne@69 22809 Py_ssize_t __pyx_temp;
jpayne@69 22810 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 22811 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 22812 }
jpayne@69 22813 }
jpayne@69 22814 __Pyx_AddTraceback("pysam.libctabix.Tabixfile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 22815 __Pyx_RefNannyFinishContext();
jpayne@69 22816 return NULL;
jpayne@69 22817 __pyx_L4_argument_unpacking_done:;
jpayne@69 22818 __pyx_r = __pyx_pf_5pysam_9libctabix_9Tabixfile_2__setstate_cython__(((struct __pyx_obj_5pysam_9libctabix_Tabixfile *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 22819
jpayne@69 22820 /* function exit code */
jpayne@69 22821 {
jpayne@69 22822 Py_ssize_t __pyx_temp;
jpayne@69 22823 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 22824 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 22825 }
jpayne@69 22826 }
jpayne@69 22827 __Pyx_RefNannyFinishContext();
jpayne@69 22828 return __pyx_r;
jpayne@69 22829 }
jpayne@69 22830
jpayne@69 22831 static PyObject *__pyx_pf_5pysam_9libctabix_9Tabixfile_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_Tabixfile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 22832 PyObject *__pyx_r = NULL;
jpayne@69 22833 __Pyx_TraceDeclarations
jpayne@69 22834 __Pyx_RefNannyDeclarations
jpayne@69 22835 int __pyx_lineno = 0;
jpayne@69 22836 const char *__pyx_filename = NULL;
jpayne@69 22837 int __pyx_clineno = 0;
jpayne@69 22838 __Pyx_TraceFrameInit(__pyx_codeobj__53)
jpayne@69 22839 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 22840 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 22841
jpayne@69 22842 /* "(tree fragment)":4
jpayne@69 22843 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 22844 * def __setstate_cython__(self, __pyx_state):
jpayne@69 22845 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 22846 */
jpayne@69 22847 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 22848 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 22849
jpayne@69 22850 /* "(tree fragment)":3
jpayne@69 22851 * def __reduce_cython__(self):
jpayne@69 22852 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 22853 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 22854 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 22855 */
jpayne@69 22856
jpayne@69 22857 /* function exit code */
jpayne@69 22858 __pyx_L1_error:;
jpayne@69 22859 __Pyx_AddTraceback("pysam.libctabix.Tabixfile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 22860 __pyx_r = NULL;
jpayne@69 22861 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 22862 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 22863 __Pyx_RefNannyFinishContext();
jpayne@69 22864 return __pyx_r;
jpayne@69 22865 }
jpayne@69 22866
jpayne@69 22867 /* "(tree fragment)":1
jpayne@69 22868 * def __pyx_unpickle_Parser(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 22869 * cdef object __pyx_PickleError
jpayne@69 22870 * cdef object __pyx_result
jpayne@69 22871 */
jpayne@69 22872
jpayne@69 22873 /* Python wrapper */
jpayne@69 22874 static PyObject *__pyx_pw_5pysam_9libctabix_7__pyx_unpickle_Parser(PyObject *__pyx_self,
jpayne@69 22875 #if CYTHON_METH_FASTCALL
jpayne@69 22876 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 22877 #else
jpayne@69 22878 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 22879 #endif
jpayne@69 22880 ); /*proto*/
jpayne@69 22881 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6__pyx_unpickle_Parser, "__pyx_unpickle_Parser(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@69 22882 static PyMethodDef __pyx_mdef_5pysam_9libctabix_7__pyx_unpickle_Parser = {"__pyx_unpickle_Parser", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_7__pyx_unpickle_Parser, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6__pyx_unpickle_Parser};
jpayne@69 22883 static PyObject *__pyx_pw_5pysam_9libctabix_7__pyx_unpickle_Parser(PyObject *__pyx_self,
jpayne@69 22884 #if CYTHON_METH_FASTCALL
jpayne@69 22885 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 22886 #else
jpayne@69 22887 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 22888 #endif
jpayne@69 22889 ) {
jpayne@69 22890 PyObject *__pyx_v___pyx_type = 0;
jpayne@69 22891 long __pyx_v___pyx_checksum;
jpayne@69 22892 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 22893 #if !CYTHON_METH_FASTCALL
jpayne@69 22894 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 22895 #endif
jpayne@69 22896 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 22897 PyObject* values[3] = {0,0,0};
jpayne@69 22898 int __pyx_lineno = 0;
jpayne@69 22899 const char *__pyx_filename = NULL;
jpayne@69 22900 int __pyx_clineno = 0;
jpayne@69 22901 PyObject *__pyx_r = 0;
jpayne@69 22902 __Pyx_RefNannyDeclarations
jpayne@69 22903 __Pyx_RefNannySetupContext("__pyx_unpickle_Parser (wrapper)", 0);
jpayne@69 22904 #if !CYTHON_METH_FASTCALL
jpayne@69 22905 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 22906 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 22907 #else
jpayne@69 22908 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 22909 #endif
jpayne@69 22910 #endif
jpayne@69 22911 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 22912 {
jpayne@69 22913 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@69 22914 if (__pyx_kwds) {
jpayne@69 22915 Py_ssize_t kw_args;
jpayne@69 22916 switch (__pyx_nargs) {
jpayne@69 22917 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 22918 CYTHON_FALLTHROUGH;
jpayne@69 22919 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 22920 CYTHON_FALLTHROUGH;
jpayne@69 22921 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 22922 CYTHON_FALLTHROUGH;
jpayne@69 22923 case 0: break;
jpayne@69 22924 default: goto __pyx_L5_argtuple_error;
jpayne@69 22925 }
jpayne@69 22926 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 22927 switch (__pyx_nargs) {
jpayne@69 22928 case 0:
jpayne@69 22929 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@69 22930 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 22931 kw_args--;
jpayne@69 22932 }
jpayne@69 22933 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 22934 else goto __pyx_L5_argtuple_error;
jpayne@69 22935 CYTHON_FALLTHROUGH;
jpayne@69 22936 case 1:
jpayne@69 22937 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@69 22938 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 22939 kw_args--;
jpayne@69 22940 }
jpayne@69 22941 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 22942 else {
jpayne@69 22943 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Parser", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 22944 }
jpayne@69 22945 CYTHON_FALLTHROUGH;
jpayne@69 22946 case 2:
jpayne@69 22947 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 22948 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@69 22949 kw_args--;
jpayne@69 22950 }
jpayne@69 22951 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 22952 else {
jpayne@69 22953 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Parser", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 22954 }
jpayne@69 22955 }
jpayne@69 22956 if (unlikely(kw_args > 0)) {
jpayne@69 22957 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 22958 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Parser") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 22959 }
jpayne@69 22960 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@69 22961 goto __pyx_L5_argtuple_error;
jpayne@69 22962 } else {
jpayne@69 22963 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 22964 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 22965 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 22966 }
jpayne@69 22967 __pyx_v___pyx_type = values[0];
jpayne@69 22968 __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)
jpayne@69 22969 __pyx_v___pyx_state = values[2];
jpayne@69 22970 }
jpayne@69 22971 goto __pyx_L6_skip;
jpayne@69 22972 __pyx_L5_argtuple_error:;
jpayne@69 22973 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Parser", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 22974 __pyx_L6_skip:;
jpayne@69 22975 goto __pyx_L4_argument_unpacking_done;
jpayne@69 22976 __pyx_L3_error:;
jpayne@69 22977 {
jpayne@69 22978 Py_ssize_t __pyx_temp;
jpayne@69 22979 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 22980 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 22981 }
jpayne@69 22982 }
jpayne@69 22983 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_Parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 22984 __Pyx_RefNannyFinishContext();
jpayne@69 22985 return NULL;
jpayne@69 22986 __pyx_L4_argument_unpacking_done:;
jpayne@69 22987 __pyx_r = __pyx_pf_5pysam_9libctabix_6__pyx_unpickle_Parser(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
jpayne@69 22988
jpayne@69 22989 /* function exit code */
jpayne@69 22990 {
jpayne@69 22991 Py_ssize_t __pyx_temp;
jpayne@69 22992 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 22993 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 22994 }
jpayne@69 22995 }
jpayne@69 22996 __Pyx_RefNannyFinishContext();
jpayne@69 22997 return __pyx_r;
jpayne@69 22998 }
jpayne@69 22999
jpayne@69 23000 static PyObject *__pyx_pf_5pysam_9libctabix_6__pyx_unpickle_Parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
jpayne@69 23001 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@69 23002 PyObject *__pyx_v___pyx_result = 0;
jpayne@69 23003 PyObject *__pyx_r = NULL;
jpayne@69 23004 __Pyx_TraceDeclarations
jpayne@69 23005 __Pyx_RefNannyDeclarations
jpayne@69 23006 PyObject *__pyx_t_1 = NULL;
jpayne@69 23007 int __pyx_t_2;
jpayne@69 23008 PyObject *__pyx_t_3 = NULL;
jpayne@69 23009 PyObject *__pyx_t_4 = NULL;
jpayne@69 23010 unsigned int __pyx_t_5;
jpayne@69 23011 int __pyx_lineno = 0;
jpayne@69 23012 const char *__pyx_filename = NULL;
jpayne@69 23013 int __pyx_clineno = 0;
jpayne@69 23014 __Pyx_TraceFrameInit(__pyx_codeobj__54)
jpayne@69 23015 __Pyx_RefNannySetupContext("__pyx_unpickle_Parser", 1);
jpayne@69 23016 __Pyx_TraceCall("__pyx_unpickle_Parser", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 23017
jpayne@69 23018 /* "(tree fragment)":4
jpayne@69 23019 * cdef object __pyx_PickleError
jpayne@69 23020 * cdef object __pyx_result
jpayne@69 23021 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 23022 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23023 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23024 */
jpayne@69 23025 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 23026 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23027 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__55, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 23028 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23029 if (__pyx_t_2) {
jpayne@69 23030
jpayne@69 23031 /* "(tree fragment)":5
jpayne@69 23032 * cdef object __pyx_result
jpayne@69 23033 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 23034 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@69 23035 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23036 * __pyx_result = Parser.__new__(__pyx_type)
jpayne@69 23037 */
jpayne@69 23038 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 23039 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23040 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@69 23041 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@69 23042 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 23043 __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)
jpayne@69 23044 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 23045 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23046 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 23047 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23048 __Pyx_INCREF(__pyx_t_1);
jpayne@69 23049 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@69 23050 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23051 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 23052
jpayne@69 23053 /* "(tree fragment)":6
jpayne@69 23054 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 23055 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23056 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@69 23057 * __pyx_result = Parser.__new__(__pyx_type)
jpayne@69 23058 * if __pyx_state is not None:
jpayne@69 23059 */
jpayne@69 23060 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 23061 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 23062 __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)
jpayne@69 23063 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23064 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 23065 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@69 23066 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23067 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 23068
jpayne@69 23069 /* "(tree fragment)":4
jpayne@69 23070 * cdef object __pyx_PickleError
jpayne@69 23071 * cdef object __pyx_result
jpayne@69 23072 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 23073 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23074 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23075 */
jpayne@69 23076 }
jpayne@69 23077
jpayne@69 23078 /* "(tree fragment)":7
jpayne@69 23079 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23080 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23081 * __pyx_result = Parser.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@69 23082 * if __pyx_state is not None:
jpayne@69 23083 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@69 23084 */
jpayne@69 23085 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_9libctabix_Parser), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 23086 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 23087 __pyx_t_4 = NULL;
jpayne@69 23088 __pyx_t_5 = 0;
jpayne@69 23089 #if CYTHON_UNPACK_METHODS
jpayne@69 23090 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 23091 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 23092 if (likely(__pyx_t_4)) {
jpayne@69 23093 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 23094 __Pyx_INCREF(__pyx_t_4);
jpayne@69 23095 __Pyx_INCREF(function);
jpayne@69 23096 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 23097 __pyx_t_5 = 1;
jpayne@69 23098 }
jpayne@69 23099 }
jpayne@69 23100 #endif
jpayne@69 23101 {
jpayne@69 23102 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@69 23103 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 23104 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 23105 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 23106 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23107 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 23108 }
jpayne@69 23109 __pyx_v___pyx_result = __pyx_t_1;
jpayne@69 23110 __pyx_t_1 = 0;
jpayne@69 23111
jpayne@69 23112 /* "(tree fragment)":8
jpayne@69 23113 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23114 * __pyx_result = Parser.__new__(__pyx_type)
jpayne@69 23115 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 23116 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@69 23117 * return __pyx_result
jpayne@69 23118 */
jpayne@69 23119 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@69 23120 if (__pyx_t_2) {
jpayne@69 23121
jpayne@69 23122 /* "(tree fragment)":9
jpayne@69 23123 * __pyx_result = Parser.__new__(__pyx_type)
jpayne@69 23124 * if __pyx_state is not None:
jpayne@69 23125 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 23126 * return __pyx_result
jpayne@69 23127 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state):
jpayne@69 23128 */
jpayne@69 23129 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)
jpayne@69 23130 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_Parser__set_state(((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
jpayne@69 23131 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23132 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23133
jpayne@69 23134 /* "(tree fragment)":8
jpayne@69 23135 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23136 * __pyx_result = Parser.__new__(__pyx_type)
jpayne@69 23137 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 23138 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@69 23139 * return __pyx_result
jpayne@69 23140 */
jpayne@69 23141 }
jpayne@69 23142
jpayne@69 23143 /* "(tree fragment)":10
jpayne@69 23144 * if __pyx_state is not None:
jpayne@69 23145 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@69 23146 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@69 23147 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state):
jpayne@69 23148 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23149 */
jpayne@69 23150 __Pyx_XDECREF(__pyx_r);
jpayne@69 23151 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@69 23152 __pyx_r = __pyx_v___pyx_result;
jpayne@69 23153 goto __pyx_L0;
jpayne@69 23154
jpayne@69 23155 /* "(tree fragment)":1
jpayne@69 23156 * def __pyx_unpickle_Parser(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 23157 * cdef object __pyx_PickleError
jpayne@69 23158 * cdef object __pyx_result
jpayne@69 23159 */
jpayne@69 23160
jpayne@69 23161 /* function exit code */
jpayne@69 23162 __pyx_L1_error:;
jpayne@69 23163 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 23164 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 23165 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 23166 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_Parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 23167 __pyx_r = NULL;
jpayne@69 23168 __pyx_L0:;
jpayne@69 23169 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@69 23170 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@69 23171 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 23172 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 23173 __Pyx_RefNannyFinishContext();
jpayne@69 23174 return __pyx_r;
jpayne@69 23175 }
jpayne@69 23176
jpayne@69 23177 /* "(tree fragment)":11
jpayne@69 23178 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@69 23179 * return __pyx_result
jpayne@69 23180 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 23181 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23182 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 23183 */
jpayne@69 23184
jpayne@69 23185 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_Parser__set_state(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
jpayne@69 23186 PyObject *__pyx_r = NULL;
jpayne@69 23187 __Pyx_TraceDeclarations
jpayne@69 23188 __Pyx_RefNannyDeclarations
jpayne@69 23189 PyObject *__pyx_t_1 = NULL;
jpayne@69 23190 int __pyx_t_2;
jpayne@69 23191 Py_ssize_t __pyx_t_3;
jpayne@69 23192 int __pyx_t_4;
jpayne@69 23193 PyObject *__pyx_t_5 = NULL;
jpayne@69 23194 PyObject *__pyx_t_6 = NULL;
jpayne@69 23195 PyObject *__pyx_t_7 = NULL;
jpayne@69 23196 unsigned int __pyx_t_8;
jpayne@69 23197 int __pyx_lineno = 0;
jpayne@69 23198 const char *__pyx_filename = NULL;
jpayne@69 23199 int __pyx_clineno = 0;
jpayne@69 23200 __Pyx_RefNannySetupContext("__pyx_unpickle_Parser__set_state", 1);
jpayne@69 23201 __Pyx_TraceCall("__pyx_unpickle_Parser__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@69 23202
jpayne@69 23203 /* "(tree fragment)":12
jpayne@69 23204 * return __pyx_result
jpayne@69 23205 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state):
jpayne@69 23206 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@69 23207 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 23208 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 23209 */
jpayne@69 23210 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 23211 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 23212 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 23213 }
jpayne@69 23214 __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)
jpayne@69 23215 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23216 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 23217 __Pyx_GOTREF(__pyx_v___pyx_result->encoding);
jpayne@69 23218 __Pyx_DECREF(__pyx_v___pyx_result->encoding);
jpayne@69 23219 __pyx_v___pyx_result->encoding = __pyx_t_1;
jpayne@69 23220 __pyx_t_1 = 0;
jpayne@69 23221
jpayne@69 23222 /* "(tree fragment)":13
jpayne@69 23223 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state):
jpayne@69 23224 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23225 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 23226 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 23227 */
jpayne@69 23228 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 23229 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@69 23230 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 23231 }
jpayne@69 23232 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 23233 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@69 23234 if (__pyx_t_4) {
jpayne@69 23235 } else {
jpayne@69 23236 __pyx_t_2 = __pyx_t_4;
jpayne@69 23237 goto __pyx_L4_bool_binop_done;
jpayne@69 23238 }
jpayne@69 23239 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 23240 __pyx_t_2 = __pyx_t_4;
jpayne@69 23241 __pyx_L4_bool_binop_done:;
jpayne@69 23242 if (__pyx_t_2) {
jpayne@69 23243
jpayne@69 23244 /* "(tree fragment)":14
jpayne@69 23245 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23246 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 23247 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@69 23248 */
jpayne@69 23249 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 23250 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 23251 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 23252 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 23253 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 23254 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 23255 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 23256 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 23257 }
jpayne@69 23258 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 23259 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 23260 __pyx_t_7 = NULL;
jpayne@69 23261 __pyx_t_8 = 0;
jpayne@69 23262 #if CYTHON_UNPACK_METHODS
jpayne@69 23263 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@69 23264 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@69 23265 if (likely(__pyx_t_7)) {
jpayne@69 23266 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@69 23267 __Pyx_INCREF(__pyx_t_7);
jpayne@69 23268 __Pyx_INCREF(function);
jpayne@69 23269 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@69 23270 __pyx_t_8 = 1;
jpayne@69 23271 }
jpayne@69 23272 }
jpayne@69 23273 #endif
jpayne@69 23274 {
jpayne@69 23275 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@69 23276 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@69 23277 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 23278 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 23279 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 23280 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23281 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 23282 }
jpayne@69 23283 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23284
jpayne@69 23285 /* "(tree fragment)":13
jpayne@69 23286 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state):
jpayne@69 23287 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23288 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 23289 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 23290 */
jpayne@69 23291 }
jpayne@69 23292
jpayne@69 23293 /* "(tree fragment)":11
jpayne@69 23294 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@69 23295 * return __pyx_result
jpayne@69 23296 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 23297 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23298 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 23299 */
jpayne@69 23300
jpayne@69 23301 /* function exit code */
jpayne@69 23302 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 23303 goto __pyx_L0;
jpayne@69 23304 __pyx_L1_error:;
jpayne@69 23305 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 23306 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 23307 __Pyx_XDECREF(__pyx_t_6);
jpayne@69 23308 __Pyx_XDECREF(__pyx_t_7);
jpayne@69 23309 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_Parser__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 23310 __pyx_r = 0;
jpayne@69 23311 __pyx_L0:;
jpayne@69 23312 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 23313 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 23314 __Pyx_RefNannyFinishContext();
jpayne@69 23315 return __pyx_r;
jpayne@69 23316 }
jpayne@69 23317
jpayne@69 23318 /* "(tree fragment)":1
jpayne@69 23319 * def __pyx_unpickle_asTuple(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 23320 * cdef object __pyx_PickleError
jpayne@69 23321 * cdef object __pyx_result
jpayne@69 23322 */
jpayne@69 23323
jpayne@69 23324 /* Python wrapper */
jpayne@69 23325 static PyObject *__pyx_pw_5pysam_9libctabix_9__pyx_unpickle_asTuple(PyObject *__pyx_self,
jpayne@69 23326 #if CYTHON_METH_FASTCALL
jpayne@69 23327 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 23328 #else
jpayne@69 23329 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 23330 #endif
jpayne@69 23331 ); /*proto*/
jpayne@69 23332 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_8__pyx_unpickle_asTuple, "__pyx_unpickle_asTuple(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@69 23333 static PyMethodDef __pyx_mdef_5pysam_9libctabix_9__pyx_unpickle_asTuple = {"__pyx_unpickle_asTuple", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9__pyx_unpickle_asTuple, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_8__pyx_unpickle_asTuple};
jpayne@69 23334 static PyObject *__pyx_pw_5pysam_9libctabix_9__pyx_unpickle_asTuple(PyObject *__pyx_self,
jpayne@69 23335 #if CYTHON_METH_FASTCALL
jpayne@69 23336 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 23337 #else
jpayne@69 23338 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 23339 #endif
jpayne@69 23340 ) {
jpayne@69 23341 PyObject *__pyx_v___pyx_type = 0;
jpayne@69 23342 long __pyx_v___pyx_checksum;
jpayne@69 23343 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 23344 #if !CYTHON_METH_FASTCALL
jpayne@69 23345 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 23346 #endif
jpayne@69 23347 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 23348 PyObject* values[3] = {0,0,0};
jpayne@69 23349 int __pyx_lineno = 0;
jpayne@69 23350 const char *__pyx_filename = NULL;
jpayne@69 23351 int __pyx_clineno = 0;
jpayne@69 23352 PyObject *__pyx_r = 0;
jpayne@69 23353 __Pyx_RefNannyDeclarations
jpayne@69 23354 __Pyx_RefNannySetupContext("__pyx_unpickle_asTuple (wrapper)", 0);
jpayne@69 23355 #if !CYTHON_METH_FASTCALL
jpayne@69 23356 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 23357 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 23358 #else
jpayne@69 23359 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 23360 #endif
jpayne@69 23361 #endif
jpayne@69 23362 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 23363 {
jpayne@69 23364 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@69 23365 if (__pyx_kwds) {
jpayne@69 23366 Py_ssize_t kw_args;
jpayne@69 23367 switch (__pyx_nargs) {
jpayne@69 23368 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 23369 CYTHON_FALLTHROUGH;
jpayne@69 23370 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 23371 CYTHON_FALLTHROUGH;
jpayne@69 23372 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 23373 CYTHON_FALLTHROUGH;
jpayne@69 23374 case 0: break;
jpayne@69 23375 default: goto __pyx_L5_argtuple_error;
jpayne@69 23376 }
jpayne@69 23377 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 23378 switch (__pyx_nargs) {
jpayne@69 23379 case 0:
jpayne@69 23380 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@69 23381 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 23382 kw_args--;
jpayne@69 23383 }
jpayne@69 23384 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23385 else goto __pyx_L5_argtuple_error;
jpayne@69 23386 CYTHON_FALLTHROUGH;
jpayne@69 23387 case 1:
jpayne@69 23388 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@69 23389 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 23390 kw_args--;
jpayne@69 23391 }
jpayne@69 23392 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23393 else {
jpayne@69 23394 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asTuple", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23395 }
jpayne@69 23396 CYTHON_FALLTHROUGH;
jpayne@69 23397 case 2:
jpayne@69 23398 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 23399 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@69 23400 kw_args--;
jpayne@69 23401 }
jpayne@69 23402 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23403 else {
jpayne@69 23404 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asTuple", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23405 }
jpayne@69 23406 }
jpayne@69 23407 if (unlikely(kw_args > 0)) {
jpayne@69 23408 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 23409 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_asTuple") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23410 }
jpayne@69 23411 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@69 23412 goto __pyx_L5_argtuple_error;
jpayne@69 23413 } else {
jpayne@69 23414 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 23415 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 23416 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 23417 }
jpayne@69 23418 __pyx_v___pyx_type = values[0];
jpayne@69 23419 __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)
jpayne@69 23420 __pyx_v___pyx_state = values[2];
jpayne@69 23421 }
jpayne@69 23422 goto __pyx_L6_skip;
jpayne@69 23423 __pyx_L5_argtuple_error:;
jpayne@69 23424 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asTuple", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23425 __pyx_L6_skip:;
jpayne@69 23426 goto __pyx_L4_argument_unpacking_done;
jpayne@69 23427 __pyx_L3_error:;
jpayne@69 23428 {
jpayne@69 23429 Py_ssize_t __pyx_temp;
jpayne@69 23430 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 23431 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 23432 }
jpayne@69 23433 }
jpayne@69 23434 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asTuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 23435 __Pyx_RefNannyFinishContext();
jpayne@69 23436 return NULL;
jpayne@69 23437 __pyx_L4_argument_unpacking_done:;
jpayne@69 23438 __pyx_r = __pyx_pf_5pysam_9libctabix_8__pyx_unpickle_asTuple(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
jpayne@69 23439
jpayne@69 23440 /* function exit code */
jpayne@69 23441 {
jpayne@69 23442 Py_ssize_t __pyx_temp;
jpayne@69 23443 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 23444 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 23445 }
jpayne@69 23446 }
jpayne@69 23447 __Pyx_RefNannyFinishContext();
jpayne@69 23448 return __pyx_r;
jpayne@69 23449 }
jpayne@69 23450
jpayne@69 23451 static PyObject *__pyx_pf_5pysam_9libctabix_8__pyx_unpickle_asTuple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
jpayne@69 23452 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@69 23453 PyObject *__pyx_v___pyx_result = 0;
jpayne@69 23454 PyObject *__pyx_r = NULL;
jpayne@69 23455 __Pyx_TraceDeclarations
jpayne@69 23456 __Pyx_RefNannyDeclarations
jpayne@69 23457 PyObject *__pyx_t_1 = NULL;
jpayne@69 23458 int __pyx_t_2;
jpayne@69 23459 PyObject *__pyx_t_3 = NULL;
jpayne@69 23460 PyObject *__pyx_t_4 = NULL;
jpayne@69 23461 unsigned int __pyx_t_5;
jpayne@69 23462 int __pyx_lineno = 0;
jpayne@69 23463 const char *__pyx_filename = NULL;
jpayne@69 23464 int __pyx_clineno = 0;
jpayne@69 23465 __Pyx_TraceFrameInit(__pyx_codeobj__57)
jpayne@69 23466 __Pyx_RefNannySetupContext("__pyx_unpickle_asTuple", 1);
jpayne@69 23467 __Pyx_TraceCall("__pyx_unpickle_asTuple", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 23468
jpayne@69 23469 /* "(tree fragment)":4
jpayne@69 23470 * cdef object __pyx_PickleError
jpayne@69 23471 * cdef object __pyx_result
jpayne@69 23472 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 23473 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23474 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23475 */
jpayne@69 23476 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 23477 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23478 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__55, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 23479 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23480 if (__pyx_t_2) {
jpayne@69 23481
jpayne@69 23482 /* "(tree fragment)":5
jpayne@69 23483 * cdef object __pyx_result
jpayne@69 23484 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 23485 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@69 23486 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23487 * __pyx_result = asTuple.__new__(__pyx_type)
jpayne@69 23488 */
jpayne@69 23489 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 23490 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23491 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@69 23492 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@69 23493 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 23494 __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)
jpayne@69 23495 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 23496 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23497 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 23498 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23499 __Pyx_INCREF(__pyx_t_1);
jpayne@69 23500 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@69 23501 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23502 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 23503
jpayne@69 23504 /* "(tree fragment)":6
jpayne@69 23505 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 23506 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23507 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@69 23508 * __pyx_result = asTuple.__new__(__pyx_type)
jpayne@69 23509 * if __pyx_state is not None:
jpayne@69 23510 */
jpayne@69 23511 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 23512 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 23513 __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)
jpayne@69 23514 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23515 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 23516 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@69 23517 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23518 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 23519
jpayne@69 23520 /* "(tree fragment)":4
jpayne@69 23521 * cdef object __pyx_PickleError
jpayne@69 23522 * cdef object __pyx_result
jpayne@69 23523 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 23524 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23525 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23526 */
jpayne@69 23527 }
jpayne@69 23528
jpayne@69 23529 /* "(tree fragment)":7
jpayne@69 23530 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23531 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23532 * __pyx_result = asTuple.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@69 23533 * if __pyx_state is not None:
jpayne@69 23534 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@69 23535 */
jpayne@69 23536 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_9libctabix_asTuple), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 23537 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 23538 __pyx_t_4 = NULL;
jpayne@69 23539 __pyx_t_5 = 0;
jpayne@69 23540 #if CYTHON_UNPACK_METHODS
jpayne@69 23541 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 23542 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 23543 if (likely(__pyx_t_4)) {
jpayne@69 23544 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 23545 __Pyx_INCREF(__pyx_t_4);
jpayne@69 23546 __Pyx_INCREF(function);
jpayne@69 23547 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 23548 __pyx_t_5 = 1;
jpayne@69 23549 }
jpayne@69 23550 }
jpayne@69 23551 #endif
jpayne@69 23552 {
jpayne@69 23553 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@69 23554 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 23555 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 23556 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 23557 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23558 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 23559 }
jpayne@69 23560 __pyx_v___pyx_result = __pyx_t_1;
jpayne@69 23561 __pyx_t_1 = 0;
jpayne@69 23562
jpayne@69 23563 /* "(tree fragment)":8
jpayne@69 23564 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23565 * __pyx_result = asTuple.__new__(__pyx_type)
jpayne@69 23566 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 23567 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@69 23568 * return __pyx_result
jpayne@69 23569 */
jpayne@69 23570 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@69 23571 if (__pyx_t_2) {
jpayne@69 23572
jpayne@69 23573 /* "(tree fragment)":9
jpayne@69 23574 * __pyx_result = asTuple.__new__(__pyx_type)
jpayne@69 23575 * if __pyx_state is not None:
jpayne@69 23576 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 23577 * return __pyx_result
jpayne@69 23578 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state):
jpayne@69 23579 */
jpayne@69 23580 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)
jpayne@69 23581 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_asTuple__set_state(((struct __pyx_obj_5pysam_9libctabix_asTuple *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
jpayne@69 23582 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23583 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23584
jpayne@69 23585 /* "(tree fragment)":8
jpayne@69 23586 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23587 * __pyx_result = asTuple.__new__(__pyx_type)
jpayne@69 23588 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 23589 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@69 23590 * return __pyx_result
jpayne@69 23591 */
jpayne@69 23592 }
jpayne@69 23593
jpayne@69 23594 /* "(tree fragment)":10
jpayne@69 23595 * if __pyx_state is not None:
jpayne@69 23596 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@69 23597 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@69 23598 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state):
jpayne@69 23599 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23600 */
jpayne@69 23601 __Pyx_XDECREF(__pyx_r);
jpayne@69 23602 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@69 23603 __pyx_r = __pyx_v___pyx_result;
jpayne@69 23604 goto __pyx_L0;
jpayne@69 23605
jpayne@69 23606 /* "(tree fragment)":1
jpayne@69 23607 * def __pyx_unpickle_asTuple(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 23608 * cdef object __pyx_PickleError
jpayne@69 23609 * cdef object __pyx_result
jpayne@69 23610 */
jpayne@69 23611
jpayne@69 23612 /* function exit code */
jpayne@69 23613 __pyx_L1_error:;
jpayne@69 23614 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 23615 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 23616 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 23617 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asTuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 23618 __pyx_r = NULL;
jpayne@69 23619 __pyx_L0:;
jpayne@69 23620 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@69 23621 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@69 23622 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 23623 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 23624 __Pyx_RefNannyFinishContext();
jpayne@69 23625 return __pyx_r;
jpayne@69 23626 }
jpayne@69 23627
jpayne@69 23628 /* "(tree fragment)":11
jpayne@69 23629 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@69 23630 * return __pyx_result
jpayne@69 23631 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 23632 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23633 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 23634 */
jpayne@69 23635
jpayne@69 23636 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asTuple__set_state(struct __pyx_obj_5pysam_9libctabix_asTuple *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
jpayne@69 23637 PyObject *__pyx_r = NULL;
jpayne@69 23638 __Pyx_TraceDeclarations
jpayne@69 23639 __Pyx_RefNannyDeclarations
jpayne@69 23640 PyObject *__pyx_t_1 = NULL;
jpayne@69 23641 int __pyx_t_2;
jpayne@69 23642 Py_ssize_t __pyx_t_3;
jpayne@69 23643 int __pyx_t_4;
jpayne@69 23644 PyObject *__pyx_t_5 = NULL;
jpayne@69 23645 PyObject *__pyx_t_6 = NULL;
jpayne@69 23646 PyObject *__pyx_t_7 = NULL;
jpayne@69 23647 unsigned int __pyx_t_8;
jpayne@69 23648 int __pyx_lineno = 0;
jpayne@69 23649 const char *__pyx_filename = NULL;
jpayne@69 23650 int __pyx_clineno = 0;
jpayne@69 23651 __Pyx_RefNannySetupContext("__pyx_unpickle_asTuple__set_state", 1);
jpayne@69 23652 __Pyx_TraceCall("__pyx_unpickle_asTuple__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@69 23653
jpayne@69 23654 /* "(tree fragment)":12
jpayne@69 23655 * return __pyx_result
jpayne@69 23656 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state):
jpayne@69 23657 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@69 23658 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 23659 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 23660 */
jpayne@69 23661 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 23662 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 23663 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 23664 }
jpayne@69 23665 __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)
jpayne@69 23666 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23667 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 23668 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@69 23669 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@69 23670 __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_1;
jpayne@69 23671 __pyx_t_1 = 0;
jpayne@69 23672
jpayne@69 23673 /* "(tree fragment)":13
jpayne@69 23674 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state):
jpayne@69 23675 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23676 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 23677 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 23678 */
jpayne@69 23679 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 23680 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@69 23681 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 23682 }
jpayne@69 23683 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 23684 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@69 23685 if (__pyx_t_4) {
jpayne@69 23686 } else {
jpayne@69 23687 __pyx_t_2 = __pyx_t_4;
jpayne@69 23688 goto __pyx_L4_bool_binop_done;
jpayne@69 23689 }
jpayne@69 23690 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 23691 __pyx_t_2 = __pyx_t_4;
jpayne@69 23692 __pyx_L4_bool_binop_done:;
jpayne@69 23693 if (__pyx_t_2) {
jpayne@69 23694
jpayne@69 23695 /* "(tree fragment)":14
jpayne@69 23696 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23697 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 23698 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@69 23699 */
jpayne@69 23700 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 23701 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 23702 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 23703 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 23704 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 23705 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 23706 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 23707 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 23708 }
jpayne@69 23709 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 23710 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 23711 __pyx_t_7 = NULL;
jpayne@69 23712 __pyx_t_8 = 0;
jpayne@69 23713 #if CYTHON_UNPACK_METHODS
jpayne@69 23714 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@69 23715 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@69 23716 if (likely(__pyx_t_7)) {
jpayne@69 23717 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@69 23718 __Pyx_INCREF(__pyx_t_7);
jpayne@69 23719 __Pyx_INCREF(function);
jpayne@69 23720 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@69 23721 __pyx_t_8 = 1;
jpayne@69 23722 }
jpayne@69 23723 }
jpayne@69 23724 #endif
jpayne@69 23725 {
jpayne@69 23726 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@69 23727 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@69 23728 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 23729 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 23730 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 23731 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23732 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 23733 }
jpayne@69 23734 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23735
jpayne@69 23736 /* "(tree fragment)":13
jpayne@69 23737 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state):
jpayne@69 23738 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23739 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 23740 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 23741 */
jpayne@69 23742 }
jpayne@69 23743
jpayne@69 23744 /* "(tree fragment)":11
jpayne@69 23745 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@69 23746 * return __pyx_result
jpayne@69 23747 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 23748 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 23749 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 23750 */
jpayne@69 23751
jpayne@69 23752 /* function exit code */
jpayne@69 23753 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 23754 goto __pyx_L0;
jpayne@69 23755 __pyx_L1_error:;
jpayne@69 23756 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 23757 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 23758 __Pyx_XDECREF(__pyx_t_6);
jpayne@69 23759 __Pyx_XDECREF(__pyx_t_7);
jpayne@69 23760 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asTuple__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 23761 __pyx_r = 0;
jpayne@69 23762 __pyx_L0:;
jpayne@69 23763 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 23764 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 23765 __Pyx_RefNannyFinishContext();
jpayne@69 23766 return __pyx_r;
jpayne@69 23767 }
jpayne@69 23768
jpayne@69 23769 /* "(tree fragment)":1
jpayne@69 23770 * def __pyx_unpickle_asGFF3(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 23771 * cdef object __pyx_PickleError
jpayne@69 23772 * cdef object __pyx_result
jpayne@69 23773 */
jpayne@69 23774
jpayne@69 23775 /* Python wrapper */
jpayne@69 23776 static PyObject *__pyx_pw_5pysam_9libctabix_11__pyx_unpickle_asGFF3(PyObject *__pyx_self,
jpayne@69 23777 #if CYTHON_METH_FASTCALL
jpayne@69 23778 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 23779 #else
jpayne@69 23780 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 23781 #endif
jpayne@69 23782 ); /*proto*/
jpayne@69 23783 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_10__pyx_unpickle_asGFF3, "__pyx_unpickle_asGFF3(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@69 23784 static PyMethodDef __pyx_mdef_5pysam_9libctabix_11__pyx_unpickle_asGFF3 = {"__pyx_unpickle_asGFF3", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_11__pyx_unpickle_asGFF3, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_10__pyx_unpickle_asGFF3};
jpayne@69 23785 static PyObject *__pyx_pw_5pysam_9libctabix_11__pyx_unpickle_asGFF3(PyObject *__pyx_self,
jpayne@69 23786 #if CYTHON_METH_FASTCALL
jpayne@69 23787 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 23788 #else
jpayne@69 23789 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 23790 #endif
jpayne@69 23791 ) {
jpayne@69 23792 PyObject *__pyx_v___pyx_type = 0;
jpayne@69 23793 long __pyx_v___pyx_checksum;
jpayne@69 23794 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 23795 #if !CYTHON_METH_FASTCALL
jpayne@69 23796 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 23797 #endif
jpayne@69 23798 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 23799 PyObject* values[3] = {0,0,0};
jpayne@69 23800 int __pyx_lineno = 0;
jpayne@69 23801 const char *__pyx_filename = NULL;
jpayne@69 23802 int __pyx_clineno = 0;
jpayne@69 23803 PyObject *__pyx_r = 0;
jpayne@69 23804 __Pyx_RefNannyDeclarations
jpayne@69 23805 __Pyx_RefNannySetupContext("__pyx_unpickle_asGFF3 (wrapper)", 0);
jpayne@69 23806 #if !CYTHON_METH_FASTCALL
jpayne@69 23807 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 23808 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 23809 #else
jpayne@69 23810 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 23811 #endif
jpayne@69 23812 #endif
jpayne@69 23813 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 23814 {
jpayne@69 23815 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@69 23816 if (__pyx_kwds) {
jpayne@69 23817 Py_ssize_t kw_args;
jpayne@69 23818 switch (__pyx_nargs) {
jpayne@69 23819 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 23820 CYTHON_FALLTHROUGH;
jpayne@69 23821 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 23822 CYTHON_FALLTHROUGH;
jpayne@69 23823 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 23824 CYTHON_FALLTHROUGH;
jpayne@69 23825 case 0: break;
jpayne@69 23826 default: goto __pyx_L5_argtuple_error;
jpayne@69 23827 }
jpayne@69 23828 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 23829 switch (__pyx_nargs) {
jpayne@69 23830 case 0:
jpayne@69 23831 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@69 23832 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 23833 kw_args--;
jpayne@69 23834 }
jpayne@69 23835 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23836 else goto __pyx_L5_argtuple_error;
jpayne@69 23837 CYTHON_FALLTHROUGH;
jpayne@69 23838 case 1:
jpayne@69 23839 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@69 23840 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 23841 kw_args--;
jpayne@69 23842 }
jpayne@69 23843 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23844 else {
jpayne@69 23845 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGFF3", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23846 }
jpayne@69 23847 CYTHON_FALLTHROUGH;
jpayne@69 23848 case 2:
jpayne@69 23849 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 23850 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@69 23851 kw_args--;
jpayne@69 23852 }
jpayne@69 23853 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23854 else {
jpayne@69 23855 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGFF3", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23856 }
jpayne@69 23857 }
jpayne@69 23858 if (unlikely(kw_args > 0)) {
jpayne@69 23859 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 23860 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_asGFF3") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23861 }
jpayne@69 23862 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@69 23863 goto __pyx_L5_argtuple_error;
jpayne@69 23864 } else {
jpayne@69 23865 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 23866 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 23867 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 23868 }
jpayne@69 23869 __pyx_v___pyx_type = values[0];
jpayne@69 23870 __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)
jpayne@69 23871 __pyx_v___pyx_state = values[2];
jpayne@69 23872 }
jpayne@69 23873 goto __pyx_L6_skip;
jpayne@69 23874 __pyx_L5_argtuple_error:;
jpayne@69 23875 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGFF3", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 23876 __pyx_L6_skip:;
jpayne@69 23877 goto __pyx_L4_argument_unpacking_done;
jpayne@69 23878 __pyx_L3_error:;
jpayne@69 23879 {
jpayne@69 23880 Py_ssize_t __pyx_temp;
jpayne@69 23881 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 23882 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 23883 }
jpayne@69 23884 }
jpayne@69 23885 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGFF3", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 23886 __Pyx_RefNannyFinishContext();
jpayne@69 23887 return NULL;
jpayne@69 23888 __pyx_L4_argument_unpacking_done:;
jpayne@69 23889 __pyx_r = __pyx_pf_5pysam_9libctabix_10__pyx_unpickle_asGFF3(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
jpayne@69 23890
jpayne@69 23891 /* function exit code */
jpayne@69 23892 {
jpayne@69 23893 Py_ssize_t __pyx_temp;
jpayne@69 23894 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 23895 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 23896 }
jpayne@69 23897 }
jpayne@69 23898 __Pyx_RefNannyFinishContext();
jpayne@69 23899 return __pyx_r;
jpayne@69 23900 }
jpayne@69 23901
jpayne@69 23902 static PyObject *__pyx_pf_5pysam_9libctabix_10__pyx_unpickle_asGFF3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
jpayne@69 23903 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@69 23904 PyObject *__pyx_v___pyx_result = 0;
jpayne@69 23905 PyObject *__pyx_r = NULL;
jpayne@69 23906 __Pyx_TraceDeclarations
jpayne@69 23907 __Pyx_RefNannyDeclarations
jpayne@69 23908 PyObject *__pyx_t_1 = NULL;
jpayne@69 23909 int __pyx_t_2;
jpayne@69 23910 PyObject *__pyx_t_3 = NULL;
jpayne@69 23911 PyObject *__pyx_t_4 = NULL;
jpayne@69 23912 unsigned int __pyx_t_5;
jpayne@69 23913 int __pyx_lineno = 0;
jpayne@69 23914 const char *__pyx_filename = NULL;
jpayne@69 23915 int __pyx_clineno = 0;
jpayne@69 23916 __Pyx_TraceFrameInit(__pyx_codeobj__58)
jpayne@69 23917 __Pyx_RefNannySetupContext("__pyx_unpickle_asGFF3", 1);
jpayne@69 23918 __Pyx_TraceCall("__pyx_unpickle_asGFF3", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 23919
jpayne@69 23920 /* "(tree fragment)":4
jpayne@69 23921 * cdef object __pyx_PickleError
jpayne@69 23922 * cdef object __pyx_result
jpayne@69 23923 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 23924 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23925 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23926 */
jpayne@69 23927 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 23928 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23929 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__55, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 23930 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23931 if (__pyx_t_2) {
jpayne@69 23932
jpayne@69 23933 /* "(tree fragment)":5
jpayne@69 23934 * cdef object __pyx_result
jpayne@69 23935 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 23936 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@69 23937 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23938 * __pyx_result = asGFF3.__new__(__pyx_type)
jpayne@69 23939 */
jpayne@69 23940 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 23941 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23942 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@69 23943 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@69 23944 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 23945 __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)
jpayne@69 23946 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 23947 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23948 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 23949 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23950 __Pyx_INCREF(__pyx_t_1);
jpayne@69 23951 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@69 23952 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23953 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 23954
jpayne@69 23955 /* "(tree fragment)":6
jpayne@69 23956 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 23957 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23958 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@69 23959 * __pyx_result = asGFF3.__new__(__pyx_type)
jpayne@69 23960 * if __pyx_state is not None:
jpayne@69 23961 */
jpayne@69 23962 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 23963 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 23964 __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)
jpayne@69 23965 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 23966 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 23967 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@69 23968 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 23969 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 23970
jpayne@69 23971 /* "(tree fragment)":4
jpayne@69 23972 * cdef object __pyx_PickleError
jpayne@69 23973 * cdef object __pyx_result
jpayne@69 23974 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 23975 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23976 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23977 */
jpayne@69 23978 }
jpayne@69 23979
jpayne@69 23980 /* "(tree fragment)":7
jpayne@69 23981 * from pickle import PickleError as __pyx_PickleError
jpayne@69 23982 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 23983 * __pyx_result = asGFF3.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@69 23984 * if __pyx_state is not None:
jpayne@69 23985 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@69 23986 */
jpayne@69 23987 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_9libctabix_asGFF3), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 23988 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 23989 __pyx_t_4 = NULL;
jpayne@69 23990 __pyx_t_5 = 0;
jpayne@69 23991 #if CYTHON_UNPACK_METHODS
jpayne@69 23992 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 23993 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 23994 if (likely(__pyx_t_4)) {
jpayne@69 23995 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 23996 __Pyx_INCREF(__pyx_t_4);
jpayne@69 23997 __Pyx_INCREF(function);
jpayne@69 23998 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 23999 __pyx_t_5 = 1;
jpayne@69 24000 }
jpayne@69 24001 }
jpayne@69 24002 #endif
jpayne@69 24003 {
jpayne@69 24004 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@69 24005 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 24006 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 24007 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 24008 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24009 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 24010 }
jpayne@69 24011 __pyx_v___pyx_result = __pyx_t_1;
jpayne@69 24012 __pyx_t_1 = 0;
jpayne@69 24013
jpayne@69 24014 /* "(tree fragment)":8
jpayne@69 24015 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24016 * __pyx_result = asGFF3.__new__(__pyx_type)
jpayne@69 24017 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 24018 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@69 24019 * return __pyx_result
jpayne@69 24020 */
jpayne@69 24021 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@69 24022 if (__pyx_t_2) {
jpayne@69 24023
jpayne@69 24024 /* "(tree fragment)":9
jpayne@69 24025 * __pyx_result = asGFF3.__new__(__pyx_type)
jpayne@69 24026 * if __pyx_state is not None:
jpayne@69 24027 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 24028 * return __pyx_result
jpayne@69 24029 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state):
jpayne@69 24030 */
jpayne@69 24031 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)
jpayne@69 24032 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_asGFF3__set_state(((struct __pyx_obj_5pysam_9libctabix_asGFF3 *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
jpayne@69 24033 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24034 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24035
jpayne@69 24036 /* "(tree fragment)":8
jpayne@69 24037 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24038 * __pyx_result = asGFF3.__new__(__pyx_type)
jpayne@69 24039 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 24040 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@69 24041 * return __pyx_result
jpayne@69 24042 */
jpayne@69 24043 }
jpayne@69 24044
jpayne@69 24045 /* "(tree fragment)":10
jpayne@69 24046 * if __pyx_state is not None:
jpayne@69 24047 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@69 24048 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@69 24049 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state):
jpayne@69 24050 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24051 */
jpayne@69 24052 __Pyx_XDECREF(__pyx_r);
jpayne@69 24053 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@69 24054 __pyx_r = __pyx_v___pyx_result;
jpayne@69 24055 goto __pyx_L0;
jpayne@69 24056
jpayne@69 24057 /* "(tree fragment)":1
jpayne@69 24058 * def __pyx_unpickle_asGFF3(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 24059 * cdef object __pyx_PickleError
jpayne@69 24060 * cdef object __pyx_result
jpayne@69 24061 */
jpayne@69 24062
jpayne@69 24063 /* function exit code */
jpayne@69 24064 __pyx_L1_error:;
jpayne@69 24065 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 24066 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 24067 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 24068 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGFF3", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 24069 __pyx_r = NULL;
jpayne@69 24070 __pyx_L0:;
jpayne@69 24071 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@69 24072 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@69 24073 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 24074 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 24075 __Pyx_RefNannyFinishContext();
jpayne@69 24076 return __pyx_r;
jpayne@69 24077 }
jpayne@69 24078
jpayne@69 24079 /* "(tree fragment)":11
jpayne@69 24080 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@69 24081 * return __pyx_result
jpayne@69 24082 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 24083 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24084 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 24085 */
jpayne@69 24086
jpayne@69 24087 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asGFF3__set_state(struct __pyx_obj_5pysam_9libctabix_asGFF3 *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
jpayne@69 24088 PyObject *__pyx_r = NULL;
jpayne@69 24089 __Pyx_TraceDeclarations
jpayne@69 24090 __Pyx_RefNannyDeclarations
jpayne@69 24091 PyObject *__pyx_t_1 = NULL;
jpayne@69 24092 int __pyx_t_2;
jpayne@69 24093 Py_ssize_t __pyx_t_3;
jpayne@69 24094 int __pyx_t_4;
jpayne@69 24095 PyObject *__pyx_t_5 = NULL;
jpayne@69 24096 PyObject *__pyx_t_6 = NULL;
jpayne@69 24097 PyObject *__pyx_t_7 = NULL;
jpayne@69 24098 unsigned int __pyx_t_8;
jpayne@69 24099 int __pyx_lineno = 0;
jpayne@69 24100 const char *__pyx_filename = NULL;
jpayne@69 24101 int __pyx_clineno = 0;
jpayne@69 24102 __Pyx_RefNannySetupContext("__pyx_unpickle_asGFF3__set_state", 1);
jpayne@69 24103 __Pyx_TraceCall("__pyx_unpickle_asGFF3__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@69 24104
jpayne@69 24105 /* "(tree fragment)":12
jpayne@69 24106 * return __pyx_result
jpayne@69 24107 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state):
jpayne@69 24108 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@69 24109 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 24110 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 24111 */
jpayne@69 24112 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 24113 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 24114 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 24115 }
jpayne@69 24116 __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)
jpayne@69 24117 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24118 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 24119 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@69 24120 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@69 24121 __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_1;
jpayne@69 24122 __pyx_t_1 = 0;
jpayne@69 24123
jpayne@69 24124 /* "(tree fragment)":13
jpayne@69 24125 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state):
jpayne@69 24126 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24127 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 24128 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 24129 */
jpayne@69 24130 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 24131 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@69 24132 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 24133 }
jpayne@69 24134 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 24135 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@69 24136 if (__pyx_t_4) {
jpayne@69 24137 } else {
jpayne@69 24138 __pyx_t_2 = __pyx_t_4;
jpayne@69 24139 goto __pyx_L4_bool_binop_done;
jpayne@69 24140 }
jpayne@69 24141 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 24142 __pyx_t_2 = __pyx_t_4;
jpayne@69 24143 __pyx_L4_bool_binop_done:;
jpayne@69 24144 if (__pyx_t_2) {
jpayne@69 24145
jpayne@69 24146 /* "(tree fragment)":14
jpayne@69 24147 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24148 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 24149 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@69 24150 */
jpayne@69 24151 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 24152 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 24153 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 24154 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 24155 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 24156 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 24157 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 24158 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 24159 }
jpayne@69 24160 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 24161 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 24162 __pyx_t_7 = NULL;
jpayne@69 24163 __pyx_t_8 = 0;
jpayne@69 24164 #if CYTHON_UNPACK_METHODS
jpayne@69 24165 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@69 24166 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@69 24167 if (likely(__pyx_t_7)) {
jpayne@69 24168 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@69 24169 __Pyx_INCREF(__pyx_t_7);
jpayne@69 24170 __Pyx_INCREF(function);
jpayne@69 24171 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@69 24172 __pyx_t_8 = 1;
jpayne@69 24173 }
jpayne@69 24174 }
jpayne@69 24175 #endif
jpayne@69 24176 {
jpayne@69 24177 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@69 24178 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@69 24179 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 24180 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 24181 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 24182 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24183 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 24184 }
jpayne@69 24185 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24186
jpayne@69 24187 /* "(tree fragment)":13
jpayne@69 24188 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state):
jpayne@69 24189 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24190 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 24191 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 24192 */
jpayne@69 24193 }
jpayne@69 24194
jpayne@69 24195 /* "(tree fragment)":11
jpayne@69 24196 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@69 24197 * return __pyx_result
jpayne@69 24198 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 24199 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24200 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 24201 */
jpayne@69 24202
jpayne@69 24203 /* function exit code */
jpayne@69 24204 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 24205 goto __pyx_L0;
jpayne@69 24206 __pyx_L1_error:;
jpayne@69 24207 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 24208 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 24209 __Pyx_XDECREF(__pyx_t_6);
jpayne@69 24210 __Pyx_XDECREF(__pyx_t_7);
jpayne@69 24211 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGFF3__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 24212 __pyx_r = 0;
jpayne@69 24213 __pyx_L0:;
jpayne@69 24214 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 24215 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 24216 __Pyx_RefNannyFinishContext();
jpayne@69 24217 return __pyx_r;
jpayne@69 24218 }
jpayne@69 24219
jpayne@69 24220 /* "(tree fragment)":1
jpayne@69 24221 * def __pyx_unpickle_asGTF(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 24222 * cdef object __pyx_PickleError
jpayne@69 24223 * cdef object __pyx_result
jpayne@69 24224 */
jpayne@69 24225
jpayne@69 24226 /* Python wrapper */
jpayne@69 24227 static PyObject *__pyx_pw_5pysam_9libctabix_13__pyx_unpickle_asGTF(PyObject *__pyx_self,
jpayne@69 24228 #if CYTHON_METH_FASTCALL
jpayne@69 24229 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 24230 #else
jpayne@69 24231 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 24232 #endif
jpayne@69 24233 ); /*proto*/
jpayne@69 24234 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_12__pyx_unpickle_asGTF, "__pyx_unpickle_asGTF(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@69 24235 static PyMethodDef __pyx_mdef_5pysam_9libctabix_13__pyx_unpickle_asGTF = {"__pyx_unpickle_asGTF", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_13__pyx_unpickle_asGTF, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_12__pyx_unpickle_asGTF};
jpayne@69 24236 static PyObject *__pyx_pw_5pysam_9libctabix_13__pyx_unpickle_asGTF(PyObject *__pyx_self,
jpayne@69 24237 #if CYTHON_METH_FASTCALL
jpayne@69 24238 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 24239 #else
jpayne@69 24240 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 24241 #endif
jpayne@69 24242 ) {
jpayne@69 24243 PyObject *__pyx_v___pyx_type = 0;
jpayne@69 24244 long __pyx_v___pyx_checksum;
jpayne@69 24245 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 24246 #if !CYTHON_METH_FASTCALL
jpayne@69 24247 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 24248 #endif
jpayne@69 24249 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 24250 PyObject* values[3] = {0,0,0};
jpayne@69 24251 int __pyx_lineno = 0;
jpayne@69 24252 const char *__pyx_filename = NULL;
jpayne@69 24253 int __pyx_clineno = 0;
jpayne@69 24254 PyObject *__pyx_r = 0;
jpayne@69 24255 __Pyx_RefNannyDeclarations
jpayne@69 24256 __Pyx_RefNannySetupContext("__pyx_unpickle_asGTF (wrapper)", 0);
jpayne@69 24257 #if !CYTHON_METH_FASTCALL
jpayne@69 24258 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 24259 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 24260 #else
jpayne@69 24261 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 24262 #endif
jpayne@69 24263 #endif
jpayne@69 24264 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 24265 {
jpayne@69 24266 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@69 24267 if (__pyx_kwds) {
jpayne@69 24268 Py_ssize_t kw_args;
jpayne@69 24269 switch (__pyx_nargs) {
jpayne@69 24270 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 24271 CYTHON_FALLTHROUGH;
jpayne@69 24272 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 24273 CYTHON_FALLTHROUGH;
jpayne@69 24274 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 24275 CYTHON_FALLTHROUGH;
jpayne@69 24276 case 0: break;
jpayne@69 24277 default: goto __pyx_L5_argtuple_error;
jpayne@69 24278 }
jpayne@69 24279 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 24280 switch (__pyx_nargs) {
jpayne@69 24281 case 0:
jpayne@69 24282 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@69 24283 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 24284 kw_args--;
jpayne@69 24285 }
jpayne@69 24286 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24287 else goto __pyx_L5_argtuple_error;
jpayne@69 24288 CYTHON_FALLTHROUGH;
jpayne@69 24289 case 1:
jpayne@69 24290 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@69 24291 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 24292 kw_args--;
jpayne@69 24293 }
jpayne@69 24294 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24295 else {
jpayne@69 24296 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGTF", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24297 }
jpayne@69 24298 CYTHON_FALLTHROUGH;
jpayne@69 24299 case 2:
jpayne@69 24300 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 24301 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@69 24302 kw_args--;
jpayne@69 24303 }
jpayne@69 24304 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24305 else {
jpayne@69 24306 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGTF", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24307 }
jpayne@69 24308 }
jpayne@69 24309 if (unlikely(kw_args > 0)) {
jpayne@69 24310 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 24311 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_asGTF") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24312 }
jpayne@69 24313 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@69 24314 goto __pyx_L5_argtuple_error;
jpayne@69 24315 } else {
jpayne@69 24316 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 24317 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 24318 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 24319 }
jpayne@69 24320 __pyx_v___pyx_type = values[0];
jpayne@69 24321 __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)
jpayne@69 24322 __pyx_v___pyx_state = values[2];
jpayne@69 24323 }
jpayne@69 24324 goto __pyx_L6_skip;
jpayne@69 24325 __pyx_L5_argtuple_error:;
jpayne@69 24326 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGTF", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24327 __pyx_L6_skip:;
jpayne@69 24328 goto __pyx_L4_argument_unpacking_done;
jpayne@69 24329 __pyx_L3_error:;
jpayne@69 24330 {
jpayne@69 24331 Py_ssize_t __pyx_temp;
jpayne@69 24332 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 24333 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 24334 }
jpayne@69 24335 }
jpayne@69 24336 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGTF", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 24337 __Pyx_RefNannyFinishContext();
jpayne@69 24338 return NULL;
jpayne@69 24339 __pyx_L4_argument_unpacking_done:;
jpayne@69 24340 __pyx_r = __pyx_pf_5pysam_9libctabix_12__pyx_unpickle_asGTF(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
jpayne@69 24341
jpayne@69 24342 /* function exit code */
jpayne@69 24343 {
jpayne@69 24344 Py_ssize_t __pyx_temp;
jpayne@69 24345 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 24346 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 24347 }
jpayne@69 24348 }
jpayne@69 24349 __Pyx_RefNannyFinishContext();
jpayne@69 24350 return __pyx_r;
jpayne@69 24351 }
jpayne@69 24352
jpayne@69 24353 static PyObject *__pyx_pf_5pysam_9libctabix_12__pyx_unpickle_asGTF(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
jpayne@69 24354 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@69 24355 PyObject *__pyx_v___pyx_result = 0;
jpayne@69 24356 PyObject *__pyx_r = NULL;
jpayne@69 24357 __Pyx_TraceDeclarations
jpayne@69 24358 __Pyx_RefNannyDeclarations
jpayne@69 24359 PyObject *__pyx_t_1 = NULL;
jpayne@69 24360 int __pyx_t_2;
jpayne@69 24361 PyObject *__pyx_t_3 = NULL;
jpayne@69 24362 PyObject *__pyx_t_4 = NULL;
jpayne@69 24363 unsigned int __pyx_t_5;
jpayne@69 24364 int __pyx_lineno = 0;
jpayne@69 24365 const char *__pyx_filename = NULL;
jpayne@69 24366 int __pyx_clineno = 0;
jpayne@69 24367 __Pyx_TraceFrameInit(__pyx_codeobj__59)
jpayne@69 24368 __Pyx_RefNannySetupContext("__pyx_unpickle_asGTF", 1);
jpayne@69 24369 __Pyx_TraceCall("__pyx_unpickle_asGTF", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 24370
jpayne@69 24371 /* "(tree fragment)":4
jpayne@69 24372 * cdef object __pyx_PickleError
jpayne@69 24373 * cdef object __pyx_result
jpayne@69 24374 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 24375 * from pickle import PickleError as __pyx_PickleError
jpayne@69 24376 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24377 */
jpayne@69 24378 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 24379 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24380 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__55, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 24381 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24382 if (__pyx_t_2) {
jpayne@69 24383
jpayne@69 24384 /* "(tree fragment)":5
jpayne@69 24385 * cdef object __pyx_result
jpayne@69 24386 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 24387 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@69 24388 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24389 * __pyx_result = asGTF.__new__(__pyx_type)
jpayne@69 24390 */
jpayne@69 24391 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 24392 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24393 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@69 24394 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@69 24395 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 24396 __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)
jpayne@69 24397 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 24398 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24399 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 24400 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24401 __Pyx_INCREF(__pyx_t_1);
jpayne@69 24402 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@69 24403 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24404 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 24405
jpayne@69 24406 /* "(tree fragment)":6
jpayne@69 24407 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 24408 * from pickle import PickleError as __pyx_PickleError
jpayne@69 24409 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@69 24410 * __pyx_result = asGTF.__new__(__pyx_type)
jpayne@69 24411 * if __pyx_state is not None:
jpayne@69 24412 */
jpayne@69 24413 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 24414 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 24415 __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)
jpayne@69 24416 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24417 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 24418 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@69 24419 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24420 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 24421
jpayne@69 24422 /* "(tree fragment)":4
jpayne@69 24423 * cdef object __pyx_PickleError
jpayne@69 24424 * cdef object __pyx_result
jpayne@69 24425 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 24426 * from pickle import PickleError as __pyx_PickleError
jpayne@69 24427 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24428 */
jpayne@69 24429 }
jpayne@69 24430
jpayne@69 24431 /* "(tree fragment)":7
jpayne@69 24432 * from pickle import PickleError as __pyx_PickleError
jpayne@69 24433 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24434 * __pyx_result = asGTF.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@69 24435 * if __pyx_state is not None:
jpayne@69 24436 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@69 24437 */
jpayne@69 24438 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_9libctabix_asGTF), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 24439 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 24440 __pyx_t_4 = NULL;
jpayne@69 24441 __pyx_t_5 = 0;
jpayne@69 24442 #if CYTHON_UNPACK_METHODS
jpayne@69 24443 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 24444 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 24445 if (likely(__pyx_t_4)) {
jpayne@69 24446 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 24447 __Pyx_INCREF(__pyx_t_4);
jpayne@69 24448 __Pyx_INCREF(function);
jpayne@69 24449 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 24450 __pyx_t_5 = 1;
jpayne@69 24451 }
jpayne@69 24452 }
jpayne@69 24453 #endif
jpayne@69 24454 {
jpayne@69 24455 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@69 24456 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 24457 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 24458 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 24459 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24460 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 24461 }
jpayne@69 24462 __pyx_v___pyx_result = __pyx_t_1;
jpayne@69 24463 __pyx_t_1 = 0;
jpayne@69 24464
jpayne@69 24465 /* "(tree fragment)":8
jpayne@69 24466 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24467 * __pyx_result = asGTF.__new__(__pyx_type)
jpayne@69 24468 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 24469 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@69 24470 * return __pyx_result
jpayne@69 24471 */
jpayne@69 24472 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@69 24473 if (__pyx_t_2) {
jpayne@69 24474
jpayne@69 24475 /* "(tree fragment)":9
jpayne@69 24476 * __pyx_result = asGTF.__new__(__pyx_type)
jpayne@69 24477 * if __pyx_state is not None:
jpayne@69 24478 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 24479 * return __pyx_result
jpayne@69 24480 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state):
jpayne@69 24481 */
jpayne@69 24482 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)
jpayne@69 24483 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_asGTF__set_state(((struct __pyx_obj_5pysam_9libctabix_asGTF *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
jpayne@69 24484 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24485 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24486
jpayne@69 24487 /* "(tree fragment)":8
jpayne@69 24488 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24489 * __pyx_result = asGTF.__new__(__pyx_type)
jpayne@69 24490 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 24491 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@69 24492 * return __pyx_result
jpayne@69 24493 */
jpayne@69 24494 }
jpayne@69 24495
jpayne@69 24496 /* "(tree fragment)":10
jpayne@69 24497 * if __pyx_state is not None:
jpayne@69 24498 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@69 24499 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@69 24500 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state):
jpayne@69 24501 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24502 */
jpayne@69 24503 __Pyx_XDECREF(__pyx_r);
jpayne@69 24504 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@69 24505 __pyx_r = __pyx_v___pyx_result;
jpayne@69 24506 goto __pyx_L0;
jpayne@69 24507
jpayne@69 24508 /* "(tree fragment)":1
jpayne@69 24509 * def __pyx_unpickle_asGTF(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 24510 * cdef object __pyx_PickleError
jpayne@69 24511 * cdef object __pyx_result
jpayne@69 24512 */
jpayne@69 24513
jpayne@69 24514 /* function exit code */
jpayne@69 24515 __pyx_L1_error:;
jpayne@69 24516 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 24517 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 24518 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 24519 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGTF", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 24520 __pyx_r = NULL;
jpayne@69 24521 __pyx_L0:;
jpayne@69 24522 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@69 24523 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@69 24524 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 24525 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 24526 __Pyx_RefNannyFinishContext();
jpayne@69 24527 return __pyx_r;
jpayne@69 24528 }
jpayne@69 24529
jpayne@69 24530 /* "(tree fragment)":11
jpayne@69 24531 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@69 24532 * return __pyx_result
jpayne@69 24533 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 24534 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24535 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 24536 */
jpayne@69 24537
jpayne@69 24538 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asGTF__set_state(struct __pyx_obj_5pysam_9libctabix_asGTF *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
jpayne@69 24539 PyObject *__pyx_r = NULL;
jpayne@69 24540 __Pyx_TraceDeclarations
jpayne@69 24541 __Pyx_RefNannyDeclarations
jpayne@69 24542 PyObject *__pyx_t_1 = NULL;
jpayne@69 24543 int __pyx_t_2;
jpayne@69 24544 Py_ssize_t __pyx_t_3;
jpayne@69 24545 int __pyx_t_4;
jpayne@69 24546 PyObject *__pyx_t_5 = NULL;
jpayne@69 24547 PyObject *__pyx_t_6 = NULL;
jpayne@69 24548 PyObject *__pyx_t_7 = NULL;
jpayne@69 24549 unsigned int __pyx_t_8;
jpayne@69 24550 int __pyx_lineno = 0;
jpayne@69 24551 const char *__pyx_filename = NULL;
jpayne@69 24552 int __pyx_clineno = 0;
jpayne@69 24553 __Pyx_RefNannySetupContext("__pyx_unpickle_asGTF__set_state", 1);
jpayne@69 24554 __Pyx_TraceCall("__pyx_unpickle_asGTF__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@69 24555
jpayne@69 24556 /* "(tree fragment)":12
jpayne@69 24557 * return __pyx_result
jpayne@69 24558 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state):
jpayne@69 24559 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@69 24560 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 24561 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 24562 */
jpayne@69 24563 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 24564 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 24565 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 24566 }
jpayne@69 24567 __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)
jpayne@69 24568 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24569 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 24570 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@69 24571 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@69 24572 __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_1;
jpayne@69 24573 __pyx_t_1 = 0;
jpayne@69 24574
jpayne@69 24575 /* "(tree fragment)":13
jpayne@69 24576 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state):
jpayne@69 24577 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24578 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 24579 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 24580 */
jpayne@69 24581 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 24582 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@69 24583 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 24584 }
jpayne@69 24585 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 24586 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@69 24587 if (__pyx_t_4) {
jpayne@69 24588 } else {
jpayne@69 24589 __pyx_t_2 = __pyx_t_4;
jpayne@69 24590 goto __pyx_L4_bool_binop_done;
jpayne@69 24591 }
jpayne@69 24592 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 24593 __pyx_t_2 = __pyx_t_4;
jpayne@69 24594 __pyx_L4_bool_binop_done:;
jpayne@69 24595 if (__pyx_t_2) {
jpayne@69 24596
jpayne@69 24597 /* "(tree fragment)":14
jpayne@69 24598 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24599 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 24600 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@69 24601 */
jpayne@69 24602 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 24603 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 24604 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 24605 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 24606 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 24607 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 24608 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 24609 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 24610 }
jpayne@69 24611 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 24612 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 24613 __pyx_t_7 = NULL;
jpayne@69 24614 __pyx_t_8 = 0;
jpayne@69 24615 #if CYTHON_UNPACK_METHODS
jpayne@69 24616 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@69 24617 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@69 24618 if (likely(__pyx_t_7)) {
jpayne@69 24619 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@69 24620 __Pyx_INCREF(__pyx_t_7);
jpayne@69 24621 __Pyx_INCREF(function);
jpayne@69 24622 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@69 24623 __pyx_t_8 = 1;
jpayne@69 24624 }
jpayne@69 24625 }
jpayne@69 24626 #endif
jpayne@69 24627 {
jpayne@69 24628 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@69 24629 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@69 24630 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 24631 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 24632 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 24633 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24634 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 24635 }
jpayne@69 24636 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24637
jpayne@69 24638 /* "(tree fragment)":13
jpayne@69 24639 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state):
jpayne@69 24640 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24641 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 24642 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 24643 */
jpayne@69 24644 }
jpayne@69 24645
jpayne@69 24646 /* "(tree fragment)":11
jpayne@69 24647 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@69 24648 * return __pyx_result
jpayne@69 24649 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 24650 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24651 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 24652 */
jpayne@69 24653
jpayne@69 24654 /* function exit code */
jpayne@69 24655 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 24656 goto __pyx_L0;
jpayne@69 24657 __pyx_L1_error:;
jpayne@69 24658 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 24659 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 24660 __Pyx_XDECREF(__pyx_t_6);
jpayne@69 24661 __Pyx_XDECREF(__pyx_t_7);
jpayne@69 24662 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGTF__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 24663 __pyx_r = 0;
jpayne@69 24664 __pyx_L0:;
jpayne@69 24665 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 24666 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 24667 __Pyx_RefNannyFinishContext();
jpayne@69 24668 return __pyx_r;
jpayne@69 24669 }
jpayne@69 24670
jpayne@69 24671 /* "(tree fragment)":1
jpayne@69 24672 * def __pyx_unpickle_asBed(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 24673 * cdef object __pyx_PickleError
jpayne@69 24674 * cdef object __pyx_result
jpayne@69 24675 */
jpayne@69 24676
jpayne@69 24677 /* Python wrapper */
jpayne@69 24678 static PyObject *__pyx_pw_5pysam_9libctabix_15__pyx_unpickle_asBed(PyObject *__pyx_self,
jpayne@69 24679 #if CYTHON_METH_FASTCALL
jpayne@69 24680 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 24681 #else
jpayne@69 24682 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 24683 #endif
jpayne@69 24684 ); /*proto*/
jpayne@69 24685 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_14__pyx_unpickle_asBed, "__pyx_unpickle_asBed(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@69 24686 static PyMethodDef __pyx_mdef_5pysam_9libctabix_15__pyx_unpickle_asBed = {"__pyx_unpickle_asBed", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_15__pyx_unpickle_asBed, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_14__pyx_unpickle_asBed};
jpayne@69 24687 static PyObject *__pyx_pw_5pysam_9libctabix_15__pyx_unpickle_asBed(PyObject *__pyx_self,
jpayne@69 24688 #if CYTHON_METH_FASTCALL
jpayne@69 24689 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 24690 #else
jpayne@69 24691 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 24692 #endif
jpayne@69 24693 ) {
jpayne@69 24694 PyObject *__pyx_v___pyx_type = 0;
jpayne@69 24695 long __pyx_v___pyx_checksum;
jpayne@69 24696 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 24697 #if !CYTHON_METH_FASTCALL
jpayne@69 24698 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 24699 #endif
jpayne@69 24700 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 24701 PyObject* values[3] = {0,0,0};
jpayne@69 24702 int __pyx_lineno = 0;
jpayne@69 24703 const char *__pyx_filename = NULL;
jpayne@69 24704 int __pyx_clineno = 0;
jpayne@69 24705 PyObject *__pyx_r = 0;
jpayne@69 24706 __Pyx_RefNannyDeclarations
jpayne@69 24707 __Pyx_RefNannySetupContext("__pyx_unpickle_asBed (wrapper)", 0);
jpayne@69 24708 #if !CYTHON_METH_FASTCALL
jpayne@69 24709 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 24710 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 24711 #else
jpayne@69 24712 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 24713 #endif
jpayne@69 24714 #endif
jpayne@69 24715 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 24716 {
jpayne@69 24717 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@69 24718 if (__pyx_kwds) {
jpayne@69 24719 Py_ssize_t kw_args;
jpayne@69 24720 switch (__pyx_nargs) {
jpayne@69 24721 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 24722 CYTHON_FALLTHROUGH;
jpayne@69 24723 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 24724 CYTHON_FALLTHROUGH;
jpayne@69 24725 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 24726 CYTHON_FALLTHROUGH;
jpayne@69 24727 case 0: break;
jpayne@69 24728 default: goto __pyx_L5_argtuple_error;
jpayne@69 24729 }
jpayne@69 24730 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 24731 switch (__pyx_nargs) {
jpayne@69 24732 case 0:
jpayne@69 24733 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@69 24734 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 24735 kw_args--;
jpayne@69 24736 }
jpayne@69 24737 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24738 else goto __pyx_L5_argtuple_error;
jpayne@69 24739 CYTHON_FALLTHROUGH;
jpayne@69 24740 case 1:
jpayne@69 24741 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@69 24742 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 24743 kw_args--;
jpayne@69 24744 }
jpayne@69 24745 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24746 else {
jpayne@69 24747 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asBed", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24748 }
jpayne@69 24749 CYTHON_FALLTHROUGH;
jpayne@69 24750 case 2:
jpayne@69 24751 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 24752 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@69 24753 kw_args--;
jpayne@69 24754 }
jpayne@69 24755 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24756 else {
jpayne@69 24757 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asBed", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24758 }
jpayne@69 24759 }
jpayne@69 24760 if (unlikely(kw_args > 0)) {
jpayne@69 24761 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 24762 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_asBed") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24763 }
jpayne@69 24764 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@69 24765 goto __pyx_L5_argtuple_error;
jpayne@69 24766 } else {
jpayne@69 24767 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 24768 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 24769 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 24770 }
jpayne@69 24771 __pyx_v___pyx_type = values[0];
jpayne@69 24772 __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)
jpayne@69 24773 __pyx_v___pyx_state = values[2];
jpayne@69 24774 }
jpayne@69 24775 goto __pyx_L6_skip;
jpayne@69 24776 __pyx_L5_argtuple_error:;
jpayne@69 24777 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asBed", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 24778 __pyx_L6_skip:;
jpayne@69 24779 goto __pyx_L4_argument_unpacking_done;
jpayne@69 24780 __pyx_L3_error:;
jpayne@69 24781 {
jpayne@69 24782 Py_ssize_t __pyx_temp;
jpayne@69 24783 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 24784 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 24785 }
jpayne@69 24786 }
jpayne@69 24787 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asBed", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 24788 __Pyx_RefNannyFinishContext();
jpayne@69 24789 return NULL;
jpayne@69 24790 __pyx_L4_argument_unpacking_done:;
jpayne@69 24791 __pyx_r = __pyx_pf_5pysam_9libctabix_14__pyx_unpickle_asBed(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
jpayne@69 24792
jpayne@69 24793 /* function exit code */
jpayne@69 24794 {
jpayne@69 24795 Py_ssize_t __pyx_temp;
jpayne@69 24796 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 24797 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 24798 }
jpayne@69 24799 }
jpayne@69 24800 __Pyx_RefNannyFinishContext();
jpayne@69 24801 return __pyx_r;
jpayne@69 24802 }
jpayne@69 24803
jpayne@69 24804 static PyObject *__pyx_pf_5pysam_9libctabix_14__pyx_unpickle_asBed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
jpayne@69 24805 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@69 24806 PyObject *__pyx_v___pyx_result = 0;
jpayne@69 24807 PyObject *__pyx_r = NULL;
jpayne@69 24808 __Pyx_TraceDeclarations
jpayne@69 24809 __Pyx_RefNannyDeclarations
jpayne@69 24810 PyObject *__pyx_t_1 = NULL;
jpayne@69 24811 int __pyx_t_2;
jpayne@69 24812 PyObject *__pyx_t_3 = NULL;
jpayne@69 24813 PyObject *__pyx_t_4 = NULL;
jpayne@69 24814 unsigned int __pyx_t_5;
jpayne@69 24815 int __pyx_lineno = 0;
jpayne@69 24816 const char *__pyx_filename = NULL;
jpayne@69 24817 int __pyx_clineno = 0;
jpayne@69 24818 __Pyx_TraceFrameInit(__pyx_codeobj__60)
jpayne@69 24819 __Pyx_RefNannySetupContext("__pyx_unpickle_asBed", 1);
jpayne@69 24820 __Pyx_TraceCall("__pyx_unpickle_asBed", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 24821
jpayne@69 24822 /* "(tree fragment)":4
jpayne@69 24823 * cdef object __pyx_PickleError
jpayne@69 24824 * cdef object __pyx_result
jpayne@69 24825 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 24826 * from pickle import PickleError as __pyx_PickleError
jpayne@69 24827 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24828 */
jpayne@69 24829 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 24830 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24831 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__55, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 24832 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24833 if (__pyx_t_2) {
jpayne@69 24834
jpayne@69 24835 /* "(tree fragment)":5
jpayne@69 24836 * cdef object __pyx_result
jpayne@69 24837 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 24838 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@69 24839 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24840 * __pyx_result = asBed.__new__(__pyx_type)
jpayne@69 24841 */
jpayne@69 24842 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 24843 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24844 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@69 24845 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@69 24846 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 24847 __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)
jpayne@69 24848 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 24849 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24850 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 24851 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24852 __Pyx_INCREF(__pyx_t_1);
jpayne@69 24853 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@69 24854 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24855 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 24856
jpayne@69 24857 /* "(tree fragment)":6
jpayne@69 24858 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 24859 * from pickle import PickleError as __pyx_PickleError
jpayne@69 24860 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@69 24861 * __pyx_result = asBed.__new__(__pyx_type)
jpayne@69 24862 * if __pyx_state is not None:
jpayne@69 24863 */
jpayne@69 24864 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 24865 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 24866 __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)
jpayne@69 24867 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24868 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 24869 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@69 24870 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24871 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 24872
jpayne@69 24873 /* "(tree fragment)":4
jpayne@69 24874 * cdef object __pyx_PickleError
jpayne@69 24875 * cdef object __pyx_result
jpayne@69 24876 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 24877 * from pickle import PickleError as __pyx_PickleError
jpayne@69 24878 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24879 */
jpayne@69 24880 }
jpayne@69 24881
jpayne@69 24882 /* "(tree fragment)":7
jpayne@69 24883 * from pickle import PickleError as __pyx_PickleError
jpayne@69 24884 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24885 * __pyx_result = asBed.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@69 24886 * if __pyx_state is not None:
jpayne@69 24887 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@69 24888 */
jpayne@69 24889 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_9libctabix_asBed), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 24890 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 24891 __pyx_t_4 = NULL;
jpayne@69 24892 __pyx_t_5 = 0;
jpayne@69 24893 #if CYTHON_UNPACK_METHODS
jpayne@69 24894 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 24895 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 24896 if (likely(__pyx_t_4)) {
jpayne@69 24897 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 24898 __Pyx_INCREF(__pyx_t_4);
jpayne@69 24899 __Pyx_INCREF(function);
jpayne@69 24900 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 24901 __pyx_t_5 = 1;
jpayne@69 24902 }
jpayne@69 24903 }
jpayne@69 24904 #endif
jpayne@69 24905 {
jpayne@69 24906 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@69 24907 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 24908 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 24909 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 24910 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24911 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 24912 }
jpayne@69 24913 __pyx_v___pyx_result = __pyx_t_1;
jpayne@69 24914 __pyx_t_1 = 0;
jpayne@69 24915
jpayne@69 24916 /* "(tree fragment)":8
jpayne@69 24917 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24918 * __pyx_result = asBed.__new__(__pyx_type)
jpayne@69 24919 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 24920 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@69 24921 * return __pyx_result
jpayne@69 24922 */
jpayne@69 24923 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@69 24924 if (__pyx_t_2) {
jpayne@69 24925
jpayne@69 24926 /* "(tree fragment)":9
jpayne@69 24927 * __pyx_result = asBed.__new__(__pyx_type)
jpayne@69 24928 * if __pyx_state is not None:
jpayne@69 24929 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 24930 * return __pyx_result
jpayne@69 24931 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state):
jpayne@69 24932 */
jpayne@69 24933 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)
jpayne@69 24934 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_asBed__set_state(((struct __pyx_obj_5pysam_9libctabix_asBed *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
jpayne@69 24935 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 24936 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 24937
jpayne@69 24938 /* "(tree fragment)":8
jpayne@69 24939 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 24940 * __pyx_result = asBed.__new__(__pyx_type)
jpayne@69 24941 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 24942 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@69 24943 * return __pyx_result
jpayne@69 24944 */
jpayne@69 24945 }
jpayne@69 24946
jpayne@69 24947 /* "(tree fragment)":10
jpayne@69 24948 * if __pyx_state is not None:
jpayne@69 24949 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@69 24950 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@69 24951 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state):
jpayne@69 24952 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24953 */
jpayne@69 24954 __Pyx_XDECREF(__pyx_r);
jpayne@69 24955 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@69 24956 __pyx_r = __pyx_v___pyx_result;
jpayne@69 24957 goto __pyx_L0;
jpayne@69 24958
jpayne@69 24959 /* "(tree fragment)":1
jpayne@69 24960 * def __pyx_unpickle_asBed(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 24961 * cdef object __pyx_PickleError
jpayne@69 24962 * cdef object __pyx_result
jpayne@69 24963 */
jpayne@69 24964
jpayne@69 24965 /* function exit code */
jpayne@69 24966 __pyx_L1_error:;
jpayne@69 24967 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 24968 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 24969 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 24970 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asBed", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 24971 __pyx_r = NULL;
jpayne@69 24972 __pyx_L0:;
jpayne@69 24973 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@69 24974 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@69 24975 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 24976 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 24977 __Pyx_RefNannyFinishContext();
jpayne@69 24978 return __pyx_r;
jpayne@69 24979 }
jpayne@69 24980
jpayne@69 24981 /* "(tree fragment)":11
jpayne@69 24982 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@69 24983 * return __pyx_result
jpayne@69 24984 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 24985 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 24986 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 24987 */
jpayne@69 24988
jpayne@69 24989 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asBed__set_state(struct __pyx_obj_5pysam_9libctabix_asBed *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
jpayne@69 24990 PyObject *__pyx_r = NULL;
jpayne@69 24991 __Pyx_TraceDeclarations
jpayne@69 24992 __Pyx_RefNannyDeclarations
jpayne@69 24993 PyObject *__pyx_t_1 = NULL;
jpayne@69 24994 int __pyx_t_2;
jpayne@69 24995 Py_ssize_t __pyx_t_3;
jpayne@69 24996 int __pyx_t_4;
jpayne@69 24997 PyObject *__pyx_t_5 = NULL;
jpayne@69 24998 PyObject *__pyx_t_6 = NULL;
jpayne@69 24999 PyObject *__pyx_t_7 = NULL;
jpayne@69 25000 unsigned int __pyx_t_8;
jpayne@69 25001 int __pyx_lineno = 0;
jpayne@69 25002 const char *__pyx_filename = NULL;
jpayne@69 25003 int __pyx_clineno = 0;
jpayne@69 25004 __Pyx_RefNannySetupContext("__pyx_unpickle_asBed__set_state", 1);
jpayne@69 25005 __Pyx_TraceCall("__pyx_unpickle_asBed__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@69 25006
jpayne@69 25007 /* "(tree fragment)":12
jpayne@69 25008 * return __pyx_result
jpayne@69 25009 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state):
jpayne@69 25010 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@69 25011 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 25012 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 25013 */
jpayne@69 25014 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 25015 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 25016 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 25017 }
jpayne@69 25018 __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)
jpayne@69 25019 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 25020 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 25021 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@69 25022 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@69 25023 __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_1;
jpayne@69 25024 __pyx_t_1 = 0;
jpayne@69 25025
jpayne@69 25026 /* "(tree fragment)":13
jpayne@69 25027 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state):
jpayne@69 25028 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 25029 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 25030 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 25031 */
jpayne@69 25032 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 25033 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@69 25034 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 25035 }
jpayne@69 25036 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 25037 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@69 25038 if (__pyx_t_4) {
jpayne@69 25039 } else {
jpayne@69 25040 __pyx_t_2 = __pyx_t_4;
jpayne@69 25041 goto __pyx_L4_bool_binop_done;
jpayne@69 25042 }
jpayne@69 25043 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 25044 __pyx_t_2 = __pyx_t_4;
jpayne@69 25045 __pyx_L4_bool_binop_done:;
jpayne@69 25046 if (__pyx_t_2) {
jpayne@69 25047
jpayne@69 25048 /* "(tree fragment)":14
jpayne@69 25049 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 25050 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 25051 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@69 25052 */
jpayne@69 25053 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 25054 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 25055 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 25056 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 25057 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 25058 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 25059 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 25060 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 25061 }
jpayne@69 25062 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 25063 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 25064 __pyx_t_7 = NULL;
jpayne@69 25065 __pyx_t_8 = 0;
jpayne@69 25066 #if CYTHON_UNPACK_METHODS
jpayne@69 25067 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@69 25068 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@69 25069 if (likely(__pyx_t_7)) {
jpayne@69 25070 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@69 25071 __Pyx_INCREF(__pyx_t_7);
jpayne@69 25072 __Pyx_INCREF(function);
jpayne@69 25073 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@69 25074 __pyx_t_8 = 1;
jpayne@69 25075 }
jpayne@69 25076 }
jpayne@69 25077 #endif
jpayne@69 25078 {
jpayne@69 25079 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@69 25080 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@69 25081 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 25082 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 25083 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 25084 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 25085 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 25086 }
jpayne@69 25087 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 25088
jpayne@69 25089 /* "(tree fragment)":13
jpayne@69 25090 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state):
jpayne@69 25091 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 25092 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 25093 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 25094 */
jpayne@69 25095 }
jpayne@69 25096
jpayne@69 25097 /* "(tree fragment)":11
jpayne@69 25098 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@69 25099 * return __pyx_result
jpayne@69 25100 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 25101 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 25102 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 25103 */
jpayne@69 25104
jpayne@69 25105 /* function exit code */
jpayne@69 25106 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 25107 goto __pyx_L0;
jpayne@69 25108 __pyx_L1_error:;
jpayne@69 25109 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 25110 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 25111 __Pyx_XDECREF(__pyx_t_6);
jpayne@69 25112 __Pyx_XDECREF(__pyx_t_7);
jpayne@69 25113 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asBed__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 25114 __pyx_r = 0;
jpayne@69 25115 __pyx_L0:;
jpayne@69 25116 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 25117 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 25118 __Pyx_RefNannyFinishContext();
jpayne@69 25119 return __pyx_r;
jpayne@69 25120 }
jpayne@69 25121
jpayne@69 25122 /* "(tree fragment)":1
jpayne@69 25123 * def __pyx_unpickle_asVCF(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 25124 * cdef object __pyx_PickleError
jpayne@69 25125 * cdef object __pyx_result
jpayne@69 25126 */
jpayne@69 25127
jpayne@69 25128 /* Python wrapper */
jpayne@69 25129 static PyObject *__pyx_pw_5pysam_9libctabix_17__pyx_unpickle_asVCF(PyObject *__pyx_self,
jpayne@69 25130 #if CYTHON_METH_FASTCALL
jpayne@69 25131 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 25132 #else
jpayne@69 25133 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 25134 #endif
jpayne@69 25135 ); /*proto*/
jpayne@69 25136 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_16__pyx_unpickle_asVCF, "__pyx_unpickle_asVCF(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@69 25137 static PyMethodDef __pyx_mdef_5pysam_9libctabix_17__pyx_unpickle_asVCF = {"__pyx_unpickle_asVCF", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_17__pyx_unpickle_asVCF, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_16__pyx_unpickle_asVCF};
jpayne@69 25138 static PyObject *__pyx_pw_5pysam_9libctabix_17__pyx_unpickle_asVCF(PyObject *__pyx_self,
jpayne@69 25139 #if CYTHON_METH_FASTCALL
jpayne@69 25140 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 25141 #else
jpayne@69 25142 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 25143 #endif
jpayne@69 25144 ) {
jpayne@69 25145 PyObject *__pyx_v___pyx_type = 0;
jpayne@69 25146 long __pyx_v___pyx_checksum;
jpayne@69 25147 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 25148 #if !CYTHON_METH_FASTCALL
jpayne@69 25149 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 25150 #endif
jpayne@69 25151 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 25152 PyObject* values[3] = {0,0,0};
jpayne@69 25153 int __pyx_lineno = 0;
jpayne@69 25154 const char *__pyx_filename = NULL;
jpayne@69 25155 int __pyx_clineno = 0;
jpayne@69 25156 PyObject *__pyx_r = 0;
jpayne@69 25157 __Pyx_RefNannyDeclarations
jpayne@69 25158 __Pyx_RefNannySetupContext("__pyx_unpickle_asVCF (wrapper)", 0);
jpayne@69 25159 #if !CYTHON_METH_FASTCALL
jpayne@69 25160 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 25161 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 25162 #else
jpayne@69 25163 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 25164 #endif
jpayne@69 25165 #endif
jpayne@69 25166 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 25167 {
jpayne@69 25168 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@69 25169 if (__pyx_kwds) {
jpayne@69 25170 Py_ssize_t kw_args;
jpayne@69 25171 switch (__pyx_nargs) {
jpayne@69 25172 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 25173 CYTHON_FALLTHROUGH;
jpayne@69 25174 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 25175 CYTHON_FALLTHROUGH;
jpayne@69 25176 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 25177 CYTHON_FALLTHROUGH;
jpayne@69 25178 case 0: break;
jpayne@69 25179 default: goto __pyx_L5_argtuple_error;
jpayne@69 25180 }
jpayne@69 25181 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 25182 switch (__pyx_nargs) {
jpayne@69 25183 case 0:
jpayne@69 25184 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@69 25185 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 25186 kw_args--;
jpayne@69 25187 }
jpayne@69 25188 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 25189 else goto __pyx_L5_argtuple_error;
jpayne@69 25190 CYTHON_FALLTHROUGH;
jpayne@69 25191 case 1:
jpayne@69 25192 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@69 25193 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 25194 kw_args--;
jpayne@69 25195 }
jpayne@69 25196 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 25197 else {
jpayne@69 25198 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asVCF", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 25199 }
jpayne@69 25200 CYTHON_FALLTHROUGH;
jpayne@69 25201 case 2:
jpayne@69 25202 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 25203 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@69 25204 kw_args--;
jpayne@69 25205 }
jpayne@69 25206 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 25207 else {
jpayne@69 25208 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asVCF", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 25209 }
jpayne@69 25210 }
jpayne@69 25211 if (unlikely(kw_args > 0)) {
jpayne@69 25212 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 25213 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_asVCF") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 25214 }
jpayne@69 25215 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@69 25216 goto __pyx_L5_argtuple_error;
jpayne@69 25217 } else {
jpayne@69 25218 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 25219 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 25220 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 25221 }
jpayne@69 25222 __pyx_v___pyx_type = values[0];
jpayne@69 25223 __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)
jpayne@69 25224 __pyx_v___pyx_state = values[2];
jpayne@69 25225 }
jpayne@69 25226 goto __pyx_L6_skip;
jpayne@69 25227 __pyx_L5_argtuple_error:;
jpayne@69 25228 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asVCF", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 25229 __pyx_L6_skip:;
jpayne@69 25230 goto __pyx_L4_argument_unpacking_done;
jpayne@69 25231 __pyx_L3_error:;
jpayne@69 25232 {
jpayne@69 25233 Py_ssize_t __pyx_temp;
jpayne@69 25234 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 25235 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 25236 }
jpayne@69 25237 }
jpayne@69 25238 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asVCF", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 25239 __Pyx_RefNannyFinishContext();
jpayne@69 25240 return NULL;
jpayne@69 25241 __pyx_L4_argument_unpacking_done:;
jpayne@69 25242 __pyx_r = __pyx_pf_5pysam_9libctabix_16__pyx_unpickle_asVCF(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
jpayne@69 25243
jpayne@69 25244 /* function exit code */
jpayne@69 25245 {
jpayne@69 25246 Py_ssize_t __pyx_temp;
jpayne@69 25247 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 25248 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 25249 }
jpayne@69 25250 }
jpayne@69 25251 __Pyx_RefNannyFinishContext();
jpayne@69 25252 return __pyx_r;
jpayne@69 25253 }
jpayne@69 25254
jpayne@69 25255 static PyObject *__pyx_pf_5pysam_9libctabix_16__pyx_unpickle_asVCF(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
jpayne@69 25256 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@69 25257 PyObject *__pyx_v___pyx_result = 0;
jpayne@69 25258 PyObject *__pyx_r = NULL;
jpayne@69 25259 __Pyx_TraceDeclarations
jpayne@69 25260 __Pyx_RefNannyDeclarations
jpayne@69 25261 PyObject *__pyx_t_1 = NULL;
jpayne@69 25262 int __pyx_t_2;
jpayne@69 25263 PyObject *__pyx_t_3 = NULL;
jpayne@69 25264 PyObject *__pyx_t_4 = NULL;
jpayne@69 25265 unsigned int __pyx_t_5;
jpayne@69 25266 int __pyx_lineno = 0;
jpayne@69 25267 const char *__pyx_filename = NULL;
jpayne@69 25268 int __pyx_clineno = 0;
jpayne@69 25269 __Pyx_TraceFrameInit(__pyx_codeobj__61)
jpayne@69 25270 __Pyx_RefNannySetupContext("__pyx_unpickle_asVCF", 1);
jpayne@69 25271 __Pyx_TraceCall("__pyx_unpickle_asVCF", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 25272
jpayne@69 25273 /* "(tree fragment)":4
jpayne@69 25274 * cdef object __pyx_PickleError
jpayne@69 25275 * cdef object __pyx_result
jpayne@69 25276 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 25277 * from pickle import PickleError as __pyx_PickleError
jpayne@69 25278 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 25279 */
jpayne@69 25280 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 25281 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 25282 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__55, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 25283 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 25284 if (__pyx_t_2) {
jpayne@69 25285
jpayne@69 25286 /* "(tree fragment)":5
jpayne@69 25287 * cdef object __pyx_result
jpayne@69 25288 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 25289 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@69 25290 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 25291 * __pyx_result = asVCF.__new__(__pyx_type)
jpayne@69 25292 */
jpayne@69 25293 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 25294 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 25295 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@69 25296 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@69 25297 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 25298 __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)
jpayne@69 25299 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 25300 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 25301 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 25302 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 25303 __Pyx_INCREF(__pyx_t_1);
jpayne@69 25304 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@69 25305 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 25306 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 25307
jpayne@69 25308 /* "(tree fragment)":6
jpayne@69 25309 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@69 25310 * from pickle import PickleError as __pyx_PickleError
jpayne@69 25311 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@69 25312 * __pyx_result = asVCF.__new__(__pyx_type)
jpayne@69 25313 * if __pyx_state is not None:
jpayne@69 25314 */
jpayne@69 25315 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 25316 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 25317 __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)
jpayne@69 25318 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 25319 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 25320 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@69 25321 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 25322 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 25323
jpayne@69 25324 /* "(tree fragment)":4
jpayne@69 25325 * cdef object __pyx_PickleError
jpayne@69 25326 * cdef object __pyx_result
jpayne@69 25327 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 25328 * from pickle import PickleError as __pyx_PickleError
jpayne@69 25329 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 25330 */
jpayne@69 25331 }
jpayne@69 25332
jpayne@69 25333 /* "(tree fragment)":7
jpayne@69 25334 * from pickle import PickleError as __pyx_PickleError
jpayne@69 25335 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 25336 * __pyx_result = asVCF.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@69 25337 * if __pyx_state is not None:
jpayne@69 25338 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@69 25339 */
jpayne@69 25340 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_9libctabix_asVCF), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 25341 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 25342 __pyx_t_4 = NULL;
jpayne@69 25343 __pyx_t_5 = 0;
jpayne@69 25344 #if CYTHON_UNPACK_METHODS
jpayne@69 25345 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 25346 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 25347 if (likely(__pyx_t_4)) {
jpayne@69 25348 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 25349 __Pyx_INCREF(__pyx_t_4);
jpayne@69 25350 __Pyx_INCREF(function);
jpayne@69 25351 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 25352 __pyx_t_5 = 1;
jpayne@69 25353 }
jpayne@69 25354 }
jpayne@69 25355 #endif
jpayne@69 25356 {
jpayne@69 25357 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@69 25358 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 25359 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 25360 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 25361 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 25362 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 25363 }
jpayne@69 25364 __pyx_v___pyx_result = __pyx_t_1;
jpayne@69 25365 __pyx_t_1 = 0;
jpayne@69 25366
jpayne@69 25367 /* "(tree fragment)":8
jpayne@69 25368 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 25369 * __pyx_result = asVCF.__new__(__pyx_type)
jpayne@69 25370 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 25371 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@69 25372 * return __pyx_result
jpayne@69 25373 */
jpayne@69 25374 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@69 25375 if (__pyx_t_2) {
jpayne@69 25376
jpayne@69 25377 /* "(tree fragment)":9
jpayne@69 25378 * __pyx_result = asVCF.__new__(__pyx_type)
jpayne@69 25379 * if __pyx_state is not None:
jpayne@69 25380 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 25381 * return __pyx_result
jpayne@69 25382 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state):
jpayne@69 25383 */
jpayne@69 25384 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)
jpayne@69 25385 __pyx_t_1 = __pyx_f_5pysam_9libctabix___pyx_unpickle_asVCF__set_state(((struct __pyx_obj_5pysam_9libctabix_asVCF *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
jpayne@69 25386 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 25387 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 25388
jpayne@69 25389 /* "(tree fragment)":8
jpayne@69 25390 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 25391 * __pyx_result = asVCF.__new__(__pyx_type)
jpayne@69 25392 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 25393 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@69 25394 * return __pyx_result
jpayne@69 25395 */
jpayne@69 25396 }
jpayne@69 25397
jpayne@69 25398 /* "(tree fragment)":10
jpayne@69 25399 * if __pyx_state is not None:
jpayne@69 25400 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@69 25401 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@69 25402 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state):
jpayne@69 25403 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 25404 */
jpayne@69 25405 __Pyx_XDECREF(__pyx_r);
jpayne@69 25406 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@69 25407 __pyx_r = __pyx_v___pyx_result;
jpayne@69 25408 goto __pyx_L0;
jpayne@69 25409
jpayne@69 25410 /* "(tree fragment)":1
jpayne@69 25411 * def __pyx_unpickle_asVCF(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 25412 * cdef object __pyx_PickleError
jpayne@69 25413 * cdef object __pyx_result
jpayne@69 25414 */
jpayne@69 25415
jpayne@69 25416 /* function exit code */
jpayne@69 25417 __pyx_L1_error:;
jpayne@69 25418 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 25419 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 25420 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 25421 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asVCF", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 25422 __pyx_r = NULL;
jpayne@69 25423 __pyx_L0:;
jpayne@69 25424 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@69 25425 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@69 25426 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 25427 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 25428 __Pyx_RefNannyFinishContext();
jpayne@69 25429 return __pyx_r;
jpayne@69 25430 }
jpayne@69 25431
jpayne@69 25432 /* "(tree fragment)":11
jpayne@69 25433 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@69 25434 * return __pyx_result
jpayne@69 25435 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 25436 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 25437 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 25438 */
jpayne@69 25439
jpayne@69 25440 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asVCF__set_state(struct __pyx_obj_5pysam_9libctabix_asVCF *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
jpayne@69 25441 PyObject *__pyx_r = NULL;
jpayne@69 25442 __Pyx_TraceDeclarations
jpayne@69 25443 __Pyx_RefNannyDeclarations
jpayne@69 25444 PyObject *__pyx_t_1 = NULL;
jpayne@69 25445 int __pyx_t_2;
jpayne@69 25446 Py_ssize_t __pyx_t_3;
jpayne@69 25447 int __pyx_t_4;
jpayne@69 25448 PyObject *__pyx_t_5 = NULL;
jpayne@69 25449 PyObject *__pyx_t_6 = NULL;
jpayne@69 25450 PyObject *__pyx_t_7 = NULL;
jpayne@69 25451 unsigned int __pyx_t_8;
jpayne@69 25452 int __pyx_lineno = 0;
jpayne@69 25453 const char *__pyx_filename = NULL;
jpayne@69 25454 int __pyx_clineno = 0;
jpayne@69 25455 __Pyx_RefNannySetupContext("__pyx_unpickle_asVCF__set_state", 1);
jpayne@69 25456 __Pyx_TraceCall("__pyx_unpickle_asVCF__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@69 25457
jpayne@69 25458 /* "(tree fragment)":12
jpayne@69 25459 * return __pyx_result
jpayne@69 25460 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state):
jpayne@69 25461 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@69 25462 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 25463 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 25464 */
jpayne@69 25465 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 25466 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 25467 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 25468 }
jpayne@69 25469 __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)
jpayne@69 25470 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 25471 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 25472 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@69 25473 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@69 25474 __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_1;
jpayne@69 25475 __pyx_t_1 = 0;
jpayne@69 25476
jpayne@69 25477 /* "(tree fragment)":13
jpayne@69 25478 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state):
jpayne@69 25479 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 25480 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 25481 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 25482 */
jpayne@69 25483 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 25484 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@69 25485 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 25486 }
jpayne@69 25487 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 25488 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@69 25489 if (__pyx_t_4) {
jpayne@69 25490 } else {
jpayne@69 25491 __pyx_t_2 = __pyx_t_4;
jpayne@69 25492 goto __pyx_L4_bool_binop_done;
jpayne@69 25493 }
jpayne@69 25494 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 25495 __pyx_t_2 = __pyx_t_4;
jpayne@69 25496 __pyx_L4_bool_binop_done:;
jpayne@69 25497 if (__pyx_t_2) {
jpayne@69 25498
jpayne@69 25499 /* "(tree fragment)":14
jpayne@69 25500 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 25501 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 25502 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@69 25503 */
jpayne@69 25504 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 25505 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 25506 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 25507 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 25508 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 25509 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 25510 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 25511 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 25512 }
jpayne@69 25513 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 25514 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 25515 __pyx_t_7 = NULL;
jpayne@69 25516 __pyx_t_8 = 0;
jpayne@69 25517 #if CYTHON_UNPACK_METHODS
jpayne@69 25518 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@69 25519 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@69 25520 if (likely(__pyx_t_7)) {
jpayne@69 25521 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@69 25522 __Pyx_INCREF(__pyx_t_7);
jpayne@69 25523 __Pyx_INCREF(function);
jpayne@69 25524 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@69 25525 __pyx_t_8 = 1;
jpayne@69 25526 }
jpayne@69 25527 }
jpayne@69 25528 #endif
jpayne@69 25529 {
jpayne@69 25530 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@69 25531 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@69 25532 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 25533 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 25534 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 25535 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 25536 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 25537 }
jpayne@69 25538 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 25539
jpayne@69 25540 /* "(tree fragment)":13
jpayne@69 25541 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state):
jpayne@69 25542 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 25543 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 25544 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@69 25545 */
jpayne@69 25546 }
jpayne@69 25547
jpayne@69 25548 /* "(tree fragment)":11
jpayne@69 25549 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@69 25550 * return __pyx_result
jpayne@69 25551 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 25552 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 25553 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 25554 */
jpayne@69 25555
jpayne@69 25556 /* function exit code */
jpayne@69 25557 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 25558 goto __pyx_L0;
jpayne@69 25559 __pyx_L1_error:;
jpayne@69 25560 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 25561 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 25562 __Pyx_XDECREF(__pyx_t_6);
jpayne@69 25563 __Pyx_XDECREF(__pyx_t_7);
jpayne@69 25564 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asVCF__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 25565 __pyx_r = 0;
jpayne@69 25566 __pyx_L0:;
jpayne@69 25567 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 25568 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 25569 __Pyx_RefNannyFinishContext();
jpayne@69 25570 return __pyx_r;
jpayne@69 25571 }
jpayne@69 25572 static struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator __pyx_vtable_5pysam_9libctabix_tabix_file_iterator;
jpayne@69 25573
jpayne@69 25574 static PyObject *__pyx_tp_new_5pysam_9libctabix_tabix_file_iterator(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 25575 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *p;
jpayne@69 25576 PyObject *o;
jpayne@69 25577 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 25578 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@69 25579 o = alloc_func(t, 0);
jpayne@69 25580 #else
jpayne@69 25581 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@69 25582 o = (*t->tp_alloc)(t, 0);
jpayne@69 25583 } else {
jpayne@69 25584 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@69 25585 }
jpayne@69 25586 if (unlikely(!o)) return 0;
jpayne@69 25587 #endif
jpayne@69 25588 p = ((struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)o);
jpayne@69 25589 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libctabix_tabix_file_iterator;
jpayne@69 25590 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@69 25591 p->infile = Py_None; Py_INCREF(Py_None);
jpayne@69 25592 if (unlikely(__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_1__cinit__(o, a, k) < 0)) goto bad;
jpayne@69 25593 return o;
jpayne@69 25594 bad:
jpayne@69 25595 Py_DECREF(o); o = 0;
jpayne@69 25596 return NULL;
jpayne@69 25597 }
jpayne@69 25598
jpayne@69 25599 static void __pyx_tp_dealloc_5pysam_9libctabix_tabix_file_iterator(PyObject *o) {
jpayne@69 25600 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *p = (struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)o;
jpayne@69 25601 #if CYTHON_USE_TP_FINALIZE
jpayne@69 25602 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)) {
jpayne@69 25603 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_tabix_file_iterator) {
jpayne@69 25604 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@69 25605 }
jpayne@69 25606 }
jpayne@69 25607 #endif
jpayne@69 25608 PyObject_GC_UnTrack(o);
jpayne@69 25609 {
jpayne@69 25610 PyObject *etype, *eval, *etb;
jpayne@69 25611 PyErr_Fetch(&etype, &eval, &etb);
jpayne@69 25612 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
jpayne@69 25613 __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_5__dealloc__(o);
jpayne@69 25614 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
jpayne@69 25615 PyErr_Restore(etype, eval, etb);
jpayne@69 25616 }
jpayne@69 25617 Py_CLEAR(p->parser);
jpayne@69 25618 Py_CLEAR(p->infile);
jpayne@69 25619 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@69 25620 (*Py_TYPE(o)->tp_free)(o);
jpayne@69 25621 #else
jpayne@69 25622 {
jpayne@69 25623 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@69 25624 if (tp_free) tp_free(o);
jpayne@69 25625 }
jpayne@69 25626 #endif
jpayne@69 25627 }
jpayne@69 25628
jpayne@69 25629 static int __pyx_tp_traverse_5pysam_9libctabix_tabix_file_iterator(PyObject *o, visitproc v, void *a) {
jpayne@69 25630 int e;
jpayne@69 25631 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *p = (struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)o;
jpayne@69 25632 if (p->parser) {
jpayne@69 25633 e = (*v)(((PyObject *)p->parser), a); if (e) return e;
jpayne@69 25634 }
jpayne@69 25635 if (p->infile) {
jpayne@69 25636 e = (*v)(p->infile, a); if (e) return e;
jpayne@69 25637 }
jpayne@69 25638 return 0;
jpayne@69 25639 }
jpayne@69 25640
jpayne@69 25641 static int __pyx_tp_clear_5pysam_9libctabix_tabix_file_iterator(PyObject *o) {
jpayne@69 25642 PyObject* tmp;
jpayne@69 25643 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *p = (struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)o;
jpayne@69 25644 tmp = ((PyObject*)p->parser);
jpayne@69 25645 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@69 25646 Py_XDECREF(tmp);
jpayne@69 25647 tmp = ((PyObject*)p->infile);
jpayne@69 25648 p->infile = Py_None; Py_INCREF(Py_None);
jpayne@69 25649 Py_XDECREF(tmp);
jpayne@69 25650 return 0;
jpayne@69 25651 }
jpayne@69 25652
jpayne@69 25653 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@69 25654 PyObject *res = __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__(self);
jpayne@69 25655 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@69 25656 return res;
jpayne@69 25657 }
jpayne@69 25658
jpayne@69 25659 static PyMethodDef __pyx_methods_5pysam_9libctabix_tabix_file_iterator[] = {
jpayne@69 25660 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__, METH_NOARGS|METH_COEXIST, 0},
jpayne@69 25661 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_19tabix_file_iterator_8__reduce_cython__},
jpayne@69 25662 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_19tabix_file_iterator_10__setstate_cython__},
jpayne@69 25663 {0, 0, 0, 0}
jpayne@69 25664 };
jpayne@69 25665 #if CYTHON_USE_TYPE_SPECS
jpayne@69 25666 static PyType_Slot __pyx_type_5pysam_9libctabix_tabix_file_iterator_slots[] = {
jpayne@69 25667 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_tabix_file_iterator},
jpayne@69 25668 {Py_tp_doc, (void *)PyDoc_STR("iterate over a compressed or uncompressed ``infile``.\n ")},
jpayne@69 25669 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_tabix_file_iterator},
jpayne@69 25670 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_tabix_file_iterator},
jpayne@69 25671 {Py_tp_iter, (void *)__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_3__iter__},
jpayne@69 25672 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__},
jpayne@69 25673 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_tabix_file_iterator},
jpayne@69 25674 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_tabix_file_iterator},
jpayne@69 25675 {0, 0},
jpayne@69 25676 };
jpayne@69 25677 static PyType_Spec __pyx_type_5pysam_9libctabix_tabix_file_iterator_spec = {
jpayne@69 25678 "pysam.libctabix.tabix_file_iterator",
jpayne@69 25679 sizeof(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator),
jpayne@69 25680 0,
jpayne@69 25681 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 25682 __pyx_type_5pysam_9libctabix_tabix_file_iterator_slots,
jpayne@69 25683 };
jpayne@69 25684 #else
jpayne@69 25685
jpayne@69 25686 static PyTypeObject __pyx_type_5pysam_9libctabix_tabix_file_iterator = {
jpayne@69 25687 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 25688 "pysam.libctabix.""tabix_file_iterator", /*tp_name*/
jpayne@69 25689 sizeof(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator), /*tp_basicsize*/
jpayne@69 25690 0, /*tp_itemsize*/
jpayne@69 25691 __pyx_tp_dealloc_5pysam_9libctabix_tabix_file_iterator, /*tp_dealloc*/
jpayne@69 25692 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 25693 0, /*tp_print*/
jpayne@69 25694 #endif
jpayne@69 25695 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 25696 0, /*tp_vectorcall_offset*/
jpayne@69 25697 #endif
jpayne@69 25698 0, /*tp_getattr*/
jpayne@69 25699 0, /*tp_setattr*/
jpayne@69 25700 #if PY_MAJOR_VERSION < 3
jpayne@69 25701 0, /*tp_compare*/
jpayne@69 25702 #endif
jpayne@69 25703 #if PY_MAJOR_VERSION >= 3
jpayne@69 25704 0, /*tp_as_async*/
jpayne@69 25705 #endif
jpayne@69 25706 0, /*tp_repr*/
jpayne@69 25707 0, /*tp_as_number*/
jpayne@69 25708 0, /*tp_as_sequence*/
jpayne@69 25709 0, /*tp_as_mapping*/
jpayne@69 25710 0, /*tp_hash*/
jpayne@69 25711 0, /*tp_call*/
jpayne@69 25712 0, /*tp_str*/
jpayne@69 25713 0, /*tp_getattro*/
jpayne@69 25714 0, /*tp_setattro*/
jpayne@69 25715 0, /*tp_as_buffer*/
jpayne@69 25716 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 25717 PyDoc_STR("iterate over a compressed or uncompressed ``infile``.\n "), /*tp_doc*/
jpayne@69 25718 __pyx_tp_traverse_5pysam_9libctabix_tabix_file_iterator, /*tp_traverse*/
jpayne@69 25719 __pyx_tp_clear_5pysam_9libctabix_tabix_file_iterator, /*tp_clear*/
jpayne@69 25720 0, /*tp_richcompare*/
jpayne@69 25721 0, /*tp_weaklistoffset*/
jpayne@69 25722 __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_3__iter__, /*tp_iter*/
jpayne@69 25723 __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__, /*tp_iternext*/
jpayne@69 25724 __pyx_methods_5pysam_9libctabix_tabix_file_iterator, /*tp_methods*/
jpayne@69 25725 0, /*tp_members*/
jpayne@69 25726 0, /*tp_getset*/
jpayne@69 25727 0, /*tp_base*/
jpayne@69 25728 0, /*tp_dict*/
jpayne@69 25729 0, /*tp_descr_get*/
jpayne@69 25730 0, /*tp_descr_set*/
jpayne@69 25731 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 25732 0, /*tp_dictoffset*/
jpayne@69 25733 #endif
jpayne@69 25734 0, /*tp_init*/
jpayne@69 25735 0, /*tp_alloc*/
jpayne@69 25736 __pyx_tp_new_5pysam_9libctabix_tabix_file_iterator, /*tp_new*/
jpayne@69 25737 0, /*tp_free*/
jpayne@69 25738 0, /*tp_is_gc*/
jpayne@69 25739 0, /*tp_bases*/
jpayne@69 25740 0, /*tp_mro*/
jpayne@69 25741 0, /*tp_cache*/
jpayne@69 25742 0, /*tp_subclasses*/
jpayne@69 25743 0, /*tp_weaklist*/
jpayne@69 25744 0, /*tp_del*/
jpayne@69 25745 0, /*tp_version_tag*/
jpayne@69 25746 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 25747 #if CYTHON_USE_TP_FINALIZE
jpayne@69 25748 0, /*tp_finalize*/
jpayne@69 25749 #else
jpayne@69 25750 NULL, /*tp_finalize*/
jpayne@69 25751 #endif
jpayne@69 25752 #endif
jpayne@69 25753 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 25754 0, /*tp_vectorcall*/
jpayne@69 25755 #endif
jpayne@69 25756 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 25757 0, /*tp_print*/
jpayne@69 25758 #endif
jpayne@69 25759 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 25760 0, /*tp_watched*/
jpayne@69 25761 #endif
jpayne@69 25762 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 25763 0, /*tp_versions_used*/
jpayne@69 25764 #endif
jpayne@69 25765 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 25766 0, /*tp_pypy_flags*/
jpayne@69 25767 #endif
jpayne@69 25768 };
jpayne@69 25769 #endif
jpayne@69 25770 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile __pyx_vtable_5pysam_9libctabix_TabixFile;
jpayne@69 25771
jpayne@69 25772 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixFile(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 25773 struct __pyx_obj_5pysam_9libctabix_TabixFile *p;
jpayne@69 25774 PyObject *o = __Pyx_PyType_GetSlot(__pyx_ptype_5pysam_10libchtslib_HTSFile, tp_new, newfunc)(t, a, k);
jpayne@69 25775 if (unlikely(!o)) return 0;
jpayne@69 25776 p = ((struct __pyx_obj_5pysam_9libctabix_TabixFile *)o);
jpayne@69 25777 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile*)__pyx_vtabptr_5pysam_9libctabix_TabixFile;
jpayne@69 25778 p->filename_index = Py_None; Py_INCREF(Py_None);
jpayne@69 25779 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@69 25780 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@69 25781 if (unlikely(__pyx_pw_5pysam_9libctabix_9TabixFile_1__cinit__(o, a, k) < 0)) goto bad;
jpayne@69 25782 return o;
jpayne@69 25783 bad:
jpayne@69 25784 Py_DECREF(o); o = 0;
jpayne@69 25785 return NULL;
jpayne@69 25786 }
jpayne@69 25787
jpayne@69 25788 static void __pyx_tp_dealloc_5pysam_9libctabix_TabixFile(PyObject *o) {
jpayne@69 25789 struct __pyx_obj_5pysam_9libctabix_TabixFile *p = (struct __pyx_obj_5pysam_9libctabix_TabixFile *)o;
jpayne@69 25790 #if CYTHON_USE_TP_FINALIZE
jpayne@69 25791 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)) {
jpayne@69 25792 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_TabixFile) {
jpayne@69 25793 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@69 25794 }
jpayne@69 25795 }
jpayne@69 25796 #endif
jpayne@69 25797 PyObject_GC_UnTrack(o);
jpayne@69 25798 {
jpayne@69 25799 PyObject *etype, *eval, *etb;
jpayne@69 25800 PyErr_Fetch(&etype, &eval, &etb);
jpayne@69 25801 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
jpayne@69 25802 __pyx_pw_5pysam_9libctabix_9TabixFile_11__dealloc__(o);
jpayne@69 25803 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
jpayne@69 25804 PyErr_Restore(etype, eval, etb);
jpayne@69 25805 }
jpayne@69 25806 Py_CLEAR(p->filename_index);
jpayne@69 25807 Py_CLEAR(p->parser);
jpayne@69 25808 Py_CLEAR(p->encoding);
jpayne@69 25809 #if PY_MAJOR_VERSION < 3
jpayne@69 25810 if (!(__pyx_ptype_5pysam_10libchtslib_HTSFile) || PyType_IS_GC(__pyx_ptype_5pysam_10libchtslib_HTSFile)) PyObject_GC_Track(o);
jpayne@69 25811 #else
jpayne@69 25812 if (PyType_IS_GC(__pyx_ptype_5pysam_10libchtslib_HTSFile)) PyObject_GC_Track(o);
jpayne@69 25813 #endif
jpayne@69 25814 if (likely(__pyx_ptype_5pysam_10libchtslib_HTSFile)) __Pyx_PyType_GetSlot(__pyx_ptype_5pysam_10libchtslib_HTSFile, tp_dealloc, destructor)(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_5pysam_9libctabix_TabixFile);
jpayne@69 25815 }
jpayne@69 25816
jpayne@69 25817 static int __pyx_tp_traverse_5pysam_9libctabix_TabixFile(PyObject *o, visitproc v, void *a) {
jpayne@69 25818 int e;
jpayne@69 25819 struct __pyx_obj_5pysam_9libctabix_TabixFile *p = (struct __pyx_obj_5pysam_9libctabix_TabixFile *)o;
jpayne@69 25820 e = ((likely(__pyx_ptype_5pysam_10libchtslib_HTSFile)) ? ((__pyx_ptype_5pysam_10libchtslib_HTSFile->tp_traverse) ? __pyx_ptype_5pysam_10libchtslib_HTSFile->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5pysam_9libctabix_TabixFile)); if (e) return e;
jpayne@69 25821 if (p->filename_index) {
jpayne@69 25822 e = (*v)(p->filename_index, a); if (e) return e;
jpayne@69 25823 }
jpayne@69 25824 if (p->parser) {
jpayne@69 25825 e = (*v)(((PyObject *)p->parser), a); if (e) return e;
jpayne@69 25826 }
jpayne@69 25827 if (p->encoding) {
jpayne@69 25828 e = (*v)(p->encoding, a); if (e) return e;
jpayne@69 25829 }
jpayne@69 25830 return 0;
jpayne@69 25831 }
jpayne@69 25832
jpayne@69 25833 static int __pyx_tp_clear_5pysam_9libctabix_TabixFile(PyObject *o) {
jpayne@69 25834 PyObject* tmp;
jpayne@69 25835 struct __pyx_obj_5pysam_9libctabix_TabixFile *p = (struct __pyx_obj_5pysam_9libctabix_TabixFile *)o;
jpayne@69 25836 if (likely(__pyx_ptype_5pysam_10libchtslib_HTSFile)) { if (__pyx_ptype_5pysam_10libchtslib_HTSFile->tp_clear) __pyx_ptype_5pysam_10libchtslib_HTSFile->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5pysam_9libctabix_TabixFile);
jpayne@69 25837 tmp = ((PyObject*)p->filename_index);
jpayne@69 25838 p->filename_index = Py_None; Py_INCREF(Py_None);
jpayne@69 25839 Py_XDECREF(tmp);
jpayne@69 25840 tmp = ((PyObject*)p->parser);
jpayne@69 25841 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@69 25842 Py_XDECREF(tmp);
jpayne@69 25843 tmp = ((PyObject*)p->encoding);
jpayne@69 25844 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@69 25845 Py_XDECREF(tmp);
jpayne@69 25846 return 0;
jpayne@69 25847 }
jpayne@69 25848
jpayne@69 25849 static PyObject *__pyx_getprop_5pysam_9libctabix_9TabixFile_header(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 25850 return __pyx_pw_5pysam_9libctabix_9TabixFile_6header_1__get__(o);
jpayne@69 25851 }
jpayne@69 25852
jpayne@69 25853 static PyObject *__pyx_getprop_5pysam_9libctabix_9TabixFile_contigs(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 25854 return __pyx_pw_5pysam_9libctabix_9TabixFile_7contigs_1__get__(o);
jpayne@69 25855 }
jpayne@69 25856
jpayne@69 25857 static PyObject *__pyx_getprop_5pysam_9libctabix_9TabixFile_filename_index(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 25858 return __pyx_pw_5pysam_9libctabix_9TabixFile_14filename_index_1__get__(o);
jpayne@69 25859 }
jpayne@69 25860
jpayne@69 25861 static PyMethodDef __pyx_methods_5pysam_9libctabix_TabixFile[] = {
jpayne@69 25862 {"_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_3_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_2_open},
jpayne@69 25863 {"_dup", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_5_dup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_4_dup},
jpayne@69 25864 {"fetch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_7fetch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_6fetch},
jpayne@69 25865 {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_9close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_8close},
jpayne@69 25866 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_12__reduce_cython__},
jpayne@69 25867 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9TabixFile_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9TabixFile_14__setstate_cython__},
jpayne@69 25868 {0, 0, 0, 0}
jpayne@69 25869 };
jpayne@69 25870
jpayne@69 25871 static struct PyGetSetDef __pyx_getsets_5pysam_9libctabix_TabixFile[] = {
jpayne@69 25872 {(char *)"header", __pyx_getprop_5pysam_9libctabix_9TabixFile_header, 0, (char *)PyDoc_STR("the file header.\n\n The file header consists of the lines at the beginning of a\n file that are prefixed by the comment character ``#``.\n \n .. note::\n The header is returned as an iterator presenting lines\n without the newline character.\n "), 0},
jpayne@69 25873 {(char *)"contigs", __pyx_getprop_5pysam_9libctabix_9TabixFile_contigs, 0, (char *)PyDoc_STR("list of chromosome names"), 0},
jpayne@69 25874 {(char *)"filename_index", __pyx_getprop_5pysam_9libctabix_9TabixFile_filename_index, 0, (char *)0, 0},
jpayne@69 25875 {0, 0, 0, 0, 0}
jpayne@69 25876 };
jpayne@69 25877 #if CYTHON_USE_TYPE_SPECS
jpayne@69 25878 static PyType_Slot __pyx_type_5pysam_9libctabix_TabixFile_slots[] = {
jpayne@69 25879 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_TabixFile},
jpayne@69 25880 {Py_tp_doc, (void *)PyDoc_STR("Random access to bgzf formatted files that\n have been indexed by :term:`tabix`.\n\n The file is automatically opened. The index file of file\n ``<filename>`` is expected to be called ``<filename>.tbi``\n by default (see parameter `index`).\n \n Parameters\n ----------\n \n filename : string\n Filename of bgzf file to be opened.\n\n index : string\n The filename of the index. If not set, the default is to\n assume that the index is called ``filename.tbi``\n\n mode : char\n The file opening mode. Currently, only ``r`` is permitted.\n \n parser : :class:`pysam.Parser`\n \n sets the default parser for this tabix file. If `parser`\n is None, the results are returned as an unparsed string.\n Otherwise, `parser` is assumed to be a functor that will return\n parsed data (see for example :class:`~pysam.asTuple` and\n :class:`~pysam.asGTF`).\n\n encoding : string\n\n The encoding passed to the parser\n\n threads: integer\n Number of threads to use for decompressing Tabix files.\n (Default=1)\n\n\n Raises\n ------\n \n ValueError\n if index file is missing.\n\n IOError\n if file could not be opened\n ")},
jpayne@69 25881 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_TabixFile},
jpayne@69 25882 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_TabixFile},
jpayne@69 25883 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_TabixFile},
jpayne@69 25884 {Py_tp_getset, (void *)__pyx_getsets_5pysam_9libctabix_TabixFile},
jpayne@69 25885 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_TabixFile},
jpayne@69 25886 {0, 0},
jpayne@69 25887 };
jpayne@69 25888 static PyType_Spec __pyx_type_5pysam_9libctabix_TabixFile_spec = {
jpayne@69 25889 "pysam.libctabix.TabixFile",
jpayne@69 25890 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixFile),
jpayne@69 25891 0,
jpayne@69 25892 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
jpayne@69 25893 __pyx_type_5pysam_9libctabix_TabixFile_slots,
jpayne@69 25894 };
jpayne@69 25895 #else
jpayne@69 25896
jpayne@69 25897 static PyTypeObject __pyx_type_5pysam_9libctabix_TabixFile = {
jpayne@69 25898 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 25899 "pysam.libctabix.""TabixFile", /*tp_name*/
jpayne@69 25900 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixFile), /*tp_basicsize*/
jpayne@69 25901 0, /*tp_itemsize*/
jpayne@69 25902 __pyx_tp_dealloc_5pysam_9libctabix_TabixFile, /*tp_dealloc*/
jpayne@69 25903 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 25904 0, /*tp_print*/
jpayne@69 25905 #endif
jpayne@69 25906 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 25907 0, /*tp_vectorcall_offset*/
jpayne@69 25908 #endif
jpayne@69 25909 0, /*tp_getattr*/
jpayne@69 25910 0, /*tp_setattr*/
jpayne@69 25911 #if PY_MAJOR_VERSION < 3
jpayne@69 25912 0, /*tp_compare*/
jpayne@69 25913 #endif
jpayne@69 25914 #if PY_MAJOR_VERSION >= 3
jpayne@69 25915 0, /*tp_as_async*/
jpayne@69 25916 #endif
jpayne@69 25917 0, /*tp_repr*/
jpayne@69 25918 0, /*tp_as_number*/
jpayne@69 25919 0, /*tp_as_sequence*/
jpayne@69 25920 0, /*tp_as_mapping*/
jpayne@69 25921 0, /*tp_hash*/
jpayne@69 25922 0, /*tp_call*/
jpayne@69 25923 0, /*tp_str*/
jpayne@69 25924 0, /*tp_getattro*/
jpayne@69 25925 0, /*tp_setattro*/
jpayne@69 25926 0, /*tp_as_buffer*/
jpayne@69 25927 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
jpayne@69 25928 PyDoc_STR("Random access to bgzf formatted files that\n have been indexed by :term:`tabix`.\n\n The file is automatically opened. The index file of file\n ``<filename>`` is expected to be called ``<filename>.tbi``\n by default (see parameter `index`).\n \n Parameters\n ----------\n \n filename : string\n Filename of bgzf file to be opened.\n\n index : string\n The filename of the index. If not set, the default is to\n assume that the index is called ``filename.tbi``\n\n mode : char\n The file opening mode. Currently, only ``r`` is permitted.\n \n parser : :class:`pysam.Parser`\n \n sets the default parser for this tabix file. If `parser`\n is None, the results are returned as an unparsed string.\n Otherwise, `parser` is assumed to be a functor that will return\n parsed data (see for example :class:`~pysam.asTuple` and\n :class:`~pysam.asGTF`).\n\n encoding : string\n\n The encoding passed to the parser\n\n threads: integer\n Number of threads to use for decompressing Tabix files.\n (Default=1)\n\n\n Raises\n ------\n \n ValueError\n if index file is missing.\n\n IOError\n if file could not be opened\n "), /*tp_doc*/
jpayne@69 25929 __pyx_tp_traverse_5pysam_9libctabix_TabixFile, /*tp_traverse*/
jpayne@69 25930 __pyx_tp_clear_5pysam_9libctabix_TabixFile, /*tp_clear*/
jpayne@69 25931 0, /*tp_richcompare*/
jpayne@69 25932 0, /*tp_weaklistoffset*/
jpayne@69 25933 0, /*tp_iter*/
jpayne@69 25934 0, /*tp_iternext*/
jpayne@69 25935 __pyx_methods_5pysam_9libctabix_TabixFile, /*tp_methods*/
jpayne@69 25936 0, /*tp_members*/
jpayne@69 25937 __pyx_getsets_5pysam_9libctabix_TabixFile, /*tp_getset*/
jpayne@69 25938 0, /*tp_base*/
jpayne@69 25939 0, /*tp_dict*/
jpayne@69 25940 0, /*tp_descr_get*/
jpayne@69 25941 0, /*tp_descr_set*/
jpayne@69 25942 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 25943 0, /*tp_dictoffset*/
jpayne@69 25944 #endif
jpayne@69 25945 0, /*tp_init*/
jpayne@69 25946 0, /*tp_alloc*/
jpayne@69 25947 __pyx_tp_new_5pysam_9libctabix_TabixFile, /*tp_new*/
jpayne@69 25948 0, /*tp_free*/
jpayne@69 25949 0, /*tp_is_gc*/
jpayne@69 25950 0, /*tp_bases*/
jpayne@69 25951 0, /*tp_mro*/
jpayne@69 25952 0, /*tp_cache*/
jpayne@69 25953 0, /*tp_subclasses*/
jpayne@69 25954 0, /*tp_weaklist*/
jpayne@69 25955 0, /*tp_del*/
jpayne@69 25956 0, /*tp_version_tag*/
jpayne@69 25957 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 25958 #if CYTHON_USE_TP_FINALIZE
jpayne@69 25959 0, /*tp_finalize*/
jpayne@69 25960 #else
jpayne@69 25961 NULL, /*tp_finalize*/
jpayne@69 25962 #endif
jpayne@69 25963 #endif
jpayne@69 25964 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 25965 0, /*tp_vectorcall*/
jpayne@69 25966 #endif
jpayne@69 25967 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 25968 0, /*tp_print*/
jpayne@69 25969 #endif
jpayne@69 25970 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 25971 0, /*tp_watched*/
jpayne@69 25972 #endif
jpayne@69 25973 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 25974 0, /*tp_versions_used*/
jpayne@69 25975 #endif
jpayne@69 25976 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 25977 0, /*tp_pypy_flags*/
jpayne@69 25978 #endif
jpayne@69 25979 };
jpayne@69 25980 #endif
jpayne@69 25981 static struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_vtable_5pysam_9libctabix_Parser;
jpayne@69 25982
jpayne@69 25983 static PyObject *__pyx_tp_new_5pysam_9libctabix_Parser(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
jpayne@69 25984 struct __pyx_obj_5pysam_9libctabix_Parser *p;
jpayne@69 25985 PyObject *o;
jpayne@69 25986 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 25987 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@69 25988 o = alloc_func(t, 0);
jpayne@69 25989 #else
jpayne@69 25990 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@69 25991 o = (*t->tp_alloc)(t, 0);
jpayne@69 25992 } else {
jpayne@69 25993 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@69 25994 }
jpayne@69 25995 if (unlikely(!o)) return 0;
jpayne@69 25996 #endif
jpayne@69 25997 p = ((struct __pyx_obj_5pysam_9libctabix_Parser *)o);
jpayne@69 25998 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@69 25999 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@69 26000 return o;
jpayne@69 26001 }
jpayne@69 26002
jpayne@69 26003 static void __pyx_tp_dealloc_5pysam_9libctabix_Parser(PyObject *o) {
jpayne@69 26004 struct __pyx_obj_5pysam_9libctabix_Parser *p = (struct __pyx_obj_5pysam_9libctabix_Parser *)o;
jpayne@69 26005 #if CYTHON_USE_TP_FINALIZE
jpayne@69 26006 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)) {
jpayne@69 26007 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_Parser) {
jpayne@69 26008 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@69 26009 }
jpayne@69 26010 }
jpayne@69 26011 #endif
jpayne@69 26012 PyObject_GC_UnTrack(o);
jpayne@69 26013 Py_CLEAR(p->encoding);
jpayne@69 26014 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@69 26015 (*Py_TYPE(o)->tp_free)(o);
jpayne@69 26016 #else
jpayne@69 26017 {
jpayne@69 26018 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@69 26019 if (tp_free) tp_free(o);
jpayne@69 26020 }
jpayne@69 26021 #endif
jpayne@69 26022 }
jpayne@69 26023
jpayne@69 26024 static int __pyx_tp_traverse_5pysam_9libctabix_Parser(PyObject *o, visitproc v, void *a) {
jpayne@69 26025 int e;
jpayne@69 26026 struct __pyx_obj_5pysam_9libctabix_Parser *p = (struct __pyx_obj_5pysam_9libctabix_Parser *)o;
jpayne@69 26027 if (p->encoding) {
jpayne@69 26028 e = (*v)(p->encoding, a); if (e) return e;
jpayne@69 26029 }
jpayne@69 26030 return 0;
jpayne@69 26031 }
jpayne@69 26032
jpayne@69 26033 static int __pyx_tp_clear_5pysam_9libctabix_Parser(PyObject *o) {
jpayne@69 26034 PyObject* tmp;
jpayne@69 26035 struct __pyx_obj_5pysam_9libctabix_Parser *p = (struct __pyx_obj_5pysam_9libctabix_Parser *)o;
jpayne@69 26036 tmp = ((PyObject*)p->encoding);
jpayne@69 26037 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@69 26038 Py_XDECREF(tmp);
jpayne@69 26039 return 0;
jpayne@69 26040 }
jpayne@69 26041
jpayne@69 26042 static PyMethodDef __pyx_methods_5pysam_9libctabix_Parser[] = {
jpayne@69 26043 {"set_encoding", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6Parser_3set_encoding, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6Parser_2set_encoding},
jpayne@69 26044 {"get_encoding", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6Parser_5get_encoding, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6Parser_4get_encoding},
jpayne@69 26045 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6Parser_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6Parser_8__reduce_cython__},
jpayne@69 26046 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6Parser_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6Parser_10__setstate_cython__},
jpayne@69 26047 {0, 0, 0, 0}
jpayne@69 26048 };
jpayne@69 26049 #if CYTHON_USE_TYPE_SPECS
jpayne@69 26050 static PyType_Slot __pyx_type_5pysam_9libctabix_Parser_slots[] = {
jpayne@69 26051 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_Parser},
jpayne@69 26052 {Py_tp_call, (void *)__pyx_pw_5pysam_9libctabix_6Parser_7__call__},
jpayne@69 26053 {Py_tp_doc, (void *)PyDoc_STR("Parser(encoding=u'ascii')")},
jpayne@69 26054 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@69 26055 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@69 26056 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_Parser},
jpayne@69 26057 {Py_tp_init, (void *)__pyx_pw_5pysam_9libctabix_6Parser_1__init__},
jpayne@69 26058 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_Parser},
jpayne@69 26059 {0, 0},
jpayne@69 26060 };
jpayne@69 26061 static PyType_Spec __pyx_type_5pysam_9libctabix_Parser_spec = {
jpayne@69 26062 "pysam.libctabix.Parser",
jpayne@69 26063 sizeof(struct __pyx_obj_5pysam_9libctabix_Parser),
jpayne@69 26064 0,
jpayne@69 26065 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 26066 __pyx_type_5pysam_9libctabix_Parser_slots,
jpayne@69 26067 };
jpayne@69 26068 #else
jpayne@69 26069
jpayne@69 26070 static PyTypeObject __pyx_type_5pysam_9libctabix_Parser = {
jpayne@69 26071 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 26072 "pysam.libctabix.""Parser", /*tp_name*/
jpayne@69 26073 sizeof(struct __pyx_obj_5pysam_9libctabix_Parser), /*tp_basicsize*/
jpayne@69 26074 0, /*tp_itemsize*/
jpayne@69 26075 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@69 26076 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 26077 0, /*tp_print*/
jpayne@69 26078 #endif
jpayne@69 26079 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 26080 0, /*tp_vectorcall_offset*/
jpayne@69 26081 #endif
jpayne@69 26082 0, /*tp_getattr*/
jpayne@69 26083 0, /*tp_setattr*/
jpayne@69 26084 #if PY_MAJOR_VERSION < 3
jpayne@69 26085 0, /*tp_compare*/
jpayne@69 26086 #endif
jpayne@69 26087 #if PY_MAJOR_VERSION >= 3
jpayne@69 26088 0, /*tp_as_async*/
jpayne@69 26089 #endif
jpayne@69 26090 0, /*tp_repr*/
jpayne@69 26091 0, /*tp_as_number*/
jpayne@69 26092 0, /*tp_as_sequence*/
jpayne@69 26093 0, /*tp_as_mapping*/
jpayne@69 26094 0, /*tp_hash*/
jpayne@69 26095 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@69 26096 0, /*tp_str*/
jpayne@69 26097 0, /*tp_getattro*/
jpayne@69 26098 0, /*tp_setattro*/
jpayne@69 26099 0, /*tp_as_buffer*/
jpayne@69 26100 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 26101 PyDoc_STR("Parser(encoding=u'ascii')"), /*tp_doc*/
jpayne@69 26102 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@69 26103 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@69 26104 0, /*tp_richcompare*/
jpayne@69 26105 0, /*tp_weaklistoffset*/
jpayne@69 26106 0, /*tp_iter*/
jpayne@69 26107 0, /*tp_iternext*/
jpayne@69 26108 __pyx_methods_5pysam_9libctabix_Parser, /*tp_methods*/
jpayne@69 26109 0, /*tp_members*/
jpayne@69 26110 0, /*tp_getset*/
jpayne@69 26111 0, /*tp_base*/
jpayne@69 26112 0, /*tp_dict*/
jpayne@69 26113 0, /*tp_descr_get*/
jpayne@69 26114 0, /*tp_descr_set*/
jpayne@69 26115 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 26116 0, /*tp_dictoffset*/
jpayne@69 26117 #endif
jpayne@69 26118 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@69 26119 0, /*tp_alloc*/
jpayne@69 26120 __pyx_tp_new_5pysam_9libctabix_Parser, /*tp_new*/
jpayne@69 26121 0, /*tp_free*/
jpayne@69 26122 0, /*tp_is_gc*/
jpayne@69 26123 0, /*tp_bases*/
jpayne@69 26124 0, /*tp_mro*/
jpayne@69 26125 0, /*tp_cache*/
jpayne@69 26126 0, /*tp_subclasses*/
jpayne@69 26127 0, /*tp_weaklist*/
jpayne@69 26128 0, /*tp_del*/
jpayne@69 26129 0, /*tp_version_tag*/
jpayne@69 26130 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 26131 #if CYTHON_USE_TP_FINALIZE
jpayne@69 26132 0, /*tp_finalize*/
jpayne@69 26133 #else
jpayne@69 26134 NULL, /*tp_finalize*/
jpayne@69 26135 #endif
jpayne@69 26136 #endif
jpayne@69 26137 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 26138 0, /*tp_vectorcall*/
jpayne@69 26139 #endif
jpayne@69 26140 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 26141 0, /*tp_print*/
jpayne@69 26142 #endif
jpayne@69 26143 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 26144 0, /*tp_watched*/
jpayne@69 26145 #endif
jpayne@69 26146 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 26147 0, /*tp_versions_used*/
jpayne@69 26148 #endif
jpayne@69 26149 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 26150 0, /*tp_pypy_flags*/
jpayne@69 26151 #endif
jpayne@69 26152 };
jpayne@69 26153 #endif
jpayne@69 26154 static struct __pyx_vtabstruct_5pysam_9libctabix_asTuple __pyx_vtable_5pysam_9libctabix_asTuple;
jpayne@69 26155
jpayne@69 26156 static PyObject *__pyx_tp_new_5pysam_9libctabix_asTuple(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 26157 struct __pyx_obj_5pysam_9libctabix_asTuple *p;
jpayne@69 26158 PyObject *o = __pyx_tp_new_5pysam_9libctabix_Parser(t, a, k);
jpayne@69 26159 if (unlikely(!o)) return 0;
jpayne@69 26160 p = ((struct __pyx_obj_5pysam_9libctabix_asTuple *)o);
jpayne@69 26161 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__pyx_vtabptr_5pysam_9libctabix_asTuple;
jpayne@69 26162 return o;
jpayne@69 26163 }
jpayne@69 26164
jpayne@69 26165 static PyMethodDef __pyx_methods_5pysam_9libctabix_asTuple[] = {
jpayne@69 26166 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_7asTuple_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_7asTuple___reduce_cython__},
jpayne@69 26167 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_7asTuple_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_7asTuple_2__setstate_cython__},
jpayne@69 26168 {0, 0, 0, 0}
jpayne@69 26169 };
jpayne@69 26170 #if CYTHON_USE_TYPE_SPECS
jpayne@69 26171 static PyType_Slot __pyx_type_5pysam_9libctabix_asTuple_slots[] = {
jpayne@69 26172 {Py_tp_doc, (void *)PyDoc_STR("converts a :term:`tabix row` into a python tuple.\n\n A field in a row is accessed by numeric index.\n ")},
jpayne@69 26173 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@69 26174 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@69 26175 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_asTuple},
jpayne@69 26176 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_asTuple},
jpayne@69 26177 {0, 0},
jpayne@69 26178 };
jpayne@69 26179 static PyType_Spec __pyx_type_5pysam_9libctabix_asTuple_spec = {
jpayne@69 26180 "pysam.libctabix.asTuple",
jpayne@69 26181 sizeof(struct __pyx_obj_5pysam_9libctabix_asTuple),
jpayne@69 26182 0,
jpayne@69 26183 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 26184 __pyx_type_5pysam_9libctabix_asTuple_slots,
jpayne@69 26185 };
jpayne@69 26186 #else
jpayne@69 26187
jpayne@69 26188 static PyTypeObject __pyx_type_5pysam_9libctabix_asTuple = {
jpayne@69 26189 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 26190 "pysam.libctabix.""asTuple", /*tp_name*/
jpayne@69 26191 sizeof(struct __pyx_obj_5pysam_9libctabix_asTuple), /*tp_basicsize*/
jpayne@69 26192 0, /*tp_itemsize*/
jpayne@69 26193 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@69 26194 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 26195 0, /*tp_print*/
jpayne@69 26196 #endif
jpayne@69 26197 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 26198 0, /*tp_vectorcall_offset*/
jpayne@69 26199 #endif
jpayne@69 26200 0, /*tp_getattr*/
jpayne@69 26201 0, /*tp_setattr*/
jpayne@69 26202 #if PY_MAJOR_VERSION < 3
jpayne@69 26203 0, /*tp_compare*/
jpayne@69 26204 #endif
jpayne@69 26205 #if PY_MAJOR_VERSION >= 3
jpayne@69 26206 0, /*tp_as_async*/
jpayne@69 26207 #endif
jpayne@69 26208 0, /*tp_repr*/
jpayne@69 26209 0, /*tp_as_number*/
jpayne@69 26210 0, /*tp_as_sequence*/
jpayne@69 26211 0, /*tp_as_mapping*/
jpayne@69 26212 0, /*tp_hash*/
jpayne@69 26213 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 26214 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@69 26215 #else
jpayne@69 26216 0, /*tp_call*/
jpayne@69 26217 #endif
jpayne@69 26218 0, /*tp_str*/
jpayne@69 26219 0, /*tp_getattro*/
jpayne@69 26220 0, /*tp_setattro*/
jpayne@69 26221 0, /*tp_as_buffer*/
jpayne@69 26222 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 26223 PyDoc_STR("converts a :term:`tabix row` into a python tuple.\n\n A field in a row is accessed by numeric index.\n "), /*tp_doc*/
jpayne@69 26224 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@69 26225 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@69 26226 0, /*tp_richcompare*/
jpayne@69 26227 0, /*tp_weaklistoffset*/
jpayne@69 26228 0, /*tp_iter*/
jpayne@69 26229 0, /*tp_iternext*/
jpayne@69 26230 __pyx_methods_5pysam_9libctabix_asTuple, /*tp_methods*/
jpayne@69 26231 0, /*tp_members*/
jpayne@69 26232 0, /*tp_getset*/
jpayne@69 26233 0, /*tp_base*/
jpayne@69 26234 0, /*tp_dict*/
jpayne@69 26235 0, /*tp_descr_get*/
jpayne@69 26236 0, /*tp_descr_set*/
jpayne@69 26237 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 26238 0, /*tp_dictoffset*/
jpayne@69 26239 #endif
jpayne@69 26240 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 26241 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@69 26242 #else
jpayne@69 26243 0, /*tp_init*/
jpayne@69 26244 #endif
jpayne@69 26245 0, /*tp_alloc*/
jpayne@69 26246 __pyx_tp_new_5pysam_9libctabix_asTuple, /*tp_new*/
jpayne@69 26247 0, /*tp_free*/
jpayne@69 26248 0, /*tp_is_gc*/
jpayne@69 26249 0, /*tp_bases*/
jpayne@69 26250 0, /*tp_mro*/
jpayne@69 26251 0, /*tp_cache*/
jpayne@69 26252 0, /*tp_subclasses*/
jpayne@69 26253 0, /*tp_weaklist*/
jpayne@69 26254 0, /*tp_del*/
jpayne@69 26255 0, /*tp_version_tag*/
jpayne@69 26256 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 26257 #if CYTHON_USE_TP_FINALIZE
jpayne@69 26258 0, /*tp_finalize*/
jpayne@69 26259 #else
jpayne@69 26260 NULL, /*tp_finalize*/
jpayne@69 26261 #endif
jpayne@69 26262 #endif
jpayne@69 26263 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 26264 0, /*tp_vectorcall*/
jpayne@69 26265 #endif
jpayne@69 26266 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 26267 0, /*tp_print*/
jpayne@69 26268 #endif
jpayne@69 26269 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 26270 0, /*tp_watched*/
jpayne@69 26271 #endif
jpayne@69 26272 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 26273 0, /*tp_versions_used*/
jpayne@69 26274 #endif
jpayne@69 26275 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 26276 0, /*tp_pypy_flags*/
jpayne@69 26277 #endif
jpayne@69 26278 };
jpayne@69 26279 #endif
jpayne@69 26280 static struct __pyx_vtabstruct_5pysam_9libctabix_asGTF __pyx_vtable_5pysam_9libctabix_asGTF;
jpayne@69 26281
jpayne@69 26282 static PyObject *__pyx_tp_new_5pysam_9libctabix_asGTF(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 26283 struct __pyx_obj_5pysam_9libctabix_asGTF *p;
jpayne@69 26284 PyObject *o = __pyx_tp_new_5pysam_9libctabix_Parser(t, a, k);
jpayne@69 26285 if (unlikely(!o)) return 0;
jpayne@69 26286 p = ((struct __pyx_obj_5pysam_9libctabix_asGTF *)o);
jpayne@69 26287 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__pyx_vtabptr_5pysam_9libctabix_asGTF;
jpayne@69 26288 return o;
jpayne@69 26289 }
jpayne@69 26290
jpayne@69 26291 static PyMethodDef __pyx_methods_5pysam_9libctabix_asGTF[] = {
jpayne@69 26292 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asGTF_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asGTF___reduce_cython__},
jpayne@69 26293 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asGTF_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asGTF_2__setstate_cython__},
jpayne@69 26294 {0, 0, 0, 0}
jpayne@69 26295 };
jpayne@69 26296 #if CYTHON_USE_TYPE_SPECS
jpayne@69 26297 static PyType_Slot __pyx_type_5pysam_9libctabix_asGTF_slots[] = {
jpayne@69 26298 {Py_tp_doc, (void *)PyDoc_STR("converts a :term:`tabix row` into a GTF record with the following\n fields:\n \n +----------+----------+-------------------------------+\n |*Column* |*Name* |*Content* |\n +----------+----------+-------------------------------+\n |1 |contig |the chromosome name |\n +----------+----------+-------------------------------+\n |2 |feature |The feature type |\n +----------+----------+-------------------------------+\n |3 |source |The feature source |\n +----------+----------+-------------------------------+\n |4 |start |genomic start coordinate |\n | | |(0-based) |\n +----------+----------+-------------------------------+\n |5 |end |genomic end coordinate |\n | | |(0-based) |\n +----------+----------+-------------------------------+\n |6 |score |feature score |\n +----------+----------+-------------------------------+\n |7 |strand |strand |\n +----------+----------+-------------------------------+\n |8 |frame |frame |\n +----------+----------+-------------------------------+\n |9 |attributes|the attribute field |\n +----------+----------+-------------------------------+\n\n GTF formatted entries also define the following fields that\n are derived from the attributes field:\n\n +--------------------+------------------------------+\n |*Name* |*Content* |\n +--------------------+------------------------------+\n |gene_id |the gene identifier |\n +--------------------+------------------------------+\n |transcript_id |the transcript identifier |\n +--------------------+-------------------""-----------+\n\n ")},
jpayne@69 26299 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@69 26300 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@69 26301 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_asGTF},
jpayne@69 26302 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_asGTF},
jpayne@69 26303 {0, 0},
jpayne@69 26304 };
jpayne@69 26305 static PyType_Spec __pyx_type_5pysam_9libctabix_asGTF_spec = {
jpayne@69 26306 "pysam.libctabix.asGTF",
jpayne@69 26307 sizeof(struct __pyx_obj_5pysam_9libctabix_asGTF),
jpayne@69 26308 0,
jpayne@69 26309 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 26310 __pyx_type_5pysam_9libctabix_asGTF_slots,
jpayne@69 26311 };
jpayne@69 26312 #else
jpayne@69 26313
jpayne@69 26314 static PyTypeObject __pyx_type_5pysam_9libctabix_asGTF = {
jpayne@69 26315 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 26316 "pysam.libctabix.""asGTF", /*tp_name*/
jpayne@69 26317 sizeof(struct __pyx_obj_5pysam_9libctabix_asGTF), /*tp_basicsize*/
jpayne@69 26318 0, /*tp_itemsize*/
jpayne@69 26319 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@69 26320 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 26321 0, /*tp_print*/
jpayne@69 26322 #endif
jpayne@69 26323 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 26324 0, /*tp_vectorcall_offset*/
jpayne@69 26325 #endif
jpayne@69 26326 0, /*tp_getattr*/
jpayne@69 26327 0, /*tp_setattr*/
jpayne@69 26328 #if PY_MAJOR_VERSION < 3
jpayne@69 26329 0, /*tp_compare*/
jpayne@69 26330 #endif
jpayne@69 26331 #if PY_MAJOR_VERSION >= 3
jpayne@69 26332 0, /*tp_as_async*/
jpayne@69 26333 #endif
jpayne@69 26334 0, /*tp_repr*/
jpayne@69 26335 0, /*tp_as_number*/
jpayne@69 26336 0, /*tp_as_sequence*/
jpayne@69 26337 0, /*tp_as_mapping*/
jpayne@69 26338 0, /*tp_hash*/
jpayne@69 26339 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 26340 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@69 26341 #else
jpayne@69 26342 0, /*tp_call*/
jpayne@69 26343 #endif
jpayne@69 26344 0, /*tp_str*/
jpayne@69 26345 0, /*tp_getattro*/
jpayne@69 26346 0, /*tp_setattro*/
jpayne@69 26347 0, /*tp_as_buffer*/
jpayne@69 26348 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 26349 PyDoc_STR("converts a :term:`tabix row` into a GTF record with the following\n fields:\n \n +----------+----------+-------------------------------+\n |*Column* |*Name* |*Content* |\n +----------+----------+-------------------------------+\n |1 |contig |the chromosome name |\n +----------+----------+-------------------------------+\n |2 |feature |The feature type |\n +----------+----------+-------------------------------+\n |3 |source |The feature source |\n +----------+----------+-------------------------------+\n |4 |start |genomic start coordinate |\n | | |(0-based) |\n +----------+----------+-------------------------------+\n |5 |end |genomic end coordinate |\n | | |(0-based) |\n +----------+----------+-------------------------------+\n |6 |score |feature score |\n +----------+----------+-------------------------------+\n |7 |strand |strand |\n +----------+----------+-------------------------------+\n |8 |frame |frame |\n +----------+----------+-------------------------------+\n |9 |attributes|the attribute field |\n +----------+----------+-------------------------------+\n\n GTF formatted entries also define the following fields that\n are derived from the attributes field:\n\n +--------------------+------------------------------+\n |*Name* |*Content* |\n +--------------------+------------------------------+\n |gene_id |the gene identifier |\n +--------------------+------------------------------+\n |transcript_id |the transcript identifier |\n +--------------------+-------------------""-----------+\n\n "), /*tp_doc*/
jpayne@69 26350 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@69 26351 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@69 26352 0, /*tp_richcompare*/
jpayne@69 26353 0, /*tp_weaklistoffset*/
jpayne@69 26354 0, /*tp_iter*/
jpayne@69 26355 0, /*tp_iternext*/
jpayne@69 26356 __pyx_methods_5pysam_9libctabix_asGTF, /*tp_methods*/
jpayne@69 26357 0, /*tp_members*/
jpayne@69 26358 0, /*tp_getset*/
jpayne@69 26359 0, /*tp_base*/
jpayne@69 26360 0, /*tp_dict*/
jpayne@69 26361 0, /*tp_descr_get*/
jpayne@69 26362 0, /*tp_descr_set*/
jpayne@69 26363 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 26364 0, /*tp_dictoffset*/
jpayne@69 26365 #endif
jpayne@69 26366 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 26367 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@69 26368 #else
jpayne@69 26369 0, /*tp_init*/
jpayne@69 26370 #endif
jpayne@69 26371 0, /*tp_alloc*/
jpayne@69 26372 __pyx_tp_new_5pysam_9libctabix_asGTF, /*tp_new*/
jpayne@69 26373 0, /*tp_free*/
jpayne@69 26374 0, /*tp_is_gc*/
jpayne@69 26375 0, /*tp_bases*/
jpayne@69 26376 0, /*tp_mro*/
jpayne@69 26377 0, /*tp_cache*/
jpayne@69 26378 0, /*tp_subclasses*/
jpayne@69 26379 0, /*tp_weaklist*/
jpayne@69 26380 0, /*tp_del*/
jpayne@69 26381 0, /*tp_version_tag*/
jpayne@69 26382 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 26383 #if CYTHON_USE_TP_FINALIZE
jpayne@69 26384 0, /*tp_finalize*/
jpayne@69 26385 #else
jpayne@69 26386 NULL, /*tp_finalize*/
jpayne@69 26387 #endif
jpayne@69 26388 #endif
jpayne@69 26389 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 26390 0, /*tp_vectorcall*/
jpayne@69 26391 #endif
jpayne@69 26392 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 26393 0, /*tp_print*/
jpayne@69 26394 #endif
jpayne@69 26395 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 26396 0, /*tp_watched*/
jpayne@69 26397 #endif
jpayne@69 26398 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 26399 0, /*tp_versions_used*/
jpayne@69 26400 #endif
jpayne@69 26401 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 26402 0, /*tp_pypy_flags*/
jpayne@69 26403 #endif
jpayne@69 26404 };
jpayne@69 26405 #endif
jpayne@69 26406 static struct __pyx_vtabstruct_5pysam_9libctabix_asGFF3 __pyx_vtable_5pysam_9libctabix_asGFF3;
jpayne@69 26407
jpayne@69 26408 static PyObject *__pyx_tp_new_5pysam_9libctabix_asGFF3(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 26409 struct __pyx_obj_5pysam_9libctabix_asGFF3 *p;
jpayne@69 26410 PyObject *o = __pyx_tp_new_5pysam_9libctabix_Parser(t, a, k);
jpayne@69 26411 if (unlikely(!o)) return 0;
jpayne@69 26412 p = ((struct __pyx_obj_5pysam_9libctabix_asGFF3 *)o);
jpayne@69 26413 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__pyx_vtabptr_5pysam_9libctabix_asGFF3;
jpayne@69 26414 return o;
jpayne@69 26415 }
jpayne@69 26416
jpayne@69 26417 static PyMethodDef __pyx_methods_5pysam_9libctabix_asGFF3[] = {
jpayne@69 26418 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6asGFF3_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6asGFF3___reduce_cython__},
jpayne@69 26419 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_6asGFF3_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_6asGFF3_2__setstate_cython__},
jpayne@69 26420 {0, 0, 0, 0}
jpayne@69 26421 };
jpayne@69 26422 #if CYTHON_USE_TYPE_SPECS
jpayne@69 26423 static PyType_Slot __pyx_type_5pysam_9libctabix_asGFF3_slots[] = {
jpayne@69 26424 {Py_tp_doc, (void *)PyDoc_STR("converts a :term:`tabix row` into a GFF record with the following\n fields:\n \n +----------+----------+-------------------------------+\n |*Column* |*Name* |*Content* |\n +----------+----------+-------------------------------+\n |1 |contig |the chromosome name |\n +----------+----------+-------------------------------+\n |2 |feature |The feature type |\n +----------+----------+-------------------------------+\n |3 |source |The feature source |\n +----------+----------+-------------------------------+\n |4 |start |genomic start coordinate |\n | | |(0-based) |\n +----------+----------+-------------------------------+\n |5 |end |genomic end coordinate |\n | | |(0-based) |\n +----------+----------+-------------------------------+\n |6 |score |feature score |\n +----------+----------+-------------------------------+\n |7 |strand |strand |\n +----------+----------+-------------------------------+\n |8 |frame |frame |\n +----------+----------+-------------------------------+\n |9 |attributes|the attribute field |\n +----------+----------+-------------------------------+\n\n ")},
jpayne@69 26425 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@69 26426 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@69 26427 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_asGFF3},
jpayne@69 26428 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_asGFF3},
jpayne@69 26429 {0, 0},
jpayne@69 26430 };
jpayne@69 26431 static PyType_Spec __pyx_type_5pysam_9libctabix_asGFF3_spec = {
jpayne@69 26432 "pysam.libctabix.asGFF3",
jpayne@69 26433 sizeof(struct __pyx_obj_5pysam_9libctabix_asGFF3),
jpayne@69 26434 0,
jpayne@69 26435 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 26436 __pyx_type_5pysam_9libctabix_asGFF3_slots,
jpayne@69 26437 };
jpayne@69 26438 #else
jpayne@69 26439
jpayne@69 26440 static PyTypeObject __pyx_type_5pysam_9libctabix_asGFF3 = {
jpayne@69 26441 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 26442 "pysam.libctabix.""asGFF3", /*tp_name*/
jpayne@69 26443 sizeof(struct __pyx_obj_5pysam_9libctabix_asGFF3), /*tp_basicsize*/
jpayne@69 26444 0, /*tp_itemsize*/
jpayne@69 26445 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@69 26446 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 26447 0, /*tp_print*/
jpayne@69 26448 #endif
jpayne@69 26449 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 26450 0, /*tp_vectorcall_offset*/
jpayne@69 26451 #endif
jpayne@69 26452 0, /*tp_getattr*/
jpayne@69 26453 0, /*tp_setattr*/
jpayne@69 26454 #if PY_MAJOR_VERSION < 3
jpayne@69 26455 0, /*tp_compare*/
jpayne@69 26456 #endif
jpayne@69 26457 #if PY_MAJOR_VERSION >= 3
jpayne@69 26458 0, /*tp_as_async*/
jpayne@69 26459 #endif
jpayne@69 26460 0, /*tp_repr*/
jpayne@69 26461 0, /*tp_as_number*/
jpayne@69 26462 0, /*tp_as_sequence*/
jpayne@69 26463 0, /*tp_as_mapping*/
jpayne@69 26464 0, /*tp_hash*/
jpayne@69 26465 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 26466 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@69 26467 #else
jpayne@69 26468 0, /*tp_call*/
jpayne@69 26469 #endif
jpayne@69 26470 0, /*tp_str*/
jpayne@69 26471 0, /*tp_getattro*/
jpayne@69 26472 0, /*tp_setattro*/
jpayne@69 26473 0, /*tp_as_buffer*/
jpayne@69 26474 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 26475 PyDoc_STR("converts a :term:`tabix row` into a GFF record with the following\n fields:\n \n +----------+----------+-------------------------------+\n |*Column* |*Name* |*Content* |\n +----------+----------+-------------------------------+\n |1 |contig |the chromosome name |\n +----------+----------+-------------------------------+\n |2 |feature |The feature type |\n +----------+----------+-------------------------------+\n |3 |source |The feature source |\n +----------+----------+-------------------------------+\n |4 |start |genomic start coordinate |\n | | |(0-based) |\n +----------+----------+-------------------------------+\n |5 |end |genomic end coordinate |\n | | |(0-based) |\n +----------+----------+-------------------------------+\n |6 |score |feature score |\n +----------+----------+-------------------------------+\n |7 |strand |strand |\n +----------+----------+-------------------------------+\n |8 |frame |frame |\n +----------+----------+-------------------------------+\n |9 |attributes|the attribute field |\n +----------+----------+-------------------------------+\n\n "), /*tp_doc*/
jpayne@69 26476 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@69 26477 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@69 26478 0, /*tp_richcompare*/
jpayne@69 26479 0, /*tp_weaklistoffset*/
jpayne@69 26480 0, /*tp_iter*/
jpayne@69 26481 0, /*tp_iternext*/
jpayne@69 26482 __pyx_methods_5pysam_9libctabix_asGFF3, /*tp_methods*/
jpayne@69 26483 0, /*tp_members*/
jpayne@69 26484 0, /*tp_getset*/
jpayne@69 26485 0, /*tp_base*/
jpayne@69 26486 0, /*tp_dict*/
jpayne@69 26487 0, /*tp_descr_get*/
jpayne@69 26488 0, /*tp_descr_set*/
jpayne@69 26489 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 26490 0, /*tp_dictoffset*/
jpayne@69 26491 #endif
jpayne@69 26492 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 26493 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@69 26494 #else
jpayne@69 26495 0, /*tp_init*/
jpayne@69 26496 #endif
jpayne@69 26497 0, /*tp_alloc*/
jpayne@69 26498 __pyx_tp_new_5pysam_9libctabix_asGFF3, /*tp_new*/
jpayne@69 26499 0, /*tp_free*/
jpayne@69 26500 0, /*tp_is_gc*/
jpayne@69 26501 0, /*tp_bases*/
jpayne@69 26502 0, /*tp_mro*/
jpayne@69 26503 0, /*tp_cache*/
jpayne@69 26504 0, /*tp_subclasses*/
jpayne@69 26505 0, /*tp_weaklist*/
jpayne@69 26506 0, /*tp_del*/
jpayne@69 26507 0, /*tp_version_tag*/
jpayne@69 26508 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 26509 #if CYTHON_USE_TP_FINALIZE
jpayne@69 26510 0, /*tp_finalize*/
jpayne@69 26511 #else
jpayne@69 26512 NULL, /*tp_finalize*/
jpayne@69 26513 #endif
jpayne@69 26514 #endif
jpayne@69 26515 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 26516 0, /*tp_vectorcall*/
jpayne@69 26517 #endif
jpayne@69 26518 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 26519 0, /*tp_print*/
jpayne@69 26520 #endif
jpayne@69 26521 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 26522 0, /*tp_watched*/
jpayne@69 26523 #endif
jpayne@69 26524 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 26525 0, /*tp_versions_used*/
jpayne@69 26526 #endif
jpayne@69 26527 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 26528 0, /*tp_pypy_flags*/
jpayne@69 26529 #endif
jpayne@69 26530 };
jpayne@69 26531 #endif
jpayne@69 26532 static struct __pyx_vtabstruct_5pysam_9libctabix_asBed __pyx_vtable_5pysam_9libctabix_asBed;
jpayne@69 26533
jpayne@69 26534 static PyObject *__pyx_tp_new_5pysam_9libctabix_asBed(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 26535 struct __pyx_obj_5pysam_9libctabix_asBed *p;
jpayne@69 26536 PyObject *o = __pyx_tp_new_5pysam_9libctabix_Parser(t, a, k);
jpayne@69 26537 if (unlikely(!o)) return 0;
jpayne@69 26538 p = ((struct __pyx_obj_5pysam_9libctabix_asBed *)o);
jpayne@69 26539 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__pyx_vtabptr_5pysam_9libctabix_asBed;
jpayne@69 26540 return o;
jpayne@69 26541 }
jpayne@69 26542
jpayne@69 26543 static PyMethodDef __pyx_methods_5pysam_9libctabix_asBed[] = {
jpayne@69 26544 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asBed_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asBed___reduce_cython__},
jpayne@69 26545 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asBed_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asBed_2__setstate_cython__},
jpayne@69 26546 {0, 0, 0, 0}
jpayne@69 26547 };
jpayne@69 26548 #if CYTHON_USE_TYPE_SPECS
jpayne@69 26549 static PyType_Slot __pyx_type_5pysam_9libctabix_asBed_slots[] = {
jpayne@69 26550 {Py_tp_doc, (void *)PyDoc_STR("converts a :term:`tabix row` into a bed record\n with the following fields:\n\n +-----------+-----------+------------------------------------------+\n |*Column* |*Field* |*Contents* |\n | | | |\n +-----------+-----------+------------------------------------------+\n |1 |contig |contig |\n | | | |\n +-----------+-----------+------------------------------------------+\n |2 |start |genomic start coordinate (zero-based) |\n +-----------+-----------+------------------------------------------+\n |3 |end |genomic end coordinate plus one |\n | | |(zero-based) |\n +-----------+-----------+------------------------------------------+\n |4 |name |name of feature. |\n +-----------+-----------+------------------------------------------+\n |5 |score |score of feature |\n +-----------+-----------+------------------------------------------+\n |6 |strand |strand of feature |\n +-----------+-----------+------------------------------------------+\n |7 |thickStart |thickStart |\n +-----------+-----------+------------------------------------------+\n |8 |thickEnd |thickEnd |\n +-----------+-----------+------------------------------------------+\n |9 |itemRGB |itemRGB |\n +-----------+-----------+------------------------------------------+\n |10 |blockCount |number of bocks |\n +-----------+-----------+---------------------------------------""---+\n |11 |blockSizes |',' separated string of block sizes |\n +-----------+-----------+------------------------------------------+\n |12 |blockStarts|',' separated string of block genomic |\n | | |start positions |\n +-----------+-----------+------------------------------------------+\n\n Only the first three fields are required. Additional\n fields are optional, but if one is defined, all the preceding\n need to be defined as well.\n\n ")},
jpayne@69 26551 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@69 26552 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@69 26553 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_asBed},
jpayne@69 26554 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_asBed},
jpayne@69 26555 {0, 0},
jpayne@69 26556 };
jpayne@69 26557 static PyType_Spec __pyx_type_5pysam_9libctabix_asBed_spec = {
jpayne@69 26558 "pysam.libctabix.asBed",
jpayne@69 26559 sizeof(struct __pyx_obj_5pysam_9libctabix_asBed),
jpayne@69 26560 0,
jpayne@69 26561 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 26562 __pyx_type_5pysam_9libctabix_asBed_slots,
jpayne@69 26563 };
jpayne@69 26564 #else
jpayne@69 26565
jpayne@69 26566 static PyTypeObject __pyx_type_5pysam_9libctabix_asBed = {
jpayne@69 26567 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 26568 "pysam.libctabix.""asBed", /*tp_name*/
jpayne@69 26569 sizeof(struct __pyx_obj_5pysam_9libctabix_asBed), /*tp_basicsize*/
jpayne@69 26570 0, /*tp_itemsize*/
jpayne@69 26571 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@69 26572 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 26573 0, /*tp_print*/
jpayne@69 26574 #endif
jpayne@69 26575 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 26576 0, /*tp_vectorcall_offset*/
jpayne@69 26577 #endif
jpayne@69 26578 0, /*tp_getattr*/
jpayne@69 26579 0, /*tp_setattr*/
jpayne@69 26580 #if PY_MAJOR_VERSION < 3
jpayne@69 26581 0, /*tp_compare*/
jpayne@69 26582 #endif
jpayne@69 26583 #if PY_MAJOR_VERSION >= 3
jpayne@69 26584 0, /*tp_as_async*/
jpayne@69 26585 #endif
jpayne@69 26586 0, /*tp_repr*/
jpayne@69 26587 0, /*tp_as_number*/
jpayne@69 26588 0, /*tp_as_sequence*/
jpayne@69 26589 0, /*tp_as_mapping*/
jpayne@69 26590 0, /*tp_hash*/
jpayne@69 26591 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 26592 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@69 26593 #else
jpayne@69 26594 0, /*tp_call*/
jpayne@69 26595 #endif
jpayne@69 26596 0, /*tp_str*/
jpayne@69 26597 0, /*tp_getattro*/
jpayne@69 26598 0, /*tp_setattro*/
jpayne@69 26599 0, /*tp_as_buffer*/
jpayne@69 26600 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 26601 PyDoc_STR("converts a :term:`tabix row` into a bed record\n with the following fields:\n\n +-----------+-----------+------------------------------------------+\n |*Column* |*Field* |*Contents* |\n | | | |\n +-----------+-----------+------------------------------------------+\n |1 |contig |contig |\n | | | |\n +-----------+-----------+------------------------------------------+\n |2 |start |genomic start coordinate (zero-based) |\n +-----------+-----------+------------------------------------------+\n |3 |end |genomic end coordinate plus one |\n | | |(zero-based) |\n +-----------+-----------+------------------------------------------+\n |4 |name |name of feature. |\n +-----------+-----------+------------------------------------------+\n |5 |score |score of feature |\n +-----------+-----------+------------------------------------------+\n |6 |strand |strand of feature |\n +-----------+-----------+------------------------------------------+\n |7 |thickStart |thickStart |\n +-----------+-----------+------------------------------------------+\n |8 |thickEnd |thickEnd |\n +-----------+-----------+------------------------------------------+\n |9 |itemRGB |itemRGB |\n +-----------+-----------+------------------------------------------+\n |10 |blockCount |number of bocks |\n +-----------+-----------+---------------------------------------""---+\n |11 |blockSizes |',' separated string of block sizes |\n +-----------+-----------+------------------------------------------+\n |12 |blockStarts|',' separated string of block genomic |\n | | |start positions |\n +-----------+-----------+------------------------------------------+\n\n Only the first three fields are required. Additional\n fields are optional, but if one is defined, all the preceding\n need to be defined as well.\n\n "), /*tp_doc*/
jpayne@69 26602 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@69 26603 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@69 26604 0, /*tp_richcompare*/
jpayne@69 26605 0, /*tp_weaklistoffset*/
jpayne@69 26606 0, /*tp_iter*/
jpayne@69 26607 0, /*tp_iternext*/
jpayne@69 26608 __pyx_methods_5pysam_9libctabix_asBed, /*tp_methods*/
jpayne@69 26609 0, /*tp_members*/
jpayne@69 26610 0, /*tp_getset*/
jpayne@69 26611 0, /*tp_base*/
jpayne@69 26612 0, /*tp_dict*/
jpayne@69 26613 0, /*tp_descr_get*/
jpayne@69 26614 0, /*tp_descr_set*/
jpayne@69 26615 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 26616 0, /*tp_dictoffset*/
jpayne@69 26617 #endif
jpayne@69 26618 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 26619 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@69 26620 #else
jpayne@69 26621 0, /*tp_init*/
jpayne@69 26622 #endif
jpayne@69 26623 0, /*tp_alloc*/
jpayne@69 26624 __pyx_tp_new_5pysam_9libctabix_asBed, /*tp_new*/
jpayne@69 26625 0, /*tp_free*/
jpayne@69 26626 0, /*tp_is_gc*/
jpayne@69 26627 0, /*tp_bases*/
jpayne@69 26628 0, /*tp_mro*/
jpayne@69 26629 0, /*tp_cache*/
jpayne@69 26630 0, /*tp_subclasses*/
jpayne@69 26631 0, /*tp_weaklist*/
jpayne@69 26632 0, /*tp_del*/
jpayne@69 26633 0, /*tp_version_tag*/
jpayne@69 26634 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 26635 #if CYTHON_USE_TP_FINALIZE
jpayne@69 26636 0, /*tp_finalize*/
jpayne@69 26637 #else
jpayne@69 26638 NULL, /*tp_finalize*/
jpayne@69 26639 #endif
jpayne@69 26640 #endif
jpayne@69 26641 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 26642 0, /*tp_vectorcall*/
jpayne@69 26643 #endif
jpayne@69 26644 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 26645 0, /*tp_print*/
jpayne@69 26646 #endif
jpayne@69 26647 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 26648 0, /*tp_watched*/
jpayne@69 26649 #endif
jpayne@69 26650 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 26651 0, /*tp_versions_used*/
jpayne@69 26652 #endif
jpayne@69 26653 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 26654 0, /*tp_pypy_flags*/
jpayne@69 26655 #endif
jpayne@69 26656 };
jpayne@69 26657 #endif
jpayne@69 26658 static struct __pyx_vtabstruct_5pysam_9libctabix_asVCF __pyx_vtable_5pysam_9libctabix_asVCF;
jpayne@69 26659
jpayne@69 26660 static PyObject *__pyx_tp_new_5pysam_9libctabix_asVCF(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 26661 struct __pyx_obj_5pysam_9libctabix_asVCF *p;
jpayne@69 26662 PyObject *o = __pyx_tp_new_5pysam_9libctabix_Parser(t, a, k);
jpayne@69 26663 if (unlikely(!o)) return 0;
jpayne@69 26664 p = ((struct __pyx_obj_5pysam_9libctabix_asVCF *)o);
jpayne@69 26665 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__pyx_vtabptr_5pysam_9libctabix_asVCF;
jpayne@69 26666 return o;
jpayne@69 26667 }
jpayne@69 26668
jpayne@69 26669 static PyMethodDef __pyx_methods_5pysam_9libctabix_asVCF[] = {
jpayne@69 26670 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asVCF_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asVCF___reduce_cython__},
jpayne@69 26671 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_5asVCF_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_5asVCF_2__setstate_cython__},
jpayne@69 26672 {0, 0, 0, 0}
jpayne@69 26673 };
jpayne@69 26674 #if CYTHON_USE_TYPE_SPECS
jpayne@69 26675 static PyType_Slot __pyx_type_5pysam_9libctabix_asVCF_slots[] = {
jpayne@69 26676 {Py_tp_doc, (void *)PyDoc_STR("converts a :term:`tabix row` into a VCF record with\n the following fields:\n \n +----------+---------+------------------------------------+\n |*Column* |*Field* |*Contents* |\n | | | |\n +----------+---------+------------------------------------+\n |1 |contig |chromosome |\n +----------+---------+------------------------------------+\n |2 |pos |chromosomal position, zero-based |\n +----------+---------+------------------------------------+\n |3 |id |id |\n +----------+---------+------------------------------------+\n |4 |ref |reference allele |\n +----------+---------+------------------------------------+\n |5 |alt |alternate alleles |\n +----------+---------+------------------------------------+\n |6 |qual |quality |\n +----------+---------+------------------------------------+\n |7 |filter |filter |\n +----------+---------+------------------------------------+\n |8 |info |info |\n +----------+---------+------------------------------------+\n |9 |format |format specifier. |\n +----------+---------+------------------------------------+\n\n Access to genotypes is via index::\n\n contig = vcf.contig\n first_sample_genotype = vcf[0]\n second_sample_genotype = vcf[1]\n\n ")},
jpayne@69 26677 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@69 26678 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@69 26679 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_asVCF},
jpayne@69 26680 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_asVCF},
jpayne@69 26681 {0, 0},
jpayne@69 26682 };
jpayne@69 26683 static PyType_Spec __pyx_type_5pysam_9libctabix_asVCF_spec = {
jpayne@69 26684 "pysam.libctabix.asVCF",
jpayne@69 26685 sizeof(struct __pyx_obj_5pysam_9libctabix_asVCF),
jpayne@69 26686 0,
jpayne@69 26687 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 26688 __pyx_type_5pysam_9libctabix_asVCF_slots,
jpayne@69 26689 };
jpayne@69 26690 #else
jpayne@69 26691
jpayne@69 26692 static PyTypeObject __pyx_type_5pysam_9libctabix_asVCF = {
jpayne@69 26693 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 26694 "pysam.libctabix.""asVCF", /*tp_name*/
jpayne@69 26695 sizeof(struct __pyx_obj_5pysam_9libctabix_asVCF), /*tp_basicsize*/
jpayne@69 26696 0, /*tp_itemsize*/
jpayne@69 26697 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@69 26698 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 26699 0, /*tp_print*/
jpayne@69 26700 #endif
jpayne@69 26701 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 26702 0, /*tp_vectorcall_offset*/
jpayne@69 26703 #endif
jpayne@69 26704 0, /*tp_getattr*/
jpayne@69 26705 0, /*tp_setattr*/
jpayne@69 26706 #if PY_MAJOR_VERSION < 3
jpayne@69 26707 0, /*tp_compare*/
jpayne@69 26708 #endif
jpayne@69 26709 #if PY_MAJOR_VERSION >= 3
jpayne@69 26710 0, /*tp_as_async*/
jpayne@69 26711 #endif
jpayne@69 26712 0, /*tp_repr*/
jpayne@69 26713 0, /*tp_as_number*/
jpayne@69 26714 0, /*tp_as_sequence*/
jpayne@69 26715 0, /*tp_as_mapping*/
jpayne@69 26716 0, /*tp_hash*/
jpayne@69 26717 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 26718 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@69 26719 #else
jpayne@69 26720 0, /*tp_call*/
jpayne@69 26721 #endif
jpayne@69 26722 0, /*tp_str*/
jpayne@69 26723 0, /*tp_getattro*/
jpayne@69 26724 0, /*tp_setattro*/
jpayne@69 26725 0, /*tp_as_buffer*/
jpayne@69 26726 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 26727 PyDoc_STR("converts a :term:`tabix row` into a VCF record with\n the following fields:\n \n +----------+---------+------------------------------------+\n |*Column* |*Field* |*Contents* |\n | | | |\n +----------+---------+------------------------------------+\n |1 |contig |chromosome |\n +----------+---------+------------------------------------+\n |2 |pos |chromosomal position, zero-based |\n +----------+---------+------------------------------------+\n |3 |id |id |\n +----------+---------+------------------------------------+\n |4 |ref |reference allele |\n +----------+---------+------------------------------------+\n |5 |alt |alternate alleles |\n +----------+---------+------------------------------------+\n |6 |qual |quality |\n +----------+---------+------------------------------------+\n |7 |filter |filter |\n +----------+---------+------------------------------------+\n |8 |info |info |\n +----------+---------+------------------------------------+\n |9 |format |format specifier. |\n +----------+---------+------------------------------------+\n\n Access to genotypes is via index::\n\n contig = vcf.contig\n first_sample_genotype = vcf[0]\n second_sample_genotype = vcf[1]\n\n "), /*tp_doc*/
jpayne@69 26728 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@69 26729 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@69 26730 0, /*tp_richcompare*/
jpayne@69 26731 0, /*tp_weaklistoffset*/
jpayne@69 26732 0, /*tp_iter*/
jpayne@69 26733 0, /*tp_iternext*/
jpayne@69 26734 __pyx_methods_5pysam_9libctabix_asVCF, /*tp_methods*/
jpayne@69 26735 0, /*tp_members*/
jpayne@69 26736 0, /*tp_getset*/
jpayne@69 26737 0, /*tp_base*/
jpayne@69 26738 0, /*tp_dict*/
jpayne@69 26739 0, /*tp_descr_get*/
jpayne@69 26740 0, /*tp_descr_set*/
jpayne@69 26741 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 26742 0, /*tp_dictoffset*/
jpayne@69 26743 #endif
jpayne@69 26744 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 26745 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@69 26746 #else
jpayne@69 26747 0, /*tp_init*/
jpayne@69 26748 #endif
jpayne@69 26749 0, /*tp_alloc*/
jpayne@69 26750 __pyx_tp_new_5pysam_9libctabix_asVCF, /*tp_new*/
jpayne@69 26751 0, /*tp_free*/
jpayne@69 26752 0, /*tp_is_gc*/
jpayne@69 26753 0, /*tp_bases*/
jpayne@69 26754 0, /*tp_mro*/
jpayne@69 26755 0, /*tp_cache*/
jpayne@69 26756 0, /*tp_subclasses*/
jpayne@69 26757 0, /*tp_weaklist*/
jpayne@69 26758 0, /*tp_del*/
jpayne@69 26759 0, /*tp_version_tag*/
jpayne@69 26760 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 26761 #if CYTHON_USE_TP_FINALIZE
jpayne@69 26762 0, /*tp_finalize*/
jpayne@69 26763 #else
jpayne@69 26764 NULL, /*tp_finalize*/
jpayne@69 26765 #endif
jpayne@69 26766 #endif
jpayne@69 26767 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 26768 0, /*tp_vectorcall*/
jpayne@69 26769 #endif
jpayne@69 26770 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 26771 0, /*tp_print*/
jpayne@69 26772 #endif
jpayne@69 26773 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 26774 0, /*tp_watched*/
jpayne@69 26775 #endif
jpayne@69 26776 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 26777 0, /*tp_versions_used*/
jpayne@69 26778 #endif
jpayne@69 26779 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 26780 0, /*tp_pypy_flags*/
jpayne@69 26781 #endif
jpayne@69 26782 };
jpayne@69 26783 #endif
jpayne@69 26784 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator __pyx_vtable_5pysam_9libctabix_TabixIterator;
jpayne@69 26785
jpayne@69 26786 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
jpayne@69 26787 struct __pyx_obj_5pysam_9libctabix_TabixIterator *p;
jpayne@69 26788 PyObject *o;
jpayne@69 26789 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 26790 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@69 26791 o = alloc_func(t, 0);
jpayne@69 26792 #else
jpayne@69 26793 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@69 26794 o = (*t->tp_alloc)(t, 0);
jpayne@69 26795 } else {
jpayne@69 26796 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@69 26797 }
jpayne@69 26798 if (unlikely(!o)) return 0;
jpayne@69 26799 #endif
jpayne@69 26800 p = ((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)o);
jpayne@69 26801 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libctabix_TabixIterator;
jpayne@69 26802 p->tabixfile = ((struct __pyx_obj_5pysam_9libctabix_TabixFile *)Py_None); Py_INCREF(Py_None);
jpayne@69 26803 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@69 26804 return o;
jpayne@69 26805 }
jpayne@69 26806
jpayne@69 26807 static void __pyx_tp_dealloc_5pysam_9libctabix_TabixIterator(PyObject *o) {
jpayne@69 26808 struct __pyx_obj_5pysam_9libctabix_TabixIterator *p = (struct __pyx_obj_5pysam_9libctabix_TabixIterator *)o;
jpayne@69 26809 #if CYTHON_USE_TP_FINALIZE
jpayne@69 26810 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)) {
jpayne@69 26811 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_TabixIterator) {
jpayne@69 26812 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@69 26813 }
jpayne@69 26814 }
jpayne@69 26815 #endif
jpayne@69 26816 PyObject_GC_UnTrack(o);
jpayne@69 26817 {
jpayne@69 26818 PyObject *etype, *eval, *etb;
jpayne@69 26819 PyErr_Fetch(&etype, &eval, &etb);
jpayne@69 26820 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
jpayne@69 26821 __pyx_pw_5pysam_9libctabix_13TabixIterator_7__dealloc__(o);
jpayne@69 26822 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
jpayne@69 26823 PyErr_Restore(etype, eval, etb);
jpayne@69 26824 }
jpayne@69 26825 Py_CLEAR(p->tabixfile);
jpayne@69 26826 Py_CLEAR(p->encoding);
jpayne@69 26827 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@69 26828 (*Py_TYPE(o)->tp_free)(o);
jpayne@69 26829 #else
jpayne@69 26830 {
jpayne@69 26831 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@69 26832 if (tp_free) tp_free(o);
jpayne@69 26833 }
jpayne@69 26834 #endif
jpayne@69 26835 }
jpayne@69 26836
jpayne@69 26837 static int __pyx_tp_traverse_5pysam_9libctabix_TabixIterator(PyObject *o, visitproc v, void *a) {
jpayne@69 26838 int e;
jpayne@69 26839 struct __pyx_obj_5pysam_9libctabix_TabixIterator *p = (struct __pyx_obj_5pysam_9libctabix_TabixIterator *)o;
jpayne@69 26840 if (p->tabixfile) {
jpayne@69 26841 e = (*v)(((PyObject *)p->tabixfile), a); if (e) return e;
jpayne@69 26842 }
jpayne@69 26843 if (p->encoding) {
jpayne@69 26844 e = (*v)(p->encoding, a); if (e) return e;
jpayne@69 26845 }
jpayne@69 26846 return 0;
jpayne@69 26847 }
jpayne@69 26848
jpayne@69 26849 static int __pyx_tp_clear_5pysam_9libctabix_TabixIterator(PyObject *o) {
jpayne@69 26850 PyObject* tmp;
jpayne@69 26851 struct __pyx_obj_5pysam_9libctabix_TabixIterator *p = (struct __pyx_obj_5pysam_9libctabix_TabixIterator *)o;
jpayne@69 26852 tmp = ((PyObject*)p->tabixfile);
jpayne@69 26853 p->tabixfile = ((struct __pyx_obj_5pysam_9libctabix_TabixFile *)Py_None); Py_INCREF(Py_None);
jpayne@69 26854 Py_XDECREF(tmp);
jpayne@69 26855 tmp = ((PyObject*)p->encoding);
jpayne@69 26856 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@69 26857 Py_XDECREF(tmp);
jpayne@69 26858 return 0;
jpayne@69 26859 }
jpayne@69 26860
jpayne@69 26861 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@69 26862 PyObject *res = __pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__(self);
jpayne@69 26863 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@69 26864 return res;
jpayne@69 26865 }
jpayne@69 26866
jpayne@69 26867 static PyMethodDef __pyx_methods_5pysam_9libctabix_TabixIterator[] = {
jpayne@69 26868 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5pysam_9libctabix_13TabixIterator_4__next__},
jpayne@69 26869 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_13TabixIterator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_13TabixIterator_8__reduce_cython__},
jpayne@69 26870 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_13TabixIterator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_13TabixIterator_10__setstate_cython__},
jpayne@69 26871 {0, 0, 0, 0}
jpayne@69 26872 };
jpayne@69 26873 #if CYTHON_USE_TYPE_SPECS
jpayne@69 26874 static PyType_Slot __pyx_type_5pysam_9libctabix_TabixIterator_slots[] = {
jpayne@69 26875 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_TabixIterator},
jpayne@69 26876 {Py_tp_doc, (void *)PyDoc_STR("TabixIterator(encoding=u'ascii')\niterates over rows in *tabixfile* in region\n given by *tid*, *start* and *end*.\n ")},
jpayne@69 26877 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_TabixIterator},
jpayne@69 26878 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_TabixIterator},
jpayne@69 26879 {Py_tp_iter, (void *)__pyx_pw_5pysam_9libctabix_13TabixIterator_3__iter__},
jpayne@69 26880 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__},
jpayne@69 26881 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_TabixIterator},
jpayne@69 26882 {Py_tp_init, (void *)__pyx_pw_5pysam_9libctabix_13TabixIterator_1__init__},
jpayne@69 26883 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_TabixIterator},
jpayne@69 26884 {0, 0},
jpayne@69 26885 };
jpayne@69 26886 static PyType_Spec __pyx_type_5pysam_9libctabix_TabixIterator_spec = {
jpayne@69 26887 "pysam.libctabix.TabixIterator",
jpayne@69 26888 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixIterator),
jpayne@69 26889 0,
jpayne@69 26890 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 26891 __pyx_type_5pysam_9libctabix_TabixIterator_slots,
jpayne@69 26892 };
jpayne@69 26893 #else
jpayne@69 26894
jpayne@69 26895 static PyTypeObject __pyx_type_5pysam_9libctabix_TabixIterator = {
jpayne@69 26896 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 26897 "pysam.libctabix.""TabixIterator", /*tp_name*/
jpayne@69 26898 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixIterator), /*tp_basicsize*/
jpayne@69 26899 0, /*tp_itemsize*/
jpayne@69 26900 __pyx_tp_dealloc_5pysam_9libctabix_TabixIterator, /*tp_dealloc*/
jpayne@69 26901 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 26902 0, /*tp_print*/
jpayne@69 26903 #endif
jpayne@69 26904 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 26905 0, /*tp_vectorcall_offset*/
jpayne@69 26906 #endif
jpayne@69 26907 0, /*tp_getattr*/
jpayne@69 26908 0, /*tp_setattr*/
jpayne@69 26909 #if PY_MAJOR_VERSION < 3
jpayne@69 26910 0, /*tp_compare*/
jpayne@69 26911 #endif
jpayne@69 26912 #if PY_MAJOR_VERSION >= 3
jpayne@69 26913 0, /*tp_as_async*/
jpayne@69 26914 #endif
jpayne@69 26915 0, /*tp_repr*/
jpayne@69 26916 0, /*tp_as_number*/
jpayne@69 26917 0, /*tp_as_sequence*/
jpayne@69 26918 0, /*tp_as_mapping*/
jpayne@69 26919 0, /*tp_hash*/
jpayne@69 26920 0, /*tp_call*/
jpayne@69 26921 0, /*tp_str*/
jpayne@69 26922 0, /*tp_getattro*/
jpayne@69 26923 0, /*tp_setattro*/
jpayne@69 26924 0, /*tp_as_buffer*/
jpayne@69 26925 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 26926 PyDoc_STR("TabixIterator(encoding=u'ascii')\niterates over rows in *tabixfile* in region\n given by *tid*, *start* and *end*.\n "), /*tp_doc*/
jpayne@69 26927 __pyx_tp_traverse_5pysam_9libctabix_TabixIterator, /*tp_traverse*/
jpayne@69 26928 __pyx_tp_clear_5pysam_9libctabix_TabixIterator, /*tp_clear*/
jpayne@69 26929 0, /*tp_richcompare*/
jpayne@69 26930 0, /*tp_weaklistoffset*/
jpayne@69 26931 __pyx_pw_5pysam_9libctabix_13TabixIterator_3__iter__, /*tp_iter*/
jpayne@69 26932 __pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__, /*tp_iternext*/
jpayne@69 26933 __pyx_methods_5pysam_9libctabix_TabixIterator, /*tp_methods*/
jpayne@69 26934 0, /*tp_members*/
jpayne@69 26935 0, /*tp_getset*/
jpayne@69 26936 0, /*tp_base*/
jpayne@69 26937 0, /*tp_dict*/
jpayne@69 26938 0, /*tp_descr_get*/
jpayne@69 26939 0, /*tp_descr_set*/
jpayne@69 26940 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 26941 0, /*tp_dictoffset*/
jpayne@69 26942 #endif
jpayne@69 26943 __pyx_pw_5pysam_9libctabix_13TabixIterator_1__init__, /*tp_init*/
jpayne@69 26944 0, /*tp_alloc*/
jpayne@69 26945 __pyx_tp_new_5pysam_9libctabix_TabixIterator, /*tp_new*/
jpayne@69 26946 0, /*tp_free*/
jpayne@69 26947 0, /*tp_is_gc*/
jpayne@69 26948 0, /*tp_bases*/
jpayne@69 26949 0, /*tp_mro*/
jpayne@69 26950 0, /*tp_cache*/
jpayne@69 26951 0, /*tp_subclasses*/
jpayne@69 26952 0, /*tp_weaklist*/
jpayne@69 26953 0, /*tp_del*/
jpayne@69 26954 0, /*tp_version_tag*/
jpayne@69 26955 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 26956 #if CYTHON_USE_TP_FINALIZE
jpayne@69 26957 0, /*tp_finalize*/
jpayne@69 26958 #else
jpayne@69 26959 NULL, /*tp_finalize*/
jpayne@69 26960 #endif
jpayne@69 26961 #endif
jpayne@69 26962 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 26963 0, /*tp_vectorcall*/
jpayne@69 26964 #endif
jpayne@69 26965 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 26966 0, /*tp_print*/
jpayne@69 26967 #endif
jpayne@69 26968 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 26969 0, /*tp_watched*/
jpayne@69 26970 #endif
jpayne@69 26971 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 26972 0, /*tp_versions_used*/
jpayne@69 26973 #endif
jpayne@69 26974 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 26975 0, /*tp_pypy_flags*/
jpayne@69 26976 #endif
jpayne@69 26977 };
jpayne@69 26978 #endif
jpayne@69 26979 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixIteratorParsed __pyx_vtable_5pysam_9libctabix_TabixIteratorParsed;
jpayne@69 26980
jpayne@69 26981 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 26982 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *p;
jpayne@69 26983 PyObject *o = __pyx_tp_new_5pysam_9libctabix_TabixIterator(t, a, k);
jpayne@69 26984 if (unlikely(!o)) return 0;
jpayne@69 26985 p = ((struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)o);
jpayne@69 26986 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator*)__pyx_vtabptr_5pysam_9libctabix_TabixIteratorParsed;
jpayne@69 26987 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@69 26988 return o;
jpayne@69 26989 }
jpayne@69 26990
jpayne@69 26991 static void __pyx_tp_dealloc_5pysam_9libctabix_TabixIteratorParsed(PyObject *o) {
jpayne@69 26992 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)o;
jpayne@69 26993 #if CYTHON_USE_TP_FINALIZE
jpayne@69 26994 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)) {
jpayne@69 26995 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_TabixIteratorParsed) {
jpayne@69 26996 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@69 26997 }
jpayne@69 26998 }
jpayne@69 26999 #endif
jpayne@69 27000 PyObject_GC_UnTrack(o);
jpayne@69 27001 Py_CLEAR(p->parser);
jpayne@69 27002 PyObject_GC_Track(o);
jpayne@69 27003 __pyx_tp_dealloc_5pysam_9libctabix_TabixIterator(o);
jpayne@69 27004 }
jpayne@69 27005
jpayne@69 27006 static int __pyx_tp_traverse_5pysam_9libctabix_TabixIteratorParsed(PyObject *o, visitproc v, void *a) {
jpayne@69 27007 int e;
jpayne@69 27008 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)o;
jpayne@69 27009 e = __pyx_tp_traverse_5pysam_9libctabix_TabixIterator(o, v, a); if (e) return e;
jpayne@69 27010 if (p->parser) {
jpayne@69 27011 e = (*v)(((PyObject *)p->parser), a); if (e) return e;
jpayne@69 27012 }
jpayne@69 27013 return 0;
jpayne@69 27014 }
jpayne@69 27015
jpayne@69 27016 static int __pyx_tp_clear_5pysam_9libctabix_TabixIteratorParsed(PyObject *o) {
jpayne@69 27017 PyObject* tmp;
jpayne@69 27018 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)o;
jpayne@69 27019 __pyx_tp_clear_5pysam_9libctabix_TabixIterator(o);
jpayne@69 27020 tmp = ((PyObject*)p->parser);
jpayne@69 27021 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@69 27022 Py_XDECREF(tmp);
jpayne@69 27023 return 0;
jpayne@69 27024 }
jpayne@69 27025
jpayne@69 27026 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@69 27027 PyObject *res = __pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__(self);
jpayne@69 27028 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@69 27029 return res;
jpayne@69 27030 }
jpayne@69 27031
jpayne@69 27032 static PyMethodDef __pyx_methods_5pysam_9libctabix_TabixIteratorParsed[] = {
jpayne@69 27033 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_2__next__},
jpayne@69 27034 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_4__reduce_cython__},
jpayne@69 27035 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_6__setstate_cython__},
jpayne@69 27036 {0, 0, 0, 0}
jpayne@69 27037 };
jpayne@69 27038 #if CYTHON_USE_TYPE_SPECS
jpayne@69 27039 static PyType_Slot __pyx_type_5pysam_9libctabix_TabixIteratorParsed_slots[] = {
jpayne@69 27040 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_TabixIteratorParsed},
jpayne@69 27041 {Py_tp_doc, (void *)PyDoc_STR("TabixIteratorParsed(Parser parser)\niterates over mapped reads in a region.\n\n The *parser* determines the encoding.\n\n Returns parsed data.\n ")},
jpayne@69 27042 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_TabixIteratorParsed},
jpayne@69 27043 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_TabixIteratorParsed},
jpayne@69 27044 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__},
jpayne@69 27045 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_TabixIteratorParsed},
jpayne@69 27046 {Py_tp_init, (void *)__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_1__init__},
jpayne@69 27047 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_TabixIteratorParsed},
jpayne@69 27048 {0, 0},
jpayne@69 27049 };
jpayne@69 27050 static PyType_Spec __pyx_type_5pysam_9libctabix_TabixIteratorParsed_spec = {
jpayne@69 27051 "pysam.libctabix.TabixIteratorParsed",
jpayne@69 27052 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed),
jpayne@69 27053 0,
jpayne@69 27054 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 27055 __pyx_type_5pysam_9libctabix_TabixIteratorParsed_slots,
jpayne@69 27056 };
jpayne@69 27057 #else
jpayne@69 27058
jpayne@69 27059 static PyTypeObject __pyx_type_5pysam_9libctabix_TabixIteratorParsed = {
jpayne@69 27060 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 27061 "pysam.libctabix.""TabixIteratorParsed", /*tp_name*/
jpayne@69 27062 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed), /*tp_basicsize*/
jpayne@69 27063 0, /*tp_itemsize*/
jpayne@69 27064 __pyx_tp_dealloc_5pysam_9libctabix_TabixIteratorParsed, /*tp_dealloc*/
jpayne@69 27065 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 27066 0, /*tp_print*/
jpayne@69 27067 #endif
jpayne@69 27068 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 27069 0, /*tp_vectorcall_offset*/
jpayne@69 27070 #endif
jpayne@69 27071 0, /*tp_getattr*/
jpayne@69 27072 0, /*tp_setattr*/
jpayne@69 27073 #if PY_MAJOR_VERSION < 3
jpayne@69 27074 0, /*tp_compare*/
jpayne@69 27075 #endif
jpayne@69 27076 #if PY_MAJOR_VERSION >= 3
jpayne@69 27077 0, /*tp_as_async*/
jpayne@69 27078 #endif
jpayne@69 27079 0, /*tp_repr*/
jpayne@69 27080 0, /*tp_as_number*/
jpayne@69 27081 0, /*tp_as_sequence*/
jpayne@69 27082 0, /*tp_as_mapping*/
jpayne@69 27083 0, /*tp_hash*/
jpayne@69 27084 0, /*tp_call*/
jpayne@69 27085 0, /*tp_str*/
jpayne@69 27086 0, /*tp_getattro*/
jpayne@69 27087 0, /*tp_setattro*/
jpayne@69 27088 0, /*tp_as_buffer*/
jpayne@69 27089 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 27090 PyDoc_STR("TabixIteratorParsed(Parser parser)\niterates over mapped reads in a region.\n\n The *parser* determines the encoding.\n\n Returns parsed data.\n "), /*tp_doc*/
jpayne@69 27091 __pyx_tp_traverse_5pysam_9libctabix_TabixIteratorParsed, /*tp_traverse*/
jpayne@69 27092 __pyx_tp_clear_5pysam_9libctabix_TabixIteratorParsed, /*tp_clear*/
jpayne@69 27093 0, /*tp_richcompare*/
jpayne@69 27094 0, /*tp_weaklistoffset*/
jpayne@69 27095 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 27096 __pyx_pw_5pysam_9libctabix_13TabixIterator_3__iter__, /*tp_iter*/
jpayne@69 27097 #else
jpayne@69 27098 0, /*tp_iter*/
jpayne@69 27099 #endif
jpayne@69 27100 __pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__, /*tp_iternext*/
jpayne@69 27101 __pyx_methods_5pysam_9libctabix_TabixIteratorParsed, /*tp_methods*/
jpayne@69 27102 0, /*tp_members*/
jpayne@69 27103 0, /*tp_getset*/
jpayne@69 27104 0, /*tp_base*/
jpayne@69 27105 0, /*tp_dict*/
jpayne@69 27106 0, /*tp_descr_get*/
jpayne@69 27107 0, /*tp_descr_set*/
jpayne@69 27108 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 27109 0, /*tp_dictoffset*/
jpayne@69 27110 #endif
jpayne@69 27111 __pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_1__init__, /*tp_init*/
jpayne@69 27112 0, /*tp_alloc*/
jpayne@69 27113 __pyx_tp_new_5pysam_9libctabix_TabixIteratorParsed, /*tp_new*/
jpayne@69 27114 0, /*tp_free*/
jpayne@69 27115 0, /*tp_is_gc*/
jpayne@69 27116 0, /*tp_bases*/
jpayne@69 27117 0, /*tp_mro*/
jpayne@69 27118 0, /*tp_cache*/
jpayne@69 27119 0, /*tp_subclasses*/
jpayne@69 27120 0, /*tp_weaklist*/
jpayne@69 27121 0, /*tp_del*/
jpayne@69 27122 0, /*tp_version_tag*/
jpayne@69 27123 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 27124 #if CYTHON_USE_TP_FINALIZE
jpayne@69 27125 0, /*tp_finalize*/
jpayne@69 27126 #else
jpayne@69 27127 NULL, /*tp_finalize*/
jpayne@69 27128 #endif
jpayne@69 27129 #endif
jpayne@69 27130 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 27131 0, /*tp_vectorcall*/
jpayne@69 27132 #endif
jpayne@69 27133 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 27134 0, /*tp_print*/
jpayne@69 27135 #endif
jpayne@69 27136 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 27137 0, /*tp_watched*/
jpayne@69 27138 #endif
jpayne@69 27139 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 27140 0, /*tp_versions_used*/
jpayne@69 27141 #endif
jpayne@69 27142 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 27143 0, /*tp_pypy_flags*/
jpayne@69 27144 #endif
jpayne@69 27145 };
jpayne@69 27146 #endif
jpayne@69 27147 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator __pyx_vtable_5pysam_9libctabix_GZIterator;
jpayne@69 27148
jpayne@69 27149 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
jpayne@69 27150 struct __pyx_obj_5pysam_9libctabix_GZIterator *p;
jpayne@69 27151 PyObject *o;
jpayne@69 27152 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 27153 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@69 27154 o = alloc_func(t, 0);
jpayne@69 27155 #else
jpayne@69 27156 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@69 27157 o = (*t->tp_alloc)(t, 0);
jpayne@69 27158 } else {
jpayne@69 27159 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@69 27160 }
jpayne@69 27161 if (unlikely(!o)) return 0;
jpayne@69 27162 #endif
jpayne@69 27163 p = ((struct __pyx_obj_5pysam_9libctabix_GZIterator *)o);
jpayne@69 27164 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libctabix_GZIterator;
jpayne@69 27165 p->_filename = Py_None; Py_INCREF(Py_None);
jpayne@69 27166 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@69 27167 return o;
jpayne@69 27168 }
jpayne@69 27169
jpayne@69 27170 static void __pyx_tp_dealloc_5pysam_9libctabix_GZIterator(PyObject *o) {
jpayne@69 27171 struct __pyx_obj_5pysam_9libctabix_GZIterator *p = (struct __pyx_obj_5pysam_9libctabix_GZIterator *)o;
jpayne@69 27172 #if CYTHON_USE_TP_FINALIZE
jpayne@69 27173 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)) {
jpayne@69 27174 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_GZIterator) {
jpayne@69 27175 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@69 27176 }
jpayne@69 27177 }
jpayne@69 27178 #endif
jpayne@69 27179 PyObject_GC_UnTrack(o);
jpayne@69 27180 {
jpayne@69 27181 PyObject *etype, *eval, *etb;
jpayne@69 27182 PyErr_Fetch(&etype, &eval, &etb);
jpayne@69 27183 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
jpayne@69 27184 __pyx_pw_5pysam_9libctabix_10GZIterator_3__dealloc__(o);
jpayne@69 27185 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
jpayne@69 27186 PyErr_Restore(etype, eval, etb);
jpayne@69 27187 }
jpayne@69 27188 Py_CLEAR(p->_filename);
jpayne@69 27189 Py_CLEAR(p->encoding);
jpayne@69 27190 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@69 27191 (*Py_TYPE(o)->tp_free)(o);
jpayne@69 27192 #else
jpayne@69 27193 {
jpayne@69 27194 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@69 27195 if (tp_free) tp_free(o);
jpayne@69 27196 }
jpayne@69 27197 #endif
jpayne@69 27198 }
jpayne@69 27199
jpayne@69 27200 static int __pyx_tp_traverse_5pysam_9libctabix_GZIterator(PyObject *o, visitproc v, void *a) {
jpayne@69 27201 int e;
jpayne@69 27202 struct __pyx_obj_5pysam_9libctabix_GZIterator *p = (struct __pyx_obj_5pysam_9libctabix_GZIterator *)o;
jpayne@69 27203 if (p->_filename) {
jpayne@69 27204 e = (*v)(p->_filename, a); if (e) return e;
jpayne@69 27205 }
jpayne@69 27206 if (p->encoding) {
jpayne@69 27207 e = (*v)(p->encoding, a); if (e) return e;
jpayne@69 27208 }
jpayne@69 27209 return 0;
jpayne@69 27210 }
jpayne@69 27211
jpayne@69 27212 static int __pyx_tp_clear_5pysam_9libctabix_GZIterator(PyObject *o) {
jpayne@69 27213 PyObject* tmp;
jpayne@69 27214 struct __pyx_obj_5pysam_9libctabix_GZIterator *p = (struct __pyx_obj_5pysam_9libctabix_GZIterator *)o;
jpayne@69 27215 tmp = ((PyObject*)p->_filename);
jpayne@69 27216 p->_filename = Py_None; Py_INCREF(Py_None);
jpayne@69 27217 Py_XDECREF(tmp);
jpayne@69 27218 tmp = ((PyObject*)p->encoding);
jpayne@69 27219 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@69 27220 Py_XDECREF(tmp);
jpayne@69 27221 return 0;
jpayne@69 27222 }
jpayne@69 27223
jpayne@69 27224 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_10GZIterator_7__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@69 27225 PyObject *res = __pyx_pw_5pysam_9libctabix_10GZIterator_7__next__(self);
jpayne@69 27226 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@69 27227 return res;
jpayne@69 27228 }
jpayne@69 27229
jpayne@69 27230 static PyMethodDef __pyx_methods_5pysam_9libctabix_GZIterator[] = {
jpayne@69 27231 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_10GZIterator_7__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5pysam_9libctabix_10GZIterator_6__next__},
jpayne@69 27232 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_10GZIterator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_10GZIterator_8__reduce_cython__},
jpayne@69 27233 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_10GZIterator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_10GZIterator_10__setstate_cython__},
jpayne@69 27234 {0, 0, 0, 0}
jpayne@69 27235 };
jpayne@69 27236 #if CYTHON_USE_TYPE_SPECS
jpayne@69 27237 static PyType_Slot __pyx_type_5pysam_9libctabix_GZIterator_slots[] = {
jpayne@69 27238 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_GZIterator},
jpayne@69 27239 {Py_tp_doc, (void *)PyDoc_STR("GZIterator(filename, int buffer_size=65536, encoding=u'ascii')")},
jpayne@69 27240 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_GZIterator},
jpayne@69 27241 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_GZIterator},
jpayne@69 27242 {Py_tp_iter, (void *)__pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__},
jpayne@69 27243 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_10GZIterator_7__next__},
jpayne@69 27244 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_GZIterator},
jpayne@69 27245 {Py_tp_init, (void *)__pyx_pw_5pysam_9libctabix_10GZIterator_1__init__},
jpayne@69 27246 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_GZIterator},
jpayne@69 27247 {0, 0},
jpayne@69 27248 };
jpayne@69 27249 static PyType_Spec __pyx_type_5pysam_9libctabix_GZIterator_spec = {
jpayne@69 27250 "pysam.libctabix.GZIterator",
jpayne@69 27251 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIterator),
jpayne@69 27252 0,
jpayne@69 27253 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 27254 __pyx_type_5pysam_9libctabix_GZIterator_slots,
jpayne@69 27255 };
jpayne@69 27256 #else
jpayne@69 27257
jpayne@69 27258 static PyTypeObject __pyx_type_5pysam_9libctabix_GZIterator = {
jpayne@69 27259 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 27260 "pysam.libctabix.""GZIterator", /*tp_name*/
jpayne@69 27261 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIterator), /*tp_basicsize*/
jpayne@69 27262 0, /*tp_itemsize*/
jpayne@69 27263 __pyx_tp_dealloc_5pysam_9libctabix_GZIterator, /*tp_dealloc*/
jpayne@69 27264 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 27265 0, /*tp_print*/
jpayne@69 27266 #endif
jpayne@69 27267 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 27268 0, /*tp_vectorcall_offset*/
jpayne@69 27269 #endif
jpayne@69 27270 0, /*tp_getattr*/
jpayne@69 27271 0, /*tp_setattr*/
jpayne@69 27272 #if PY_MAJOR_VERSION < 3
jpayne@69 27273 0, /*tp_compare*/
jpayne@69 27274 #endif
jpayne@69 27275 #if PY_MAJOR_VERSION >= 3
jpayne@69 27276 0, /*tp_as_async*/
jpayne@69 27277 #endif
jpayne@69 27278 0, /*tp_repr*/
jpayne@69 27279 0, /*tp_as_number*/
jpayne@69 27280 0, /*tp_as_sequence*/
jpayne@69 27281 0, /*tp_as_mapping*/
jpayne@69 27282 0, /*tp_hash*/
jpayne@69 27283 0, /*tp_call*/
jpayne@69 27284 0, /*tp_str*/
jpayne@69 27285 0, /*tp_getattro*/
jpayne@69 27286 0, /*tp_setattro*/
jpayne@69 27287 0, /*tp_as_buffer*/
jpayne@69 27288 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 27289 PyDoc_STR("GZIterator(filename, int buffer_size=65536, encoding=u'ascii')"), /*tp_doc*/
jpayne@69 27290 __pyx_tp_traverse_5pysam_9libctabix_GZIterator, /*tp_traverse*/
jpayne@69 27291 __pyx_tp_clear_5pysam_9libctabix_GZIterator, /*tp_clear*/
jpayne@69 27292 0, /*tp_richcompare*/
jpayne@69 27293 0, /*tp_weaklistoffset*/
jpayne@69 27294 __pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__, /*tp_iter*/
jpayne@69 27295 __pyx_pw_5pysam_9libctabix_10GZIterator_7__next__, /*tp_iternext*/
jpayne@69 27296 __pyx_methods_5pysam_9libctabix_GZIterator, /*tp_methods*/
jpayne@69 27297 0, /*tp_members*/
jpayne@69 27298 0, /*tp_getset*/
jpayne@69 27299 0, /*tp_base*/
jpayne@69 27300 0, /*tp_dict*/
jpayne@69 27301 0, /*tp_descr_get*/
jpayne@69 27302 0, /*tp_descr_set*/
jpayne@69 27303 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 27304 0, /*tp_dictoffset*/
jpayne@69 27305 #endif
jpayne@69 27306 __pyx_pw_5pysam_9libctabix_10GZIterator_1__init__, /*tp_init*/
jpayne@69 27307 0, /*tp_alloc*/
jpayne@69 27308 __pyx_tp_new_5pysam_9libctabix_GZIterator, /*tp_new*/
jpayne@69 27309 0, /*tp_free*/
jpayne@69 27310 0, /*tp_is_gc*/
jpayne@69 27311 0, /*tp_bases*/
jpayne@69 27312 0, /*tp_mro*/
jpayne@69 27313 0, /*tp_cache*/
jpayne@69 27314 0, /*tp_subclasses*/
jpayne@69 27315 0, /*tp_weaklist*/
jpayne@69 27316 0, /*tp_del*/
jpayne@69 27317 0, /*tp_version_tag*/
jpayne@69 27318 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 27319 #if CYTHON_USE_TP_FINALIZE
jpayne@69 27320 0, /*tp_finalize*/
jpayne@69 27321 #else
jpayne@69 27322 NULL, /*tp_finalize*/
jpayne@69 27323 #endif
jpayne@69 27324 #endif
jpayne@69 27325 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 27326 0, /*tp_vectorcall*/
jpayne@69 27327 #endif
jpayne@69 27328 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 27329 0, /*tp_print*/
jpayne@69 27330 #endif
jpayne@69 27331 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 27332 0, /*tp_watched*/
jpayne@69 27333 #endif
jpayne@69 27334 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 27335 0, /*tp_versions_used*/
jpayne@69 27336 #endif
jpayne@69 27337 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 27338 0, /*tp_pypy_flags*/
jpayne@69 27339 #endif
jpayne@69 27340 };
jpayne@69 27341 #endif
jpayne@69 27342 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorHead __pyx_vtable_5pysam_9libctabix_GZIteratorHead;
jpayne@69 27343
jpayne@69 27344 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIteratorHead(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 27345 struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *p;
jpayne@69 27346 PyObject *o = __pyx_tp_new_5pysam_9libctabix_GZIterator(t, a, k);
jpayne@69 27347 if (unlikely(!o)) return 0;
jpayne@69 27348 p = ((struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *)o);
jpayne@69 27349 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator*)__pyx_vtabptr_5pysam_9libctabix_GZIteratorHead;
jpayne@69 27350 return o;
jpayne@69 27351 }
jpayne@69 27352
jpayne@69 27353 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@69 27354 PyObject *res = __pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__(self);
jpayne@69 27355 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@69 27356 return res;
jpayne@69 27357 }
jpayne@69 27358
jpayne@69 27359 static PyMethodDef __pyx_methods_5pysam_9libctabix_GZIteratorHead[] = {
jpayne@69 27360 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5pysam_9libctabix_14GZIteratorHead___next__},
jpayne@69 27361 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_14GZIteratorHead_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_14GZIteratorHead_2__reduce_cython__},
jpayne@69 27362 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_14GZIteratorHead_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_14GZIteratorHead_4__setstate_cython__},
jpayne@69 27363 {0, 0, 0, 0}
jpayne@69 27364 };
jpayne@69 27365 #if CYTHON_USE_TYPE_SPECS
jpayne@69 27366 static PyType_Slot __pyx_type_5pysam_9libctabix_GZIteratorHead_slots[] = {
jpayne@69 27367 {Py_tp_doc, (void *)PyDoc_STR("iterate line-by-line through gzip (or bgzip)\n compressed file returning comments at top of file.\n ")},
jpayne@69 27368 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_GZIterator},
jpayne@69 27369 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_GZIterator},
jpayne@69 27370 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__},
jpayne@69 27371 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_GZIteratorHead},
jpayne@69 27372 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_GZIteratorHead},
jpayne@69 27373 {0, 0},
jpayne@69 27374 };
jpayne@69 27375 static PyType_Spec __pyx_type_5pysam_9libctabix_GZIteratorHead_spec = {
jpayne@69 27376 "pysam.libctabix.GZIteratorHead",
jpayne@69 27377 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIteratorHead),
jpayne@69 27378 0,
jpayne@69 27379 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 27380 __pyx_type_5pysam_9libctabix_GZIteratorHead_slots,
jpayne@69 27381 };
jpayne@69 27382 #else
jpayne@69 27383
jpayne@69 27384 static PyTypeObject __pyx_type_5pysam_9libctabix_GZIteratorHead = {
jpayne@69 27385 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 27386 "pysam.libctabix.""GZIteratorHead", /*tp_name*/
jpayne@69 27387 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIteratorHead), /*tp_basicsize*/
jpayne@69 27388 0, /*tp_itemsize*/
jpayne@69 27389 __pyx_tp_dealloc_5pysam_9libctabix_GZIterator, /*tp_dealloc*/
jpayne@69 27390 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 27391 0, /*tp_print*/
jpayne@69 27392 #endif
jpayne@69 27393 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 27394 0, /*tp_vectorcall_offset*/
jpayne@69 27395 #endif
jpayne@69 27396 0, /*tp_getattr*/
jpayne@69 27397 0, /*tp_setattr*/
jpayne@69 27398 #if PY_MAJOR_VERSION < 3
jpayne@69 27399 0, /*tp_compare*/
jpayne@69 27400 #endif
jpayne@69 27401 #if PY_MAJOR_VERSION >= 3
jpayne@69 27402 0, /*tp_as_async*/
jpayne@69 27403 #endif
jpayne@69 27404 0, /*tp_repr*/
jpayne@69 27405 0, /*tp_as_number*/
jpayne@69 27406 0, /*tp_as_sequence*/
jpayne@69 27407 0, /*tp_as_mapping*/
jpayne@69 27408 0, /*tp_hash*/
jpayne@69 27409 0, /*tp_call*/
jpayne@69 27410 0, /*tp_str*/
jpayne@69 27411 0, /*tp_getattro*/
jpayne@69 27412 0, /*tp_setattro*/
jpayne@69 27413 0, /*tp_as_buffer*/
jpayne@69 27414 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 27415 PyDoc_STR("iterate line-by-line through gzip (or bgzip)\n compressed file returning comments at top of file.\n "), /*tp_doc*/
jpayne@69 27416 __pyx_tp_traverse_5pysam_9libctabix_GZIterator, /*tp_traverse*/
jpayne@69 27417 __pyx_tp_clear_5pysam_9libctabix_GZIterator, /*tp_clear*/
jpayne@69 27418 0, /*tp_richcompare*/
jpayne@69 27419 0, /*tp_weaklistoffset*/
jpayne@69 27420 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 27421 __pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__, /*tp_iter*/
jpayne@69 27422 #else
jpayne@69 27423 0, /*tp_iter*/
jpayne@69 27424 #endif
jpayne@69 27425 __pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__, /*tp_iternext*/
jpayne@69 27426 __pyx_methods_5pysam_9libctabix_GZIteratorHead, /*tp_methods*/
jpayne@69 27427 0, /*tp_members*/
jpayne@69 27428 0, /*tp_getset*/
jpayne@69 27429 0, /*tp_base*/
jpayne@69 27430 0, /*tp_dict*/
jpayne@69 27431 0, /*tp_descr_get*/
jpayne@69 27432 0, /*tp_descr_set*/
jpayne@69 27433 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 27434 0, /*tp_dictoffset*/
jpayne@69 27435 #endif
jpayne@69 27436 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 27437 __pyx_pw_5pysam_9libctabix_10GZIterator_1__init__, /*tp_init*/
jpayne@69 27438 #else
jpayne@69 27439 0, /*tp_init*/
jpayne@69 27440 #endif
jpayne@69 27441 0, /*tp_alloc*/
jpayne@69 27442 __pyx_tp_new_5pysam_9libctabix_GZIteratorHead, /*tp_new*/
jpayne@69 27443 0, /*tp_free*/
jpayne@69 27444 0, /*tp_is_gc*/
jpayne@69 27445 0, /*tp_bases*/
jpayne@69 27446 0, /*tp_mro*/
jpayne@69 27447 0, /*tp_cache*/
jpayne@69 27448 0, /*tp_subclasses*/
jpayne@69 27449 0, /*tp_weaklist*/
jpayne@69 27450 0, /*tp_del*/
jpayne@69 27451 0, /*tp_version_tag*/
jpayne@69 27452 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 27453 #if CYTHON_USE_TP_FINALIZE
jpayne@69 27454 0, /*tp_finalize*/
jpayne@69 27455 #else
jpayne@69 27456 NULL, /*tp_finalize*/
jpayne@69 27457 #endif
jpayne@69 27458 #endif
jpayne@69 27459 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 27460 0, /*tp_vectorcall*/
jpayne@69 27461 #endif
jpayne@69 27462 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 27463 0, /*tp_print*/
jpayne@69 27464 #endif
jpayne@69 27465 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 27466 0, /*tp_watched*/
jpayne@69 27467 #endif
jpayne@69 27468 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 27469 0, /*tp_versions_used*/
jpayne@69 27470 #endif
jpayne@69 27471 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 27472 0, /*tp_pypy_flags*/
jpayne@69 27473 #endif
jpayne@69 27474 };
jpayne@69 27475 #endif
jpayne@69 27476 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorParsed __pyx_vtable_5pysam_9libctabix_GZIteratorParsed;
jpayne@69 27477
jpayne@69 27478 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 27479 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *p;
jpayne@69 27480 PyObject *o = __pyx_tp_new_5pysam_9libctabix_GZIterator(t, a, k);
jpayne@69 27481 if (unlikely(!o)) return 0;
jpayne@69 27482 p = ((struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)o);
jpayne@69 27483 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator*)__pyx_vtabptr_5pysam_9libctabix_GZIteratorParsed;
jpayne@69 27484 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@69 27485 return o;
jpayne@69 27486 }
jpayne@69 27487
jpayne@69 27488 static void __pyx_tp_dealloc_5pysam_9libctabix_GZIteratorParsed(PyObject *o) {
jpayne@69 27489 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)o;
jpayne@69 27490 #if CYTHON_USE_TP_FINALIZE
jpayne@69 27491 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)) {
jpayne@69 27492 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_GZIteratorParsed) {
jpayne@69 27493 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@69 27494 }
jpayne@69 27495 }
jpayne@69 27496 #endif
jpayne@69 27497 PyObject_GC_UnTrack(o);
jpayne@69 27498 Py_CLEAR(p->parser);
jpayne@69 27499 PyObject_GC_Track(o);
jpayne@69 27500 __pyx_tp_dealloc_5pysam_9libctabix_GZIterator(o);
jpayne@69 27501 }
jpayne@69 27502
jpayne@69 27503 static int __pyx_tp_traverse_5pysam_9libctabix_GZIteratorParsed(PyObject *o, visitproc v, void *a) {
jpayne@69 27504 int e;
jpayne@69 27505 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)o;
jpayne@69 27506 e = __pyx_tp_traverse_5pysam_9libctabix_GZIterator(o, v, a); if (e) return e;
jpayne@69 27507 if (p->parser) {
jpayne@69 27508 e = (*v)(((PyObject *)p->parser), a); if (e) return e;
jpayne@69 27509 }
jpayne@69 27510 return 0;
jpayne@69 27511 }
jpayne@69 27512
jpayne@69 27513 static int __pyx_tp_clear_5pysam_9libctabix_GZIteratorParsed(PyObject *o) {
jpayne@69 27514 PyObject* tmp;
jpayne@69 27515 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)o;
jpayne@69 27516 __pyx_tp_clear_5pysam_9libctabix_GZIterator(o);
jpayne@69 27517 tmp = ((PyObject*)p->parser);
jpayne@69 27518 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@69 27519 Py_XDECREF(tmp);
jpayne@69 27520 return 0;
jpayne@69 27521 }
jpayne@69 27522
jpayne@69 27523 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@69 27524 PyObject *res = __pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__(self);
jpayne@69 27525 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@69 27526 return res;
jpayne@69 27527 }
jpayne@69 27528
jpayne@69 27529 static PyMethodDef __pyx_methods_5pysam_9libctabix_GZIteratorParsed[] = {
jpayne@69 27530 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5pysam_9libctabix_16GZIteratorParsed_2__next__},
jpayne@69 27531 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_16GZIteratorParsed_4__reduce_cython__},
jpayne@69 27532 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_16GZIteratorParsed_6__setstate_cython__},
jpayne@69 27533 {0, 0, 0, 0}
jpayne@69 27534 };
jpayne@69 27535 #if CYTHON_USE_TYPE_SPECS
jpayne@69 27536 static PyType_Slot __pyx_type_5pysam_9libctabix_GZIteratorParsed_slots[] = {
jpayne@69 27537 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_GZIteratorParsed},
jpayne@69 27538 {Py_tp_doc, (void *)PyDoc_STR("GZIteratorParsed(parser)\niterate line-by-line through gzip (or bgzip)\n compressed file returning comments at top of file.\n ")},
jpayne@69 27539 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_GZIteratorParsed},
jpayne@69 27540 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_GZIteratorParsed},
jpayne@69 27541 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__},
jpayne@69 27542 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_GZIteratorParsed},
jpayne@69 27543 {Py_tp_init, (void *)__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_1__init__},
jpayne@69 27544 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_GZIteratorParsed},
jpayne@69 27545 {0, 0},
jpayne@69 27546 };
jpayne@69 27547 static PyType_Spec __pyx_type_5pysam_9libctabix_GZIteratorParsed_spec = {
jpayne@69 27548 "pysam.libctabix.GZIteratorParsed",
jpayne@69 27549 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed),
jpayne@69 27550 0,
jpayne@69 27551 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 27552 __pyx_type_5pysam_9libctabix_GZIteratorParsed_slots,
jpayne@69 27553 };
jpayne@69 27554 #else
jpayne@69 27555
jpayne@69 27556 static PyTypeObject __pyx_type_5pysam_9libctabix_GZIteratorParsed = {
jpayne@69 27557 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 27558 "pysam.libctabix.""GZIteratorParsed", /*tp_name*/
jpayne@69 27559 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed), /*tp_basicsize*/
jpayne@69 27560 0, /*tp_itemsize*/
jpayne@69 27561 __pyx_tp_dealloc_5pysam_9libctabix_GZIteratorParsed, /*tp_dealloc*/
jpayne@69 27562 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 27563 0, /*tp_print*/
jpayne@69 27564 #endif
jpayne@69 27565 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 27566 0, /*tp_vectorcall_offset*/
jpayne@69 27567 #endif
jpayne@69 27568 0, /*tp_getattr*/
jpayne@69 27569 0, /*tp_setattr*/
jpayne@69 27570 #if PY_MAJOR_VERSION < 3
jpayne@69 27571 0, /*tp_compare*/
jpayne@69 27572 #endif
jpayne@69 27573 #if PY_MAJOR_VERSION >= 3
jpayne@69 27574 0, /*tp_as_async*/
jpayne@69 27575 #endif
jpayne@69 27576 0, /*tp_repr*/
jpayne@69 27577 0, /*tp_as_number*/
jpayne@69 27578 0, /*tp_as_sequence*/
jpayne@69 27579 0, /*tp_as_mapping*/
jpayne@69 27580 0, /*tp_hash*/
jpayne@69 27581 0, /*tp_call*/
jpayne@69 27582 0, /*tp_str*/
jpayne@69 27583 0, /*tp_getattro*/
jpayne@69 27584 0, /*tp_setattro*/
jpayne@69 27585 0, /*tp_as_buffer*/
jpayne@69 27586 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 27587 PyDoc_STR("GZIteratorParsed(parser)\niterate line-by-line through gzip (or bgzip)\n compressed file returning comments at top of file.\n "), /*tp_doc*/
jpayne@69 27588 __pyx_tp_traverse_5pysam_9libctabix_GZIteratorParsed, /*tp_traverse*/
jpayne@69 27589 __pyx_tp_clear_5pysam_9libctabix_GZIteratorParsed, /*tp_clear*/
jpayne@69 27590 0, /*tp_richcompare*/
jpayne@69 27591 0, /*tp_weaklistoffset*/
jpayne@69 27592 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 27593 __pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__, /*tp_iter*/
jpayne@69 27594 #else
jpayne@69 27595 0, /*tp_iter*/
jpayne@69 27596 #endif
jpayne@69 27597 __pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__, /*tp_iternext*/
jpayne@69 27598 __pyx_methods_5pysam_9libctabix_GZIteratorParsed, /*tp_methods*/
jpayne@69 27599 0, /*tp_members*/
jpayne@69 27600 0, /*tp_getset*/
jpayne@69 27601 0, /*tp_base*/
jpayne@69 27602 0, /*tp_dict*/
jpayne@69 27603 0, /*tp_descr_get*/
jpayne@69 27604 0, /*tp_descr_set*/
jpayne@69 27605 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 27606 0, /*tp_dictoffset*/
jpayne@69 27607 #endif
jpayne@69 27608 __pyx_pw_5pysam_9libctabix_16GZIteratorParsed_1__init__, /*tp_init*/
jpayne@69 27609 0, /*tp_alloc*/
jpayne@69 27610 __pyx_tp_new_5pysam_9libctabix_GZIteratorParsed, /*tp_new*/
jpayne@69 27611 0, /*tp_free*/
jpayne@69 27612 0, /*tp_is_gc*/
jpayne@69 27613 0, /*tp_bases*/
jpayne@69 27614 0, /*tp_mro*/
jpayne@69 27615 0, /*tp_cache*/
jpayne@69 27616 0, /*tp_subclasses*/
jpayne@69 27617 0, /*tp_weaklist*/
jpayne@69 27618 0, /*tp_del*/
jpayne@69 27619 0, /*tp_version_tag*/
jpayne@69 27620 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 27621 #if CYTHON_USE_TP_FINALIZE
jpayne@69 27622 0, /*tp_finalize*/
jpayne@69 27623 #else
jpayne@69 27624 NULL, /*tp_finalize*/
jpayne@69 27625 #endif
jpayne@69 27626 #endif
jpayne@69 27627 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 27628 0, /*tp_vectorcall*/
jpayne@69 27629 #endif
jpayne@69 27630 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 27631 0, /*tp_print*/
jpayne@69 27632 #endif
jpayne@69 27633 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 27634 0, /*tp_watched*/
jpayne@69 27635 #endif
jpayne@69 27636 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 27637 0, /*tp_versions_used*/
jpayne@69 27638 #endif
jpayne@69 27639 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 27640 0, /*tp_pypy_flags*/
jpayne@69 27641 #endif
jpayne@69 27642 };
jpayne@69 27643 #endif
jpayne@69 27644 static struct __pyx_vtabstruct_5pysam_9libctabix_Tabixfile __pyx_vtable_5pysam_9libctabix_Tabixfile;
jpayne@69 27645
jpayne@69 27646 static PyObject *__pyx_tp_new_5pysam_9libctabix_Tabixfile(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 27647 struct __pyx_obj_5pysam_9libctabix_Tabixfile *p;
jpayne@69 27648 PyObject *o = __pyx_tp_new_5pysam_9libctabix_TabixFile(t, a, k);
jpayne@69 27649 if (unlikely(!o)) return 0;
jpayne@69 27650 p = ((struct __pyx_obj_5pysam_9libctabix_Tabixfile *)o);
jpayne@69 27651 p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile*)__pyx_vtabptr_5pysam_9libctabix_Tabixfile;
jpayne@69 27652 return o;
jpayne@69 27653 }
jpayne@69 27654
jpayne@69 27655 static PyMethodDef __pyx_methods_5pysam_9libctabix_Tabixfile[] = {
jpayne@69 27656 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9Tabixfile_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9Tabixfile___reduce_cython__},
jpayne@69 27657 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libctabix_9Tabixfile_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libctabix_9Tabixfile_2__setstate_cython__},
jpayne@69 27658 {0, 0, 0, 0}
jpayne@69 27659 };
jpayne@69 27660 #if CYTHON_USE_TYPE_SPECS
jpayne@69 27661 static PyType_Slot __pyx_type_5pysam_9libctabix_Tabixfile_slots[] = {
jpayne@69 27662 {Py_tp_doc, (void *)PyDoc_STR("Tabixfile is deprecated: use TabixFile instead")},
jpayne@69 27663 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_TabixFile},
jpayne@69 27664 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_TabixFile},
jpayne@69 27665 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_Tabixfile},
jpayne@69 27666 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_Tabixfile},
jpayne@69 27667 {0, 0},
jpayne@69 27668 };
jpayne@69 27669 static PyType_Spec __pyx_type_5pysam_9libctabix_Tabixfile_spec = {
jpayne@69 27670 "pysam.libctabix.Tabixfile",
jpayne@69 27671 sizeof(struct __pyx_obj_5pysam_9libctabix_Tabixfile),
jpayne@69 27672 0,
jpayne@69 27673 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
jpayne@69 27674 __pyx_type_5pysam_9libctabix_Tabixfile_slots,
jpayne@69 27675 };
jpayne@69 27676 #else
jpayne@69 27677
jpayne@69 27678 static PyTypeObject __pyx_type_5pysam_9libctabix_Tabixfile = {
jpayne@69 27679 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 27680 "pysam.libctabix.""Tabixfile", /*tp_name*/
jpayne@69 27681 sizeof(struct __pyx_obj_5pysam_9libctabix_Tabixfile), /*tp_basicsize*/
jpayne@69 27682 0, /*tp_itemsize*/
jpayne@69 27683 __pyx_tp_dealloc_5pysam_9libctabix_TabixFile, /*tp_dealloc*/
jpayne@69 27684 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 27685 0, /*tp_print*/
jpayne@69 27686 #endif
jpayne@69 27687 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 27688 0, /*tp_vectorcall_offset*/
jpayne@69 27689 #endif
jpayne@69 27690 0, /*tp_getattr*/
jpayne@69 27691 0, /*tp_setattr*/
jpayne@69 27692 #if PY_MAJOR_VERSION < 3
jpayne@69 27693 0, /*tp_compare*/
jpayne@69 27694 #endif
jpayne@69 27695 #if PY_MAJOR_VERSION >= 3
jpayne@69 27696 0, /*tp_as_async*/
jpayne@69 27697 #endif
jpayne@69 27698 0, /*tp_repr*/
jpayne@69 27699 0, /*tp_as_number*/
jpayne@69 27700 0, /*tp_as_sequence*/
jpayne@69 27701 0, /*tp_as_mapping*/
jpayne@69 27702 0, /*tp_hash*/
jpayne@69 27703 0, /*tp_call*/
jpayne@69 27704 0, /*tp_str*/
jpayne@69 27705 0, /*tp_getattro*/
jpayne@69 27706 0, /*tp_setattro*/
jpayne@69 27707 0, /*tp_as_buffer*/
jpayne@69 27708 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
jpayne@69 27709 PyDoc_STR("Tabixfile is deprecated: use TabixFile instead"), /*tp_doc*/
jpayne@69 27710 __pyx_tp_traverse_5pysam_9libctabix_TabixFile, /*tp_traverse*/
jpayne@69 27711 __pyx_tp_clear_5pysam_9libctabix_TabixFile, /*tp_clear*/
jpayne@69 27712 0, /*tp_richcompare*/
jpayne@69 27713 0, /*tp_weaklistoffset*/
jpayne@69 27714 0, /*tp_iter*/
jpayne@69 27715 0, /*tp_iternext*/
jpayne@69 27716 __pyx_methods_5pysam_9libctabix_Tabixfile, /*tp_methods*/
jpayne@69 27717 0, /*tp_members*/
jpayne@69 27718 0, /*tp_getset*/
jpayne@69 27719 0, /*tp_base*/
jpayne@69 27720 0, /*tp_dict*/
jpayne@69 27721 0, /*tp_descr_get*/
jpayne@69 27722 0, /*tp_descr_set*/
jpayne@69 27723 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 27724 0, /*tp_dictoffset*/
jpayne@69 27725 #endif
jpayne@69 27726 0, /*tp_init*/
jpayne@69 27727 0, /*tp_alloc*/
jpayne@69 27728 __pyx_tp_new_5pysam_9libctabix_Tabixfile, /*tp_new*/
jpayne@69 27729 0, /*tp_free*/
jpayne@69 27730 0, /*tp_is_gc*/
jpayne@69 27731 0, /*tp_bases*/
jpayne@69 27732 0, /*tp_mro*/
jpayne@69 27733 0, /*tp_cache*/
jpayne@69 27734 0, /*tp_subclasses*/
jpayne@69 27735 0, /*tp_weaklist*/
jpayne@69 27736 0, /*tp_del*/
jpayne@69 27737 0, /*tp_version_tag*/
jpayne@69 27738 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 27739 #if CYTHON_USE_TP_FINALIZE
jpayne@69 27740 0, /*tp_finalize*/
jpayne@69 27741 #else
jpayne@69 27742 NULL, /*tp_finalize*/
jpayne@69 27743 #endif
jpayne@69 27744 #endif
jpayne@69 27745 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 27746 0, /*tp_vectorcall*/
jpayne@69 27747 #endif
jpayne@69 27748 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 27749 0, /*tp_print*/
jpayne@69 27750 #endif
jpayne@69 27751 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 27752 0, /*tp_watched*/
jpayne@69 27753 #endif
jpayne@69 27754 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 27755 0, /*tp_versions_used*/
jpayne@69 27756 #endif
jpayne@69 27757 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 27758 0, /*tp_pypy_flags*/
jpayne@69 27759 #endif
jpayne@69 27760 };
jpayne@69 27761 #endif
jpayne@69 27762
jpayne@69 27763 static PyMethodDef __pyx_methods[] = {
jpayne@69 27764 {0, 0, 0, 0}
jpayne@69 27765 };
jpayne@69 27766 #ifndef CYTHON_SMALL_CODE
jpayne@69 27767 #if defined(__clang__)
jpayne@69 27768 #define CYTHON_SMALL_CODE
jpayne@69 27769 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
jpayne@69 27770 #define CYTHON_SMALL_CODE __attribute__((cold))
jpayne@69 27771 #else
jpayne@69 27772 #define CYTHON_SMALL_CODE
jpayne@69 27773 #endif
jpayne@69 27774 #endif
jpayne@69 27775 /* #### Code section: pystring_table ### */
jpayne@69 27776
jpayne@69 27777 static int __Pyx_CreateStringTabAndInitStrings(void) {
jpayne@69 27778 __Pyx_StringTabEntry __pyx_string_tab[] = {
jpayne@69 27779 {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
jpayne@69 27780 {&__pyx_kp_u_Could_not_open_file, __pyx_k_Could_not_open_file, sizeof(__pyx_k_Could_not_open_file), 0, 1, 0, 0},
jpayne@69 27781 {&__pyx_n_s_EmptyIterator, __pyx_k_EmptyIterator, sizeof(__pyx_k_EmptyIterator), 0, 0, 1, 1},
jpayne@69 27782 {&__pyx_n_s_EmptyIterator___iter, __pyx_k_EmptyIterator___iter, sizeof(__pyx_k_EmptyIterator___iter), 0, 0, 1, 1},
jpayne@69 27783 {&__pyx_n_s_EmptyIterator___next, __pyx_k_EmptyIterator___next, sizeof(__pyx_k_EmptyIterator___next), 0, 0, 1, 1},
jpayne@69 27784 {&__pyx_kp_u_Filename_s_already_exists_use_fo, __pyx_k_Filename_s_already_exists_use_fo, sizeof(__pyx_k_Filename_s_already_exists_use_fo), 0, 1, 0, 0},
jpayne@69 27785 {&__pyx_n_s_GZIterator, __pyx_k_GZIterator, sizeof(__pyx_k_GZIterator), 0, 0, 1, 1},
jpayne@69 27786 {&__pyx_n_u_GZIterator, __pyx_k_GZIterator, sizeof(__pyx_k_GZIterator), 0, 1, 0, 1},
jpayne@69 27787 {&__pyx_n_s_GZIteratorHead, __pyx_k_GZIteratorHead, sizeof(__pyx_k_GZIteratorHead), 0, 0, 1, 1},
jpayne@69 27788 {&__pyx_n_u_GZIteratorHead, __pyx_k_GZIteratorHead, sizeof(__pyx_k_GZIteratorHead), 0, 1, 0, 1},
jpayne@69 27789 {&__pyx_n_s_GZIteratorHead___reduce_cython, __pyx_k_GZIteratorHead___reduce_cython, sizeof(__pyx_k_GZIteratorHead___reduce_cython), 0, 0, 1, 1},
jpayne@69 27790 {&__pyx_n_s_GZIteratorHead___setstate_cython, __pyx_k_GZIteratorHead___setstate_cython, sizeof(__pyx_k_GZIteratorHead___setstate_cython), 0, 0, 1, 1},
jpayne@69 27791 {&__pyx_n_s_GZIteratorParsed, __pyx_k_GZIteratorParsed, sizeof(__pyx_k_GZIteratorParsed), 0, 0, 1, 1},
jpayne@69 27792 {&__pyx_n_s_GZIteratorParsed___reduce_cython, __pyx_k_GZIteratorParsed___reduce_cython, sizeof(__pyx_k_GZIteratorParsed___reduce_cython), 0, 0, 1, 1},
jpayne@69 27793 {&__pyx_n_s_GZIteratorParsed___setstate_cyth, __pyx_k_GZIteratorParsed___setstate_cyth, sizeof(__pyx_k_GZIteratorParsed___setstate_cyth), 0, 0, 1, 1},
jpayne@69 27794 {&__pyx_n_s_GZIterator___reduce_cython, __pyx_k_GZIterator___reduce_cython, sizeof(__pyx_k_GZIterator___reduce_cython), 0, 0, 1, 1},
jpayne@69 27795 {&__pyx_n_s_GZIterator___setstate_cython, __pyx_k_GZIterator___setstate_cython, sizeof(__pyx_k_GZIterator___setstate_cython), 0, 0, 1, 1},
jpayne@69 27796 {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
jpayne@69 27797 {&__pyx_kp_u_I_O_operation_on_closed_file, __pyx_k_I_O_operation_on_closed_file, sizeof(__pyx_k_I_O_operation_on_closed_file), 0, 1, 0, 0},
jpayne@69 27798 {&__pyx_kp_u_I_O_operation_on_closed_file_2, __pyx_k_I_O_operation_on_closed_file_2, sizeof(__pyx_k_I_O_operation_on_closed_file_2), 0, 1, 0, 0},
jpayne@69 27799 {&__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},
jpayne@69 27800 {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
jpayne@69 27801 {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
jpayne@69 27802 {&__pyx_kp_u_No_such_file_or_directory_s, __pyx_k_No_such_file_or_directory_s, sizeof(__pyx_k_No_such_file_or_directory_s), 0, 1, 0, 0},
jpayne@69 27803 {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
jpayne@69 27804 {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1},
jpayne@69 27805 {&__pyx_n_s_O_RDONLY, __pyx_k_O_RDONLY, sizeof(__pyx_k_O_RDONLY), 0, 0, 1, 1},
jpayne@69 27806 {&__pyx_n_s_Parser, __pyx_k_Parser, sizeof(__pyx_k_Parser), 0, 0, 1, 1},
jpayne@69 27807 {&__pyx_n_s_Parser___reduce_cython, __pyx_k_Parser___reduce_cython, sizeof(__pyx_k_Parser___reduce_cython), 0, 0, 1, 1},
jpayne@69 27808 {&__pyx_n_s_Parser___setstate_cython, __pyx_k_Parser___setstate_cython, sizeof(__pyx_k_Parser___setstate_cython), 0, 0, 1, 1},
jpayne@69 27809 {&__pyx_n_s_Parser_get_encoding, __pyx_k_Parser_get_encoding, sizeof(__pyx_k_Parser_get_encoding), 0, 0, 1, 1},
jpayne@69 27810 {&__pyx_n_s_Parser_set_encoding, __pyx_k_Parser_set_encoding, sizeof(__pyx_k_Parser_set_encoding), 0, 0, 1, 1},
jpayne@69 27811 {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
jpayne@69 27812 {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
jpayne@69 27813 {&__pyx_n_s_TabixFile, __pyx_k_TabixFile, sizeof(__pyx_k_TabixFile), 0, 0, 1, 1},
jpayne@69 27814 {&__pyx_n_u_TabixFile, __pyx_k_TabixFile, sizeof(__pyx_k_TabixFile), 0, 1, 0, 1},
jpayne@69 27815 {&__pyx_n_s_TabixFile___reduce_cython, __pyx_k_TabixFile___reduce_cython, sizeof(__pyx_k_TabixFile___reduce_cython), 0, 0, 1, 1},
jpayne@69 27816 {&__pyx_n_s_TabixFile___setstate_cython, __pyx_k_TabixFile___setstate_cython, sizeof(__pyx_k_TabixFile___setstate_cython), 0, 0, 1, 1},
jpayne@69 27817 {&__pyx_n_s_TabixFile__dup, __pyx_k_TabixFile__dup, sizeof(__pyx_k_TabixFile__dup), 0, 0, 1, 1},
jpayne@69 27818 {&__pyx_n_s_TabixFile__open, __pyx_k_TabixFile__open, sizeof(__pyx_k_TabixFile__open), 0, 0, 1, 1},
jpayne@69 27819 {&__pyx_n_s_TabixFile_close, __pyx_k_TabixFile_close, sizeof(__pyx_k_TabixFile_close), 0, 0, 1, 1},
jpayne@69 27820 {&__pyx_n_s_TabixFile_fetch, __pyx_k_TabixFile_fetch, sizeof(__pyx_k_TabixFile_fetch), 0, 0, 1, 1},
jpayne@69 27821 {&__pyx_n_s_TabixIterator, __pyx_k_TabixIterator, sizeof(__pyx_k_TabixIterator), 0, 0, 1, 1},
jpayne@69 27822 {&__pyx_n_s_TabixIteratorParsed, __pyx_k_TabixIteratorParsed, sizeof(__pyx_k_TabixIteratorParsed), 0, 0, 1, 1},
jpayne@69 27823 {&__pyx_n_s_TabixIteratorParsed___reduce_cyt, __pyx_k_TabixIteratorParsed___reduce_cyt, sizeof(__pyx_k_TabixIteratorParsed___reduce_cyt), 0, 0, 1, 1},
jpayne@69 27824 {&__pyx_n_s_TabixIteratorParsed___setstate_c, __pyx_k_TabixIteratorParsed___setstate_c, sizeof(__pyx_k_TabixIteratorParsed___setstate_c), 0, 0, 1, 1},
jpayne@69 27825 {&__pyx_n_s_TabixIterator___reduce_cython, __pyx_k_TabixIterator___reduce_cython, sizeof(__pyx_k_TabixIterator___reduce_cython), 0, 0, 1, 1},
jpayne@69 27826 {&__pyx_n_s_TabixIterator___setstate_cython, __pyx_k_TabixIterator___setstate_cython, sizeof(__pyx_k_TabixIterator___setstate_cython), 0, 0, 1, 1},
jpayne@69 27827 {&__pyx_n_s_Tabixfile, __pyx_k_Tabixfile, sizeof(__pyx_k_Tabixfile), 0, 0, 1, 1},
jpayne@69 27828 {&__pyx_n_u_Tabixfile, __pyx_k_Tabixfile, sizeof(__pyx_k_Tabixfile), 0, 1, 0, 1},
jpayne@69 27829 {&__pyx_n_s_Tabixfile___reduce_cython, __pyx_k_Tabixfile___reduce_cython, sizeof(__pyx_k_Tabixfile___reduce_cython), 0, 0, 1, 1},
jpayne@69 27830 {&__pyx_n_s_Tabixfile___setstate_cython, __pyx_k_Tabixfile___setstate_cython, sizeof(__pyx_k_Tabixfile___setstate_cython), 0, 0, 1, 1},
jpayne@69 27831 {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
jpayne@69 27832 {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
jpayne@69 27833 {&__pyx_n_s_WINDOW_SIZE, __pyx_k_WINDOW_SIZE, sizeof(__pyx_k_WINDOW_SIZE), 0, 0, 1, 1},
jpayne@69 27834 {&__pyx_kp_b__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 0, 0},
jpayne@69 27835 {&__pyx_kp_u__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 1, 0, 0},
jpayne@69 27836 {&__pyx_kp_u__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 1, 0, 0},
jpayne@69 27837 {&__pyx_kp_u__43, __pyx_k__43, sizeof(__pyx_k__43), 0, 1, 0, 0},
jpayne@69 27838 {&__pyx_kp_u__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 1, 0, 0},
jpayne@69 27839 {&__pyx_kp_u__56, __pyx_k__56, sizeof(__pyx_k__56), 0, 1, 0, 0},
jpayne@69 27840 {&__pyx_n_s__62, __pyx_k__62, sizeof(__pyx_k__62), 0, 0, 1, 1},
jpayne@69 27841 {&__pyx_n_s__78, __pyx_k__78, sizeof(__pyx_k__78), 0, 0, 1, 1},
jpayne@69 27842 {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
jpayne@69 27843 {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
jpayne@69 27844 {&__pyx_n_s_asBed, __pyx_k_asBed, sizeof(__pyx_k_asBed), 0, 0, 1, 1},
jpayne@69 27845 {&__pyx_n_u_asBed, __pyx_k_asBed, sizeof(__pyx_k_asBed), 0, 1, 0, 1},
jpayne@69 27846 {&__pyx_n_s_asBed___reduce_cython, __pyx_k_asBed___reduce_cython, sizeof(__pyx_k_asBed___reduce_cython), 0, 0, 1, 1},
jpayne@69 27847 {&__pyx_n_s_asBed___setstate_cython, __pyx_k_asBed___setstate_cython, sizeof(__pyx_k_asBed___setstate_cython), 0, 0, 1, 1},
jpayne@69 27848 {&__pyx_n_s_asGFF3, __pyx_k_asGFF3, sizeof(__pyx_k_asGFF3), 0, 0, 1, 1},
jpayne@69 27849 {&__pyx_n_u_asGFF3, __pyx_k_asGFF3, sizeof(__pyx_k_asGFF3), 0, 1, 0, 1},
jpayne@69 27850 {&__pyx_n_s_asGFF3___reduce_cython, __pyx_k_asGFF3___reduce_cython, sizeof(__pyx_k_asGFF3___reduce_cython), 0, 0, 1, 1},
jpayne@69 27851 {&__pyx_n_s_asGFF3___setstate_cython, __pyx_k_asGFF3___setstate_cython, sizeof(__pyx_k_asGFF3___setstate_cython), 0, 0, 1, 1},
jpayne@69 27852 {&__pyx_n_s_asGTF, __pyx_k_asGTF, sizeof(__pyx_k_asGTF), 0, 0, 1, 1},
jpayne@69 27853 {&__pyx_n_u_asGTF, __pyx_k_asGTF, sizeof(__pyx_k_asGTF), 0, 1, 0, 1},
jpayne@69 27854 {&__pyx_n_s_asGTF___reduce_cython, __pyx_k_asGTF___reduce_cython, sizeof(__pyx_k_asGTF___reduce_cython), 0, 0, 1, 1},
jpayne@69 27855 {&__pyx_n_s_asGTF___setstate_cython, __pyx_k_asGTF___setstate_cython, sizeof(__pyx_k_asGTF___setstate_cython), 0, 0, 1, 1},
jpayne@69 27856 {&__pyx_n_s_asTuple, __pyx_k_asTuple, sizeof(__pyx_k_asTuple), 0, 0, 1, 1},
jpayne@69 27857 {&__pyx_n_u_asTuple, __pyx_k_asTuple, sizeof(__pyx_k_asTuple), 0, 1, 0, 1},
jpayne@69 27858 {&__pyx_n_s_asTuple___reduce_cython, __pyx_k_asTuple___reduce_cython, sizeof(__pyx_k_asTuple___reduce_cython), 0, 0, 1, 1},
jpayne@69 27859 {&__pyx_n_s_asTuple___setstate_cython, __pyx_k_asTuple___setstate_cython, sizeof(__pyx_k_asTuple___setstate_cython), 0, 0, 1, 1},
jpayne@69 27860 {&__pyx_n_s_asVCF, __pyx_k_asVCF, sizeof(__pyx_k_asVCF), 0, 0, 1, 1},
jpayne@69 27861 {&__pyx_n_u_asVCF, __pyx_k_asVCF, sizeof(__pyx_k_asVCF), 0, 1, 0, 1},
jpayne@69 27862 {&__pyx_n_s_asVCF___reduce_cython, __pyx_k_asVCF___reduce_cython, sizeof(__pyx_k_asVCF___reduce_cython), 0, 0, 1, 1},
jpayne@69 27863 {&__pyx_n_s_asVCF___setstate_cython, __pyx_k_asVCF___setstate_cython, sizeof(__pyx_k_asVCF___setstate_cython), 0, 0, 1, 1},
jpayne@69 27864 {&__pyx_n_u_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 1, 0, 1},
jpayne@69 27865 {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
jpayne@69 27866 {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
jpayne@69 27867 {&__pyx_n_u_bcf, __pyx_k_bcf, sizeof(__pyx_k_bcf), 0, 1, 0, 1},
jpayne@69 27868 {&__pyx_n_u_bed, __pyx_k_bed, sizeof(__pyx_k_bed), 0, 1, 0, 1},
jpayne@69 27869 {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1},
jpayne@69 27870 {&__pyx_n_s_buffer_size, __pyx_k_buffer_size, sizeof(__pyx_k_buffer_size), 0, 0, 1, 1},
jpayne@69 27871 {&__pyx_kp_u_building_of_index_for_failed, __pyx_k_building_of_index_for_failed, sizeof(__pyx_k_building_of_index_for_failed), 0, 1, 0, 0},
jpayne@69 27872 {&__pyx_n_s_bytes_cpy, __pyx_k_bytes_cpy, sizeof(__pyx_k_bytes_cpy), 0, 0, 1, 1},
jpayne@69 27873 {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
jpayne@69 27874 {&__pyx_n_s_cfilename, __pyx_k_cfilename, sizeof(__pyx_k_cfilename), 0, 0, 1, 1},
jpayne@69 27875 {&__pyx_n_s_cfilename_index, __pyx_k_cfilename_index, sizeof(__pyx_k_cfilename_index), 0, 0, 1, 1},
jpayne@69 27876 {&__pyx_n_s_cfn, __pyx_k_cfn, sizeof(__pyx_k_cfn), 0, 0, 1, 1},
jpayne@69 27877 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
jpayne@69 27878 {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
jpayne@69 27879 {&__pyx_n_s_closed, __pyx_k_closed, sizeof(__pyx_k_closed), 0, 0, 1, 1},
jpayne@69 27880 {&__pyx_n_s_conf, __pyx_k_conf, sizeof(__pyx_k_conf), 0, 0, 1, 1},
jpayne@69 27881 {&__pyx_n_s_conf_data, __pyx_k_conf_data, sizeof(__pyx_k_conf_data), 0, 0, 1, 1},
jpayne@69 27882 {&__pyx_n_s_contigs, __pyx_k_contigs, sizeof(__pyx_k_contigs), 0, 0, 1, 1},
jpayne@69 27883 {&__pyx_kp_u_could_not_create_iterator_for_re, __pyx_k_could_not_create_iterator_for_re, sizeof(__pyx_k_could_not_create_iterator_for_re), 0, 1, 0, 0},
jpayne@69 27884 {&__pyx_kp_u_could_not_create_iterator_possib, __pyx_k_could_not_create_iterator_possib, sizeof(__pyx_k_could_not_create_iterator_possib), 0, 1, 0, 0},
jpayne@69 27885 {&__pyx_kp_u_could_not_load_tbi_csi_index_of, __pyx_k_could_not_load_tbi_csi_index_of, sizeof(__pyx_k_could_not_load_tbi_csi_index_of), 0, 1, 0, 0},
jpayne@69 27886 {&__pyx_kp_u_could_not_open_file_s, __pyx_k_could_not_open_file_s, sizeof(__pyx_k_could_not_open_file_s), 0, 1, 0, 0},
jpayne@69 27887 {&__pyx_kp_u_could_not_open_for_reading_heade, __pyx_k_could_not_open_for_reading_heade, sizeof(__pyx_k_could_not_open_for_reading_heade), 0, 1, 0, 0},
jpayne@69 27888 {&__pyx_kp_u_could_not_open_index_for_s, __pyx_k_could_not_open_index_for_s, sizeof(__pyx_k_could_not_open_index_for_s), 0, 1, 0, 0},
jpayne@69 27889 {&__pyx_kp_u_could_not_open_s_for_reading, __pyx_k_could_not_open_s_for_reading, sizeof(__pyx_k_could_not_open_s_for_reading), 0, 1, 0, 0},
jpayne@69 27890 {&__pyx_kp_u_could_not_open_s_for_writing, __pyx_k_could_not_open_s_for_writing, sizeof(__pyx_k_could_not_open_s_for_writing), 0, 1, 0, 0},
jpayne@69 27891 {&__pyx_n_s_cpy, __pyx_k_cpy, sizeof(__pyx_k_cpy), 0, 0, 1, 1},
jpayne@69 27892 {&__pyx_n_s_csi, __pyx_k_csi, sizeof(__pyx_k_csi), 0, 0, 1, 1},
jpayne@69 27893 {&__pyx_kp_u_csi_2, __pyx_k_csi_2, sizeof(__pyx_k_csi_2), 0, 1, 0, 0},
jpayne@69 27894 {&__pyx_n_s_cstr, __pyx_k_cstr, sizeof(__pyx_k_cstr), 0, 0, 1, 1},
jpayne@69 27895 {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
jpayne@69 27896 {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
jpayne@69 27897 {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
jpayne@69 27898 {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
jpayne@69 27899 {&__pyx_n_s_dup, __pyx_k_dup, sizeof(__pyx_k_dup), 0, 0, 1, 1},
jpayne@69 27900 {&__pyx_kp_s_empty_iterator, __pyx_k_empty_iterator, sizeof(__pyx_k_empty_iterator), 0, 0, 1, 0},
jpayne@69 27901 {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
jpayne@69 27902 {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1},
jpayne@69 27903 {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
jpayne@69 27904 {&__pyx_n_s_end_col, __pyx_k_end_col, sizeof(__pyx_k_end_col), 0, 0, 1, 1},
jpayne@69 27905 {&__pyx_kp_u_end_out_of_range_i, __pyx_k_end_out_of_range_i, sizeof(__pyx_k_end_out_of_range_i), 0, 1, 0, 0},
jpayne@69 27906 {&__pyx_kp_u_error_i_when_closing_file_s, __pyx_k_error_i_when_closing_file_s, sizeof(__pyx_k_error_i_when_closing_file_s), 0, 1, 0, 0},
jpayne@69 27907 {&__pyx_kp_u_error_i_when_writing_to_file_s, __pyx_k_error_i_when_writing_to_file_s, sizeof(__pyx_k_error_i_when_writing_to_file_s), 0, 1, 0, 0},
jpayne@69 27908 {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
jpayne@69 27909 {&__pyx_n_s_fd_src, __pyx_k_fd_src, sizeof(__pyx_k_fd_src), 0, 0, 1, 1},
jpayne@69 27910 {&__pyx_n_s_fetch, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1},
jpayne@69 27911 {&__pyx_kp_u_file_s_not_found, __pyx_k_file_s_not_found, sizeof(__pyx_k_file_s_not_found), 0, 1, 0, 0},
jpayne@69 27912 {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
jpayne@69 27913 {&__pyx_n_s_filename_in, __pyx_k_filename_in, sizeof(__pyx_k_filename_in), 0, 0, 1, 1},
jpayne@69 27914 {&__pyx_n_s_filename_index, __pyx_k_filename_index, sizeof(__pyx_k_filename_index), 0, 0, 1, 1},
jpayne@69 27915 {&__pyx_n_s_filename_out, __pyx_k_filename_out, sizeof(__pyx_k_filename_out), 0, 0, 1, 1},
jpayne@69 27916 {&__pyx_kp_u_filename_s_already_exists_use_fo, __pyx_k_filename_s_already_exists_use_fo, sizeof(__pyx_k_filename_s_already_exists_use_fo), 0, 1, 0, 0},
jpayne@69 27917 {&__pyx_n_s_fileobj, __pyx_k_fileobj, sizeof(__pyx_k_fileobj), 0, 0, 1, 1},
jpayne@69 27918 {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1},
jpayne@69 27919 {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
jpayne@69 27920 {&__pyx_n_s_fn_index, __pyx_k_fn_index, sizeof(__pyx_k_fn_index), 0, 0, 1, 1},
jpayne@69 27921 {&__pyx_n_s_fnidx, __pyx_k_fnidx, sizeof(__pyx_k_fnidx), 0, 0, 1, 1},
jpayne@69 27922 {&__pyx_n_s_force, __pyx_k_force, sizeof(__pyx_k_force), 0, 0, 1, 1},
jpayne@69 27923 {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
jpayne@69 27924 {&__pyx_n_s_fp, __pyx_k_fp, sizeof(__pyx_k_fp), 0, 0, 1, 1},
jpayne@69 27925 {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
jpayne@69 27926 {&__pyx_n_s_get_encoding, __pyx_k_get_encoding, sizeof(__pyx_k_get_encoding), 0, 0, 1, 1},
jpayne@69 27927 {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
jpayne@69 27928 {&__pyx_n_u_gff, __pyx_k_gff, sizeof(__pyx_k_gff), 0, 1, 0, 1},
jpayne@69 27929 {&__pyx_kp_u_gz, __pyx_k_gz, sizeof(__pyx_k_gz), 0, 1, 0, 0},
jpayne@69 27930 {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
jpayne@69 27931 {&__pyx_kp_u_incomplete_line_at_s, __pyx_k_incomplete_line_at_s, sizeof(__pyx_k_incomplete_line_at_s), 0, 1, 0, 0},
jpayne@69 27932 {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
jpayne@69 27933 {&__pyx_kp_u_index_s_not_found, __pyx_k_index_s_not_found, sizeof(__pyx_k_index_s_not_found), 0, 1, 0, 0},
jpayne@69 27934 {&__pyx_n_s_infile, __pyx_k_infile, sizeof(__pyx_k_infile), 0, 0, 1, 1},
jpayne@69 27935 {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
jpayne@69 27936 {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
jpayne@69 27937 {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
jpayne@69 27938 {&__pyx_kp_u_invalid_file_opening_mode_s, __pyx_k_invalid_file_opening_mode_s, sizeof(__pyx_k_invalid_file_opening_mode_s), 0, 1, 0, 0},
jpayne@69 27939 {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
jpayne@69 27940 {&__pyx_n_s_is_empty, __pyx_k_is_empty, sizeof(__pyx_k_is_empty), 0, 0, 1, 1},
jpayne@69 27941 {&__pyx_n_s_is_open, __pyx_k_is_open, sizeof(__pyx_k_is_open), 0, 0, 1, 1},
jpayne@69 27942 {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
jpayne@69 27943 {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
jpayne@69 27944 {&__pyx_kp_s_iterate_over_infile_Permits_the, __pyx_k_iterate_over_infile_Permits_the, sizeof(__pyx_k_iterate_over_infile_Permits_the), 0, 0, 1, 0},
jpayne@69 27945 {&__pyx_kp_u_iteration_on_closed_file, __pyx_k_iteration_on_closed_file, sizeof(__pyx_k_iteration_on_closed_file), 0, 1, 0, 0},
jpayne@69 27946 {&__pyx_n_s_itr, __pyx_k_itr, sizeof(__pyx_k_itr), 0, 0, 1, 1},
jpayne@69 27947 {&__pyx_n_s_keep_original, __pyx_k_keep_original, sizeof(__pyx_k_keep_original), 0, 0, 1, 1},
jpayne@69 27948 {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
jpayne@69 27949 {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
jpayne@69 27950 {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
jpayne@69 27951 {&__pyx_n_s_line_skip, __pyx_k_line_skip, sizeof(__pyx_k_line_skip), 0, 0, 1, 1},
jpayne@69 27952 {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
jpayne@69 27953 {&__pyx_n_s_meta_char, __pyx_k_meta_char, sizeof(__pyx_k_meta_char), 0, 0, 1, 1},
jpayne@69 27954 {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
jpayne@69 27955 {&__pyx_n_s_min_shift, __pyx_k_min_shift, sizeof(__pyx_k_min_shift), 0, 0, 1, 1},
jpayne@69 27956 {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
jpayne@69 27957 {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
jpayne@69 27958 {&__pyx_n_s_multiple_iterators, __pyx_k_multiple_iterators, sizeof(__pyx_k_multiple_iterators), 0, 0, 1, 1},
jpayne@69 27959 {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
jpayne@69 27960 {&__pyx_n_s_nbytes, __pyx_k_nbytes, sizeof(__pyx_k_nbytes), 0, 0, 1, 1},
jpayne@69 27961 {&__pyx_kp_u_neither_preset_nor_seq_col_start, __pyx_k_neither_preset_nor_seq_col_start, sizeof(__pyx_k_neither_preset_nor_seq_col_start), 0, 1, 0, 0},
jpayne@69 27962 {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
jpayne@69 27963 {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
jpayne@69 27964 {&__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},
jpayne@69 27965 {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
jpayne@69 27966 {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
jpayne@69 27967 {&__pyx_kp_u_parse_method_of_s_not_implemente, __pyx_k_parse_method_of_s_not_implemente, sizeof(__pyx_k_parse_method_of_s_not_implemente), 0, 1, 0, 0},
jpayne@69 27968 {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
jpayne@69 27969 {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
jpayne@69 27970 {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
jpayne@69 27971 {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
jpayne@69 27972 {&__pyx_n_s_preset, __pyx_k_preset, sizeof(__pyx_k_preset), 0, 0, 1, 1},
jpayne@69 27973 {&__pyx_n_s_preset2conf, __pyx_k_preset2conf, sizeof(__pyx_k_preset2conf), 0, 0, 1, 1},
jpayne@69 27974 {&__pyx_n_u_psltbl, __pyx_k_psltbl, sizeof(__pyx_k_psltbl), 0, 1, 0, 1},
jpayne@69 27975 {&__pyx_n_s_pysam_libctabix, __pyx_k_pysam_libctabix, sizeof(__pyx_k_pysam_libctabix), 0, 0, 1, 1},
jpayne@69 27976 {&__pyx_kp_s_pysam_libctabix_pyx, __pyx_k_pysam_libctabix_pyx, sizeof(__pyx_k_pysam_libctabix_pyx), 0, 0, 1, 0},
jpayne@69 27977 {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
jpayne@69 27978 {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
jpayne@69 27979 {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
jpayne@69 27980 {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
jpayne@69 27981 {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
jpayne@69 27982 {&__pyx_n_s_pyx_unpickle_Parser, __pyx_k_pyx_unpickle_Parser, sizeof(__pyx_k_pyx_unpickle_Parser), 0, 0, 1, 1},
jpayne@69 27983 {&__pyx_n_s_pyx_unpickle_asBed, __pyx_k_pyx_unpickle_asBed, sizeof(__pyx_k_pyx_unpickle_asBed), 0, 0, 1, 1},
jpayne@69 27984 {&__pyx_n_s_pyx_unpickle_asGFF3, __pyx_k_pyx_unpickle_asGFF3, sizeof(__pyx_k_pyx_unpickle_asGFF3), 0, 0, 1, 1},
jpayne@69 27985 {&__pyx_n_s_pyx_unpickle_asGTF, __pyx_k_pyx_unpickle_asGTF, sizeof(__pyx_k_pyx_unpickle_asGTF), 0, 0, 1, 1},
jpayne@69 27986 {&__pyx_n_s_pyx_unpickle_asTuple, __pyx_k_pyx_unpickle_asTuple, sizeof(__pyx_k_pyx_unpickle_asTuple), 0, 0, 1, 1},
jpayne@69 27987 {&__pyx_n_s_pyx_unpickle_asVCF, __pyx_k_pyx_unpickle_asVCF, sizeof(__pyx_k_pyx_unpickle_asVCF), 0, 0, 1, 1},
jpayne@69 27988 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
jpayne@69 27989 {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
jpayne@69 27990 {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
jpayne@69 27991 {&__pyx_n_u_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 1, 0, 1},
jpayne@69 27992 {&__pyx_n_s_readline, __pyx_k_readline, sizeof(__pyx_k_readline), 0, 0, 1, 1},
jpayne@69 27993 {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
jpayne@69 27994 {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
jpayne@69 27995 {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
jpayne@69 27996 {&__pyx_n_s_reference, __pyx_k_reference, sizeof(__pyx_k_reference), 0, 0, 1, 1},
jpayne@69 27997 {&__pyx_n_s_region, __pyx_k_region, sizeof(__pyx_k_region), 0, 0, 1, 1},
jpayne@69 27998 {&__pyx_n_s_retval, __pyx_k_retval, sizeof(__pyx_k_retval), 0, 0, 1, 1},
jpayne@69 27999 {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
jpayne@69 28000 {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1},
jpayne@69 28001 {&__pyx_kp_u_s_i, __pyx_k_s_i, sizeof(__pyx_k_s_i), 0, 1, 0, 0},
jpayne@69 28002 {&__pyx_kp_u_s_i_i, __pyx_k_s_i_i, sizeof(__pyx_k_s_i_i), 0, 1, 0, 0},
jpayne@69 28003 {&__pyx_n_u_sam, __pyx_k_sam, sizeof(__pyx_k_sam), 0, 1, 0, 1},
jpayne@69 28004 {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
jpayne@69 28005 {&__pyx_kp_s_self_gzipfile_self_kstream_canno, __pyx_k_self_gzipfile_self_kstream_canno, sizeof(__pyx_k_self_gzipfile_self_kstream_canno), 0, 0, 1, 0},
jpayne@69 28006 {&__pyx_kp_s_self_iterator_cannot_be_converte, __pyx_k_self_iterator_cannot_be_converte, sizeof(__pyx_k_self_iterator_cannot_be_converte), 0, 0, 1, 0},
jpayne@69 28007 {&__pyx_n_s_seq_col, __pyx_k_seq_col, sizeof(__pyx_k_seq_col), 0, 0, 1, 1},
jpayne@69 28008 {&__pyx_n_s_set_encoding, __pyx_k_set_encoding, sizeof(__pyx_k_set_encoding), 0, 0, 1, 1},
jpayne@69 28009 {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
jpayne@69 28010 {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
jpayne@69 28011 {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
jpayne@69 28012 {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
jpayne@69 28013 {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
jpayne@69 28014 {&__pyx_n_s_start_col, __pyx_k_start_col, sizeof(__pyx_k_start_col), 0, 0, 1, 1},
jpayne@69 28015 {&__pyx_kp_u_start_i_end_i, __pyx_k_start_i_end_i, sizeof(__pyx_k_start_i_end_i), 0, 1, 0, 0},
jpayne@69 28016 {&__pyx_kp_u_start_out_of_range_i, __pyx_k_start_out_of_range_i, sizeof(__pyx_k_start_out_of_range_i), 0, 1, 0, 0},
jpayne@69 28017 {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
jpayne@69 28018 {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
jpayne@69 28019 {&__pyx_n_s_suffix, __pyx_k_suffix, sizeof(__pyx_k_suffix), 0, 0, 1, 1},
jpayne@69 28020 {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
jpayne@69 28021 {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
jpayne@69 28022 {&__pyx_n_s_tabix_compress, __pyx_k_tabix_compress, sizeof(__pyx_k_tabix_compress), 0, 0, 1, 1},
jpayne@69 28023 {&__pyx_n_u_tabix_compress, __pyx_k_tabix_compress, sizeof(__pyx_k_tabix_compress), 0, 1, 0, 1},
jpayne@69 28024 {&__pyx_n_s_tabix_file_iterator, __pyx_k_tabix_file_iterator, sizeof(__pyx_k_tabix_file_iterator), 0, 0, 1, 1},
jpayne@69 28025 {&__pyx_n_u_tabix_file_iterator, __pyx_k_tabix_file_iterator, sizeof(__pyx_k_tabix_file_iterator), 0, 1, 0, 1},
jpayne@69 28026 {&__pyx_n_s_tabix_file_iterator___reduce_cyt, __pyx_k_tabix_file_iterator___reduce_cyt, sizeof(__pyx_k_tabix_file_iterator___reduce_cyt), 0, 0, 1, 1},
jpayne@69 28027 {&__pyx_n_s_tabix_file_iterator___setstate_c, __pyx_k_tabix_file_iterator___setstate_c, sizeof(__pyx_k_tabix_file_iterator___setstate_c), 0, 0, 1, 1},
jpayne@69 28028 {&__pyx_n_s_tabix_generic_iterator, __pyx_k_tabix_generic_iterator, sizeof(__pyx_k_tabix_generic_iterator), 0, 0, 1, 1},
jpayne@69 28029 {&__pyx_n_u_tabix_generic_iterator, __pyx_k_tabix_generic_iterator, sizeof(__pyx_k_tabix_generic_iterator), 0, 1, 0, 1},
jpayne@69 28030 {&__pyx_n_s_tabix_generic_iterator___init, __pyx_k_tabix_generic_iterator___init, sizeof(__pyx_k_tabix_generic_iterator___init), 0, 0, 1, 1},
jpayne@69 28031 {&__pyx_n_s_tabix_generic_iterator___iter, __pyx_k_tabix_generic_iterator___iter, sizeof(__pyx_k_tabix_generic_iterator___iter), 0, 0, 1, 1},
jpayne@69 28032 {&__pyx_n_s_tabix_generic_iterator___next, __pyx_k_tabix_generic_iterator___next, sizeof(__pyx_k_tabix_generic_iterator___next), 0, 0, 1, 1},
jpayne@69 28033 {&__pyx_n_s_tabix_index, __pyx_k_tabix_index, sizeof(__pyx_k_tabix_index), 0, 0, 1, 1},
jpayne@69 28034 {&__pyx_n_u_tabix_index, __pyx_k_tabix_index, sizeof(__pyx_k_tabix_index), 0, 1, 0, 1},
jpayne@69 28035 {&__pyx_n_s_tabix_iterator, __pyx_k_tabix_iterator, sizeof(__pyx_k_tabix_iterator), 0, 0, 1, 1},
jpayne@69 28036 {&__pyx_n_u_tabix_iterator, __pyx_k_tabix_iterator, sizeof(__pyx_k_tabix_iterator), 0, 1, 0, 1},
jpayne@69 28037 {&__pyx_kp_u_tbi, __pyx_k_tbi, sizeof(__pyx_k_tbi), 0, 1, 0, 0},
jpayne@69 28038 {&__pyx_n_s_tell, __pyx_k_tell, sizeof(__pyx_k_tell), 0, 0, 1, 1},
jpayne@69 28039 {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
jpayne@69 28040 {&__pyx_n_s_threads, __pyx_k_threads, sizeof(__pyx_k_threads), 0, 0, 1, 1},
jpayne@69 28041 {&__pyx_kp_u_unknown_preset, __pyx_k_unknown_preset, sizeof(__pyx_k_unknown_preset), 0, 1, 0, 0},
jpayne@69 28042 {&__pyx_n_s_unlink, __pyx_k_unlink, sizeof(__pyx_k_unlink), 0, 0, 1, 1},
jpayne@69 28043 {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
jpayne@69 28044 {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
jpayne@69 28045 {&__pyx_kp_u_valid_presets_are, __pyx_k_valid_presets_are, sizeof(__pyx_k_valid_presets_are), 0, 1, 0, 0},
jpayne@69 28046 {&__pyx_n_u_vcf, __pyx_k_vcf, sizeof(__pyx_k_vcf), 0, 1, 0, 1},
jpayne@69 28047 {&__pyx_kp_u_writing_failed, __pyx_k_writing_failed, sizeof(__pyx_k_writing_failed), 0, 1, 0, 0},
jpayne@69 28048 {&__pyx_n_s_zerobased, __pyx_k_zerobased, sizeof(__pyx_k_zerobased), 0, 0, 1, 1},
jpayne@69 28049 {0, 0, 0, 0, 0, 0, 0}
jpayne@69 28050 };
jpayne@69 28051 return __Pyx_InitStrings(__pyx_string_tab);
jpayne@69 28052 }
jpayne@69 28053 /* #### Code section: cached_builtins ### */
jpayne@69 28054 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
jpayne@69 28055 __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 94, __pyx_L1_error)
jpayne@69 28056 __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 361, __pyx_L1_error)
jpayne@69 28057 __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 378, __pyx_L1_error)
jpayne@69 28058 __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) __PYX_ERR(0, 560, __pyx_L1_error)
jpayne@69 28059 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 28060 __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 671, __pyx_L1_error)
jpayne@69 28061 __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 701, __pyx_L1_error)
jpayne@69 28062 __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 969, __pyx_L1_error)
jpayne@69 28063 __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 1216, __pyx_L1_error)
jpayne@69 28064 __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(3, 120, __pyx_L1_error)
jpayne@69 28065 return 0;
jpayne@69 28066 __pyx_L1_error:;
jpayne@69 28067 return -1;
jpayne@69 28068 }
jpayne@69 28069 /* #### Code section: cached_constants ### */
jpayne@69 28070
jpayne@69 28071 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
jpayne@69 28072 __Pyx_RefNannyDeclarations
jpayne@69 28073 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
jpayne@69 28074
jpayne@69 28075 /* "pysam/libctabix.pyx":444
jpayne@69 28076 * '''
jpayne@69 28077 * if not self.is_open():
jpayne@69 28078 * raise ValueError("I/O operation on closed file") # <<<<<<<<<<<<<<
jpayne@69 28079 *
jpayne@69 28080 * # convert coordinates to region string, which is one-based
jpayne@69 28081 */
jpayne@69 28082 __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 444, __pyx_L1_error)
jpayne@69 28083 __Pyx_GOTREF(__pyx_tuple__19);
jpayne@69 28084 __Pyx_GIVEREF(__pyx_tuple__19);
jpayne@69 28085
jpayne@69 28086 /* "pysam/libctabix.pyx":499
jpayne@69 28087 * # when accessing a tabix file created prior tabix 1.0
jpayne@69 28088 * # the full-file iterator is empty.
jpayne@69 28089 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@69 28090 * "could not create iterator, possible "
jpayne@69 28091 * "tabix version mismatch")
jpayne@69 28092 */
jpayne@69 28093 __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_could_not_create_iterator_possib); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 499, __pyx_L1_error)
jpayne@69 28094 __Pyx_GOTREF(__pyx_tuple__20);
jpayne@69 28095 __Pyx_GIVEREF(__pyx_tuple__20);
jpayne@69 28096
jpayne@69 28097 /* "pysam/libctabix.pyx":669
jpayne@69 28098 * cdef int retval = self.__cnext__()
jpayne@69 28099 * if retval == -5:
jpayne@69 28100 * raise IOError("iteration on closed file") # <<<<<<<<<<<<<<
jpayne@69 28101 * elif retval < 0:
jpayne@69 28102 * raise StopIteration
jpayne@69 28103 */
jpayne@69 28104 __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_iteration_on_closed_file); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 669, __pyx_L1_error)
jpayne@69 28105 __Pyx_GOTREF(__pyx_tuple__24);
jpayne@69 28106 __Pyx_GIVEREF(__pyx_tuple__24);
jpayne@69 28107
jpayne@69 28108 /* "pysam/libctabix.pyx":859
jpayne@69 28109 * if r < 0:
jpayne@69 28110 * free(buffer)
jpayne@69 28111 * raise IOError("writing failed") # <<<<<<<<<<<<<<
jpayne@69 28112 *
jpayne@69 28113 * free(buffer)
jpayne@69 28114 */
jpayne@69 28115 __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_writing_failed); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 859, __pyx_L1_error)
jpayne@69 28116 __Pyx_GOTREF(__pyx_tuple__38);
jpayne@69 28117 __Pyx_GIVEREF(__pyx_tuple__38);
jpayne@69 28118
jpayne@69 28119 /* "pysam/libctabix.pyx":930
jpayne@69 28120 * if preset is None and \
jpayne@69 28121 * (seq_col is None or start_col is None or end_col is None):
jpayne@69 28122 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@69 28123 * "neither preset nor seq_col,start_col and end_col given")
jpayne@69 28124 *
jpayne@69 28125 */
jpayne@69 28126 __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_neither_preset_nor_seq_col_start); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 930, __pyx_L1_error)
jpayne@69 28127 __Pyx_GOTREF(__pyx_tuple__41);
jpayne@69 28128 __Pyx_GIVEREF(__pyx_tuple__41);
jpayne@69 28129
jpayne@69 28130 /* "pysam/libctabix.pyx":1108
jpayne@69 28131 *
jpayne@69 28132 * if infile.closed:
jpayne@69 28133 * raise ValueError("I/O operation on closed file.") # <<<<<<<<<<<<<<
jpayne@69 28134 *
jpayne@69 28135 * self.infile = infile
jpayne@69 28136 */
jpayne@69 28137 __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_I_O_operation_on_closed_file_2); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1108, __pyx_L1_error)
jpayne@69 28138 __Pyx_GOTREF(__pyx_tuple__45);
jpayne@69 28139 __Pyx_GIVEREF(__pyx_tuple__45);
jpayne@69 28140
jpayne@69 28141 /* "(tree fragment)":4
jpayne@69 28142 * cdef object __pyx_PickleError
jpayne@69 28143 * cdef object __pyx_result
jpayne@69 28144 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@69 28145 * from pickle import PickleError as __pyx_PickleError
jpayne@69 28146 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@69 28147 */
jpayne@69 28148 __pyx_tuple__55 = PyTuple_Pack(3, __pyx_int_243541226, __pyx_int_21667264, __pyx_int_139192863); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 28149 __Pyx_GOTREF(__pyx_tuple__55);
jpayne@69 28150 __Pyx_GIVEREF(__pyx_tuple__55);
jpayne@69 28151
jpayne@69 28152 /* "pysam/libctabix.pyx":87
jpayne@69 28153 * self.encoding = encoding
jpayne@69 28154 *
jpayne@69 28155 * def set_encoding(self, encoding): # <<<<<<<<<<<<<<
jpayne@69 28156 * self.encoding = encoding
jpayne@69 28157 *
jpayne@69 28158 */
jpayne@69 28159 __pyx_tuple__63 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoding); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 87, __pyx_L1_error)
jpayne@69 28160 __Pyx_GOTREF(__pyx_tuple__63);
jpayne@69 28161 __Pyx_GIVEREF(__pyx_tuple__63);
jpayne@69 28162 __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 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_libctabix_pyx, __pyx_n_s_set_encoding, 87, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 87, __pyx_L1_error)
jpayne@69 28163
jpayne@69 28164 /* "pysam/libctabix.pyx":90
jpayne@69 28165 * self.encoding = encoding
jpayne@69 28166 *
jpayne@69 28167 * def get_encoding(self): # <<<<<<<<<<<<<<
jpayne@69 28168 * return self.encoding
jpayne@69 28169 *
jpayne@69 28170 */
jpayne@69 28171 __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 90, __pyx_L1_error)
jpayne@69 28172 __Pyx_GOTREF(__pyx_tuple__64);
jpayne@69 28173 __Pyx_GIVEREF(__pyx_tuple__64);
jpayne@69 28174 __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__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabix_pyx, __pyx_n_s_get_encoding, 90, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 90, __pyx_L1_error)
jpayne@69 28175
jpayne@69 28176 /* "(tree fragment)":1
jpayne@69 28177 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28178 * cdef tuple state
jpayne@69 28179 * cdef object _dict
jpayne@69 28180 */
jpayne@69 28181 __pyx_tuple__65 = 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__65)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28182 __Pyx_GOTREF(__pyx_tuple__65);
jpayne@69 28183 __Pyx_GIVEREF(__pyx_tuple__65);
jpayne@69 28184 __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28185
jpayne@69 28186 /* "(tree fragment)":16
jpayne@69 28187 * else:
jpayne@69 28188 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@69 28189 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28190 * __pyx_unpickle_Parser__set_state(self, __pyx_state)
jpayne@69 28191 */
jpayne@69 28192 __pyx_tuple__66 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 28193 __Pyx_GOTREF(__pyx_tuple__66);
jpayne@69 28194 __Pyx_GIVEREF(__pyx_tuple__66);
jpayne@69 28195 __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 28196
jpayne@69 28197 /* "(tree fragment)":1
jpayne@69 28198 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28199 * cdef tuple state
jpayne@69 28200 * cdef object _dict
jpayne@69 28201 */
jpayne@69 28202 __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28203
jpayne@69 28204 /* "(tree fragment)":16
jpayne@69 28205 * else:
jpayne@69 28206 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@69 28207 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28208 * __pyx_unpickle_asTuple__set_state(self, __pyx_state)
jpayne@69 28209 */
jpayne@69 28210 __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 28211
jpayne@69 28212 /* "(tree fragment)":1
jpayne@69 28213 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28214 * cdef tuple state
jpayne@69 28215 * cdef object _dict
jpayne@69 28216 */
jpayne@69 28217 __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28218
jpayne@69 28219 /* "(tree fragment)":16
jpayne@69 28220 * else:
jpayne@69 28221 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@69 28222 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28223 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state)
jpayne@69 28224 */
jpayne@69 28225 __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 28226
jpayne@69 28227 /* "(tree fragment)":1
jpayne@69 28228 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28229 * cdef tuple state
jpayne@69 28230 * cdef object _dict
jpayne@69 28231 */
jpayne@69 28232 __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28233
jpayne@69 28234 /* "(tree fragment)":16
jpayne@69 28235 * else:
jpayne@69 28236 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@69 28237 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28238 * __pyx_unpickle_asGTF__set_state(self, __pyx_state)
jpayne@69 28239 */
jpayne@69 28240 __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 28241
jpayne@69 28242 /* "(tree fragment)":1
jpayne@69 28243 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28244 * cdef tuple state
jpayne@69 28245 * cdef object _dict
jpayne@69 28246 */
jpayne@69 28247 __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28248
jpayne@69 28249 /* "(tree fragment)":16
jpayne@69 28250 * else:
jpayne@69 28251 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@69 28252 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28253 * __pyx_unpickle_asBed__set_state(self, __pyx_state)
jpayne@69 28254 */
jpayne@69 28255 __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 28256
jpayne@69 28257 /* "(tree fragment)":1
jpayne@69 28258 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28259 * cdef tuple state
jpayne@69 28260 * cdef object _dict
jpayne@69 28261 */
jpayne@69 28262 __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28263
jpayne@69 28264 /* "(tree fragment)":16
jpayne@69 28265 * else:
jpayne@69 28266 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@69 28267 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28268 * __pyx_unpickle_asVCF__set_state(self, __pyx_state)
jpayne@69 28269 */
jpayne@69 28270 __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 28271
jpayne@69 28272 /* "pysam/libctabix.pyx":352
jpayne@69 28273 * self.encoding = encoding
jpayne@69 28274 *
jpayne@69 28275 * def _open( self, # <<<<<<<<<<<<<<
jpayne@69 28276 * filename,
jpayne@69 28277 * mode='r',
jpayne@69 28278 */
jpayne@69 28279 __pyx_tuple__67 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_mode, __pyx_n_s_index, __pyx_n_s_threads, __pyx_n_s_filename_index, __pyx_n_s_cfilename, __pyx_n_s_cfilename_index); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 352, __pyx_L1_error)
jpayne@69 28280 __Pyx_GOTREF(__pyx_tuple__67);
jpayne@69 28281 __Pyx_GIVEREF(__pyx_tuple__67);
jpayne@69 28282 __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 8, 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_libctabix_pyx, __pyx_n_s_open, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 352, __pyx_L1_error)
jpayne@69 28283 __pyx_tuple__68 = PyTuple_Pack(3, __pyx_n_u_r, Py_None, __pyx_int_1); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 352, __pyx_L1_error)
jpayne@69 28284 __Pyx_GOTREF(__pyx_tuple__68);
jpayne@69 28285 __Pyx_GIVEREF(__pyx_tuple__68);
jpayne@69 28286
jpayne@69 28287 /* "pysam/libctabix.pyx":404
jpayne@69 28288 * self.start_offset = self.tell()
jpayne@69 28289 *
jpayne@69 28290 * def _dup(self): # <<<<<<<<<<<<<<
jpayne@69 28291 * '''return a copy of this tabix file.
jpayne@69 28292 *
jpayne@69 28293 */
jpayne@69 28294 __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabix_pyx, __pyx_n_s_dup, 404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 28295
jpayne@69 28296 /* "pysam/libctabix.pyx":416
jpayne@69 28297 * encoding=self.encoding)
jpayne@69 28298 *
jpayne@69 28299 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@69 28300 * reference=None,
jpayne@69 28301 * start=None,
jpayne@69 28302 */
jpayne@69 28303 __pyx_tuple__69 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_reference, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_region, __pyx_n_s_parser, __pyx_n_s_multiple_iterators, __pyx_n_s_itr, __pyx_n_s_cstr, __pyx_n_s_fileobj, __pyx_n_s_s_2, __pyx_n_s_a); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 416, __pyx_L1_error)
jpayne@69 28304 __Pyx_GOTREF(__pyx_tuple__69);
jpayne@69 28305 __Pyx_GIVEREF(__pyx_tuple__69);
jpayne@69 28306 __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabix_pyx, __pyx_n_s_fetch, 416, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 416, __pyx_L1_error)
jpayne@69 28307 __pyx_tuple__70 = PyTuple_Pack(6, Py_None, Py_None, Py_None, Py_None, Py_None, Py_False); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 416, __pyx_L1_error)
jpayne@69 28308 __Pyx_GOTREF(__pyx_tuple__70);
jpayne@69 28309 __Pyx_GIVEREF(__pyx_tuple__70);
jpayne@69 28310
jpayne@69 28311 /* "pysam/libctabix.pyx":598
jpayne@69 28312 * return result
jpayne@69 28313 *
jpayne@69 28314 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 28315 * '''
jpayne@69 28316 * closes the :class:`pysam.TabixFile`.'''
jpayne@69 28317 */
jpayne@69 28318 __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabix_pyx, __pyx_n_s_close, 598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 598, __pyx_L1_error)
jpayne@69 28319
jpayne@69 28320 /* "(tree fragment)":1
jpayne@69 28321 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28322 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 28323 * def __setstate_cython__(self, __pyx_state):
jpayne@69 28324 */
jpayne@69 28325 __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28326
jpayne@69 28327 /* "(tree fragment)":3
jpayne@69 28328 * def __reduce_cython__(self):
jpayne@69 28329 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 28330 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28331 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 28332 */
jpayne@69 28333 __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 28334
jpayne@69 28335 /* "(tree fragment)":1
jpayne@69 28336 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28337 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 28338 * def __setstate_cython__(self, __pyx_state):
jpayne@69 28339 */
jpayne@69 28340 __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28341
jpayne@69 28342 /* "(tree fragment)":3
jpayne@69 28343 * def __reduce_cython__(self):
jpayne@69 28344 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 28345 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28346 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 28347 */
jpayne@69 28348 __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 28349
jpayne@69 28350 /* "pysam/libctabix.pyx":685
jpayne@69 28351 * '''empty iterator'''
jpayne@69 28352 *
jpayne@69 28353 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 28354 * return self
jpayne@69 28355 *
jpayne@69 28356 */
jpayne@69 28357 __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabix_pyx, __pyx_n_s_iter, 685, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 685, __pyx_L1_error)
jpayne@69 28358
jpayne@69 28359 /* "pysam/libctabix.pyx":688
jpayne@69 28360 * return self
jpayne@69 28361 *
jpayne@69 28362 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 28363 * raise StopIteration()
jpayne@69 28364 *
jpayne@69 28365 */
jpayne@69 28366 __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabix_pyx, __pyx_n_s_next, 688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 688, __pyx_L1_error)
jpayne@69 28367
jpayne@69 28368 /* "(tree fragment)":1
jpayne@69 28369 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28370 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 28371 * def __setstate_cython__(self, __pyx_state):
jpayne@69 28372 */
jpayne@69 28373 __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28374
jpayne@69 28375 /* "(tree fragment)":3
jpayne@69 28376 * def __reduce_cython__(self):
jpayne@69 28377 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 28378 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28379 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 28380 */
jpayne@69 28381 __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 28382
jpayne@69 28383 /* "(tree fragment)":1
jpayne@69 28384 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28385 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 28386 * def __setstate_cython__(self, __pyx_state):
jpayne@69 28387 */
jpayne@69 28388 __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28389
jpayne@69 28390 /* "(tree fragment)":3
jpayne@69 28391 * def __reduce_cython__(self):
jpayne@69 28392 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 28393 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28394 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 28395 */
jpayne@69 28396 __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 28397
jpayne@69 28398 /* "(tree fragment)":1
jpayne@69 28399 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28400 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 28401 * def __setstate_cython__(self, __pyx_state):
jpayne@69 28402 */
jpayne@69 28403 __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28404
jpayne@69 28405 /* "(tree fragment)":3
jpayne@69 28406 * def __reduce_cython__(self):
jpayne@69 28407 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 28408 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28409 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 28410 */
jpayne@69 28411 __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 28412
jpayne@69 28413 /* "(tree fragment)":1
jpayne@69 28414 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28415 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 28416 * def __setstate_cython__(self, __pyx_state):
jpayne@69 28417 */
jpayne@69 28418 __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28419
jpayne@69 28420 /* "(tree fragment)":3
jpayne@69 28421 * def __reduce_cython__(self):
jpayne@69 28422 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 28423 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28424 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 28425 */
jpayne@69 28426 __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__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 28427
jpayne@69 28428 /* "pysam/libctabix.pyx":811
jpayne@69 28429 *
jpayne@69 28430 *
jpayne@69 28431 * def tabix_compress(filename_in, # <<<<<<<<<<<<<<
jpayne@69 28432 * filename_out,
jpayne@69 28433 * force=False):
jpayne@69 28434 */
jpayne@69 28435 __pyx_tuple__71 = PyTuple_Pack(13, __pyx_n_s_filename_in, __pyx_n_s_filename_out, __pyx_n_s_force, __pyx_n_s_WINDOW_SIZE, __pyx_n_s_c, __pyx_n_s_r, __pyx_n_s_buffer, __pyx_n_s_fp, __pyx_n_s_fd_src, __pyx_n_s_is_empty, __pyx_n_s_O_RDONLY, __pyx_n_s_fn, __pyx_n_s_cfn); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 811, __pyx_L1_error)
jpayne@69 28436 __Pyx_GOTREF(__pyx_tuple__71);
jpayne@69 28437 __Pyx_GIVEREF(__pyx_tuple__71);
jpayne@69 28438 __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabix_pyx, __pyx_n_s_tabix_compress, 811, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 811, __pyx_L1_error)
jpayne@69 28439 __pyx_tuple__72 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 811, __pyx_L1_error)
jpayne@69 28440 __Pyx_GOTREF(__pyx_tuple__72);
jpayne@69 28441 __Pyx_GIVEREF(__pyx_tuple__72);
jpayne@69 28442
jpayne@69 28443 /* "pysam/libctabix.pyx":873
jpayne@69 28444 *
jpayne@69 28445 *
jpayne@69 28446 * def tabix_index(filename, # <<<<<<<<<<<<<<
jpayne@69 28447 * force=False,
jpayne@69 28448 * seq_col=None,
jpayne@69 28449 */
jpayne@69 28450 __pyx_tuple__73 = PyTuple_Pack(24, __pyx_n_s_filename, __pyx_n_s_force, __pyx_n_s_seq_col, __pyx_n_s_start_col, __pyx_n_s_end_col, __pyx_n_s_preset, __pyx_n_s_meta_char, __pyx_n_s_line_skip, __pyx_n_s_zerobased, __pyx_n_s_min_shift, __pyx_n_s_index, __pyx_n_s_keep_original, __pyx_n_s_csi, __pyx_n_s_fn, __pyx_n_s_cfn, __pyx_n_s_fp, __pyx_n_s_fmt, __pyx_n_s_preset2conf, __pyx_n_s_conf_data, __pyx_n_s_conf, __pyx_n_s_suffix, __pyx_n_s_fn_index, __pyx_n_s_fnidx, __pyx_n_s_retval); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 873, __pyx_L1_error)
jpayne@69 28451 __Pyx_GOTREF(__pyx_tuple__73);
jpayne@69 28452 __Pyx_GIVEREF(__pyx_tuple__73);
jpayne@69 28453 __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(13, 0, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabix_pyx, __pyx_n_s_tabix_index, 873, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 873, __pyx_L1_error)
jpayne@69 28454
jpayne@69 28455 /* "(tree fragment)":1
jpayne@69 28456 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28457 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 28458 * def __setstate_cython__(self, __pyx_state):
jpayne@69 28459 */
jpayne@69 28460 __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28461
jpayne@69 28462 /* "(tree fragment)":3
jpayne@69 28463 * def __reduce_cython__(self):
jpayne@69 28464 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 28465 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28466 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 28467 */
jpayne@69 28468 __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 28469
jpayne@69 28470 /* "pysam/libctabix.pyx":1183
jpayne@69 28471 * Permits the use of file-like objects for example from the gzip module.
jpayne@69 28472 * '''
jpayne@69 28473 * def __init__(self, infile, parser): # <<<<<<<<<<<<<<
jpayne@69 28474 *
jpayne@69 28475 * self.infile = infile
jpayne@69 28476 */
jpayne@69 28477 __pyx_tuple__74 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_infile, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 1183, __pyx_L1_error)
jpayne@69 28478 __Pyx_GOTREF(__pyx_tuple__74);
jpayne@69 28479 __Pyx_GIVEREF(__pyx_tuple__74);
jpayne@69 28480 __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabix_pyx, __pyx_n_s_init, 1183, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 1183, __pyx_L1_error)
jpayne@69 28481
jpayne@69 28482 /* "pysam/libctabix.pyx":1190
jpayne@69 28483 * self.parser = parser
jpayne@69 28484 *
jpayne@69 28485 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 28486 * return self
jpayne@69 28487 *
jpayne@69 28488 */
jpayne@69 28489 __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabix_pyx, __pyx_n_s_iter, 1190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 1190, __pyx_L1_error)
jpayne@69 28490
jpayne@69 28491 /* "pysam/libctabix.pyx":1194
jpayne@69 28492 *
jpayne@69 28493 * # cython version - required for python 3
jpayne@69 28494 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 28495 *
jpayne@69 28496 * cdef char * b
jpayne@69 28497 */
jpayne@69 28498 __pyx_tuple__75 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_b, __pyx_n_s_cpy, __pyx_n_s_nbytes, __pyx_n_s_encoding, __pyx_n_s_line, __pyx_n_s_s_2, __pyx_n_s_bytes_cpy); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1194, __pyx_L1_error)
jpayne@69 28499 __Pyx_GOTREF(__pyx_tuple__75);
jpayne@69 28500 __Pyx_GIVEREF(__pyx_tuple__75);
jpayne@69 28501 __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 8, 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_libctabix_pyx, __pyx_n_s_next, 1194, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 1194, __pyx_L1_error)
jpayne@69 28502
jpayne@69 28503 /* "pysam/libctabix.pyx":1238
jpayne@69 28504 *
jpayne@69 28505 *
jpayne@69 28506 * def tabix_iterator(infile, parser): # <<<<<<<<<<<<<<
jpayne@69 28507 * """return an iterator over all entries in a file.
jpayne@69 28508 *
jpayne@69 28509 */
jpayne@69 28510 __pyx_tuple__76 = PyTuple_Pack(2, __pyx_n_s_infile, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1238, __pyx_L1_error)
jpayne@69 28511 __Pyx_GOTREF(__pyx_tuple__76);
jpayne@69 28512 __Pyx_GIVEREF(__pyx_tuple__76);
jpayne@69 28513 __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libctabix_pyx, __pyx_n_s_tabix_iterator, 1238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 1238, __pyx_L1_error)
jpayne@69 28514
jpayne@69 28515 /* "(tree fragment)":1
jpayne@69 28516 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 28517 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 28518 * def __setstate_cython__(self, __pyx_state):
jpayne@69 28519 */
jpayne@69 28520 __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__64, __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)
jpayne@69 28521
jpayne@69 28522 /* "(tree fragment)":3
jpayne@69 28523 * def __reduce_cython__(self):
jpayne@69 28524 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 28525 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28526 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 28527 */
jpayne@69 28528 __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__66, __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)
jpayne@69 28529
jpayne@69 28530 /* "(tree fragment)":1
jpayne@69 28531 * def __pyx_unpickle_Parser(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 28532 * cdef object __pyx_PickleError
jpayne@69 28533 * cdef object __pyx_result
jpayne@69 28534 */
jpayne@69 28535 __pyx_tuple__77 = 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__77)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28536 __Pyx_GOTREF(__pyx_tuple__77);
jpayne@69 28537 __Pyx_GIVEREF(__pyx_tuple__77);
jpayne@69 28538 __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Parser, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28539 __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_asTuple, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28540 __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_asGFF3, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28541 __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_asGTF, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28542 __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_asBed, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28543 __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_asVCF, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 28544 __Pyx_RefNannyFinishContext();
jpayne@69 28545 return 0;
jpayne@69 28546 __pyx_L1_error:;
jpayne@69 28547 __Pyx_RefNannyFinishContext();
jpayne@69 28548 return -1;
jpayne@69 28549 }
jpayne@69 28550 /* #### Code section: init_constants ### */
jpayne@69 28551
jpayne@69 28552 static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
jpayne@69 28553 __pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type;
jpayne@69 28554 __pyx_umethod_PyDict_Type_keys.method_name = &__pyx_n_s_keys;
jpayne@69 28555 if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
jpayne@69 28556 __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28557 __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28558 __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28559 __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28560 __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28561 __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28562 __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28563 __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28564 __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28565 __pyx_int_35 = PyInt_FromLong(35); if (unlikely(!__pyx_int_35)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28566 __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28567 __pyx_int_21667264 = PyInt_FromLong(21667264L); if (unlikely(!__pyx_int_21667264)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28568 __pyx_int_139192863 = PyInt_FromLong(139192863L); if (unlikely(!__pyx_int_139192863)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28569 __pyx_int_243541226 = PyInt_FromLong(243541226L); if (unlikely(!__pyx_int_243541226)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28570 __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28571 return 0;
jpayne@69 28572 __pyx_L1_error:;
jpayne@69 28573 return -1;
jpayne@69 28574 }
jpayne@69 28575 /* #### Code section: init_globals ### */
jpayne@69 28576
jpayne@69 28577 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
jpayne@69 28578 /* AssertionsEnabled.init */
jpayne@69 28579 if (likely(__Pyx_init_assertions_enabled() == 0)); else
jpayne@69 28580
jpayne@69 28581 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28582
jpayne@69 28583 return 0;
jpayne@69 28584 __pyx_L1_error:;
jpayne@69 28585 return -1;
jpayne@69 28586 }
jpayne@69 28587 /* #### Code section: init_module ### */
jpayne@69 28588
jpayne@69 28589 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
jpayne@69 28590 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
jpayne@69 28591 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
jpayne@69 28592 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
jpayne@69 28593 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
jpayne@69 28594 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
jpayne@69 28595 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
jpayne@69 28596
jpayne@69 28597 static int __Pyx_modinit_global_init_code(void) {
jpayne@69 28598 __Pyx_RefNannyDeclarations
jpayne@69 28599 __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
jpayne@69 28600 /*--- Global init code ---*/
jpayne@69 28601 __Pyx_RefNannyFinishContext();
jpayne@69 28602 return 0;
jpayne@69 28603 }
jpayne@69 28604
jpayne@69 28605 static int __Pyx_modinit_variable_export_code(void) {
jpayne@69 28606 __Pyx_RefNannyDeclarations
jpayne@69 28607 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
jpayne@69 28608 /*--- Variable export code ---*/
jpayne@69 28609 __Pyx_RefNannyFinishContext();
jpayne@69 28610 return 0;
jpayne@69 28611 }
jpayne@69 28612
jpayne@69 28613 static int __Pyx_modinit_function_export_code(void) {
jpayne@69 28614 __Pyx_RefNannyDeclarations
jpayne@69 28615 __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
jpayne@69 28616 /*--- Function export code ---*/
jpayne@69 28617 __Pyx_RefNannyFinishContext();
jpayne@69 28618 return 0;
jpayne@69 28619 }
jpayne@69 28620
jpayne@69 28621 static int __Pyx_modinit_type_init_code(void) {
jpayne@69 28622 __Pyx_RefNannyDeclarations
jpayne@69 28623 PyObject *__pyx_t_1 = NULL;
jpayne@69 28624 PyObject *__pyx_t_2 = NULL;
jpayne@69 28625 int __pyx_lineno = 0;
jpayne@69 28626 const char *__pyx_filename = NULL;
jpayne@69 28627 int __pyx_clineno = 0;
jpayne@69 28628 __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
jpayne@69 28629 /*--- Type init code ---*/
jpayne@69 28630 __pyx_vtabptr_5pysam_9libctabix_tabix_file_iterator = &__pyx_vtable_5pysam_9libctabix_tabix_file_iterator;
jpayne@69 28631 __pyx_vtable_5pysam_9libctabix_tabix_file_iterator.__pyx___cnext__ = (PyObject *(*)(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *))__pyx_f_5pysam_9libctabix_19tabix_file_iterator___cnext__;
jpayne@69 28632 #if CYTHON_USE_TYPE_SPECS
jpayne@69 28633 __pyx_ptype_5pysam_9libctabix_tabix_file_iterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_tabix_file_iterator_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_9libctabix_tabix_file_iterator)) __PYX_ERR(0, 1098, __pyx_L1_error)
jpayne@69 28634 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_tabix_file_iterator_spec, __pyx_ptype_5pysam_9libctabix_tabix_file_iterator) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
jpayne@69 28635 #else
jpayne@69 28636 __pyx_ptype_5pysam_9libctabix_tabix_file_iterator = &__pyx_type_5pysam_9libctabix_tabix_file_iterator;
jpayne@69 28637 #endif
jpayne@69 28638 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28639 #endif
jpayne@69 28640 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 28641 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_tabix_file_iterator) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
jpayne@69 28642 #endif
jpayne@69 28643 #if PY_MAJOR_VERSION < 3
jpayne@69 28644 __pyx_ptype_5pysam_9libctabix_tabix_file_iterator->tp_print = 0;
jpayne@69 28645 #endif
jpayne@69 28646 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28647 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_tabix_file_iterator->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_tabix_file_iterator->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 28648 __pyx_ptype_5pysam_9libctabix_tabix_file_iterator->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 28649 }
jpayne@69 28650 #endif
jpayne@69 28651 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_tabix_file_iterator, __pyx_vtabptr_5pysam_9libctabix_tabix_file_iterator) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
jpayne@69 28652 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28653 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_tabix_file_iterator) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
jpayne@69 28654 #endif
jpayne@69 28655 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_tabix_file_iterator, (PyObject *) __pyx_ptype_5pysam_9libctabix_tabix_file_iterator) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
jpayne@69 28656 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28657 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_tabix_file_iterator) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
jpayne@69 28658 #endif
jpayne@69 28659 __pyx_t_1 = PyImport_ImportModule("pysam.libchtslib"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28660 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 28661 __pyx_ptype_5pysam_10libchtslib_HTSFile = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libchtslib", "HTSFile", sizeof(struct __pyx_obj_5pysam_10libchtslib_HTSFile), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_10libchtslib_HTSFile),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_10libchtslib_HTSFile) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28662 __pyx_vtabptr_5pysam_10libchtslib_HTSFile = (struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile*)__Pyx_GetVtable(__pyx_ptype_5pysam_10libchtslib_HTSFile); if (unlikely(!__pyx_vtabptr_5pysam_10libchtslib_HTSFile)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 28663 __pyx_vtabptr_5pysam_9libctabix_TabixFile = &__pyx_vtable_5pysam_9libctabix_TabixFile;
jpayne@69 28664 __pyx_vtable_5pysam_9libctabix_TabixFile.__pyx_base = *__pyx_vtabptr_5pysam_10libchtslib_HTSFile;
jpayne@69 28665 #if CYTHON_USE_TYPE_SPECS
jpayne@69 28666 __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_10libchtslib_HTSFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@69 28667 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 28668 __pyx_ptype_5pysam_9libctabix_TabixFile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_TabixFile_spec, __pyx_t_2);
jpayne@69 28669 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 28670 if (unlikely(!__pyx_ptype_5pysam_9libctabix_TabixFile)) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@69 28671 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_TabixFile_spec, __pyx_ptype_5pysam_9libctabix_TabixFile) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@69 28672 #else
jpayne@69 28673 __pyx_ptype_5pysam_9libctabix_TabixFile = &__pyx_type_5pysam_9libctabix_TabixFile;
jpayne@69 28674 #endif
jpayne@69 28675 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28676 __pyx_ptype_5pysam_9libctabix_TabixFile->tp_base = __pyx_ptype_5pysam_10libchtslib_HTSFile;
jpayne@69 28677 #endif
jpayne@69 28678 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 28679 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_TabixFile) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@69 28680 #endif
jpayne@69 28681 #if PY_MAJOR_VERSION < 3
jpayne@69 28682 __pyx_ptype_5pysam_9libctabix_TabixFile->tp_print = 0;
jpayne@69 28683 #endif
jpayne@69 28684 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28685 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_TabixFile->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_TabixFile->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 28686 __pyx_ptype_5pysam_9libctabix_TabixFile->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 28687 }
jpayne@69 28688 #endif
jpayne@69 28689 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_TabixFile, __pyx_vtabptr_5pysam_9libctabix_TabixFile) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@69 28690 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28691 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_TabixFile) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@69 28692 #endif
jpayne@69 28693 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TabixFile, (PyObject *) __pyx_ptype_5pysam_9libctabix_TabixFile) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@69 28694 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28695 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_TabixFile) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@69 28696 #endif
jpayne@69 28697 __pyx_vtabptr_5pysam_9libctabix_Parser = &__pyx_vtable_5pysam_9libctabix_Parser;
jpayne@69 28698 __pyx_vtable_5pysam_9libctabix_Parser.parse = (PyObject *(*)(struct __pyx_obj_5pysam_9libctabix_Parser *, char *, int))__pyx_f_5pysam_9libctabix_6Parser_parse;
jpayne@69 28699 #if CYTHON_USE_TYPE_SPECS
jpayne@69 28700 __pyx_ptype_5pysam_9libctabix_Parser = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_Parser_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_9libctabix_Parser)) __PYX_ERR(0, 82, __pyx_L1_error)
jpayne@69 28701 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_Parser_spec, __pyx_ptype_5pysam_9libctabix_Parser) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
jpayne@69 28702 #else
jpayne@69 28703 __pyx_ptype_5pysam_9libctabix_Parser = &__pyx_type_5pysam_9libctabix_Parser;
jpayne@69 28704 #endif
jpayne@69 28705 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28706 #endif
jpayne@69 28707 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 28708 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_Parser) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
jpayne@69 28709 #endif
jpayne@69 28710 #if PY_MAJOR_VERSION < 3
jpayne@69 28711 __pyx_ptype_5pysam_9libctabix_Parser->tp_print = 0;
jpayne@69 28712 #endif
jpayne@69 28713 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28714 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_Parser->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_Parser->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 28715 __pyx_ptype_5pysam_9libctabix_Parser->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 28716 }
jpayne@69 28717 #endif
jpayne@69 28718 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_Parser, __pyx_vtabptr_5pysam_9libctabix_Parser) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
jpayne@69 28719 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28720 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_Parser) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
jpayne@69 28721 #endif
jpayne@69 28722 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Parser, (PyObject *) __pyx_ptype_5pysam_9libctabix_Parser) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
jpayne@69 28723 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28724 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_Parser) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
jpayne@69 28725 #endif
jpayne@69 28726 __pyx_vtabptr_5pysam_9libctabix_asTuple = &__pyx_vtable_5pysam_9libctabix_asTuple;
jpayne@69 28727 __pyx_vtable_5pysam_9libctabix_asTuple.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@69 28728 __pyx_vtable_5pysam_9libctabix_asTuple.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_5pysam_9libctabix_Parser *, char *, int))__pyx_f_5pysam_9libctabix_7asTuple_parse;
jpayne@69 28729 #if CYTHON_USE_TYPE_SPECS
jpayne@69 28730 __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libctabix_Parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@69 28731 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 28732 __pyx_ptype_5pysam_9libctabix_asTuple = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_asTuple_spec, __pyx_t_2);
jpayne@69 28733 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 28734 if (unlikely(!__pyx_ptype_5pysam_9libctabix_asTuple)) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@69 28735 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_asTuple_spec, __pyx_ptype_5pysam_9libctabix_asTuple) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@69 28736 #else
jpayne@69 28737 __pyx_ptype_5pysam_9libctabix_asTuple = &__pyx_type_5pysam_9libctabix_asTuple;
jpayne@69 28738 #endif
jpayne@69 28739 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28740 __pyx_ptype_5pysam_9libctabix_asTuple->tp_base = __pyx_ptype_5pysam_9libctabix_Parser;
jpayne@69 28741 #endif
jpayne@69 28742 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 28743 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_asTuple) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@69 28744 #endif
jpayne@69 28745 #if PY_MAJOR_VERSION < 3
jpayne@69 28746 __pyx_ptype_5pysam_9libctabix_asTuple->tp_print = 0;
jpayne@69 28747 #endif
jpayne@69 28748 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28749 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_asTuple->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_asTuple->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 28750 __pyx_ptype_5pysam_9libctabix_asTuple->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 28751 }
jpayne@69 28752 #endif
jpayne@69 28753 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_asTuple, __pyx_vtabptr_5pysam_9libctabix_asTuple) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@69 28754 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28755 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_asTuple) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@69 28756 #endif
jpayne@69 28757 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_asTuple, (PyObject *) __pyx_ptype_5pysam_9libctabix_asTuple) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@69 28758 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28759 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_asTuple) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@69 28760 #endif
jpayne@69 28761 __pyx_vtabptr_5pysam_9libctabix_asGTF = &__pyx_vtable_5pysam_9libctabix_asGTF;
jpayne@69 28762 __pyx_vtable_5pysam_9libctabix_asGTF.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@69 28763 __pyx_vtable_5pysam_9libctabix_asGTF.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_5pysam_9libctabix_Parser *, char *, int))__pyx_f_5pysam_9libctabix_5asGTF_parse;
jpayne@69 28764 #if CYTHON_USE_TYPE_SPECS
jpayne@69 28765 __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libctabix_Parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@69 28766 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 28767 __pyx_ptype_5pysam_9libctabix_asGTF = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_asGTF_spec, __pyx_t_2);
jpayne@69 28768 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 28769 if (unlikely(!__pyx_ptype_5pysam_9libctabix_asGTF)) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@69 28770 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_asGTF_spec, __pyx_ptype_5pysam_9libctabix_asGTF) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@69 28771 #else
jpayne@69 28772 __pyx_ptype_5pysam_9libctabix_asGTF = &__pyx_type_5pysam_9libctabix_asGTF;
jpayne@69 28773 #endif
jpayne@69 28774 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28775 __pyx_ptype_5pysam_9libctabix_asGTF->tp_base = __pyx_ptype_5pysam_9libctabix_Parser;
jpayne@69 28776 #endif
jpayne@69 28777 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 28778 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_asGTF) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@69 28779 #endif
jpayne@69 28780 #if PY_MAJOR_VERSION < 3
jpayne@69 28781 __pyx_ptype_5pysam_9libctabix_asGTF->tp_print = 0;
jpayne@69 28782 #endif
jpayne@69 28783 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28784 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_asGTF->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_asGTF->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 28785 __pyx_ptype_5pysam_9libctabix_asGTF->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 28786 }
jpayne@69 28787 #endif
jpayne@69 28788 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_asGTF, __pyx_vtabptr_5pysam_9libctabix_asGTF) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@69 28789 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28790 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_asGTF) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@69 28791 #endif
jpayne@69 28792 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_asGTF, (PyObject *) __pyx_ptype_5pysam_9libctabix_asGTF) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@69 28793 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28794 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_asGTF) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@69 28795 #endif
jpayne@69 28796 __pyx_vtabptr_5pysam_9libctabix_asGFF3 = &__pyx_vtable_5pysam_9libctabix_asGFF3;
jpayne@69 28797 __pyx_vtable_5pysam_9libctabix_asGFF3.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@69 28798 __pyx_vtable_5pysam_9libctabix_asGFF3.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_5pysam_9libctabix_Parser *, char *, int))__pyx_f_5pysam_9libctabix_6asGFF3_parse;
jpayne@69 28799 #if CYTHON_USE_TYPE_SPECS
jpayne@69 28800 __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libctabix_Parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@69 28801 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 28802 __pyx_ptype_5pysam_9libctabix_asGFF3 = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_asGFF3_spec, __pyx_t_2);
jpayne@69 28803 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 28804 if (unlikely(!__pyx_ptype_5pysam_9libctabix_asGFF3)) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@69 28805 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_asGFF3_spec, __pyx_ptype_5pysam_9libctabix_asGFF3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@69 28806 #else
jpayne@69 28807 __pyx_ptype_5pysam_9libctabix_asGFF3 = &__pyx_type_5pysam_9libctabix_asGFF3;
jpayne@69 28808 #endif
jpayne@69 28809 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28810 __pyx_ptype_5pysam_9libctabix_asGFF3->tp_base = __pyx_ptype_5pysam_9libctabix_Parser;
jpayne@69 28811 #endif
jpayne@69 28812 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 28813 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_asGFF3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@69 28814 #endif
jpayne@69 28815 #if PY_MAJOR_VERSION < 3
jpayne@69 28816 __pyx_ptype_5pysam_9libctabix_asGFF3->tp_print = 0;
jpayne@69 28817 #endif
jpayne@69 28818 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28819 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_asGFF3->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_asGFF3->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 28820 __pyx_ptype_5pysam_9libctabix_asGFF3->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 28821 }
jpayne@69 28822 #endif
jpayne@69 28823 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_asGFF3, __pyx_vtabptr_5pysam_9libctabix_asGFF3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@69 28824 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28825 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_asGFF3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@69 28826 #endif
jpayne@69 28827 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_asGFF3, (PyObject *) __pyx_ptype_5pysam_9libctabix_asGFF3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@69 28828 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28829 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_asGFF3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@69 28830 #endif
jpayne@69 28831 __pyx_vtabptr_5pysam_9libctabix_asBed = &__pyx_vtable_5pysam_9libctabix_asBed;
jpayne@69 28832 __pyx_vtable_5pysam_9libctabix_asBed.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@69 28833 __pyx_vtable_5pysam_9libctabix_asBed.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_5pysam_9libctabix_Parser *, char *, int))__pyx_f_5pysam_9libctabix_5asBed_parse;
jpayne@69 28834 #if CYTHON_USE_TYPE_SPECS
jpayne@69 28835 __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libctabix_Parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@69 28836 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 28837 __pyx_ptype_5pysam_9libctabix_asBed = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_asBed_spec, __pyx_t_2);
jpayne@69 28838 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 28839 if (unlikely(!__pyx_ptype_5pysam_9libctabix_asBed)) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@69 28840 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_asBed_spec, __pyx_ptype_5pysam_9libctabix_asBed) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@69 28841 #else
jpayne@69 28842 __pyx_ptype_5pysam_9libctabix_asBed = &__pyx_type_5pysam_9libctabix_asBed;
jpayne@69 28843 #endif
jpayne@69 28844 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28845 __pyx_ptype_5pysam_9libctabix_asBed->tp_base = __pyx_ptype_5pysam_9libctabix_Parser;
jpayne@69 28846 #endif
jpayne@69 28847 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 28848 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_asBed) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@69 28849 #endif
jpayne@69 28850 #if PY_MAJOR_VERSION < 3
jpayne@69 28851 __pyx_ptype_5pysam_9libctabix_asBed->tp_print = 0;
jpayne@69 28852 #endif
jpayne@69 28853 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28854 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_asBed->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_asBed->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 28855 __pyx_ptype_5pysam_9libctabix_asBed->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 28856 }
jpayne@69 28857 #endif
jpayne@69 28858 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_asBed, __pyx_vtabptr_5pysam_9libctabix_asBed) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@69 28859 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28860 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_asBed) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@69 28861 #endif
jpayne@69 28862 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_asBed, (PyObject *) __pyx_ptype_5pysam_9libctabix_asBed) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@69 28863 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28864 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_asBed) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@69 28865 #endif
jpayne@69 28866 __pyx_vtabptr_5pysam_9libctabix_asVCF = &__pyx_vtable_5pysam_9libctabix_asVCF;
jpayne@69 28867 __pyx_vtable_5pysam_9libctabix_asVCF.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@69 28868 __pyx_vtable_5pysam_9libctabix_asVCF.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_5pysam_9libctabix_Parser *, char *, int))__pyx_f_5pysam_9libctabix_5asVCF_parse;
jpayne@69 28869 #if CYTHON_USE_TYPE_SPECS
jpayne@69 28870 __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libctabix_Parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@69 28871 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 28872 __pyx_ptype_5pysam_9libctabix_asVCF = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_asVCF_spec, __pyx_t_2);
jpayne@69 28873 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 28874 if (unlikely(!__pyx_ptype_5pysam_9libctabix_asVCF)) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@69 28875 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_asVCF_spec, __pyx_ptype_5pysam_9libctabix_asVCF) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@69 28876 #else
jpayne@69 28877 __pyx_ptype_5pysam_9libctabix_asVCF = &__pyx_type_5pysam_9libctabix_asVCF;
jpayne@69 28878 #endif
jpayne@69 28879 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28880 __pyx_ptype_5pysam_9libctabix_asVCF->tp_base = __pyx_ptype_5pysam_9libctabix_Parser;
jpayne@69 28881 #endif
jpayne@69 28882 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 28883 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_asVCF) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@69 28884 #endif
jpayne@69 28885 #if PY_MAJOR_VERSION < 3
jpayne@69 28886 __pyx_ptype_5pysam_9libctabix_asVCF->tp_print = 0;
jpayne@69 28887 #endif
jpayne@69 28888 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28889 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_asVCF->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_asVCF->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 28890 __pyx_ptype_5pysam_9libctabix_asVCF->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 28891 }
jpayne@69 28892 #endif
jpayne@69 28893 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_asVCF, __pyx_vtabptr_5pysam_9libctabix_asVCF) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@69 28894 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28895 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_asVCF) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@69 28896 #endif
jpayne@69 28897 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_asVCF, (PyObject *) __pyx_ptype_5pysam_9libctabix_asVCF) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@69 28898 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28899 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_asVCF) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@69 28900 #endif
jpayne@69 28901 __pyx_vtabptr_5pysam_9libctabix_TabixIterator = &__pyx_vtable_5pysam_9libctabix_TabixIterator;
jpayne@69 28902 __pyx_vtable_5pysam_9libctabix_TabixIterator.__pyx___cnext__ = (int (*)(struct __pyx_obj_5pysam_9libctabix_TabixIterator *))__pyx_f_5pysam_9libctabix_13TabixIterator___cnext__;
jpayne@69 28903 #if CYTHON_USE_TYPE_SPECS
jpayne@69 28904 __pyx_ptype_5pysam_9libctabix_TabixIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_TabixIterator_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_9libctabix_TabixIterator)) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@69 28905 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_TabixIterator_spec, __pyx_ptype_5pysam_9libctabix_TabixIterator) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@69 28906 #else
jpayne@69 28907 __pyx_ptype_5pysam_9libctabix_TabixIterator = &__pyx_type_5pysam_9libctabix_TabixIterator;
jpayne@69 28908 #endif
jpayne@69 28909 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28910 #endif
jpayne@69 28911 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 28912 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_TabixIterator) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@69 28913 #endif
jpayne@69 28914 #if PY_MAJOR_VERSION < 3
jpayne@69 28915 __pyx_ptype_5pysam_9libctabix_TabixIterator->tp_print = 0;
jpayne@69 28916 #endif
jpayne@69 28917 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28918 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_TabixIterator->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_TabixIterator->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 28919 __pyx_ptype_5pysam_9libctabix_TabixIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 28920 }
jpayne@69 28921 #endif
jpayne@69 28922 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 28923 {
jpayne@69 28924 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIterator, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@69 28925 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@69 28926 __pyx_wrapperbase_5pysam_9libctabix_13TabixIterator_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@69 28927 __pyx_wrapperbase_5pysam_9libctabix_13TabixIterator_4__next__.doc = __pyx_doc_5pysam_9libctabix_13TabixIterator_4__next__;
jpayne@69 28928 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_13TabixIterator_4__next__;
jpayne@69 28929 }
jpayne@69 28930 }
jpayne@69 28931 #endif
jpayne@69 28932 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_TabixIterator, __pyx_vtabptr_5pysam_9libctabix_TabixIterator) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@69 28933 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28934 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_TabixIterator) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@69 28935 #endif
jpayne@69 28936 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TabixIterator, (PyObject *) __pyx_ptype_5pysam_9libctabix_TabixIterator) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@69 28937 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28938 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_TabixIterator) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@69 28939 #endif
jpayne@69 28940 __pyx_vtabptr_5pysam_9libctabix_TabixIteratorParsed = &__pyx_vtable_5pysam_9libctabix_TabixIteratorParsed;
jpayne@69 28941 __pyx_vtable_5pysam_9libctabix_TabixIteratorParsed.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_TabixIterator;
jpayne@69 28942 #if CYTHON_USE_TYPE_SPECS
jpayne@69 28943 __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@69 28944 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 28945 __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_TabixIteratorParsed_spec, __pyx_t_2);
jpayne@69 28946 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 28947 if (unlikely(!__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed)) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@69 28948 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_TabixIteratorParsed_spec, __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@69 28949 #else
jpayne@69 28950 __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed = &__pyx_type_5pysam_9libctabix_TabixIteratorParsed;
jpayne@69 28951 #endif
jpayne@69 28952 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28953 __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed->tp_base = __pyx_ptype_5pysam_9libctabix_TabixIterator;
jpayne@69 28954 #endif
jpayne@69 28955 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 28956 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@69 28957 #endif
jpayne@69 28958 #if PY_MAJOR_VERSION < 3
jpayne@69 28959 __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed->tp_print = 0;
jpayne@69 28960 #endif
jpayne@69 28961 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28962 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 28963 __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 28964 }
jpayne@69 28965 #endif
jpayne@69 28966 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 28967 {
jpayne@69 28968 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@69 28969 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@69 28970 __pyx_wrapperbase_5pysam_9libctabix_19TabixIteratorParsed_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@69 28971 __pyx_wrapperbase_5pysam_9libctabix_19TabixIteratorParsed_2__next__.doc = __pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_2__next__;
jpayne@69 28972 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_19TabixIteratorParsed_2__next__;
jpayne@69 28973 }
jpayne@69 28974 }
jpayne@69 28975 #endif
jpayne@69 28976 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed, __pyx_vtabptr_5pysam_9libctabix_TabixIteratorParsed) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@69 28977 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28978 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@69 28979 #endif
jpayne@69 28980 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TabixIteratorParsed, (PyObject *) __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@69 28981 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28982 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@69 28983 #endif
jpayne@69 28984 __pyx_vtabptr_5pysam_9libctabix_GZIterator = &__pyx_vtable_5pysam_9libctabix_GZIterator;
jpayne@69 28985 __pyx_vtable_5pysam_9libctabix_GZIterator.__pyx___cnext__ = (int (*)(struct __pyx_obj_5pysam_9libctabix_GZIterator *))__pyx_f_5pysam_9libctabix_10GZIterator___cnext__;
jpayne@69 28986 #if CYTHON_USE_TYPE_SPECS
jpayne@69 28987 __pyx_ptype_5pysam_9libctabix_GZIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_GZIterator_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_9libctabix_GZIterator)) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@69 28988 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_GZIterator_spec, __pyx_ptype_5pysam_9libctabix_GZIterator) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@69 28989 #else
jpayne@69 28990 __pyx_ptype_5pysam_9libctabix_GZIterator = &__pyx_type_5pysam_9libctabix_GZIterator;
jpayne@69 28991 #endif
jpayne@69 28992 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 28993 #endif
jpayne@69 28994 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 28995 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_GZIterator) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@69 28996 #endif
jpayne@69 28997 #if PY_MAJOR_VERSION < 3
jpayne@69 28998 __pyx_ptype_5pysam_9libctabix_GZIterator->tp_print = 0;
jpayne@69 28999 #endif
jpayne@69 29000 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29001 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_GZIterator->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_GZIterator->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 29002 __pyx_ptype_5pysam_9libctabix_GZIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 29003 }
jpayne@69 29004 #endif
jpayne@69 29005 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 29006 {
jpayne@69 29007 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_GZIterator, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@69 29008 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@69 29009 __pyx_wrapperbase_5pysam_9libctabix_10GZIterator___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@69 29010 __pyx_wrapperbase_5pysam_9libctabix_10GZIterator___init__.doc = __pyx_doc_5pysam_9libctabix_10GZIterator___init__;
jpayne@69 29011 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_10GZIterator___init__;
jpayne@69 29012 }
jpayne@69 29013 }
jpayne@69 29014 #endif
jpayne@69 29015 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 29016 {
jpayne@69 29017 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_GZIterator, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@69 29018 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@69 29019 __pyx_wrapperbase_5pysam_9libctabix_10GZIterator_6__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@69 29020 __pyx_wrapperbase_5pysam_9libctabix_10GZIterator_6__next__.doc = __pyx_doc_5pysam_9libctabix_10GZIterator_6__next__;
jpayne@69 29021 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_10GZIterator_6__next__;
jpayne@69 29022 }
jpayne@69 29023 }
jpayne@69 29024 #endif
jpayne@69 29025 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_GZIterator, __pyx_vtabptr_5pysam_9libctabix_GZIterator) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@69 29026 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29027 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_GZIterator) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@69 29028 #endif
jpayne@69 29029 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GZIterator, (PyObject *) __pyx_ptype_5pysam_9libctabix_GZIterator) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@69 29030 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29031 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_GZIterator) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@69 29032 #endif
jpayne@69 29033 __pyx_vtabptr_5pysam_9libctabix_GZIteratorHead = &__pyx_vtable_5pysam_9libctabix_GZIteratorHead;
jpayne@69 29034 __pyx_vtable_5pysam_9libctabix_GZIteratorHead.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_GZIterator;
jpayne@69 29035 #if CYTHON_USE_TYPE_SPECS
jpayne@69 29036 __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libctabix_GZIterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@69 29037 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29038 __pyx_ptype_5pysam_9libctabix_GZIteratorHead = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_GZIteratorHead_spec, __pyx_t_2);
jpayne@69 29039 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29040 if (unlikely(!__pyx_ptype_5pysam_9libctabix_GZIteratorHead)) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@69 29041 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_GZIteratorHead_spec, __pyx_ptype_5pysam_9libctabix_GZIteratorHead) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@69 29042 #else
jpayne@69 29043 __pyx_ptype_5pysam_9libctabix_GZIteratorHead = &__pyx_type_5pysam_9libctabix_GZIteratorHead;
jpayne@69 29044 #endif
jpayne@69 29045 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29046 __pyx_ptype_5pysam_9libctabix_GZIteratorHead->tp_base = __pyx_ptype_5pysam_9libctabix_GZIterator;
jpayne@69 29047 #endif
jpayne@69 29048 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 29049 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_GZIteratorHead) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@69 29050 #endif
jpayne@69 29051 #if PY_MAJOR_VERSION < 3
jpayne@69 29052 __pyx_ptype_5pysam_9libctabix_GZIteratorHead->tp_print = 0;
jpayne@69 29053 #endif
jpayne@69 29054 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29055 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_GZIteratorHead->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_GZIteratorHead->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 29056 __pyx_ptype_5pysam_9libctabix_GZIteratorHead->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 29057 }
jpayne@69 29058 #endif
jpayne@69 29059 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 29060 {
jpayne@69 29061 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_GZIteratorHead, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@69 29062 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@69 29063 __pyx_wrapperbase_5pysam_9libctabix_14GZIteratorHead___next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@69 29064 __pyx_wrapperbase_5pysam_9libctabix_14GZIteratorHead___next__.doc = __pyx_doc_5pysam_9libctabix_14GZIteratorHead___next__;
jpayne@69 29065 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_14GZIteratorHead___next__;
jpayne@69 29066 }
jpayne@69 29067 }
jpayne@69 29068 #endif
jpayne@69 29069 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_GZIteratorHead, __pyx_vtabptr_5pysam_9libctabix_GZIteratorHead) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@69 29070 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29071 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_GZIteratorHead) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@69 29072 #endif
jpayne@69 29073 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GZIteratorHead, (PyObject *) __pyx_ptype_5pysam_9libctabix_GZIteratorHead) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@69 29074 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29075 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_GZIteratorHead) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@69 29076 #endif
jpayne@69 29077 __pyx_vtabptr_5pysam_9libctabix_GZIteratorParsed = &__pyx_vtable_5pysam_9libctabix_GZIteratorParsed;
jpayne@69 29078 __pyx_vtable_5pysam_9libctabix_GZIteratorParsed.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_GZIterator;
jpayne@69 29079 #if CYTHON_USE_TYPE_SPECS
jpayne@69 29080 __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libctabix_GZIterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@69 29081 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29082 __pyx_ptype_5pysam_9libctabix_GZIteratorParsed = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_GZIteratorParsed_spec, __pyx_t_2);
jpayne@69 29083 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29084 if (unlikely(!__pyx_ptype_5pysam_9libctabix_GZIteratorParsed)) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@69 29085 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_GZIteratorParsed_spec, __pyx_ptype_5pysam_9libctabix_GZIteratorParsed) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@69 29086 #else
jpayne@69 29087 __pyx_ptype_5pysam_9libctabix_GZIteratorParsed = &__pyx_type_5pysam_9libctabix_GZIteratorParsed;
jpayne@69 29088 #endif
jpayne@69 29089 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29090 __pyx_ptype_5pysam_9libctabix_GZIteratorParsed->tp_base = __pyx_ptype_5pysam_9libctabix_GZIterator;
jpayne@69 29091 #endif
jpayne@69 29092 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 29093 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_GZIteratorParsed) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@69 29094 #endif
jpayne@69 29095 #if PY_MAJOR_VERSION < 3
jpayne@69 29096 __pyx_ptype_5pysam_9libctabix_GZIteratorParsed->tp_print = 0;
jpayne@69 29097 #endif
jpayne@69 29098 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29099 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_GZIteratorParsed->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_GZIteratorParsed->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 29100 __pyx_ptype_5pysam_9libctabix_GZIteratorParsed->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 29101 }
jpayne@69 29102 #endif
jpayne@69 29103 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 29104 {
jpayne@69 29105 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_GZIteratorParsed, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@69 29106 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@69 29107 __pyx_wrapperbase_5pysam_9libctabix_16GZIteratorParsed_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@69 29108 __pyx_wrapperbase_5pysam_9libctabix_16GZIteratorParsed_2__next__.doc = __pyx_doc_5pysam_9libctabix_16GZIteratorParsed_2__next__;
jpayne@69 29109 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_16GZIteratorParsed_2__next__;
jpayne@69 29110 }
jpayne@69 29111 }
jpayne@69 29112 #endif
jpayne@69 29113 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_GZIteratorParsed, __pyx_vtabptr_5pysam_9libctabix_GZIteratorParsed) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@69 29114 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29115 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_GZIteratorParsed) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@69 29116 #endif
jpayne@69 29117 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GZIteratorParsed, (PyObject *) __pyx_ptype_5pysam_9libctabix_GZIteratorParsed) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@69 29118 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29119 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_GZIteratorParsed) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@69 29120 #endif
jpayne@69 29121 __pyx_vtabptr_5pysam_9libctabix_Tabixfile = &__pyx_vtable_5pysam_9libctabix_Tabixfile;
jpayne@69 29122 __pyx_vtable_5pysam_9libctabix_Tabixfile.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_TabixFile;
jpayne@69 29123 #if CYTHON_USE_TYPE_SPECS
jpayne@69 29124 __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libctabix_TabixFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@69 29125 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29126 __pyx_ptype_5pysam_9libctabix_Tabixfile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_Tabixfile_spec, __pyx_t_2);
jpayne@69 29127 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29128 if (unlikely(!__pyx_ptype_5pysam_9libctabix_Tabixfile)) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@69 29129 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libctabix_Tabixfile_spec, __pyx_ptype_5pysam_9libctabix_Tabixfile) < 0) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@69 29130 #else
jpayne@69 29131 __pyx_ptype_5pysam_9libctabix_Tabixfile = &__pyx_type_5pysam_9libctabix_Tabixfile;
jpayne@69 29132 #endif
jpayne@69 29133 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29134 __pyx_ptype_5pysam_9libctabix_Tabixfile->tp_base = __pyx_ptype_5pysam_9libctabix_TabixFile;
jpayne@69 29135 #endif
jpayne@69 29136 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 29137 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_Tabixfile) < 0) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@69 29138 #endif
jpayne@69 29139 #if PY_MAJOR_VERSION < 3
jpayne@69 29140 __pyx_ptype_5pysam_9libctabix_Tabixfile->tp_print = 0;
jpayne@69 29141 #endif
jpayne@69 29142 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29143 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libctabix_Tabixfile->tp_dictoffset && __pyx_ptype_5pysam_9libctabix_Tabixfile->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 29144 __pyx_ptype_5pysam_9libctabix_Tabixfile->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 29145 }
jpayne@69 29146 #endif
jpayne@69 29147 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_Tabixfile, __pyx_vtabptr_5pysam_9libctabix_Tabixfile) < 0) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@69 29148 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29149 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_Tabixfile) < 0) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@69 29150 #endif
jpayne@69 29151 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Tabixfile, (PyObject *) __pyx_ptype_5pysam_9libctabix_Tabixfile) < 0) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@69 29152 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29153 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_Tabixfile) < 0) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@69 29154 #endif
jpayne@69 29155 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 29156 __Pyx_RefNannyFinishContext();
jpayne@69 29157 return 0;
jpayne@69 29158 __pyx_L1_error:;
jpayne@69 29159 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 29160 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 29161 __Pyx_RefNannyFinishContext();
jpayne@69 29162 return -1;
jpayne@69 29163 }
jpayne@69 29164
jpayne@69 29165 static int __Pyx_modinit_type_import_code(void) {
jpayne@69 29166 __Pyx_RefNannyDeclarations
jpayne@69 29167 PyObject *__pyx_t_1 = NULL;
jpayne@69 29168 int __pyx_lineno = 0;
jpayne@69 29169 const char *__pyx_filename = NULL;
jpayne@69 29170 int __pyx_clineno = 0;
jpayne@69 29171 __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
jpayne@69 29172 /*--- Type import code ---*/
jpayne@69 29173 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9, __pyx_L1_error)
jpayne@69 29174 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 29175 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
jpayne@69 29176 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
jpayne@69 29177 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
jpayne@69 29178 #elif CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29179 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
jpayne@69 29180 #else
jpayne@69 29181 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject),
jpayne@69 29182 #endif
jpayne@69 29183 __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(5, 9, __pyx_L1_error)
jpayne@69 29184 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 29185 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 8, __pyx_L1_error)
jpayne@69 29186 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 29187 __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(6, 8, __pyx_L1_error)
jpayne@69 29188 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 29189 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 15, __pyx_L1_error)
jpayne@69 29190 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 29191 __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(7, 15, __pyx_L1_error)
jpayne@69 29192 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 29193 __pyx_t_1 = PyImport_ImportModule("pysam.libctabixproxies"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 5, __pyx_L1_error)
jpayne@69 29194 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 29195 __pyx_ptype_5pysam_16libctabixproxies_TupleProxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "TupleProxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_TupleProxy) __PYX_ERR(8, 5, __pyx_L1_error)
jpayne@69 29196 __pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy)) __PYX_ERR(8, 5, __pyx_L1_error)
jpayne@69 29197 __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "TupleProxyIterator", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator) __PYX_ERR(8, 27, __pyx_L1_error)
jpayne@69 29198 __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "NamedTupleProxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy) __PYX_ERR(8, 32, __pyx_L1_error)
jpayne@69 29199 __pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy)) __PYX_ERR(8, 32, __pyx_L1_error)
jpayne@69 29200 __pyx_ptype_5pysam_16libctabixproxies_GTFProxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "GTFProxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_GTFProxy) __PYX_ERR(8, 36, __pyx_L1_error)
jpayne@69 29201 __pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy)) __PYX_ERR(8, 36, __pyx_L1_error)
jpayne@69 29202 __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "GFF3Proxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy) __PYX_ERR(8, 42, __pyx_L1_error)
jpayne@69 29203 __pyx_vtabptr_5pysam_16libctabixproxies_GFF3Proxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_GFF3Proxy)) __PYX_ERR(8, 42, __pyx_L1_error)
jpayne@69 29204 __pyx_ptype_5pysam_16libctabixproxies_BedProxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "BedProxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_BedProxy) __PYX_ERR(8, 46, __pyx_L1_error)
jpayne@69 29205 __pyx_vtabptr_5pysam_16libctabixproxies_BedProxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_BedProxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_BedProxy)) __PYX_ERR(8, 46, __pyx_L1_error)
jpayne@69 29206 __pyx_ptype_5pysam_16libctabixproxies_VCFProxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "VCFProxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_VCFProxy) __PYX_ERR(8, 58, __pyx_L1_error)
jpayne@69 29207 __pyx_vtabptr_5pysam_16libctabixproxies_VCFProxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_VCFProxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_VCFProxy)) __PYX_ERR(8, 58, __pyx_L1_error)
jpayne@69 29208 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 29209 __pyx_t_1 = PyImport_ImportModule("array"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 69, __pyx_L1_error)
jpayne@69 29210 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 29211 __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)
jpayne@69 29212 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 29213 __Pyx_RefNannyFinishContext();
jpayne@69 29214 return 0;
jpayne@69 29215 __pyx_L1_error:;
jpayne@69 29216 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 29217 __Pyx_RefNannyFinishContext();
jpayne@69 29218 return -1;
jpayne@69 29219 }
jpayne@69 29220
jpayne@69 29221 static int __Pyx_modinit_variable_import_code(void) {
jpayne@69 29222 __Pyx_RefNannyDeclarations
jpayne@69 29223 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
jpayne@69 29224 /*--- Variable import code ---*/
jpayne@69 29225 __Pyx_RefNannyFinishContext();
jpayne@69 29226 return 0;
jpayne@69 29227 }
jpayne@69 29228
jpayne@69 29229 static int __Pyx_modinit_function_import_code(void) {
jpayne@69 29230 __Pyx_RefNannyDeclarations
jpayne@69 29231 PyObject *__pyx_t_1 = NULL;
jpayne@69 29232 int __pyx_lineno = 0;
jpayne@69 29233 const char *__pyx_filename = NULL;
jpayne@69 29234 int __pyx_clineno = 0;
jpayne@69 29235 __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
jpayne@69 29236 /*--- Function import code ---*/
jpayne@69 29237 __pyx_t_1 = PyImport_ImportModule("pysam.libcutils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29238 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 29239 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)
jpayne@69 29240 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)
jpayne@69 29241 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)
jpayne@69 29242 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)
jpayne@69 29243 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)
jpayne@69 29244 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 29245 __Pyx_RefNannyFinishContext();
jpayne@69 29246 return 0;
jpayne@69 29247 __pyx_L1_error:;
jpayne@69 29248 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 29249 __Pyx_RefNannyFinishContext();
jpayne@69 29250 return -1;
jpayne@69 29251 }
jpayne@69 29252
jpayne@69 29253
jpayne@69 29254 #if PY_MAJOR_VERSION >= 3
jpayne@69 29255 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 29256 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
jpayne@69 29257 static int __pyx_pymod_exec_libctabix(PyObject* module); /*proto*/
jpayne@69 29258 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
jpayne@69 29259 {Py_mod_create, (void*)__pyx_pymod_create},
jpayne@69 29260 {Py_mod_exec, (void*)__pyx_pymod_exec_libctabix},
jpayne@69 29261 {0, NULL}
jpayne@69 29262 };
jpayne@69 29263 #endif
jpayne@69 29264
jpayne@69 29265 #ifdef __cplusplus
jpayne@69 29266 namespace {
jpayne@69 29267 struct PyModuleDef __pyx_moduledef =
jpayne@69 29268 #else
jpayne@69 29269 static struct PyModuleDef __pyx_moduledef =
jpayne@69 29270 #endif
jpayne@69 29271 {
jpayne@69 29272 PyModuleDef_HEAD_INIT,
jpayne@69 29273 "libctabix",
jpayne@69 29274 0, /* m_doc */
jpayne@69 29275 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 29276 0, /* m_size */
jpayne@69 29277 #elif CYTHON_USE_MODULE_STATE
jpayne@69 29278 sizeof(__pyx_mstate), /* m_size */
jpayne@69 29279 #else
jpayne@69 29280 -1, /* m_size */
jpayne@69 29281 #endif
jpayne@69 29282 __pyx_methods /* m_methods */,
jpayne@69 29283 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 29284 __pyx_moduledef_slots, /* m_slots */
jpayne@69 29285 #else
jpayne@69 29286 NULL, /* m_reload */
jpayne@69 29287 #endif
jpayne@69 29288 #if CYTHON_USE_MODULE_STATE
jpayne@69 29289 __pyx_m_traverse, /* m_traverse */
jpayne@69 29290 __pyx_m_clear, /* m_clear */
jpayne@69 29291 NULL /* m_free */
jpayne@69 29292 #else
jpayne@69 29293 NULL, /* m_traverse */
jpayne@69 29294 NULL, /* m_clear */
jpayne@69 29295 NULL /* m_free */
jpayne@69 29296 #endif
jpayne@69 29297 };
jpayne@69 29298 #ifdef __cplusplus
jpayne@69 29299 } /* anonymous namespace */
jpayne@69 29300 #endif
jpayne@69 29301 #endif
jpayne@69 29302
jpayne@69 29303 #ifndef CYTHON_NO_PYINIT_EXPORT
jpayne@69 29304 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
jpayne@69 29305 #elif PY_MAJOR_VERSION < 3
jpayne@69 29306 #ifdef __cplusplus
jpayne@69 29307 #define __Pyx_PyMODINIT_FUNC extern "C" void
jpayne@69 29308 #else
jpayne@69 29309 #define __Pyx_PyMODINIT_FUNC void
jpayne@69 29310 #endif
jpayne@69 29311 #else
jpayne@69 29312 #ifdef __cplusplus
jpayne@69 29313 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
jpayne@69 29314 #else
jpayne@69 29315 #define __Pyx_PyMODINIT_FUNC PyObject *
jpayne@69 29316 #endif
jpayne@69 29317 #endif
jpayne@69 29318
jpayne@69 29319
jpayne@69 29320 #if PY_MAJOR_VERSION < 3
jpayne@69 29321 __Pyx_PyMODINIT_FUNC initlibctabix(void) CYTHON_SMALL_CODE; /*proto*/
jpayne@69 29322 __Pyx_PyMODINIT_FUNC initlibctabix(void)
jpayne@69 29323 #else
jpayne@69 29324 __Pyx_PyMODINIT_FUNC PyInit_libctabix(void) CYTHON_SMALL_CODE; /*proto*/
jpayne@69 29325 __Pyx_PyMODINIT_FUNC PyInit_libctabix(void)
jpayne@69 29326 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 29327 {
jpayne@69 29328 return PyModuleDef_Init(&__pyx_moduledef);
jpayne@69 29329 }
jpayne@69 29330 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
jpayne@69 29331 #if PY_VERSION_HEX >= 0x030700A1
jpayne@69 29332 static PY_INT64_T main_interpreter_id = -1;
jpayne@69 29333 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
jpayne@69 29334 if (main_interpreter_id == -1) {
jpayne@69 29335 main_interpreter_id = current_id;
jpayne@69 29336 return (unlikely(current_id == -1)) ? -1 : 0;
jpayne@69 29337 } else if (unlikely(main_interpreter_id != current_id))
jpayne@69 29338 #else
jpayne@69 29339 static PyInterpreterState *main_interpreter = NULL;
jpayne@69 29340 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
jpayne@69 29341 if (!main_interpreter) {
jpayne@69 29342 main_interpreter = current_interpreter;
jpayne@69 29343 } else if (unlikely(main_interpreter != current_interpreter))
jpayne@69 29344 #endif
jpayne@69 29345 {
jpayne@69 29346 PyErr_SetString(
jpayne@69 29347 PyExc_ImportError,
jpayne@69 29348 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
jpayne@69 29349 return -1;
jpayne@69 29350 }
jpayne@69 29351 return 0;
jpayne@69 29352 }
jpayne@69 29353 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29354 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)
jpayne@69 29355 #else
jpayne@69 29356 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)
jpayne@69 29357 #endif
jpayne@69 29358 {
jpayne@69 29359 PyObject *value = PyObject_GetAttrString(spec, from_name);
jpayne@69 29360 int result = 0;
jpayne@69 29361 if (likely(value)) {
jpayne@69 29362 if (allow_none || value != Py_None) {
jpayne@69 29363 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29364 result = PyModule_AddObject(module, to_name, value);
jpayne@69 29365 #else
jpayne@69 29366 result = PyDict_SetItemString(moddict, to_name, value);
jpayne@69 29367 #endif
jpayne@69 29368 }
jpayne@69 29369 Py_DECREF(value);
jpayne@69 29370 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
jpayne@69 29371 PyErr_Clear();
jpayne@69 29372 } else {
jpayne@69 29373 result = -1;
jpayne@69 29374 }
jpayne@69 29375 return result;
jpayne@69 29376 }
jpayne@69 29377 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
jpayne@69 29378 PyObject *module = NULL, *moddict, *modname;
jpayne@69 29379 CYTHON_UNUSED_VAR(def);
jpayne@69 29380 if (__Pyx_check_single_interpreter())
jpayne@69 29381 return NULL;
jpayne@69 29382 if (__pyx_m)
jpayne@69 29383 return __Pyx_NewRef(__pyx_m);
jpayne@69 29384 modname = PyObject_GetAttrString(spec, "name");
jpayne@69 29385 if (unlikely(!modname)) goto bad;
jpayne@69 29386 module = PyModule_NewObject(modname);
jpayne@69 29387 Py_DECREF(modname);
jpayne@69 29388 if (unlikely(!module)) goto bad;
jpayne@69 29389 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 29390 moddict = module;
jpayne@69 29391 #else
jpayne@69 29392 moddict = PyModule_GetDict(module);
jpayne@69 29393 if (unlikely(!moddict)) goto bad;
jpayne@69 29394 #endif
jpayne@69 29395 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
jpayne@69 29396 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
jpayne@69 29397 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
jpayne@69 29398 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
jpayne@69 29399 return module;
jpayne@69 29400 bad:
jpayne@69 29401 Py_XDECREF(module);
jpayne@69 29402 return NULL;
jpayne@69 29403 }
jpayne@69 29404
jpayne@69 29405
jpayne@69 29406 static CYTHON_SMALL_CODE int __pyx_pymod_exec_libctabix(PyObject *__pyx_pyinit_module)
jpayne@69 29407 #endif
jpayne@69 29408 #endif
jpayne@69 29409 {
jpayne@69 29410 int stringtab_initialized = 0;
jpayne@69 29411 #if CYTHON_USE_MODULE_STATE
jpayne@69 29412 int pystate_addmodule_run = 0;
jpayne@69 29413 #endif
jpayne@69 29414 __Pyx_TraceDeclarations
jpayne@69 29415 PyObject *__pyx_t_1 = NULL;
jpayne@69 29416 PyObject *__pyx_t_2 = NULL;
jpayne@69 29417 PyObject *__pyx_t_3 = NULL;
jpayne@69 29418 PyObject *__pyx_t_4 = NULL;
jpayne@69 29419 int __pyx_lineno = 0;
jpayne@69 29420 const char *__pyx_filename = NULL;
jpayne@69 29421 int __pyx_clineno = 0;
jpayne@69 29422 __Pyx_RefNannyDeclarations
jpayne@69 29423 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 29424 if (__pyx_m) {
jpayne@69 29425 if (__pyx_m == __pyx_pyinit_module) return 0;
jpayne@69 29426 PyErr_SetString(PyExc_RuntimeError, "Module 'libctabix' has already been imported. Re-initialisation is not supported.");
jpayne@69 29427 return -1;
jpayne@69 29428 }
jpayne@69 29429 #elif PY_MAJOR_VERSION >= 3
jpayne@69 29430 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
jpayne@69 29431 #endif
jpayne@69 29432 /*--- Module creation code ---*/
jpayne@69 29433 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 29434 __pyx_m = __pyx_pyinit_module;
jpayne@69 29435 Py_INCREF(__pyx_m);
jpayne@69 29436 #else
jpayne@69 29437 #if PY_MAJOR_VERSION < 3
jpayne@69 29438 __pyx_m = Py_InitModule4("libctabix", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
jpayne@69 29439 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29440 #elif CYTHON_USE_MODULE_STATE
jpayne@69 29441 __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29442 {
jpayne@69 29443 int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
jpayne@69 29444 __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "libctabix" pseudovariable */
jpayne@69 29445 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29446 pystate_addmodule_run = 1;
jpayne@69 29447 }
jpayne@69 29448 #else
jpayne@69 29449 __pyx_m = PyModule_Create(&__pyx_moduledef);
jpayne@69 29450 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29451 #endif
jpayne@69 29452 #endif
jpayne@69 29453 CYTHON_UNUSED_VAR(__pyx_t_1);
jpayne@69 29454 __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29455 Py_INCREF(__pyx_d);
jpayne@69 29456 __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29457 __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29458 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29459 #if CYTHON_REFNANNY
jpayne@69 29460 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
jpayne@69 29461 if (!__Pyx_RefNanny) {
jpayne@69 29462 PyErr_Clear();
jpayne@69 29463 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
jpayne@69 29464 if (!__Pyx_RefNanny)
jpayne@69 29465 Py_FatalError("failed to import 'refnanny' module");
jpayne@69 29466 }
jpayne@69 29467 #endif
jpayne@69 29468 __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_libctabix(void)", 0);
jpayne@69 29469 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)
jpayne@69 29470 #ifdef __Pxy_PyFrame_Initialize_Offsets
jpayne@69 29471 __Pxy_PyFrame_Initialize_Offsets();
jpayne@69 29472 #endif
jpayne@69 29473 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29474 __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29475 __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29476 #ifdef __Pyx_CyFunction_USED
jpayne@69 29477 if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29478 #endif
jpayne@69 29479 #ifdef __Pyx_FusedFunction_USED
jpayne@69 29480 if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29481 #endif
jpayne@69 29482 #ifdef __Pyx_Coroutine_USED
jpayne@69 29483 if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29484 #endif
jpayne@69 29485 #ifdef __Pyx_Generator_USED
jpayne@69 29486 if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29487 #endif
jpayne@69 29488 #ifdef __Pyx_AsyncGen_USED
jpayne@69 29489 if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29490 #endif
jpayne@69 29491 #ifdef __Pyx_StopAsyncIteration_USED
jpayne@69 29492 if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29493 #endif
jpayne@69 29494 /*--- Library function declarations ---*/
jpayne@69 29495 /*--- Threads initialization code ---*/
jpayne@69 29496 #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
jpayne@69 29497 PyEval_InitThreads();
jpayne@69 29498 #endif
jpayne@69 29499 /*--- Initialize various global constants etc. ---*/
jpayne@69 29500 if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29501 stringtab_initialized = 1;
jpayne@69 29502 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29503 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
jpayne@69 29504 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29505 #endif
jpayne@69 29506 if (__pyx_module_is_main_pysam__libctabix) {
jpayne@69 29507 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29508 }
jpayne@69 29509 #if PY_MAJOR_VERSION >= 3
jpayne@69 29510 {
jpayne@69 29511 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29512 if (!PyDict_GetItemString(modules, "pysam.libctabix")) {
jpayne@69 29513 if (unlikely((PyDict_SetItemString(modules, "pysam.libctabix", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29514 }
jpayne@69 29515 }
jpayne@69 29516 #endif
jpayne@69 29517 /*--- Builtin init code ---*/
jpayne@69 29518 if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29519 /*--- Constants init code ---*/
jpayne@69 29520 if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29521 /*--- Global type/function init code ---*/
jpayne@69 29522 (void)__Pyx_modinit_global_init_code();
jpayne@69 29523 (void)__Pyx_modinit_variable_export_code();
jpayne@69 29524 (void)__Pyx_modinit_function_export_code();
jpayne@69 29525 if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29526 if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29527 (void)__Pyx_modinit_variable_import_code();
jpayne@69 29528 if (unlikely((__Pyx_modinit_function_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29529 /*--- Execution code ---*/
jpayne@69 29530 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
jpayne@69 29531 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 29532 #endif
jpayne@69 29533 __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_libctabix(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));
jpayne@69 29534
jpayne@69 29535 /* "pysam/libctabix.pyx":57
jpayne@69 29536 * #
jpayne@69 29537 * ###############################################################################
jpayne@69 29538 * import os # <<<<<<<<<<<<<<
jpayne@69 29539 * import sys
jpayne@69 29540 *
jpayne@69 29541 */
jpayne@69 29542 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
jpayne@69 29543 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29544 if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
jpayne@69 29545 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29546
jpayne@69 29547 /* "pysam/libctabix.pyx":58
jpayne@69 29548 * ###############################################################################
jpayne@69 29549 * import os
jpayne@69 29550 * import sys # <<<<<<<<<<<<<<
jpayne@69 29551 *
jpayne@69 29552 * from libc.stdio cimport printf, fprintf, stderr
jpayne@69 29553 */
jpayne@69 29554 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
jpayne@69 29555 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29556 if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
jpayne@69 29557 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29558
jpayne@69 29559 /* "pysam/libctabix.pyx":87
jpayne@69 29560 * self.encoding = encoding
jpayne@69 29561 *
jpayne@69 29562 * def set_encoding(self, encoding): # <<<<<<<<<<<<<<
jpayne@69 29563 * self.encoding = encoding
jpayne@69 29564 *
jpayne@69 29565 */
jpayne@69 29566 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_6Parser_3set_encoding, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_set_encoding, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
jpayne@69 29567 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29568 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_Parser, __pyx_n_s_set_encoding, __pyx_t_2) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
jpayne@69 29569 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29570 PyType_Modified(__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@69 29571
jpayne@69 29572 /* "pysam/libctabix.pyx":90
jpayne@69 29573 * self.encoding = encoding
jpayne@69 29574 *
jpayne@69 29575 * def get_encoding(self): # <<<<<<<<<<<<<<
jpayne@69 29576 * return self.encoding
jpayne@69 29577 *
jpayne@69 29578 */
jpayne@69 29579 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_6Parser_5get_encoding, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_get_encoding, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
jpayne@69 29580 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29581 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_Parser, __pyx_n_s_get_encoding, __pyx_t_2) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
jpayne@69 29582 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29583 PyType_Modified(__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@69 29584
jpayne@69 29585 /* "(tree fragment)":1
jpayne@69 29586 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29587 * cdef tuple state
jpayne@69 29588 * cdef object _dict
jpayne@69 29589 */
jpayne@69 29590 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_6Parser_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29591 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29592 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_Parser, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29593 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29594 PyType_Modified(__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@69 29595
jpayne@69 29596 /* "(tree fragment)":16
jpayne@69 29597 * else:
jpayne@69 29598 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@69 29599 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29600 * __pyx_unpickle_Parser__set_state(self, __pyx_state)
jpayne@69 29601 */
jpayne@69 29602 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_6Parser_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser___setstate_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29603 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29604 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_Parser, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29605 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29606 PyType_Modified(__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@69 29607
jpayne@69 29608 /* "(tree fragment)":1
jpayne@69 29609 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29610 * cdef tuple state
jpayne@69 29611 * cdef object _dict
jpayne@69 29612 */
jpayne@69 29613 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_7asTuple_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asTuple___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29614 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29615 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_asTuple, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29616 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29617 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asTuple);
jpayne@69 29618
jpayne@69 29619 /* "(tree fragment)":16
jpayne@69 29620 * else:
jpayne@69 29621 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@69 29622 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29623 * __pyx_unpickle_asTuple__set_state(self, __pyx_state)
jpayne@69 29624 */
jpayne@69 29625 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_7asTuple_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asTuple___setstate_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29626 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29627 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_asTuple, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29628 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29629 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asTuple);
jpayne@69 29630
jpayne@69 29631 /* "(tree fragment)":1
jpayne@69 29632 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29633 * cdef tuple state
jpayne@69 29634 * cdef object _dict
jpayne@69 29635 */
jpayne@69 29636 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_6asGFF3_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asGFF3___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29637 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29638 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_asGFF3, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29639 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29640 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asGFF3);
jpayne@69 29641
jpayne@69 29642 /* "(tree fragment)":16
jpayne@69 29643 * else:
jpayne@69 29644 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@69 29645 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29646 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state)
jpayne@69 29647 */
jpayne@69 29648 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_6asGFF3_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asGFF3___setstate_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29649 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29650 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_asGFF3, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29651 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29652 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asGFF3);
jpayne@69 29653
jpayne@69 29654 /* "(tree fragment)":1
jpayne@69 29655 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29656 * cdef tuple state
jpayne@69 29657 * cdef object _dict
jpayne@69 29658 */
jpayne@69 29659 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_5asGTF_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asGTF___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29660 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29661 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_asGTF, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29662 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29663 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asGTF);
jpayne@69 29664
jpayne@69 29665 /* "(tree fragment)":16
jpayne@69 29666 * else:
jpayne@69 29667 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@69 29668 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29669 * __pyx_unpickle_asGTF__set_state(self, __pyx_state)
jpayne@69 29670 */
jpayne@69 29671 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_5asGTF_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asGTF___setstate_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29672 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29673 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_asGTF, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29674 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29675 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asGTF);
jpayne@69 29676
jpayne@69 29677 /* "(tree fragment)":1
jpayne@69 29678 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29679 * cdef tuple state
jpayne@69 29680 * cdef object _dict
jpayne@69 29681 */
jpayne@69 29682 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_5asBed_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asBed___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29683 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29684 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_asBed, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29685 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29686 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asBed);
jpayne@69 29687
jpayne@69 29688 /* "(tree fragment)":16
jpayne@69 29689 * else:
jpayne@69 29690 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@69 29691 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29692 * __pyx_unpickle_asBed__set_state(self, __pyx_state)
jpayne@69 29693 */
jpayne@69 29694 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_5asBed_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asBed___setstate_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29695 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29696 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_asBed, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29697 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29698 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asBed);
jpayne@69 29699
jpayne@69 29700 /* "(tree fragment)":1
jpayne@69 29701 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29702 * cdef tuple state
jpayne@69 29703 * cdef object _dict
jpayne@69 29704 */
jpayne@69 29705 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_5asVCF_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asVCF___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29706 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29707 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_asVCF, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29708 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29709 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asVCF);
jpayne@69 29710
jpayne@69 29711 /* "(tree fragment)":16
jpayne@69 29712 * else:
jpayne@69 29713 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@69 29714 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29715 * __pyx_unpickle_asVCF__set_state(self, __pyx_state)
jpayne@69 29716 */
jpayne@69 29717 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_5asVCF_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asVCF___setstate_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29718 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29719 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_asVCF, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 29720 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29721 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asVCF);
jpayne@69 29722
jpayne@69 29723 /* "pysam/libctabix.pyx":352
jpayne@69 29724 * self.encoding = encoding
jpayne@69 29725 *
jpayne@69 29726 * def _open( self, # <<<<<<<<<<<<<<
jpayne@69 29727 * filename,
jpayne@69 29728 * mode='r',
jpayne@69 29729 */
jpayne@69 29730 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_9TabixFile_3_open, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixFile__open, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error)
jpayne@69 29731 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29732 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__68);
jpayne@69 29733 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixFile, __pyx_n_s_open, __pyx_t_2) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
jpayne@69 29734 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29735 PyType_Modified(__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@69 29736
jpayne@69 29737 /* "pysam/libctabix.pyx":404
jpayne@69 29738 * self.start_offset = self.tell()
jpayne@69 29739 *
jpayne@69 29740 * def _dup(self): # <<<<<<<<<<<<<<
jpayne@69 29741 * '''return a copy of this tabix file.
jpayne@69 29742 *
jpayne@69 29743 */
jpayne@69 29744 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_9TabixFile_5_dup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixFile__dup, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 29745 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29746 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixFile, __pyx_n_s_dup, __pyx_t_2) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 29747 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29748 PyType_Modified(__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@69 29749
jpayne@69 29750 /* "pysam/libctabix.pyx":416
jpayne@69 29751 * encoding=self.encoding)
jpayne@69 29752 *
jpayne@69 29753 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@69 29754 * reference=None,
jpayne@69 29755 * start=None,
jpayne@69 29756 */
jpayne@69 29757 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_9TabixFile_7fetch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixFile_fetch, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
jpayne@69 29758 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29759 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__70);
jpayne@69 29760 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixFile, __pyx_n_s_fetch, __pyx_t_2) < 0) __PYX_ERR(0, 416, __pyx_L1_error)
jpayne@69 29761 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29762 PyType_Modified(__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@69 29763
jpayne@69 29764 /* "pysam/libctabix.pyx":598
jpayne@69 29765 * return result
jpayne@69 29766 *
jpayne@69 29767 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 29768 * '''
jpayne@69 29769 * closes the :class:`pysam.TabixFile`.'''
jpayne@69 29770 */
jpayne@69 29771 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_9TabixFile_9close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixFile_close, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
jpayne@69 29772 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29773 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixFile, __pyx_n_s_close, __pyx_t_2) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
jpayne@69 29774 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29775 PyType_Modified(__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@69 29776
jpayne@69 29777 /* "(tree fragment)":1
jpayne@69 29778 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29779 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 29780 * def __setstate_cython__(self, __pyx_state):
jpayne@69 29781 */
jpayne@69 29782 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_9TabixFile_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixFile___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29783 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29784 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29785 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29786
jpayne@69 29787 /* "(tree fragment)":3
jpayne@69 29788 * def __reduce_cython__(self):
jpayne@69 29789 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 29790 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29791 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 29792 */
jpayne@69 29793 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_9TabixFile_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixFile___setstate_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29794 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29795 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29796 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29797
jpayne@69 29798 /* "(tree fragment)":1
jpayne@69 29799 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29800 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 29801 * def __setstate_cython__(self, __pyx_state):
jpayne@69 29802 */
jpayne@69 29803 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_13TabixIterator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixIterator___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29804 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29805 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29806 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29807
jpayne@69 29808 /* "(tree fragment)":3
jpayne@69 29809 * def __reduce_cython__(self):
jpayne@69 29810 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 29811 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29812 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 29813 */
jpayne@69 29814 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_13TabixIterator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixIterator___setstate_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29815 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29816 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29817 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29818
jpayne@69 29819 /* "pysam/libctabix.pyx":682
jpayne@69 29820 *
jpayne@69 29821 *
jpayne@69 29822 * class EmptyIterator: # <<<<<<<<<<<<<<
jpayne@69 29823 * '''empty iterator'''
jpayne@69 29824 *
jpayne@69 29825 */
jpayne@69 29826 __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EmptyIterator, __pyx_n_s_EmptyIterator, (PyObject *) NULL, __pyx_n_s_pysam_libctabix, __pyx_kp_s_empty_iterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 682, __pyx_L1_error)
jpayne@69 29827 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29828
jpayne@69 29829 /* "pysam/libctabix.pyx":685
jpayne@69 29830 * '''empty iterator'''
jpayne@69 29831 *
jpayne@69 29832 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 29833 * return self
jpayne@69 29834 *
jpayne@69 29835 */
jpayne@69 29836 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_13EmptyIterator_1__iter__, 0, __pyx_n_s_EmptyIterator___iter, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 685, __pyx_L1_error)
jpayne@69 29837 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 29838 if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_iter, __pyx_t_3) < 0) __PYX_ERR(0, 685, __pyx_L1_error)
jpayne@69 29839 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 29840
jpayne@69 29841 /* "pysam/libctabix.pyx":688
jpayne@69 29842 * return self
jpayne@69 29843 *
jpayne@69 29844 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 29845 * raise StopIteration()
jpayne@69 29846 *
jpayne@69 29847 */
jpayne@69 29848 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_13EmptyIterator_3__next__, 0, __pyx_n_s_EmptyIterator___next, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 688, __pyx_L1_error)
jpayne@69 29849 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 29850 if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_next, __pyx_t_3) < 0) __PYX_ERR(0, 688, __pyx_L1_error)
jpayne@69 29851 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 29852
jpayne@69 29853 /* "pysam/libctabix.pyx":682
jpayne@69 29854 *
jpayne@69 29855 *
jpayne@69 29856 * class EmptyIterator: # <<<<<<<<<<<<<<
jpayne@69 29857 * '''empty iterator'''
jpayne@69 29858 *
jpayne@69 29859 */
jpayne@69 29860 __pyx_t_3 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_EmptyIterator, __pyx_empty_tuple, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 682, __pyx_L1_error)
jpayne@69 29861 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 29862 if (PyDict_SetItem(__pyx_d, __pyx_n_s_EmptyIterator, __pyx_t_3) < 0) __PYX_ERR(0, 682, __pyx_L1_error)
jpayne@69 29863 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 29864 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29865
jpayne@69 29866 /* "(tree fragment)":1
jpayne@69 29867 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29868 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 29869 * def __setstate_cython__(self, __pyx_state):
jpayne@69 29870 */
jpayne@69 29871 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_19TabixIteratorParsed_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixIteratorParsed___reduce_cyt, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29872 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29873 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29874 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29875
jpayne@69 29876 /* "(tree fragment)":3
jpayne@69 29877 * def __reduce_cython__(self):
jpayne@69 29878 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 29879 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29880 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@69 29881 */
jpayne@69 29882 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_19TabixIteratorParsed_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixIteratorParsed___setstate_c, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29883 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29884 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29885 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29886
jpayne@69 29887 /* "(tree fragment)":1
jpayne@69 29888 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29889 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 29890 * def __setstate_cython__(self, __pyx_state):
jpayne@69 29891 */
jpayne@69 29892 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_10GZIterator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GZIterator___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29893 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29894 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29895 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29896
jpayne@69 29897 /* "(tree fragment)":3
jpayne@69 29898 * def __reduce_cython__(self):
jpayne@69 29899 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 29900 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29901 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 29902 */
jpayne@69 29903 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_10GZIterator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GZIterator___setstate_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29904 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29905 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29906 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29907
jpayne@69 29908 /* "(tree fragment)":1
jpayne@69 29909 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29910 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 29911 * def __setstate_cython__(self, __pyx_state):
jpayne@69 29912 */
jpayne@69 29913 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_14GZIteratorHead_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GZIteratorHead___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29914 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29915 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29916 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29917
jpayne@69 29918 /* "(tree fragment)":3
jpayne@69 29919 * def __reduce_cython__(self):
jpayne@69 29920 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 29921 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29922 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 29923 */
jpayne@69 29924 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_14GZIteratorHead_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GZIteratorHead___setstate_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29925 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29926 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29927 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29928
jpayne@69 29929 /* "(tree fragment)":1
jpayne@69 29930 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 29931 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 29932 * def __setstate_cython__(self, __pyx_state):
jpayne@69 29933 */
jpayne@69 29934 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_16GZIteratorParsed_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GZIteratorParsed___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29935 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29936 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 29937 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29938
jpayne@69 29939 /* "(tree fragment)":3
jpayne@69 29940 * def __reduce_cython__(self):
jpayne@69 29941 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 29942 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 29943 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@69 29944 */
jpayne@69 29945 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_16GZIteratorParsed_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GZIteratorParsed___setstate_cyth, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29946 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29947 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 29948 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29949
jpayne@69 29950 /* "pysam/libctabix.pyx":811
jpayne@69 29951 *
jpayne@69 29952 *
jpayne@69 29953 * def tabix_compress(filename_in, # <<<<<<<<<<<<<<
jpayne@69 29954 * filename_out,
jpayne@69 29955 * force=False):
jpayne@69 29956 */
jpayne@69 29957 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_1tabix_compress, 0, __pyx_n_s_tabix_compress, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 811, __pyx_L1_error)
jpayne@69 29958 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29959 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__72);
jpayne@69 29960 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_compress, __pyx_t_2) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
jpayne@69 29961 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 29962
jpayne@69 29963 /* "pysam/libctabix.pyx":880
jpayne@69 29964 * preset=None,
jpayne@69 29965 * meta_char="#",
jpayne@69 29966 * int line_skip=0, # <<<<<<<<<<<<<<
jpayne@69 29967 * zerobased=False,
jpayne@69 29968 * int min_shift=-1,
jpayne@69 29969 */
jpayne@69 29970 __pyx_t_2 = __Pyx_PyInt_From_int(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 880, __pyx_L1_error)
jpayne@69 29971 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 29972
jpayne@69 29973 /* "pysam/libctabix.pyx":882
jpayne@69 29974 * int line_skip=0,
jpayne@69 29975 * zerobased=False,
jpayne@69 29976 * int min_shift=-1, # <<<<<<<<<<<<<<
jpayne@69 29977 * index=None,
jpayne@69 29978 * keep_original=False,
jpayne@69 29979 */
jpayne@69 29980 __pyx_t_3 = __Pyx_PyInt_From_int(((int)-1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L1_error)
jpayne@69 29981 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 29982
jpayne@69 29983 /* "pysam/libctabix.pyx":873
jpayne@69 29984 *
jpayne@69 29985 *
jpayne@69 29986 * def tabix_index(filename, # <<<<<<<<<<<<<<
jpayne@69 29987 * force=False,
jpayne@69 29988 * seq_col=None,
jpayne@69 29989 */
jpayne@69 29990 __pyx_t_4 = PyTuple_New(12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 873, __pyx_L1_error)
jpayne@69 29991 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 29992 __Pyx_INCREF(((PyObject *)Py_False));
jpayne@69 29993 __Pyx_GIVEREF(((PyObject *)Py_False));
jpayne@69 29994 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_False))) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 29995 __Pyx_INCREF(Py_None);
jpayne@69 29996 __Pyx_GIVEREF(Py_None);
jpayne@69 29997 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 29998 __Pyx_INCREF(Py_None);
jpayne@69 29999 __Pyx_GIVEREF(Py_None);
jpayne@69 30000 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 30001 __Pyx_INCREF(Py_None);
jpayne@69 30002 __Pyx_GIVEREF(Py_None);
jpayne@69 30003 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, Py_None)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 30004 __Pyx_INCREF(Py_None);
jpayne@69 30005 __Pyx_GIVEREF(Py_None);
jpayne@69 30006 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, Py_None)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 30007 __Pyx_INCREF(((PyObject*)__pyx_kp_u__39));
jpayne@69 30008 __Pyx_GIVEREF(((PyObject*)__pyx_kp_u__39));
jpayne@69 30009 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, ((PyObject*)__pyx_kp_u__39))) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 30010 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 30011 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 30012 __Pyx_INCREF(((PyObject *)Py_False));
jpayne@69 30013 __Pyx_GIVEREF(((PyObject *)Py_False));
jpayne@69 30014 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 7, ((PyObject *)Py_False))) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 30015 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 30016 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 8, __pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 30017 __Pyx_INCREF(Py_None);
jpayne@69 30018 __Pyx_GIVEREF(Py_None);
jpayne@69 30019 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 9, Py_None)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 30020 __Pyx_INCREF(((PyObject *)Py_False));
jpayne@69 30021 __Pyx_GIVEREF(((PyObject *)Py_False));
jpayne@69 30022 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 10, ((PyObject *)Py_False))) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 30023 __Pyx_INCREF(((PyObject *)Py_False));
jpayne@69 30024 __Pyx_GIVEREF(((PyObject *)Py_False));
jpayne@69 30025 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 11, ((PyObject *)Py_False))) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@69 30026 __pyx_t_2 = 0;
jpayne@69 30027 __pyx_t_3 = 0;
jpayne@69 30028 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_3tabix_index, 0, __pyx_n_s_tabix_index, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error)
jpayne@69 30029 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30030 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_4);
jpayne@69 30031 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 30032 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_index, __pyx_t_3) < 0) __PYX_ERR(0, 873, __pyx_L1_error)
jpayne@69 30033 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30034
jpayne@69 30035 /* "(tree fragment)":1
jpayne@69 30036 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 30037 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 30038 * def __setstate_cython__(self, __pyx_state):
jpayne@69 30039 */
jpayne@69 30040 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_19tabix_file_iterator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_tabix_file_iterator___reduce_cyt, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30041 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30042 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30043 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30044
jpayne@69 30045 /* "(tree fragment)":3
jpayne@69 30046 * def __reduce_cython__(self):
jpayne@69 30047 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 30048 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 30049 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 30050 */
jpayne@69 30051 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_19tabix_file_iterator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_tabix_file_iterator___setstate_c, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 30052 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30053 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 30054 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30055
jpayne@69 30056 /* "pysam/libctabix.pyx":1178
jpayne@69 30057 *
jpayne@69 30058 *
jpayne@69 30059 * class tabix_generic_iterator: # <<<<<<<<<<<<<<
jpayne@69 30060 * '''iterate over ``infile``.
jpayne@69 30061 *
jpayne@69 30062 */
jpayne@69 30063 __pyx_t_3 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_tabix_generic_iterator, __pyx_n_s_tabix_generic_iterator, (PyObject *) NULL, __pyx_n_s_pysam_libctabix, __pyx_kp_s_iterate_over_infile_Permits_the); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error)
jpayne@69 30064 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30065
jpayne@69 30066 /* "pysam/libctabix.pyx":1183
jpayne@69 30067 * Permits the use of file-like objects for example from the gzip module.
jpayne@69 30068 * '''
jpayne@69 30069 * def __init__(self, infile, parser): # <<<<<<<<<<<<<<
jpayne@69 30070 *
jpayne@69 30071 * self.infile = infile
jpayne@69 30072 */
jpayne@69 30073 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_22tabix_generic_iterator_1__init__, 0, __pyx_n_s_tabix_generic_iterator___init, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L1_error)
jpayne@69 30074 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 30075 if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 1183, __pyx_L1_error)
jpayne@69 30076 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 30077
jpayne@69 30078 /* "pysam/libctabix.pyx":1190
jpayne@69 30079 * self.parser = parser
jpayne@69 30080 *
jpayne@69 30081 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 30082 * return self
jpayne@69 30083 *
jpayne@69 30084 */
jpayne@69 30085 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_22tabix_generic_iterator_3__iter__, 0, __pyx_n_s_tabix_generic_iterator___iter, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L1_error)
jpayne@69 30086 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 30087 if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_iter, __pyx_t_4) < 0) __PYX_ERR(0, 1190, __pyx_L1_error)
jpayne@69 30088 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 30089
jpayne@69 30090 /* "pysam/libctabix.pyx":1194
jpayne@69 30091 *
jpayne@69 30092 * # cython version - required for python 3
jpayne@69 30093 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 30094 *
jpayne@69 30095 * cdef char * b
jpayne@69 30096 */
jpayne@69 30097 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_22tabix_generic_iterator_5__next__, 0, __pyx_n_s_tabix_generic_iterator___next, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __pyx_L1_error)
jpayne@69 30098 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 30099 if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_next, __pyx_t_4) < 0) __PYX_ERR(0, 1194, __pyx_L1_error)
jpayne@69 30100 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 30101
jpayne@69 30102 /* "pysam/libctabix.pyx":1178
jpayne@69 30103 *
jpayne@69 30104 *
jpayne@69 30105 * class tabix_generic_iterator: # <<<<<<<<<<<<<<
jpayne@69 30106 * '''iterate over ``infile``.
jpayne@69 30107 *
jpayne@69 30108 */
jpayne@69 30109 __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_tabix_generic_iterator, __pyx_empty_tuple, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1178, __pyx_L1_error)
jpayne@69 30110 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 30111 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_generic_iterator, __pyx_t_4) < 0) __PYX_ERR(0, 1178, __pyx_L1_error)
jpayne@69 30112 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 30113 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30114
jpayne@69 30115 /* "pysam/libctabix.pyx":1238
jpayne@69 30116 *
jpayne@69 30117 *
jpayne@69 30118 * def tabix_iterator(infile, parser): # <<<<<<<<<<<<<<
jpayne@69 30119 * """return an iterator over all entries in a file.
jpayne@69 30120 *
jpayne@69 30121 */
jpayne@69 30122 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_5tabix_iterator, 0, __pyx_n_s_tabix_iterator, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1238, __pyx_L1_error)
jpayne@69 30123 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30124 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_iterator, __pyx_t_3) < 0) __PYX_ERR(0, 1238, __pyx_L1_error)
jpayne@69 30125 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30126
jpayne@69 30127 /* "(tree fragment)":1
jpayne@69 30128 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 30129 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 30130 * def __setstate_cython__(self, __pyx_state):
jpayne@69 30131 */
jpayne@69 30132 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_9Tabixfile_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Tabixfile___reduce_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30133 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30134 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30135 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30136
jpayne@69 30137 /* "(tree fragment)":3
jpayne@69 30138 * def __reduce_cython__(self):
jpayne@69 30139 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 30140 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 30141 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 30142 */
jpayne@69 30143 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_9Tabixfile_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Tabixfile___setstate_cython, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 30144 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30145 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 30146 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30147
jpayne@69 30148 /* "pysam/libctabix.pyx":1256
jpayne@69 30149 *
jpayne@69 30150 *
jpayne@69 30151 * __all__ = [ # <<<<<<<<<<<<<<
jpayne@69 30152 * "tabix_index",
jpayne@69 30153 * "tabix_compress",
jpayne@69 30154 */
jpayne@69 30155 __pyx_t_3 = PyList_New(14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1256, __pyx_L1_error)
jpayne@69 30156 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30157 __Pyx_INCREF(__pyx_n_u_tabix_index);
jpayne@69 30158 __Pyx_GIVEREF(__pyx_n_u_tabix_index);
jpayne@69 30159 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_tabix_index)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30160 __Pyx_INCREF(__pyx_n_u_tabix_compress);
jpayne@69 30161 __Pyx_GIVEREF(__pyx_n_u_tabix_compress);
jpayne@69 30162 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_tabix_compress)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30163 __Pyx_INCREF(__pyx_n_u_TabixFile);
jpayne@69 30164 __Pyx_GIVEREF(__pyx_n_u_TabixFile);
jpayne@69 30165 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_u_TabixFile)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30166 __Pyx_INCREF(__pyx_n_u_Tabixfile);
jpayne@69 30167 __Pyx_GIVEREF(__pyx_n_u_Tabixfile);
jpayne@69 30168 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_u_Tabixfile)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30169 __Pyx_INCREF(__pyx_n_u_asTuple);
jpayne@69 30170 __Pyx_GIVEREF(__pyx_n_u_asTuple);
jpayne@69 30171 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_u_asTuple)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30172 __Pyx_INCREF(__pyx_n_u_asGTF);
jpayne@69 30173 __Pyx_GIVEREF(__pyx_n_u_asGTF);
jpayne@69 30174 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_u_asGTF)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30175 __Pyx_INCREF(__pyx_n_u_asGFF3);
jpayne@69 30176 __Pyx_GIVEREF(__pyx_n_u_asGFF3);
jpayne@69 30177 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 6, __pyx_n_u_asGFF3)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30178 __Pyx_INCREF(__pyx_n_u_asVCF);
jpayne@69 30179 __Pyx_GIVEREF(__pyx_n_u_asVCF);
jpayne@69 30180 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 7, __pyx_n_u_asVCF)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30181 __Pyx_INCREF(__pyx_n_u_asBed);
jpayne@69 30182 __Pyx_GIVEREF(__pyx_n_u_asBed);
jpayne@69 30183 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 8, __pyx_n_u_asBed)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30184 __Pyx_INCREF(__pyx_n_u_GZIterator);
jpayne@69 30185 __Pyx_GIVEREF(__pyx_n_u_GZIterator);
jpayne@69 30186 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 9, __pyx_n_u_GZIterator)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30187 __Pyx_INCREF(__pyx_n_u_GZIteratorHead);
jpayne@69 30188 __Pyx_GIVEREF(__pyx_n_u_GZIteratorHead);
jpayne@69 30189 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 10, __pyx_n_u_GZIteratorHead)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30190 __Pyx_INCREF(__pyx_n_u_tabix_iterator);
jpayne@69 30191 __Pyx_GIVEREF(__pyx_n_u_tabix_iterator);
jpayne@69 30192 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 11, __pyx_n_u_tabix_iterator)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30193 __Pyx_INCREF(__pyx_n_u_tabix_generic_iterator);
jpayne@69 30194 __Pyx_GIVEREF(__pyx_n_u_tabix_generic_iterator);
jpayne@69 30195 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 12, __pyx_n_u_tabix_generic_iterator)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30196 __Pyx_INCREF(__pyx_n_u_tabix_file_iterator);
jpayne@69 30197 __Pyx_GIVEREF(__pyx_n_u_tabix_file_iterator);
jpayne@69 30198 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 13, __pyx_n_u_tabix_file_iterator)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@69 30199 if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_3) < 0) __PYX_ERR(0, 1256, __pyx_L1_error)
jpayne@69 30200 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30201
jpayne@69 30202 /* "(tree fragment)":1
jpayne@69 30203 * def __pyx_unpickle_Parser(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 30204 * cdef object __pyx_PickleError
jpayne@69 30205 * cdef object __pyx_result
jpayne@69 30206 */
jpayne@69 30207 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_7__pyx_unpickle_Parser, 0, __pyx_n_s_pyx_unpickle_Parser, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30208 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30209 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Parser, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30210 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30211
jpayne@69 30212 /* "(tree fragment)":11
jpayne@69 30213 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@69 30214 * return __pyx_result
jpayne@69 30215 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 30216 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 30217 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 30218 */
jpayne@69 30219 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_9__pyx_unpickle_asTuple, 0, __pyx_n_s_pyx_unpickle_asTuple, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30220 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30221 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_asTuple, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30222 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30223
jpayne@69 30224 /* "(tree fragment)":1
jpayne@69 30225 * def __pyx_unpickle_asGFF3(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 30226 * cdef object __pyx_PickleError
jpayne@69 30227 * cdef object __pyx_result
jpayne@69 30228 */
jpayne@69 30229 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_11__pyx_unpickle_asGFF3, 0, __pyx_n_s_pyx_unpickle_asGFF3, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30230 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30231 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_asGFF3, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30232 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30233
jpayne@69 30234 /* "(tree fragment)":11
jpayne@69 30235 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@69 30236 * return __pyx_result
jpayne@69 30237 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 30238 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 30239 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 30240 */
jpayne@69 30241 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_13__pyx_unpickle_asGTF, 0, __pyx_n_s_pyx_unpickle_asGTF, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30242 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30243 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_asGTF, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30244 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30245
jpayne@69 30246 /* "(tree fragment)":1
jpayne@69 30247 * def __pyx_unpickle_asBed(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 30248 * cdef object __pyx_PickleError
jpayne@69 30249 * cdef object __pyx_result
jpayne@69 30250 */
jpayne@69 30251 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_15__pyx_unpickle_asBed, 0, __pyx_n_s_pyx_unpickle_asBed, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30252 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30253 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_asBed, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30254 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30255
jpayne@69 30256 /* "(tree fragment)":11
jpayne@69 30257 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@69 30258 * return __pyx_result
jpayne@69 30259 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 30260 * __pyx_result.encoding = __pyx_state[0]
jpayne@69 30261 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@69 30262 */
jpayne@69 30263 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libctabix_17__pyx_unpickle_asVCF, 0, __pyx_n_s_pyx_unpickle_asVCF, NULL, __pyx_n_s_pysam_libctabix, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30264 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30265 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_asVCF, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 30266 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30267
jpayne@69 30268 /* "pysam/libctabix.pyx":1
jpayne@69 30269 * # cython: language_level=3 # <<<<<<<<<<<<<<
jpayne@69 30270 * # cython: embedsignature=True
jpayne@69 30271 * # cython: profile=True
jpayne@69 30272 */
jpayne@69 30273 __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 30274 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 30275 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 30276 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 30277 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 30278
jpayne@69 30279 /*--- Wrapped vars code ---*/
jpayne@69 30280
jpayne@69 30281 goto __pyx_L0;
jpayne@69 30282 __pyx_L1_error:;
jpayne@69 30283 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 30284 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 30285 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 30286 if (__pyx_m) {
jpayne@69 30287 if (__pyx_d && stringtab_initialized) {
jpayne@69 30288 __Pyx_AddTraceback("init pysam.libctabix", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 30289 }
jpayne@69 30290 #if !CYTHON_USE_MODULE_STATE
jpayne@69 30291 Py_CLEAR(__pyx_m);
jpayne@69 30292 #else
jpayne@69 30293 Py_DECREF(__pyx_m);
jpayne@69 30294 if (pystate_addmodule_run) {
jpayne@69 30295 PyObject *tp, *value, *tb;
jpayne@69 30296 PyErr_Fetch(&tp, &value, &tb);
jpayne@69 30297 PyState_RemoveModule(&__pyx_moduledef);
jpayne@69 30298 PyErr_Restore(tp, value, tb);
jpayne@69 30299 }
jpayne@69 30300 #endif
jpayne@69 30301 } else if (!PyErr_Occurred()) {
jpayne@69 30302 PyErr_SetString(PyExc_ImportError, "init pysam.libctabix");
jpayne@69 30303 }
jpayne@69 30304 __pyx_L0:;
jpayne@69 30305 __Pyx_RefNannyFinishContext();
jpayne@69 30306 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 30307 return (__pyx_m != NULL) ? 0 : -1;
jpayne@69 30308 #elif PY_MAJOR_VERSION >= 3
jpayne@69 30309 return __pyx_m;
jpayne@69 30310 #else
jpayne@69 30311 return;
jpayne@69 30312 #endif
jpayne@69 30313 }
jpayne@69 30314 /* #### Code section: cleanup_globals ### */
jpayne@69 30315 /* #### Code section: cleanup_module ### */
jpayne@69 30316 /* #### Code section: main_method ### */
jpayne@69 30317 /* #### Code section: utility_code_pragmas ### */
jpayne@69 30318 #ifdef _MSC_VER
jpayne@69 30319 #pragma warning( push )
jpayne@69 30320 /* Warning 4127: conditional expression is constant
jpayne@69 30321 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
jpayne@69 30322 * compile-time, so this warning is not useful
jpayne@69 30323 */
jpayne@69 30324 #pragma warning( disable : 4127 )
jpayne@69 30325 #endif
jpayne@69 30326
jpayne@69 30327
jpayne@69 30328
jpayne@69 30329 /* #### Code section: utility_code_def ### */
jpayne@69 30330
jpayne@69 30331 /* --- Runtime support code --- */
jpayne@69 30332 /* Refnanny */
jpayne@69 30333 #if CYTHON_REFNANNY
jpayne@69 30334 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
jpayne@69 30335 PyObject *m = NULL, *p = NULL;
jpayne@69 30336 void *r = NULL;
jpayne@69 30337 m = PyImport_ImportModule(modname);
jpayne@69 30338 if (!m) goto end;
jpayne@69 30339 p = PyObject_GetAttrString(m, "RefNannyAPI");
jpayne@69 30340 if (!p) goto end;
jpayne@69 30341 r = PyLong_AsVoidPtr(p);
jpayne@69 30342 end:
jpayne@69 30343 Py_XDECREF(p);
jpayne@69 30344 Py_XDECREF(m);
jpayne@69 30345 return (__Pyx_RefNannyAPIStruct *)r;
jpayne@69 30346 }
jpayne@69 30347 #endif
jpayne@69 30348
jpayne@69 30349 /* PyErrExceptionMatches */
jpayne@69 30350 #if CYTHON_FAST_THREAD_STATE
jpayne@69 30351 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
jpayne@69 30352 Py_ssize_t i, n;
jpayne@69 30353 n = PyTuple_GET_SIZE(tuple);
jpayne@69 30354 #if PY_MAJOR_VERSION >= 3
jpayne@69 30355 for (i=0; i<n; i++) {
jpayne@69 30356 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
jpayne@69 30357 }
jpayne@69 30358 #endif
jpayne@69 30359 for (i=0; i<n; i++) {
jpayne@69 30360 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
jpayne@69 30361 }
jpayne@69 30362 return 0;
jpayne@69 30363 }
jpayne@69 30364 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
jpayne@69 30365 int result;
jpayne@69 30366 PyObject *exc_type;
jpayne@69 30367 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 30368 PyObject *current_exception = tstate->current_exception;
jpayne@69 30369 if (unlikely(!current_exception)) return 0;
jpayne@69 30370 exc_type = (PyObject*) Py_TYPE(current_exception);
jpayne@69 30371 if (exc_type == err) return 1;
jpayne@69 30372 #else
jpayne@69 30373 exc_type = tstate->curexc_type;
jpayne@69 30374 if (exc_type == err) return 1;
jpayne@69 30375 if (unlikely(!exc_type)) return 0;
jpayne@69 30376 #endif
jpayne@69 30377 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 30378 Py_INCREF(exc_type);
jpayne@69 30379 #endif
jpayne@69 30380 if (unlikely(PyTuple_Check(err))) {
jpayne@69 30381 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
jpayne@69 30382 } else {
jpayne@69 30383 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
jpayne@69 30384 }
jpayne@69 30385 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 30386 Py_DECREF(exc_type);
jpayne@69 30387 #endif
jpayne@69 30388 return result;
jpayne@69 30389 }
jpayne@69 30390 #endif
jpayne@69 30391
jpayne@69 30392 /* PyErrFetchRestore */
jpayne@69 30393 #if CYTHON_FAST_THREAD_STATE
jpayne@69 30394 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
jpayne@69 30395 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 30396 PyObject *tmp_value;
jpayne@69 30397 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
jpayne@69 30398 if (value) {
jpayne@69 30399 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 30400 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
jpayne@69 30401 #endif
jpayne@69 30402 PyException_SetTraceback(value, tb);
jpayne@69 30403 }
jpayne@69 30404 tmp_value = tstate->current_exception;
jpayne@69 30405 tstate->current_exception = value;
jpayne@69 30406 Py_XDECREF(tmp_value);
jpayne@69 30407 Py_XDECREF(type);
jpayne@69 30408 Py_XDECREF(tb);
jpayne@69 30409 #else
jpayne@69 30410 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@69 30411 tmp_type = tstate->curexc_type;
jpayne@69 30412 tmp_value = tstate->curexc_value;
jpayne@69 30413 tmp_tb = tstate->curexc_traceback;
jpayne@69 30414 tstate->curexc_type = type;
jpayne@69 30415 tstate->curexc_value = value;
jpayne@69 30416 tstate->curexc_traceback = tb;
jpayne@69 30417 Py_XDECREF(tmp_type);
jpayne@69 30418 Py_XDECREF(tmp_value);
jpayne@69 30419 Py_XDECREF(tmp_tb);
jpayne@69 30420 #endif
jpayne@69 30421 }
jpayne@69 30422 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
jpayne@69 30423 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 30424 PyObject* exc_value;
jpayne@69 30425 exc_value = tstate->current_exception;
jpayne@69 30426 tstate->current_exception = 0;
jpayne@69 30427 *value = exc_value;
jpayne@69 30428 *type = NULL;
jpayne@69 30429 *tb = NULL;
jpayne@69 30430 if (exc_value) {
jpayne@69 30431 *type = (PyObject*) Py_TYPE(exc_value);
jpayne@69 30432 Py_INCREF(*type);
jpayne@69 30433 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 30434 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
jpayne@69 30435 Py_XINCREF(*tb);
jpayne@69 30436 #else
jpayne@69 30437 *tb = PyException_GetTraceback(exc_value);
jpayne@69 30438 #endif
jpayne@69 30439 }
jpayne@69 30440 #else
jpayne@69 30441 *type = tstate->curexc_type;
jpayne@69 30442 *value = tstate->curexc_value;
jpayne@69 30443 *tb = tstate->curexc_traceback;
jpayne@69 30444 tstate->curexc_type = 0;
jpayne@69 30445 tstate->curexc_value = 0;
jpayne@69 30446 tstate->curexc_traceback = 0;
jpayne@69 30447 #endif
jpayne@69 30448 }
jpayne@69 30449 #endif
jpayne@69 30450
jpayne@69 30451 /* PyObjectGetAttrStr */
jpayne@69 30452 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 30453 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
jpayne@69 30454 PyTypeObject* tp = Py_TYPE(obj);
jpayne@69 30455 if (likely(tp->tp_getattro))
jpayne@69 30456 return tp->tp_getattro(obj, attr_name);
jpayne@69 30457 #if PY_MAJOR_VERSION < 3
jpayne@69 30458 if (likely(tp->tp_getattr))
jpayne@69 30459 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
jpayne@69 30460 #endif
jpayne@69 30461 return PyObject_GetAttr(obj, attr_name);
jpayne@69 30462 }
jpayne@69 30463 #endif
jpayne@69 30464
jpayne@69 30465 /* PyObjectGetAttrStrNoError */
jpayne@69 30466 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
jpayne@69 30467 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
jpayne@69 30468 __Pyx_PyThreadState_declare
jpayne@69 30469 __Pyx_PyThreadState_assign
jpayne@69 30470 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
jpayne@69 30471 __Pyx_PyErr_Clear();
jpayne@69 30472 }
jpayne@69 30473 #endif
jpayne@69 30474 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
jpayne@69 30475 PyObject *result;
jpayne@69 30476 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
jpayne@69 30477 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
jpayne@69 30478 return result;
jpayne@69 30479 #else
jpayne@69 30480 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
jpayne@69 30481 PyTypeObject* tp = Py_TYPE(obj);
jpayne@69 30482 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 30483 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
jpayne@69 30484 }
jpayne@69 30485 #endif
jpayne@69 30486 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
jpayne@69 30487 if (unlikely(!result)) {
jpayne@69 30488 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
jpayne@69 30489 }
jpayne@69 30490 return result;
jpayne@69 30491 #endif
jpayne@69 30492 }
jpayne@69 30493
jpayne@69 30494 /* GetBuiltinName */
jpayne@69 30495 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
jpayne@69 30496 PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
jpayne@69 30497 if (unlikely(!result) && !PyErr_Occurred()) {
jpayne@69 30498 PyErr_Format(PyExc_NameError,
jpayne@69 30499 #if PY_MAJOR_VERSION >= 3
jpayne@69 30500 "name '%U' is not defined", name);
jpayne@69 30501 #else
jpayne@69 30502 "name '%.200s' is not defined", PyString_AS_STRING(name));
jpayne@69 30503 #endif
jpayne@69 30504 }
jpayne@69 30505 return result;
jpayne@69 30506 }
jpayne@69 30507
jpayne@69 30508 /* TupleAndListFromArray */
jpayne@69 30509 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 30510 static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
jpayne@69 30511 PyObject *v;
jpayne@69 30512 Py_ssize_t i;
jpayne@69 30513 for (i = 0; i < length; i++) {
jpayne@69 30514 v = dest[i] = src[i];
jpayne@69 30515 Py_INCREF(v);
jpayne@69 30516 }
jpayne@69 30517 }
jpayne@69 30518 static CYTHON_INLINE PyObject *
jpayne@69 30519 __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
jpayne@69 30520 {
jpayne@69 30521 PyObject *res;
jpayne@69 30522 if (n <= 0) {
jpayne@69 30523 Py_INCREF(__pyx_empty_tuple);
jpayne@69 30524 return __pyx_empty_tuple;
jpayne@69 30525 }
jpayne@69 30526 res = PyTuple_New(n);
jpayne@69 30527 if (unlikely(res == NULL)) return NULL;
jpayne@69 30528 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
jpayne@69 30529 return res;
jpayne@69 30530 }
jpayne@69 30531 static CYTHON_INLINE PyObject *
jpayne@69 30532 __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
jpayne@69 30533 {
jpayne@69 30534 PyObject *res;
jpayne@69 30535 if (n <= 0) {
jpayne@69 30536 return PyList_New(0);
jpayne@69 30537 }
jpayne@69 30538 res = PyList_New(n);
jpayne@69 30539 if (unlikely(res == NULL)) return NULL;
jpayne@69 30540 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
jpayne@69 30541 return res;
jpayne@69 30542 }
jpayne@69 30543 #endif
jpayne@69 30544
jpayne@69 30545 /* BytesEquals */
jpayne@69 30546 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
jpayne@69 30547 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 30548 return PyObject_RichCompareBool(s1, s2, equals);
jpayne@69 30549 #else
jpayne@69 30550 if (s1 == s2) {
jpayne@69 30551 return (equals == Py_EQ);
jpayne@69 30552 } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
jpayne@69 30553 const char *ps1, *ps2;
jpayne@69 30554 Py_ssize_t length = PyBytes_GET_SIZE(s1);
jpayne@69 30555 if (length != PyBytes_GET_SIZE(s2))
jpayne@69 30556 return (equals == Py_NE);
jpayne@69 30557 ps1 = PyBytes_AS_STRING(s1);
jpayne@69 30558 ps2 = PyBytes_AS_STRING(s2);
jpayne@69 30559 if (ps1[0] != ps2[0]) {
jpayne@69 30560 return (equals == Py_NE);
jpayne@69 30561 } else if (length == 1) {
jpayne@69 30562 return (equals == Py_EQ);
jpayne@69 30563 } else {
jpayne@69 30564 int result;
jpayne@69 30565 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
jpayne@69 30566 Py_hash_t hash1, hash2;
jpayne@69 30567 hash1 = ((PyBytesObject*)s1)->ob_shash;
jpayne@69 30568 hash2 = ((PyBytesObject*)s2)->ob_shash;
jpayne@69 30569 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
jpayne@69 30570 return (equals == Py_NE);
jpayne@69 30571 }
jpayne@69 30572 #endif
jpayne@69 30573 result = memcmp(ps1, ps2, (size_t)length);
jpayne@69 30574 return (equals == Py_EQ) ? (result == 0) : (result != 0);
jpayne@69 30575 }
jpayne@69 30576 } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
jpayne@69 30577 return (equals == Py_NE);
jpayne@69 30578 } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
jpayne@69 30579 return (equals == Py_NE);
jpayne@69 30580 } else {
jpayne@69 30581 int result;
jpayne@69 30582 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
jpayne@69 30583 if (!py_result)
jpayne@69 30584 return -1;
jpayne@69 30585 result = __Pyx_PyObject_IsTrue(py_result);
jpayne@69 30586 Py_DECREF(py_result);
jpayne@69 30587 return result;
jpayne@69 30588 }
jpayne@69 30589 #endif
jpayne@69 30590 }
jpayne@69 30591
jpayne@69 30592 /* UnicodeEquals */
jpayne@69 30593 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
jpayne@69 30594 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 30595 return PyObject_RichCompareBool(s1, s2, equals);
jpayne@69 30596 #else
jpayne@69 30597 #if PY_MAJOR_VERSION < 3
jpayne@69 30598 PyObject* owned_ref = NULL;
jpayne@69 30599 #endif
jpayne@69 30600 int s1_is_unicode, s2_is_unicode;
jpayne@69 30601 if (s1 == s2) {
jpayne@69 30602 goto return_eq;
jpayne@69 30603 }
jpayne@69 30604 s1_is_unicode = PyUnicode_CheckExact(s1);
jpayne@69 30605 s2_is_unicode = PyUnicode_CheckExact(s2);
jpayne@69 30606 #if PY_MAJOR_VERSION < 3
jpayne@69 30607 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
jpayne@69 30608 owned_ref = PyUnicode_FromObject(s2);
jpayne@69 30609 if (unlikely(!owned_ref))
jpayne@69 30610 return -1;
jpayne@69 30611 s2 = owned_ref;
jpayne@69 30612 s2_is_unicode = 1;
jpayne@69 30613 } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
jpayne@69 30614 owned_ref = PyUnicode_FromObject(s1);
jpayne@69 30615 if (unlikely(!owned_ref))
jpayne@69 30616 return -1;
jpayne@69 30617 s1 = owned_ref;
jpayne@69 30618 s1_is_unicode = 1;
jpayne@69 30619 } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
jpayne@69 30620 return __Pyx_PyBytes_Equals(s1, s2, equals);
jpayne@69 30621 }
jpayne@69 30622 #endif
jpayne@69 30623 if (s1_is_unicode & s2_is_unicode) {
jpayne@69 30624 Py_ssize_t length;
jpayne@69 30625 int kind;
jpayne@69 30626 void *data1, *data2;
jpayne@69 30627 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
jpayne@69 30628 return -1;
jpayne@69 30629 length = __Pyx_PyUnicode_GET_LENGTH(s1);
jpayne@69 30630 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
jpayne@69 30631 goto return_ne;
jpayne@69 30632 }
jpayne@69 30633 #if CYTHON_USE_UNICODE_INTERNALS
jpayne@69 30634 {
jpayne@69 30635 Py_hash_t hash1, hash2;
jpayne@69 30636 #if CYTHON_PEP393_ENABLED
jpayne@69 30637 hash1 = ((PyASCIIObject*)s1)->hash;
jpayne@69 30638 hash2 = ((PyASCIIObject*)s2)->hash;
jpayne@69 30639 #else
jpayne@69 30640 hash1 = ((PyUnicodeObject*)s1)->hash;
jpayne@69 30641 hash2 = ((PyUnicodeObject*)s2)->hash;
jpayne@69 30642 #endif
jpayne@69 30643 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
jpayne@69 30644 goto return_ne;
jpayne@69 30645 }
jpayne@69 30646 }
jpayne@69 30647 #endif
jpayne@69 30648 kind = __Pyx_PyUnicode_KIND(s1);
jpayne@69 30649 if (kind != __Pyx_PyUnicode_KIND(s2)) {
jpayne@69 30650 goto return_ne;
jpayne@69 30651 }
jpayne@69 30652 data1 = __Pyx_PyUnicode_DATA(s1);
jpayne@69 30653 data2 = __Pyx_PyUnicode_DATA(s2);
jpayne@69 30654 if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
jpayne@69 30655 goto return_ne;
jpayne@69 30656 } else if (length == 1) {
jpayne@69 30657 goto return_eq;
jpayne@69 30658 } else {
jpayne@69 30659 int result = memcmp(data1, data2, (size_t)(length * kind));
jpayne@69 30660 #if PY_MAJOR_VERSION < 3
jpayne@69 30661 Py_XDECREF(owned_ref);
jpayne@69 30662 #endif
jpayne@69 30663 return (equals == Py_EQ) ? (result == 0) : (result != 0);
jpayne@69 30664 }
jpayne@69 30665 } else if ((s1 == Py_None) & s2_is_unicode) {
jpayne@69 30666 goto return_ne;
jpayne@69 30667 } else if ((s2 == Py_None) & s1_is_unicode) {
jpayne@69 30668 goto return_ne;
jpayne@69 30669 } else {
jpayne@69 30670 int result;
jpayne@69 30671 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
jpayne@69 30672 #if PY_MAJOR_VERSION < 3
jpayne@69 30673 Py_XDECREF(owned_ref);
jpayne@69 30674 #endif
jpayne@69 30675 if (!py_result)
jpayne@69 30676 return -1;
jpayne@69 30677 result = __Pyx_PyObject_IsTrue(py_result);
jpayne@69 30678 Py_DECREF(py_result);
jpayne@69 30679 return result;
jpayne@69 30680 }
jpayne@69 30681 return_eq:
jpayne@69 30682 #if PY_MAJOR_VERSION < 3
jpayne@69 30683 Py_XDECREF(owned_ref);
jpayne@69 30684 #endif
jpayne@69 30685 return (equals == Py_EQ);
jpayne@69 30686 return_ne:
jpayne@69 30687 #if PY_MAJOR_VERSION < 3
jpayne@69 30688 Py_XDECREF(owned_ref);
jpayne@69 30689 #endif
jpayne@69 30690 return (equals == Py_NE);
jpayne@69 30691 #endif
jpayne@69 30692 }
jpayne@69 30693
jpayne@69 30694 /* fastcall */
jpayne@69 30695 #if CYTHON_METH_FASTCALL
jpayne@69 30696 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
jpayne@69 30697 {
jpayne@69 30698 Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
jpayne@69 30699 for (i = 0; i < n; i++)
jpayne@69 30700 {
jpayne@69 30701 if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
jpayne@69 30702 }
jpayne@69 30703 for (i = 0; i < n; i++)
jpayne@69 30704 {
jpayne@69 30705 int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
jpayne@69 30706 if (unlikely(eq != 0)) {
jpayne@69 30707 if (unlikely(eq < 0)) return NULL;
jpayne@69 30708 return kwvalues[i];
jpayne@69 30709 }
jpayne@69 30710 }
jpayne@69 30711 return NULL;
jpayne@69 30712 }
jpayne@69 30713 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
jpayne@69 30714 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
jpayne@69 30715 Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
jpayne@69 30716 PyObject *dict;
jpayne@69 30717 dict = PyDict_New();
jpayne@69 30718 if (unlikely(!dict))
jpayne@69 30719 return NULL;
jpayne@69 30720 for (i=0; i<nkwargs; i++) {
jpayne@69 30721 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
jpayne@69 30722 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
jpayne@69 30723 goto bad;
jpayne@69 30724 }
jpayne@69 30725 return dict;
jpayne@69 30726 bad:
jpayne@69 30727 Py_DECREF(dict);
jpayne@69 30728 return NULL;
jpayne@69 30729 }
jpayne@69 30730 #endif
jpayne@69 30731 #endif
jpayne@69 30732
jpayne@69 30733 /* RaiseDoubleKeywords */
jpayne@69 30734 static void __Pyx_RaiseDoubleKeywordsError(
jpayne@69 30735 const char* func_name,
jpayne@69 30736 PyObject* kw_name)
jpayne@69 30737 {
jpayne@69 30738 PyErr_Format(PyExc_TypeError,
jpayne@69 30739 #if PY_MAJOR_VERSION >= 3
jpayne@69 30740 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
jpayne@69 30741 #else
jpayne@69 30742 "%s() got multiple values for keyword argument '%s'", func_name,
jpayne@69 30743 PyString_AsString(kw_name));
jpayne@69 30744 #endif
jpayne@69 30745 }
jpayne@69 30746
jpayne@69 30747 /* ParseKeywords */
jpayne@69 30748 static int __Pyx_ParseOptionalKeywords(
jpayne@69 30749 PyObject *kwds,
jpayne@69 30750 PyObject *const *kwvalues,
jpayne@69 30751 PyObject **argnames[],
jpayne@69 30752 PyObject *kwds2,
jpayne@69 30753 PyObject *values[],
jpayne@69 30754 Py_ssize_t num_pos_args,
jpayne@69 30755 const char* function_name)
jpayne@69 30756 {
jpayne@69 30757 PyObject *key = 0, *value = 0;
jpayne@69 30758 Py_ssize_t pos = 0;
jpayne@69 30759 PyObject*** name;
jpayne@69 30760 PyObject*** first_kw_arg = argnames + num_pos_args;
jpayne@69 30761 int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
jpayne@69 30762 while (1) {
jpayne@69 30763 Py_XDECREF(key); key = NULL;
jpayne@69 30764 Py_XDECREF(value); value = NULL;
jpayne@69 30765 if (kwds_is_tuple) {
jpayne@69 30766 Py_ssize_t size;
jpayne@69 30767 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 30768 size = PyTuple_GET_SIZE(kwds);
jpayne@69 30769 #else
jpayne@69 30770 size = PyTuple_Size(kwds);
jpayne@69 30771 if (size < 0) goto bad;
jpayne@69 30772 #endif
jpayne@69 30773 if (pos >= size) break;
jpayne@69 30774 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 30775 key = __Pyx_PySequence_ITEM(kwds, pos);
jpayne@69 30776 if (!key) goto bad;
jpayne@69 30777 #elif CYTHON_ASSUME_SAFE_MACROS
jpayne@69 30778 key = PyTuple_GET_ITEM(kwds, pos);
jpayne@69 30779 #else
jpayne@69 30780 key = PyTuple_GetItem(kwds, pos);
jpayne@69 30781 if (!key) goto bad;
jpayne@69 30782 #endif
jpayne@69 30783 value = kwvalues[pos];
jpayne@69 30784 pos++;
jpayne@69 30785 }
jpayne@69 30786 else
jpayne@69 30787 {
jpayne@69 30788 if (!PyDict_Next(kwds, &pos, &key, &value)) break;
jpayne@69 30789 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 30790 Py_INCREF(key);
jpayne@69 30791 #endif
jpayne@69 30792 }
jpayne@69 30793 name = first_kw_arg;
jpayne@69 30794 while (*name && (**name != key)) name++;
jpayne@69 30795 if (*name) {
jpayne@69 30796 values[name-argnames] = value;
jpayne@69 30797 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 30798 Py_INCREF(value);
jpayne@69 30799 Py_DECREF(key);
jpayne@69 30800 #endif
jpayne@69 30801 key = NULL;
jpayne@69 30802 value = NULL;
jpayne@69 30803 continue;
jpayne@69 30804 }
jpayne@69 30805 #if !CYTHON_AVOID_BORROWED_REFS
jpayne@69 30806 Py_INCREF(key);
jpayne@69 30807 #endif
jpayne@69 30808 Py_INCREF(value);
jpayne@69 30809 name = first_kw_arg;
jpayne@69 30810 #if PY_MAJOR_VERSION < 3
jpayne@69 30811 if (likely(PyString_Check(key))) {
jpayne@69 30812 while (*name) {
jpayne@69 30813 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
jpayne@69 30814 && _PyString_Eq(**name, key)) {
jpayne@69 30815 values[name-argnames] = value;
jpayne@69 30816 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 30817 value = NULL;
jpayne@69 30818 #endif
jpayne@69 30819 break;
jpayne@69 30820 }
jpayne@69 30821 name++;
jpayne@69 30822 }
jpayne@69 30823 if (*name) continue;
jpayne@69 30824 else {
jpayne@69 30825 PyObject*** argname = argnames;
jpayne@69 30826 while (argname != first_kw_arg) {
jpayne@69 30827 if ((**argname == key) || (
jpayne@69 30828 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
jpayne@69 30829 && _PyString_Eq(**argname, key))) {
jpayne@69 30830 goto arg_passed_twice;
jpayne@69 30831 }
jpayne@69 30832 argname++;
jpayne@69 30833 }
jpayne@69 30834 }
jpayne@69 30835 } else
jpayne@69 30836 #endif
jpayne@69 30837 if (likely(PyUnicode_Check(key))) {
jpayne@69 30838 while (*name) {
jpayne@69 30839 int cmp = (
jpayne@69 30840 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
jpayne@69 30841 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
jpayne@69 30842 #endif
jpayne@69 30843 PyUnicode_Compare(**name, key)
jpayne@69 30844 );
jpayne@69 30845 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
jpayne@69 30846 if (cmp == 0) {
jpayne@69 30847 values[name-argnames] = value;
jpayne@69 30848 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 30849 value = NULL;
jpayne@69 30850 #endif
jpayne@69 30851 break;
jpayne@69 30852 }
jpayne@69 30853 name++;
jpayne@69 30854 }
jpayne@69 30855 if (*name) continue;
jpayne@69 30856 else {
jpayne@69 30857 PyObject*** argname = argnames;
jpayne@69 30858 while (argname != first_kw_arg) {
jpayne@69 30859 int cmp = (**argname == key) ? 0 :
jpayne@69 30860 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
jpayne@69 30861 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
jpayne@69 30862 #endif
jpayne@69 30863 PyUnicode_Compare(**argname, key);
jpayne@69 30864 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
jpayne@69 30865 if (cmp == 0) goto arg_passed_twice;
jpayne@69 30866 argname++;
jpayne@69 30867 }
jpayne@69 30868 }
jpayne@69 30869 } else
jpayne@69 30870 goto invalid_keyword_type;
jpayne@69 30871 if (kwds2) {
jpayne@69 30872 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
jpayne@69 30873 } else {
jpayne@69 30874 goto invalid_keyword;
jpayne@69 30875 }
jpayne@69 30876 }
jpayne@69 30877 Py_XDECREF(key);
jpayne@69 30878 Py_XDECREF(value);
jpayne@69 30879 return 0;
jpayne@69 30880 arg_passed_twice:
jpayne@69 30881 __Pyx_RaiseDoubleKeywordsError(function_name, key);
jpayne@69 30882 goto bad;
jpayne@69 30883 invalid_keyword_type:
jpayne@69 30884 PyErr_Format(PyExc_TypeError,
jpayne@69 30885 "%.200s() keywords must be strings", function_name);
jpayne@69 30886 goto bad;
jpayne@69 30887 invalid_keyword:
jpayne@69 30888 #if PY_MAJOR_VERSION < 3
jpayne@69 30889 PyErr_Format(PyExc_TypeError,
jpayne@69 30890 "%.200s() got an unexpected keyword argument '%.200s'",
jpayne@69 30891 function_name, PyString_AsString(key));
jpayne@69 30892 #else
jpayne@69 30893 PyErr_Format(PyExc_TypeError,
jpayne@69 30894 "%s() got an unexpected keyword argument '%U'",
jpayne@69 30895 function_name, key);
jpayne@69 30896 #endif
jpayne@69 30897 bad:
jpayne@69 30898 Py_XDECREF(key);
jpayne@69 30899 Py_XDECREF(value);
jpayne@69 30900 return -1;
jpayne@69 30901 }
jpayne@69 30902
jpayne@69 30903 /* RaiseArgTupleInvalid */
jpayne@69 30904 static void __Pyx_RaiseArgtupleInvalid(
jpayne@69 30905 const char* func_name,
jpayne@69 30906 int exact,
jpayne@69 30907 Py_ssize_t num_min,
jpayne@69 30908 Py_ssize_t num_max,
jpayne@69 30909 Py_ssize_t num_found)
jpayne@69 30910 {
jpayne@69 30911 Py_ssize_t num_expected;
jpayne@69 30912 const char *more_or_less;
jpayne@69 30913 if (num_found < num_min) {
jpayne@69 30914 num_expected = num_min;
jpayne@69 30915 more_or_less = "at least";
jpayne@69 30916 } else {
jpayne@69 30917 num_expected = num_max;
jpayne@69 30918 more_or_less = "at most";
jpayne@69 30919 }
jpayne@69 30920 if (exact) {
jpayne@69 30921 more_or_less = "exactly";
jpayne@69 30922 }
jpayne@69 30923 PyErr_Format(PyExc_TypeError,
jpayne@69 30924 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 30925 func_name, more_or_less, num_expected,
jpayne@69 30926 (num_expected == 1) ? "" : "s", num_found);
jpayne@69 30927 }
jpayne@69 30928
jpayne@69 30929 /* Profile */
jpayne@69 30930 #if CYTHON_PROFILE
jpayne@69 30931 static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
jpayne@69 30932 PyFrameObject** frame,
jpayne@69 30933 PyThreadState* tstate,
jpayne@69 30934 const char *funcname,
jpayne@69 30935 const char *srcfile,
jpayne@69 30936 int firstlineno) {
jpayne@69 30937 PyObject *type, *value, *traceback;
jpayne@69 30938 int retval;
jpayne@69 30939 if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
jpayne@69 30940 if (*code == NULL) {
jpayne@69 30941 *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
jpayne@69 30942 if (*code == NULL) return 0;
jpayne@69 30943 }
jpayne@69 30944 *frame = PyFrame_New(
jpayne@69 30945 tstate, /*PyThreadState *tstate*/
jpayne@69 30946 *code, /*PyCodeObject *code*/
jpayne@69 30947 __pyx_d, /*PyObject *globals*/
jpayne@69 30948 0 /*PyObject *locals*/
jpayne@69 30949 );
jpayne@69 30950 if (*frame == NULL) return 0;
jpayne@69 30951 if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
jpayne@69 30952 Py_INCREF(Py_None);
jpayne@69 30953 (*frame)->f_trace = Py_None;
jpayne@69 30954 }
jpayne@69 30955 #if PY_VERSION_HEX < 0x030400B1
jpayne@69 30956 } else {
jpayne@69 30957 (*frame)->f_tstate = tstate;
jpayne@69 30958 #endif
jpayne@69 30959 }
jpayne@69 30960 __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
jpayne@69 30961 retval = 1;
jpayne@69 30962 __Pyx_EnterTracing(tstate);
jpayne@69 30963 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
jpayne@69 30964 #if CYTHON_TRACE
jpayne@69 30965 if (tstate->c_tracefunc)
jpayne@69 30966 retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
jpayne@69 30967 if (retval && tstate->c_profilefunc)
jpayne@69 30968 #endif
jpayne@69 30969 retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
jpayne@69 30970 __Pyx_LeaveTracing(tstate);
jpayne@69 30971 if (retval) {
jpayne@69 30972 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
jpayne@69 30973 return __Pyx_IsTracing(tstate, 0, 0) && retval;
jpayne@69 30974 } else {
jpayne@69 30975 Py_XDECREF(type);
jpayne@69 30976 Py_XDECREF(value);
jpayne@69 30977 Py_XDECREF(traceback);
jpayne@69 30978 return -1;
jpayne@69 30979 }
jpayne@69 30980 }
jpayne@69 30981 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
jpayne@69 30982 PyCodeObject *py_code = 0;
jpayne@69 30983 #if PY_MAJOR_VERSION >= 3
jpayne@69 30984 py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
jpayne@69 30985 if (likely(py_code)) {
jpayne@69 30986 py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
jpayne@69 30987 }
jpayne@69 30988 #else
jpayne@69 30989 PyObject *py_srcfile = 0;
jpayne@69 30990 PyObject *py_funcname = 0;
jpayne@69 30991 py_funcname = PyString_FromString(funcname);
jpayne@69 30992 if (unlikely(!py_funcname)) goto bad;
jpayne@69 30993 py_srcfile = PyString_FromString(srcfile);
jpayne@69 30994 if (unlikely(!py_srcfile)) goto bad;
jpayne@69 30995 py_code = PyCode_New(
jpayne@69 30996 0,
jpayne@69 30997 0,
jpayne@69 30998 0,
jpayne@69 30999 CO_OPTIMIZED | CO_NEWLOCALS,
jpayne@69 31000 __pyx_empty_bytes, /*PyObject *code,*/
jpayne@69 31001 __pyx_empty_tuple, /*PyObject *consts,*/
jpayne@69 31002 __pyx_empty_tuple, /*PyObject *names,*/
jpayne@69 31003 __pyx_empty_tuple, /*PyObject *varnames,*/
jpayne@69 31004 __pyx_empty_tuple, /*PyObject *freevars,*/
jpayne@69 31005 __pyx_empty_tuple, /*PyObject *cellvars,*/
jpayne@69 31006 py_srcfile, /*PyObject *filename,*/
jpayne@69 31007 py_funcname, /*PyObject *name,*/
jpayne@69 31008 firstlineno,
jpayne@69 31009 __pyx_empty_bytes /*PyObject *lnotab*/
jpayne@69 31010 );
jpayne@69 31011 bad:
jpayne@69 31012 Py_XDECREF(py_srcfile);
jpayne@69 31013 Py_XDECREF(py_funcname);
jpayne@69 31014 #endif
jpayne@69 31015 return py_code;
jpayne@69 31016 }
jpayne@69 31017 #endif
jpayne@69 31018
jpayne@69 31019 /* KeywordStringCheck */
jpayne@69 31020 static int __Pyx_CheckKeywordStrings(
jpayne@69 31021 PyObject *kw,
jpayne@69 31022 const char* function_name,
jpayne@69 31023 int kw_allowed)
jpayne@69 31024 {
jpayne@69 31025 PyObject* key = 0;
jpayne@69 31026 Py_ssize_t pos = 0;
jpayne@69 31027 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 31028 if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
jpayne@69 31029 goto invalid_keyword;
jpayne@69 31030 return 1;
jpayne@69 31031 #else
jpayne@69 31032 if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
jpayne@69 31033 Py_ssize_t kwsize;
jpayne@69 31034 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 31035 kwsize = PyTuple_GET_SIZE(kw);
jpayne@69 31036 #else
jpayne@69 31037 kwsize = PyTuple_Size(kw);
jpayne@69 31038 if (kwsize < 0) return 0;
jpayne@69 31039 #endif
jpayne@69 31040 if (unlikely(kwsize == 0))
jpayne@69 31041 return 1;
jpayne@69 31042 if (!kw_allowed) {
jpayne@69 31043 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 31044 key = PyTuple_GET_ITEM(kw, 0);
jpayne@69 31045 #else
jpayne@69 31046 key = PyTuple_GetItem(kw, pos);
jpayne@69 31047 if (!key) return 0;
jpayne@69 31048 #endif
jpayne@69 31049 goto invalid_keyword;
jpayne@69 31050 }
jpayne@69 31051 #if PY_VERSION_HEX < 0x03090000
jpayne@69 31052 for (pos = 0; pos < kwsize; pos++) {
jpayne@69 31053 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 31054 key = PyTuple_GET_ITEM(kw, pos);
jpayne@69 31055 #else
jpayne@69 31056 key = PyTuple_GetItem(kw, pos);
jpayne@69 31057 if (!key) return 0;
jpayne@69 31058 #endif
jpayne@69 31059 if (unlikely(!PyUnicode_Check(key)))
jpayne@69 31060 goto invalid_keyword_type;
jpayne@69 31061 }
jpayne@69 31062 #endif
jpayne@69 31063 return 1;
jpayne@69 31064 }
jpayne@69 31065 while (PyDict_Next(kw, &pos, &key, 0)) {
jpayne@69 31066 #if PY_MAJOR_VERSION < 3
jpayne@69 31067 if (unlikely(!PyString_Check(key)))
jpayne@69 31068 #endif
jpayne@69 31069 if (unlikely(!PyUnicode_Check(key)))
jpayne@69 31070 goto invalid_keyword_type;
jpayne@69 31071 }
jpayne@69 31072 if (!kw_allowed && unlikely(key))
jpayne@69 31073 goto invalid_keyword;
jpayne@69 31074 return 1;
jpayne@69 31075 invalid_keyword_type:
jpayne@69 31076 PyErr_Format(PyExc_TypeError,
jpayne@69 31077 "%.200s() keywords must be strings", function_name);
jpayne@69 31078 return 0;
jpayne@69 31079 #endif
jpayne@69 31080 invalid_keyword:
jpayne@69 31081 #if PY_MAJOR_VERSION < 3
jpayne@69 31082 PyErr_Format(PyExc_TypeError,
jpayne@69 31083 "%.200s() got an unexpected keyword argument '%.200s'",
jpayne@69 31084 function_name, PyString_AsString(key));
jpayne@69 31085 #else
jpayne@69 31086 PyErr_Format(PyExc_TypeError,
jpayne@69 31087 "%s() got an unexpected keyword argument '%U'",
jpayne@69 31088 function_name, key);
jpayne@69 31089 #endif
jpayne@69 31090 return 0;
jpayne@69 31091 }
jpayne@69 31092
jpayne@69 31093 /* PyFunctionFastCall */
jpayne@69 31094 #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
jpayne@69 31095 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
jpayne@69 31096 PyObject *globals) {
jpayne@69 31097 PyFrameObject *f;
jpayne@69 31098 PyThreadState *tstate = __Pyx_PyThreadState_Current;
jpayne@69 31099 PyObject **fastlocals;
jpayne@69 31100 Py_ssize_t i;
jpayne@69 31101 PyObject *result;
jpayne@69 31102 assert(globals != NULL);
jpayne@69 31103 /* XXX Perhaps we should create a specialized
jpayne@69 31104 PyFrame_New() that doesn't take locals, but does
jpayne@69 31105 take builtins without sanity checking them.
jpayne@69 31106 */
jpayne@69 31107 assert(tstate != NULL);
jpayne@69 31108 f = PyFrame_New(tstate, co, globals, NULL);
jpayne@69 31109 if (f == NULL) {
jpayne@69 31110 return NULL;
jpayne@69 31111 }
jpayne@69 31112 fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
jpayne@69 31113 for (i = 0; i < na; i++) {
jpayne@69 31114 Py_INCREF(*args);
jpayne@69 31115 fastlocals[i] = *args++;
jpayne@69 31116 }
jpayne@69 31117 result = PyEval_EvalFrameEx(f,0);
jpayne@69 31118 ++tstate->recursion_depth;
jpayne@69 31119 Py_DECREF(f);
jpayne@69 31120 --tstate->recursion_depth;
jpayne@69 31121 return result;
jpayne@69 31122 }
jpayne@69 31123 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
jpayne@69 31124 PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
jpayne@69 31125 PyObject *globals = PyFunction_GET_GLOBALS(func);
jpayne@69 31126 PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
jpayne@69 31127 PyObject *closure;
jpayne@69 31128 #if PY_MAJOR_VERSION >= 3
jpayne@69 31129 PyObject *kwdefs;
jpayne@69 31130 #endif
jpayne@69 31131 PyObject *kwtuple, **k;
jpayne@69 31132 PyObject **d;
jpayne@69 31133 Py_ssize_t nd;
jpayne@69 31134 Py_ssize_t nk;
jpayne@69 31135 PyObject *result;
jpayne@69 31136 assert(kwargs == NULL || PyDict_Check(kwargs));
jpayne@69 31137 nk = kwargs ? PyDict_Size(kwargs) : 0;
jpayne@69 31138 #if PY_MAJOR_VERSION < 3
jpayne@69 31139 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
jpayne@69 31140 return NULL;
jpayne@69 31141 }
jpayne@69 31142 #else
jpayne@69 31143 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
jpayne@69 31144 return NULL;
jpayne@69 31145 }
jpayne@69 31146 #endif
jpayne@69 31147 if (
jpayne@69 31148 #if PY_MAJOR_VERSION >= 3
jpayne@69 31149 co->co_kwonlyargcount == 0 &&
jpayne@69 31150 #endif
jpayne@69 31151 likely(kwargs == NULL || nk == 0) &&
jpayne@69 31152 co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
jpayne@69 31153 if (argdefs == NULL && co->co_argcount == nargs) {
jpayne@69 31154 result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
jpayne@69 31155 goto done;
jpayne@69 31156 }
jpayne@69 31157 else if (nargs == 0 && argdefs != NULL
jpayne@69 31158 && co->co_argcount == Py_SIZE(argdefs)) {
jpayne@69 31159 /* function called with no arguments, but all parameters have
jpayne@69 31160 a default value: use default values as arguments .*/
jpayne@69 31161 args = &PyTuple_GET_ITEM(argdefs, 0);
jpayne@69 31162 result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
jpayne@69 31163 goto done;
jpayne@69 31164 }
jpayne@69 31165 }
jpayne@69 31166 if (kwargs != NULL) {
jpayne@69 31167 Py_ssize_t pos, i;
jpayne@69 31168 kwtuple = PyTuple_New(2 * nk);
jpayne@69 31169 if (kwtuple == NULL) {
jpayne@69 31170 result = NULL;
jpayne@69 31171 goto done;
jpayne@69 31172 }
jpayne@69 31173 k = &PyTuple_GET_ITEM(kwtuple, 0);
jpayne@69 31174 pos = i = 0;
jpayne@69 31175 while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
jpayne@69 31176 Py_INCREF(k[i]);
jpayne@69 31177 Py_INCREF(k[i+1]);
jpayne@69 31178 i += 2;
jpayne@69 31179 }
jpayne@69 31180 nk = i / 2;
jpayne@69 31181 }
jpayne@69 31182 else {
jpayne@69 31183 kwtuple = NULL;
jpayne@69 31184 k = NULL;
jpayne@69 31185 }
jpayne@69 31186 closure = PyFunction_GET_CLOSURE(func);
jpayne@69 31187 #if PY_MAJOR_VERSION >= 3
jpayne@69 31188 kwdefs = PyFunction_GET_KW_DEFAULTS(func);
jpayne@69 31189 #endif
jpayne@69 31190 if (argdefs != NULL) {
jpayne@69 31191 d = &PyTuple_GET_ITEM(argdefs, 0);
jpayne@69 31192 nd = Py_SIZE(argdefs);
jpayne@69 31193 }
jpayne@69 31194 else {
jpayne@69 31195 d = NULL;
jpayne@69 31196 nd = 0;
jpayne@69 31197 }
jpayne@69 31198 #if PY_MAJOR_VERSION >= 3
jpayne@69 31199 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
jpayne@69 31200 args, (int)nargs,
jpayne@69 31201 k, (int)nk,
jpayne@69 31202 d, (int)nd, kwdefs, closure);
jpayne@69 31203 #else
jpayne@69 31204 result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
jpayne@69 31205 args, (int)nargs,
jpayne@69 31206 k, (int)nk,
jpayne@69 31207 d, (int)nd, closure);
jpayne@69 31208 #endif
jpayne@69 31209 Py_XDECREF(kwtuple);
jpayne@69 31210 done:
jpayne@69 31211 Py_LeaveRecursiveCall();
jpayne@69 31212 return result;
jpayne@69 31213 }
jpayne@69 31214 #endif
jpayne@69 31215
jpayne@69 31216 /* PyObjectCall */
jpayne@69 31217 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 31218 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
jpayne@69 31219 PyObject *result;
jpayne@69 31220 ternaryfunc call = Py_TYPE(func)->tp_call;
jpayne@69 31221 if (unlikely(!call))
jpayne@69 31222 return PyObject_Call(func, arg, kw);
jpayne@69 31223 #if PY_MAJOR_VERSION < 3
jpayne@69 31224 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
jpayne@69 31225 return NULL;
jpayne@69 31226 #else
jpayne@69 31227 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
jpayne@69 31228 return NULL;
jpayne@69 31229 #endif
jpayne@69 31230 result = (*call)(func, arg, kw);
jpayne@69 31231 Py_LeaveRecursiveCall();
jpayne@69 31232 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
jpayne@69 31233 PyErr_SetString(
jpayne@69 31234 PyExc_SystemError,
jpayne@69 31235 "NULL result without error in PyObject_Call");
jpayne@69 31236 }
jpayne@69 31237 return result;
jpayne@69 31238 }
jpayne@69 31239 #endif
jpayne@69 31240
jpayne@69 31241 /* PyObjectCallMethO */
jpayne@69 31242 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 31243 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
jpayne@69 31244 PyObject *self, *result;
jpayne@69 31245 PyCFunction cfunc;
jpayne@69 31246 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
jpayne@69 31247 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
jpayne@69 31248 #if PY_MAJOR_VERSION < 3
jpayne@69 31249 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
jpayne@69 31250 return NULL;
jpayne@69 31251 #else
jpayne@69 31252 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
jpayne@69 31253 return NULL;
jpayne@69 31254 #endif
jpayne@69 31255 result = cfunc(self, arg);
jpayne@69 31256 Py_LeaveRecursiveCall();
jpayne@69 31257 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
jpayne@69 31258 PyErr_SetString(
jpayne@69 31259 PyExc_SystemError,
jpayne@69 31260 "NULL result without error in PyObject_Call");
jpayne@69 31261 }
jpayne@69 31262 return result;
jpayne@69 31263 }
jpayne@69 31264 #endif
jpayne@69 31265
jpayne@69 31266 /* PyObjectFastCall */
jpayne@69 31267 #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 31268 static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
jpayne@69 31269 PyObject *argstuple;
jpayne@69 31270 PyObject *result = 0;
jpayne@69 31271 size_t i;
jpayne@69 31272 argstuple = PyTuple_New((Py_ssize_t)nargs);
jpayne@69 31273 if (unlikely(!argstuple)) return NULL;
jpayne@69 31274 for (i = 0; i < nargs; i++) {
jpayne@69 31275 Py_INCREF(args[i]);
jpayne@69 31276 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
jpayne@69 31277 }
jpayne@69 31278 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
jpayne@69 31279 bad:
jpayne@69 31280 Py_DECREF(argstuple);
jpayne@69 31281 return result;
jpayne@69 31282 }
jpayne@69 31283 #endif
jpayne@69 31284 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
jpayne@69 31285 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
jpayne@69 31286 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 31287 if (nargs == 0 && kwargs == NULL) {
jpayne@69 31288 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
jpayne@69 31289 return __Pyx_PyObject_CallMethO(func, NULL);
jpayne@69 31290 }
jpayne@69 31291 else if (nargs == 1 && kwargs == NULL) {
jpayne@69 31292 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
jpayne@69 31293 return __Pyx_PyObject_CallMethO(func, args[0]);
jpayne@69 31294 }
jpayne@69 31295 #endif
jpayne@69 31296 #if PY_VERSION_HEX < 0x030800B1
jpayne@69 31297 #if CYTHON_FAST_PYCCALL
jpayne@69 31298 if (PyCFunction_Check(func)) {
jpayne@69 31299 if (kwargs) {
jpayne@69 31300 return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
jpayne@69 31301 } else {
jpayne@69 31302 return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
jpayne@69 31303 }
jpayne@69 31304 }
jpayne@69 31305 #if PY_VERSION_HEX >= 0x030700A1
jpayne@69 31306 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
jpayne@69 31307 return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
jpayne@69 31308 }
jpayne@69 31309 #endif
jpayne@69 31310 #endif
jpayne@69 31311 #if CYTHON_FAST_PYCALL
jpayne@69 31312 if (PyFunction_Check(func)) {
jpayne@69 31313 return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
jpayne@69 31314 }
jpayne@69 31315 #endif
jpayne@69 31316 #endif
jpayne@69 31317 if (kwargs == NULL) {
jpayne@69 31318 #if CYTHON_VECTORCALL
jpayne@69 31319 #if PY_VERSION_HEX < 0x03090000
jpayne@69 31320 vectorcallfunc f = _PyVectorcall_Function(func);
jpayne@69 31321 #else
jpayne@69 31322 vectorcallfunc f = PyVectorcall_Function(func);
jpayne@69 31323 #endif
jpayne@69 31324 if (f) {
jpayne@69 31325 return f(func, args, (size_t)nargs, NULL);
jpayne@69 31326 }
jpayne@69 31327 #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
jpayne@69 31328 if (__Pyx_CyFunction_CheckExact(func)) {
jpayne@69 31329 __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
jpayne@69 31330 if (f) return f(func, args, (size_t)nargs, NULL);
jpayne@69 31331 }
jpayne@69 31332 #endif
jpayne@69 31333 }
jpayne@69 31334 if (nargs == 0) {
jpayne@69 31335 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
jpayne@69 31336 }
jpayne@69 31337 #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 31338 return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
jpayne@69 31339 #else
jpayne@69 31340 return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
jpayne@69 31341 #endif
jpayne@69 31342 }
jpayne@69 31343
jpayne@69 31344 /* PyObjectCallOneArg */
jpayne@69 31345 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
jpayne@69 31346 PyObject *args[2] = {NULL, arg};
jpayne@69 31347 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
jpayne@69 31348 }
jpayne@69 31349
jpayne@69 31350 /* RaiseException */
jpayne@69 31351 #if PY_MAJOR_VERSION < 3
jpayne@69 31352 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
jpayne@69 31353 __Pyx_PyThreadState_declare
jpayne@69 31354 CYTHON_UNUSED_VAR(cause);
jpayne@69 31355 Py_XINCREF(type);
jpayne@69 31356 if (!value || value == Py_None)
jpayne@69 31357 value = NULL;
jpayne@69 31358 else
jpayne@69 31359 Py_INCREF(value);
jpayne@69 31360 if (!tb || tb == Py_None)
jpayne@69 31361 tb = NULL;
jpayne@69 31362 else {
jpayne@69 31363 Py_INCREF(tb);
jpayne@69 31364 if (!PyTraceBack_Check(tb)) {
jpayne@69 31365 PyErr_SetString(PyExc_TypeError,
jpayne@69 31366 "raise: arg 3 must be a traceback or None");
jpayne@69 31367 goto raise_error;
jpayne@69 31368 }
jpayne@69 31369 }
jpayne@69 31370 if (PyType_Check(type)) {
jpayne@69 31371 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 31372 if (!value) {
jpayne@69 31373 Py_INCREF(Py_None);
jpayne@69 31374 value = Py_None;
jpayne@69 31375 }
jpayne@69 31376 #endif
jpayne@69 31377 PyErr_NormalizeException(&type, &value, &tb);
jpayne@69 31378 } else {
jpayne@69 31379 if (value) {
jpayne@69 31380 PyErr_SetString(PyExc_TypeError,
jpayne@69 31381 "instance exception may not have a separate value");
jpayne@69 31382 goto raise_error;
jpayne@69 31383 }
jpayne@69 31384 value = type;
jpayne@69 31385 type = (PyObject*) Py_TYPE(type);
jpayne@69 31386 Py_INCREF(type);
jpayne@69 31387 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
jpayne@69 31388 PyErr_SetString(PyExc_TypeError,
jpayne@69 31389 "raise: exception class must be a subclass of BaseException");
jpayne@69 31390 goto raise_error;
jpayne@69 31391 }
jpayne@69 31392 }
jpayne@69 31393 __Pyx_PyThreadState_assign
jpayne@69 31394 __Pyx_ErrRestore(type, value, tb);
jpayne@69 31395 return;
jpayne@69 31396 raise_error:
jpayne@69 31397 Py_XDECREF(value);
jpayne@69 31398 Py_XDECREF(type);
jpayne@69 31399 Py_XDECREF(tb);
jpayne@69 31400 return;
jpayne@69 31401 }
jpayne@69 31402 #else
jpayne@69 31403 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
jpayne@69 31404 PyObject* owned_instance = NULL;
jpayne@69 31405 if (tb == Py_None) {
jpayne@69 31406 tb = 0;
jpayne@69 31407 } else if (tb && !PyTraceBack_Check(tb)) {
jpayne@69 31408 PyErr_SetString(PyExc_TypeError,
jpayne@69 31409 "raise: arg 3 must be a traceback or None");
jpayne@69 31410 goto bad;
jpayne@69 31411 }
jpayne@69 31412 if (value == Py_None)
jpayne@69 31413 value = 0;
jpayne@69 31414 if (PyExceptionInstance_Check(type)) {
jpayne@69 31415 if (value) {
jpayne@69 31416 PyErr_SetString(PyExc_TypeError,
jpayne@69 31417 "instance exception may not have a separate value");
jpayne@69 31418 goto bad;
jpayne@69 31419 }
jpayne@69 31420 value = type;
jpayne@69 31421 type = (PyObject*) Py_TYPE(value);
jpayne@69 31422 } else if (PyExceptionClass_Check(type)) {
jpayne@69 31423 PyObject *instance_class = NULL;
jpayne@69 31424 if (value && PyExceptionInstance_Check(value)) {
jpayne@69 31425 instance_class = (PyObject*) Py_TYPE(value);
jpayne@69 31426 if (instance_class != type) {
jpayne@69 31427 int is_subclass = PyObject_IsSubclass(instance_class, type);
jpayne@69 31428 if (!is_subclass) {
jpayne@69 31429 instance_class = NULL;
jpayne@69 31430 } else if (unlikely(is_subclass == -1)) {
jpayne@69 31431 goto bad;
jpayne@69 31432 } else {
jpayne@69 31433 type = instance_class;
jpayne@69 31434 }
jpayne@69 31435 }
jpayne@69 31436 }
jpayne@69 31437 if (!instance_class) {
jpayne@69 31438 PyObject *args;
jpayne@69 31439 if (!value)
jpayne@69 31440 args = PyTuple_New(0);
jpayne@69 31441 else if (PyTuple_Check(value)) {
jpayne@69 31442 Py_INCREF(value);
jpayne@69 31443 args = value;
jpayne@69 31444 } else
jpayne@69 31445 args = PyTuple_Pack(1, value);
jpayne@69 31446 if (!args)
jpayne@69 31447 goto bad;
jpayne@69 31448 owned_instance = PyObject_Call(type, args, NULL);
jpayne@69 31449 Py_DECREF(args);
jpayne@69 31450 if (!owned_instance)
jpayne@69 31451 goto bad;
jpayne@69 31452 value = owned_instance;
jpayne@69 31453 if (!PyExceptionInstance_Check(value)) {
jpayne@69 31454 PyErr_Format(PyExc_TypeError,
jpayne@69 31455 "calling %R should have returned an instance of "
jpayne@69 31456 "BaseException, not %R",
jpayne@69 31457 type, Py_TYPE(value));
jpayne@69 31458 goto bad;
jpayne@69 31459 }
jpayne@69 31460 }
jpayne@69 31461 } else {
jpayne@69 31462 PyErr_SetString(PyExc_TypeError,
jpayne@69 31463 "raise: exception class must be a subclass of BaseException");
jpayne@69 31464 goto bad;
jpayne@69 31465 }
jpayne@69 31466 if (cause) {
jpayne@69 31467 PyObject *fixed_cause;
jpayne@69 31468 if (cause == Py_None) {
jpayne@69 31469 fixed_cause = NULL;
jpayne@69 31470 } else if (PyExceptionClass_Check(cause)) {
jpayne@69 31471 fixed_cause = PyObject_CallObject(cause, NULL);
jpayne@69 31472 if (fixed_cause == NULL)
jpayne@69 31473 goto bad;
jpayne@69 31474 } else if (PyExceptionInstance_Check(cause)) {
jpayne@69 31475 fixed_cause = cause;
jpayne@69 31476 Py_INCREF(fixed_cause);
jpayne@69 31477 } else {
jpayne@69 31478 PyErr_SetString(PyExc_TypeError,
jpayne@69 31479 "exception causes must derive from "
jpayne@69 31480 "BaseException");
jpayne@69 31481 goto bad;
jpayne@69 31482 }
jpayne@69 31483 PyException_SetCause(value, fixed_cause);
jpayne@69 31484 }
jpayne@69 31485 PyErr_SetObject(type, value);
jpayne@69 31486 if (tb) {
jpayne@69 31487 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 31488 PyException_SetTraceback(value, tb);
jpayne@69 31489 #elif CYTHON_FAST_THREAD_STATE
jpayne@69 31490 PyThreadState *tstate = __Pyx_PyThreadState_Current;
jpayne@69 31491 PyObject* tmp_tb = tstate->curexc_traceback;
jpayne@69 31492 if (tb != tmp_tb) {
jpayne@69 31493 Py_INCREF(tb);
jpayne@69 31494 tstate->curexc_traceback = tb;
jpayne@69 31495 Py_XDECREF(tmp_tb);
jpayne@69 31496 }
jpayne@69 31497 #else
jpayne@69 31498 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@69 31499 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
jpayne@69 31500 Py_INCREF(tb);
jpayne@69 31501 PyErr_Restore(tmp_type, tmp_value, tb);
jpayne@69 31502 Py_XDECREF(tmp_tb);
jpayne@69 31503 #endif
jpayne@69 31504 }
jpayne@69 31505 bad:
jpayne@69 31506 Py_XDECREF(owned_instance);
jpayne@69 31507 return;
jpayne@69 31508 }
jpayne@69 31509 #endif
jpayne@69 31510
jpayne@69 31511 /* GetAttr3 */
jpayne@69 31512 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
jpayne@69 31513 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
jpayne@69 31514 __Pyx_PyThreadState_declare
jpayne@69 31515 __Pyx_PyThreadState_assign
jpayne@69 31516 if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
jpayne@69 31517 return NULL;
jpayne@69 31518 __Pyx_PyErr_Clear();
jpayne@69 31519 Py_INCREF(d);
jpayne@69 31520 return d;
jpayne@69 31521 }
jpayne@69 31522 #endif
jpayne@69 31523 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
jpayne@69 31524 PyObject *r;
jpayne@69 31525 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
jpayne@69 31526 int res = PyObject_GetOptionalAttr(o, n, &r);
jpayne@69 31527 return (res != 0) ? r : __Pyx_NewRef(d);
jpayne@69 31528 #else
jpayne@69 31529 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 31530 if (likely(PyString_Check(n))) {
jpayne@69 31531 r = __Pyx_PyObject_GetAttrStrNoError(o, n);
jpayne@69 31532 if (unlikely(!r) && likely(!PyErr_Occurred())) {
jpayne@69 31533 r = __Pyx_NewRef(d);
jpayne@69 31534 }
jpayne@69 31535 return r;
jpayne@69 31536 }
jpayne@69 31537 #endif
jpayne@69 31538 r = PyObject_GetAttr(o, n);
jpayne@69 31539 return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
jpayne@69 31540 #endif
jpayne@69 31541 }
jpayne@69 31542
jpayne@69 31543 /* PyDictVersioning */
jpayne@69 31544 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
jpayne@69 31545 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
jpayne@69 31546 PyObject *dict = Py_TYPE(obj)->tp_dict;
jpayne@69 31547 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
jpayne@69 31548 }
jpayne@69 31549 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
jpayne@69 31550 PyObject **dictptr = NULL;
jpayne@69 31551 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
jpayne@69 31552 if (offset) {
jpayne@69 31553 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 31554 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
jpayne@69 31555 #else
jpayne@69 31556 dictptr = _PyObject_GetDictPtr(obj);
jpayne@69 31557 #endif
jpayne@69 31558 }
jpayne@69 31559 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
jpayne@69 31560 }
jpayne@69 31561 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
jpayne@69 31562 PyObject *dict = Py_TYPE(obj)->tp_dict;
jpayne@69 31563 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
jpayne@69 31564 return 0;
jpayne@69 31565 return obj_dict_version == __Pyx_get_object_dict_version(obj);
jpayne@69 31566 }
jpayne@69 31567 #endif
jpayne@69 31568
jpayne@69 31569 /* GetModuleGlobalName */
jpayne@69 31570 #if CYTHON_USE_DICT_VERSIONS
jpayne@69 31571 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
jpayne@69 31572 #else
jpayne@69 31573 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
jpayne@69 31574 #endif
jpayne@69 31575 {
jpayne@69 31576 PyObject *result;
jpayne@69 31577 #if !CYTHON_AVOID_BORROWED_REFS
jpayne@69 31578 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
jpayne@69 31579 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
jpayne@69 31580 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
jpayne@69 31581 if (likely(result)) {
jpayne@69 31582 return __Pyx_NewRef(result);
jpayne@69 31583 } else if (unlikely(PyErr_Occurred())) {
jpayne@69 31584 return NULL;
jpayne@69 31585 }
jpayne@69 31586 #elif CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 31587 if (unlikely(!__pyx_m)) {
jpayne@69 31588 return NULL;
jpayne@69 31589 }
jpayne@69 31590 result = PyObject_GetAttr(__pyx_m, name);
jpayne@69 31591 if (likely(result)) {
jpayne@69 31592 return result;
jpayne@69 31593 }
jpayne@69 31594 #else
jpayne@69 31595 result = PyDict_GetItem(__pyx_d, name);
jpayne@69 31596 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
jpayne@69 31597 if (likely(result)) {
jpayne@69 31598 return __Pyx_NewRef(result);
jpayne@69 31599 }
jpayne@69 31600 #endif
jpayne@69 31601 #else
jpayne@69 31602 result = PyObject_GetItem(__pyx_d, name);
jpayne@69 31603 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
jpayne@69 31604 if (likely(result)) {
jpayne@69 31605 return __Pyx_NewRef(result);
jpayne@69 31606 }
jpayne@69 31607 PyErr_Clear();
jpayne@69 31608 #endif
jpayne@69 31609 return __Pyx_GetBuiltinName(name);
jpayne@69 31610 }
jpayne@69 31611
jpayne@69 31612 /* RaiseUnexpectedTypeError */
jpayne@69 31613 static int
jpayne@69 31614 __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
jpayne@69 31615 {
jpayne@69 31616 __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
jpayne@69 31617 PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
jpayne@69 31618 expected, obj_type_name);
jpayne@69 31619 __Pyx_DECREF_TypeName(obj_type_name);
jpayne@69 31620 return 0;
jpayne@69 31621 }
jpayne@69 31622
jpayne@69 31623 /* ExtTypeTest */
jpayne@69 31624 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
jpayne@69 31625 __Pyx_TypeName obj_type_name;
jpayne@69 31626 __Pyx_TypeName type_name;
jpayne@69 31627 if (unlikely(!type)) {
jpayne@69 31628 PyErr_SetString(PyExc_SystemError, "Missing type object");
jpayne@69 31629 return 0;
jpayne@69 31630 }
jpayne@69 31631 if (likely(__Pyx_TypeCheck(obj, type)))
jpayne@69 31632 return 1;
jpayne@69 31633 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
jpayne@69 31634 type_name = __Pyx_PyType_GetName(type);
jpayne@69 31635 PyErr_Format(PyExc_TypeError,
jpayne@69 31636 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
jpayne@69 31637 obj_type_name, type_name);
jpayne@69 31638 __Pyx_DECREF_TypeName(obj_type_name);
jpayne@69 31639 __Pyx_DECREF_TypeName(type_name);
jpayne@69 31640 return 0;
jpayne@69 31641 }
jpayne@69 31642
jpayne@69 31643 /* PyIntBinop */
jpayne@69 31644 #if !CYTHON_COMPILING_IN_PYPY
jpayne@69 31645 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
jpayne@69 31646 CYTHON_MAYBE_UNUSED_VAR(intval);
jpayne@69 31647 CYTHON_MAYBE_UNUSED_VAR(inplace);
jpayne@69 31648 CYTHON_UNUSED_VAR(zerodivision_check);
jpayne@69 31649 #if PY_MAJOR_VERSION < 3
jpayne@69 31650 if (likely(PyInt_CheckExact(op1))) {
jpayne@69 31651 const long b = intval;
jpayne@69 31652 long x;
jpayne@69 31653 long a = PyInt_AS_LONG(op1);
jpayne@69 31654
jpayne@69 31655 x = (long)((unsigned long)a + (unsigned long)b);
jpayne@69 31656 if (likely((x^a) >= 0 || (x^b) >= 0))
jpayne@69 31657 return PyInt_FromLong(x);
jpayne@69 31658 return PyLong_Type.tp_as_number->nb_add(op1, op2);
jpayne@69 31659 }
jpayne@69 31660 #endif
jpayne@69 31661 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 31662 if (likely(PyLong_CheckExact(op1))) {
jpayne@69 31663 const long b = intval;
jpayne@69 31664 long a, x;
jpayne@69 31665 #ifdef HAVE_LONG_LONG
jpayne@69 31666 const PY_LONG_LONG llb = intval;
jpayne@69 31667 PY_LONG_LONG lla, llx;
jpayne@69 31668 #endif
jpayne@69 31669 if (unlikely(__Pyx_PyLong_IsZero(op1))) {
jpayne@69 31670 return __Pyx_NewRef(op2);
jpayne@69 31671 }
jpayne@69 31672 if (likely(__Pyx_PyLong_IsCompact(op1))) {
jpayne@69 31673 a = __Pyx_PyLong_CompactValue(op1);
jpayne@69 31674 } else {
jpayne@69 31675 const digit* digits = __Pyx_PyLong_Digits(op1);
jpayne@69 31676 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
jpayne@69 31677 switch (size) {
jpayne@69 31678 case -2:
jpayne@69 31679 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
jpayne@69 31680 a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
jpayne@69 31681 break;
jpayne@69 31682 #ifdef HAVE_LONG_LONG
jpayne@69 31683 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
jpayne@69 31684 lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
jpayne@69 31685 goto long_long;
jpayne@69 31686 #endif
jpayne@69 31687 }
jpayne@69 31688 CYTHON_FALLTHROUGH;
jpayne@69 31689 case 2:
jpayne@69 31690 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
jpayne@69 31691 a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
jpayne@69 31692 break;
jpayne@69 31693 #ifdef HAVE_LONG_LONG
jpayne@69 31694 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
jpayne@69 31695 lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
jpayne@69 31696 goto long_long;
jpayne@69 31697 #endif
jpayne@69 31698 }
jpayne@69 31699 CYTHON_FALLTHROUGH;
jpayne@69 31700 case -3:
jpayne@69 31701 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
jpayne@69 31702 a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
jpayne@69 31703 break;
jpayne@69 31704 #ifdef HAVE_LONG_LONG
jpayne@69 31705 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
jpayne@69 31706 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]));
jpayne@69 31707 goto long_long;
jpayne@69 31708 #endif
jpayne@69 31709 }
jpayne@69 31710 CYTHON_FALLTHROUGH;
jpayne@69 31711 case 3:
jpayne@69 31712 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
jpayne@69 31713 a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
jpayne@69 31714 break;
jpayne@69 31715 #ifdef HAVE_LONG_LONG
jpayne@69 31716 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
jpayne@69 31717 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]));
jpayne@69 31718 goto long_long;
jpayne@69 31719 #endif
jpayne@69 31720 }
jpayne@69 31721 CYTHON_FALLTHROUGH;
jpayne@69 31722 case -4:
jpayne@69 31723 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
jpayne@69 31724 a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
jpayne@69 31725 break;
jpayne@69 31726 #ifdef HAVE_LONG_LONG
jpayne@69 31727 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
jpayne@69 31728 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]));
jpayne@69 31729 goto long_long;
jpayne@69 31730 #endif
jpayne@69 31731 }
jpayne@69 31732 CYTHON_FALLTHROUGH;
jpayne@69 31733 case 4:
jpayne@69 31734 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
jpayne@69 31735 a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
jpayne@69 31736 break;
jpayne@69 31737 #ifdef HAVE_LONG_LONG
jpayne@69 31738 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
jpayne@69 31739 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]));
jpayne@69 31740 goto long_long;
jpayne@69 31741 #endif
jpayne@69 31742 }
jpayne@69 31743 CYTHON_FALLTHROUGH;
jpayne@69 31744 default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
jpayne@69 31745 }
jpayne@69 31746 }
jpayne@69 31747 x = a + b;
jpayne@69 31748 return PyLong_FromLong(x);
jpayne@69 31749 #ifdef HAVE_LONG_LONG
jpayne@69 31750 long_long:
jpayne@69 31751 llx = lla + llb;
jpayne@69 31752 return PyLong_FromLongLong(llx);
jpayne@69 31753 #endif
jpayne@69 31754
jpayne@69 31755
jpayne@69 31756 }
jpayne@69 31757 #endif
jpayne@69 31758 if (PyFloat_CheckExact(op1)) {
jpayne@69 31759 const long b = intval;
jpayne@69 31760 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 31761 double a = __pyx_PyFloat_AsDouble(op1);
jpayne@69 31762 #else
jpayne@69 31763 double a = PyFloat_AS_DOUBLE(op1);
jpayne@69 31764 #endif
jpayne@69 31765 double result;
jpayne@69 31766
jpayne@69 31767 PyFPE_START_PROTECT("add", return NULL)
jpayne@69 31768 result = ((double)a) + (double)b;
jpayne@69 31769 PyFPE_END_PROTECT(result)
jpayne@69 31770 return PyFloat_FromDouble(result);
jpayne@69 31771 }
jpayne@69 31772 return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
jpayne@69 31773 }
jpayne@69 31774 #endif
jpayne@69 31775
jpayne@69 31776 /* WriteUnraisableException */
jpayne@69 31777 static void __Pyx_WriteUnraisable(const char *name, int clineno,
jpayne@69 31778 int lineno, const char *filename,
jpayne@69 31779 int full_traceback, int nogil) {
jpayne@69 31780 PyObject *old_exc, *old_val, *old_tb;
jpayne@69 31781 PyObject *ctx;
jpayne@69 31782 __Pyx_PyThreadState_declare
jpayne@69 31783 #ifdef WITH_THREAD
jpayne@69 31784 PyGILState_STATE state;
jpayne@69 31785 if (nogil)
jpayne@69 31786 state = PyGILState_Ensure();
jpayne@69 31787 else state = (PyGILState_STATE)0;
jpayne@69 31788 #endif
jpayne@69 31789 CYTHON_UNUSED_VAR(clineno);
jpayne@69 31790 CYTHON_UNUSED_VAR(lineno);
jpayne@69 31791 CYTHON_UNUSED_VAR(filename);
jpayne@69 31792 CYTHON_MAYBE_UNUSED_VAR(nogil);
jpayne@69 31793 __Pyx_PyThreadState_assign
jpayne@69 31794 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
jpayne@69 31795 if (full_traceback) {
jpayne@69 31796 Py_XINCREF(old_exc);
jpayne@69 31797 Py_XINCREF(old_val);
jpayne@69 31798 Py_XINCREF(old_tb);
jpayne@69 31799 __Pyx_ErrRestore(old_exc, old_val, old_tb);
jpayne@69 31800 PyErr_PrintEx(0);
jpayne@69 31801 }
jpayne@69 31802 #if PY_MAJOR_VERSION < 3
jpayne@69 31803 ctx = PyString_FromString(name);
jpayne@69 31804 #else
jpayne@69 31805 ctx = PyUnicode_FromString(name);
jpayne@69 31806 #endif
jpayne@69 31807 __Pyx_ErrRestore(old_exc, old_val, old_tb);
jpayne@69 31808 if (!ctx) {
jpayne@69 31809 PyErr_WriteUnraisable(Py_None);
jpayne@69 31810 } else {
jpayne@69 31811 PyErr_WriteUnraisable(ctx);
jpayne@69 31812 Py_DECREF(ctx);
jpayne@69 31813 }
jpayne@69 31814 #ifdef WITH_THREAD
jpayne@69 31815 if (nogil)
jpayne@69 31816 PyGILState_Release(state);
jpayne@69 31817 #endif
jpayne@69 31818 }
jpayne@69 31819
jpayne@69 31820 /* PyObjectCallNoArg */
jpayne@69 31821 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
jpayne@69 31822 PyObject *arg[2] = {NULL, NULL};
jpayne@69 31823 return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
jpayne@69 31824 }
jpayne@69 31825
jpayne@69 31826 /* ArgTypeTest */
jpayne@69 31827 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
jpayne@69 31828 {
jpayne@69 31829 __Pyx_TypeName type_name;
jpayne@69 31830 __Pyx_TypeName obj_type_name;
jpayne@69 31831 if (unlikely(!type)) {
jpayne@69 31832 PyErr_SetString(PyExc_SystemError, "Missing type object");
jpayne@69 31833 return 0;
jpayne@69 31834 }
jpayne@69 31835 else if (exact) {
jpayne@69 31836 #if PY_MAJOR_VERSION == 2
jpayne@69 31837 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
jpayne@69 31838 #endif
jpayne@69 31839 }
jpayne@69 31840 else {
jpayne@69 31841 if (likely(__Pyx_TypeCheck(obj, type))) return 1;
jpayne@69 31842 }
jpayne@69 31843 type_name = __Pyx_PyType_GetName(type);
jpayne@69 31844 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
jpayne@69 31845 PyErr_Format(PyExc_TypeError,
jpayne@69 31846 "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
jpayne@69 31847 ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
jpayne@69 31848 __Pyx_DECREF_TypeName(type_name);
jpayne@69 31849 __Pyx_DECREF_TypeName(obj_type_name);
jpayne@69 31850 return 0;
jpayne@69 31851 }
jpayne@69 31852
jpayne@69 31853 /* PyObjectFormatAndDecref */
jpayne@69 31854 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
jpayne@69 31855 if (unlikely(!s)) return NULL;
jpayne@69 31856 if (likely(PyUnicode_CheckExact(s))) return s;
jpayne@69 31857 #if PY_MAJOR_VERSION < 3
jpayne@69 31858 if (likely(PyString_CheckExact(s))) {
jpayne@69 31859 PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
jpayne@69 31860 Py_DECREF(s);
jpayne@69 31861 return result;
jpayne@69 31862 }
jpayne@69 31863 #endif
jpayne@69 31864 return __Pyx_PyObject_FormatAndDecref(s, f);
jpayne@69 31865 }
jpayne@69 31866 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
jpayne@69 31867 PyObject *result;
jpayne@69 31868 if (unlikely(!s)) return NULL;
jpayne@69 31869 result = PyObject_Format(s, f);
jpayne@69 31870 Py_DECREF(s);
jpayne@69 31871 return result;
jpayne@69 31872 }
jpayne@69 31873
jpayne@69 31874 /* JoinPyUnicode */
jpayne@69 31875 static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
jpayne@69 31876 Py_UCS4 max_char) {
jpayne@69 31877 #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 31878 PyObject *result_uval;
jpayne@69 31879 int result_ukind, kind_shift;
jpayne@69 31880 Py_ssize_t i, char_pos;
jpayne@69 31881 void *result_udata;
jpayne@69 31882 CYTHON_MAYBE_UNUSED_VAR(max_char);
jpayne@69 31883 #if CYTHON_PEP393_ENABLED
jpayne@69 31884 result_uval = PyUnicode_New(result_ulength, max_char);
jpayne@69 31885 if (unlikely(!result_uval)) return NULL;
jpayne@69 31886 result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
jpayne@69 31887 kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
jpayne@69 31888 result_udata = PyUnicode_DATA(result_uval);
jpayne@69 31889 #else
jpayne@69 31890 result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
jpayne@69 31891 if (unlikely(!result_uval)) return NULL;
jpayne@69 31892 result_ukind = sizeof(Py_UNICODE);
jpayne@69 31893 kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
jpayne@69 31894 result_udata = PyUnicode_AS_UNICODE(result_uval);
jpayne@69 31895 #endif
jpayne@69 31896 assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
jpayne@69 31897 char_pos = 0;
jpayne@69 31898 for (i=0; i < value_count; i++) {
jpayne@69 31899 int ukind;
jpayne@69 31900 Py_ssize_t ulength;
jpayne@69 31901 void *udata;
jpayne@69 31902 PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
jpayne@69 31903 if (unlikely(__Pyx_PyUnicode_READY(uval)))
jpayne@69 31904 goto bad;
jpayne@69 31905 ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
jpayne@69 31906 if (unlikely(!ulength))
jpayne@69 31907 continue;
jpayne@69 31908 if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
jpayne@69 31909 goto overflow;
jpayne@69 31910 ukind = __Pyx_PyUnicode_KIND(uval);
jpayne@69 31911 udata = __Pyx_PyUnicode_DATA(uval);
jpayne@69 31912 if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
jpayne@69 31913 memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
jpayne@69 31914 } else {
jpayne@69 31915 #if PY_VERSION_HEX >= 0x030d0000
jpayne@69 31916 if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
jpayne@69 31917 #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
jpayne@69 31918 _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
jpayne@69 31919 #else
jpayne@69 31920 Py_ssize_t j;
jpayne@69 31921 for (j=0; j < ulength; j++) {
jpayne@69 31922 Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
jpayne@69 31923 __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
jpayne@69 31924 }
jpayne@69 31925 #endif
jpayne@69 31926 }
jpayne@69 31927 char_pos += ulength;
jpayne@69 31928 }
jpayne@69 31929 return result_uval;
jpayne@69 31930 overflow:
jpayne@69 31931 PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
jpayne@69 31932 bad:
jpayne@69 31933 Py_DECREF(result_uval);
jpayne@69 31934 return NULL;
jpayne@69 31935 #else
jpayne@69 31936 CYTHON_UNUSED_VAR(max_char);
jpayne@69 31937 CYTHON_UNUSED_VAR(result_ulength);
jpayne@69 31938 CYTHON_UNUSED_VAR(value_count);
jpayne@69 31939 return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
jpayne@69 31940 #endif
jpayne@69 31941 }
jpayne@69 31942
jpayne@69 31943 /* DictGetItem */
jpayne@69 31944 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
jpayne@69 31945 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
jpayne@69 31946 PyObject *value;
jpayne@69 31947 value = PyDict_GetItemWithError(d, key);
jpayne@69 31948 if (unlikely(!value)) {
jpayne@69 31949 if (!PyErr_Occurred()) {
jpayne@69 31950 if (unlikely(PyTuple_Check(key))) {
jpayne@69 31951 PyObject* args = PyTuple_Pack(1, key);
jpayne@69 31952 if (likely(args)) {
jpayne@69 31953 PyErr_SetObject(PyExc_KeyError, args);
jpayne@69 31954 Py_DECREF(args);
jpayne@69 31955 }
jpayne@69 31956 } else {
jpayne@69 31957 PyErr_SetObject(PyExc_KeyError, key);
jpayne@69 31958 }
jpayne@69 31959 }
jpayne@69 31960 return NULL;
jpayne@69 31961 }
jpayne@69 31962 Py_INCREF(value);
jpayne@69 31963 return value;
jpayne@69 31964 }
jpayne@69 31965 #endif
jpayne@69 31966
jpayne@69 31967 /* GetTopmostException */
jpayne@69 31968 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
jpayne@69 31969 static _PyErr_StackItem *
jpayne@69 31970 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
jpayne@69 31971 {
jpayne@69 31972 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@69 31973 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
jpayne@69 31974 exc_info->previous_item != NULL)
jpayne@69 31975 {
jpayne@69 31976 exc_info = exc_info->previous_item;
jpayne@69 31977 }
jpayne@69 31978 return exc_info;
jpayne@69 31979 }
jpayne@69 31980 #endif
jpayne@69 31981
jpayne@69 31982 /* SaveResetException */
jpayne@69 31983 #if CYTHON_FAST_THREAD_STATE
jpayne@69 31984 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
jpayne@69 31985 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
jpayne@69 31986 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
jpayne@69 31987 PyObject *exc_value = exc_info->exc_value;
jpayne@69 31988 if (exc_value == NULL || exc_value == Py_None) {
jpayne@69 31989 *value = NULL;
jpayne@69 31990 *type = NULL;
jpayne@69 31991 *tb = NULL;
jpayne@69 31992 } else {
jpayne@69 31993 *value = exc_value;
jpayne@69 31994 Py_INCREF(*value);
jpayne@69 31995 *type = (PyObject*) Py_TYPE(exc_value);
jpayne@69 31996 Py_INCREF(*type);
jpayne@69 31997 *tb = PyException_GetTraceback(exc_value);
jpayne@69 31998 }
jpayne@69 31999 #elif CYTHON_USE_EXC_INFO_STACK
jpayne@69 32000 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
jpayne@69 32001 *type = exc_info->exc_type;
jpayne@69 32002 *value = exc_info->exc_value;
jpayne@69 32003 *tb = exc_info->exc_traceback;
jpayne@69 32004 Py_XINCREF(*type);
jpayne@69 32005 Py_XINCREF(*value);
jpayne@69 32006 Py_XINCREF(*tb);
jpayne@69 32007 #else
jpayne@69 32008 *type = tstate->exc_type;
jpayne@69 32009 *value = tstate->exc_value;
jpayne@69 32010 *tb = tstate->exc_traceback;
jpayne@69 32011 Py_XINCREF(*type);
jpayne@69 32012 Py_XINCREF(*value);
jpayne@69 32013 Py_XINCREF(*tb);
jpayne@69 32014 #endif
jpayne@69 32015 }
jpayne@69 32016 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
jpayne@69 32017 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
jpayne@69 32018 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@69 32019 PyObject *tmp_value = exc_info->exc_value;
jpayne@69 32020 exc_info->exc_value = value;
jpayne@69 32021 Py_XDECREF(tmp_value);
jpayne@69 32022 Py_XDECREF(type);
jpayne@69 32023 Py_XDECREF(tb);
jpayne@69 32024 #else
jpayne@69 32025 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@69 32026 #if CYTHON_USE_EXC_INFO_STACK
jpayne@69 32027 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@69 32028 tmp_type = exc_info->exc_type;
jpayne@69 32029 tmp_value = exc_info->exc_value;
jpayne@69 32030 tmp_tb = exc_info->exc_traceback;
jpayne@69 32031 exc_info->exc_type = type;
jpayne@69 32032 exc_info->exc_value = value;
jpayne@69 32033 exc_info->exc_traceback = tb;
jpayne@69 32034 #else
jpayne@69 32035 tmp_type = tstate->exc_type;
jpayne@69 32036 tmp_value = tstate->exc_value;
jpayne@69 32037 tmp_tb = tstate->exc_traceback;
jpayne@69 32038 tstate->exc_type = type;
jpayne@69 32039 tstate->exc_value = value;
jpayne@69 32040 tstate->exc_traceback = tb;
jpayne@69 32041 #endif
jpayne@69 32042 Py_XDECREF(tmp_type);
jpayne@69 32043 Py_XDECREF(tmp_value);
jpayne@69 32044 Py_XDECREF(tmp_tb);
jpayne@69 32045 #endif
jpayne@69 32046 }
jpayne@69 32047 #endif
jpayne@69 32048
jpayne@69 32049 /* GetException */
jpayne@69 32050 #if CYTHON_FAST_THREAD_STATE
jpayne@69 32051 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
jpayne@69 32052 #else
jpayne@69 32053 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
jpayne@69 32054 #endif
jpayne@69 32055 {
jpayne@69 32056 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
jpayne@69 32057 #if CYTHON_FAST_THREAD_STATE
jpayne@69 32058 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@69 32059 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 32060 local_value = tstate->current_exception;
jpayne@69 32061 tstate->current_exception = 0;
jpayne@69 32062 if (likely(local_value)) {
jpayne@69 32063 local_type = (PyObject*) Py_TYPE(local_value);
jpayne@69 32064 Py_INCREF(local_type);
jpayne@69 32065 local_tb = PyException_GetTraceback(local_value);
jpayne@69 32066 }
jpayne@69 32067 #else
jpayne@69 32068 local_type = tstate->curexc_type;
jpayne@69 32069 local_value = tstate->curexc_value;
jpayne@69 32070 local_tb = tstate->curexc_traceback;
jpayne@69 32071 tstate->curexc_type = 0;
jpayne@69 32072 tstate->curexc_value = 0;
jpayne@69 32073 tstate->curexc_traceback = 0;
jpayne@69 32074 #endif
jpayne@69 32075 #else
jpayne@69 32076 PyErr_Fetch(&local_type, &local_value, &local_tb);
jpayne@69 32077 #endif
jpayne@69 32078 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
jpayne@69 32079 #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
jpayne@69 32080 if (unlikely(tstate->current_exception))
jpayne@69 32081 #elif CYTHON_FAST_THREAD_STATE
jpayne@69 32082 if (unlikely(tstate->curexc_type))
jpayne@69 32083 #else
jpayne@69 32084 if (unlikely(PyErr_Occurred()))
jpayne@69 32085 #endif
jpayne@69 32086 goto bad;
jpayne@69 32087 #if PY_MAJOR_VERSION >= 3
jpayne@69 32088 if (local_tb) {
jpayne@69 32089 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
jpayne@69 32090 goto bad;
jpayne@69 32091 }
jpayne@69 32092 #endif
jpayne@69 32093 Py_XINCREF(local_tb);
jpayne@69 32094 Py_XINCREF(local_type);
jpayne@69 32095 Py_XINCREF(local_value);
jpayne@69 32096 *type = local_type;
jpayne@69 32097 *value = local_value;
jpayne@69 32098 *tb = local_tb;
jpayne@69 32099 #if CYTHON_FAST_THREAD_STATE
jpayne@69 32100 #if CYTHON_USE_EXC_INFO_STACK
jpayne@69 32101 {
jpayne@69 32102 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@69 32103 #if PY_VERSION_HEX >= 0x030B00a4
jpayne@69 32104 tmp_value = exc_info->exc_value;
jpayne@69 32105 exc_info->exc_value = local_value;
jpayne@69 32106 tmp_type = NULL;
jpayne@69 32107 tmp_tb = NULL;
jpayne@69 32108 Py_XDECREF(local_type);
jpayne@69 32109 Py_XDECREF(local_tb);
jpayne@69 32110 #else
jpayne@69 32111 tmp_type = exc_info->exc_type;
jpayne@69 32112 tmp_value = exc_info->exc_value;
jpayne@69 32113 tmp_tb = exc_info->exc_traceback;
jpayne@69 32114 exc_info->exc_type = local_type;
jpayne@69 32115 exc_info->exc_value = local_value;
jpayne@69 32116 exc_info->exc_traceback = local_tb;
jpayne@69 32117 #endif
jpayne@69 32118 }
jpayne@69 32119 #else
jpayne@69 32120 tmp_type = tstate->exc_type;
jpayne@69 32121 tmp_value = tstate->exc_value;
jpayne@69 32122 tmp_tb = tstate->exc_traceback;
jpayne@69 32123 tstate->exc_type = local_type;
jpayne@69 32124 tstate->exc_value = local_value;
jpayne@69 32125 tstate->exc_traceback = local_tb;
jpayne@69 32126 #endif
jpayne@69 32127 Py_XDECREF(tmp_type);
jpayne@69 32128 Py_XDECREF(tmp_value);
jpayne@69 32129 Py_XDECREF(tmp_tb);
jpayne@69 32130 #else
jpayne@69 32131 PyErr_SetExcInfo(local_type, local_value, local_tb);
jpayne@69 32132 #endif
jpayne@69 32133 return 0;
jpayne@69 32134 bad:
jpayne@69 32135 *type = 0;
jpayne@69 32136 *value = 0;
jpayne@69 32137 *tb = 0;
jpayne@69 32138 Py_XDECREF(local_type);
jpayne@69 32139 Py_XDECREF(local_value);
jpayne@69 32140 Py_XDECREF(local_tb);
jpayne@69 32141 return -1;
jpayne@69 32142 }
jpayne@69 32143
jpayne@69 32144 /* UnpackUnboundCMethod */
jpayne@69 32145 static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
jpayne@69 32146 PyObject *result;
jpayne@69 32147 PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
jpayne@69 32148 if (unlikely(!selfless_args)) return NULL;
jpayne@69 32149 result = PyObject_Call(method, selfless_args, kwargs);
jpayne@69 32150 Py_DECREF(selfless_args);
jpayne@69 32151 return result;
jpayne@69 32152 }
jpayne@69 32153 static PyMethodDef __Pyx_UnboundCMethod_Def = {
jpayne@69 32154 "CythonUnboundCMethod",
jpayne@69 32155 __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
jpayne@69 32156 METH_VARARGS | METH_KEYWORDS,
jpayne@69 32157 NULL
jpayne@69 32158 };
jpayne@69 32159 static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
jpayne@69 32160 PyObject *method;
jpayne@69 32161 method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
jpayne@69 32162 if (unlikely(!method))
jpayne@69 32163 return -1;
jpayne@69 32164 target->method = method;
jpayne@69 32165 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 32166 #if PY_MAJOR_VERSION >= 3
jpayne@69 32167 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
jpayne@69 32168 #else
jpayne@69 32169 if (likely(!__Pyx_CyOrPyCFunction_Check(method)))
jpayne@69 32170 #endif
jpayne@69 32171 {
jpayne@69 32172 PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
jpayne@69 32173 target->func = descr->d_method->ml_meth;
jpayne@69 32174 target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
jpayne@69 32175 } else
jpayne@69 32176 #endif
jpayne@69 32177 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 32178 #else
jpayne@69 32179 if (PyCFunction_Check(method))
jpayne@69 32180 #endif
jpayne@69 32181 {
jpayne@69 32182 PyObject *self;
jpayne@69 32183 int self_found;
jpayne@69 32184 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
jpayne@69 32185 self = PyObject_GetAttrString(method, "__self__");
jpayne@69 32186 if (!self) {
jpayne@69 32187 PyErr_Clear();
jpayne@69 32188 }
jpayne@69 32189 #else
jpayne@69 32190 self = PyCFunction_GET_SELF(method);
jpayne@69 32191 #endif
jpayne@69 32192 self_found = (self && self != Py_None);
jpayne@69 32193 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
jpayne@69 32194 Py_XDECREF(self);
jpayne@69 32195 #endif
jpayne@69 32196 if (self_found) {
jpayne@69 32197 PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
jpayne@69 32198 if (unlikely(!unbound_method)) return -1;
jpayne@69 32199 Py_DECREF(method);
jpayne@69 32200 target->method = unbound_method;
jpayne@69 32201 }
jpayne@69 32202 }
jpayne@69 32203 return 0;
jpayne@69 32204 }
jpayne@69 32205
jpayne@69 32206 /* CallUnboundCMethod0 */
jpayne@69 32207 static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
jpayne@69 32208 PyObject *args, *result = NULL;
jpayne@69 32209 if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
jpayne@69 32210 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 32211 args = PyTuple_New(1);
jpayne@69 32212 if (unlikely(!args)) goto bad;
jpayne@69 32213 Py_INCREF(self);
jpayne@69 32214 PyTuple_SET_ITEM(args, 0, self);
jpayne@69 32215 #else
jpayne@69 32216 args = PyTuple_Pack(1, self);
jpayne@69 32217 if (unlikely(!args)) goto bad;
jpayne@69 32218 #endif
jpayne@69 32219 result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
jpayne@69 32220 Py_DECREF(args);
jpayne@69 32221 bad:
jpayne@69 32222 return result;
jpayne@69 32223 }
jpayne@69 32224
jpayne@69 32225 /* py_dict_keys */
jpayne@69 32226 static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) {
jpayne@69 32227 if (PY_MAJOR_VERSION >= 3)
jpayne@69 32228 return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_keys, d);
jpayne@69 32229 else
jpayne@69 32230 return PyDict_Keys(d);
jpayne@69 32231 }
jpayne@69 32232
jpayne@69 32233 /* UnicodeAsUCS4 */
jpayne@69 32234 static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
jpayne@69 32235 Py_ssize_t length;
jpayne@69 32236 #if CYTHON_PEP393_ENABLED
jpayne@69 32237 length = PyUnicode_GET_LENGTH(x);
jpayne@69 32238 if (likely(length == 1)) {
jpayne@69 32239 return PyUnicode_READ_CHAR(x, 0);
jpayne@69 32240 }
jpayne@69 32241 #else
jpayne@69 32242 length = PyUnicode_GET_SIZE(x);
jpayne@69 32243 if (likely(length == 1)) {
jpayne@69 32244 return PyUnicode_AS_UNICODE(x)[0];
jpayne@69 32245 }
jpayne@69 32246 #if Py_UNICODE_SIZE == 2
jpayne@69 32247 else if (PyUnicode_GET_SIZE(x) == 2) {
jpayne@69 32248 Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0];
jpayne@69 32249 if (high_val >= 0xD800 && high_val <= 0xDBFF) {
jpayne@69 32250 Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1];
jpayne@69 32251 if (low_val >= 0xDC00 && low_val <= 0xDFFF) {
jpayne@69 32252 return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1)));
jpayne@69 32253 }
jpayne@69 32254 }
jpayne@69 32255 }
jpayne@69 32256 #endif
jpayne@69 32257 #endif
jpayne@69 32258 PyErr_Format(PyExc_ValueError,
jpayne@69 32259 "only single character unicode strings can be converted to Py_UCS4, "
jpayne@69 32260 "got length %" CYTHON_FORMAT_SSIZE_T "d", length);
jpayne@69 32261 return (Py_UCS4)-1;
jpayne@69 32262 }
jpayne@69 32263
jpayne@69 32264 /* object_ord */
jpayne@69 32265 static long __Pyx__PyObject_Ord(PyObject* c) {
jpayne@69 32266 Py_ssize_t size;
jpayne@69 32267 if (PyBytes_Check(c)) {
jpayne@69 32268 size = PyBytes_GET_SIZE(c);
jpayne@69 32269 if (likely(size == 1)) {
jpayne@69 32270 return (unsigned char) PyBytes_AS_STRING(c)[0];
jpayne@69 32271 }
jpayne@69 32272 #if PY_MAJOR_VERSION < 3
jpayne@69 32273 } else if (PyUnicode_Check(c)) {
jpayne@69 32274 return (long)__Pyx_PyUnicode_AsPy_UCS4(c);
jpayne@69 32275 #endif
jpayne@69 32276 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
jpayne@69 32277 } else if (PyByteArray_Check(c)) {
jpayne@69 32278 size = PyByteArray_GET_SIZE(c);
jpayne@69 32279 if (likely(size == 1)) {
jpayne@69 32280 return (unsigned char) PyByteArray_AS_STRING(c)[0];
jpayne@69 32281 }
jpayne@69 32282 #endif
jpayne@69 32283 } else {
jpayne@69 32284 __Pyx_TypeName c_type_name = __Pyx_PyType_GetName(Py_TYPE(c));
jpayne@69 32285 PyErr_Format(PyExc_TypeError,
jpayne@69 32286 "ord() expected string of length 1, but " __Pyx_FMT_TYPENAME " found",
jpayne@69 32287 c_type_name);
jpayne@69 32288 __Pyx_DECREF_TypeName(c_type_name);
jpayne@69 32289 return (long)(Py_UCS4)-1;
jpayne@69 32290 }
jpayne@69 32291 PyErr_Format(PyExc_TypeError,
jpayne@69 32292 "ord() expected a character, but string of length %zd found", size);
jpayne@69 32293 return (long)(Py_UCS4)-1;
jpayne@69 32294 }
jpayne@69 32295
jpayne@69 32296 /* RaiseTooManyValuesToUnpack */
jpayne@69 32297 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
jpayne@69 32298 PyErr_Format(PyExc_ValueError,
jpayne@69 32299 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
jpayne@69 32300 }
jpayne@69 32301
jpayne@69 32302 /* RaiseNeedMoreValuesToUnpack */
jpayne@69 32303 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
jpayne@69 32304 PyErr_Format(PyExc_ValueError,
jpayne@69 32305 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
jpayne@69 32306 index, (index == 1) ? "" : "s");
jpayne@69 32307 }
jpayne@69 32308
jpayne@69 32309 /* IterFinish */
jpayne@69 32310 static CYTHON_INLINE int __Pyx_IterFinish(void) {
jpayne@69 32311 PyObject* exc_type;
jpayne@69 32312 __Pyx_PyThreadState_declare
jpayne@69 32313 __Pyx_PyThreadState_assign
jpayne@69 32314 exc_type = __Pyx_PyErr_CurrentExceptionType();
jpayne@69 32315 if (unlikely(exc_type)) {
jpayne@69 32316 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
jpayne@69 32317 return -1;
jpayne@69 32318 __Pyx_PyErr_Clear();
jpayne@69 32319 return 0;
jpayne@69 32320 }
jpayne@69 32321 return 0;
jpayne@69 32322 }
jpayne@69 32323
jpayne@69 32324 /* UnpackItemEndCheck */
jpayne@69 32325 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
jpayne@69 32326 if (unlikely(retval)) {
jpayne@69 32327 Py_DECREF(retval);
jpayne@69 32328 __Pyx_RaiseTooManyValuesError(expected);
jpayne@69 32329 return -1;
jpayne@69 32330 }
jpayne@69 32331 return __Pyx_IterFinish();
jpayne@69 32332 }
jpayne@69 32333
jpayne@69 32334 /* PyObjectSetAttrStr */
jpayne@69 32335 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 32336 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
jpayne@69 32337 PyTypeObject* tp = Py_TYPE(obj);
jpayne@69 32338 if (likely(tp->tp_setattro))
jpayne@69 32339 return tp->tp_setattro(obj, attr_name, value);
jpayne@69 32340 #if PY_MAJOR_VERSION < 3
jpayne@69 32341 if (likely(tp->tp_setattr))
jpayne@69 32342 return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
jpayne@69 32343 #endif
jpayne@69 32344 return PyObject_SetAttr(obj, attr_name, value);
jpayne@69 32345 }
jpayne@69 32346 #endif
jpayne@69 32347
jpayne@69 32348 /* Import */
jpayne@69 32349 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
jpayne@69 32350 PyObject *module = 0;
jpayne@69 32351 PyObject *empty_dict = 0;
jpayne@69 32352 PyObject *empty_list = 0;
jpayne@69 32353 #if PY_MAJOR_VERSION < 3
jpayne@69 32354 PyObject *py_import;
jpayne@69 32355 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
jpayne@69 32356 if (unlikely(!py_import))
jpayne@69 32357 goto bad;
jpayne@69 32358 if (!from_list) {
jpayne@69 32359 empty_list = PyList_New(0);
jpayne@69 32360 if (unlikely(!empty_list))
jpayne@69 32361 goto bad;
jpayne@69 32362 from_list = empty_list;
jpayne@69 32363 }
jpayne@69 32364 #endif
jpayne@69 32365 empty_dict = PyDict_New();
jpayne@69 32366 if (unlikely(!empty_dict))
jpayne@69 32367 goto bad;
jpayne@69 32368 {
jpayne@69 32369 #if PY_MAJOR_VERSION >= 3
jpayne@69 32370 if (level == -1) {
jpayne@69 32371 if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
jpayne@69 32372 module = PyImport_ImportModuleLevelObject(
jpayne@69 32373 name, __pyx_d, empty_dict, from_list, 1);
jpayne@69 32374 if (unlikely(!module)) {
jpayne@69 32375 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
jpayne@69 32376 goto bad;
jpayne@69 32377 PyErr_Clear();
jpayne@69 32378 }
jpayne@69 32379 }
jpayne@69 32380 level = 0;
jpayne@69 32381 }
jpayne@69 32382 #endif
jpayne@69 32383 if (!module) {
jpayne@69 32384 #if PY_MAJOR_VERSION < 3
jpayne@69 32385 PyObject *py_level = PyInt_FromLong(level);
jpayne@69 32386 if (unlikely(!py_level))
jpayne@69 32387 goto bad;
jpayne@69 32388 module = PyObject_CallFunctionObjArgs(py_import,
jpayne@69 32389 name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
jpayne@69 32390 Py_DECREF(py_level);
jpayne@69 32391 #else
jpayne@69 32392 module = PyImport_ImportModuleLevelObject(
jpayne@69 32393 name, __pyx_d, empty_dict, from_list, level);
jpayne@69 32394 #endif
jpayne@69 32395 }
jpayne@69 32396 }
jpayne@69 32397 bad:
jpayne@69 32398 Py_XDECREF(empty_dict);
jpayne@69 32399 Py_XDECREF(empty_list);
jpayne@69 32400 #if PY_MAJOR_VERSION < 3
jpayne@69 32401 Py_XDECREF(py_import);
jpayne@69 32402 #endif
jpayne@69 32403 return module;
jpayne@69 32404 }
jpayne@69 32405
jpayne@69 32406 /* ImportFrom */
jpayne@69 32407 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
jpayne@69 32408 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
jpayne@69 32409 if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
jpayne@69 32410 const char* module_name_str = 0;
jpayne@69 32411 PyObject* module_name = 0;
jpayne@69 32412 PyObject* module_dot = 0;
jpayne@69 32413 PyObject* full_name = 0;
jpayne@69 32414 PyErr_Clear();
jpayne@69 32415 module_name_str = PyModule_GetName(module);
jpayne@69 32416 if (unlikely(!module_name_str)) { goto modbad; }
jpayne@69 32417 module_name = PyUnicode_FromString(module_name_str);
jpayne@69 32418 if (unlikely(!module_name)) { goto modbad; }
jpayne@69 32419 module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__56);
jpayne@69 32420 if (unlikely(!module_dot)) { goto modbad; }
jpayne@69 32421 full_name = PyUnicode_Concat(module_dot, name);
jpayne@69 32422 if (unlikely(!full_name)) { goto modbad; }
jpayne@69 32423 #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400)
jpayne@69 32424 {
jpayne@69 32425 PyObject *modules = PyImport_GetModuleDict();
jpayne@69 32426 if (unlikely(!modules))
jpayne@69 32427 goto modbad;
jpayne@69 32428 value = PyObject_GetItem(modules, full_name);
jpayne@69 32429 }
jpayne@69 32430 #else
jpayne@69 32431 value = PyImport_GetModule(full_name);
jpayne@69 32432 #endif
jpayne@69 32433 modbad:
jpayne@69 32434 Py_XDECREF(full_name);
jpayne@69 32435 Py_XDECREF(module_dot);
jpayne@69 32436 Py_XDECREF(module_name);
jpayne@69 32437 }
jpayne@69 32438 if (unlikely(!value)) {
jpayne@69 32439 PyErr_Format(PyExc_ImportError,
jpayne@69 32440 #if PY_MAJOR_VERSION < 3
jpayne@69 32441 "cannot import name %.230s", PyString_AS_STRING(name));
jpayne@69 32442 #else
jpayne@69 32443 "cannot import name %S", name);
jpayne@69 32444 #endif
jpayne@69 32445 }
jpayne@69 32446 return value;
jpayne@69 32447 }
jpayne@69 32448
jpayne@69 32449 /* GetItemInt */
jpayne@69 32450 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
jpayne@69 32451 PyObject *r;
jpayne@69 32452 if (unlikely(!j)) return NULL;
jpayne@69 32453 r = PyObject_GetItem(o, j);
jpayne@69 32454 Py_DECREF(j);
jpayne@69 32455 return r;
jpayne@69 32456 }
jpayne@69 32457 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
jpayne@69 32458 CYTHON_NCP_UNUSED int wraparound,
jpayne@69 32459 CYTHON_NCP_UNUSED int boundscheck) {
jpayne@69 32460 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 32461 Py_ssize_t wrapped_i = i;
jpayne@69 32462 if (wraparound & unlikely(i < 0)) {
jpayne@69 32463 wrapped_i += PyList_GET_SIZE(o);
jpayne@69 32464 }
jpayne@69 32465 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
jpayne@69 32466 PyObject *r = PyList_GET_ITEM(o, wrapped_i);
jpayne@69 32467 Py_INCREF(r);
jpayne@69 32468 return r;
jpayne@69 32469 }
jpayne@69 32470 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
jpayne@69 32471 #else
jpayne@69 32472 return PySequence_GetItem(o, i);
jpayne@69 32473 #endif
jpayne@69 32474 }
jpayne@69 32475 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
jpayne@69 32476 CYTHON_NCP_UNUSED int wraparound,
jpayne@69 32477 CYTHON_NCP_UNUSED int boundscheck) {
jpayne@69 32478 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 32479 Py_ssize_t wrapped_i = i;
jpayne@69 32480 if (wraparound & unlikely(i < 0)) {
jpayne@69 32481 wrapped_i += PyTuple_GET_SIZE(o);
jpayne@69 32482 }
jpayne@69 32483 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
jpayne@69 32484 PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
jpayne@69 32485 Py_INCREF(r);
jpayne@69 32486 return r;
jpayne@69 32487 }
jpayne@69 32488 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
jpayne@69 32489 #else
jpayne@69 32490 return PySequence_GetItem(o, i);
jpayne@69 32491 #endif
jpayne@69 32492 }
jpayne@69 32493 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
jpayne@69 32494 CYTHON_NCP_UNUSED int wraparound,
jpayne@69 32495 CYTHON_NCP_UNUSED int boundscheck) {
jpayne@69 32496 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
jpayne@69 32497 if (is_list || PyList_CheckExact(o)) {
jpayne@69 32498 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
jpayne@69 32499 if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
jpayne@69 32500 PyObject *r = PyList_GET_ITEM(o, n);
jpayne@69 32501 Py_INCREF(r);
jpayne@69 32502 return r;
jpayne@69 32503 }
jpayne@69 32504 }
jpayne@69 32505 else if (PyTuple_CheckExact(o)) {
jpayne@69 32506 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
jpayne@69 32507 if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
jpayne@69 32508 PyObject *r = PyTuple_GET_ITEM(o, n);
jpayne@69 32509 Py_INCREF(r);
jpayne@69 32510 return r;
jpayne@69 32511 }
jpayne@69 32512 } else {
jpayne@69 32513 PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
jpayne@69 32514 PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
jpayne@69 32515 if (mm && mm->mp_subscript) {
jpayne@69 32516 PyObject *r, *key = PyInt_FromSsize_t(i);
jpayne@69 32517 if (unlikely(!key)) return NULL;
jpayne@69 32518 r = mm->mp_subscript(o, key);
jpayne@69 32519 Py_DECREF(key);
jpayne@69 32520 return r;
jpayne@69 32521 }
jpayne@69 32522 if (likely(sm && sm->sq_item)) {
jpayne@69 32523 if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
jpayne@69 32524 Py_ssize_t l = sm->sq_length(o);
jpayne@69 32525 if (likely(l >= 0)) {
jpayne@69 32526 i += l;
jpayne@69 32527 } else {
jpayne@69 32528 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
jpayne@69 32529 return NULL;
jpayne@69 32530 PyErr_Clear();
jpayne@69 32531 }
jpayne@69 32532 }
jpayne@69 32533 return sm->sq_item(o, i);
jpayne@69 32534 }
jpayne@69 32535 }
jpayne@69 32536 #else
jpayne@69 32537 if (is_list || !PyMapping_Check(o)) {
jpayne@69 32538 return PySequence_GetItem(o, i);
jpayne@69 32539 }
jpayne@69 32540 #endif
jpayne@69 32541 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
jpayne@69 32542 }
jpayne@69 32543
jpayne@69 32544 /* GetAttr */
jpayne@69 32545 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
jpayne@69 32546 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 32547 #if PY_MAJOR_VERSION >= 3
jpayne@69 32548 if (likely(PyUnicode_Check(n)))
jpayne@69 32549 #else
jpayne@69 32550 if (likely(PyString_Check(n)))
jpayne@69 32551 #endif
jpayne@69 32552 return __Pyx_PyObject_GetAttrStr(o, n);
jpayne@69 32553 #endif
jpayne@69 32554 return PyObject_GetAttr(o, n);
jpayne@69 32555 }
jpayne@69 32556
jpayne@69 32557 /* HasAttr */
jpayne@69 32558 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
jpayne@69 32559 PyObject *r;
jpayne@69 32560 if (unlikely(!__Pyx_PyBaseString_Check(n))) {
jpayne@69 32561 PyErr_SetString(PyExc_TypeError,
jpayne@69 32562 "hasattr(): attribute name must be string");
jpayne@69 32563 return -1;
jpayne@69 32564 }
jpayne@69 32565 r = __Pyx_GetAttr(o, n);
jpayne@69 32566 if (!r) {
jpayne@69 32567 PyErr_Clear();
jpayne@69 32568 return 0;
jpayne@69 32569 } else {
jpayne@69 32570 Py_DECREF(r);
jpayne@69 32571 return 1;
jpayne@69 32572 }
jpayne@69 32573 }
jpayne@69 32574
jpayne@69 32575 /* CallNextTpDealloc */
jpayne@69 32576 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
jpayne@69 32577 PyTypeObject* type = Py_TYPE(obj);
jpayne@69 32578 destructor tp_dealloc = NULL;
jpayne@69 32579 while (type && __Pyx_PyType_GetSlot(type, tp_dealloc, destructor) != current_tp_dealloc)
jpayne@69 32580 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@69 32581 while (type && (tp_dealloc = __Pyx_PyType_GetSlot(type, tp_dealloc, destructor)) == current_tp_dealloc)
jpayne@69 32582 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@69 32583 if (type)
jpayne@69 32584 tp_dealloc(obj);
jpayne@69 32585 }
jpayne@69 32586
jpayne@69 32587 /* CallNextTpTraverse */
jpayne@69 32588 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
jpayne@69 32589 PyTypeObject* type = Py_TYPE(obj);
jpayne@69 32590 traverseproc tp_traverse = NULL;
jpayne@69 32591 while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse)
jpayne@69 32592 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@69 32593 while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse)
jpayne@69 32594 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@69 32595 if (type && tp_traverse)
jpayne@69 32596 return tp_traverse(obj, v, a);
jpayne@69 32597 return 0;
jpayne@69 32598 }
jpayne@69 32599
jpayne@69 32600 /* CallNextTpClear */
jpayne@69 32601 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
jpayne@69 32602 PyTypeObject* type = Py_TYPE(obj);
jpayne@69 32603 inquiry tp_clear = NULL;
jpayne@69 32604 while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear)
jpayne@69 32605 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@69 32606 while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear)
jpayne@69 32607 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@69 32608 if (type && tp_clear)
jpayne@69 32609 tp_clear(obj);
jpayne@69 32610 }
jpayne@69 32611
jpayne@69 32612 /* FixUpExtensionType */
jpayne@69 32613 #if CYTHON_USE_TYPE_SPECS
jpayne@69 32614 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
jpayne@69 32615 #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 32616 CYTHON_UNUSED_VAR(spec);
jpayne@69 32617 CYTHON_UNUSED_VAR(type);
jpayne@69 32618 #else
jpayne@69 32619 const PyType_Slot *slot = spec->slots;
jpayne@69 32620 while (slot && slot->slot && slot->slot != Py_tp_members)
jpayne@69 32621 slot++;
jpayne@69 32622 if (slot && slot->slot == Py_tp_members) {
jpayne@69 32623 int changed = 0;
jpayne@69 32624 #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
jpayne@69 32625 const
jpayne@69 32626 #endif
jpayne@69 32627 PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
jpayne@69 32628 while (memb && memb->name) {
jpayne@69 32629 if (memb->name[0] == '_' && memb->name[1] == '_') {
jpayne@69 32630 #if PY_VERSION_HEX < 0x030900b1
jpayne@69 32631 if (strcmp(memb->name, "__weaklistoffset__") == 0) {
jpayne@69 32632 assert(memb->type == T_PYSSIZET);
jpayne@69 32633 assert(memb->flags == READONLY);
jpayne@69 32634 type->tp_weaklistoffset = memb->offset;
jpayne@69 32635 changed = 1;
jpayne@69 32636 }
jpayne@69 32637 else if (strcmp(memb->name, "__dictoffset__") == 0) {
jpayne@69 32638 assert(memb->type == T_PYSSIZET);
jpayne@69 32639 assert(memb->flags == READONLY);
jpayne@69 32640 type->tp_dictoffset = memb->offset;
jpayne@69 32641 changed = 1;
jpayne@69 32642 }
jpayne@69 32643 #if CYTHON_METH_FASTCALL
jpayne@69 32644 else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
jpayne@69 32645 assert(memb->type == T_PYSSIZET);
jpayne@69 32646 assert(memb->flags == READONLY);
jpayne@69 32647 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 32648 type->tp_vectorcall_offset = memb->offset;
jpayne@69 32649 #else
jpayne@69 32650 type->tp_print = (printfunc) memb->offset;
jpayne@69 32651 #endif
jpayne@69 32652 changed = 1;
jpayne@69 32653 }
jpayne@69 32654 #endif
jpayne@69 32655 #else
jpayne@69 32656 if ((0));
jpayne@69 32657 #endif
jpayne@69 32658 #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
jpayne@69 32659 else if (strcmp(memb->name, "__module__") == 0) {
jpayne@69 32660 PyObject *descr;
jpayne@69 32661 assert(memb->type == T_OBJECT);
jpayne@69 32662 assert(memb->flags == 0 || memb->flags == READONLY);
jpayne@69 32663 descr = PyDescr_NewMember(type, memb);
jpayne@69 32664 if (unlikely(!descr))
jpayne@69 32665 return -1;
jpayne@69 32666 if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
jpayne@69 32667 Py_DECREF(descr);
jpayne@69 32668 return -1;
jpayne@69 32669 }
jpayne@69 32670 Py_DECREF(descr);
jpayne@69 32671 changed = 1;
jpayne@69 32672 }
jpayne@69 32673 #endif
jpayne@69 32674 }
jpayne@69 32675 memb++;
jpayne@69 32676 }
jpayne@69 32677 if (changed)
jpayne@69 32678 PyType_Modified(type);
jpayne@69 32679 }
jpayne@69 32680 #endif
jpayne@69 32681 return 0;
jpayne@69 32682 }
jpayne@69 32683 #endif
jpayne@69 32684
jpayne@69 32685 /* PyObjectGetMethod */
jpayne@69 32686 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
jpayne@69 32687 PyObject *attr;
jpayne@69 32688 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 32689 __Pyx_TypeName type_name;
jpayne@69 32690 PyTypeObject *tp = Py_TYPE(obj);
jpayne@69 32691 PyObject *descr;
jpayne@69 32692 descrgetfunc f = NULL;
jpayne@69 32693 PyObject **dictptr, *dict;
jpayne@69 32694 int meth_found = 0;
jpayne@69 32695 assert (*method == NULL);
jpayne@69 32696 if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
jpayne@69 32697 attr = __Pyx_PyObject_GetAttrStr(obj, name);
jpayne@69 32698 goto try_unpack;
jpayne@69 32699 }
jpayne@69 32700 if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
jpayne@69 32701 return 0;
jpayne@69 32702 }
jpayne@69 32703 descr = _PyType_Lookup(tp, name);
jpayne@69 32704 if (likely(descr != NULL)) {
jpayne@69 32705 Py_INCREF(descr);
jpayne@69 32706 #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
jpayne@69 32707 if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
jpayne@69 32708 #elif PY_MAJOR_VERSION >= 3
jpayne@69 32709 #ifdef __Pyx_CyFunction_USED
jpayne@69 32710 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
jpayne@69 32711 #else
jpayne@69 32712 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
jpayne@69 32713 #endif
jpayne@69 32714 #else
jpayne@69 32715 #ifdef __Pyx_CyFunction_USED
jpayne@69 32716 if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
jpayne@69 32717 #else
jpayne@69 32718 if (likely(PyFunction_Check(descr)))
jpayne@69 32719 #endif
jpayne@69 32720 #endif
jpayne@69 32721 {
jpayne@69 32722 meth_found = 1;
jpayne@69 32723 } else {
jpayne@69 32724 f = Py_TYPE(descr)->tp_descr_get;
jpayne@69 32725 if (f != NULL && PyDescr_IsData(descr)) {
jpayne@69 32726 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
jpayne@69 32727 Py_DECREF(descr);
jpayne@69 32728 goto try_unpack;
jpayne@69 32729 }
jpayne@69 32730 }
jpayne@69 32731 }
jpayne@69 32732 dictptr = _PyObject_GetDictPtr(obj);
jpayne@69 32733 if (dictptr != NULL && (dict = *dictptr) != NULL) {
jpayne@69 32734 Py_INCREF(dict);
jpayne@69 32735 attr = __Pyx_PyDict_GetItemStr(dict, name);
jpayne@69 32736 if (attr != NULL) {
jpayne@69 32737 Py_INCREF(attr);
jpayne@69 32738 Py_DECREF(dict);
jpayne@69 32739 Py_XDECREF(descr);
jpayne@69 32740 goto try_unpack;
jpayne@69 32741 }
jpayne@69 32742 Py_DECREF(dict);
jpayne@69 32743 }
jpayne@69 32744 if (meth_found) {
jpayne@69 32745 *method = descr;
jpayne@69 32746 return 1;
jpayne@69 32747 }
jpayne@69 32748 if (f != NULL) {
jpayne@69 32749 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
jpayne@69 32750 Py_DECREF(descr);
jpayne@69 32751 goto try_unpack;
jpayne@69 32752 }
jpayne@69 32753 if (likely(descr != NULL)) {
jpayne@69 32754 *method = descr;
jpayne@69 32755 return 0;
jpayne@69 32756 }
jpayne@69 32757 type_name = __Pyx_PyType_GetName(tp);
jpayne@69 32758 PyErr_Format(PyExc_AttributeError,
jpayne@69 32759 #if PY_MAJOR_VERSION >= 3
jpayne@69 32760 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
jpayne@69 32761 type_name, name);
jpayne@69 32762 #else
jpayne@69 32763 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
jpayne@69 32764 type_name, PyString_AS_STRING(name));
jpayne@69 32765 #endif
jpayne@69 32766 __Pyx_DECREF_TypeName(type_name);
jpayne@69 32767 return 0;
jpayne@69 32768 #else
jpayne@69 32769 attr = __Pyx_PyObject_GetAttrStr(obj, name);
jpayne@69 32770 goto try_unpack;
jpayne@69 32771 #endif
jpayne@69 32772 try_unpack:
jpayne@69 32773 #if CYTHON_UNPACK_METHODS
jpayne@69 32774 if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
jpayne@69 32775 PyObject *function = PyMethod_GET_FUNCTION(attr);
jpayne@69 32776 Py_INCREF(function);
jpayne@69 32777 Py_DECREF(attr);
jpayne@69 32778 *method = function;
jpayne@69 32779 return 1;
jpayne@69 32780 }
jpayne@69 32781 #endif
jpayne@69 32782 *method = attr;
jpayne@69 32783 return 0;
jpayne@69 32784 }
jpayne@69 32785
jpayne@69 32786 /* PyObjectCallMethod0 */
jpayne@69 32787 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
jpayne@69 32788 PyObject *method = NULL, *result = NULL;
jpayne@69 32789 int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
jpayne@69 32790 if (likely(is_method)) {
jpayne@69 32791 result = __Pyx_PyObject_CallOneArg(method, obj);
jpayne@69 32792 Py_DECREF(method);
jpayne@69 32793 return result;
jpayne@69 32794 }
jpayne@69 32795 if (unlikely(!method)) goto bad;
jpayne@69 32796 result = __Pyx_PyObject_CallNoArg(method);
jpayne@69 32797 Py_DECREF(method);
jpayne@69 32798 bad:
jpayne@69 32799 return result;
jpayne@69 32800 }
jpayne@69 32801
jpayne@69 32802 /* ValidateBasesTuple */
jpayne@69 32803 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
jpayne@69 32804 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
jpayne@69 32805 Py_ssize_t i, n;
jpayne@69 32806 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 32807 n = PyTuple_GET_SIZE(bases);
jpayne@69 32808 #else
jpayne@69 32809 n = PyTuple_Size(bases);
jpayne@69 32810 if (n < 0) return -1;
jpayne@69 32811 #endif
jpayne@69 32812 for (i = 1; i < n; i++)
jpayne@69 32813 {
jpayne@69 32814 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 32815 PyObject *b0 = PySequence_GetItem(bases, i);
jpayne@69 32816 if (!b0) return -1;
jpayne@69 32817 #elif CYTHON_ASSUME_SAFE_MACROS
jpayne@69 32818 PyObject *b0 = PyTuple_GET_ITEM(bases, i);
jpayne@69 32819 #else
jpayne@69 32820 PyObject *b0 = PyTuple_GetItem(bases, i);
jpayne@69 32821 if (!b0) return -1;
jpayne@69 32822 #endif
jpayne@69 32823 PyTypeObject *b;
jpayne@69 32824 #if PY_MAJOR_VERSION < 3
jpayne@69 32825 if (PyClass_Check(b0))
jpayne@69 32826 {
jpayne@69 32827 PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
jpayne@69 32828 PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
jpayne@69 32829 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 32830 Py_DECREF(b0);
jpayne@69 32831 #endif
jpayne@69 32832 return -1;
jpayne@69 32833 }
jpayne@69 32834 #endif
jpayne@69 32835 b = (PyTypeObject*) b0;
jpayne@69 32836 if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
jpayne@69 32837 {
jpayne@69 32838 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
jpayne@69 32839 PyErr_Format(PyExc_TypeError,
jpayne@69 32840 "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
jpayne@69 32841 __Pyx_DECREF_TypeName(b_name);
jpayne@69 32842 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 32843 Py_DECREF(b0);
jpayne@69 32844 #endif
jpayne@69 32845 return -1;
jpayne@69 32846 }
jpayne@69 32847 if (dictoffset == 0)
jpayne@69 32848 {
jpayne@69 32849 Py_ssize_t b_dictoffset = 0;
jpayne@69 32850 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@69 32851 b_dictoffset = b->tp_dictoffset;
jpayne@69 32852 #else
jpayne@69 32853 PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
jpayne@69 32854 if (!py_b_dictoffset) goto dictoffset_return;
jpayne@69 32855 b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
jpayne@69 32856 Py_DECREF(py_b_dictoffset);
jpayne@69 32857 if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
jpayne@69 32858 #endif
jpayne@69 32859 if (b_dictoffset) {
jpayne@69 32860 {
jpayne@69 32861 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
jpayne@69 32862 PyErr_Format(PyExc_TypeError,
jpayne@69 32863 "extension type '%.200s' has no __dict__ slot, "
jpayne@69 32864 "but base type '" __Pyx_FMT_TYPENAME "' has: "
jpayne@69 32865 "either add 'cdef dict __dict__' to the extension type "
jpayne@69 32866 "or add '__slots__ = [...]' to the base type",
jpayne@69 32867 type_name, b_name);
jpayne@69 32868 __Pyx_DECREF_TypeName(b_name);
jpayne@69 32869 }
jpayne@69 32870 #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
jpayne@69 32871 dictoffset_return:
jpayne@69 32872 #endif
jpayne@69 32873 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 32874 Py_DECREF(b0);
jpayne@69 32875 #endif
jpayne@69 32876 return -1;
jpayne@69 32877 }
jpayne@69 32878 }
jpayne@69 32879 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 32880 Py_DECREF(b0);
jpayne@69 32881 #endif
jpayne@69 32882 }
jpayne@69 32883 return 0;
jpayne@69 32884 }
jpayne@69 32885 #endif
jpayne@69 32886
jpayne@69 32887 /* PyType_Ready */
jpayne@69 32888 static int __Pyx_PyType_Ready(PyTypeObject *t) {
jpayne@69 32889 #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
jpayne@69 32890 (void)__Pyx_PyObject_CallMethod0;
jpayne@69 32891 #if CYTHON_USE_TYPE_SPECS
jpayne@69 32892 (void)__Pyx_validate_bases_tuple;
jpayne@69 32893 #endif
jpayne@69 32894 return PyType_Ready(t);
jpayne@69 32895 #else
jpayne@69 32896 int r;
jpayne@69 32897 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
jpayne@69 32898 if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
jpayne@69 32899 return -1;
jpayne@69 32900 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
jpayne@69 32901 {
jpayne@69 32902 int gc_was_enabled;
jpayne@69 32903 #if PY_VERSION_HEX >= 0x030A00b1
jpayne@69 32904 gc_was_enabled = PyGC_Disable();
jpayne@69 32905 (void)__Pyx_PyObject_CallMethod0;
jpayne@69 32906 #else
jpayne@69 32907 PyObject *ret, *py_status;
jpayne@69 32908 PyObject *gc = NULL;
jpayne@69 32909 #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
jpayne@69 32910 gc = PyImport_GetModule(__pyx_kp_u_gc);
jpayne@69 32911 #endif
jpayne@69 32912 if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
jpayne@69 32913 if (unlikely(!gc)) return -1;
jpayne@69 32914 py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
jpayne@69 32915 if (unlikely(!py_status)) {
jpayne@69 32916 Py_DECREF(gc);
jpayne@69 32917 return -1;
jpayne@69 32918 }
jpayne@69 32919 gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
jpayne@69 32920 Py_DECREF(py_status);
jpayne@69 32921 if (gc_was_enabled > 0) {
jpayne@69 32922 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
jpayne@69 32923 if (unlikely(!ret)) {
jpayne@69 32924 Py_DECREF(gc);
jpayne@69 32925 return -1;
jpayne@69 32926 }
jpayne@69 32927 Py_DECREF(ret);
jpayne@69 32928 } else if (unlikely(gc_was_enabled == -1)) {
jpayne@69 32929 Py_DECREF(gc);
jpayne@69 32930 return -1;
jpayne@69 32931 }
jpayne@69 32932 #endif
jpayne@69 32933 t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
jpayne@69 32934 #if PY_VERSION_HEX >= 0x030A0000
jpayne@69 32935 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
jpayne@69 32936 #endif
jpayne@69 32937 #else
jpayne@69 32938 (void)__Pyx_PyObject_CallMethod0;
jpayne@69 32939 #endif
jpayne@69 32940 r = PyType_Ready(t);
jpayne@69 32941 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
jpayne@69 32942 t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
jpayne@69 32943 #if PY_VERSION_HEX >= 0x030A00b1
jpayne@69 32944 if (gc_was_enabled)
jpayne@69 32945 PyGC_Enable();
jpayne@69 32946 #else
jpayne@69 32947 if (gc_was_enabled) {
jpayne@69 32948 PyObject *tp, *v, *tb;
jpayne@69 32949 PyErr_Fetch(&tp, &v, &tb);
jpayne@69 32950 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
jpayne@69 32951 if (likely(ret || r == -1)) {
jpayne@69 32952 Py_XDECREF(ret);
jpayne@69 32953 PyErr_Restore(tp, v, tb);
jpayne@69 32954 } else {
jpayne@69 32955 Py_XDECREF(tp);
jpayne@69 32956 Py_XDECREF(v);
jpayne@69 32957 Py_XDECREF(tb);
jpayne@69 32958 r = -1;
jpayne@69 32959 }
jpayne@69 32960 }
jpayne@69 32961 Py_DECREF(gc);
jpayne@69 32962 #endif
jpayne@69 32963 }
jpayne@69 32964 #endif
jpayne@69 32965 return r;
jpayne@69 32966 #endif
jpayne@69 32967 }
jpayne@69 32968
jpayne@69 32969 /* PyObject_GenericGetAttrNoDict */
jpayne@69 32970 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@69 32971 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
jpayne@69 32972 __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
jpayne@69 32973 PyErr_Format(PyExc_AttributeError,
jpayne@69 32974 #if PY_MAJOR_VERSION >= 3
jpayne@69 32975 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
jpayne@69 32976 type_name, attr_name);
jpayne@69 32977 #else
jpayne@69 32978 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
jpayne@69 32979 type_name, PyString_AS_STRING(attr_name));
jpayne@69 32980 #endif
jpayne@69 32981 __Pyx_DECREF_TypeName(type_name);
jpayne@69 32982 return NULL;
jpayne@69 32983 }
jpayne@69 32984 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
jpayne@69 32985 PyObject *descr;
jpayne@69 32986 PyTypeObject *tp = Py_TYPE(obj);
jpayne@69 32987 if (unlikely(!PyString_Check(attr_name))) {
jpayne@69 32988 return PyObject_GenericGetAttr(obj, attr_name);
jpayne@69 32989 }
jpayne@69 32990 assert(!tp->tp_dictoffset);
jpayne@69 32991 descr = _PyType_Lookup(tp, attr_name);
jpayne@69 32992 if (unlikely(!descr)) {
jpayne@69 32993 return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
jpayne@69 32994 }
jpayne@69 32995 Py_INCREF(descr);
jpayne@69 32996 #if PY_MAJOR_VERSION < 3
jpayne@69 32997 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
jpayne@69 32998 #endif
jpayne@69 32999 {
jpayne@69 33000 descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
jpayne@69 33001 if (unlikely(f)) {
jpayne@69 33002 PyObject *res = f(descr, obj, (PyObject *)tp);
jpayne@69 33003 Py_DECREF(descr);
jpayne@69 33004 return res;
jpayne@69 33005 }
jpayne@69 33006 }
jpayne@69 33007 return descr;
jpayne@69 33008 }
jpayne@69 33009 #endif
jpayne@69 33010
jpayne@69 33011 /* PyObject_GenericGetAttr */
jpayne@69 33012 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@69 33013 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
jpayne@69 33014 if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
jpayne@69 33015 return PyObject_GenericGetAttr(obj, attr_name);
jpayne@69 33016 }
jpayne@69 33017 return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
jpayne@69 33018 }
jpayne@69 33019 #endif
jpayne@69 33020
jpayne@69 33021 /* SetVTable */
jpayne@69 33022 static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
jpayne@69 33023 PyObject *ob = PyCapsule_New(vtable, 0, 0);
jpayne@69 33024 if (unlikely(!ob))
jpayne@69 33025 goto bad;
jpayne@69 33026 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33027 if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
jpayne@69 33028 #else
jpayne@69 33029 if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
jpayne@69 33030 #endif
jpayne@69 33031 goto bad;
jpayne@69 33032 Py_DECREF(ob);
jpayne@69 33033 return 0;
jpayne@69 33034 bad:
jpayne@69 33035 Py_XDECREF(ob);
jpayne@69 33036 return -1;
jpayne@69 33037 }
jpayne@69 33038
jpayne@69 33039 /* GetVTable */
jpayne@69 33040 static void* __Pyx_GetVtable(PyTypeObject *type) {
jpayne@69 33041 void* ptr;
jpayne@69 33042 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33043 PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
jpayne@69 33044 #else
jpayne@69 33045 PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
jpayne@69 33046 #endif
jpayne@69 33047 if (!ob)
jpayne@69 33048 goto bad;
jpayne@69 33049 ptr = PyCapsule_GetPointer(ob, 0);
jpayne@69 33050 if (!ptr && !PyErr_Occurred())
jpayne@69 33051 PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
jpayne@69 33052 Py_DECREF(ob);
jpayne@69 33053 return ptr;
jpayne@69 33054 bad:
jpayne@69 33055 Py_XDECREF(ob);
jpayne@69 33056 return NULL;
jpayne@69 33057 }
jpayne@69 33058
jpayne@69 33059 /* MergeVTables */
jpayne@69 33060 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33061 static int __Pyx_MergeVtables(PyTypeObject *type) {
jpayne@69 33062 int i;
jpayne@69 33063 void** base_vtables;
jpayne@69 33064 __Pyx_TypeName tp_base_name;
jpayne@69 33065 __Pyx_TypeName base_name;
jpayne@69 33066 void* unknown = (void*)-1;
jpayne@69 33067 PyObject* bases = type->tp_bases;
jpayne@69 33068 int base_depth = 0;
jpayne@69 33069 {
jpayne@69 33070 PyTypeObject* base = type->tp_base;
jpayne@69 33071 while (base) {
jpayne@69 33072 base_depth += 1;
jpayne@69 33073 base = base->tp_base;
jpayne@69 33074 }
jpayne@69 33075 }
jpayne@69 33076 base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
jpayne@69 33077 base_vtables[0] = unknown;
jpayne@69 33078 for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
jpayne@69 33079 void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
jpayne@69 33080 if (base_vtable != NULL) {
jpayne@69 33081 int j;
jpayne@69 33082 PyTypeObject* base = type->tp_base;
jpayne@69 33083 for (j = 0; j < base_depth; j++) {
jpayne@69 33084 if (base_vtables[j] == unknown) {
jpayne@69 33085 base_vtables[j] = __Pyx_GetVtable(base);
jpayne@69 33086 base_vtables[j + 1] = unknown;
jpayne@69 33087 }
jpayne@69 33088 if (base_vtables[j] == base_vtable) {
jpayne@69 33089 break;
jpayne@69 33090 } else if (base_vtables[j] == NULL) {
jpayne@69 33091 goto bad;
jpayne@69 33092 }
jpayne@69 33093 base = base->tp_base;
jpayne@69 33094 }
jpayne@69 33095 }
jpayne@69 33096 }
jpayne@69 33097 PyErr_Clear();
jpayne@69 33098 free(base_vtables);
jpayne@69 33099 return 0;
jpayne@69 33100 bad:
jpayne@69 33101 tp_base_name = __Pyx_PyType_GetName(type->tp_base);
jpayne@69 33102 base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
jpayne@69 33103 PyErr_Format(PyExc_TypeError,
jpayne@69 33104 "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
jpayne@69 33105 __Pyx_DECREF_TypeName(tp_base_name);
jpayne@69 33106 __Pyx_DECREF_TypeName(base_name);
jpayne@69 33107 free(base_vtables);
jpayne@69 33108 return -1;
jpayne@69 33109 }
jpayne@69 33110 #endif
jpayne@69 33111
jpayne@69 33112 /* SetupReduce */
jpayne@69 33113 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33114 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
jpayne@69 33115 int ret;
jpayne@69 33116 PyObject *name_attr;
jpayne@69 33117 name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name);
jpayne@69 33118 if (likely(name_attr)) {
jpayne@69 33119 ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
jpayne@69 33120 } else {
jpayne@69 33121 ret = -1;
jpayne@69 33122 }
jpayne@69 33123 if (unlikely(ret < 0)) {
jpayne@69 33124 PyErr_Clear();
jpayne@69 33125 ret = 0;
jpayne@69 33126 }
jpayne@69 33127 Py_XDECREF(name_attr);
jpayne@69 33128 return ret;
jpayne@69 33129 }
jpayne@69 33130 static int __Pyx_setup_reduce(PyObject* type_obj) {
jpayne@69 33131 int ret = 0;
jpayne@69 33132 PyObject *object_reduce = NULL;
jpayne@69 33133 PyObject *object_getstate = NULL;
jpayne@69 33134 PyObject *object_reduce_ex = NULL;
jpayne@69 33135 PyObject *reduce = NULL;
jpayne@69 33136 PyObject *reduce_ex = NULL;
jpayne@69 33137 PyObject *reduce_cython = NULL;
jpayne@69 33138 PyObject *setstate = NULL;
jpayne@69 33139 PyObject *setstate_cython = NULL;
jpayne@69 33140 PyObject *getstate = NULL;
jpayne@69 33141 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 33142 getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
jpayne@69 33143 #else
jpayne@69 33144 getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
jpayne@69 33145 if (!getstate && PyErr_Occurred()) {
jpayne@69 33146 goto __PYX_BAD;
jpayne@69 33147 }
jpayne@69 33148 #endif
jpayne@69 33149 if (getstate) {
jpayne@69 33150 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 33151 object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
jpayne@69 33152 #else
jpayne@69 33153 object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
jpayne@69 33154 if (!object_getstate && PyErr_Occurred()) {
jpayne@69 33155 goto __PYX_BAD;
jpayne@69 33156 }
jpayne@69 33157 #endif
jpayne@69 33158 if (object_getstate != getstate) {
jpayne@69 33159 goto __PYX_GOOD;
jpayne@69 33160 }
jpayne@69 33161 }
jpayne@69 33162 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 33163 object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
jpayne@69 33164 #else
jpayne@69 33165 object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
jpayne@69 33166 #endif
jpayne@69 33167 reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
jpayne@69 33168 if (reduce_ex == object_reduce_ex) {
jpayne@69 33169 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 33170 object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
jpayne@69 33171 #else
jpayne@69 33172 object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
jpayne@69 33173 #endif
jpayne@69 33174 reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
jpayne@69 33175 if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
jpayne@69 33176 reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
jpayne@69 33177 if (likely(reduce_cython)) {
jpayne@69 33178 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@69 33179 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@69 33180 } else if (reduce == object_reduce || PyErr_Occurred()) {
jpayne@69 33181 goto __PYX_BAD;
jpayne@69 33182 }
jpayne@69 33183 setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
jpayne@69 33184 if (!setstate) PyErr_Clear();
jpayne@69 33185 if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
jpayne@69 33186 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
jpayne@69 33187 if (likely(setstate_cython)) {
jpayne@69 33188 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@69 33189 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@69 33190 } else if (!setstate || PyErr_Occurred()) {
jpayne@69 33191 goto __PYX_BAD;
jpayne@69 33192 }
jpayne@69 33193 }
jpayne@69 33194 PyType_Modified((PyTypeObject*)type_obj);
jpayne@69 33195 }
jpayne@69 33196 }
jpayne@69 33197 goto __PYX_GOOD;
jpayne@69 33198 __PYX_BAD:
jpayne@69 33199 if (!PyErr_Occurred()) {
jpayne@69 33200 __Pyx_TypeName type_obj_name =
jpayne@69 33201 __Pyx_PyType_GetName((PyTypeObject*)type_obj);
jpayne@69 33202 PyErr_Format(PyExc_RuntimeError,
jpayne@69 33203 "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
jpayne@69 33204 __Pyx_DECREF_TypeName(type_obj_name);
jpayne@69 33205 }
jpayne@69 33206 ret = -1;
jpayne@69 33207 __PYX_GOOD:
jpayne@69 33208 #if !CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 33209 Py_XDECREF(object_reduce);
jpayne@69 33210 Py_XDECREF(object_reduce_ex);
jpayne@69 33211 Py_XDECREF(object_getstate);
jpayne@69 33212 Py_XDECREF(getstate);
jpayne@69 33213 #endif
jpayne@69 33214 Py_XDECREF(reduce);
jpayne@69 33215 Py_XDECREF(reduce_ex);
jpayne@69 33216 Py_XDECREF(reduce_cython);
jpayne@69 33217 Py_XDECREF(setstate);
jpayne@69 33218 Py_XDECREF(setstate_cython);
jpayne@69 33219 return ret;
jpayne@69 33220 }
jpayne@69 33221 #endif
jpayne@69 33222
jpayne@69 33223 /* TypeImport */
jpayne@69 33224 #ifndef __PYX_HAVE_RT_ImportType_3_0_11
jpayne@69 33225 #define __PYX_HAVE_RT_ImportType_3_0_11
jpayne@69 33226 static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name,
jpayne@69 33227 size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size)
jpayne@69 33228 {
jpayne@69 33229 PyObject *result = 0;
jpayne@69 33230 char warning[200];
jpayne@69 33231 Py_ssize_t basicsize;
jpayne@69 33232 Py_ssize_t itemsize;
jpayne@69 33233 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33234 PyObject *py_basicsize;
jpayne@69 33235 PyObject *py_itemsize;
jpayne@69 33236 #endif
jpayne@69 33237 result = PyObject_GetAttrString(module, class_name);
jpayne@69 33238 if (!result)
jpayne@69 33239 goto bad;
jpayne@69 33240 if (!PyType_Check(result)) {
jpayne@69 33241 PyErr_Format(PyExc_TypeError,
jpayne@69 33242 "%.200s.%.200s is not a type object",
jpayne@69 33243 module_name, class_name);
jpayne@69 33244 goto bad;
jpayne@69 33245 }
jpayne@69 33246 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33247 basicsize = ((PyTypeObject *)result)->tp_basicsize;
jpayne@69 33248 itemsize = ((PyTypeObject *)result)->tp_itemsize;
jpayne@69 33249 #else
jpayne@69 33250 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
jpayne@69 33251 if (!py_basicsize)
jpayne@69 33252 goto bad;
jpayne@69 33253 basicsize = PyLong_AsSsize_t(py_basicsize);
jpayne@69 33254 Py_DECREF(py_basicsize);
jpayne@69 33255 py_basicsize = 0;
jpayne@69 33256 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
jpayne@69 33257 goto bad;
jpayne@69 33258 py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
jpayne@69 33259 if (!py_itemsize)
jpayne@69 33260 goto bad;
jpayne@69 33261 itemsize = PyLong_AsSsize_t(py_itemsize);
jpayne@69 33262 Py_DECREF(py_itemsize);
jpayne@69 33263 py_itemsize = 0;
jpayne@69 33264 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
jpayne@69 33265 goto bad;
jpayne@69 33266 #endif
jpayne@69 33267 if (itemsize) {
jpayne@69 33268 if (size % alignment) {
jpayne@69 33269 alignment = size % alignment;
jpayne@69 33270 }
jpayne@69 33271 if (itemsize < (Py_ssize_t)alignment)
jpayne@69 33272 itemsize = (Py_ssize_t)alignment;
jpayne@69 33273 }
jpayne@69 33274 if ((size_t)(basicsize + itemsize) < size) {
jpayne@69 33275 PyErr_Format(PyExc_ValueError,
jpayne@69 33276 "%.200s.%.200s size changed, may indicate binary incompatibility. "
jpayne@69 33277 "Expected %zd from C header, got %zd from PyObject",
jpayne@69 33278 module_name, class_name, size, basicsize+itemsize);
jpayne@69 33279 goto bad;
jpayne@69 33280 }
jpayne@69 33281 if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 &&
jpayne@69 33282 ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
jpayne@69 33283 PyErr_Format(PyExc_ValueError,
jpayne@69 33284 "%.200s.%.200s size changed, may indicate binary incompatibility. "
jpayne@69 33285 "Expected %zd from C header, got %zd-%zd from PyObject",
jpayne@69 33286 module_name, class_name, size, basicsize, basicsize+itemsize);
jpayne@69 33287 goto bad;
jpayne@69 33288 }
jpayne@69 33289 else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) {
jpayne@69 33290 PyOS_snprintf(warning, sizeof(warning),
jpayne@69 33291 "%s.%s size changed, may indicate binary incompatibility. "
jpayne@69 33292 "Expected %zd from C header, got %zd from PyObject",
jpayne@69 33293 module_name, class_name, size, basicsize);
jpayne@69 33294 if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
jpayne@69 33295 }
jpayne@69 33296 return (PyTypeObject *)result;
jpayne@69 33297 bad:
jpayne@69 33298 Py_XDECREF(result);
jpayne@69 33299 return NULL;
jpayne@69 33300 }
jpayne@69 33301 #endif
jpayne@69 33302
jpayne@69 33303 /* ImportDottedModule */
jpayne@69 33304 #if PY_MAJOR_VERSION >= 3
jpayne@69 33305 static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
jpayne@69 33306 PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
jpayne@69 33307 if (unlikely(PyErr_Occurred())) {
jpayne@69 33308 PyErr_Clear();
jpayne@69 33309 }
jpayne@69 33310 if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
jpayne@69 33311 partial_name = name;
jpayne@69 33312 } else {
jpayne@69 33313 slice = PySequence_GetSlice(parts_tuple, 0, count);
jpayne@69 33314 if (unlikely(!slice))
jpayne@69 33315 goto bad;
jpayne@69 33316 sep = PyUnicode_FromStringAndSize(".", 1);
jpayne@69 33317 if (unlikely(!sep))
jpayne@69 33318 goto bad;
jpayne@69 33319 partial_name = PyUnicode_Join(sep, slice);
jpayne@69 33320 }
jpayne@69 33321 PyErr_Format(
jpayne@69 33322 #if PY_MAJOR_VERSION < 3
jpayne@69 33323 PyExc_ImportError,
jpayne@69 33324 "No module named '%s'", PyString_AS_STRING(partial_name));
jpayne@69 33325 #else
jpayne@69 33326 #if PY_VERSION_HEX >= 0x030600B1
jpayne@69 33327 PyExc_ModuleNotFoundError,
jpayne@69 33328 #else
jpayne@69 33329 PyExc_ImportError,
jpayne@69 33330 #endif
jpayne@69 33331 "No module named '%U'", partial_name);
jpayne@69 33332 #endif
jpayne@69 33333 bad:
jpayne@69 33334 Py_XDECREF(sep);
jpayne@69 33335 Py_XDECREF(slice);
jpayne@69 33336 Py_XDECREF(partial_name);
jpayne@69 33337 return NULL;
jpayne@69 33338 }
jpayne@69 33339 #endif
jpayne@69 33340 #if PY_MAJOR_VERSION >= 3
jpayne@69 33341 static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
jpayne@69 33342 PyObject *imported_module;
jpayne@69 33343 #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400)
jpayne@69 33344 PyObject *modules = PyImport_GetModuleDict();
jpayne@69 33345 if (unlikely(!modules))
jpayne@69 33346 return NULL;
jpayne@69 33347 imported_module = __Pyx_PyDict_GetItemStr(modules, name);
jpayne@69 33348 Py_XINCREF(imported_module);
jpayne@69 33349 #else
jpayne@69 33350 imported_module = PyImport_GetModule(name);
jpayne@69 33351 #endif
jpayne@69 33352 return imported_module;
jpayne@69 33353 }
jpayne@69 33354 #endif
jpayne@69 33355 #if PY_MAJOR_VERSION >= 3
jpayne@69 33356 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
jpayne@69 33357 Py_ssize_t i, nparts;
jpayne@69 33358 nparts = PyTuple_GET_SIZE(parts_tuple);
jpayne@69 33359 for (i=1; i < nparts && module; i++) {
jpayne@69 33360 PyObject *part, *submodule;
jpayne@69 33361 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 33362 part = PyTuple_GET_ITEM(parts_tuple, i);
jpayne@69 33363 #else
jpayne@69 33364 part = PySequence_ITEM(parts_tuple, i);
jpayne@69 33365 #endif
jpayne@69 33366 submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
jpayne@69 33367 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
jpayne@69 33368 Py_DECREF(part);
jpayne@69 33369 #endif
jpayne@69 33370 Py_DECREF(module);
jpayne@69 33371 module = submodule;
jpayne@69 33372 }
jpayne@69 33373 if (unlikely(!module)) {
jpayne@69 33374 return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
jpayne@69 33375 }
jpayne@69 33376 return module;
jpayne@69 33377 }
jpayne@69 33378 #endif
jpayne@69 33379 static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
jpayne@69 33380 #if PY_MAJOR_VERSION < 3
jpayne@69 33381 PyObject *module, *from_list, *star = __pyx_n_s__62;
jpayne@69 33382 CYTHON_UNUSED_VAR(parts_tuple);
jpayne@69 33383 from_list = PyList_New(1);
jpayne@69 33384 if (unlikely(!from_list))
jpayne@69 33385 return NULL;
jpayne@69 33386 Py_INCREF(star);
jpayne@69 33387 PyList_SET_ITEM(from_list, 0, star);
jpayne@69 33388 module = __Pyx_Import(name, from_list, 0);
jpayne@69 33389 Py_DECREF(from_list);
jpayne@69 33390 return module;
jpayne@69 33391 #else
jpayne@69 33392 PyObject *imported_module;
jpayne@69 33393 PyObject *module = __Pyx_Import(name, NULL, 0);
jpayne@69 33394 if (!parts_tuple || unlikely(!module))
jpayne@69 33395 return module;
jpayne@69 33396 imported_module = __Pyx__ImportDottedModule_Lookup(name);
jpayne@69 33397 if (likely(imported_module)) {
jpayne@69 33398 Py_DECREF(module);
jpayne@69 33399 return imported_module;
jpayne@69 33400 }
jpayne@69 33401 PyErr_Clear();
jpayne@69 33402 return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
jpayne@69 33403 #endif
jpayne@69 33404 }
jpayne@69 33405 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
jpayne@69 33406 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
jpayne@69 33407 PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
jpayne@69 33408 if (likely(module)) {
jpayne@69 33409 PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
jpayne@69 33410 if (likely(spec)) {
jpayne@69 33411 PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
jpayne@69 33412 if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
jpayne@69 33413 Py_DECREF(spec);
jpayne@69 33414 spec = NULL;
jpayne@69 33415 }
jpayne@69 33416 Py_XDECREF(unsafe);
jpayne@69 33417 }
jpayne@69 33418 if (likely(!spec)) {
jpayne@69 33419 PyErr_Clear();
jpayne@69 33420 return module;
jpayne@69 33421 }
jpayne@69 33422 Py_DECREF(spec);
jpayne@69 33423 Py_DECREF(module);
jpayne@69 33424 } else if (PyErr_Occurred()) {
jpayne@69 33425 PyErr_Clear();
jpayne@69 33426 }
jpayne@69 33427 #endif
jpayne@69 33428 return __Pyx__ImportDottedModule(name, parts_tuple);
jpayne@69 33429 }
jpayne@69 33430
jpayne@69 33431 /* FetchSharedCythonModule */
jpayne@69 33432 static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
jpayne@69 33433 return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
jpayne@69 33434 }
jpayne@69 33435
jpayne@69 33436 /* FetchCommonType */
jpayne@69 33437 static int __Pyx_VerifyCachedType(PyObject *cached_type,
jpayne@69 33438 const char *name,
jpayne@69 33439 Py_ssize_t basicsize,
jpayne@69 33440 Py_ssize_t expected_basicsize) {
jpayne@69 33441 if (!PyType_Check(cached_type)) {
jpayne@69 33442 PyErr_Format(PyExc_TypeError,
jpayne@69 33443 "Shared Cython type %.200s is not a type object", name);
jpayne@69 33444 return -1;
jpayne@69 33445 }
jpayne@69 33446 if (basicsize != expected_basicsize) {
jpayne@69 33447 PyErr_Format(PyExc_TypeError,
jpayne@69 33448 "Shared Cython type %.200s has the wrong size, try recompiling",
jpayne@69 33449 name);
jpayne@69 33450 return -1;
jpayne@69 33451 }
jpayne@69 33452 return 0;
jpayne@69 33453 }
jpayne@69 33454 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 33455 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
jpayne@69 33456 PyObject* abi_module;
jpayne@69 33457 const char* object_name;
jpayne@69 33458 PyTypeObject *cached_type = NULL;
jpayne@69 33459 abi_module = __Pyx_FetchSharedCythonABIModule();
jpayne@69 33460 if (!abi_module) return NULL;
jpayne@69 33461 object_name = strrchr(type->tp_name, '.');
jpayne@69 33462 object_name = object_name ? object_name+1 : type->tp_name;
jpayne@69 33463 cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
jpayne@69 33464 if (cached_type) {
jpayne@69 33465 if (__Pyx_VerifyCachedType(
jpayne@69 33466 (PyObject *)cached_type,
jpayne@69 33467 object_name,
jpayne@69 33468 cached_type->tp_basicsize,
jpayne@69 33469 type->tp_basicsize) < 0) {
jpayne@69 33470 goto bad;
jpayne@69 33471 }
jpayne@69 33472 goto done;
jpayne@69 33473 }
jpayne@69 33474 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
jpayne@69 33475 PyErr_Clear();
jpayne@69 33476 if (PyType_Ready(type) < 0) goto bad;
jpayne@69 33477 if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
jpayne@69 33478 goto bad;
jpayne@69 33479 Py_INCREF(type);
jpayne@69 33480 cached_type = type;
jpayne@69 33481 done:
jpayne@69 33482 Py_DECREF(abi_module);
jpayne@69 33483 return cached_type;
jpayne@69 33484 bad:
jpayne@69 33485 Py_XDECREF(cached_type);
jpayne@69 33486 cached_type = NULL;
jpayne@69 33487 goto done;
jpayne@69 33488 }
jpayne@69 33489 #else
jpayne@69 33490 static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
jpayne@69 33491 PyObject *abi_module, *cached_type = NULL;
jpayne@69 33492 const char* object_name = strrchr(spec->name, '.');
jpayne@69 33493 object_name = object_name ? object_name+1 : spec->name;
jpayne@69 33494 abi_module = __Pyx_FetchSharedCythonABIModule();
jpayne@69 33495 if (!abi_module) return NULL;
jpayne@69 33496 cached_type = PyObject_GetAttrString(abi_module, object_name);
jpayne@69 33497 if (cached_type) {
jpayne@69 33498 Py_ssize_t basicsize;
jpayne@69 33499 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33500 PyObject *py_basicsize;
jpayne@69 33501 py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
jpayne@69 33502 if (unlikely(!py_basicsize)) goto bad;
jpayne@69 33503 basicsize = PyLong_AsSsize_t(py_basicsize);
jpayne@69 33504 Py_DECREF(py_basicsize);
jpayne@69 33505 py_basicsize = 0;
jpayne@69 33506 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
jpayne@69 33507 #else
jpayne@69 33508 basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
jpayne@69 33509 #endif
jpayne@69 33510 if (__Pyx_VerifyCachedType(
jpayne@69 33511 cached_type,
jpayne@69 33512 object_name,
jpayne@69 33513 basicsize,
jpayne@69 33514 spec->basicsize) < 0) {
jpayne@69 33515 goto bad;
jpayne@69 33516 }
jpayne@69 33517 goto done;
jpayne@69 33518 }
jpayne@69 33519 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
jpayne@69 33520 PyErr_Clear();
jpayne@69 33521 CYTHON_UNUSED_VAR(module);
jpayne@69 33522 cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
jpayne@69 33523 if (unlikely(!cached_type)) goto bad;
jpayne@69 33524 if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
jpayne@69 33525 if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
jpayne@69 33526 done:
jpayne@69 33527 Py_DECREF(abi_module);
jpayne@69 33528 assert(cached_type == NULL || PyType_Check(cached_type));
jpayne@69 33529 return (PyTypeObject *) cached_type;
jpayne@69 33530 bad:
jpayne@69 33531 Py_XDECREF(cached_type);
jpayne@69 33532 cached_type = NULL;
jpayne@69 33533 goto done;
jpayne@69 33534 }
jpayne@69 33535 #endif
jpayne@69 33536
jpayne@69 33537 /* PyVectorcallFastCallDict */
jpayne@69 33538 #if CYTHON_METH_FASTCALL
jpayne@69 33539 static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
jpayne@69 33540 {
jpayne@69 33541 PyObject *res = NULL;
jpayne@69 33542 PyObject *kwnames;
jpayne@69 33543 PyObject **newargs;
jpayne@69 33544 PyObject **kwvalues;
jpayne@69 33545 Py_ssize_t i, pos;
jpayne@69 33546 size_t j;
jpayne@69 33547 PyObject *key, *value;
jpayne@69 33548 unsigned long keys_are_strings;
jpayne@69 33549 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
jpayne@69 33550 newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
jpayne@69 33551 if (unlikely(newargs == NULL)) {
jpayne@69 33552 PyErr_NoMemory();
jpayne@69 33553 return NULL;
jpayne@69 33554 }
jpayne@69 33555 for (j = 0; j < nargs; j++) newargs[j] = args[j];
jpayne@69 33556 kwnames = PyTuple_New(nkw);
jpayne@69 33557 if (unlikely(kwnames == NULL)) {
jpayne@69 33558 PyMem_Free(newargs);
jpayne@69 33559 return NULL;
jpayne@69 33560 }
jpayne@69 33561 kwvalues = newargs + nargs;
jpayne@69 33562 pos = i = 0;
jpayne@69 33563 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
jpayne@69 33564 while (PyDict_Next(kw, &pos, &key, &value)) {
jpayne@69 33565 keys_are_strings &= Py_TYPE(key)->tp_flags;
jpayne@69 33566 Py_INCREF(key);
jpayne@69 33567 Py_INCREF(value);
jpayne@69 33568 PyTuple_SET_ITEM(kwnames, i, key);
jpayne@69 33569 kwvalues[i] = value;
jpayne@69 33570 i++;
jpayne@69 33571 }
jpayne@69 33572 if (unlikely(!keys_are_strings)) {
jpayne@69 33573 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
jpayne@69 33574 goto cleanup;
jpayne@69 33575 }
jpayne@69 33576 res = vc(func, newargs, nargs, kwnames);
jpayne@69 33577 cleanup:
jpayne@69 33578 Py_DECREF(kwnames);
jpayne@69 33579 for (i = 0; i < nkw; i++)
jpayne@69 33580 Py_DECREF(kwvalues[i]);
jpayne@69 33581 PyMem_Free(newargs);
jpayne@69 33582 return res;
jpayne@69 33583 }
jpayne@69 33584 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
jpayne@69 33585 {
jpayne@69 33586 if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
jpayne@69 33587 return vc(func, args, nargs, NULL);
jpayne@69 33588 }
jpayne@69 33589 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
jpayne@69 33590 }
jpayne@69 33591 #endif
jpayne@69 33592
jpayne@69 33593 /* CythonFunctionShared */
jpayne@69 33594 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33595 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
jpayne@69 33596 if (__Pyx_CyFunction_Check(func)) {
jpayne@69 33597 return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
jpayne@69 33598 } else if (PyCFunction_Check(func)) {
jpayne@69 33599 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
jpayne@69 33600 }
jpayne@69 33601 return 0;
jpayne@69 33602 }
jpayne@69 33603 #else
jpayne@69 33604 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
jpayne@69 33605 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
jpayne@69 33606 }
jpayne@69 33607 #endif
jpayne@69 33608 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
jpayne@69 33609 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33610 __Pyx_Py_XDECREF_SET(
jpayne@69 33611 __Pyx_CyFunction_GetClassObj(f),
jpayne@69 33612 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
jpayne@69 33613 #else
jpayne@69 33614 __Pyx_Py_XDECREF_SET(
jpayne@69 33615 ((PyCMethodObject *) (f))->mm_class,
jpayne@69 33616 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
jpayne@69 33617 #endif
jpayne@69 33618 }
jpayne@69 33619 static PyObject *
jpayne@69 33620 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
jpayne@69 33621 {
jpayne@69 33622 CYTHON_UNUSED_VAR(closure);
jpayne@69 33623 if (unlikely(op->func_doc == NULL)) {
jpayne@69 33624 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33625 op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
jpayne@69 33626 if (unlikely(!op->func_doc)) return NULL;
jpayne@69 33627 #else
jpayne@69 33628 if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
jpayne@69 33629 #if PY_MAJOR_VERSION >= 3
jpayne@69 33630 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
jpayne@69 33631 #else
jpayne@69 33632 op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
jpayne@69 33633 #endif
jpayne@69 33634 if (unlikely(op->func_doc == NULL))
jpayne@69 33635 return NULL;
jpayne@69 33636 } else {
jpayne@69 33637 Py_INCREF(Py_None);
jpayne@69 33638 return Py_None;
jpayne@69 33639 }
jpayne@69 33640 #endif
jpayne@69 33641 }
jpayne@69 33642 Py_INCREF(op->func_doc);
jpayne@69 33643 return op->func_doc;
jpayne@69 33644 }
jpayne@69 33645 static int
jpayne@69 33646 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@69 33647 {
jpayne@69 33648 CYTHON_UNUSED_VAR(context);
jpayne@69 33649 if (value == NULL) {
jpayne@69 33650 value = Py_None;
jpayne@69 33651 }
jpayne@69 33652 Py_INCREF(value);
jpayne@69 33653 __Pyx_Py_XDECREF_SET(op->func_doc, value);
jpayne@69 33654 return 0;
jpayne@69 33655 }
jpayne@69 33656 static PyObject *
jpayne@69 33657 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
jpayne@69 33658 {
jpayne@69 33659 CYTHON_UNUSED_VAR(context);
jpayne@69 33660 if (unlikely(op->func_name == NULL)) {
jpayne@69 33661 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33662 op->func_name = PyObject_GetAttrString(op->func, "__name__");
jpayne@69 33663 #elif PY_MAJOR_VERSION >= 3
jpayne@69 33664 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
jpayne@69 33665 #else
jpayne@69 33666 op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
jpayne@69 33667 #endif
jpayne@69 33668 if (unlikely(op->func_name == NULL))
jpayne@69 33669 return NULL;
jpayne@69 33670 }
jpayne@69 33671 Py_INCREF(op->func_name);
jpayne@69 33672 return op->func_name;
jpayne@69 33673 }
jpayne@69 33674 static int
jpayne@69 33675 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@69 33676 {
jpayne@69 33677 CYTHON_UNUSED_VAR(context);
jpayne@69 33678 #if PY_MAJOR_VERSION >= 3
jpayne@69 33679 if (unlikely(value == NULL || !PyUnicode_Check(value)))
jpayne@69 33680 #else
jpayne@69 33681 if (unlikely(value == NULL || !PyString_Check(value)))
jpayne@69 33682 #endif
jpayne@69 33683 {
jpayne@69 33684 PyErr_SetString(PyExc_TypeError,
jpayne@69 33685 "__name__ must be set to a string object");
jpayne@69 33686 return -1;
jpayne@69 33687 }
jpayne@69 33688 Py_INCREF(value);
jpayne@69 33689 __Pyx_Py_XDECREF_SET(op->func_name, value);
jpayne@69 33690 return 0;
jpayne@69 33691 }
jpayne@69 33692 static PyObject *
jpayne@69 33693 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
jpayne@69 33694 {
jpayne@69 33695 CYTHON_UNUSED_VAR(context);
jpayne@69 33696 Py_INCREF(op->func_qualname);
jpayne@69 33697 return op->func_qualname;
jpayne@69 33698 }
jpayne@69 33699 static int
jpayne@69 33700 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@69 33701 {
jpayne@69 33702 CYTHON_UNUSED_VAR(context);
jpayne@69 33703 #if PY_MAJOR_VERSION >= 3
jpayne@69 33704 if (unlikely(value == NULL || !PyUnicode_Check(value)))
jpayne@69 33705 #else
jpayne@69 33706 if (unlikely(value == NULL || !PyString_Check(value)))
jpayne@69 33707 #endif
jpayne@69 33708 {
jpayne@69 33709 PyErr_SetString(PyExc_TypeError,
jpayne@69 33710 "__qualname__ must be set to a string object");
jpayne@69 33711 return -1;
jpayne@69 33712 }
jpayne@69 33713 Py_INCREF(value);
jpayne@69 33714 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
jpayne@69 33715 return 0;
jpayne@69 33716 }
jpayne@69 33717 static PyObject *
jpayne@69 33718 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
jpayne@69 33719 {
jpayne@69 33720 CYTHON_UNUSED_VAR(context);
jpayne@69 33721 if (unlikely(op->func_dict == NULL)) {
jpayne@69 33722 op->func_dict = PyDict_New();
jpayne@69 33723 if (unlikely(op->func_dict == NULL))
jpayne@69 33724 return NULL;
jpayne@69 33725 }
jpayne@69 33726 Py_INCREF(op->func_dict);
jpayne@69 33727 return op->func_dict;
jpayne@69 33728 }
jpayne@69 33729 static int
jpayne@69 33730 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@69 33731 {
jpayne@69 33732 CYTHON_UNUSED_VAR(context);
jpayne@69 33733 if (unlikely(value == NULL)) {
jpayne@69 33734 PyErr_SetString(PyExc_TypeError,
jpayne@69 33735 "function's dictionary may not be deleted");
jpayne@69 33736 return -1;
jpayne@69 33737 }
jpayne@69 33738 if (unlikely(!PyDict_Check(value))) {
jpayne@69 33739 PyErr_SetString(PyExc_TypeError,
jpayne@69 33740 "setting function's dictionary to a non-dict");
jpayne@69 33741 return -1;
jpayne@69 33742 }
jpayne@69 33743 Py_INCREF(value);
jpayne@69 33744 __Pyx_Py_XDECREF_SET(op->func_dict, value);
jpayne@69 33745 return 0;
jpayne@69 33746 }
jpayne@69 33747 static PyObject *
jpayne@69 33748 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
jpayne@69 33749 {
jpayne@69 33750 CYTHON_UNUSED_VAR(context);
jpayne@69 33751 Py_INCREF(op->func_globals);
jpayne@69 33752 return op->func_globals;
jpayne@69 33753 }
jpayne@69 33754 static PyObject *
jpayne@69 33755 __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
jpayne@69 33756 {
jpayne@69 33757 CYTHON_UNUSED_VAR(op);
jpayne@69 33758 CYTHON_UNUSED_VAR(context);
jpayne@69 33759 Py_INCREF(Py_None);
jpayne@69 33760 return Py_None;
jpayne@69 33761 }
jpayne@69 33762 static PyObject *
jpayne@69 33763 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
jpayne@69 33764 {
jpayne@69 33765 PyObject* result = (op->func_code) ? op->func_code : Py_None;
jpayne@69 33766 CYTHON_UNUSED_VAR(context);
jpayne@69 33767 Py_INCREF(result);
jpayne@69 33768 return result;
jpayne@69 33769 }
jpayne@69 33770 static int
jpayne@69 33771 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
jpayne@69 33772 int result = 0;
jpayne@69 33773 PyObject *res = op->defaults_getter((PyObject *) op);
jpayne@69 33774 if (unlikely(!res))
jpayne@69 33775 return -1;
jpayne@69 33776 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 33777 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
jpayne@69 33778 Py_INCREF(op->defaults_tuple);
jpayne@69 33779 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
jpayne@69 33780 Py_INCREF(op->defaults_kwdict);
jpayne@69 33781 #else
jpayne@69 33782 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
jpayne@69 33783 if (unlikely(!op->defaults_tuple)) result = -1;
jpayne@69 33784 else {
jpayne@69 33785 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
jpayne@69 33786 if (unlikely(!op->defaults_kwdict)) result = -1;
jpayne@69 33787 }
jpayne@69 33788 #endif
jpayne@69 33789 Py_DECREF(res);
jpayne@69 33790 return result;
jpayne@69 33791 }
jpayne@69 33792 static int
jpayne@69 33793 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@69 33794 CYTHON_UNUSED_VAR(context);
jpayne@69 33795 if (!value) {
jpayne@69 33796 value = Py_None;
jpayne@69 33797 } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
jpayne@69 33798 PyErr_SetString(PyExc_TypeError,
jpayne@69 33799 "__defaults__ must be set to a tuple object");
jpayne@69 33800 return -1;
jpayne@69 33801 }
jpayne@69 33802 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
jpayne@69 33803 "currently affect the values used in function calls", 1);
jpayne@69 33804 Py_INCREF(value);
jpayne@69 33805 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
jpayne@69 33806 return 0;
jpayne@69 33807 }
jpayne@69 33808 static PyObject *
jpayne@69 33809 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
jpayne@69 33810 PyObject* result = op->defaults_tuple;
jpayne@69 33811 CYTHON_UNUSED_VAR(context);
jpayne@69 33812 if (unlikely(!result)) {
jpayne@69 33813 if (op->defaults_getter) {
jpayne@69 33814 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
jpayne@69 33815 result = op->defaults_tuple;
jpayne@69 33816 } else {
jpayne@69 33817 result = Py_None;
jpayne@69 33818 }
jpayne@69 33819 }
jpayne@69 33820 Py_INCREF(result);
jpayne@69 33821 return result;
jpayne@69 33822 }
jpayne@69 33823 static int
jpayne@69 33824 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@69 33825 CYTHON_UNUSED_VAR(context);
jpayne@69 33826 if (!value) {
jpayne@69 33827 value = Py_None;
jpayne@69 33828 } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
jpayne@69 33829 PyErr_SetString(PyExc_TypeError,
jpayne@69 33830 "__kwdefaults__ must be set to a dict object");
jpayne@69 33831 return -1;
jpayne@69 33832 }
jpayne@69 33833 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
jpayne@69 33834 "currently affect the values used in function calls", 1);
jpayne@69 33835 Py_INCREF(value);
jpayne@69 33836 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
jpayne@69 33837 return 0;
jpayne@69 33838 }
jpayne@69 33839 static PyObject *
jpayne@69 33840 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
jpayne@69 33841 PyObject* result = op->defaults_kwdict;
jpayne@69 33842 CYTHON_UNUSED_VAR(context);
jpayne@69 33843 if (unlikely(!result)) {
jpayne@69 33844 if (op->defaults_getter) {
jpayne@69 33845 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
jpayne@69 33846 result = op->defaults_kwdict;
jpayne@69 33847 } else {
jpayne@69 33848 result = Py_None;
jpayne@69 33849 }
jpayne@69 33850 }
jpayne@69 33851 Py_INCREF(result);
jpayne@69 33852 return result;
jpayne@69 33853 }
jpayne@69 33854 static int
jpayne@69 33855 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@69 33856 CYTHON_UNUSED_VAR(context);
jpayne@69 33857 if (!value || value == Py_None) {
jpayne@69 33858 value = NULL;
jpayne@69 33859 } else if (unlikely(!PyDict_Check(value))) {
jpayne@69 33860 PyErr_SetString(PyExc_TypeError,
jpayne@69 33861 "__annotations__ must be set to a dict object");
jpayne@69 33862 return -1;
jpayne@69 33863 }
jpayne@69 33864 Py_XINCREF(value);
jpayne@69 33865 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
jpayne@69 33866 return 0;
jpayne@69 33867 }
jpayne@69 33868 static PyObject *
jpayne@69 33869 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
jpayne@69 33870 PyObject* result = op->func_annotations;
jpayne@69 33871 CYTHON_UNUSED_VAR(context);
jpayne@69 33872 if (unlikely(!result)) {
jpayne@69 33873 result = PyDict_New();
jpayne@69 33874 if (unlikely(!result)) return NULL;
jpayne@69 33875 op->func_annotations = result;
jpayne@69 33876 }
jpayne@69 33877 Py_INCREF(result);
jpayne@69 33878 return result;
jpayne@69 33879 }
jpayne@69 33880 static PyObject *
jpayne@69 33881 __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
jpayne@69 33882 int is_coroutine;
jpayne@69 33883 CYTHON_UNUSED_VAR(context);
jpayne@69 33884 if (op->func_is_coroutine) {
jpayne@69 33885 return __Pyx_NewRef(op->func_is_coroutine);
jpayne@69 33886 }
jpayne@69 33887 is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
jpayne@69 33888 #if PY_VERSION_HEX >= 0x03050000
jpayne@69 33889 if (is_coroutine) {
jpayne@69 33890 PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
jpayne@69 33891 fromlist = PyList_New(1);
jpayne@69 33892 if (unlikely(!fromlist)) return NULL;
jpayne@69 33893 Py_INCREF(marker);
jpayne@69 33894 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 33895 PyList_SET_ITEM(fromlist, 0, marker);
jpayne@69 33896 #else
jpayne@69 33897 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
jpayne@69 33898 Py_DECREF(marker);
jpayne@69 33899 Py_DECREF(fromlist);
jpayne@69 33900 return NULL;
jpayne@69 33901 }
jpayne@69 33902 #endif
jpayne@69 33903 module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
jpayne@69 33904 Py_DECREF(fromlist);
jpayne@69 33905 if (unlikely(!module)) goto ignore;
jpayne@69 33906 op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
jpayne@69 33907 Py_DECREF(module);
jpayne@69 33908 if (likely(op->func_is_coroutine)) {
jpayne@69 33909 return __Pyx_NewRef(op->func_is_coroutine);
jpayne@69 33910 }
jpayne@69 33911 ignore:
jpayne@69 33912 PyErr_Clear();
jpayne@69 33913 }
jpayne@69 33914 #endif
jpayne@69 33915 op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
jpayne@69 33916 return __Pyx_NewRef(op->func_is_coroutine);
jpayne@69 33917 }
jpayne@69 33918 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33919 static PyObject *
jpayne@69 33920 __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
jpayne@69 33921 CYTHON_UNUSED_VAR(context);
jpayne@69 33922 return PyObject_GetAttrString(op->func, "__module__");
jpayne@69 33923 }
jpayne@69 33924 static int
jpayne@69 33925 __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@69 33926 CYTHON_UNUSED_VAR(context);
jpayne@69 33927 return PyObject_SetAttrString(op->func, "__module__", value);
jpayne@69 33928 }
jpayne@69 33929 #endif
jpayne@69 33930 static PyGetSetDef __pyx_CyFunction_getsets[] = {
jpayne@69 33931 {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
jpayne@69 33932 {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
jpayne@69 33933 {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
jpayne@69 33934 {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
jpayne@69 33935 {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
jpayne@69 33936 {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
jpayne@69 33937 {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
jpayne@69 33938 {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
jpayne@69 33939 {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
jpayne@69 33940 {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
jpayne@69 33941 {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
jpayne@69 33942 {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
jpayne@69 33943 {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
jpayne@69 33944 {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
jpayne@69 33945 {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
jpayne@69 33946 {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
jpayne@69 33947 {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
jpayne@69 33948 {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
jpayne@69 33949 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33950 {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
jpayne@69 33951 #endif
jpayne@69 33952 {0, 0, 0, 0, 0}
jpayne@69 33953 };
jpayne@69 33954 static PyMemberDef __pyx_CyFunction_members[] = {
jpayne@69 33955 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33956 {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
jpayne@69 33957 #endif
jpayne@69 33958 #if CYTHON_USE_TYPE_SPECS
jpayne@69 33959 {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
jpayne@69 33960 #if CYTHON_METH_FASTCALL
jpayne@69 33961 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 33962 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
jpayne@69 33963 #else
jpayne@69 33964 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33965 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
jpayne@69 33966 #endif
jpayne@69 33967 #endif
jpayne@69 33968 #endif
jpayne@69 33969 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33970 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
jpayne@69 33971 #else
jpayne@69 33972 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
jpayne@69 33973 #endif
jpayne@69 33974 #endif
jpayne@69 33975 {0, 0, 0, 0, 0}
jpayne@69 33976 };
jpayne@69 33977 static PyObject *
jpayne@69 33978 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
jpayne@69 33979 {
jpayne@69 33980 CYTHON_UNUSED_VAR(args);
jpayne@69 33981 #if PY_MAJOR_VERSION >= 3
jpayne@69 33982 Py_INCREF(m->func_qualname);
jpayne@69 33983 return m->func_qualname;
jpayne@69 33984 #else
jpayne@69 33985 return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
jpayne@69 33986 #endif
jpayne@69 33987 }
jpayne@69 33988 static PyMethodDef __pyx_CyFunction_methods[] = {
jpayne@69 33989 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
jpayne@69 33990 {0, 0, 0, 0}
jpayne@69 33991 };
jpayne@69 33992 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 33993 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
jpayne@69 33994 #else
jpayne@69 33995 #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
jpayne@69 33996 #endif
jpayne@69 33997 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
jpayne@69 33998 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
jpayne@69 33999 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34000 PyCFunctionObject *cf = (PyCFunctionObject*) op;
jpayne@69 34001 #endif
jpayne@69 34002 if (unlikely(op == NULL))
jpayne@69 34003 return NULL;
jpayne@69 34004 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34005 op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
jpayne@69 34006 if (unlikely(!op->func)) return NULL;
jpayne@69 34007 #endif
jpayne@69 34008 op->flags = flags;
jpayne@69 34009 __Pyx_CyFunction_weakreflist(op) = NULL;
jpayne@69 34010 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34011 cf->m_ml = ml;
jpayne@69 34012 cf->m_self = (PyObject *) op;
jpayne@69 34013 #endif
jpayne@69 34014 Py_XINCREF(closure);
jpayne@69 34015 op->func_closure = closure;
jpayne@69 34016 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34017 Py_XINCREF(module);
jpayne@69 34018 cf->m_module = module;
jpayne@69 34019 #endif
jpayne@69 34020 op->func_dict = NULL;
jpayne@69 34021 op->func_name = NULL;
jpayne@69 34022 Py_INCREF(qualname);
jpayne@69 34023 op->func_qualname = qualname;
jpayne@69 34024 op->func_doc = NULL;
jpayne@69 34025 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34026 op->func_classobj = NULL;
jpayne@69 34027 #else
jpayne@69 34028 ((PyCMethodObject*)op)->mm_class = NULL;
jpayne@69 34029 #endif
jpayne@69 34030 op->func_globals = globals;
jpayne@69 34031 Py_INCREF(op->func_globals);
jpayne@69 34032 Py_XINCREF(code);
jpayne@69 34033 op->func_code = code;
jpayne@69 34034 op->defaults_pyobjects = 0;
jpayne@69 34035 op->defaults_size = 0;
jpayne@69 34036 op->defaults = NULL;
jpayne@69 34037 op->defaults_tuple = NULL;
jpayne@69 34038 op->defaults_kwdict = NULL;
jpayne@69 34039 op->defaults_getter = NULL;
jpayne@69 34040 op->func_annotations = NULL;
jpayne@69 34041 op->func_is_coroutine = NULL;
jpayne@69 34042 #if CYTHON_METH_FASTCALL
jpayne@69 34043 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
jpayne@69 34044 case METH_NOARGS:
jpayne@69 34045 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
jpayne@69 34046 break;
jpayne@69 34047 case METH_O:
jpayne@69 34048 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
jpayne@69 34049 break;
jpayne@69 34050 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
jpayne@69 34051 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
jpayne@69 34052 break;
jpayne@69 34053 case METH_FASTCALL | METH_KEYWORDS:
jpayne@69 34054 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
jpayne@69 34055 break;
jpayne@69 34056 case METH_VARARGS | METH_KEYWORDS:
jpayne@69 34057 __Pyx_CyFunction_func_vectorcall(op) = NULL;
jpayne@69 34058 break;
jpayne@69 34059 default:
jpayne@69 34060 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
jpayne@69 34061 Py_DECREF(op);
jpayne@69 34062 return NULL;
jpayne@69 34063 }
jpayne@69 34064 #endif
jpayne@69 34065 return (PyObject *) op;
jpayne@69 34066 }
jpayne@69 34067 static int
jpayne@69 34068 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
jpayne@69 34069 {
jpayne@69 34070 Py_CLEAR(m->func_closure);
jpayne@69 34071 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34072 Py_CLEAR(m->func);
jpayne@69 34073 #else
jpayne@69 34074 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
jpayne@69 34075 #endif
jpayne@69 34076 Py_CLEAR(m->func_dict);
jpayne@69 34077 Py_CLEAR(m->func_name);
jpayne@69 34078 Py_CLEAR(m->func_qualname);
jpayne@69 34079 Py_CLEAR(m->func_doc);
jpayne@69 34080 Py_CLEAR(m->func_globals);
jpayne@69 34081 Py_CLEAR(m->func_code);
jpayne@69 34082 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34083 #if PY_VERSION_HEX < 0x030900B1
jpayne@69 34084 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
jpayne@69 34085 #else
jpayne@69 34086 {
jpayne@69 34087 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
jpayne@69 34088 ((PyCMethodObject *) (m))->mm_class = NULL;
jpayne@69 34089 Py_XDECREF(cls);
jpayne@69 34090 }
jpayne@69 34091 #endif
jpayne@69 34092 #endif
jpayne@69 34093 Py_CLEAR(m->defaults_tuple);
jpayne@69 34094 Py_CLEAR(m->defaults_kwdict);
jpayne@69 34095 Py_CLEAR(m->func_annotations);
jpayne@69 34096 Py_CLEAR(m->func_is_coroutine);
jpayne@69 34097 if (m->defaults) {
jpayne@69 34098 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
jpayne@69 34099 int i;
jpayne@69 34100 for (i = 0; i < m->defaults_pyobjects; i++)
jpayne@69 34101 Py_XDECREF(pydefaults[i]);
jpayne@69 34102 PyObject_Free(m->defaults);
jpayne@69 34103 m->defaults = NULL;
jpayne@69 34104 }
jpayne@69 34105 return 0;
jpayne@69 34106 }
jpayne@69 34107 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
jpayne@69 34108 {
jpayne@69 34109 if (__Pyx_CyFunction_weakreflist(m) != NULL)
jpayne@69 34110 PyObject_ClearWeakRefs((PyObject *) m);
jpayne@69 34111 __Pyx_CyFunction_clear(m);
jpayne@69 34112 __Pyx_PyHeapTypeObject_GC_Del(m);
jpayne@69 34113 }
jpayne@69 34114 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
jpayne@69 34115 {
jpayne@69 34116 PyObject_GC_UnTrack(m);
jpayne@69 34117 __Pyx__CyFunction_dealloc(m);
jpayne@69 34118 }
jpayne@69 34119 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
jpayne@69 34120 {
jpayne@69 34121 Py_VISIT(m->func_closure);
jpayne@69 34122 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34123 Py_VISIT(m->func);
jpayne@69 34124 #else
jpayne@69 34125 Py_VISIT(((PyCFunctionObject*)m)->m_module);
jpayne@69 34126 #endif
jpayne@69 34127 Py_VISIT(m->func_dict);
jpayne@69 34128 Py_VISIT(m->func_name);
jpayne@69 34129 Py_VISIT(m->func_qualname);
jpayne@69 34130 Py_VISIT(m->func_doc);
jpayne@69 34131 Py_VISIT(m->func_globals);
jpayne@69 34132 Py_VISIT(m->func_code);
jpayne@69 34133 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34134 Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
jpayne@69 34135 #endif
jpayne@69 34136 Py_VISIT(m->defaults_tuple);
jpayne@69 34137 Py_VISIT(m->defaults_kwdict);
jpayne@69 34138 Py_VISIT(m->func_is_coroutine);
jpayne@69 34139 if (m->defaults) {
jpayne@69 34140 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
jpayne@69 34141 int i;
jpayne@69 34142 for (i = 0; i < m->defaults_pyobjects; i++)
jpayne@69 34143 Py_VISIT(pydefaults[i]);
jpayne@69 34144 }
jpayne@69 34145 return 0;
jpayne@69 34146 }
jpayne@69 34147 static PyObject*
jpayne@69 34148 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
jpayne@69 34149 {
jpayne@69 34150 #if PY_MAJOR_VERSION >= 3
jpayne@69 34151 return PyUnicode_FromFormat("<cyfunction %U at %p>",
jpayne@69 34152 op->func_qualname, (void *)op);
jpayne@69 34153 #else
jpayne@69 34154 return PyString_FromFormat("<cyfunction %s at %p>",
jpayne@69 34155 PyString_AsString(op->func_qualname), (void *)op);
jpayne@69 34156 #endif
jpayne@69 34157 }
jpayne@69 34158 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
jpayne@69 34159 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34160 PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
jpayne@69 34161 PyObject *py_name = NULL;
jpayne@69 34162 PyCFunction meth;
jpayne@69 34163 int flags;
jpayne@69 34164 meth = PyCFunction_GetFunction(f);
jpayne@69 34165 if (unlikely(!meth)) return NULL;
jpayne@69 34166 flags = PyCFunction_GetFlags(f);
jpayne@69 34167 if (unlikely(flags < 0)) return NULL;
jpayne@69 34168 #else
jpayne@69 34169 PyCFunctionObject* f = (PyCFunctionObject*)func;
jpayne@69 34170 PyCFunction meth = f->m_ml->ml_meth;
jpayne@69 34171 int flags = f->m_ml->ml_flags;
jpayne@69 34172 #endif
jpayne@69 34173 Py_ssize_t size;
jpayne@69 34174 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
jpayne@69 34175 case METH_VARARGS:
jpayne@69 34176 if (likely(kw == NULL || PyDict_Size(kw) == 0))
jpayne@69 34177 return (*meth)(self, arg);
jpayne@69 34178 break;
jpayne@69 34179 case METH_VARARGS | METH_KEYWORDS:
jpayne@69 34180 return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
jpayne@69 34181 case METH_NOARGS:
jpayne@69 34182 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
jpayne@69 34183 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 34184 size = PyTuple_GET_SIZE(arg);
jpayne@69 34185 #else
jpayne@69 34186 size = PyTuple_Size(arg);
jpayne@69 34187 if (unlikely(size < 0)) return NULL;
jpayne@69 34188 #endif
jpayne@69 34189 if (likely(size == 0))
jpayne@69 34190 return (*meth)(self, NULL);
jpayne@69 34191 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34192 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
jpayne@69 34193 if (!py_name) return NULL;
jpayne@69 34194 PyErr_Format(PyExc_TypeError,
jpayne@69 34195 "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 34196 py_name, size);
jpayne@69 34197 Py_DECREF(py_name);
jpayne@69 34198 #else
jpayne@69 34199 PyErr_Format(PyExc_TypeError,
jpayne@69 34200 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 34201 f->m_ml->ml_name, size);
jpayne@69 34202 #endif
jpayne@69 34203 return NULL;
jpayne@69 34204 }
jpayne@69 34205 break;
jpayne@69 34206 case METH_O:
jpayne@69 34207 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
jpayne@69 34208 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 34209 size = PyTuple_GET_SIZE(arg);
jpayne@69 34210 #else
jpayne@69 34211 size = PyTuple_Size(arg);
jpayne@69 34212 if (unlikely(size < 0)) return NULL;
jpayne@69 34213 #endif
jpayne@69 34214 if (likely(size == 1)) {
jpayne@69 34215 PyObject *result, *arg0;
jpayne@69 34216 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 34217 arg0 = PyTuple_GET_ITEM(arg, 0);
jpayne@69 34218 #else
jpayne@69 34219 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
jpayne@69 34220 #endif
jpayne@69 34221 result = (*meth)(self, arg0);
jpayne@69 34222 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
jpayne@69 34223 Py_DECREF(arg0);
jpayne@69 34224 #endif
jpayne@69 34225 return result;
jpayne@69 34226 }
jpayne@69 34227 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34228 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
jpayne@69 34229 if (!py_name) return NULL;
jpayne@69 34230 PyErr_Format(PyExc_TypeError,
jpayne@69 34231 "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 34232 py_name, size);
jpayne@69 34233 Py_DECREF(py_name);
jpayne@69 34234 #else
jpayne@69 34235 PyErr_Format(PyExc_TypeError,
jpayne@69 34236 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 34237 f->m_ml->ml_name, size);
jpayne@69 34238 #endif
jpayne@69 34239 return NULL;
jpayne@69 34240 }
jpayne@69 34241 break;
jpayne@69 34242 default:
jpayne@69 34243 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
jpayne@69 34244 return NULL;
jpayne@69 34245 }
jpayne@69 34246 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34247 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
jpayne@69 34248 if (!py_name) return NULL;
jpayne@69 34249 PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
jpayne@69 34250 py_name);
jpayne@69 34251 Py_DECREF(py_name);
jpayne@69 34252 #else
jpayne@69 34253 PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
jpayne@69 34254 f->m_ml->ml_name);
jpayne@69 34255 #endif
jpayne@69 34256 return NULL;
jpayne@69 34257 }
jpayne@69 34258 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
jpayne@69 34259 PyObject *self, *result;
jpayne@69 34260 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34261 self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
jpayne@69 34262 if (unlikely(!self) && PyErr_Occurred()) return NULL;
jpayne@69 34263 #else
jpayne@69 34264 self = ((PyCFunctionObject*)func)->m_self;
jpayne@69 34265 #endif
jpayne@69 34266 result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
jpayne@69 34267 return result;
jpayne@69 34268 }
jpayne@69 34269 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
jpayne@69 34270 PyObject *result;
jpayne@69 34271 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
jpayne@69 34272 #if CYTHON_METH_FASTCALL
jpayne@69 34273 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
jpayne@69 34274 if (vc) {
jpayne@69 34275 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 34276 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
jpayne@69 34277 #else
jpayne@69 34278 (void) &__Pyx_PyVectorcall_FastCallDict;
jpayne@69 34279 return PyVectorcall_Call(func, args, kw);
jpayne@69 34280 #endif
jpayne@69 34281 }
jpayne@69 34282 #endif
jpayne@69 34283 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
jpayne@69 34284 Py_ssize_t argc;
jpayne@69 34285 PyObject *new_args;
jpayne@69 34286 PyObject *self;
jpayne@69 34287 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 34288 argc = PyTuple_GET_SIZE(args);
jpayne@69 34289 #else
jpayne@69 34290 argc = PyTuple_Size(args);
jpayne@69 34291 if (unlikely(!argc) < 0) return NULL;
jpayne@69 34292 #endif
jpayne@69 34293 new_args = PyTuple_GetSlice(args, 1, argc);
jpayne@69 34294 if (unlikely(!new_args))
jpayne@69 34295 return NULL;
jpayne@69 34296 self = PyTuple_GetItem(args, 0);
jpayne@69 34297 if (unlikely(!self)) {
jpayne@69 34298 Py_DECREF(new_args);
jpayne@69 34299 #if PY_MAJOR_VERSION > 2
jpayne@69 34300 PyErr_Format(PyExc_TypeError,
jpayne@69 34301 "unbound method %.200S() needs an argument",
jpayne@69 34302 cyfunc->func_qualname);
jpayne@69 34303 #else
jpayne@69 34304 PyErr_SetString(PyExc_TypeError,
jpayne@69 34305 "unbound method needs an argument");
jpayne@69 34306 #endif
jpayne@69 34307 return NULL;
jpayne@69 34308 }
jpayne@69 34309 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
jpayne@69 34310 Py_DECREF(new_args);
jpayne@69 34311 } else {
jpayne@69 34312 result = __Pyx_CyFunction_Call(func, args, kw);
jpayne@69 34313 }
jpayne@69 34314 return result;
jpayne@69 34315 }
jpayne@69 34316 #if CYTHON_METH_FASTCALL
jpayne@69 34317 static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
jpayne@69 34318 {
jpayne@69 34319 int ret = 0;
jpayne@69 34320 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
jpayne@69 34321 if (unlikely(nargs < 1)) {
jpayne@69 34322 PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
jpayne@69 34323 ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
jpayne@69 34324 return -1;
jpayne@69 34325 }
jpayne@69 34326 ret = 1;
jpayne@69 34327 }
jpayne@69 34328 if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
jpayne@69 34329 PyErr_Format(PyExc_TypeError,
jpayne@69 34330 "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
jpayne@69 34331 return -1;
jpayne@69 34332 }
jpayne@69 34333 return ret;
jpayne@69 34334 }
jpayne@69 34335 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@69 34336 {
jpayne@69 34337 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@69 34338 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@69 34339 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 34340 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@69 34341 #else
jpayne@69 34342 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@69 34343 #endif
jpayne@69 34344 PyObject *self;
jpayne@69 34345 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
jpayne@69 34346 case 1:
jpayne@69 34347 self = args[0];
jpayne@69 34348 args += 1;
jpayne@69 34349 nargs -= 1;
jpayne@69 34350 break;
jpayne@69 34351 case 0:
jpayne@69 34352 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@69 34353 break;
jpayne@69 34354 default:
jpayne@69 34355 return NULL;
jpayne@69 34356 }
jpayne@69 34357 if (unlikely(nargs != 0)) {
jpayne@69 34358 PyErr_Format(PyExc_TypeError,
jpayne@69 34359 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 34360 def->ml_name, nargs);
jpayne@69 34361 return NULL;
jpayne@69 34362 }
jpayne@69 34363 return def->ml_meth(self, NULL);
jpayne@69 34364 }
jpayne@69 34365 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@69 34366 {
jpayne@69 34367 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@69 34368 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@69 34369 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 34370 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@69 34371 #else
jpayne@69 34372 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@69 34373 #endif
jpayne@69 34374 PyObject *self;
jpayne@69 34375 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
jpayne@69 34376 case 1:
jpayne@69 34377 self = args[0];
jpayne@69 34378 args += 1;
jpayne@69 34379 nargs -= 1;
jpayne@69 34380 break;
jpayne@69 34381 case 0:
jpayne@69 34382 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@69 34383 break;
jpayne@69 34384 default:
jpayne@69 34385 return NULL;
jpayne@69 34386 }
jpayne@69 34387 if (unlikely(nargs != 1)) {
jpayne@69 34388 PyErr_Format(PyExc_TypeError,
jpayne@69 34389 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 34390 def->ml_name, nargs);
jpayne@69 34391 return NULL;
jpayne@69 34392 }
jpayne@69 34393 return def->ml_meth(self, args[0]);
jpayne@69 34394 }
jpayne@69 34395 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@69 34396 {
jpayne@69 34397 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@69 34398 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@69 34399 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 34400 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@69 34401 #else
jpayne@69 34402 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@69 34403 #endif
jpayne@69 34404 PyObject *self;
jpayne@69 34405 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
jpayne@69 34406 case 1:
jpayne@69 34407 self = args[0];
jpayne@69 34408 args += 1;
jpayne@69 34409 nargs -= 1;
jpayne@69 34410 break;
jpayne@69 34411 case 0:
jpayne@69 34412 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@69 34413 break;
jpayne@69 34414 default:
jpayne@69 34415 return NULL;
jpayne@69 34416 }
jpayne@69 34417 return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
jpayne@69 34418 }
jpayne@69 34419 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@69 34420 {
jpayne@69 34421 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@69 34422 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@69 34423 PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
jpayne@69 34424 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 34425 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@69 34426 #else
jpayne@69 34427 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@69 34428 #endif
jpayne@69 34429 PyObject *self;
jpayne@69 34430 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
jpayne@69 34431 case 1:
jpayne@69 34432 self = args[0];
jpayne@69 34433 args += 1;
jpayne@69 34434 nargs -= 1;
jpayne@69 34435 break;
jpayne@69 34436 case 0:
jpayne@69 34437 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@69 34438 break;
jpayne@69 34439 default:
jpayne@69 34440 return NULL;
jpayne@69 34441 }
jpayne@69 34442 return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
jpayne@69 34443 }
jpayne@69 34444 #endif
jpayne@69 34445 #if CYTHON_USE_TYPE_SPECS
jpayne@69 34446 static PyType_Slot __pyx_CyFunctionType_slots[] = {
jpayne@69 34447 {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
jpayne@69 34448 {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
jpayne@69 34449 {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
jpayne@69 34450 {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
jpayne@69 34451 {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
jpayne@69 34452 {Py_tp_methods, (void *)__pyx_CyFunction_methods},
jpayne@69 34453 {Py_tp_members, (void *)__pyx_CyFunction_members},
jpayne@69 34454 {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
jpayne@69 34455 {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
jpayne@69 34456 {0, 0},
jpayne@69 34457 };
jpayne@69 34458 static PyType_Spec __pyx_CyFunctionType_spec = {
jpayne@69 34459 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
jpayne@69 34460 sizeof(__pyx_CyFunctionObject),
jpayne@69 34461 0,
jpayne@69 34462 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
jpayne@69 34463 Py_TPFLAGS_METHOD_DESCRIPTOR |
jpayne@69 34464 #endif
jpayne@69 34465 #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
jpayne@69 34466 _Py_TPFLAGS_HAVE_VECTORCALL |
jpayne@69 34467 #endif
jpayne@69 34468 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
jpayne@69 34469 __pyx_CyFunctionType_slots
jpayne@69 34470 };
jpayne@69 34471 #else
jpayne@69 34472 static PyTypeObject __pyx_CyFunctionType_type = {
jpayne@69 34473 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 34474 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
jpayne@69 34475 sizeof(__pyx_CyFunctionObject),
jpayne@69 34476 0,
jpayne@69 34477 (destructor) __Pyx_CyFunction_dealloc,
jpayne@69 34478 #if !CYTHON_METH_FASTCALL
jpayne@69 34479 0,
jpayne@69 34480 #elif CYTHON_BACKPORT_VECTORCALL
jpayne@69 34481 (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
jpayne@69 34482 #else
jpayne@69 34483 offsetof(PyCFunctionObject, vectorcall),
jpayne@69 34484 #endif
jpayne@69 34485 0,
jpayne@69 34486 0,
jpayne@69 34487 #if PY_MAJOR_VERSION < 3
jpayne@69 34488 0,
jpayne@69 34489 #else
jpayne@69 34490 0,
jpayne@69 34491 #endif
jpayne@69 34492 (reprfunc) __Pyx_CyFunction_repr,
jpayne@69 34493 0,
jpayne@69 34494 0,
jpayne@69 34495 0,
jpayne@69 34496 0,
jpayne@69 34497 __Pyx_CyFunction_CallAsMethod,
jpayne@69 34498 0,
jpayne@69 34499 0,
jpayne@69 34500 0,
jpayne@69 34501 0,
jpayne@69 34502 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
jpayne@69 34503 Py_TPFLAGS_METHOD_DESCRIPTOR |
jpayne@69 34504 #endif
jpayne@69 34505 #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
jpayne@69 34506 _Py_TPFLAGS_HAVE_VECTORCALL |
jpayne@69 34507 #endif
jpayne@69 34508 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
jpayne@69 34509 0,
jpayne@69 34510 (traverseproc) __Pyx_CyFunction_traverse,
jpayne@69 34511 (inquiry) __Pyx_CyFunction_clear,
jpayne@69 34512 0,
jpayne@69 34513 #if PY_VERSION_HEX < 0x030500A0
jpayne@69 34514 offsetof(__pyx_CyFunctionObject, func_weakreflist),
jpayne@69 34515 #else
jpayne@69 34516 offsetof(PyCFunctionObject, m_weakreflist),
jpayne@69 34517 #endif
jpayne@69 34518 0,
jpayne@69 34519 0,
jpayne@69 34520 __pyx_CyFunction_methods,
jpayne@69 34521 __pyx_CyFunction_members,
jpayne@69 34522 __pyx_CyFunction_getsets,
jpayne@69 34523 0,
jpayne@69 34524 0,
jpayne@69 34525 __Pyx_PyMethod_New,
jpayne@69 34526 0,
jpayne@69 34527 offsetof(__pyx_CyFunctionObject, func_dict),
jpayne@69 34528 0,
jpayne@69 34529 0,
jpayne@69 34530 0,
jpayne@69 34531 0,
jpayne@69 34532 0,
jpayne@69 34533 0,
jpayne@69 34534 0,
jpayne@69 34535 0,
jpayne@69 34536 0,
jpayne@69 34537 0,
jpayne@69 34538 0,
jpayne@69 34539 0,
jpayne@69 34540 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 34541 0,
jpayne@69 34542 #endif
jpayne@69 34543 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 34544 0,
jpayne@69 34545 #endif
jpayne@69 34546 #if __PYX_NEED_TP_PRINT_SLOT
jpayne@69 34547 0,
jpayne@69 34548 #endif
jpayne@69 34549 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 34550 0,
jpayne@69 34551 #endif
jpayne@69 34552 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 34553 0,
jpayne@69 34554 #endif
jpayne@69 34555 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 34556 0,
jpayne@69 34557 #endif
jpayne@69 34558 };
jpayne@69 34559 #endif
jpayne@69 34560 static int __pyx_CyFunction_init(PyObject *module) {
jpayne@69 34561 #if CYTHON_USE_TYPE_SPECS
jpayne@69 34562 __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
jpayne@69 34563 #else
jpayne@69 34564 CYTHON_UNUSED_VAR(module);
jpayne@69 34565 __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
jpayne@69 34566 #endif
jpayne@69 34567 if (unlikely(__pyx_CyFunctionType == NULL)) {
jpayne@69 34568 return -1;
jpayne@69 34569 }
jpayne@69 34570 return 0;
jpayne@69 34571 }
jpayne@69 34572 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
jpayne@69 34573 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@69 34574 m->defaults = PyObject_Malloc(size);
jpayne@69 34575 if (unlikely(!m->defaults))
jpayne@69 34576 return PyErr_NoMemory();
jpayne@69 34577 memset(m->defaults, 0, size);
jpayne@69 34578 m->defaults_pyobjects = pyobjects;
jpayne@69 34579 m->defaults_size = size;
jpayne@69 34580 return m->defaults;
jpayne@69 34581 }
jpayne@69 34582 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
jpayne@69 34583 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@69 34584 m->defaults_tuple = tuple;
jpayne@69 34585 Py_INCREF(tuple);
jpayne@69 34586 }
jpayne@69 34587 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
jpayne@69 34588 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@69 34589 m->defaults_kwdict = dict;
jpayne@69 34590 Py_INCREF(dict);
jpayne@69 34591 }
jpayne@69 34592 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
jpayne@69 34593 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@69 34594 m->func_annotations = dict;
jpayne@69 34595 Py_INCREF(dict);
jpayne@69 34596 }
jpayne@69 34597
jpayne@69 34598 /* CythonFunction */
jpayne@69 34599 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
jpayne@69 34600 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
jpayne@69 34601 PyObject *op = __Pyx_CyFunction_Init(
jpayne@69 34602 PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
jpayne@69 34603 ml, flags, qualname, closure, module, globals, code
jpayne@69 34604 );
jpayne@69 34605 if (likely(op)) {
jpayne@69 34606 PyObject_GC_Track(op);
jpayne@69 34607 }
jpayne@69 34608 return op;
jpayne@69 34609 }
jpayne@69 34610
jpayne@69 34611 /* CalculateMetaclass */
jpayne@69 34612 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
jpayne@69 34613 Py_ssize_t i, nbases;
jpayne@69 34614 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 34615 nbases = PyTuple_GET_SIZE(bases);
jpayne@69 34616 #else
jpayne@69 34617 nbases = PyTuple_Size(bases);
jpayne@69 34618 if (nbases < 0) return NULL;
jpayne@69 34619 #endif
jpayne@69 34620 for (i=0; i < nbases; i++) {
jpayne@69 34621 PyTypeObject *tmptype;
jpayne@69 34622 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 34623 PyObject *tmp = PyTuple_GET_ITEM(bases, i);
jpayne@69 34624 #else
jpayne@69 34625 PyObject *tmp = PyTuple_GetItem(bases, i);
jpayne@69 34626 if (!tmp) return NULL;
jpayne@69 34627 #endif
jpayne@69 34628 tmptype = Py_TYPE(tmp);
jpayne@69 34629 #if PY_MAJOR_VERSION < 3
jpayne@69 34630 if (tmptype == &PyClass_Type)
jpayne@69 34631 continue;
jpayne@69 34632 #endif
jpayne@69 34633 if (!metaclass) {
jpayne@69 34634 metaclass = tmptype;
jpayne@69 34635 continue;
jpayne@69 34636 }
jpayne@69 34637 if (PyType_IsSubtype(metaclass, tmptype))
jpayne@69 34638 continue;
jpayne@69 34639 if (PyType_IsSubtype(tmptype, metaclass)) {
jpayne@69 34640 metaclass = tmptype;
jpayne@69 34641 continue;
jpayne@69 34642 }
jpayne@69 34643 PyErr_SetString(PyExc_TypeError,
jpayne@69 34644 "metaclass conflict: "
jpayne@69 34645 "the metaclass of a derived class "
jpayne@69 34646 "must be a (non-strict) subclass "
jpayne@69 34647 "of the metaclasses of all its bases");
jpayne@69 34648 return NULL;
jpayne@69 34649 }
jpayne@69 34650 if (!metaclass) {
jpayne@69 34651 #if PY_MAJOR_VERSION < 3
jpayne@69 34652 metaclass = &PyClass_Type;
jpayne@69 34653 #else
jpayne@69 34654 metaclass = &PyType_Type;
jpayne@69 34655 #endif
jpayne@69 34656 }
jpayne@69 34657 Py_INCREF((PyObject*) metaclass);
jpayne@69 34658 return (PyObject*) metaclass;
jpayne@69 34659 }
jpayne@69 34660
jpayne@69 34661 /* PyObjectCall2Args */
jpayne@69 34662 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
jpayne@69 34663 PyObject *args[3] = {NULL, arg1, arg2};
jpayne@69 34664 return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
jpayne@69 34665 }
jpayne@69 34666
jpayne@69 34667 /* PyObjectLookupSpecial */
jpayne@69 34668 #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
jpayne@69 34669 static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
jpayne@69 34670 PyObject *res;
jpayne@69 34671 PyTypeObject *tp = Py_TYPE(obj);
jpayne@69 34672 #if PY_MAJOR_VERSION < 3
jpayne@69 34673 if (unlikely(PyInstance_Check(obj)))
jpayne@69 34674 return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
jpayne@69 34675 #endif
jpayne@69 34676 res = _PyType_Lookup(tp, attr_name);
jpayne@69 34677 if (likely(res)) {
jpayne@69 34678 descrgetfunc f = Py_TYPE(res)->tp_descr_get;
jpayne@69 34679 if (!f) {
jpayne@69 34680 Py_INCREF(res);
jpayne@69 34681 } else {
jpayne@69 34682 res = f(res, obj, (PyObject *)tp);
jpayne@69 34683 }
jpayne@69 34684 } else if (with_error) {
jpayne@69 34685 PyErr_SetObject(PyExc_AttributeError, attr_name);
jpayne@69 34686 }
jpayne@69 34687 return res;
jpayne@69 34688 }
jpayne@69 34689 #endif
jpayne@69 34690
jpayne@69 34691 /* Py3ClassCreate */
jpayne@69 34692 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
jpayne@69 34693 PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
jpayne@69 34694 PyObject *ns;
jpayne@69 34695 if (metaclass) {
jpayne@69 34696 PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare);
jpayne@69 34697 if (prep) {
jpayne@69 34698 PyObject *pargs[3] = {NULL, name, bases};
jpayne@69 34699 ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
jpayne@69 34700 Py_DECREF(prep);
jpayne@69 34701 } else {
jpayne@69 34702 if (unlikely(PyErr_Occurred()))
jpayne@69 34703 return NULL;
jpayne@69 34704 ns = PyDict_New();
jpayne@69 34705 }
jpayne@69 34706 } else {
jpayne@69 34707 ns = PyDict_New();
jpayne@69 34708 }
jpayne@69 34709 if (unlikely(!ns))
jpayne@69 34710 return NULL;
jpayne@69 34711 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
jpayne@69 34712 #if PY_VERSION_HEX >= 0x03030000
jpayne@69 34713 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
jpayne@69 34714 #else
jpayne@69 34715 CYTHON_MAYBE_UNUSED_VAR(qualname);
jpayne@69 34716 #endif
jpayne@69 34717 if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
jpayne@69 34718 return ns;
jpayne@69 34719 bad:
jpayne@69 34720 Py_DECREF(ns);
jpayne@69 34721 return NULL;
jpayne@69 34722 }
jpayne@69 34723 #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 34724 static int __Pyx_SetNamesPEP487(PyObject *type_obj) {
jpayne@69 34725 PyTypeObject *type = (PyTypeObject*) type_obj;
jpayne@69 34726 PyObject *names_to_set, *key, *value, *set_name, *tmp;
jpayne@69 34727 Py_ssize_t i = 0;
jpayne@69 34728 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 34729 names_to_set = PyDict_Copy(type->tp_dict);
jpayne@69 34730 #else
jpayne@69 34731 {
jpayne@69 34732 PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict);
jpayne@69 34733 names_to_set = NULL;
jpayne@69 34734 if (likely(d)) {
jpayne@69 34735 PyObject *names_to_set = PyDict_New();
jpayne@69 34736 int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1;
jpayne@69 34737 Py_DECREF(d);
jpayne@69 34738 if (unlikely(ret < 0))
jpayne@69 34739 Py_CLEAR(names_to_set);
jpayne@69 34740 }
jpayne@69 34741 }
jpayne@69 34742 #endif
jpayne@69 34743 if (unlikely(names_to_set == NULL))
jpayne@69 34744 goto bad;
jpayne@69 34745 while (PyDict_Next(names_to_set, &i, &key, &value)) {
jpayne@69 34746 set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name);
jpayne@69 34747 if (unlikely(set_name != NULL)) {
jpayne@69 34748 tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key);
jpayne@69 34749 Py_DECREF(set_name);
jpayne@69 34750 if (unlikely(tmp == NULL)) {
jpayne@69 34751 __Pyx_TypeName value_type_name =
jpayne@69 34752 __Pyx_PyType_GetName(Py_TYPE(value));
jpayne@69 34753 __Pyx_TypeName type_name = __Pyx_PyType_GetName(type);
jpayne@69 34754 PyErr_Format(PyExc_RuntimeError,
jpayne@69 34755 #if PY_MAJOR_VERSION >= 3
jpayne@69 34756 "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'",
jpayne@69 34757 value_type_name, key, type_name);
jpayne@69 34758 #else
jpayne@69 34759 "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'",
jpayne@69 34760 value_type_name,
jpayne@69 34761 PyString_Check(key) ? PyString_AS_STRING(key) : "?",
jpayne@69 34762 type_name);
jpayne@69 34763 #endif
jpayne@69 34764 goto bad;
jpayne@69 34765 } else {
jpayne@69 34766 Py_DECREF(tmp);
jpayne@69 34767 }
jpayne@69 34768 }
jpayne@69 34769 else if (unlikely(PyErr_Occurred())) {
jpayne@69 34770 goto bad;
jpayne@69 34771 }
jpayne@69 34772 }
jpayne@69 34773 Py_DECREF(names_to_set);
jpayne@69 34774 return 0;
jpayne@69 34775 bad:
jpayne@69 34776 Py_XDECREF(names_to_set);
jpayne@69 34777 return -1;
jpayne@69 34778 }
jpayne@69 34779 static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) {
jpayne@69 34780 #if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 34781 PyTypeObject *type = (PyTypeObject*) type_obj;
jpayne@69 34782 PyObject *mro = type->tp_mro;
jpayne@69 34783 Py_ssize_t i, nbases;
jpayne@69 34784 if (unlikely(!mro)) goto done;
jpayne@69 34785 (void) &__Pyx_GetBuiltinName;
jpayne@69 34786 Py_INCREF(mro);
jpayne@69 34787 nbases = PyTuple_GET_SIZE(mro);
jpayne@69 34788 assert(PyTuple_GET_ITEM(mro, 0) == type_obj);
jpayne@69 34789 for (i = 1; i < nbases-1; i++) {
jpayne@69 34790 PyObject *base, *dict, *meth;
jpayne@69 34791 base = PyTuple_GET_ITEM(mro, i);
jpayne@69 34792 dict = ((PyTypeObject *)base)->tp_dict;
jpayne@69 34793 meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass);
jpayne@69 34794 if (unlikely(meth)) {
jpayne@69 34795 descrgetfunc f = Py_TYPE(meth)->tp_descr_get;
jpayne@69 34796 PyObject *res;
jpayne@69 34797 Py_INCREF(meth);
jpayne@69 34798 if (likely(f)) {
jpayne@69 34799 res = f(meth, NULL, type_obj);
jpayne@69 34800 Py_DECREF(meth);
jpayne@69 34801 if (unlikely(!res)) goto bad;
jpayne@69 34802 meth = res;
jpayne@69 34803 }
jpayne@69 34804 res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw);
jpayne@69 34805 Py_DECREF(meth);
jpayne@69 34806 if (unlikely(!res)) goto bad;
jpayne@69 34807 Py_DECREF(res);
jpayne@69 34808 goto done;
jpayne@69 34809 } else if (unlikely(PyErr_Occurred())) {
jpayne@69 34810 goto bad;
jpayne@69 34811 }
jpayne@69 34812 }
jpayne@69 34813 done:
jpayne@69 34814 Py_XDECREF(mro);
jpayne@69 34815 return type_obj;
jpayne@69 34816 bad:
jpayne@69 34817 Py_XDECREF(mro);
jpayne@69 34818 Py_DECREF(type_obj);
jpayne@69 34819 return NULL;
jpayne@69 34820 #else
jpayne@69 34821 PyObject *super_type, *super, *func, *res;
jpayne@69 34822 #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
jpayne@69 34823 super_type = __Pyx_GetBuiltinName(__pyx_n_s_super);
jpayne@69 34824 #else
jpayne@69 34825 super_type = (PyObject*) &PySuper_Type;
jpayne@69 34826 (void) &__Pyx_GetBuiltinName;
jpayne@69 34827 #endif
jpayne@69 34828 super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL;
jpayne@69 34829 #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
jpayne@69 34830 Py_XDECREF(super_type);
jpayne@69 34831 #endif
jpayne@69 34832 if (unlikely(!super)) {
jpayne@69 34833 Py_CLEAR(type_obj);
jpayne@69 34834 goto done;
jpayne@69 34835 }
jpayne@69 34836 func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass);
jpayne@69 34837 Py_DECREF(super);
jpayne@69 34838 if (likely(!func)) {
jpayne@69 34839 if (unlikely(PyErr_Occurred()))
jpayne@69 34840 Py_CLEAR(type_obj);
jpayne@69 34841 goto done;
jpayne@69 34842 }
jpayne@69 34843 res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw);
jpayne@69 34844 Py_DECREF(func);
jpayne@69 34845 if (unlikely(!res))
jpayne@69 34846 Py_CLEAR(type_obj);
jpayne@69 34847 Py_XDECREF(res);
jpayne@69 34848 done:
jpayne@69 34849 return type_obj;
jpayne@69 34850 #endif
jpayne@69 34851 }
jpayne@69 34852 #endif
jpayne@69 34853 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
jpayne@69 34854 PyObject *dict, PyObject *mkw,
jpayne@69 34855 int calculate_metaclass, int allow_py2_metaclass) {
jpayne@69 34856 PyObject *result;
jpayne@69 34857 PyObject *owned_metaclass = NULL;
jpayne@69 34858 PyObject *margs[4] = {NULL, name, bases, dict};
jpayne@69 34859 if (allow_py2_metaclass) {
jpayne@69 34860 owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
jpayne@69 34861 if (owned_metaclass) {
jpayne@69 34862 metaclass = owned_metaclass;
jpayne@69 34863 } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
jpayne@69 34864 PyErr_Clear();
jpayne@69 34865 } else {
jpayne@69 34866 return NULL;
jpayne@69 34867 }
jpayne@69 34868 }
jpayne@69 34869 if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
jpayne@69 34870 metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
jpayne@69 34871 Py_XDECREF(owned_metaclass);
jpayne@69 34872 if (unlikely(!metaclass))
jpayne@69 34873 return NULL;
jpayne@69 34874 owned_metaclass = metaclass;
jpayne@69 34875 }
jpayne@69 34876 result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET,
jpayne@69 34877 #if PY_VERSION_HEX < 0x030600A4
jpayne@69 34878 (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
jpayne@69 34879 #else
jpayne@69 34880 mkw
jpayne@69 34881 #endif
jpayne@69 34882 );
jpayne@69 34883 Py_XDECREF(owned_metaclass);
jpayne@69 34884 #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 34885 if (likely(result) && likely(PyType_Check(result))) {
jpayne@69 34886 if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) {
jpayne@69 34887 Py_CLEAR(result);
jpayne@69 34888 } else {
jpayne@69 34889 result = __Pyx_InitSubclassPEP487(result, mkw);
jpayne@69 34890 }
jpayne@69 34891 }
jpayne@69 34892 #else
jpayne@69 34893 (void) &__Pyx_GetBuiltinName;
jpayne@69 34894 #endif
jpayne@69 34895 return result;
jpayne@69 34896 }
jpayne@69 34897
jpayne@69 34898 /* CLineInTraceback */
jpayne@69 34899 #ifndef CYTHON_CLINE_IN_TRACEBACK
jpayne@69 34900 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
jpayne@69 34901 PyObject *use_cline;
jpayne@69 34902 PyObject *ptype, *pvalue, *ptraceback;
jpayne@69 34903 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 34904 PyObject **cython_runtime_dict;
jpayne@69 34905 #endif
jpayne@69 34906 CYTHON_MAYBE_UNUSED_VAR(tstate);
jpayne@69 34907 if (unlikely(!__pyx_cython_runtime)) {
jpayne@69 34908 return c_line;
jpayne@69 34909 }
jpayne@69 34910 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
jpayne@69 34911 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 34912 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
jpayne@69 34913 if (likely(cython_runtime_dict)) {
jpayne@69 34914 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
jpayne@69 34915 use_cline, *cython_runtime_dict,
jpayne@69 34916 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
jpayne@69 34917 } else
jpayne@69 34918 #endif
jpayne@69 34919 {
jpayne@69 34920 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
jpayne@69 34921 if (use_cline_obj) {
jpayne@69 34922 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
jpayne@69 34923 Py_DECREF(use_cline_obj);
jpayne@69 34924 } else {
jpayne@69 34925 PyErr_Clear();
jpayne@69 34926 use_cline = NULL;
jpayne@69 34927 }
jpayne@69 34928 }
jpayne@69 34929 if (!use_cline) {
jpayne@69 34930 c_line = 0;
jpayne@69 34931 (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
jpayne@69 34932 }
jpayne@69 34933 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
jpayne@69 34934 c_line = 0;
jpayne@69 34935 }
jpayne@69 34936 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
jpayne@69 34937 return c_line;
jpayne@69 34938 }
jpayne@69 34939 #endif
jpayne@69 34940
jpayne@69 34941 /* CodeObjectCache */
jpayne@69 34942 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 34943 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
jpayne@69 34944 int start = 0, mid = 0, end = count - 1;
jpayne@69 34945 if (end >= 0 && code_line > entries[end].code_line) {
jpayne@69 34946 return count;
jpayne@69 34947 }
jpayne@69 34948 while (start < end) {
jpayne@69 34949 mid = start + (end - start) / 2;
jpayne@69 34950 if (code_line < entries[mid].code_line) {
jpayne@69 34951 end = mid;
jpayne@69 34952 } else if (code_line > entries[mid].code_line) {
jpayne@69 34953 start = mid + 1;
jpayne@69 34954 } else {
jpayne@69 34955 return mid;
jpayne@69 34956 }
jpayne@69 34957 }
jpayne@69 34958 if (code_line <= entries[mid].code_line) {
jpayne@69 34959 return mid;
jpayne@69 34960 } else {
jpayne@69 34961 return mid + 1;
jpayne@69 34962 }
jpayne@69 34963 }
jpayne@69 34964 static PyCodeObject *__pyx_find_code_object(int code_line) {
jpayne@69 34965 PyCodeObject* code_object;
jpayne@69 34966 int pos;
jpayne@69 34967 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
jpayne@69 34968 return NULL;
jpayne@69 34969 }
jpayne@69 34970 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
jpayne@69 34971 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
jpayne@69 34972 return NULL;
jpayne@69 34973 }
jpayne@69 34974 code_object = __pyx_code_cache.entries[pos].code_object;
jpayne@69 34975 Py_INCREF(code_object);
jpayne@69 34976 return code_object;
jpayne@69 34977 }
jpayne@69 34978 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
jpayne@69 34979 int pos, i;
jpayne@69 34980 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
jpayne@69 34981 if (unlikely(!code_line)) {
jpayne@69 34982 return;
jpayne@69 34983 }
jpayne@69 34984 if (unlikely(!entries)) {
jpayne@69 34985 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
jpayne@69 34986 if (likely(entries)) {
jpayne@69 34987 __pyx_code_cache.entries = entries;
jpayne@69 34988 __pyx_code_cache.max_count = 64;
jpayne@69 34989 __pyx_code_cache.count = 1;
jpayne@69 34990 entries[0].code_line = code_line;
jpayne@69 34991 entries[0].code_object = code_object;
jpayne@69 34992 Py_INCREF(code_object);
jpayne@69 34993 }
jpayne@69 34994 return;
jpayne@69 34995 }
jpayne@69 34996 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
jpayne@69 34997 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
jpayne@69 34998 PyCodeObject* tmp = entries[pos].code_object;
jpayne@69 34999 entries[pos].code_object = code_object;
jpayne@69 35000 Py_DECREF(tmp);
jpayne@69 35001 return;
jpayne@69 35002 }
jpayne@69 35003 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
jpayne@69 35004 int new_max = __pyx_code_cache.max_count + 64;
jpayne@69 35005 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
jpayne@69 35006 __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
jpayne@69 35007 if (unlikely(!entries)) {
jpayne@69 35008 return;
jpayne@69 35009 }
jpayne@69 35010 __pyx_code_cache.entries = entries;
jpayne@69 35011 __pyx_code_cache.max_count = new_max;
jpayne@69 35012 }
jpayne@69 35013 for (i=__pyx_code_cache.count; i>pos; i--) {
jpayne@69 35014 entries[i] = entries[i-1];
jpayne@69 35015 }
jpayne@69 35016 entries[pos].code_line = code_line;
jpayne@69 35017 entries[pos].code_object = code_object;
jpayne@69 35018 __pyx_code_cache.count++;
jpayne@69 35019 Py_INCREF(code_object);
jpayne@69 35020 }
jpayne@69 35021 #endif
jpayne@69 35022
jpayne@69 35023 /* AddTraceback */
jpayne@69 35024 #include "compile.h"
jpayne@69 35025 #include "frameobject.h"
jpayne@69 35026 #include "traceback.h"
jpayne@69 35027 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 35028 #ifndef Py_BUILD_CORE
jpayne@69 35029 #define Py_BUILD_CORE 1
jpayne@69 35030 #endif
jpayne@69 35031 #include "internal/pycore_frame.h"
jpayne@69 35032 #endif
jpayne@69 35033 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 35034 static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
jpayne@69 35035 PyObject *firstlineno, PyObject *name) {
jpayne@69 35036 PyObject *replace = NULL;
jpayne@69 35037 if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
jpayne@69 35038 if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
jpayne@69 35039 replace = PyObject_GetAttrString(code, "replace");
jpayne@69 35040 if (likely(replace)) {
jpayne@69 35041 PyObject *result;
jpayne@69 35042 result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
jpayne@69 35043 Py_DECREF(replace);
jpayne@69 35044 return result;
jpayne@69 35045 }
jpayne@69 35046 PyErr_Clear();
jpayne@69 35047 #if __PYX_LIMITED_VERSION_HEX < 0x030780000
jpayne@69 35048 {
jpayne@69 35049 PyObject *compiled = NULL, *result = NULL;
jpayne@69 35050 if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
jpayne@69 35051 if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
jpayne@69 35052 compiled = Py_CompileString(
jpayne@69 35053 "out = type(code)(\n"
jpayne@69 35054 " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
jpayne@69 35055 " code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
jpayne@69 35056 " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
jpayne@69 35057 " code.co_lnotab)\n", "<dummy>", Py_file_input);
jpayne@69 35058 if (!compiled) return NULL;
jpayne@69 35059 result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
jpayne@69 35060 Py_DECREF(compiled);
jpayne@69 35061 if (!result) PyErr_Print();
jpayne@69 35062 Py_DECREF(result);
jpayne@69 35063 result = PyDict_GetItemString(scratch_dict, "out");
jpayne@69 35064 if (result) Py_INCREF(result);
jpayne@69 35065 return result;
jpayne@69 35066 }
jpayne@69 35067 #else
jpayne@69 35068 return NULL;
jpayne@69 35069 #endif
jpayne@69 35070 }
jpayne@69 35071 static void __Pyx_AddTraceback(const char *funcname, int c_line,
jpayne@69 35072 int py_line, const char *filename) {
jpayne@69 35073 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
jpayne@69 35074 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
jpayne@69 35075 PyObject *exc_type, *exc_value, *exc_traceback;
jpayne@69 35076 int success = 0;
jpayne@69 35077 if (c_line) {
jpayne@69 35078 (void) __pyx_cfilenm;
jpayne@69 35079 (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
jpayne@69 35080 }
jpayne@69 35081 PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
jpayne@69 35082 code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
jpayne@69 35083 if (unlikely(!code_object)) goto bad;
jpayne@69 35084 py_py_line = PyLong_FromLong(py_line);
jpayne@69 35085 if (unlikely(!py_py_line)) goto bad;
jpayne@69 35086 py_funcname = PyUnicode_FromString(funcname);
jpayne@69 35087 if (unlikely(!py_funcname)) goto bad;
jpayne@69 35088 dict = PyDict_New();
jpayne@69 35089 if (unlikely(!dict)) goto bad;
jpayne@69 35090 {
jpayne@69 35091 PyObject *old_code_object = code_object;
jpayne@69 35092 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
jpayne@69 35093 Py_DECREF(old_code_object);
jpayne@69 35094 }
jpayne@69 35095 if (unlikely(!code_object)) goto bad;
jpayne@69 35096 getframe = PySys_GetObject("_getframe");
jpayne@69 35097 if (unlikely(!getframe)) goto bad;
jpayne@69 35098 if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
jpayne@69 35099 frame = PyEval_EvalCode(code_object, dict, dict);
jpayne@69 35100 if (unlikely(!frame) || frame == Py_None) goto bad;
jpayne@69 35101 success = 1;
jpayne@69 35102 bad:
jpayne@69 35103 PyErr_Restore(exc_type, exc_value, exc_traceback);
jpayne@69 35104 Py_XDECREF(code_object);
jpayne@69 35105 Py_XDECREF(py_py_line);
jpayne@69 35106 Py_XDECREF(py_funcname);
jpayne@69 35107 Py_XDECREF(dict);
jpayne@69 35108 Py_XDECREF(replace);
jpayne@69 35109 if (success) {
jpayne@69 35110 PyTraceBack_Here(
jpayne@69 35111 (struct _frame*)frame);
jpayne@69 35112 }
jpayne@69 35113 Py_XDECREF(frame);
jpayne@69 35114 }
jpayne@69 35115 #else
jpayne@69 35116 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
jpayne@69 35117 const char *funcname, int c_line,
jpayne@69 35118 int py_line, const char *filename) {
jpayne@69 35119 PyCodeObject *py_code = NULL;
jpayne@69 35120 PyObject *py_funcname = NULL;
jpayne@69 35121 #if PY_MAJOR_VERSION < 3
jpayne@69 35122 PyObject *py_srcfile = NULL;
jpayne@69 35123 py_srcfile = PyString_FromString(filename);
jpayne@69 35124 if (!py_srcfile) goto bad;
jpayne@69 35125 #endif
jpayne@69 35126 if (c_line) {
jpayne@69 35127 #if PY_MAJOR_VERSION < 3
jpayne@69 35128 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
jpayne@69 35129 if (!py_funcname) goto bad;
jpayne@69 35130 #else
jpayne@69 35131 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
jpayne@69 35132 if (!py_funcname) goto bad;
jpayne@69 35133 funcname = PyUnicode_AsUTF8(py_funcname);
jpayne@69 35134 if (!funcname) goto bad;
jpayne@69 35135 #endif
jpayne@69 35136 }
jpayne@69 35137 else {
jpayne@69 35138 #if PY_MAJOR_VERSION < 3
jpayne@69 35139 py_funcname = PyString_FromString(funcname);
jpayne@69 35140 if (!py_funcname) goto bad;
jpayne@69 35141 #endif
jpayne@69 35142 }
jpayne@69 35143 #if PY_MAJOR_VERSION < 3
jpayne@69 35144 py_code = __Pyx_PyCode_New(
jpayne@69 35145 0,
jpayne@69 35146 0,
jpayne@69 35147 0,
jpayne@69 35148 0,
jpayne@69 35149 0,
jpayne@69 35150 0,
jpayne@69 35151 __pyx_empty_bytes, /*PyObject *code,*/
jpayne@69 35152 __pyx_empty_tuple, /*PyObject *consts,*/
jpayne@69 35153 __pyx_empty_tuple, /*PyObject *names,*/
jpayne@69 35154 __pyx_empty_tuple, /*PyObject *varnames,*/
jpayne@69 35155 __pyx_empty_tuple, /*PyObject *freevars,*/
jpayne@69 35156 __pyx_empty_tuple, /*PyObject *cellvars,*/
jpayne@69 35157 py_srcfile, /*PyObject *filename,*/
jpayne@69 35158 py_funcname, /*PyObject *name,*/
jpayne@69 35159 py_line,
jpayne@69 35160 __pyx_empty_bytes /*PyObject *lnotab*/
jpayne@69 35161 );
jpayne@69 35162 Py_DECREF(py_srcfile);
jpayne@69 35163 #else
jpayne@69 35164 py_code = PyCode_NewEmpty(filename, funcname, py_line);
jpayne@69 35165 #endif
jpayne@69 35166 Py_XDECREF(py_funcname);
jpayne@69 35167 return py_code;
jpayne@69 35168 bad:
jpayne@69 35169 Py_XDECREF(py_funcname);
jpayne@69 35170 #if PY_MAJOR_VERSION < 3
jpayne@69 35171 Py_XDECREF(py_srcfile);
jpayne@69 35172 #endif
jpayne@69 35173 return NULL;
jpayne@69 35174 }
jpayne@69 35175 static void __Pyx_AddTraceback(const char *funcname, int c_line,
jpayne@69 35176 int py_line, const char *filename) {
jpayne@69 35177 PyCodeObject *py_code = 0;
jpayne@69 35178 PyFrameObject *py_frame = 0;
jpayne@69 35179 PyThreadState *tstate = __Pyx_PyThreadState_Current;
jpayne@69 35180 PyObject *ptype, *pvalue, *ptraceback;
jpayne@69 35181 if (c_line) {
jpayne@69 35182 c_line = __Pyx_CLineForTraceback(tstate, c_line);
jpayne@69 35183 }
jpayne@69 35184 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
jpayne@69 35185 if (!py_code) {
jpayne@69 35186 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
jpayne@69 35187 py_code = __Pyx_CreateCodeObjectForTraceback(
jpayne@69 35188 funcname, c_line, py_line, filename);
jpayne@69 35189 if (!py_code) {
jpayne@69 35190 /* If the code object creation fails, then we should clear the
jpayne@69 35191 fetched exception references and propagate the new exception */
jpayne@69 35192 Py_XDECREF(ptype);
jpayne@69 35193 Py_XDECREF(pvalue);
jpayne@69 35194 Py_XDECREF(ptraceback);
jpayne@69 35195 goto bad;
jpayne@69 35196 }
jpayne@69 35197 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
jpayne@69 35198 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
jpayne@69 35199 }
jpayne@69 35200 py_frame = PyFrame_New(
jpayne@69 35201 tstate, /*PyThreadState *tstate,*/
jpayne@69 35202 py_code, /*PyCodeObject *code,*/
jpayne@69 35203 __pyx_d, /*PyObject *globals,*/
jpayne@69 35204 0 /*PyObject *locals*/
jpayne@69 35205 );
jpayne@69 35206 if (!py_frame) goto bad;
jpayne@69 35207 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
jpayne@69 35208 PyTraceBack_Here(py_frame);
jpayne@69 35209 bad:
jpayne@69 35210 Py_XDECREF(py_code);
jpayne@69 35211 Py_XDECREF(py_frame);
jpayne@69 35212 }
jpayne@69 35213 #endif
jpayne@69 35214
jpayne@69 35215 /* CIntFromPyVerify */
jpayne@69 35216 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
jpayne@69 35217 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
jpayne@69 35218 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
jpayne@69 35219 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
jpayne@69 35220 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
jpayne@69 35221 {\
jpayne@69 35222 func_type value = func_value;\
jpayne@69 35223 if (sizeof(target_type) < sizeof(func_type)) {\
jpayne@69 35224 if (unlikely(value != (func_type) (target_type) value)) {\
jpayne@69 35225 func_type zero = 0;\
jpayne@69 35226 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
jpayne@69 35227 return (target_type) -1;\
jpayne@69 35228 if (is_unsigned && unlikely(value < zero))\
jpayne@69 35229 goto raise_neg_overflow;\
jpayne@69 35230 else\
jpayne@69 35231 goto raise_overflow;\
jpayne@69 35232 }\
jpayne@69 35233 }\
jpayne@69 35234 return (target_type) value;\
jpayne@69 35235 }
jpayne@69 35236
jpayne@69 35237 /* CIntFromPy */
jpayne@69 35238 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
jpayne@69 35239 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 35240 #pragma GCC diagnostic push
jpayne@69 35241 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@69 35242 #endif
jpayne@69 35243 const int neg_one = (int) -1, const_zero = (int) 0;
jpayne@69 35244 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 35245 #pragma GCC diagnostic pop
jpayne@69 35246 #endif
jpayne@69 35247 const int is_unsigned = neg_one > const_zero;
jpayne@69 35248 #if PY_MAJOR_VERSION < 3
jpayne@69 35249 if (likely(PyInt_Check(x))) {
jpayne@69 35250 if ((sizeof(int) < sizeof(long))) {
jpayne@69 35251 __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
jpayne@69 35252 } else {
jpayne@69 35253 long val = PyInt_AS_LONG(x);
jpayne@69 35254 if (is_unsigned && unlikely(val < 0)) {
jpayne@69 35255 goto raise_neg_overflow;
jpayne@69 35256 }
jpayne@69 35257 return (int) val;
jpayne@69 35258 }
jpayne@69 35259 }
jpayne@69 35260 #endif
jpayne@69 35261 if (unlikely(!PyLong_Check(x))) {
jpayne@69 35262 int val;
jpayne@69 35263 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
jpayne@69 35264 if (!tmp) return (int) -1;
jpayne@69 35265 val = __Pyx_PyInt_As_int(tmp);
jpayne@69 35266 Py_DECREF(tmp);
jpayne@69 35267 return val;
jpayne@69 35268 }
jpayne@69 35269 if (is_unsigned) {
jpayne@69 35270 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 35271 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
jpayne@69 35272 goto raise_neg_overflow;
jpayne@69 35273 } else if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 35274 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
jpayne@69 35275 } else {
jpayne@69 35276 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 35277 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 35278 switch (__Pyx_PyLong_DigitCount(x)) {
jpayne@69 35279 case 2:
jpayne@69 35280 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
jpayne@69 35281 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 35282 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35283 } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
jpayne@69 35284 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
jpayne@69 35285 }
jpayne@69 35286 }
jpayne@69 35287 break;
jpayne@69 35288 case 3:
jpayne@69 35289 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
jpayne@69 35290 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 35291 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35292 } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
jpayne@69 35293 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
jpayne@69 35294 }
jpayne@69 35295 }
jpayne@69 35296 break;
jpayne@69 35297 case 4:
jpayne@69 35298 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
jpayne@69 35299 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 35300 __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])))
jpayne@69 35301 } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
jpayne@69 35302 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
jpayne@69 35303 }
jpayne@69 35304 }
jpayne@69 35305 break;
jpayne@69 35306 }
jpayne@69 35307 }
jpayne@69 35308 #endif
jpayne@69 35309 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
jpayne@69 35310 if (unlikely(Py_SIZE(x) < 0)) {
jpayne@69 35311 goto raise_neg_overflow;
jpayne@69 35312 }
jpayne@69 35313 #else
jpayne@69 35314 {
jpayne@69 35315 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
jpayne@69 35316 if (unlikely(result < 0))
jpayne@69 35317 return (int) -1;
jpayne@69 35318 if (unlikely(result == 1))
jpayne@69 35319 goto raise_neg_overflow;
jpayne@69 35320 }
jpayne@69 35321 #endif
jpayne@69 35322 if ((sizeof(int) <= sizeof(unsigned long))) {
jpayne@69 35323 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
jpayne@69 35324 #ifdef HAVE_LONG_LONG
jpayne@69 35325 } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
jpayne@69 35326 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
jpayne@69 35327 #endif
jpayne@69 35328 }
jpayne@69 35329 } else {
jpayne@69 35330 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 35331 if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 35332 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
jpayne@69 35333 } else {
jpayne@69 35334 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 35335 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 35336 switch (__Pyx_PyLong_SignedDigitCount(x)) {
jpayne@69 35337 case -2:
jpayne@69 35338 if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
jpayne@69 35339 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 35340 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35341 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 35342 return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 35343 }
jpayne@69 35344 }
jpayne@69 35345 break;
jpayne@69 35346 case 2:
jpayne@69 35347 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
jpayne@69 35348 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 35349 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35350 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 35351 return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 35352 }
jpayne@69 35353 }
jpayne@69 35354 break;
jpayne@69 35355 case -3:
jpayne@69 35356 if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 35357 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 35358 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35359 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 35360 return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 35361 }
jpayne@69 35362 }
jpayne@69 35363 break;
jpayne@69 35364 case 3:
jpayne@69 35365 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
jpayne@69 35366 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 35367 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35368 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 35369 return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 35370 }
jpayne@69 35371 }
jpayne@69 35372 break;
jpayne@69 35373 case -4:
jpayne@69 35374 if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 35375 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 35376 __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])))
jpayne@69 35377 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 35378 return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 35379 }
jpayne@69 35380 }
jpayne@69 35381 break;
jpayne@69 35382 case 4:
jpayne@69 35383 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
jpayne@69 35384 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 35385 __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])))
jpayne@69 35386 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 35387 return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 35388 }
jpayne@69 35389 }
jpayne@69 35390 break;
jpayne@69 35391 }
jpayne@69 35392 }
jpayne@69 35393 #endif
jpayne@69 35394 if ((sizeof(int) <= sizeof(long))) {
jpayne@69 35395 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
jpayne@69 35396 #ifdef HAVE_LONG_LONG
jpayne@69 35397 } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
jpayne@69 35398 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
jpayne@69 35399 #endif
jpayne@69 35400 }
jpayne@69 35401 }
jpayne@69 35402 {
jpayne@69 35403 int val;
jpayne@69 35404 int ret = -1;
jpayne@69 35405 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 35406 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
jpayne@69 35407 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
jpayne@69 35408 if (unlikely(bytes_copied == -1)) {
jpayne@69 35409 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
jpayne@69 35410 goto raise_overflow;
jpayne@69 35411 } else {
jpayne@69 35412 ret = 0;
jpayne@69 35413 }
jpayne@69 35414 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
jpayne@69 35415 int one = 1; int is_little = (int)*(unsigned char *)&one;
jpayne@69 35416 unsigned char *bytes = (unsigned char *)&val;
jpayne@69 35417 ret = _PyLong_AsByteArray((PyLongObject *)x,
jpayne@69 35418 bytes, sizeof(val),
jpayne@69 35419 is_little, !is_unsigned);
jpayne@69 35420 #else
jpayne@69 35421 PyObject *v;
jpayne@69 35422 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
jpayne@69 35423 int bits, remaining_bits, is_negative = 0;
jpayne@69 35424 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
jpayne@69 35425 if (likely(PyLong_CheckExact(x))) {
jpayne@69 35426 v = __Pyx_NewRef(x);
jpayne@69 35427 } else {
jpayne@69 35428 v = PyNumber_Long(x);
jpayne@69 35429 if (unlikely(!v)) return (int) -1;
jpayne@69 35430 assert(PyLong_CheckExact(v));
jpayne@69 35431 }
jpayne@69 35432 {
jpayne@69 35433 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
jpayne@69 35434 if (unlikely(result < 0)) {
jpayne@69 35435 Py_DECREF(v);
jpayne@69 35436 return (int) -1;
jpayne@69 35437 }
jpayne@69 35438 is_negative = result == 1;
jpayne@69 35439 }
jpayne@69 35440 if (is_unsigned && unlikely(is_negative)) {
jpayne@69 35441 Py_DECREF(v);
jpayne@69 35442 goto raise_neg_overflow;
jpayne@69 35443 } else if (is_negative) {
jpayne@69 35444 stepval = PyNumber_Invert(v);
jpayne@69 35445 Py_DECREF(v);
jpayne@69 35446 if (unlikely(!stepval))
jpayne@69 35447 return (int) -1;
jpayne@69 35448 } else {
jpayne@69 35449 stepval = v;
jpayne@69 35450 }
jpayne@69 35451 v = NULL;
jpayne@69 35452 val = (int) 0;
jpayne@69 35453 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
jpayne@69 35454 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
jpayne@69 35455 for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
jpayne@69 35456 PyObject *tmp, *digit;
jpayne@69 35457 long idigit;
jpayne@69 35458 digit = PyNumber_And(stepval, mask);
jpayne@69 35459 if (unlikely(!digit)) goto done;
jpayne@69 35460 idigit = PyLong_AsLong(digit);
jpayne@69 35461 Py_DECREF(digit);
jpayne@69 35462 if (unlikely(idigit < 0)) goto done;
jpayne@69 35463 val |= ((int) idigit) << bits;
jpayne@69 35464 tmp = PyNumber_Rshift(stepval, shift);
jpayne@69 35465 if (unlikely(!tmp)) goto done;
jpayne@69 35466 Py_DECREF(stepval); stepval = tmp;
jpayne@69 35467 }
jpayne@69 35468 Py_DECREF(shift); shift = NULL;
jpayne@69 35469 Py_DECREF(mask); mask = NULL;
jpayne@69 35470 {
jpayne@69 35471 long idigit = PyLong_AsLong(stepval);
jpayne@69 35472 if (unlikely(idigit < 0)) goto done;
jpayne@69 35473 remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
jpayne@69 35474 if (unlikely(idigit >= (1L << remaining_bits)))
jpayne@69 35475 goto raise_overflow;
jpayne@69 35476 val |= ((int) idigit) << bits;
jpayne@69 35477 }
jpayne@69 35478 if (!is_unsigned) {
jpayne@69 35479 if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
jpayne@69 35480 goto raise_overflow;
jpayne@69 35481 if (is_negative)
jpayne@69 35482 val = ~val;
jpayne@69 35483 }
jpayne@69 35484 ret = 0;
jpayne@69 35485 done:
jpayne@69 35486 Py_XDECREF(shift);
jpayne@69 35487 Py_XDECREF(mask);
jpayne@69 35488 Py_XDECREF(stepval);
jpayne@69 35489 #endif
jpayne@69 35490 if (unlikely(ret))
jpayne@69 35491 return (int) -1;
jpayne@69 35492 return val;
jpayne@69 35493 }
jpayne@69 35494 raise_overflow:
jpayne@69 35495 PyErr_SetString(PyExc_OverflowError,
jpayne@69 35496 "value too large to convert to int");
jpayne@69 35497 return (int) -1;
jpayne@69 35498 raise_neg_overflow:
jpayne@69 35499 PyErr_SetString(PyExc_OverflowError,
jpayne@69 35500 "can't convert negative value to int");
jpayne@69 35501 return (int) -1;
jpayne@69 35502 }
jpayne@69 35503
jpayne@69 35504 /* CIntToPy */
jpayne@69 35505 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
jpayne@69 35506 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 35507 #pragma GCC diagnostic push
jpayne@69 35508 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@69 35509 #endif
jpayne@69 35510 const int neg_one = (int) -1, const_zero = (int) 0;
jpayne@69 35511 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 35512 #pragma GCC diagnostic pop
jpayne@69 35513 #endif
jpayne@69 35514 const int is_unsigned = neg_one > const_zero;
jpayne@69 35515 if (is_unsigned) {
jpayne@69 35516 if (sizeof(int) < sizeof(long)) {
jpayne@69 35517 return PyInt_FromLong((long) value);
jpayne@69 35518 } else if (sizeof(int) <= sizeof(unsigned long)) {
jpayne@69 35519 return PyLong_FromUnsignedLong((unsigned long) value);
jpayne@69 35520 #ifdef HAVE_LONG_LONG
jpayne@69 35521 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
jpayne@69 35522 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
jpayne@69 35523 #endif
jpayne@69 35524 }
jpayne@69 35525 } else {
jpayne@69 35526 if (sizeof(int) <= sizeof(long)) {
jpayne@69 35527 return PyInt_FromLong((long) value);
jpayne@69 35528 #ifdef HAVE_LONG_LONG
jpayne@69 35529 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
jpayne@69 35530 return PyLong_FromLongLong((PY_LONG_LONG) value);
jpayne@69 35531 #endif
jpayne@69 35532 }
jpayne@69 35533 }
jpayne@69 35534 {
jpayne@69 35535 unsigned char *bytes = (unsigned char *)&value;
jpayne@69 35536 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
jpayne@69 35537 if (is_unsigned) {
jpayne@69 35538 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
jpayne@69 35539 } else {
jpayne@69 35540 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
jpayne@69 35541 }
jpayne@69 35542 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
jpayne@69 35543 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@69 35544 return _PyLong_FromByteArray(bytes, sizeof(int),
jpayne@69 35545 little, !is_unsigned);
jpayne@69 35546 #else
jpayne@69 35547 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@69 35548 PyObject *from_bytes, *result = NULL;
jpayne@69 35549 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
jpayne@69 35550 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
jpayne@69 35551 if (!from_bytes) return NULL;
jpayne@69 35552 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
jpayne@69 35553 if (!py_bytes) goto limited_bad;
jpayne@69 35554 order_str = PyUnicode_FromString(little ? "little" : "big");
jpayne@69 35555 if (!order_str) goto limited_bad;
jpayne@69 35556 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
jpayne@69 35557 if (!arg_tuple) goto limited_bad;
jpayne@69 35558 if (!is_unsigned) {
jpayne@69 35559 kwds = PyDict_New();
jpayne@69 35560 if (!kwds) goto limited_bad;
jpayne@69 35561 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
jpayne@69 35562 }
jpayne@69 35563 result = PyObject_Call(from_bytes, arg_tuple, kwds);
jpayne@69 35564 limited_bad:
jpayne@69 35565 Py_XDECREF(kwds);
jpayne@69 35566 Py_XDECREF(arg_tuple);
jpayne@69 35567 Py_XDECREF(order_str);
jpayne@69 35568 Py_XDECREF(py_bytes);
jpayne@69 35569 Py_XDECREF(from_bytes);
jpayne@69 35570 return result;
jpayne@69 35571 #endif
jpayne@69 35572 }
jpayne@69 35573 }
jpayne@69 35574
jpayne@69 35575 /* CIntFromPy */
jpayne@69 35576 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
jpayne@69 35577 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 35578 #pragma GCC diagnostic push
jpayne@69 35579 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@69 35580 #endif
jpayne@69 35581 const long neg_one = (long) -1, const_zero = (long) 0;
jpayne@69 35582 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 35583 #pragma GCC diagnostic pop
jpayne@69 35584 #endif
jpayne@69 35585 const int is_unsigned = neg_one > const_zero;
jpayne@69 35586 #if PY_MAJOR_VERSION < 3
jpayne@69 35587 if (likely(PyInt_Check(x))) {
jpayne@69 35588 if ((sizeof(long) < sizeof(long))) {
jpayne@69 35589 __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
jpayne@69 35590 } else {
jpayne@69 35591 long val = PyInt_AS_LONG(x);
jpayne@69 35592 if (is_unsigned && unlikely(val < 0)) {
jpayne@69 35593 goto raise_neg_overflow;
jpayne@69 35594 }
jpayne@69 35595 return (long) val;
jpayne@69 35596 }
jpayne@69 35597 }
jpayne@69 35598 #endif
jpayne@69 35599 if (unlikely(!PyLong_Check(x))) {
jpayne@69 35600 long val;
jpayne@69 35601 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
jpayne@69 35602 if (!tmp) return (long) -1;
jpayne@69 35603 val = __Pyx_PyInt_As_long(tmp);
jpayne@69 35604 Py_DECREF(tmp);
jpayne@69 35605 return val;
jpayne@69 35606 }
jpayne@69 35607 if (is_unsigned) {
jpayne@69 35608 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 35609 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
jpayne@69 35610 goto raise_neg_overflow;
jpayne@69 35611 } else if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 35612 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
jpayne@69 35613 } else {
jpayne@69 35614 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 35615 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 35616 switch (__Pyx_PyLong_DigitCount(x)) {
jpayne@69 35617 case 2:
jpayne@69 35618 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
jpayne@69 35619 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 35620 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35621 } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
jpayne@69 35622 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
jpayne@69 35623 }
jpayne@69 35624 }
jpayne@69 35625 break;
jpayne@69 35626 case 3:
jpayne@69 35627 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
jpayne@69 35628 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 35629 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35630 } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
jpayne@69 35631 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
jpayne@69 35632 }
jpayne@69 35633 }
jpayne@69 35634 break;
jpayne@69 35635 case 4:
jpayne@69 35636 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
jpayne@69 35637 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 35638 __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])))
jpayne@69 35639 } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
jpayne@69 35640 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
jpayne@69 35641 }
jpayne@69 35642 }
jpayne@69 35643 break;
jpayne@69 35644 }
jpayne@69 35645 }
jpayne@69 35646 #endif
jpayne@69 35647 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
jpayne@69 35648 if (unlikely(Py_SIZE(x) < 0)) {
jpayne@69 35649 goto raise_neg_overflow;
jpayne@69 35650 }
jpayne@69 35651 #else
jpayne@69 35652 {
jpayne@69 35653 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
jpayne@69 35654 if (unlikely(result < 0))
jpayne@69 35655 return (long) -1;
jpayne@69 35656 if (unlikely(result == 1))
jpayne@69 35657 goto raise_neg_overflow;
jpayne@69 35658 }
jpayne@69 35659 #endif
jpayne@69 35660 if ((sizeof(long) <= sizeof(unsigned long))) {
jpayne@69 35661 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
jpayne@69 35662 #ifdef HAVE_LONG_LONG
jpayne@69 35663 } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
jpayne@69 35664 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
jpayne@69 35665 #endif
jpayne@69 35666 }
jpayne@69 35667 } else {
jpayne@69 35668 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 35669 if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 35670 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
jpayne@69 35671 } else {
jpayne@69 35672 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 35673 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 35674 switch (__Pyx_PyLong_SignedDigitCount(x)) {
jpayne@69 35675 case -2:
jpayne@69 35676 if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
jpayne@69 35677 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 35678 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35679 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 35680 return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 35681 }
jpayne@69 35682 }
jpayne@69 35683 break;
jpayne@69 35684 case 2:
jpayne@69 35685 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
jpayne@69 35686 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 35687 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35688 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 35689 return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 35690 }
jpayne@69 35691 }
jpayne@69 35692 break;
jpayne@69 35693 case -3:
jpayne@69 35694 if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 35695 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 35696 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35697 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 35698 return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 35699 }
jpayne@69 35700 }
jpayne@69 35701 break;
jpayne@69 35702 case 3:
jpayne@69 35703 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
jpayne@69 35704 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 35705 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35706 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 35707 return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 35708 }
jpayne@69 35709 }
jpayne@69 35710 break;
jpayne@69 35711 case -4:
jpayne@69 35712 if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 35713 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 35714 __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])))
jpayne@69 35715 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 35716 return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 35717 }
jpayne@69 35718 }
jpayne@69 35719 break;
jpayne@69 35720 case 4:
jpayne@69 35721 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
jpayne@69 35722 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 35723 __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])))
jpayne@69 35724 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 35725 return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 35726 }
jpayne@69 35727 }
jpayne@69 35728 break;
jpayne@69 35729 }
jpayne@69 35730 }
jpayne@69 35731 #endif
jpayne@69 35732 if ((sizeof(long) <= sizeof(long))) {
jpayne@69 35733 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
jpayne@69 35734 #ifdef HAVE_LONG_LONG
jpayne@69 35735 } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
jpayne@69 35736 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
jpayne@69 35737 #endif
jpayne@69 35738 }
jpayne@69 35739 }
jpayne@69 35740 {
jpayne@69 35741 long val;
jpayne@69 35742 int ret = -1;
jpayne@69 35743 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 35744 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
jpayne@69 35745 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
jpayne@69 35746 if (unlikely(bytes_copied == -1)) {
jpayne@69 35747 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
jpayne@69 35748 goto raise_overflow;
jpayne@69 35749 } else {
jpayne@69 35750 ret = 0;
jpayne@69 35751 }
jpayne@69 35752 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
jpayne@69 35753 int one = 1; int is_little = (int)*(unsigned char *)&one;
jpayne@69 35754 unsigned char *bytes = (unsigned char *)&val;
jpayne@69 35755 ret = _PyLong_AsByteArray((PyLongObject *)x,
jpayne@69 35756 bytes, sizeof(val),
jpayne@69 35757 is_little, !is_unsigned);
jpayne@69 35758 #else
jpayne@69 35759 PyObject *v;
jpayne@69 35760 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
jpayne@69 35761 int bits, remaining_bits, is_negative = 0;
jpayne@69 35762 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
jpayne@69 35763 if (likely(PyLong_CheckExact(x))) {
jpayne@69 35764 v = __Pyx_NewRef(x);
jpayne@69 35765 } else {
jpayne@69 35766 v = PyNumber_Long(x);
jpayne@69 35767 if (unlikely(!v)) return (long) -1;
jpayne@69 35768 assert(PyLong_CheckExact(v));
jpayne@69 35769 }
jpayne@69 35770 {
jpayne@69 35771 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
jpayne@69 35772 if (unlikely(result < 0)) {
jpayne@69 35773 Py_DECREF(v);
jpayne@69 35774 return (long) -1;
jpayne@69 35775 }
jpayne@69 35776 is_negative = result == 1;
jpayne@69 35777 }
jpayne@69 35778 if (is_unsigned && unlikely(is_negative)) {
jpayne@69 35779 Py_DECREF(v);
jpayne@69 35780 goto raise_neg_overflow;
jpayne@69 35781 } else if (is_negative) {
jpayne@69 35782 stepval = PyNumber_Invert(v);
jpayne@69 35783 Py_DECREF(v);
jpayne@69 35784 if (unlikely(!stepval))
jpayne@69 35785 return (long) -1;
jpayne@69 35786 } else {
jpayne@69 35787 stepval = v;
jpayne@69 35788 }
jpayne@69 35789 v = NULL;
jpayne@69 35790 val = (long) 0;
jpayne@69 35791 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
jpayne@69 35792 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
jpayne@69 35793 for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
jpayne@69 35794 PyObject *tmp, *digit;
jpayne@69 35795 long idigit;
jpayne@69 35796 digit = PyNumber_And(stepval, mask);
jpayne@69 35797 if (unlikely(!digit)) goto done;
jpayne@69 35798 idigit = PyLong_AsLong(digit);
jpayne@69 35799 Py_DECREF(digit);
jpayne@69 35800 if (unlikely(idigit < 0)) goto done;
jpayne@69 35801 val |= ((long) idigit) << bits;
jpayne@69 35802 tmp = PyNumber_Rshift(stepval, shift);
jpayne@69 35803 if (unlikely(!tmp)) goto done;
jpayne@69 35804 Py_DECREF(stepval); stepval = tmp;
jpayne@69 35805 }
jpayne@69 35806 Py_DECREF(shift); shift = NULL;
jpayne@69 35807 Py_DECREF(mask); mask = NULL;
jpayne@69 35808 {
jpayne@69 35809 long idigit = PyLong_AsLong(stepval);
jpayne@69 35810 if (unlikely(idigit < 0)) goto done;
jpayne@69 35811 remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
jpayne@69 35812 if (unlikely(idigit >= (1L << remaining_bits)))
jpayne@69 35813 goto raise_overflow;
jpayne@69 35814 val |= ((long) idigit) << bits;
jpayne@69 35815 }
jpayne@69 35816 if (!is_unsigned) {
jpayne@69 35817 if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
jpayne@69 35818 goto raise_overflow;
jpayne@69 35819 if (is_negative)
jpayne@69 35820 val = ~val;
jpayne@69 35821 }
jpayne@69 35822 ret = 0;
jpayne@69 35823 done:
jpayne@69 35824 Py_XDECREF(shift);
jpayne@69 35825 Py_XDECREF(mask);
jpayne@69 35826 Py_XDECREF(stepval);
jpayne@69 35827 #endif
jpayne@69 35828 if (unlikely(ret))
jpayne@69 35829 return (long) -1;
jpayne@69 35830 return val;
jpayne@69 35831 }
jpayne@69 35832 raise_overflow:
jpayne@69 35833 PyErr_SetString(PyExc_OverflowError,
jpayne@69 35834 "value too large to convert to long");
jpayne@69 35835 return (long) -1;
jpayne@69 35836 raise_neg_overflow:
jpayne@69 35837 PyErr_SetString(PyExc_OverflowError,
jpayne@69 35838 "can't convert negative value to long");
jpayne@69 35839 return (long) -1;
jpayne@69 35840 }
jpayne@69 35841
jpayne@69 35842 /* CIntFromPy */
jpayne@69 35843 static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
jpayne@69 35844 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 35845 #pragma GCC diagnostic push
jpayne@69 35846 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@69 35847 #endif
jpayne@69 35848 const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
jpayne@69 35849 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 35850 #pragma GCC diagnostic pop
jpayne@69 35851 #endif
jpayne@69 35852 const int is_unsigned = neg_one > const_zero;
jpayne@69 35853 #if PY_MAJOR_VERSION < 3
jpayne@69 35854 if (likely(PyInt_Check(x))) {
jpayne@69 35855 if ((sizeof(int64_t) < sizeof(long))) {
jpayne@69 35856 __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
jpayne@69 35857 } else {
jpayne@69 35858 long val = PyInt_AS_LONG(x);
jpayne@69 35859 if (is_unsigned && unlikely(val < 0)) {
jpayne@69 35860 goto raise_neg_overflow;
jpayne@69 35861 }
jpayne@69 35862 return (int64_t) val;
jpayne@69 35863 }
jpayne@69 35864 }
jpayne@69 35865 #endif
jpayne@69 35866 if (unlikely(!PyLong_Check(x))) {
jpayne@69 35867 int64_t val;
jpayne@69 35868 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
jpayne@69 35869 if (!tmp) return (int64_t) -1;
jpayne@69 35870 val = __Pyx_PyInt_As_int64_t(tmp);
jpayne@69 35871 Py_DECREF(tmp);
jpayne@69 35872 return val;
jpayne@69 35873 }
jpayne@69 35874 if (is_unsigned) {
jpayne@69 35875 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 35876 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
jpayne@69 35877 goto raise_neg_overflow;
jpayne@69 35878 } else if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 35879 __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
jpayne@69 35880 } else {
jpayne@69 35881 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 35882 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 35883 switch (__Pyx_PyLong_DigitCount(x)) {
jpayne@69 35884 case 2:
jpayne@69 35885 if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) {
jpayne@69 35886 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 35887 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35888 } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) {
jpayne@69 35889 return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
jpayne@69 35890 }
jpayne@69 35891 }
jpayne@69 35892 break;
jpayne@69 35893 case 3:
jpayne@69 35894 if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) {
jpayne@69 35895 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 35896 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35897 } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) {
jpayne@69 35898 return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
jpayne@69 35899 }
jpayne@69 35900 }
jpayne@69 35901 break;
jpayne@69 35902 case 4:
jpayne@69 35903 if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) {
jpayne@69 35904 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 35905 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35906 } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) {
jpayne@69 35907 return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
jpayne@69 35908 }
jpayne@69 35909 }
jpayne@69 35910 break;
jpayne@69 35911 }
jpayne@69 35912 }
jpayne@69 35913 #endif
jpayne@69 35914 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
jpayne@69 35915 if (unlikely(Py_SIZE(x) < 0)) {
jpayne@69 35916 goto raise_neg_overflow;
jpayne@69 35917 }
jpayne@69 35918 #else
jpayne@69 35919 {
jpayne@69 35920 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
jpayne@69 35921 if (unlikely(result < 0))
jpayne@69 35922 return (int64_t) -1;
jpayne@69 35923 if (unlikely(result == 1))
jpayne@69 35924 goto raise_neg_overflow;
jpayne@69 35925 }
jpayne@69 35926 #endif
jpayne@69 35927 if ((sizeof(int64_t) <= sizeof(unsigned long))) {
jpayne@69 35928 __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
jpayne@69 35929 #ifdef HAVE_LONG_LONG
jpayne@69 35930 } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) {
jpayne@69 35931 __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
jpayne@69 35932 #endif
jpayne@69 35933 }
jpayne@69 35934 } else {
jpayne@69 35935 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 35936 if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 35937 __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
jpayne@69 35938 } else {
jpayne@69 35939 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 35940 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 35941 switch (__Pyx_PyLong_SignedDigitCount(x)) {
jpayne@69 35942 case -2:
jpayne@69 35943 if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) {
jpayne@69 35944 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 35945 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35946 } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 35947 return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
jpayne@69 35948 }
jpayne@69 35949 }
jpayne@69 35950 break;
jpayne@69 35951 case 2:
jpayne@69 35952 if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) {
jpayne@69 35953 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 35954 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35955 } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 35956 return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
jpayne@69 35957 }
jpayne@69 35958 }
jpayne@69 35959 break;
jpayne@69 35960 case -3:
jpayne@69 35961 if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 35962 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 35963 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35964 } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 35965 return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
jpayne@69 35966 }
jpayne@69 35967 }
jpayne@69 35968 break;
jpayne@69 35969 case 3:
jpayne@69 35970 if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) {
jpayne@69 35971 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 35972 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35973 } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 35974 return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
jpayne@69 35975 }
jpayne@69 35976 }
jpayne@69 35977 break;
jpayne@69 35978 case -4:
jpayne@69 35979 if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 35980 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 35981 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35982 } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 35983 return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
jpayne@69 35984 }
jpayne@69 35985 }
jpayne@69 35986 break;
jpayne@69 35987 case 4:
jpayne@69 35988 if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) {
jpayne@69 35989 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 35990 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 35991 } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 35992 return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
jpayne@69 35993 }
jpayne@69 35994 }
jpayne@69 35995 break;
jpayne@69 35996 }
jpayne@69 35997 }
jpayne@69 35998 #endif
jpayne@69 35999 if ((sizeof(int64_t) <= sizeof(long))) {
jpayne@69 36000 __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
jpayne@69 36001 #ifdef HAVE_LONG_LONG
jpayne@69 36002 } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) {
jpayne@69 36003 __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
jpayne@69 36004 #endif
jpayne@69 36005 }
jpayne@69 36006 }
jpayne@69 36007 {
jpayne@69 36008 int64_t val;
jpayne@69 36009 int ret = -1;
jpayne@69 36010 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 36011 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
jpayne@69 36012 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
jpayne@69 36013 if (unlikely(bytes_copied == -1)) {
jpayne@69 36014 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
jpayne@69 36015 goto raise_overflow;
jpayne@69 36016 } else {
jpayne@69 36017 ret = 0;
jpayne@69 36018 }
jpayne@69 36019 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
jpayne@69 36020 int one = 1; int is_little = (int)*(unsigned char *)&one;
jpayne@69 36021 unsigned char *bytes = (unsigned char *)&val;
jpayne@69 36022 ret = _PyLong_AsByteArray((PyLongObject *)x,
jpayne@69 36023 bytes, sizeof(val),
jpayne@69 36024 is_little, !is_unsigned);
jpayne@69 36025 #else
jpayne@69 36026 PyObject *v;
jpayne@69 36027 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
jpayne@69 36028 int bits, remaining_bits, is_negative = 0;
jpayne@69 36029 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
jpayne@69 36030 if (likely(PyLong_CheckExact(x))) {
jpayne@69 36031 v = __Pyx_NewRef(x);
jpayne@69 36032 } else {
jpayne@69 36033 v = PyNumber_Long(x);
jpayne@69 36034 if (unlikely(!v)) return (int64_t) -1;
jpayne@69 36035 assert(PyLong_CheckExact(v));
jpayne@69 36036 }
jpayne@69 36037 {
jpayne@69 36038 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
jpayne@69 36039 if (unlikely(result < 0)) {
jpayne@69 36040 Py_DECREF(v);
jpayne@69 36041 return (int64_t) -1;
jpayne@69 36042 }
jpayne@69 36043 is_negative = result == 1;
jpayne@69 36044 }
jpayne@69 36045 if (is_unsigned && unlikely(is_negative)) {
jpayne@69 36046 Py_DECREF(v);
jpayne@69 36047 goto raise_neg_overflow;
jpayne@69 36048 } else if (is_negative) {
jpayne@69 36049 stepval = PyNumber_Invert(v);
jpayne@69 36050 Py_DECREF(v);
jpayne@69 36051 if (unlikely(!stepval))
jpayne@69 36052 return (int64_t) -1;
jpayne@69 36053 } else {
jpayne@69 36054 stepval = v;
jpayne@69 36055 }
jpayne@69 36056 v = NULL;
jpayne@69 36057 val = (int64_t) 0;
jpayne@69 36058 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
jpayne@69 36059 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
jpayne@69 36060 for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) {
jpayne@69 36061 PyObject *tmp, *digit;
jpayne@69 36062 long idigit;
jpayne@69 36063 digit = PyNumber_And(stepval, mask);
jpayne@69 36064 if (unlikely(!digit)) goto done;
jpayne@69 36065 idigit = PyLong_AsLong(digit);
jpayne@69 36066 Py_DECREF(digit);
jpayne@69 36067 if (unlikely(idigit < 0)) goto done;
jpayne@69 36068 val |= ((int64_t) idigit) << bits;
jpayne@69 36069 tmp = PyNumber_Rshift(stepval, shift);
jpayne@69 36070 if (unlikely(!tmp)) goto done;
jpayne@69 36071 Py_DECREF(stepval); stepval = tmp;
jpayne@69 36072 }
jpayne@69 36073 Py_DECREF(shift); shift = NULL;
jpayne@69 36074 Py_DECREF(mask); mask = NULL;
jpayne@69 36075 {
jpayne@69 36076 long idigit = PyLong_AsLong(stepval);
jpayne@69 36077 if (unlikely(idigit < 0)) goto done;
jpayne@69 36078 remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1);
jpayne@69 36079 if (unlikely(idigit >= (1L << remaining_bits)))
jpayne@69 36080 goto raise_overflow;
jpayne@69 36081 val |= ((int64_t) idigit) << bits;
jpayne@69 36082 }
jpayne@69 36083 if (!is_unsigned) {
jpayne@69 36084 if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1))))
jpayne@69 36085 goto raise_overflow;
jpayne@69 36086 if (is_negative)
jpayne@69 36087 val = ~val;
jpayne@69 36088 }
jpayne@69 36089 ret = 0;
jpayne@69 36090 done:
jpayne@69 36091 Py_XDECREF(shift);
jpayne@69 36092 Py_XDECREF(mask);
jpayne@69 36093 Py_XDECREF(stepval);
jpayne@69 36094 #endif
jpayne@69 36095 if (unlikely(ret))
jpayne@69 36096 return (int64_t) -1;
jpayne@69 36097 return val;
jpayne@69 36098 }
jpayne@69 36099 raise_overflow:
jpayne@69 36100 PyErr_SetString(PyExc_OverflowError,
jpayne@69 36101 "value too large to convert to int64_t");
jpayne@69 36102 return (int64_t) -1;
jpayne@69 36103 raise_neg_overflow:
jpayne@69 36104 PyErr_SetString(PyExc_OverflowError,
jpayne@69 36105 "can't convert negative value to int64_t");
jpayne@69 36106 return (int64_t) -1;
jpayne@69 36107 }
jpayne@69 36108
jpayne@69 36109 /* CIntToPy */
jpayne@69 36110 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
jpayne@69 36111 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 36112 #pragma GCC diagnostic push
jpayne@69 36113 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@69 36114 #endif
jpayne@69 36115 const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
jpayne@69 36116 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 36117 #pragma GCC diagnostic pop
jpayne@69 36118 #endif
jpayne@69 36119 const int is_unsigned = neg_one > const_zero;
jpayne@69 36120 if (is_unsigned) {
jpayne@69 36121 if (sizeof(int32_t) < sizeof(long)) {
jpayne@69 36122 return PyInt_FromLong((long) value);
jpayne@69 36123 } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
jpayne@69 36124 return PyLong_FromUnsignedLong((unsigned long) value);
jpayne@69 36125 #ifdef HAVE_LONG_LONG
jpayne@69 36126 } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
jpayne@69 36127 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
jpayne@69 36128 #endif
jpayne@69 36129 }
jpayne@69 36130 } else {
jpayne@69 36131 if (sizeof(int32_t) <= sizeof(long)) {
jpayne@69 36132 return PyInt_FromLong((long) value);
jpayne@69 36133 #ifdef HAVE_LONG_LONG
jpayne@69 36134 } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
jpayne@69 36135 return PyLong_FromLongLong((PY_LONG_LONG) value);
jpayne@69 36136 #endif
jpayne@69 36137 }
jpayne@69 36138 }
jpayne@69 36139 {
jpayne@69 36140 unsigned char *bytes = (unsigned char *)&value;
jpayne@69 36141 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
jpayne@69 36142 if (is_unsigned) {
jpayne@69 36143 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
jpayne@69 36144 } else {
jpayne@69 36145 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
jpayne@69 36146 }
jpayne@69 36147 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
jpayne@69 36148 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@69 36149 return _PyLong_FromByteArray(bytes, sizeof(int32_t),
jpayne@69 36150 little, !is_unsigned);
jpayne@69 36151 #else
jpayne@69 36152 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@69 36153 PyObject *from_bytes, *result = NULL;
jpayne@69 36154 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
jpayne@69 36155 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
jpayne@69 36156 if (!from_bytes) return NULL;
jpayne@69 36157 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int32_t));
jpayne@69 36158 if (!py_bytes) goto limited_bad;
jpayne@69 36159 order_str = PyUnicode_FromString(little ? "little" : "big");
jpayne@69 36160 if (!order_str) goto limited_bad;
jpayne@69 36161 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
jpayne@69 36162 if (!arg_tuple) goto limited_bad;
jpayne@69 36163 if (!is_unsigned) {
jpayne@69 36164 kwds = PyDict_New();
jpayne@69 36165 if (!kwds) goto limited_bad;
jpayne@69 36166 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
jpayne@69 36167 }
jpayne@69 36168 result = PyObject_Call(from_bytes, arg_tuple, kwds);
jpayne@69 36169 limited_bad:
jpayne@69 36170 Py_XDECREF(kwds);
jpayne@69 36171 Py_XDECREF(arg_tuple);
jpayne@69 36172 Py_XDECREF(order_str);
jpayne@69 36173 Py_XDECREF(py_bytes);
jpayne@69 36174 Py_XDECREF(from_bytes);
jpayne@69 36175 return result;
jpayne@69 36176 #endif
jpayne@69 36177 }
jpayne@69 36178 }
jpayne@69 36179
jpayne@69 36180 /* CIntToPy */
jpayne@69 36181 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
jpayne@69 36182 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 36183 #pragma GCC diagnostic push
jpayne@69 36184 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@69 36185 #endif
jpayne@69 36186 const long neg_one = (long) -1, const_zero = (long) 0;
jpayne@69 36187 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 36188 #pragma GCC diagnostic pop
jpayne@69 36189 #endif
jpayne@69 36190 const int is_unsigned = neg_one > const_zero;
jpayne@69 36191 if (is_unsigned) {
jpayne@69 36192 if (sizeof(long) < sizeof(long)) {
jpayne@69 36193 return PyInt_FromLong((long) value);
jpayne@69 36194 } else if (sizeof(long) <= sizeof(unsigned long)) {
jpayne@69 36195 return PyLong_FromUnsignedLong((unsigned long) value);
jpayne@69 36196 #ifdef HAVE_LONG_LONG
jpayne@69 36197 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
jpayne@69 36198 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
jpayne@69 36199 #endif
jpayne@69 36200 }
jpayne@69 36201 } else {
jpayne@69 36202 if (sizeof(long) <= sizeof(long)) {
jpayne@69 36203 return PyInt_FromLong((long) value);
jpayne@69 36204 #ifdef HAVE_LONG_LONG
jpayne@69 36205 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
jpayne@69 36206 return PyLong_FromLongLong((PY_LONG_LONG) value);
jpayne@69 36207 #endif
jpayne@69 36208 }
jpayne@69 36209 }
jpayne@69 36210 {
jpayne@69 36211 unsigned char *bytes = (unsigned char *)&value;
jpayne@69 36212 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
jpayne@69 36213 if (is_unsigned) {
jpayne@69 36214 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
jpayne@69 36215 } else {
jpayne@69 36216 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
jpayne@69 36217 }
jpayne@69 36218 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
jpayne@69 36219 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@69 36220 return _PyLong_FromByteArray(bytes, sizeof(long),
jpayne@69 36221 little, !is_unsigned);
jpayne@69 36222 #else
jpayne@69 36223 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@69 36224 PyObject *from_bytes, *result = NULL;
jpayne@69 36225 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
jpayne@69 36226 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
jpayne@69 36227 if (!from_bytes) return NULL;
jpayne@69 36228 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
jpayne@69 36229 if (!py_bytes) goto limited_bad;
jpayne@69 36230 order_str = PyUnicode_FromString(little ? "little" : "big");
jpayne@69 36231 if (!order_str) goto limited_bad;
jpayne@69 36232 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
jpayne@69 36233 if (!arg_tuple) goto limited_bad;
jpayne@69 36234 if (!is_unsigned) {
jpayne@69 36235 kwds = PyDict_New();
jpayne@69 36236 if (!kwds) goto limited_bad;
jpayne@69 36237 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
jpayne@69 36238 }
jpayne@69 36239 result = PyObject_Call(from_bytes, arg_tuple, kwds);
jpayne@69 36240 limited_bad:
jpayne@69 36241 Py_XDECREF(kwds);
jpayne@69 36242 Py_XDECREF(arg_tuple);
jpayne@69 36243 Py_XDECREF(order_str);
jpayne@69 36244 Py_XDECREF(py_bytes);
jpayne@69 36245 Py_XDECREF(from_bytes);
jpayne@69 36246 return result;
jpayne@69 36247 #endif
jpayne@69 36248 }
jpayne@69 36249 }
jpayne@69 36250
jpayne@69 36251 /* CIntFromPy */
jpayne@69 36252 static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
jpayne@69 36253 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 36254 #pragma GCC diagnostic push
jpayne@69 36255 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@69 36256 #endif
jpayne@69 36257 const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
jpayne@69 36258 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 36259 #pragma GCC diagnostic pop
jpayne@69 36260 #endif
jpayne@69 36261 const int is_unsigned = neg_one > const_zero;
jpayne@69 36262 #if PY_MAJOR_VERSION < 3
jpayne@69 36263 if (likely(PyInt_Check(x))) {
jpayne@69 36264 if ((sizeof(int32_t) < sizeof(long))) {
jpayne@69 36265 __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG(x))
jpayne@69 36266 } else {
jpayne@69 36267 long val = PyInt_AS_LONG(x);
jpayne@69 36268 if (is_unsigned && unlikely(val < 0)) {
jpayne@69 36269 goto raise_neg_overflow;
jpayne@69 36270 }
jpayne@69 36271 return (int32_t) val;
jpayne@69 36272 }
jpayne@69 36273 }
jpayne@69 36274 #endif
jpayne@69 36275 if (unlikely(!PyLong_Check(x))) {
jpayne@69 36276 int32_t val;
jpayne@69 36277 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
jpayne@69 36278 if (!tmp) return (int32_t) -1;
jpayne@69 36279 val = __Pyx_PyInt_As_int32_t(tmp);
jpayne@69 36280 Py_DECREF(tmp);
jpayne@69 36281 return val;
jpayne@69 36282 }
jpayne@69 36283 if (is_unsigned) {
jpayne@69 36284 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 36285 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
jpayne@69 36286 goto raise_neg_overflow;
jpayne@69 36287 } else if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 36288 __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
jpayne@69 36289 } else {
jpayne@69 36290 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 36291 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 36292 switch (__Pyx_PyLong_DigitCount(x)) {
jpayne@69 36293 case 2:
jpayne@69 36294 if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) {
jpayne@69 36295 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 36296 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 36297 } else if ((8 * sizeof(int32_t) >= 2 * PyLong_SHIFT)) {
jpayne@69 36298 return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
jpayne@69 36299 }
jpayne@69 36300 }
jpayne@69 36301 break;
jpayne@69 36302 case 3:
jpayne@69 36303 if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) {
jpayne@69 36304 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 36305 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 36306 } else if ((8 * sizeof(int32_t) >= 3 * PyLong_SHIFT)) {
jpayne@69 36307 return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
jpayne@69 36308 }
jpayne@69 36309 }
jpayne@69 36310 break;
jpayne@69 36311 case 4:
jpayne@69 36312 if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) {
jpayne@69 36313 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 36314 __PYX_VERIFY_RETURN_INT(int32_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])))
jpayne@69 36315 } else if ((8 * sizeof(int32_t) >= 4 * PyLong_SHIFT)) {
jpayne@69 36316 return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
jpayne@69 36317 }
jpayne@69 36318 }
jpayne@69 36319 break;
jpayne@69 36320 }
jpayne@69 36321 }
jpayne@69 36322 #endif
jpayne@69 36323 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
jpayne@69 36324 if (unlikely(Py_SIZE(x) < 0)) {
jpayne@69 36325 goto raise_neg_overflow;
jpayne@69 36326 }
jpayne@69 36327 #else
jpayne@69 36328 {
jpayne@69 36329 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
jpayne@69 36330 if (unlikely(result < 0))
jpayne@69 36331 return (int32_t) -1;
jpayne@69 36332 if (unlikely(result == 1))
jpayne@69 36333 goto raise_neg_overflow;
jpayne@69 36334 }
jpayne@69 36335 #endif
jpayne@69 36336 if ((sizeof(int32_t) <= sizeof(unsigned long))) {
jpayne@69 36337 __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x))
jpayne@69 36338 #ifdef HAVE_LONG_LONG
jpayne@69 36339 } else if ((sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG))) {
jpayne@69 36340 __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
jpayne@69 36341 #endif
jpayne@69 36342 }
jpayne@69 36343 } else {
jpayne@69 36344 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 36345 if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 36346 __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
jpayne@69 36347 } else {
jpayne@69 36348 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 36349 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 36350 switch (__Pyx_PyLong_SignedDigitCount(x)) {
jpayne@69 36351 case -2:
jpayne@69 36352 if ((8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT)) {
jpayne@69 36353 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 36354 __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 36355 } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 36356 return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
jpayne@69 36357 }
jpayne@69 36358 }
jpayne@69 36359 break;
jpayne@69 36360 case 2:
jpayne@69 36361 if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) {
jpayne@69 36362 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 36363 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 36364 } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 36365 return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
jpayne@69 36366 }
jpayne@69 36367 }
jpayne@69 36368 break;
jpayne@69 36369 case -3:
jpayne@69 36370 if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 36371 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 36372 __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 36373 } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 36374 return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
jpayne@69 36375 }
jpayne@69 36376 }
jpayne@69 36377 break;
jpayne@69 36378 case 3:
jpayne@69 36379 if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) {
jpayne@69 36380 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 36381 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 36382 } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 36383 return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
jpayne@69 36384 }
jpayne@69 36385 }
jpayne@69 36386 break;
jpayne@69 36387 case -4:
jpayne@69 36388 if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 36389 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 36390 __PYX_VERIFY_RETURN_INT(int32_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])))
jpayne@69 36391 } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 36392 return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
jpayne@69 36393 }
jpayne@69 36394 }
jpayne@69 36395 break;
jpayne@69 36396 case 4:
jpayne@69 36397 if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) {
jpayne@69 36398 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 36399 __PYX_VERIFY_RETURN_INT(int32_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])))
jpayne@69 36400 } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 36401 return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
jpayne@69 36402 }
jpayne@69 36403 }
jpayne@69 36404 break;
jpayne@69 36405 }
jpayne@69 36406 }
jpayne@69 36407 #endif
jpayne@69 36408 if ((sizeof(int32_t) <= sizeof(long))) {
jpayne@69 36409 __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x))
jpayne@69 36410 #ifdef HAVE_LONG_LONG
jpayne@69 36411 } else if ((sizeof(int32_t) <= sizeof(PY_LONG_LONG))) {
jpayne@69 36412 __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
jpayne@69 36413 #endif
jpayne@69 36414 }
jpayne@69 36415 }
jpayne@69 36416 {
jpayne@69 36417 int32_t val;
jpayne@69 36418 int ret = -1;
jpayne@69 36419 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 36420 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
jpayne@69 36421 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
jpayne@69 36422 if (unlikely(bytes_copied == -1)) {
jpayne@69 36423 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
jpayne@69 36424 goto raise_overflow;
jpayne@69 36425 } else {
jpayne@69 36426 ret = 0;
jpayne@69 36427 }
jpayne@69 36428 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
jpayne@69 36429 int one = 1; int is_little = (int)*(unsigned char *)&one;
jpayne@69 36430 unsigned char *bytes = (unsigned char *)&val;
jpayne@69 36431 ret = _PyLong_AsByteArray((PyLongObject *)x,
jpayne@69 36432 bytes, sizeof(val),
jpayne@69 36433 is_little, !is_unsigned);
jpayne@69 36434 #else
jpayne@69 36435 PyObject *v;
jpayne@69 36436 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
jpayne@69 36437 int bits, remaining_bits, is_negative = 0;
jpayne@69 36438 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
jpayne@69 36439 if (likely(PyLong_CheckExact(x))) {
jpayne@69 36440 v = __Pyx_NewRef(x);
jpayne@69 36441 } else {
jpayne@69 36442 v = PyNumber_Long(x);
jpayne@69 36443 if (unlikely(!v)) return (int32_t) -1;
jpayne@69 36444 assert(PyLong_CheckExact(v));
jpayne@69 36445 }
jpayne@69 36446 {
jpayne@69 36447 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
jpayne@69 36448 if (unlikely(result < 0)) {
jpayne@69 36449 Py_DECREF(v);
jpayne@69 36450 return (int32_t) -1;
jpayne@69 36451 }
jpayne@69 36452 is_negative = result == 1;
jpayne@69 36453 }
jpayne@69 36454 if (is_unsigned && unlikely(is_negative)) {
jpayne@69 36455 Py_DECREF(v);
jpayne@69 36456 goto raise_neg_overflow;
jpayne@69 36457 } else if (is_negative) {
jpayne@69 36458 stepval = PyNumber_Invert(v);
jpayne@69 36459 Py_DECREF(v);
jpayne@69 36460 if (unlikely(!stepval))
jpayne@69 36461 return (int32_t) -1;
jpayne@69 36462 } else {
jpayne@69 36463 stepval = v;
jpayne@69 36464 }
jpayne@69 36465 v = NULL;
jpayne@69 36466 val = (int32_t) 0;
jpayne@69 36467 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
jpayne@69 36468 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
jpayne@69 36469 for (bits = 0; bits < (int) sizeof(int32_t) * 8 - chunk_size; bits += chunk_size) {
jpayne@69 36470 PyObject *tmp, *digit;
jpayne@69 36471 long idigit;
jpayne@69 36472 digit = PyNumber_And(stepval, mask);
jpayne@69 36473 if (unlikely(!digit)) goto done;
jpayne@69 36474 idigit = PyLong_AsLong(digit);
jpayne@69 36475 Py_DECREF(digit);
jpayne@69 36476 if (unlikely(idigit < 0)) goto done;
jpayne@69 36477 val |= ((int32_t) idigit) << bits;
jpayne@69 36478 tmp = PyNumber_Rshift(stepval, shift);
jpayne@69 36479 if (unlikely(!tmp)) goto done;
jpayne@69 36480 Py_DECREF(stepval); stepval = tmp;
jpayne@69 36481 }
jpayne@69 36482 Py_DECREF(shift); shift = NULL;
jpayne@69 36483 Py_DECREF(mask); mask = NULL;
jpayne@69 36484 {
jpayne@69 36485 long idigit = PyLong_AsLong(stepval);
jpayne@69 36486 if (unlikely(idigit < 0)) goto done;
jpayne@69 36487 remaining_bits = ((int) sizeof(int32_t) * 8) - bits - (is_unsigned ? 0 : 1);
jpayne@69 36488 if (unlikely(idigit >= (1L << remaining_bits)))
jpayne@69 36489 goto raise_overflow;
jpayne@69 36490 val |= ((int32_t) idigit) << bits;
jpayne@69 36491 }
jpayne@69 36492 if (!is_unsigned) {
jpayne@69 36493 if (unlikely(val & (((int32_t) 1) << (sizeof(int32_t) * 8 - 1))))
jpayne@69 36494 goto raise_overflow;
jpayne@69 36495 if (is_negative)
jpayne@69 36496 val = ~val;
jpayne@69 36497 }
jpayne@69 36498 ret = 0;
jpayne@69 36499 done:
jpayne@69 36500 Py_XDECREF(shift);
jpayne@69 36501 Py_XDECREF(mask);
jpayne@69 36502 Py_XDECREF(stepval);
jpayne@69 36503 #endif
jpayne@69 36504 if (unlikely(ret))
jpayne@69 36505 return (int32_t) -1;
jpayne@69 36506 return val;
jpayne@69 36507 }
jpayne@69 36508 raise_overflow:
jpayne@69 36509 PyErr_SetString(PyExc_OverflowError,
jpayne@69 36510 "value too large to convert to int32_t");
jpayne@69 36511 return (int32_t) -1;
jpayne@69 36512 raise_neg_overflow:
jpayne@69 36513 PyErr_SetString(PyExc_OverflowError,
jpayne@69 36514 "can't convert negative value to int32_t");
jpayne@69 36515 return (int32_t) -1;
jpayne@69 36516 }
jpayne@69 36517
jpayne@69 36518 /* FormatTypeName */
jpayne@69 36519 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 36520 static __Pyx_TypeName
jpayne@69 36521 __Pyx_PyType_GetName(PyTypeObject* tp)
jpayne@69 36522 {
jpayne@69 36523 PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
jpayne@69 36524 __pyx_n_s_name);
jpayne@69 36525 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
jpayne@69 36526 PyErr_Clear();
jpayne@69 36527 Py_XDECREF(name);
jpayne@69 36528 name = __Pyx_NewRef(__pyx_n_s__78);
jpayne@69 36529 }
jpayne@69 36530 return name;
jpayne@69 36531 }
jpayne@69 36532 #endif
jpayne@69 36533
jpayne@69 36534 /* FastTypeChecks */
jpayne@69 36535 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 36536 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
jpayne@69 36537 while (a) {
jpayne@69 36538 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
jpayne@69 36539 if (a == b)
jpayne@69 36540 return 1;
jpayne@69 36541 }
jpayne@69 36542 return b == &PyBaseObject_Type;
jpayne@69 36543 }
jpayne@69 36544 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
jpayne@69 36545 PyObject *mro;
jpayne@69 36546 if (a == b) return 1;
jpayne@69 36547 mro = a->tp_mro;
jpayne@69 36548 if (likely(mro)) {
jpayne@69 36549 Py_ssize_t i, n;
jpayne@69 36550 n = PyTuple_GET_SIZE(mro);
jpayne@69 36551 for (i = 0; i < n; i++) {
jpayne@69 36552 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
jpayne@69 36553 return 1;
jpayne@69 36554 }
jpayne@69 36555 return 0;
jpayne@69 36556 }
jpayne@69 36557 return __Pyx_InBases(a, b);
jpayne@69 36558 }
jpayne@69 36559 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
jpayne@69 36560 PyObject *mro;
jpayne@69 36561 if (cls == a || cls == b) return 1;
jpayne@69 36562 mro = cls->tp_mro;
jpayne@69 36563 if (likely(mro)) {
jpayne@69 36564 Py_ssize_t i, n;
jpayne@69 36565 n = PyTuple_GET_SIZE(mro);
jpayne@69 36566 for (i = 0; i < n; i++) {
jpayne@69 36567 PyObject *base = PyTuple_GET_ITEM(mro, i);
jpayne@69 36568 if (base == (PyObject *)a || base == (PyObject *)b)
jpayne@69 36569 return 1;
jpayne@69 36570 }
jpayne@69 36571 return 0;
jpayne@69 36572 }
jpayne@69 36573 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
jpayne@69 36574 }
jpayne@69 36575 #if PY_MAJOR_VERSION == 2
jpayne@69 36576 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
jpayne@69 36577 PyObject *exception, *value, *tb;
jpayne@69 36578 int res;
jpayne@69 36579 __Pyx_PyThreadState_declare
jpayne@69 36580 __Pyx_PyThreadState_assign
jpayne@69 36581 __Pyx_ErrFetch(&exception, &value, &tb);
jpayne@69 36582 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
jpayne@69 36583 if (unlikely(res == -1)) {
jpayne@69 36584 PyErr_WriteUnraisable(err);
jpayne@69 36585 res = 0;
jpayne@69 36586 }
jpayne@69 36587 if (!res) {
jpayne@69 36588 res = PyObject_IsSubclass(err, exc_type2);
jpayne@69 36589 if (unlikely(res == -1)) {
jpayne@69 36590 PyErr_WriteUnraisable(err);
jpayne@69 36591 res = 0;
jpayne@69 36592 }
jpayne@69 36593 }
jpayne@69 36594 __Pyx_ErrRestore(exception, value, tb);
jpayne@69 36595 return res;
jpayne@69 36596 }
jpayne@69 36597 #else
jpayne@69 36598 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
jpayne@69 36599 if (exc_type1) {
jpayne@69 36600 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
jpayne@69 36601 } else {
jpayne@69 36602 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
jpayne@69 36603 }
jpayne@69 36604 }
jpayne@69 36605 #endif
jpayne@69 36606 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
jpayne@69 36607 Py_ssize_t i, n;
jpayne@69 36608 assert(PyExceptionClass_Check(exc_type));
jpayne@69 36609 n = PyTuple_GET_SIZE(tuple);
jpayne@69 36610 #if PY_MAJOR_VERSION >= 3
jpayne@69 36611 for (i=0; i<n; i++) {
jpayne@69 36612 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
jpayne@69 36613 }
jpayne@69 36614 #endif
jpayne@69 36615 for (i=0; i<n; i++) {
jpayne@69 36616 PyObject *t = PyTuple_GET_ITEM(tuple, i);
jpayne@69 36617 #if PY_MAJOR_VERSION < 3
jpayne@69 36618 if (likely(exc_type == t)) return 1;
jpayne@69 36619 #endif
jpayne@69 36620 if (likely(PyExceptionClass_Check(t))) {
jpayne@69 36621 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
jpayne@69 36622 } else {
jpayne@69 36623 }
jpayne@69 36624 }
jpayne@69 36625 return 0;
jpayne@69 36626 }
jpayne@69 36627 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
jpayne@69 36628 if (likely(err == exc_type)) return 1;
jpayne@69 36629 if (likely(PyExceptionClass_Check(err))) {
jpayne@69 36630 if (likely(PyExceptionClass_Check(exc_type))) {
jpayne@69 36631 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
jpayne@69 36632 } else if (likely(PyTuple_Check(exc_type))) {
jpayne@69 36633 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
jpayne@69 36634 } else {
jpayne@69 36635 }
jpayne@69 36636 }
jpayne@69 36637 return PyErr_GivenExceptionMatches(err, exc_type);
jpayne@69 36638 }
jpayne@69 36639 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
jpayne@69 36640 assert(PyExceptionClass_Check(exc_type1));
jpayne@69 36641 assert(PyExceptionClass_Check(exc_type2));
jpayne@69 36642 if (likely(err == exc_type1 || err == exc_type2)) return 1;
jpayne@69 36643 if (likely(PyExceptionClass_Check(err))) {
jpayne@69 36644 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
jpayne@69 36645 }
jpayne@69 36646 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
jpayne@69 36647 }
jpayne@69 36648 #endif
jpayne@69 36649
jpayne@69 36650 /* CheckBinaryVersion */
jpayne@69 36651 static unsigned long __Pyx_get_runtime_version(void) {
jpayne@69 36652 #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
jpayne@69 36653 return Py_Version & ~0xFFUL;
jpayne@69 36654 #else
jpayne@69 36655 const char* rt_version = Py_GetVersion();
jpayne@69 36656 unsigned long version = 0;
jpayne@69 36657 unsigned long factor = 0x01000000UL;
jpayne@69 36658 unsigned int digit = 0;
jpayne@69 36659 int i = 0;
jpayne@69 36660 while (factor) {
jpayne@69 36661 while ('0' <= rt_version[i] && rt_version[i] <= '9') {
jpayne@69 36662 digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
jpayne@69 36663 ++i;
jpayne@69 36664 }
jpayne@69 36665 version += factor * digit;
jpayne@69 36666 if (rt_version[i] != '.')
jpayne@69 36667 break;
jpayne@69 36668 digit = 0;
jpayne@69 36669 factor >>= 8;
jpayne@69 36670 ++i;
jpayne@69 36671 }
jpayne@69 36672 return version;
jpayne@69 36673 #endif
jpayne@69 36674 }
jpayne@69 36675 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
jpayne@69 36676 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
jpayne@69 36677 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
jpayne@69 36678 return 0;
jpayne@69 36679 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
jpayne@69 36680 return 1;
jpayne@69 36681 {
jpayne@69 36682 char message[200];
jpayne@69 36683 PyOS_snprintf(message, sizeof(message),
jpayne@69 36684 "compile time Python version %d.%d "
jpayne@69 36685 "of module '%.100s' "
jpayne@69 36686 "%s "
jpayne@69 36687 "runtime version %d.%d",
jpayne@69 36688 (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
jpayne@69 36689 __Pyx_MODULE_NAME,
jpayne@69 36690 (allow_newer) ? "was newer than" : "does not match",
jpayne@69 36691 (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
jpayne@69 36692 );
jpayne@69 36693 return PyErr_WarnEx(NULL, message, 1);
jpayne@69 36694 }
jpayne@69 36695 }
jpayne@69 36696
jpayne@69 36697 /* FunctionImport */
jpayne@69 36698 #ifndef __PYX_HAVE_RT_ImportFunction_3_0_11
jpayne@69 36699 #define __PYX_HAVE_RT_ImportFunction_3_0_11
jpayne@69 36700 static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
jpayne@69 36701 PyObject *d = 0;
jpayne@69 36702 PyObject *cobj = 0;
jpayne@69 36703 union {
jpayne@69 36704 void (*fp)(void);
jpayne@69 36705 void *p;
jpayne@69 36706 } tmp;
jpayne@69 36707 d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
jpayne@69 36708 if (!d)
jpayne@69 36709 goto bad;
jpayne@69 36710 cobj = PyDict_GetItemString(d, funcname);
jpayne@69 36711 if (!cobj) {
jpayne@69 36712 PyErr_Format(PyExc_ImportError,
jpayne@69 36713 "%.200s does not export expected C function %.200s",
jpayne@69 36714 PyModule_GetName(module), funcname);
jpayne@69 36715 goto bad;
jpayne@69 36716 }
jpayne@69 36717 if (!PyCapsule_IsValid(cobj, sig)) {
jpayne@69 36718 PyErr_Format(PyExc_TypeError,
jpayne@69 36719 "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
jpayne@69 36720 PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
jpayne@69 36721 goto bad;
jpayne@69 36722 }
jpayne@69 36723 tmp.p = PyCapsule_GetPointer(cobj, sig);
jpayne@69 36724 *f = tmp.fp;
jpayne@69 36725 if (!(*f))
jpayne@69 36726 goto bad;
jpayne@69 36727 Py_DECREF(d);
jpayne@69 36728 return 0;
jpayne@69 36729 bad:
jpayne@69 36730 Py_XDECREF(d);
jpayne@69 36731 return -1;
jpayne@69 36732 }
jpayne@69 36733 #endif
jpayne@69 36734
jpayne@69 36735 /* InitStrings */
jpayne@69 36736 #if PY_MAJOR_VERSION >= 3
jpayne@69 36737 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
jpayne@69 36738 if (t.is_unicode | t.is_str) {
jpayne@69 36739 if (t.intern) {
jpayne@69 36740 *str = PyUnicode_InternFromString(t.s);
jpayne@69 36741 } else if (t.encoding) {
jpayne@69 36742 *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
jpayne@69 36743 } else {
jpayne@69 36744 *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
jpayne@69 36745 }
jpayne@69 36746 } else {
jpayne@69 36747 *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
jpayne@69 36748 }
jpayne@69 36749 if (!*str)
jpayne@69 36750 return -1;
jpayne@69 36751 if (PyObject_Hash(*str) == -1)
jpayne@69 36752 return -1;
jpayne@69 36753 return 0;
jpayne@69 36754 }
jpayne@69 36755 #endif
jpayne@69 36756 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
jpayne@69 36757 while (t->p) {
jpayne@69 36758 #if PY_MAJOR_VERSION >= 3
jpayne@69 36759 __Pyx_InitString(*t, t->p);
jpayne@69 36760 #else
jpayne@69 36761 if (t->is_unicode) {
jpayne@69 36762 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
jpayne@69 36763 } else if (t->intern) {
jpayne@69 36764 *t->p = PyString_InternFromString(t->s);
jpayne@69 36765 } else {
jpayne@69 36766 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
jpayne@69 36767 }
jpayne@69 36768 if (!*t->p)
jpayne@69 36769 return -1;
jpayne@69 36770 if (PyObject_Hash(*t->p) == -1)
jpayne@69 36771 return -1;
jpayne@69 36772 #endif
jpayne@69 36773 ++t;
jpayne@69 36774 }
jpayne@69 36775 return 0;
jpayne@69 36776 }
jpayne@69 36777
jpayne@69 36778 #include <string.h>
jpayne@69 36779 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
jpayne@69 36780 size_t len = strlen(s);
jpayne@69 36781 if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
jpayne@69 36782 PyErr_SetString(PyExc_OverflowError, "byte string is too long");
jpayne@69 36783 return -1;
jpayne@69 36784 }
jpayne@69 36785 return (Py_ssize_t) len;
jpayne@69 36786 }
jpayne@69 36787 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
jpayne@69 36788 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
jpayne@69 36789 if (unlikely(len < 0)) return NULL;
jpayne@69 36790 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
jpayne@69 36791 }
jpayne@69 36792 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
jpayne@69 36793 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
jpayne@69 36794 if (unlikely(len < 0)) return NULL;
jpayne@69 36795 return PyByteArray_FromStringAndSize(c_str, len);
jpayne@69 36796 }
jpayne@69 36797 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
jpayne@69 36798 Py_ssize_t ignore;
jpayne@69 36799 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
jpayne@69 36800 }
jpayne@69 36801 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
jpayne@69 36802 #if !CYTHON_PEP393_ENABLED
jpayne@69 36803 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
jpayne@69 36804 char* defenc_c;
jpayne@69 36805 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
jpayne@69 36806 if (!defenc) return NULL;
jpayne@69 36807 defenc_c = PyBytes_AS_STRING(defenc);
jpayne@69 36808 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@69 36809 {
jpayne@69 36810 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
jpayne@69 36811 char* c;
jpayne@69 36812 for (c = defenc_c; c < end; c++) {
jpayne@69 36813 if ((unsigned char) (*c) >= 128) {
jpayne@69 36814 PyUnicode_AsASCIIString(o);
jpayne@69 36815 return NULL;
jpayne@69 36816 }
jpayne@69 36817 }
jpayne@69 36818 }
jpayne@69 36819 #endif
jpayne@69 36820 *length = PyBytes_GET_SIZE(defenc);
jpayne@69 36821 return defenc_c;
jpayne@69 36822 }
jpayne@69 36823 #else
jpayne@69 36824 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
jpayne@69 36825 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
jpayne@69 36826 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@69 36827 if (likely(PyUnicode_IS_ASCII(o))) {
jpayne@69 36828 *length = PyUnicode_GET_LENGTH(o);
jpayne@69 36829 return PyUnicode_AsUTF8(o);
jpayne@69 36830 } else {
jpayne@69 36831 PyUnicode_AsASCIIString(o);
jpayne@69 36832 return NULL;
jpayne@69 36833 }
jpayne@69 36834 #else
jpayne@69 36835 return PyUnicode_AsUTF8AndSize(o, length);
jpayne@69 36836 #endif
jpayne@69 36837 }
jpayne@69 36838 #endif
jpayne@69 36839 #endif
jpayne@69 36840 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
jpayne@69 36841 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
jpayne@69 36842 if (
jpayne@69 36843 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@69 36844 __Pyx_sys_getdefaultencoding_not_ascii &&
jpayne@69 36845 #endif
jpayne@69 36846 PyUnicode_Check(o)) {
jpayne@69 36847 return __Pyx_PyUnicode_AsStringAndSize(o, length);
jpayne@69 36848 } else
jpayne@69 36849 #endif
jpayne@69 36850 #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
jpayne@69 36851 if (PyByteArray_Check(o)) {
jpayne@69 36852 *length = PyByteArray_GET_SIZE(o);
jpayne@69 36853 return PyByteArray_AS_STRING(o);
jpayne@69 36854 } else
jpayne@69 36855 #endif
jpayne@69 36856 {
jpayne@69 36857 char* result;
jpayne@69 36858 int r = PyBytes_AsStringAndSize(o, &result, length);
jpayne@69 36859 if (unlikely(r < 0)) {
jpayne@69 36860 return NULL;
jpayne@69 36861 } else {
jpayne@69 36862 return result;
jpayne@69 36863 }
jpayne@69 36864 }
jpayne@69 36865 }
jpayne@69 36866 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
jpayne@69 36867 int is_true = x == Py_True;
jpayne@69 36868 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
jpayne@69 36869 else return PyObject_IsTrue(x);
jpayne@69 36870 }
jpayne@69 36871 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
jpayne@69 36872 int retval;
jpayne@69 36873 if (unlikely(!x)) return -1;
jpayne@69 36874 retval = __Pyx_PyObject_IsTrue(x);
jpayne@69 36875 Py_DECREF(x);
jpayne@69 36876 return retval;
jpayne@69 36877 }
jpayne@69 36878 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
jpayne@69 36879 __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
jpayne@69 36880 #if PY_MAJOR_VERSION >= 3
jpayne@69 36881 if (PyLong_Check(result)) {
jpayne@69 36882 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
jpayne@69 36883 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
jpayne@69 36884 "The ability to return an instance of a strict subclass of int is deprecated, "
jpayne@69 36885 "and may be removed in a future version of Python.",
jpayne@69 36886 result_type_name)) {
jpayne@69 36887 __Pyx_DECREF_TypeName(result_type_name);
jpayne@69 36888 Py_DECREF(result);
jpayne@69 36889 return NULL;
jpayne@69 36890 }
jpayne@69 36891 __Pyx_DECREF_TypeName(result_type_name);
jpayne@69 36892 return result;
jpayne@69 36893 }
jpayne@69 36894 #endif
jpayne@69 36895 PyErr_Format(PyExc_TypeError,
jpayne@69 36896 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
jpayne@69 36897 type_name, type_name, result_type_name);
jpayne@69 36898 __Pyx_DECREF_TypeName(result_type_name);
jpayne@69 36899 Py_DECREF(result);
jpayne@69 36900 return NULL;
jpayne@69 36901 }
jpayne@69 36902 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
jpayne@69 36903 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 36904 PyNumberMethods *m;
jpayne@69 36905 #endif
jpayne@69 36906 const char *name = NULL;
jpayne@69 36907 PyObject *res = NULL;
jpayne@69 36908 #if PY_MAJOR_VERSION < 3
jpayne@69 36909 if (likely(PyInt_Check(x) || PyLong_Check(x)))
jpayne@69 36910 #else
jpayne@69 36911 if (likely(PyLong_Check(x)))
jpayne@69 36912 #endif
jpayne@69 36913 return __Pyx_NewRef(x);
jpayne@69 36914 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 36915 m = Py_TYPE(x)->tp_as_number;
jpayne@69 36916 #if PY_MAJOR_VERSION < 3
jpayne@69 36917 if (m && m->nb_int) {
jpayne@69 36918 name = "int";
jpayne@69 36919 res = m->nb_int(x);
jpayne@69 36920 }
jpayne@69 36921 else if (m && m->nb_long) {
jpayne@69 36922 name = "long";
jpayne@69 36923 res = m->nb_long(x);
jpayne@69 36924 }
jpayne@69 36925 #else
jpayne@69 36926 if (likely(m && m->nb_int)) {
jpayne@69 36927 name = "int";
jpayne@69 36928 res = m->nb_int(x);
jpayne@69 36929 }
jpayne@69 36930 #endif
jpayne@69 36931 #else
jpayne@69 36932 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
jpayne@69 36933 res = PyNumber_Int(x);
jpayne@69 36934 }
jpayne@69 36935 #endif
jpayne@69 36936 if (likely(res)) {
jpayne@69 36937 #if PY_MAJOR_VERSION < 3
jpayne@69 36938 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
jpayne@69 36939 #else
jpayne@69 36940 if (unlikely(!PyLong_CheckExact(res))) {
jpayne@69 36941 #endif
jpayne@69 36942 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
jpayne@69 36943 }
jpayne@69 36944 }
jpayne@69 36945 else if (!PyErr_Occurred()) {
jpayne@69 36946 PyErr_SetString(PyExc_TypeError,
jpayne@69 36947 "an integer is required");
jpayne@69 36948 }
jpayne@69 36949 return res;
jpayne@69 36950 }
jpayne@69 36951 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
jpayne@69 36952 Py_ssize_t ival;
jpayne@69 36953 PyObject *x;
jpayne@69 36954 #if PY_MAJOR_VERSION < 3
jpayne@69 36955 if (likely(PyInt_CheckExact(b))) {
jpayne@69 36956 if (sizeof(Py_ssize_t) >= sizeof(long))
jpayne@69 36957 return PyInt_AS_LONG(b);
jpayne@69 36958 else
jpayne@69 36959 return PyInt_AsSsize_t(b);
jpayne@69 36960 }
jpayne@69 36961 #endif
jpayne@69 36962 if (likely(PyLong_CheckExact(b))) {
jpayne@69 36963 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 36964 if (likely(__Pyx_PyLong_IsCompact(b))) {
jpayne@69 36965 return __Pyx_PyLong_CompactValue(b);
jpayne@69 36966 } else {
jpayne@69 36967 const digit* digits = __Pyx_PyLong_Digits(b);
jpayne@69 36968 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
jpayne@69 36969 switch (size) {
jpayne@69 36970 case 2:
jpayne@69 36971 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
jpayne@69 36972 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@69 36973 }
jpayne@69 36974 break;
jpayne@69 36975 case -2:
jpayne@69 36976 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
jpayne@69 36977 return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@69 36978 }
jpayne@69 36979 break;
jpayne@69 36980 case 3:
jpayne@69 36981 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
jpayne@69 36982 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@69 36983 }
jpayne@69 36984 break;
jpayne@69 36985 case -3:
jpayne@69 36986 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
jpayne@69 36987 return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@69 36988 }
jpayne@69 36989 break;
jpayne@69 36990 case 4:
jpayne@69 36991 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
jpayne@69 36992 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]));
jpayne@69 36993 }
jpayne@69 36994 break;
jpayne@69 36995 case -4:
jpayne@69 36996 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
jpayne@69 36997 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]));
jpayne@69 36998 }
jpayne@69 36999 break;
jpayne@69 37000 }
jpayne@69 37001 }
jpayne@69 37002 #endif
jpayne@69 37003 return PyLong_AsSsize_t(b);
jpayne@69 37004 }
jpayne@69 37005 x = PyNumber_Index(b);
jpayne@69 37006 if (!x) return -1;
jpayne@69 37007 ival = PyInt_AsSsize_t(x);
jpayne@69 37008 Py_DECREF(x);
jpayne@69 37009 return ival;
jpayne@69 37010 }
jpayne@69 37011 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
jpayne@69 37012 if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
jpayne@69 37013 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
jpayne@69 37014 #if PY_MAJOR_VERSION < 3
jpayne@69 37015 } else if (likely(PyInt_CheckExact(o))) {
jpayne@69 37016 return PyInt_AS_LONG(o);
jpayne@69 37017 #endif
jpayne@69 37018 } else {
jpayne@69 37019 Py_ssize_t ival;
jpayne@69 37020 PyObject *x;
jpayne@69 37021 x = PyNumber_Index(o);
jpayne@69 37022 if (!x) return -1;
jpayne@69 37023 ival = PyInt_AsLong(x);
jpayne@69 37024 Py_DECREF(x);
jpayne@69 37025 return ival;
jpayne@69 37026 }
jpayne@69 37027 }
jpayne@69 37028 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
jpayne@69 37029 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
jpayne@69 37030 }
jpayne@69 37031 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
jpayne@69 37032 return PyInt_FromSize_t(ival);
jpayne@69 37033 }
jpayne@69 37034
jpayne@69 37035
jpayne@69 37036 /* #### Code section: utility_code_pragmas_end ### */
jpayne@69 37037 #ifdef _MSC_VER
jpayne@69 37038 #pragma warning( pop )
jpayne@69 37039 #endif
jpayne@69 37040
jpayne@69 37041
jpayne@69 37042
jpayne@69 37043 /* #### Code section: end ### */
jpayne@69 37044 #endif /* Py_PYTHON_H */